Skip to content
Snippets Groups Projects
Commit 7ca0698a authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Fixed HIL handling

parent 2cfe9ee1
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment