Randy Mackay
8 years ago
4 changed files with 0 additions and 38 deletions
@ -1,23 +0,0 @@
@@ -1,23 +0,0 @@
|
||||
#include "Rover.h" |
||||
|
||||
//****************************************************************
|
||||
// Function that will calculate the desired direction to fly and distance
|
||||
//****************************************************************
|
||||
void Rover::navigate() |
||||
{ |
||||
// do not navigate with corrupt data
|
||||
// ---------------------------------
|
||||
if (!have_position) { |
||||
return; |
||||
} |
||||
|
||||
if ((next_WP.lat == 0 && next_WP.lng == 0) || (home_is_set == HOME_UNSET)) { |
||||
return; |
||||
} |
||||
|
||||
// waypoint distance from rover
|
||||
// ----------------------------
|
||||
wp_distance = get_distance(current_loc, next_WP); |
||||
} |
||||
|
||||
|
Loading…
Reference in new issue