From df8e8c64e87677654e171a57f31eaa3e8f7d10e9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Jun 2013 10:42:35 +1000 Subject: [PATCH] AP_L1_Control: use projected position for turns --- libraries/AP_L1_Control/AP_L1_Control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_L1_Control/AP_L1_Control.cpp b/libraries/AP_L1_Control/AP_L1_Control.cpp index dabe299f05..cf25a4c616 100644 --- a/libraries/AP_L1_Control/AP_L1_Control.cpp +++ b/libraries/AP_L1_Control/AP_L1_Control.cpp @@ -97,7 +97,7 @@ void AP_L1_Control::update_waypoint(const struct Location &prev_WP, const struct float K_L1 = 4.0f * _L1_damping * _L1_damping; // Get current position and velocity - _ahrs->get_position(_current_loc); + _ahrs->get_projected_position(_current_loc); // update _target_bearing_cd _target_bearing_cd = get_bearing_cd(_current_loc, next_WP); @@ -197,7 +197,7 @@ void AP_L1_Control::update_loiter(const struct Location ¢er_WP, float radius float K_L1 = 4.0f * _L1_damping * _L1_damping; //Get current position and velocity - _ahrs->get_position(_current_loc); + _ahrs->get_projected_position(_current_loc); // update _target_bearing_cd _target_bearing_cd = get_bearing_cd(_current_loc, center_WP);