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 3f6b43e3aa
commit 2b02c84ae4
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,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