Skip to content

Commit

Permalink
Plane: fixed guided VTOL command in terrain mode
Browse files Browse the repository at this point in the history
if the GCS commands a guided re-position with an AGL frame and
quadplane is in Q_GUIDED_MODE=1 then this prevents us adding the home
altitude to the target terrain altitude
  • Loading branch information
tridge committed Oct 15, 2024
1 parent 81768b2 commit 7fe8c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ArduPlane/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_int_do_reposition(const mavlink_com
plane.set_mode(plane.mode_guided, ModeReason::GCS_COMMAND);

// add home alt if needed
if (requested_position.relative_alt) {
if (requested_position.relative_alt && !requested_position.terrain_alt) {
requested_position.alt += plane.home.alt;
requested_position.relative_alt = 0;
}
Expand Down

0 comments on commit 7fe8c0c

Please sign in to comment.