From e48f46c98b23b1cb539318626e04d7df08c9efee Mon Sep 17 00:00:00 2001 From: priseborough Date: Fri, 28 Apr 2017 17:14:22 +1000 Subject: [PATCH] AP_NavEKF2: Add monitoring of average EKF time step --- libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp index 06745e1a5d..be49653931 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp @@ -769,6 +769,8 @@ void NavEKF2_core::updateTimingStatistics(void) if (timing.count == 0) { timing.dtIMUavg_max = dtIMUavg; timing.dtIMUavg_min = dtIMUavg; + timing.dtEKFavg_max = dtEkfAvg; + timing.dtEKFavg_min = dtEkfAvg; timing.delAngDT_max = imuDataDelayed.delAngDT; timing.delAngDT_min = imuDataDelayed.delAngDT; timing.delVelDT_max = imuDataDelayed.delVelDT; @@ -776,6 +778,8 @@ void NavEKF2_core::updateTimingStatistics(void) } else { timing.dtIMUavg_max = MAX(timing.dtIMUavg_max, dtIMUavg); timing.dtIMUavg_min = MIN(timing.dtIMUavg_min, dtIMUavg); + timing.dtEKFavg_max = MAX(timing.dtEKFavg_max, dtEkfAvg); + timing.dtEKFavg_min = MIN(timing.dtEKFavg_min, dtEkfAvg); timing.delAngDT_max = MAX(timing.delAngDT_max, imuDataDelayed.delAngDT); timing.delAngDT_min = MIN(timing.delAngDT_min, imuDataDelayed.delAngDT); timing.delVelDT_max = MAX(timing.delVelDT_max, imuDataDelayed.delVelDT);