diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Outputs.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_Outputs.cpp index 88c013a514..8b744735c6 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Outputs.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Outputs.cpp @@ -343,6 +343,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; }