|
|
|
@ -7,9 +7,6 @@
@@ -7,9 +7,6 @@
|
|
|
|
|
// 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(); |
|
|
|
|
|
|
|
|
@ -17,14 +14,6 @@ void Copter::run_nav_updates(void)
@@ -17,14 +14,6 @@ void Copter::run_nav_updates(void)
|
|
|
|
|
run_autopilot(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// calc_position - get lat and lon positions from inertial nav library
|
|
|
|
|
void Copter::calc_position() |
|
|
|
|
{ |
|
|
|
|
// pull position from interial nav library
|
|
|
|
|
current_loc.lng = inertial_nav.get_longitude(); |
|
|
|
|
current_loc.lat = inertial_nav.get_latitude(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// calc_distance_and_bearing - calculate distance and bearing to next waypoint and home
|
|
|
|
|
void Copter::calc_distance_and_bearing() |
|
|
|
|
{ |
|
|
|
|