diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index e7e4edc0af..f0f47e31ab 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -2011,7 +2011,7 @@ static void update_navigation() if(yaw_mode == YAW_LOOK_AT_HOME){ if(home_is_set){ //nav_yaw = point_at_home_yaw(); - nav_yaw = get_bearing(¤t_loc, &home); + nav_yaw = get_bearing_cd(¤t_loc, &home); } else { nav_yaw = 0; } @@ -2457,13 +2457,13 @@ static void update_nav_wp() static void update_auto_yaw() { if(wp_control == CIRCLE_MODE){ - auto_yaw = get_bearing(¤t_loc, &circle_WP); + auto_yaw = get_bearing_cd(¤t_loc, &circle_WP); }else if(wp_control == LOITER_MODE){ // just hold nav_yaw }else if(yaw_tracking == MAV_ROI_LOCATION){ - auto_yaw = get_bearing(¤t_loc, &target_WP); + auto_yaw = get_bearing_cd(¤t_loc, &target_WP); }else if(yaw_tracking == MAV_ROI_WPNEXT){ // Point towards next WP diff --git a/ArduCopter/commands.pde b/ArduCopter/commands.pde index bac23ad636..11ed5e868a 100644 --- a/ArduCopter/commands.pde +++ b/ArduCopter/commands.pde @@ -166,7 +166,7 @@ static void set_next_WP(struct Location *wp) // this is handy for the groundstation // ----------------------------------- wp_distance = get_distance_cm(¤t_loc, &next_WP); - target_bearing = get_bearing(&prev_WP, &next_WP); + target_bearing = get_bearing_cd(&prev_WP, &next_WP); // calc the location error: calc_location_error(&next_WP); diff --git a/ArduCopter/commands_logic.pde b/ArduCopter/commands_logic.pde index 4434b9b6cf..df18e6a43a 100644 --- a/ArduCopter/commands_logic.pde +++ b/ArduCopter/commands_logic.pde @@ -874,7 +874,7 @@ static void do_nav_roi() if( camera_mount.get_mount_type() == AP_Mount::k_tilt_roll ) { yaw_tracking = MAV_ROI_LOCATION; target_WP = command_nav_queue; - auto_yaw = get_bearing(¤t_loc, &target_WP); + auto_yaw = get_bearing_cd(¤t_loc, &target_WP); } // send the command to the camera mount camera_mount.set_roi_cmd(&command_nav_queue); @@ -889,6 +889,6 @@ static void do_nav_roi() // if we have no camera mount simply rotate the quad yaw_tracking = MAV_ROI_LOCATION; target_WP = command_nav_queue; - auto_yaw = get_bearing(¤t_loc, &target_WP); + auto_yaw = get_bearing_cd(¤t_loc, &target_WP); #endif } diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde index 4f0dbde0b5..a7b270b8bb 100644 --- a/ArduCopter/navigation.pde +++ b/ArduCopter/navigation.pde @@ -12,8 +12,8 @@ static void navigate() // target_bearing is where we should be heading // -------------------------------------------- - target_bearing = get_bearing(¤t_loc, &next_WP); - home_to_copter_bearing = get_bearing(&home, ¤t_loc); + target_bearing = get_bearing_cd(¤t_loc, &next_WP); + home_to_copter_bearing = get_bearing_cd(&home, ¤t_loc); } static bool check_missed_wp()