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. } //****************************************************************