2019-08-28 01:09:18 -03:00
|
|
|
#include "AP_Nav_Common.h"
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL.h>
|
|
|
|
#include <AP_Logger/AP_Logger.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
write an EKF timing message
|
|
|
|
*/
|
2020-03-25 09:33:03 -03:00
|
|
|
|
|
|
|
// @LoggerMessage: NKT,XKT
|
|
|
|
// @Description: EKF timing information
|
2020-04-07 04:33:04 -03:00
|
|
|
// @Field: TimeUS: Time since system startup
|
2020-03-25 09:33:03 -03:00
|
|
|
// @Field: C: EKF core this message instance applies to
|
|
|
|
// @Field: Cnt: count of samples used to create this message
|
|
|
|
// @Field: IMUMin: smallest IMU sample interval
|
|
|
|
// @Field: IMUMax: largest IMU sample interval
|
|
|
|
// @Field: EKFMin: low-passed achieved average time step rate for the EKF (minimum)
|
|
|
|
// @Field: EKFMax: low-passed achieved average time step rate for the EKF (maximum)
|
|
|
|
// @Field: AngMin: accumulated measurement time interval for the delta angle (minimum)
|
|
|
|
// @Field: AngMax: accumulated measurement time interval for the delta angle (maximum)
|
|
|
|
// @Field: VMin: accumulated measurement time interval for the delta velocity (minimum)
|
|
|
|
// @Field: VMax: accumulated measurement time interval for the delta velocity (maximum)
|
2019-12-05 20:10:13 -04:00
|
|
|
void Log_EKF_Timing(const char * name, const uint8_t core, uint64_t time_us, const struct ekf_timing &timing)
|
2019-08-28 01:09:18 -03:00
|
|
|
{
|
|
|
|
AP::logger().Write(
|
|
|
|
name,
|
2019-12-05 20:10:13 -04:00
|
|
|
"TimeUS,C,Cnt,IMUMin,IMUMax,EKFMin,EKFMax,AngMin,AngMax,VMin,VMax",
|
|
|
|
"s#sssssssss", // Units
|
|
|
|
"F-000000000", // Mults
|
|
|
|
"QBIffffffff", // Format
|
2019-08-28 01:09:18 -03:00
|
|
|
time_us,
|
2019-12-05 20:10:13 -04:00
|
|
|
core,
|
2019-08-28 01:09:18 -03:00
|
|
|
timing.count,
|
|
|
|
(double)timing.dtIMUavg_min,
|
|
|
|
(double)timing.dtIMUavg_max,
|
|
|
|
(double)timing.dtEKFavg_min,
|
|
|
|
(double)timing.dtEKFavg_max,
|
|
|
|
(double)timing.delAngDT_min,
|
|
|
|
(double)timing.delAngDT_max,
|
|
|
|
(double)timing.delVelDT_min,
|
|
|
|
(double)timing.delVelDT_max);
|
|
|
|
}
|