Commit ac0175be authored by Roman Bapst's avatar Roman Bapst
Browse files

compute airspeed correctly

parent a22a7816
......@@ -341,7 +341,7 @@ void GazeboMavlinkInterface::ImuCallback(ImuPtr& imu_message) {
sensor_msg.ymag = mag_I.y + mag_noise;
sensor_msg.zmag = mag_I.z + mag_noise;
sensor_msg.abs_pressure = 0.0;
sensor_msg.diff_pressure = 0.5*1.2754*body_vel.x*body_vel.x;
sensor_msg.diff_pressure = 0.5*1.2754*(body_vel.z + body_vel.x)*(body_vel.z + body_vel.x) / 100;
sensor_msg.pressure_alt = pos_W_I.z;
sensor_msg.temperature = 0.0;
sensor_msg.fields_updated = 4095;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment