mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-23 15:31:13 +08:00
fix(simulation): set temp in gz airspeed plugin (#28842)
The plugin already calculates a temperature which is used to adjust air density influence on differential pressure. But it does not give the airspeed message the temperature, so the differential pressure temperature ends up being 0.
This commit is contained in:
1 parent
0b3e166d4c
commit
1cd0440b68
1 file changed
+1
@@ -146,6 +146,7 @@ void AirSpeed::PreUpdate(const gz::sim::UpdateInfo &_info,
|
||||
(double)diff_pressure_noise;
|
||||
gz::msgs::AirSpeed airspeed_msg;
|
||||
airspeed_msg.set_diff_pressure(diff_pressure * 100.0);
|
||||
airspeed_msg.set_temperature(temperature_local); // [K]
|
||||
_pub.Publish(airspeed_msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user