mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 11:47:35 +08:00
FlightTaskManualAltitude/Position/Stabilized: activate with 0 velocity and hover thrust
This commit is contained in:
committed by
Beat Küng
parent
8bafdba4f9
commit
157814b710
@@ -52,7 +52,8 @@ FlightTaskManualAltitude::FlightTaskManualAltitude(control::SuperBlock *parent,
|
||||
|
||||
bool FlightTaskManualAltitude::activate()
|
||||
{
|
||||
_pos_sp_z = _position(2);
|
||||
_pos_sp_z = NAN;
|
||||
_vel_sp_z = 0.0f;
|
||||
return FlightTaskManualStabilized::activate();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ FlightTaskManualPosition::FlightTaskManualPosition(control::SuperBlock *parent,
|
||||
|
||||
bool FlightTaskManualPosition::activate()
|
||||
{
|
||||
_pos_sp_xy = matrix::Vector2f(&_position(0));
|
||||
_pos_sp_xy = matrix::Vector2f(NAN, NAN);
|
||||
_vel_sp_xy = matrix::Vector2f(0.0f, 0.0f);
|
||||
return FlightTaskManualAltitude::activate();
|
||||
}
|
||||
|
||||
@@ -53,8 +53,9 @@ FlightTaskManualStabilized::FlightTaskManualStabilized(control::SuperBlock *pare
|
||||
|
||||
bool FlightTaskManualStabilized::activate()
|
||||
{
|
||||
_yaw_sp = _yaw;
|
||||
_yaw_sp = NAN;
|
||||
_yaw_rate_sp = 0.0f;
|
||||
_thr_sp = matrix::Vector3f(0.0f, 0.0f, -_throttle_hover.get());
|
||||
return FlightTaskManual::activate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user