Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (gps.location.isValid()){
- double distanceToLoc =
- TinyGPSPlus::distanceBetween(
- gps.location.lat(),
- gps.location.lng(),
- Destination_Lat[currDest],
- Destination_Lng[currDest]);
- double courseToLoc =
- TinyGPSPlus::courseTo(
- gps.location.lat(),
- gps.location.lng(),
- Destination_Lat[currDest],
- Destination_Lng[currDest]);
- lastDest = distanceToDestination;
- dircourse = north - courseToLoc;
- }
- if (dircourse < 0) {
- dircourse = dircourse + 360;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement