Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. if (gps.location.isValid()){
  2.  
  3. double distanceToLoc =
  4. TinyGPSPlus::distanceBetween(
  5. gps.location.lat(),
  6. gps.location.lng(),
  7. Destination_Lat[currDest],
  8. Destination_Lng[currDest]);
  9. double courseToLoc =
  10. TinyGPSPlus::courseTo(
  11. gps.location.lat(),
  12. gps.location.lng(),
  13. Destination_Lat[currDest],
  14. Destination_Lng[currDest]);
  15.  
  16. lastDest = distanceToDestination;
  17. dircourse = north - courseToLoc;
  18. }
  19. if (dircourse < 0) {
  20. dircourse = dircourse + 360;
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement