AP_NavEKF2: fix vertical flyaways when rangefinder stops providing data

This commit is contained in:
Dr.-Ing. Amilcar do Carmo Lucas 2020-05-20 12:23:05 +02:00 committed by Randy Mackay
parent a3d140b949
commit 83dc46d539
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ void NavEKF2_core::readRangeFinder(void)
}
storedRngMeasTime_ms[sensorIndex][rngMeasIndex[sensorIndex]] = imuSampleTime_ms - 25;
storedRngMeas[sensorIndex][rngMeasIndex[sensorIndex]] = sensor->distance_cm() * 0.01f;
} else {
continue;
}
// check for three fresh samples