Browse Source

AP_NavEKF3: Fix inconsistency in reporting raw GPS position validity

zr-v5.1
Paul Riseborough 4 years ago committed by Andrew Tridgell
parent
commit
a50be71b41
  1. 3
      libraries/AP_NavEKF3/AP_NavEKF3_Outputs.cpp

3
libraries/AP_NavEKF3/AP_NavEKF3_Outputs.cpp

@ -332,12 +332,13 @@ bool NavEKF3_core::getLLH(struct Location &loc) const @@ -332,12 +332,13 @@ bool NavEKF3_core::getLLH(struct Location &loc) const
}
} else {
// If no origin has been defined for the EKF or it is not estimating position, then we cannot
// use its position states so return a raw GPS reading if available and return false
// use its position states so return a raw GPS reading if available
if ((gps.status(selected_gps) >= AP_DAL_GPS::GPS_OK_FIX_3D)) {
const struct Location &gpsloc = gps.location(selected_gps);
loc = gpsloc;
loc.relative_alt = 0;
loc.terrain_alt = 0;
return true;
}
return false;
}

Loading…
Cancel
Save