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:
Peter Barker authored and Thomas Watson committed 2025-08-11 19:17:10 -05:00
1 parent 7050e9308f
commit 56d8cc042f
1 file changed
+7
+7
View File
@@ -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