Where can I find some GPS unit test data?

3k views Asked by At

Where can I find some GPS unit test data to validate my code?

For example:

  1. Distance between two coordinates (miles / kilometers)
  2. Heading/bearing from Point A to Point B
  3. Speed from Ponit A to Point B given a duration

Right now I'm using Google Earth to fumble around with this, but it would be nice to know I'm validating my calculations against something, well, valid.

2

There are 2 answers

0
John Deters On BEST ANSWER

"GPS unit test data" is quite vague. You could easily have a pile of data, but if you don't know what they represent, what value are the tests?

If you're looking for a math sample of latitude/longitude calculations, check out the example on Wikipedia's Great Circle distances article: http://en.wikipedia.org/wiki/Great-circle_distance#Worked_example It has two points and works the math to compute the distance between them.

Or are you looking for the data that comes directly from a GPS unit? These are called NMEA sentences. An NMEA sentence begins with $GP and the next 3 characters are the sentence code, followed by the sentence data. http://aprs.gids.nl/nmea/ has a list.

You could certainly Google for "sample nmea data". The magnalox site appears to have some downloadable sample files, but I didn't check them to see if they'd be useful to you.

A better option would probably be to record your own data. Connect your laptop to your GPS unit, set it up to capture the serial data being emitted from the GPS, set the GPS to record your track, and take it for a short test drive. You can then compare how you processed the captured data based on what you know from the stored track (and from your little drive.) You could even have a web cam record the screen of the GPS to record heading/bearing information that doesn't arrive in the sentences.

Use caution if screen scraping NMEA sentences from a web site. All valid NMEA sentences begin with a "$GP"

0
iziseo On

RandomProfile offers randomly generated valid NMEA sentences.