From ae4814a7734300c2368b1b79267c0ad76900cdba Mon Sep 17 00:00:00 2001 From: Przemek Lekston Date: Wed, 6 Aug 2014 21:16:21 +0200 Subject: [PATCH] AP_AHRS_DCM.cpp: changed the direction of position projection to ensure correct behavious in crosswind --- libraries/AP_AHRS/AP_AHRS_DCM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_AHRS/AP_AHRS_DCM.cpp b/libraries/AP_AHRS/AP_AHRS_DCM.cpp index 854f97b697..9f79bcd45c 100644 --- a/libraries/AP_AHRS/AP_AHRS_DCM.cpp +++ b/libraries/AP_AHRS/AP_AHRS_DCM.cpp @@ -886,7 +886,7 @@ bool AP_AHRS_DCM::get_position(struct Location &loc) loc.flags.terrain_alt = 0; location_offset(loc, _position_offset_north, _position_offset_east); if (_flags.fly_forward && _have_position) { - location_update(loc, degrees(yaw), _gps.ground_speed() * _gps.get_lag()); + location_update(loc, _gps.ground_course_cd() * 0.01f, _gps.ground_speed() * _gps.get_lag()); } return _have_position; }