mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 09:45:33 +03:00
Move check for valid GPS heading to a function
Allows calling it from both the IMU and the wind estimator
This commit is contained in:
parent
c52f687ec5
commit
78e62d36a8
3 changed files with 8 additions and 1 deletions
|
@ -463,7 +463,7 @@ static void imuCalculateEstimatedAttitude(float dT)
|
|||
|
||||
#if defined(USE_GPS)
|
||||
if (STATE(FIXED_WING)) {
|
||||
bool canUseCOG = sensors(SENSOR_GPS) && STATE(GPS_FIX) && gpsSol.numSat >= 6 && gpsSol.groundSpeed >= 300;
|
||||
bool canUseCOG = isGPSHeadingValid();
|
||||
|
||||
if (canUseCOG) {
|
||||
if (gpsHeadingInitialized) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue