mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-20 07:38:28 -04:00
DataFlash: protect against large testRatio from EKF
This should be resolved in the EKF but for now this stops the floating point exception
This commit is contained in:
parent
5e3c30b0fe
commit
f8b5714ced
@ -1411,7 +1411,7 @@ void DataFlash_Class::Log_Write_EKF2(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled)
|
||||
rng : (int16_t)(100*rng),
|
||||
innov : (int16_t)(100*innov),
|
||||
sqrtInnovVar : (uint16_t)(100*safe_sqrt(innovVar)),
|
||||
testRatio : (uint16_t)(100*testRatio),
|
||||
testRatio : (uint16_t)(100*constrain_float(testRatio,0.0f,650.0f)),
|
||||
beaconPosN : (int16_t)(100*beaconPosNED.x),
|
||||
beaconPosE : (int16_t)(100*beaconPosNED.y),
|
||||
beaconPosD : (int16_t)(100*beaconPosNED.z),
|
||||
@ -1739,7 +1739,7 @@ void DataFlash_Class::Log_Write_EKF3(AP_AHRS_NavEKF &ahrs, bool optFlowEnabled)
|
||||
rng : (int16_t)(100*rng),
|
||||
innov : (int16_t)(100*innov),
|
||||
sqrtInnovVar : (uint16_t)(100*sqrtf(innovVar)),
|
||||
testRatio : (uint16_t)(100*testRatio),
|
||||
testRatio : (uint16_t)(100*constrain_float(testRatio,0.0f,650.0f)),
|
||||
beaconPosN : (int16_t)(100*beaconPosNED.x),
|
||||
beaconPosE : (int16_t)(100*beaconPosNED.y),
|
||||
beaconPosD : (int16_t)(100*beaconPosNED.z),
|
||||
|
Loading…
Reference in New Issue
Block a user