mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 00:58:37 -04:00
AP_NavEKF2: getLLH fix when no GPS available
This commit is contained in:
parent
70ef6cf02c
commit
2919491298
@ -349,6 +349,8 @@ bool NavEKF2_core::getLLH(struct Location &loc) const
|
||||
} else {
|
||||
// if no GPS fix, provide last known position before entering the mode
|
||||
// correct for IMU offset (EKF calculations are at the IMU position)
|
||||
loc.lat = EKF_origin.lat;
|
||||
loc.lng = EKF_origin.lng;
|
||||
loc.offset((lastKnownPositionNE.x + posOffsetNED.x), (lastKnownPositionNE.y + posOffsetNED.y));
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user