mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-02 04:38:24 +08:00
AP_GPS: add sanity check to AP_GPS_Blended in SITL
we should not be producing a zero location from Blended while also having a status above zero
This commit is contained in:
1 parent
7050e9308f
commit
56d8cc042f
1 file changed
+7
@@ -386,6 +386,13 @@ void AP_GPS_Blended::calc_state(void)
|
||||
gps.Write_GPS(GPS_BLENDED_INSTANCE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
// sanity checks
|
||||
if (state.status > AP_GPS::NO_FIX && !state.location.initialised()) {
|
||||
AP_HAL::panic("status is >NO_FIX but location is zero");
|
||||
}
|
||||
#endif // CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
}
|
||||
|
||||
bool AP_GPS_Blended::get_lag(float &lag_sec) const
|
||||
|
||||
Reference in new issue
Block a user