Copter: guided init uses vertical stopping point

This commit is contained in:
Randy Mackay 2017-04-27 13:44:08 +09:00
parent e2cf836734
commit 81f8ab3933
1 changed files with 2 additions and 5 deletions

View File

@ -87,12 +87,9 @@ void Copter::guided_pos_control_start()
// initialise waypoint and spline controller
wp_nav->wp_and_spline_init();
// initialise wpnav to stopping point at current altitude
// To-Do: set to current location if disarmed?
// To-Do: set to stopping point altitude?
// initialise wpnav to stopping point
Vector3f stopping_point;
stopping_point.z = inertial_nav.get_altitude();
wp_nav->get_wp_stopping_point_xy(stopping_point);
wp_nav->get_wp_stopping_point(stopping_point);
// no need to check return status because terrain data is not used
wp_nav->set_wp_destination(stopping_point, false);