mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 13:50:35 +08:00
f38388cdab
Replace the multiple if-else statements by a generic equation. - For a multicopter, the attenuation factor is 2 and symmetrical - For a fixedwing, the attenuation factor is 1 if the acceleration is positive and that centripetal correction is available and 2 otherwise. Note that the function "sq" needs to be const in order to be used in a const function.