mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 12:30:35 +08:00
Rename math::gradual() to math::interpolate() and add unit tests to cover additional corner cases.
This commit is contained in:
committed by
Mathieu Bresciani
parent
021b23826d
commit
87a5705960
@@ -223,9 +223,9 @@ void FlightTaskAuto::_prepareLandSetpoints()
|
||||
_velocity_setpoint.setNaN(); // Don't take over any smoothed velocity setpoint
|
||||
|
||||
// Slow down automatic descend close to ground
|
||||
float vertical_speed = math::gradual(_dist_to_ground,
|
||||
_param_mpc_land_alt2.get(), _param_mpc_land_alt1.get(),
|
||||
_param_mpc_land_speed.get(), _param_mpc_z_vel_max_dn.get());
|
||||
float vertical_speed = math::interpolate(_dist_to_ground,
|
||||
_param_mpc_land_alt2.get(), _param_mpc_land_alt1.get(),
|
||||
_param_mpc_land_speed.get(), _param_mpc_z_vel_max_dn.get());
|
||||
|
||||
bool range_dist_available = PX4_ISFINITE(_dist_to_bottom);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user