// run_nav_updates - top level call for the autopilot // ensures calculations such as "distance to waypoint" are calculated before autopilot makes decisions // To-Do - rename and move this function to make it's purpose more clear void Copter::run_nav_updates(void) { // fetch position from inertial navigation calc_position(); // calculate distance and bearing for reporting and autopilot decisions calc_distance_and_bearing(); // run autopilot to make high level decisions about control modes run_autopilot(); }
void Copter::Mode::update_navigation() { // run autopilot to make high level decisions about control modes run_autopilot(); }