sensors: Calculate and publish magnetometer inconsistency

This commit is contained in:
Paul Riseborough
2017-10-05 09:30:26 -07:00
committed by Daniel Agar
parent c7097085fa
commit 60a68d30c7
3 changed files with 57 additions and 2 deletions
+2 -1
View File
@@ -621,8 +621,8 @@ Sensors::run()
/* advertise the sensor_preflight topic and make the initial publication */
preflt.accel_inconsistency_m_s_s = 0.0f;
preflt.gyro_inconsistency_rad_s = 0.0f;
preflt.mag_inconsistency_ga = 0.0f;
_sensor_preflight = orb_advertise(ORB_ID(sensor_preflight), &preflt);
@@ -686,6 +686,7 @@ Sensors::run()
if (!_armed) {
_voted_sensors_update.calc_accel_inconsistency(preflt);
_voted_sensors_update.calc_gyro_inconsistency(preflt);
_voted_sensors_update.calc_mag_inconsistency(preflt);
orb_publish(ORB_ID(sensor_preflight), _sensor_preflight, &preflt);
}