From a5e95bde0a77cdd894b926860dba8bc98eaf4dbd Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 3 Jan 2014 00:35:18 +0100 Subject: Added lots of instrumentation to ensure all data sources are coming in clean --- .../fw_att_pos_estimator_main.cpp | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp') diff --git a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp index f25ab5ec0..ef51c7524 100644 --- a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp +++ b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp @@ -145,6 +145,12 @@ private: struct mag_scale _mag_offsets; perf_counter_t _loop_perf; /**< loop performance counter */ + perf_counter_t _perf_gyro; /// 2) { /* fuse GPS updates */ @@ -529,6 +552,7 @@ FixedwingEstimator::task_main() orb_check(_mag_sub, &mag_updated); if (mag_updated) { orb_copy(ORB_ID(sensor_mag), _mag_sub, &_mag); + perf_count(_perf_mag); // XXX we compensate the offsets upfront - should be close to zero. magData.x = _mag.x; @@ -555,6 +579,7 @@ FixedwingEstimator::task_main() orb_check(_airspeed_sub, &airspeed_updated); if (airspeed_updated && _initialized) { orb_copy(ORB_ID(airspeed), _airspeed_sub, &_airspeed); + perf_count(_perf_airspeed); if (_airspeed.true_airspeed_m_s > 8.0f /* XXX magic number */) { -- cgit v1.2.3