mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 14:58:53 +08:00
transition flighttask: don't control yaw and altitude during trans
Signed-off-by: RomanBapst <bapstroman@gmail.com> # Conflicts: # src/lib/flight_tasks/tasks/Transition/FlightTaskTransition.cpp
This commit is contained in:
@@ -61,9 +61,11 @@ void FlightTaskTransition::checkSetpoints(vehicle_local_position_setpoint_s &set
|
||||
bool FlightTaskTransition::update()
|
||||
{
|
||||
// level wings during the transition, altitude should be controlled
|
||||
_position_setpoint(2) = _transition_altitude;
|
||||
_acceleration_setpoint.xy() = matrix::Vector2f(0.f, 0.f);
|
||||
_position_setpoint *= NAN;
|
||||
_velocity_setpoint(2) = 0.0f;
|
||||
_position_setpoint(2) = NAN;
|
||||
|
||||
_yaw_setpoint = _transition_yaw;
|
||||
_yaw_setpoint = NAN;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ public:
|
||||
|
||||
private:
|
||||
void checkSetpoints(vehicle_local_position_setpoint_s &setpoints);
|
||||
void updateAccelerationEstimate();
|
||||
|
||||
float _transition_altitude = 0.0f;
|
||||
float _transition_yaw = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user