GPS Submodule (FONA 808 only)

The FONA 808 has a built in GPS module, you can use it for locating yourself in space! You will need to attach a GPS antenna to the uFL connector and make sure the GPS antenna is outside and pointing up to towards the sky

Make sure to use a PASSIVE GPS antenna!

You can start out by turning on the GPS module with O (capital-o) and query the status of the 'fix' with x. It will take a minute or two to get a fix.

On FONA808 v1's the commands follow the AT+CGPSxxx pattern, on the v2's the commands are similar but look like AT+CGNSxxx

Once you have a fix you can query and get the location/time data with L

The data is in a comma-seperated format:
0,4043.576433,7400.316980,58.647405,20150601201258.000,64,12,0.548363,100.442406

Can  be parsed out to:

  • 0 - this is the mode (will be 0)
  • 4043.576433 - this is the longitude
  • 7400.316980 - this is the latitude
People often get confused because the GPS is working but is "5 miles off" - this is because they are not parsing the lat/long data correctly. Despite appearances, the geolocation data is NOT in decimal degrees. It is in degrees and minutes in the following format: Latitude: DDMM.MMMM (The first two characters are the degrees.) Longitude: DDDMM.MMMM (The first three characters are the degrees.)
  • 58.647405 - this is the altitude in meters
  • 20150601201258.000 - this is the UTC time in yyymmddHHMMSS.ms format. E.g. this is year 2015, month 06, date 01, 20 hour, 12 minute, 58 seconds.  If you are not in UTC timezone you'll have to adjust this for your local time
  • 64 - is the ttff, time to first fix, in seconds
  • 12 - is the # of visible satelites
  • 0.548363 - is the speed (in knots)
  • 100.442406 - this is the best guess for 'course', e.g. which way you are heading, with 0 being 'north' and 180 being 'south' (we think)

Raw NMEA out

If you want to get the 'raw NMEA' data for some reason, you can do that with E 

On V1 FONA808's you can send a number from 0-255 indicating which sentences you want emittted.

  • 0 for disable output
  • +2 for $GPGGA
  • +4 for $GPGLL
  • +8 for $GPGSA
  • +16 for $GPGSV
  • +32 for $GPRMC
  • +64 for $GPVTG
  • +128 for GPZDA

e.g. if you want to see GPRMC and GPGGA, add +32 and +2 = 34 and put in that number. Then you'll see the data stream out at 1Hz

On V2 FONA's you can only select 'on' or 'off' and get all sentences!

When done, you can type in E and 0 instead, which will turn off the output

This guide was first published on May 29, 2015. It was last updated on May 29, 2015.

This page (GPS (FONA808)) was last updated on Feb 10, 2016.

Text editor powered by tinymce.