Browse Source

added comment on using GPS ground course

master
Andrew Tridgell 13 years ago
parent
commit
5bda871d60
  1. 9
      ArduPlane/navigation.pde

9
ArduPlane/navigation.pde

@ -106,6 +106,15 @@ static void calc_gndspeed_undershoot() @@ -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 {

Loading…
Cancel
Save