ramyar
December 10, 2015, 4:47pm
1
I want my robot to move from source to destination avoiding obstacles.can anyone help me with programming the gps with TinyGPS++ library.I cant understand the concept and output of keywords Courseto, cardinal, and this line of program I found in the net: int courseChangeNeeded = (int)(360 + courseToDestination - gps.course.deg()) % 360 .
Does gps have build in compass?
Does gps have build in compass?
Most don't.
The line containing %360 reduces the course correction to the range 0-359 degrees.
"Cardinal" is "N", "NW", "NE", etc.
"Courseto" would the the course to take from your present location to some other location.
Note that GPS units don't work indoors.
ramyar
December 10, 2015, 5:19pm
3
I'm using EM506 module. I cant find out whether it has a built in compass
what does courseto give lat and lon or a degree.if degree what degree?
After courseto statement do I really need a cardinal statement?
If courseto gives a degree, it will be in a scale of 360. Then why is the correction nedded?
Does gps.course.deg gives robots current degree?
ramyar
December 10, 2015, 5:26pm
4
I cant get full explanation and built in functions of TinyGPS++ library in any website! What can I do to known more?
ramyar
December 10, 2015, 5:43pm
5
If my robot is facing north and the course is set in east, can i use the below code to find the difference in degree so that i can turn my robot:
int diff = courseto - gps.course.deg();
ramyar:
I cant get full explanation and built in functions of TinyGPS++ library in any website! What can I do to known more?
Study the code and library examples? Github page
int diff = courseto - gps.course.deg();
Think about what happens if "courseto" is 359 degrees and "gps.course.deg()" is 1 degree. What should the robot do?
Similarly, all your other questions would be answered if you spent some time thinking about and researching robot navigation.