Browse Source

AP_NavEKF2: Fix misleading pre-flight status reporting

mission-4.1.18
Paul Riseborough 9 years ago committed by Andrew Tridgell
parent
commit
16cb7078cd
  1. 4
      libraries/AP_NavEKF2/AP_NavEKF2_Outputs.cpp

4
libraries/AP_NavEKF2/AP_NavEKF2_Outputs.cpp

@ -478,8 +478,8 @@ void NavEKF2_core::getFilterStatus(nav_filter_status &status) const @@ -478,8 +478,8 @@ void NavEKF2_core::getFilterStatus(nav_filter_status &status) const
status.flags.takeoff_detected = takeOffDetected; // takeoff for optical flow navigation has been detected
status.flags.takeoff = expectGndEffectTakeoff; // The EKF has been told to expect takeoff and is in a ground effect mitigation mode
status.flags.touchdown = expectGndEffectTouchdown; // The EKF has been told to detect touchdown and is in a ground effect mitigation mode
status.flags.using_gps = (imuSampleTime_ms - lastPosPassTime_ms) < 4000;
status.flags.gps_glitching = !gpsAccuracyGood; // The GPS is glitching
status.flags.using_gps = ((imuSampleTime_ms - lastPosPassTime_ms) < 4000) && (PV_AidingMode == AID_ABSOLUTE);
status.flags.gps_glitching = !gpsAccuracyGood && (PV_AidingMode == AID_ABSOLUTE); // The GPS is glitching
}
/*

Loading…
Cancel
Save