gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.15k stars 478 forks source link

The 'a0' in LiftDragPlugin does not obey the aerodynamics habbits. #2831

Open petertheprocess opened 3 years ago

petertheprocess commented 3 years ago

https://github.com/osrf/gazebo/blob/a9f093f2fc7fa7fc49efa73719f6536ad28f8af7/plugins/LiftDragPlugin.cc#L254-L255 https://github.com/osrf/gazebo/blob/a9f093f2fc7fa7fc49efa73719f6536ad28f8af7/plugins/LiftDragPlugin.cc#L272-L274 For people who know aerodynamics, 'a0' can be easily misunderstood as 'Zero-Lift AOA' which is just the opposite number of present definition. So I suggest changing the code like this.

this->alpha =  acos(cosAlpha) - this->alpha0; 

https://github.com/PX4/sitl_gazebo/issues/586#issue-684509105

chapulina commented 3 years ago

I don't think this is likely to change, since it would break existing code that is accommodating the current math. I'd suggest you open a PR updating the tutorial with clarifications for users:

http://gazebosim.org/tutorials?tut=aerodynamics&cat=physics#Inputparameters

The same math was ported to Ignition. The math could be updated there on future Ignition versions.