Browse Source

Copter: LAND at stopping point instead of curr pos

mission-4.1.18
Randy Mackay 11 years ago committed by Andrew Tridgell
parent
commit
bd88ed8a53
  1. 6
      ArduCopter/control_land.pde

6
ArduCopter/control_land.pde

@ -10,8 +10,10 @@ static bool land_init(bool ignore_checks) @@ -10,8 +10,10 @@ static bool land_init(bool ignore_checks)
// check if we have GPS and decide which LAND we're going to do
land_with_gps = GPS_ok();
if (land_with_gps) {
// set target to current position
wp_nav.init_loiter_target();
// set target to stopping point
Vector3f stopping_point;
wp_nav.get_loiter_stopping_point_xy(stopping_point);
wp_nav.set_loiter_target(stopping_point);
}
// initialise altitude target to stopping point
pos_control.set_target_to_stopping_point_z();

Loading…
Cancel
Save