|
|
|
@ -69,11 +69,17 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command)
@@ -69,11 +69,17 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
float new_velocity = signFromBool(new_is_clockwise) * new_absolute_velocity; |
|
|
|
|
|
|
|
|
|
if (math::isInRange(new_radius, _radius_min, _radius_max)) { |
|
|
|
|
_started_clockwise = new_is_clockwise; |
|
|
|
|
_sanitizeParams(new_radius, new_velocity); |
|
|
|
|
_orbit_radius = new_radius; |
|
|
|
|
_orbit_velocity = new_velocity; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
ret = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// commanded heading behaviour
|
|
|
|
|
if (PX4_ISFINITE(command.param3)) { |
|
|
|
|
_yaw_behaviour = command.param3; |
|
|
|
|