PX4-Autopilot
PX4-Autopilot copied to clipboard
[Bug] fixed-wing airspeed and wind estimation problem in SITL
Describe the bug
PX4 software-in-the-loop calculates the airspeed using differential pressure in SensorAirspeed.cpp in the simulation module. However, SensorAirspeed.cpp generates the fake differential pressure by body velocity, it will induce some airspeed calculating and wind estimation problems when the wind comes from the x-axis of the body frame
I think a more feasible modification is using the wind triangle concept, obtaining the ground speed from uorb topic and true wind value from gazebo plugin, and calculating the true airspeed to generate the differential pressure. What do you guys think?
To Reproduce
- Follow the steps in https://docs.px4.io/main/en/ros2/user_guide.html to install PX4 autopilot, ROS2 and gazebo sim.
- Open a standard_vtol in the windy.sdf
- Set the wind magnitude as (0, -2, 0) using the wind tag in the sdf file.
<linear_velociy>0 -2 0</linear_velociy> - Arm the drone and transition to the fixed wing mode, fly straightly to the north.
- Open the plotjuggler to monitor the wind estimation value in the /fmu/out/wind
Expected behavior
the windspeed_east and windspeed_north value should converge to real value (0, -2)
Screenshot / Media
No response
Flight Log
No response
Software Version
Flight controller
No response
Vehicle type
Hybrid VTOL
How are the different components wired up (including port information)
No response
Additional context
No response