mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 09:45:33 +03:00
Update navigation.c
This commit is contained in:
parent
7c9365a797
commit
088edec2c1
1 changed files with 1 additions and 0 deletions
|
@ -2146,6 +2146,7 @@ static int16_t getCourseOverGround(void) // returns degrees
|
|||
* Otherwise use gyro YAW for multirotor, apply rcCommand based YAW correction */
|
||||
if (isGPSHeadingValid()) {
|
||||
return DECIDEGREES_TO_DEGREES(gpsSol.groundCourse);
|
||||
|
||||
} else if (STATE(MULTIROTOR) && sensors(SENSOR_MAG) && posControl.flags.estHeadingStatus == EST_TRUSTED) {
|
||||
return CENTIDEGREES_TO_DEGREES(wrap_36000(posControl.actualState.yaw + RADIANS_TO_CENTIDEGREES(atan2_approx(rcCommand[ROLL], rcCommand[PITCH]))));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue