You have no items in your shopping cart.



Profile Informations

Login Datas

or login

First name is required!
Last name is required!
First name is not valid!
Last name is not valid!
This is not an email address!
Email address is required!
This email is already registered!
Password is required!
Enter a valid password!
Please enter 6 or more characters!
Please enter 16 or less characters!
Passwords are not same!
Terms and Conditions are required!
Email or Password is wrong!
Captcha is required!
Captcha is wrong!

Play Arduino With Global Positioning System (GPS)

We have a Arduino GPS shield for Arduino,it is a compact, high performance, and low power consumption GPS engine board. It uses SiRF Star III chipset which can track up to 20 satellites at a time and perform fast TTFF in weak signal environments. It’s suitable for the following applications with Arduino or Arduino compatible boards :

  • Automotive navigation
  • personal positioning
  • fleet management
  • marine navigation

Here is a small demo that show you how to read and log the GPS data into a SD card. Because this Arduino GPS shield has a Micro SD card socket, so we don’t need to use the external shield or module/brick, just plug it on the Arduino or Iteduino.

Upload the demo code here into the the Arduino, and the Arduino will read out the information of GPS and write it into the Micro SD card. Before this, you should make sure the Micro SD card you use is support SPI mode but not just the SD mode, also don’t forget to format it into FAT16 , and add a “datalog.txt” file on your card for Arduino to log the information.

You can see the data in the datalog.txt like this:

$PSRFTXT,TOW:  105921
$PSRFTXT,WK:   1538
$PSRFTXT,POS:  -2170399 4386065 4076920
$PSRFTXT,CLK:  95585
$PSRFTXT,Baud rate: 4800 
These are GPS sentences, these sentences includes the position, time, speed, altitude information and so on. Below is all sentence codes and short descriptions:
  • $GPAAM – Waypoint Arrival Alarm
  • $GPALM – GPS Almanac Data
  • $GPAPA – Autopilot format “A”
  • $GPAPB – Autopilot format “B”
  • $GPASD – Autopilot System Data
  • $GPBEC – Bearing & Distance to Waypoint, Dead Reckoning
  • $GPBOD – Bearing, Origin to Destination
  • $GPBWC – Bearing & Distance to Waypoint, Great Circle
  • $GPBWR – Bearing & Distance to Waypoint, Rhumb Line
  • $GPBWW – Bearing, Waypoint to Waypoint
  • $GPDBT – Depth Below Transducer
  • $GPDCN – Decca Position
  • $GPDPT – Depth
  • $GPFSI – Frequency Set Information
  • $GPGGA – Global Positioning System Fix Data
  • $GPGLC – Geographic Position, Loran-C
  • $GPGLL – Geographic Position, Latitude/Longitude
  • $GPGRS – GPS Range Residuals
  • $GPGSA – GPS DOP and Active Satellites
  • $GPGST – GPS Pseudorange Noise Statistics
  • $GPGSV – GPS Satellites in View
  • $GPGXA – TRANSIT Position
  • $GPHDG – Heading, Deviation & Variation
  • $GPHDT – Heading, True
  • $GPHSC – Heading Steering Command
  • $GPLCD – Loran-C Signal Data
  • $GPMSK – Control for a Beacon Receiver
  • $GPMSS – Beacon Receiver Status
  • $GPMTA – Air Temperature (to be phased out)
  • $GPMTW – Water Temperature
  • $GPMWD – Wind Direction
  • $GPMWV – Wind Speed and Angle
  • $GPOLN – Omega Lane Numbers
  • $GPOSD – Own Ship Data
  • $GPR00 – Waypoint active route (not standard)
  • $GPRMA – Recommended Minimum Specific Loran-C Data$GPRMB – Recommended Minimum Navigation Information
  • $GPRMC – Recommended Minimum Specific GPS/TRANSIT Data
  • $GPROT – Rate of Turn
  • $GPRPM – Revolutions
  • $GPRSA – Rudder Sensor Angle
  • $GPRSD – RADAR System Data
  • $GPRTE – Routes
  • $GPSFI – Scanning Frequency Information
  • $GPSTN – Multiple Data ID
  • $GPTRF – TRANSIT Fix Data
  • $GPTTM – Tracked Target Message
  • $GPVBW – Dual Ground/Water Speed
  • $GPVDR – Set and Drift
  • $GPVHW – Water Speed and Heading
  • $GPVLW – Distance Traveled through the Water
  • $GPVPW – Speed, Measured Parallel to Wind
  • $GPVTG – Track Made Good and Ground Speed
  • $GPWCV – Waypoint Closure Velocity
  • $GPWNC – Distance, Waypoint to Waypoint
  • $GPWPL – Waypoint Location
  • $GPXDR – Transducer Measurements
  • $GPXTE – Cross-Track Error, Measured
  • $GPXTR – Cross-Track Error, Dead Reckoning
  • $GPZDA – UTC Date / Time and Local Time Zone Offset
  • $GPZFO – UTC & Time from Origin Waypoint
  • $GPZTG – UTC & Time to Destination Waypoint

Many of the sentences is not used, only a few need to have practical value. So here we only to explain some of the frequently used commands:

$GPGGA: Global Positioning System Fix Data

