mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
HAL_SITL: need to use fabs() for double checking
This commit is contained in:
parent
b9abf30785
commit
d8791134f9
@ -258,7 +258,7 @@ void SITL_State::_fdm_input(void)
|
||||
// prevent bad inputs from SIM from corrupting our state
|
||||
double *v = &_sitl->state.latitude;
|
||||
for (uint8_t i=0; i<17; i++) {
|
||||
if (isinf(v[i]) || isnan(v[i]) || fabsf(v[i]) > 1.0e10) {
|
||||
if (isinf(v[i]) || isnan(v[i]) || fabs(v[i]) > 1.0e10) {
|
||||
v[i] = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user