From 5bda871d603ec379dde84c89084093cf002012c5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 23 Dec 2011 08:28:56 +1100 Subject: [PATCH] added comment on using GPS ground course --- ArduPlane/navigation.pde | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ArduPlane/navigation.pde b/ArduPlane/navigation.pde index 776886da01..4aa68f3ad9 100644 --- a/ArduPlane/navigation.pde +++ b/ArduPlane/navigation.pde @@ -106,6 +106,15 @@ static void calc_gndspeed_undershoot() static void calc_bearing_error() { if(takeoff_complete == true || g.compass_enabled == true) { + /* + most of the time we use the yaw sensor for heading, even if + we don't have a compass. The yaw sensor is drift corrected + in the DCM library. We only use the gps ground course + directly if we haven't completed takeoff, as the yaw drift + correction won't have had a chance to kick in. Drift + correction using the GPS typically takes 10 seconds or so + for a 180 degree correction. + */ bearing_error = nav_bearing - dcm.yaw_sensor; } else {