Skip to content

Commit

Permalink
FlightTaskDescned: fix horizontal acceleration overriding vertical one
Browse files Browse the repository at this point in the history
Also descend with more acceleration again to avoid the risk of ascending instead of descending because of a wrong hover thrust estimate.
  • Loading branch information
MaEtUgR authored and sfuhrer committed Oct 25, 2024
1 parent 5a53190 commit cac0133
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool FlightTaskDescend::update()
} else {
// descend with constant acceleration (crash landing)
_velocity_setpoint(2) = NAN;
_acceleration_setpoint(2) = .15f;
_acceleration_setpoint(2) = .3f;
}

// Nudging
Expand All @@ -69,7 +69,7 @@ bool FlightTaskDescend::update()
_acceleration_setpoint(2) -= _sticks.getThrottleZeroCentered() * 10.f;

} else {
_acceleration_setpoint = matrix::Vector3f(0.f, 0.f, NAN); // stay level to minimize horizontal drift
_acceleration_setpoint.xy() = matrix::Vector2f(0.f, 0.f); // stay level to minimize horizontal drift
_yawspeed_setpoint = NAN;

// keep heading
Expand Down

0 comments on commit cac0133

Please sign in to comment.