Updates to wind in the IPF#11109
Conversation
- Correct the wind heading value. It was 180 degrees off and another 22 degrees clockwise. - Added `Relative wind offset` which gives the relative difference in degrees between the wind heading and aircraft heading. 0 degrees is flying directly in to the headwind. -180 to 1 degree(s) signifies a counter-clockwise offset.
PR Compliance Guide 🔍(Compliance updated until commit 0b7d9e4)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit 4db578e
|
||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
- Removed debug - Streamlined code
Fixed stupid error that my compiler didn't catch!
|
Seems like there's an issue with the SITL generation. Have any changes been made recently to SITL? |
As the SITL builds for Linux and MacOS, this seems to be an issue with GH's Windows/Cygwin environment. |
User description
Relative wind offsetwhich gives the relative difference in degrees between the wind heading and aircraft heading. 0 degrees is flying directly in to the headwind. -180 to 1 degree(s) signifies a counter-clockwise offset.Requires Configurator iNavFlight/inav-configurator#2426
PR Type
Enhancement, Bug fix
Description
Corrected wind heading calculation by adding 18000 centidegrees offset
Removed incorrect 22-degree clockwise adjustment from wind heading
Added new Relative Wind Offset operand for aircraft-to-wind heading comparison
Updated documentation with new operand definition and behavior
Diagram Walkthrough
File Walkthrough
logic_condition.c
Wind heading fix and relative wind offset implementationsrc/main/programming/logic_condition.c
instead of using incorrect 22-degree adjustment
windAngletowindHeadingfor clarityLOGIC_CONDITION_OPERAND_FLIGHT_RELATIVE_WIND_OFFSETcase with relative wind offset calculation
proper angle normalization
logic_condition.h
Add relative wind offset operand enumsrc/main/programming/logic_condition.h
LOGIC_CONDITION_OPERAND_FLIGHT_RELATIVE_WIND_OFFSETwith operand ID 49Programming Framework.md
Document relative wind offset operanddocs/Programming Framework.md
detailed description
negative values indicate left offset