3 // run_nav_updates - top level call for the autopilot
4 // ensures calculations such as "distance to waypoint" are calculated before autopilot makes decisions
5 // To-Do - rename and move this function to make it's purpose more clear
6 void Copter::run_nav_updates(void)
8 update_super_simple_bearing(false);
11 // distance between vehicle and home in cm
12 uint32_t Copter::home_distance()
15 _home_distance
= current_loc
.get_distance(ahrs
.get_home()) * 100;
17 return _home_distance
;
20 // The location of home in relation to the vehicle in centi-degrees
21 int32_t Copter::home_bearing()
24 _home_bearing
= current_loc
.get_bearing_to(ahrs
.get_home());