Skip to content

Commit

Permalink
Revert "simulator: remove hack for diff_pressure noise"
Browse files Browse the repository at this point in the history
This reverts commit 4a71984.
  • Loading branch information
dagar committed Apr 29, 2019
1 parent d93efa9 commit 2142459
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/simulator/simulator_mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ void Simulator::update_sensors(const mavlink_hil_sensor_t *imu)

RawAirspeedData airspeed = {};
airspeed.temperature = imu->temperature;
airspeed.diff_pressure = imu->diff_pressure;
// FIXME: diff_pressure needs some noise to pass preflight checks, so we just take the
// noise from the gyro.
airspeed.diff_pressure = imu->diff_pressure + ((imu->ygyro > 0) ? 0.001f : 0.0f);

write_airspeed_data(&airspeed);
}
Expand Down

0 comments on commit 2142459

Please sign in to comment.