eg1. $GPGGA,170834,4124.8963,N,08151.6838,W,1,05,1.5,280.2,M,-34.0,M,,,*59

Name Example Data Description
Time 170834 17:08:34 UTC
Latitude 4124.8963, N 41d 24.8963′ N or 41d 24′ 54″ N
Longitude 08151.6838, W 81d 51.6838′ W or 81d 51′ 41″ W
Fix Quality:
– 0 = Invalid
– 1 = GPS fix
– 2 = DGPS fix
1 Data is from a GPS fix
Number of Satellites 05 5 Satellites are in view
Horizontal Dilution of Precision (HDOP) 1.5 Relative accuracy of horizontal position
Altitude 280.2, M 280.2 meters above mean sea level
Height of geoid above WGS84 ellipsoid -34.0, M -34.0 meters
Time since last DGPS update blank No last update
DGPS reference station id blank  No station id
Checksum *75 Used by program to check for transmission errors

Courtesy of Brian McClure, N8PQI.

Global Positioning System Fix Data. Time, position and fix related data for a GPS receiver.

eg2. $GPGGA,hhmmss.ss,ddmm.mmm,a,dddmm.mmm,b,q,xx,p.p,a.b,M,c.d,M,x.x,nnnn

hhmmss.ss = UTC of position 
ddmm.mmm = latitude of position
a = N or S, latitutde hemisphere
dddmm.mmm = longitude of position
b = E or W, longitude hemisphere 
q = GPS Quality indicator (0=No fix, 1=Non-differential GPS fix, 2=Differential GPS fix, 6=Estimated fix) 
xx = number of satellites in use 
p.p = horizontal dilution of precision 
a.b = Antenna altitude above mean-sea-level
M = units of antenna altitude, meters 
c.d = Geoidal height
M = units of geoidal height, meters 
x.x = Age of Differential GPS data (seconds since last valid RTCM transmission) 
nnnn = Differential reference station ID, 0000 to 1023

$GPSSV: GPS Satellites in view

eg. $GPGSV,3,1,11,03,03,111,00,04,15,270,00,06,01,010,00,13,06,292,00*74
1    = Total number of messages of this type in this cycle
2    = Message number
3    = Total number of SVs in view
4    = SV PRN number
5    = Elevation in degrees, 90 maximum
6    = Azimuth, degrees from true north, 000 to 359
7    = SNR, 00-99 dB (null when not tracking)
8-11 = Information about second SV, same as field 4-7
12-15= Information about third SV, same as field 4-7
16-19= Information about fourth SV, same as field 4-7

$GPGSA: GPS DOP and active satellites

eg1. $GPGSA,A,3,,,,,,16,18,,22,24,,,3.6,2.1,2.2*3C
eg2. $GPGSA,A,3,19,28,14,18,27,22,31,39,,,,,1.7,1.0,1.3*34
1    = Mode:
       M=Manual, forced to operate in 2D or 3D
       A=Automatic, 3D/2D
2    = Mode:
       1=Fix not available
3-14 = PRN’s of Satellite Vechicles (SV’s) used in position fix (null for unused fields)
15   = Position Dilution of Precision (PDOP)
16   = Horizontal Dilution of Precision (HDOP)
17   = Vertical Dilution of Precision (VDOP)

$GPRMC: Recommended minimum specific GPS/TRANSIT data

eg1.  $GPRMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68

            225446       Time of fix 22:54:46 UTC
           A            Navigation receiver warning A = Valid position, V = Warning
           4916.45,N    Latitude 49 deg. 16.45 min. North
           12311.12,W   Longitude 123 deg. 11.12 min. West
           000.5        Speed over ground, Knots
           054.7        Course Made Good, degrees true
           191194       UTC Date of fix, 19 November 1994
           020.3,E      Magnetic variation, 20.3 deg. East
           *68          mandatory checksum
eg2. $GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70
            1   220516     Time Stamp
             2   A          validity – A-ok, V-invalid
             3   5133.82    current Latitude
             4   N          North/South
             5   00042.24   current Longitude
             6   W          East/West
             7   173.8      Speed in knots
             8   231.8      True course
             9   130694     Date Stamp
             10  004.2      Variation
             11  W          East/West
             12  *70        checksum
eg3. for NMEA 0183 version 3.00 active the Mode indicator field is added
Field #
1    = UTC time of fix
2    = Data status (A=Valid position, V=navigation receiver warning)
3    = Latitude of fix
4    = N or S of longitude
5    = Longitude of fix
6    = E or W of longitude
7    = Speed over ground in knots
8    = Track made good in degrees True
9    = UTC date of fix
10   = Magnetic variation degrees (Easterly var. subtracts from true course)
11   = E or W of magnetic variation
12   = Mode indicator, (A=Autonomous, D=Differential, E=Estimated, N=Data not valid)
13   = Checksum

$GPVTG: Track Made Good and Ground Speed.

eg1. $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K*48

           054.7,T      True course made good over ground, degrees
           034.4,M      Magnetic course made good over ground, degrees
           005.5,N      Ground speed, N=Knots
           010.2,K      Ground speed, K=Kilometers per hour
eg2. for NMEA 0183 version 3.00 active the Mode indicator field is added at the end
           A            Mode indicator (A=Autonomous, D=Differential,
                        E=Estimated, N=Data not valid)