-
Notifications
You must be signed in to change notification settings - Fork 0
GPS Simulator
clairehagan edited this page Aug 31, 2021
·
2 revisions
Goal: Create a GPS simulator that outputs GPS coordinates for each of the points along a path
To begin, create a path on a mapping platform (Google Earth, Google Maps, etc.) that allows you to export the coordinates of the path’s points in a file.
You can utilize this link to learn how to export the coordinates file on Google Maps: https://webapps.stackexchange.com/questions/34159/how-to-convert-google-map-route-into-array-of-coordinates
Google Earth, however, has the ability to consistently make points as you move your mouse along your desired path which creates a more precise path.
- On the horizontal toolbar directly above the map view, find the Add Path tool.
- After seeing the window pop up, make your desired path, title it, and click OK.
- When making a path, you should see a trail of red points following your mouse.
- Right click on the path’s title in the Places sidebar and click “Save Place As”
- Save it as a KML file
Your code should then construct a publisher and publish each of the path coordinates as they are read from the file made up of the array of coordinates.