AP_NavEKF2: documentation update

This commit is contained in:
priseborough 2017-05-01 13:50:52 +10:00 committed by Andrew Tridgell
parent 4a898037e9
commit 2d4eee0cce
1 changed files with 6 additions and 2 deletions

View File

@ -325,8 +325,12 @@ void NavEKF2_core::readIMUData()
// Keep track of the number of IMU frames since the last state prediction // Keep track of the number of IMU frames since the last state prediction
framesSincePredict++; framesSincePredict++;
// If 10msec has elapsed, and the frontend has allowed us to start a new predict cycle, then store the accumulated IMU data /*
// to be used by the state prediction, ignoring the frontend permission if more than 20msec has lapsed * If the target EKF time step has been accumulated, and the frontend has allowed start of a new predict cycle,
* then store the accumulated IMU data to be used by the state prediction, ignoring the frontend permission if more
* than twice the target time has lapsed. Adjust the target EKF step time threshold to allow for timing jitter in the
* IMU data.
*/
if ((dtIMUavg*(float)framesSincePredict >= (EKF_TARGET_DT-(dtIMUavg*0.5)) && if ((dtIMUavg*(float)framesSincePredict >= (EKF_TARGET_DT-(dtIMUavg*0.5)) &&
startPredictEnabled) || (dtIMUavg*(float)framesSincePredict >= 2.0f*EKF_TARGET_DT)) { startPredictEnabled) || (dtIMUavg*(float)framesSincePredict >= 2.0f*EKF_TARGET_DT)) {