Skip to content

Commit

Permalink
FwPositionControl: don't do takeoff help for vtol
Browse files Browse the repository at this point in the history
- takeoff help is used for fixed wings, it increases the altitude setpoint
after a launch. A vtol does not need this as it's already sufficiently
high up in the air.

Signed-off-by: Roman <bapstroman@gmail.com>
  • Loading branch information
RomanBapst committed Jul 27, 2018
1 parent 462cf13 commit 0ec634e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,11 @@ FixedwingPositionControl::in_takeoff_situation()
void
FixedwingPositionControl::do_takeoff_help(float *hold_altitude, float *pitch_limit_min)
{
// vtol does not need takeoff help
if (_vehicle_status.is_vtol) {
return;
}

/* demand "climbout_diff" m above ground if user switched into this mode during takeoff */
if (in_takeoff_situation()) {
*hold_altitude = _takeoff_ground_alt + _parameters.climbout_diff;
Expand Down

0 comments on commit 0ec634e

Please sign in to comment.