Old 07-12-16 | 08:55 AM
  #28  
John_V's Avatar
John_V
Senior Member
Titanium Club Membership
10 Anniversary
 
Joined: Jun 2011
Posts: 5,585
Likes: 122
From: Tampa, Florida

Bikes: 2017 Colnago C-RS, 2012 Colnago Ace, 2010 Giant Cypress hybrid

I went and looked at some of the code we used in the project but couldn't find the text file containing simulated GPS data that was used to write our parsing routines without having to be connected to a GPS. I found this online and thought it might be helpful in understanding what is being read, calculated and displayed by the GPS unit. This is contents of a byte array converted to a comma delimited string array so that people can read it. This data is actually one continuous line broken down for easier reading and is only part of what is transmitted by the satellite.

$GPRMC,235316.000,A,4003.9040,N,10512.5792,W,0.09,144.75,141112,,*19
$GPGGA,235317.000,4003.9039,N,10512.5793,W,1,08,1.6,1577.9,M,-20.7,M,,0000*5F
$GPGSA,A,3,22,18,21,06,03,09,24,15,,,,,2.5,1.6,1.9*3E

The $ designates the beginning of an array element
(called a GPS Sentence). The letters after the $ designates what data is in the array element. If you want to get lat and long you would read the second line. the 235317.000 is the time of day in 24 hr format (23:53:17), the 4003.9039,N is the long, the 10512.5793,W is the lat and if you want to get the altitude, it's the value 1577,9. So these are just three of the elements that get parsed, calculated and saved each second. And yes, programmers have a cheat sheet that breaks all this down for us so we know what the heck we're looking for.
__________________
HCFR Cycling Team
Ride Safe ... Ride Hard ... Ride Daily

2017 Colnago C-RS
2012 Colnago Ace
2010 Giant Cypress
John_V is offline  
Reply