mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 20:33:34 +08:00
sensors: Calculate and publish magnetometer inconsistency
This commit is contained in:
committed by
Daniel Agar
parent
c7097085fa
commit
60a68d30c7
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user