From 8c18a607660ed48472cf9735e059f186b022dd90 Mon Sep 17 00:00:00 2001 From: Robert Lefebvre Date: Tue, 4 Dec 2012 14:50:14 -0500 Subject: [PATCH] ACM: Small fix to Yaw Look Ahead --- ArduCopter/navigation.pde | 1 + 1 file changed, 1 insertion(+) diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde index 42f4ce350a..2efbe0b18c 100644 --- a/ArduCopter/navigation.pde +++ b/ArduCopter/navigation.pde @@ -132,6 +132,7 @@ static void calc_velocity_and_position(){ static void calc_ground_bearing(){ ground_bearing = atan2( lat_speed , lon_speed ) * DEGX100; + ground_bearing = wrap_360(ground_bearing); // atan2 returns a value of -pi to +pi, so we need to wrap this. } //****************************************************************