forked from Archive/PX4-Autopilot
Fixed HIL handling
This commit is contained in:
parent
2cfe9ee1b4
commit
7ca0698a6b
|
@ -416,7 +416,8 @@ handle_message(mavlink_message_t *msg)
|
|||
airspeed.timestamp = hrt_absolute_time();
|
||||
|
||||
float ias = calc_indicated_airspeed(imu.diff_pressure);
|
||||
float tas = calc_true_airspeed_from_indicated(ias, imu.abs_pressure, imu.temperature);
|
||||
// XXX need to fix this
|
||||
float tas = ias;
|
||||
|
||||
airspeed.indicated_airspeed_m_s = ias;
|
||||
airspeed.true_airspeed_m_s = tas;
|
||||
|
@ -426,7 +427,7 @@ handle_message(mavlink_message_t *msg)
|
|||
} else {
|
||||
orb_publish(ORB_ID(airspeed), pub_hil_airspeed, &airspeed);
|
||||
}
|
||||
warnx("SENSOR: IAS: %6.2f TAS: %6.2f", airspeed.indicated_airspeed_m_s, airspeed.true_airspeed_m_s);
|
||||
//warnx("SENSOR: IAS: %6.2f TAS: %6.2f", airspeed.indicated_airspeed_m_s, airspeed.true_airspeed_m_s);
|
||||
|
||||
/* publish */
|
||||
if (pub_hil_sensors > 0) {
|
||||
|
|
|
@ -196,7 +196,7 @@ l_sensor_combined(const struct listener *l)
|
|||
raw.gyro_rad_s[1], raw.gyro_rad_s[2],
|
||||
raw.magnetometer_ga[0],
|
||||
raw.magnetometer_ga[1], raw.magnetometer_ga[2],
|
||||
raw.baro_pres_mbar, 0 /* no diff pressure yet */,
|
||||
raw.baro_pres_mbar, raw.differential_pressure_pa,
|
||||
raw.baro_alt_meter, raw.baro_temp_celcius,
|
||||
fields_updated);
|
||||
|
||||
|
|
Loading…
Reference in New Issue