1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 01:35:35 +03:00

Merge pull request #8604 from breadoven/abo_osd_add_groundcourse_crosstrackerr

OSD Ground Course and Cross Track Error
This commit is contained in:
breadoven 2022-12-08 14:32:35 +00:00 committed by GitHub
commit 987fa6d3bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 52 additions and 9 deletions

View file

@ -2119,7 +2119,7 @@ void updateActualAltitudeAndClimbRate(bool estimateValid, float newAltitude, flo
/*-----------------------------------------------------------
* Processes an update to estimated heading
*-----------------------------------------------------------*/
void updateActualHeading(bool headingValid, int32_t newHeading)
void updateActualHeading(bool headingValid, int32_t newHeading, int32_t newGroundCourse)
{
/* Update heading. Check if we're acquiring a valid heading for the
* first time and update home heading accordingly.
@ -2150,7 +2150,9 @@ void updateActualHeading(bool headingValid, int32_t newHeading)
}
posControl.rthState.homeFlags |= NAV_HOME_VALID_HEADING;
}
/* Use course over ground for fixed wing nav "heading" when valid - TODO use heading and cog as specifically required for FW and MR */
posControl.actualState.yaw = newHeading;
posControl.actualState.cog = newGroundCourse; // currently only used for OSD display
posControl.flags.estHeadingStatus = newEstHeading;
/* Precompute sin/cos of yaw angle */