SlideShare a Scribd company logo
1 of 12
Download to read offline
Hand to hand with GPS
Episode: 2
NMEA Messages
As we all know, what is GPS?
GPS is a system, widely used throughout the globe. It recites versatile superfluous
information including position, speed, time, altitude very precisely. Its having
diverse applications like navigation, tracking, tracing, location, timing and very soon
it will be very essential indigence for human being as same as the telephone.
Now briefly we see the constituents of GPS. It uses between 24 and 32 Medium
Earth Orbit satellites that transmit precise microwave signals. A GPS receiver
receives that microwave signals to determine the above mentioned information. It
was developed by United States for defence purpose, but now it can be accessed by
everyone freely.
The important questions are, how can we use GPS? , what information we can
get? So now a days it is very easy to use GPS, many of the electronic gazettes around
us are loaded with GPS and these are having very easy to use graphical user
interface. Tracking, navigation, mapping can be done with the help of these gazettes.
But to make customize systems that use GPS as per our requirement, we just require
a GPS receiver.
A GPS receiver is a chip that receives microwave signals from satellites, converts
that signals to a particular message protocol like NMEA and gives serial output. We
can use that serial output in our system. The canonical hassle is to understand the
protocol of NMEA. We are going to describe an algorithm that takes serial input,
analyze it and recites the superfluous information.
The algorithm is very easygoing, can be implemented to any programming
language, any embedded system’s compiler like Keil, AVR studio, winAVR, Keil for
ARM etc.
What is NMEA message format?, National Marine Electronics Association (NMEA)
is an organisation that is creating standards for marine electronics to unify the
systems. In GPS’s context NMEA standards are the communication protocol,
followed by GPS receiver to give serial output.
Fig 1 | Understanding NMEA messages.
The diagram shows that a GPS receiver receives microwave signals from
satellite system and gives output in NMEA messages. NMEA messages are
basically packets of data or information. GPS receiver delivers information
line by line, here we refer these lines as the packets of information. These
messages are classified in various types of packets. Each packet has its own
protocol to send the information. These packets are identified by their
names. GPS receiver sends these packets serially, every second it delivers a
packet of information.
Fig 2 | understanding of NMEA Packets
First five character of a packet represent the packet name, and other
superfluous information separated by comma.
Ie. $GPVTG,176.41,T,,M,0.00,N,0.00,K,A*38
Here β€˜$GPVTG’ is packet name and it is followed by other information.
Fig 3 | Actual NMEA messages
Important NMEA message packets.
a. GGA – Global Positioning System Fix Data
b. GLL – Geographic Position – Latitude/Longitude
c. GSA – DOP and Active Satellites
d. GSV – Satellites in view
e. RMC – Recommended Minimum Specific GNSS Data
f. VTG – Course Over Ground and Ground Speed
a. $GPGGA - Global Positioning System Fix Data
Data/Information : Time, Position, Numbers of satellite used, altitude
etc.
Message format:
$GPGGA,hhmmss.ss,LLmm.llll,{N/S},yyymm.mmmm,{E/W},i,ns,h.d,a.h,M,
g.s,M,a.s,XXXX*CS
Index Message Discription
0 $GPGGA Packet name (Global Positioning System Fix Data)
1 hhmmss.ss UTC Time
hh : hours
mm : minutes
ss.ss : seconds
2 LLmm.mmmm Latitude
LL : Degree
mm.mmmm = minutes
3 {N/S} North or South
4 yyymmm.mmmm Longitude
yyy : Degree
mmm.mmmm : minutes
5 {E/W} East or West
6 i Valid indicator (Fix value)
0: Not valid
1: Valid
7 ns Number satellites used
8 h.d HDOP : Horizontal Dilution Of Precision
9 a.h Altitude
10 M Antenna height Unit (meters)
11 g.s Difference between the WGS-84 reference ellipsoid
surface and the mean-sea-level altitude.
12 M Unit of above parameter (meters)
13 a.s Age in seconds since last update
14 XXXX Reference station ID
15 CS Check Sum
Table 1 | GGA Packet format
b. $GPGLL – Geographic Position – Latitude/Longitude
Data/Information: Position, UTC time, and status etc.
Packet format:
$GPGLL,LLmm.mmmm,{N/S},yyymm.mmmm,{E/W},hhmmss.ss,i,m*CS
Index Message Discription
0 $GPGLL Packet name (Geographic Position – Latitude/Longitude)
1 LLmm.mmmm Latitude
LL : Degree
mm.mmmm = minutes
2 {N/S} North or South
3 yyymmm.mmmm Longitude
yyy : Degree
mmm.mmmm : minutes
4 {E/W} East or West
5 hhmmss.ss UTC Time
hh : hours
mm : minutes
ss.ss : seconds
6 i Status indicator
A : valid
V : invalid
7 m Mode indicator
A: autonomous
N: data not valid
8 CS Check sum
Table 2 | GLL Packet format
c. $GPGSA – DOP and Active Satellites
Data/Information : Operating mode, satellite used in fix position and DOP etc.
Packet format:
$GPGSA,i,j,aa,aa,aa,aa,aa,aa,aa,aa,aa,aa,aa,aa,p.d,h.d,v.d*CS
Index Message Discription
0 $GPGSA Packet name (DOP and Active Satellites)
1 i : Mode
M : Manual, forced to operate in 2D or 3D
A : Automatic, 3D/2D
2 J : Mode
1 : Fix not available
2 : 2D
3 : 3D
3 aa Ids of Satellites used in position fix , null for unused
4 p.d PDOP
5 h.d HDOP
6 v.d VDOP
7 CS Check sum
Table 3 | GSA packet format
d. $GPGSV : GPS Satellites in view
Data/information : Messages, messages id, satellite id, elevation, azimuth etc.
Packet format:
$GPGSV,N,M, ns,si,se,saz,sn,…………. , ns,si,se,saz,sn *CS
Index Message Discription
0 $GPGSV Packet name (GPS Satellites in view)
1 N Number of messages
2 M Message Number
3 ns Number of satellites in view
4 si Satellites ID
5 Se Satellites Elevation
6 saz Satellite azimuth
7 sn SNR number
8-19 3 set of 4-7 Satellites information
20 CS Checksum
Table 4 | GSV packet format
e. $GPRMC – Recommended Minimum Specific GNSS Data
Data/information : Time, Date, Position, speed and status etc.
Packet Format:
$GPRMC,hhmmss.ss,i,LLmm.mmmm,{N/S},yyymm.mmmm,{E/W},s.n,t.c,DDMMYY,m.v,
{E/W},
m*CS<CR><LF>
Index Message Discription
0 $GPRMC Packet name (Recommended Minimum Specific GNSS
Data)
1 hhmmss.ss UTC Time
hh : hours
mm : minutes
ss.ss : seconds
2 i Valid indicator
0: Not valid
1: Valid
3 LLmm.mmmm Latitude
LL : Degree
mm.mmmm = minutes
4 {N/S} North or South
5 yyymmm.mmmm Longitude
yyy : Degree
mmm.mmmm : minutes
6 {E/W} East or West
7 s.n Speed in Knots
8 t.c True Course/ Heading
9 DDMMYY Date
10 m.v Magnetic variation
11 {E/W} East or West
12 m Mode indicator
A: autonomous
N: data not valid
13 CS Check Sum
Table 5 | RMC packet format
f. $GPVTG – Course Over Ground and Ground Speed
Data/Information: Speed and course.
Packet format:
$GPVTG,m.v,T,m.h,M,s.n,N,s.k,K,m*CS<CR><LF>
Index Message Discription
0 $GPVTG Packet name (Course Over Ground and Ground Speed)
1 m.v Magnetic Variation / heading
2 T Fixed text (Heading unit degree)
3 m.h Magnetic heading
4 M Degree, magnetic heading unit
5 s.n Speed in Knots
6 N Speed unit Knots
7 s.k Speed in KM per Hour
8 K Speed unit KM / hr
9 m Mode indicator
A: autonomous
N: data not valid
10 CS Check sum
Table 4 | GSV packet format
Algo for extracting GPS data
form NMEA messages
Step 1. Create connection with GPS receiver.
Step 2. While RX: go to Step 3 –
Step3. Message = Read Line (Rx data)
Step4. if ( message [0:2] ! = β€˜$GP’ ) – we are not getting NMEA messages / packets
{
Break – go to step 3.
}
. else – we are getting NMEA messages.
{
Step 5. if (message [0:5+ = = β€˜$GPGGA’ )
{
Fragments [] = explode(β€œ,” message)
if (Fragments [2] == β€˜β€™β€ OR Fragments [4] == β€œβ€˜β€™)
{
latitude or longitude can’t be determined
Break loop – go to step 3
}
UTCTime = Fragments[1]
– Format :- hhmmss.ss
UTCTime = UTCTime *0:1+ . β€œ:”.UTCTime *2:3+ . β€œ:”.UTCTime *4:5+
– Format :- hh:mm:ss
Latitude = Fragments [2]
-Format :- xxmm.dddd
Latitude = Latitude[0:1] + Latitude[2:8] / 60
-Format :- Decimal format
Loc_N/S = Fragments[3]
Longitude = Fragments[4]
-Format:- yyymm.dddd
Longitude = Longitude[0:2] + Longitude [3:9] / 60
-Format :- Decimal format
Loc_E/W = Fragments[5]
Fix = Fragments[6]
Nos_satellite = Fragments[7]
HDOP = Fragments[8]
Altitude = Fragments[9]
Break – go to step 3.
}
Step6. if (message *0:5+ = = β€˜$GPGLL’ )
{
Fragments *+ = explode(β€œ,” message)
if (Fragments *1+ == β€˜β€™β€ OR Fragments *3+ == β€œβ€˜β€™)
{
latitude or longitude can’t be determined
Break loop – go to step 3
}
Latitude = Fragments [1]
-Format :- xxmm.dddd
Latitude = Latitude[0:1] + Latitude[2:8] / 60
-Format :- Decimal format
Loc_N/S = Fragments[2]
Longitude = Fragments[3]
-Format:- yyymm.dddd
Longitude = Longitude[0:2] + Longitude [3:9] / 60
-Format :- Decimal format
Loc_E/W = Fragments[4]
UTCTime = Fragments[5]
– Format :- hhmmss.ss
UTCTime = UTCTime *0:1+ . β€œ:”.UTCTime *2:3+ . β€œ:”.UTCTime *4:5+
– Format :- hh:mm:ss
Status = Fragments[6]
Mode = Fragments [7]
Break – go to step 3.
}
Step7. if (message *0:5+ = = β€˜$GPGSA’ )
{
Fragments *+ = explode(β€œ,” message)
Mode_a = Fragments[1]
Mode_b = Fragments[2]
Operating_setellites = Fragments[3]
PDOP = Fragments[4]
HDOP = Fragments[5]
VDOP = Fragments[6]
Break – go to step 3.
}
Step8. if (message *0:5+ = = β€˜$GPGSV’ )
{
Fragments *+ = explode(β€œ,” message)
Nos_messages = Fragments[1]
Message_No = Fragments[2]
Nos_setellites = Fragments[3]
Satellite_ID = Fragments[4]
Satellite_elevation = Fragments[5]
Satellite_azimuth = Fragments[6]
SNR_No = Fragments[7]
Break – go to step 3.
}
Step 9. if (message *0:5+ = = β€˜$GPRMC’ )
{
Fragments *+ = explode(β€œ,” message)
if (Fragments *3+ == β€˜β€™β€ OR Fragments *5+ == β€œβ€˜β€™)
{
latitude or longitude can’t be determined
Break loop – go to step 3
}
UTCTime = Fragments[1]
– Format :- hhmmss.ss
UTCTime = UTCTime *0:1+ . β€œ:”.UTCTime *2:3+ . β€œ:”.UTCTime *4:5+
– Format :- hh:mm:ss
Status = Fragments[2]
Latitude = Fragments [3]
-Format :- xxmm.dddd
Latitude = Latitude[0:1] + Latitude[2:8] / 60
-Format :- Decimal format
Loc_N/S = Fragments[4]
Longitude = Fragments[5]
-Format:- yyymm.dddd
Longitude = Longitude[0:2] + Longitude [3:9] / 60
-Format :- Decimal format
Loc_E/W = Fragments[6]
Speed = Fragments[7]
Heading = Fragments[8]
Date = Fragments[9]
-format :- ddmmyy
Date = Date*0:1+. β€œ-”. Date*2:3+. β€œ-”. Date*4:5+
-Format:- dd-mm-yy
Magnetic_variation = Fragments[10]
Mode = Fragments[12]
Break – go to step 3.
}
Step10. if (message *0:5+ = = β€˜$GPVTG’ )
{
Fragments *+ = explode(β€œ,” message)
Heading = Fragments[1]
Heading_unit = Fragments[2]
Magnetic_heading = Fragments[3]
Magnetic_heading_unit= Fragments[4]
Speed_knots= Fragments[5]
Speed_unit_knots = Fragments[6]
Speed_KM = Fragments[7]
Speed_unit_KM = Fragments[8]
Mode = Fragments[9]
Break -go to step. 3
}
Break – go to step 3.
}
Explanation for some functions used in algo :
Message[i:j] : here message in a string that stores a packet in it.
Message[i:j] : represent a substring of message from index i to j elements (note i
and j both are included).
Explode : it splits the string in to fragments by a specific character, here we are splitting
message by comma β€œ,”, and it stores all the fragments in to an array named
fragments[].
Other notations are common notations for many programming languages like C, C++.
User can use either full or partial algorithm according to requirement.

More Related Content

What's hot

Global positioning system(GPS)
Global positioning system(GPS)Global positioning system(GPS)
Global positioning system(GPS)Arghaya Goswami
Β 
DIFFERENTIAL GPS
DIFFERENTIAL GPSDIFFERENTIAL GPS
DIFFERENTIAL GPSj_rahul
Β 
Dgps seminar
Dgps seminarDgps seminar
Dgps seminaranand0030
Β 
GLOBAL POSITIONING SYSTEM
GLOBAL POSITIONING SYSTEMGLOBAL POSITIONING SYSTEM
GLOBAL POSITIONING SYSTEMEminent Planners
Β 
Global Positioning System (GPS)
Global Positioning System (GPS)Global Positioning System (GPS)
Global Positioning System (GPS)Nadeendra Yashaswin
Β 
Global Navigation Satellite System (GNSS) update
Global Navigation Satellite System (GNSS) updateGlobal Navigation Satellite System (GNSS) update
Global Navigation Satellite System (GNSS) updateHydrographic Society Benelux
Β 
Global Positioning System
Global Positioning SystemGlobal Positioning System
Global Positioning SystemRishi Shukla
Β 
Surveying with gps
Surveying with gpsSurveying with gps
Surveying with gpsengr jafar
Β 
Components of Spatial Data Quality in GIS
Components of Spatial Data Quality in GISComponents of Spatial Data Quality in GIS
Components of Spatial Data Quality in GISKaium Chowdhury
Β 
Microwave remote sensing
Microwave remote sensingMicrowave remote sensing
Microwave remote sensingThen Murugeshwari
Β 
Global positioning system(GPS)
Global positioning system(GPS)Global positioning system(GPS)
Global positioning system(GPS)shifa
Β 
Gps (global positioning system)
Gps (global positioning system)Gps (global positioning system)
Gps (global positioning system)mustahsanbsphy873
Β 
Global Positioning system GPS - Dr. S. Balamurugan
Global Positioning system GPS - Dr. S. BalamuruganGlobal Positioning system GPS - Dr. S. Balamurugan
Global Positioning system GPS - Dr. S. BalamuruganPrakash Kumar Sekar
Β 
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...Kamlesh Kumar
Β 
Presentation on GPS
Presentation  on GPSPresentation  on GPS
Presentation on GPSAmit Bshwas
Β 
SAR image interpretation
SAR image interpretationSAR image interpretation
SAR image interpretationElise Colin
Β 
Gps
GpsGps
Gpsnil65
Β 

What's hot (20)

Gps
GpsGps
Gps
Β 
Global positioning system(GPS)
Global positioning system(GPS)Global positioning system(GPS)
Global positioning system(GPS)
Β 
DIFFERENTIAL GPS
DIFFERENTIAL GPSDIFFERENTIAL GPS
DIFFERENTIAL GPS
Β 
Dgps seminar
Dgps seminarDgps seminar
Dgps seminar
Β 
GLOBAL POSITIONING SYSTEM
GLOBAL POSITIONING SYSTEMGLOBAL POSITIONING SYSTEM
GLOBAL POSITIONING SYSTEM
Β 
Global Positioning System (GPS)
Global Positioning System (GPS)Global Positioning System (GPS)
Global Positioning System (GPS)
Β 
Global Navigation Satellite System (GNSS) update
Global Navigation Satellite System (GNSS) updateGlobal Navigation Satellite System (GNSS) update
Global Navigation Satellite System (GNSS) update
Β 
Global Positioning System
Global Positioning SystemGlobal Positioning System
Global Positioning System
Β 
Surveying with gps
Surveying with gpsSurveying with gps
Surveying with gps
Β 
Components of Spatial Data Quality in GIS
Components of Spatial Data Quality in GISComponents of Spatial Data Quality in GIS
Components of Spatial Data Quality in GIS
Β 
Microwave remote sensing
Microwave remote sensingMicrowave remote sensing
Microwave remote sensing
Β 
Global positioning system(GPS)
Global positioning system(GPS)Global positioning system(GPS)
Global positioning system(GPS)
Β 
Gps (global positioning system)
Gps (global positioning system)Gps (global positioning system)
Gps (global positioning system)
Β 
Dgps
DgpsDgps
Dgps
Β 
Global Positioning system GPS - Dr. S. Balamurugan
Global Positioning system GPS - Dr. S. BalamuruganGlobal Positioning system GPS - Dr. S. Balamurugan
Global Positioning system GPS - Dr. S. Balamurugan
Β 
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...
Geographical Information System (GIS) Georeferencing and Digitization, Bihar ...
Β 
Presentation on GPS
Presentation  on GPSPresentation  on GPS
Presentation on GPS
Β 
Glonass
GlonassGlonass
Glonass
Β 
SAR image interpretation
SAR image interpretationSAR image interpretation
SAR image interpretation
Β 
Gps
GpsGps
Gps
Β 

Similar to Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.

#4 gps introduction &amp; gps messages
#4 gps introduction &amp; gps messages#4 gps introduction &amp; gps messages
#4 gps introduction &amp; gps messagesMohammedHusain20
Β 
Design and implementation of GPS Tracker
Design and implementation of GPS TrackerDesign and implementation of GPS Tracker
Design and implementation of GPS TrackerVignesh Kannan
Β 
Global Positioning System in Precision Agriculture
Global Positioning System in Precision AgricultureGlobal Positioning System in Precision Agriculture
Global Positioning System in Precision AgricultureRedmond R. Shamshiri
Β 
Stolen car recovery
Stolen car recoveryStolen car recovery
Stolen car recoveryHossam Zein
Β 
CE6404 ANNA UNIVERSITY Unit iv gps surveying
CE6404 ANNA UNIVERSITY Unit iv gps surveyingCE6404 ANNA UNIVERSITY Unit iv gps surveying
CE6404 ANNA UNIVERSITY Unit iv gps surveyingDr Gopikrishnan T
Β 
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...kailashgavare
Β 
Extraction of Ephemeris file from Matlab SDR
Extraction of Ephemeris file from Matlab SDRExtraction of Ephemeris file from Matlab SDR
Extraction of Ephemeris file from Matlab SDRAsimKhan367
Β 
maXbox starter 34 GPS Tutorial
maXbox starter 34 GPS TutorialmaXbox starter 34 GPS Tutorial
maXbox starter 34 GPS TutorialMax Kleiner
Β 
The effects of using variable lengths for degraded signal acquisition in GPS ...
The effects of using variable lengths for degraded signal acquisition in GPS ...The effects of using variable lengths for degraded signal acquisition in GPS ...
The effects of using variable lengths for degraded signal acquisition in GPS ...IJECEIAES
Β 
Interfacing GPS with 8051
Interfacing GPS with 8051Interfacing GPS with 8051
Interfacing GPS with 8051Praveen Kumar
Β 
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in AndroidIntroducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in AndroidThe European GNSS Agency (GSA)
Β 
Gisgpsimplementationanduseforstormwatermapping 000 0
Gisgpsimplementationanduseforstormwatermapping 000 0Gisgpsimplementationanduseforstormwatermapping 000 0
Gisgpsimplementationanduseforstormwatermapping 000 0SuKaOt
Β 
GPS Receiver ICS2014
GPS Receiver ICS2014GPS Receiver ICS2014
GPS Receiver ICS2014Mazhar Abbas
Β 
Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...
Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...
Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...IRJET Journal
Β 

Similar to Understanding GPS & NMEA Messages and Algo to extract Information from NMEA. (20)

#4 gps introduction &amp; gps messages
#4 gps introduction &amp; gps messages#4 gps introduction &amp; gps messages
#4 gps introduction &amp; gps messages
Β 
Design and implementation of GPS Tracker
Design and implementation of GPS TrackerDesign and implementation of GPS Tracker
Design and implementation of GPS Tracker
Β 
Gps 2
Gps 2Gps 2
Gps 2
Β 
Global Positioning System in Precision Agriculture
Global Positioning System in Precision AgricultureGlobal Positioning System in Precision Agriculture
Global Positioning System in Precision Agriculture
Β 
Stolen car recovery
Stolen car recoveryStolen car recovery
Stolen car recovery
Β 
CE6404 ANNA UNIVERSITY Unit iv gps surveying
CE6404 ANNA UNIVERSITY Unit iv gps surveyingCE6404 ANNA UNIVERSITY Unit iv gps surveying
CE6404 ANNA UNIVERSITY Unit iv gps surveying
Β 
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
Β 
Extraction of Ephemeris file from Matlab SDR
Extraction of Ephemeris file from Matlab SDRExtraction of Ephemeris file from Matlab SDR
Extraction of Ephemeris file from Matlab SDR
Β 
maXbox starter 34 GPS Tutorial
maXbox starter 34 GPS TutorialmaXbox starter 34 GPS Tutorial
maXbox starter 34 GPS Tutorial
Β 
The effects of using variable lengths for degraded signal acquisition in GPS ...
The effects of using variable lengths for degraded signal acquisition in GPS ...The effects of using variable lengths for degraded signal acquisition in GPS ...
The effects of using variable lengths for degraded signal acquisition in GPS ...
Β 
7_gsm.ppt
7_gsm.ppt7_gsm.ppt
7_gsm.ppt
Β 
Gprs
GprsGprs
Gprs
Β 
GPS Signals (1)
GPS Signals (1)GPS Signals (1)
GPS Signals (1)
Β 
Interfacing GPS with 8051
Interfacing GPS with 8051Interfacing GPS with 8051
Interfacing GPS with 8051
Β 
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in AndroidIntroducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Β 
Agps05
Agps05Agps05
Agps05
Β 
Gisgpsimplementationanduseforstormwatermapping 000 0
Gisgpsimplementationanduseforstormwatermapping 000 0Gisgpsimplementationanduseforstormwatermapping 000 0
Gisgpsimplementationanduseforstormwatermapping 000 0
Β 
GPS Receiver ICS2014
GPS Receiver ICS2014GPS Receiver ICS2014
GPS Receiver ICS2014
Β 
Gps
GpsGps
Gps
Β 
Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...
Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...
Advanced Anti Accidental Solution by Pre Analyzing, Tracking and Detection of...
Β 

More from Robo India

Robot Motions
Robot MotionsRobot Motions
Robot MotionsRobo India
Β 
Servo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project ReportServo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project ReportRobo India
Β 
A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...Robo India
Β 
A project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x beeA project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x beeRobo India
Β 
PC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project ReportPC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project ReportRobo India
Β 
Indian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch LinesIndian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch LinesRobo India
Β 
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Robo India
Β 
Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Robo India
Β 
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...Robo India
Β 
Servo motor and AVR Atmel Atmega 16
Servo motor and AVR  Atmel Atmega 16Servo motor and AVR  Atmel Atmega 16
Servo motor and AVR Atmel Atmega 16Robo India
Β 
IR Sensor Working and Concepts
IR Sensor Working and ConceptsIR Sensor Working and Concepts
IR Sensor Working and ConceptsRobo India
Β 
Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Robo India
Β 
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16Robo India
Β 
LCD Theory and Working Principles
LCD Theory and Working PrinciplesLCD Theory and Working Principles
LCD Theory and Working PrinciplesRobo India
Β 
Led Theory and Working Principles
Led Theory and Working PrinciplesLed Theory and Working Principles
Led Theory and Working PrinciplesRobo India
Β 
Fundamentals of embedded system and electronics
Fundamentals of embedded system and electronicsFundamentals of embedded system and electronics
Fundamentals of embedded system and electronicsRobo India
Β 
Single bit oprations in avr microcontroller
Single bit oprations in avr microcontrollerSingle bit oprations in avr microcontroller
Single bit oprations in avr microcontrollerRobo India
Β 
Input Output programming in AVR microcontroller
Input  Output  programming in AVR microcontrollerInput  Output  programming in AVR microcontroller
Input Output programming in AVR microcontrollerRobo India
Β 
Marketing to youth
Marketing to youthMarketing to youth
Marketing to youthRobo India
Β 
C language
C languageC language
C languageRobo India
Β 

More from Robo India (20)

Robot Motions
Robot MotionsRobot Motions
Robot Motions
Β 
Servo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project ReportServo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project Report
Β 
A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...
Β 
A project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x beeA project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x bee
Β 
PC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project ReportPC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project Report
Β 
Indian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch LinesIndian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch Lines
Β 
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Β 
Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16
Β 
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
Β 
Servo motor and AVR Atmel Atmega 16
Servo motor and AVR  Atmel Atmega 16Servo motor and AVR  Atmel Atmega 16
Servo motor and AVR Atmel Atmega 16
Β 
IR Sensor Working and Concepts
IR Sensor Working and ConceptsIR Sensor Working and Concepts
IR Sensor Working and Concepts
Β 
Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts
Β 
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
Β 
LCD Theory and Working Principles
LCD Theory and Working PrinciplesLCD Theory and Working Principles
LCD Theory and Working Principles
Β 
Led Theory and Working Principles
Led Theory and Working PrinciplesLed Theory and Working Principles
Led Theory and Working Principles
Β 
Fundamentals of embedded system and electronics
Fundamentals of embedded system and electronicsFundamentals of embedded system and electronics
Fundamentals of embedded system and electronics
Β 
Single bit oprations in avr microcontroller
Single bit oprations in avr microcontrollerSingle bit oprations in avr microcontroller
Single bit oprations in avr microcontroller
Β 
Input Output programming in AVR microcontroller
Input  Output  programming in AVR microcontrollerInput  Output  programming in AVR microcontroller
Input Output programming in AVR microcontroller
Β 
Marketing to youth
Marketing to youthMarketing to youth
Marketing to youth
Β 
C language
C languageC language
C language
Β 

Recently uploaded

Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
Β 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
Β 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
Β 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
Β 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
Β 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
Β 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
Β 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
Β 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
Β 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
Β 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
Β 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
Β 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
Β 

Recently uploaded (20)

Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
Β 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
Β 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
Β 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
Β 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
Β 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
Β 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
Β 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
Β 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
Β 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
Β 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
Β 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
Β 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Β 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
Β 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
Β 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Β 

Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.

  • 1.
  • 2. Hand to hand with GPS Episode: 2 NMEA Messages As we all know, what is GPS? GPS is a system, widely used throughout the globe. It recites versatile superfluous information including position, speed, time, altitude very precisely. Its having diverse applications like navigation, tracking, tracing, location, timing and very soon it will be very essential indigence for human being as same as the telephone. Now briefly we see the constituents of GPS. It uses between 24 and 32 Medium Earth Orbit satellites that transmit precise microwave signals. A GPS receiver receives that microwave signals to determine the above mentioned information. It was developed by United States for defence purpose, but now it can be accessed by everyone freely. The important questions are, how can we use GPS? , what information we can get? So now a days it is very easy to use GPS, many of the electronic gazettes around us are loaded with GPS and these are having very easy to use graphical user interface. Tracking, navigation, mapping can be done with the help of these gazettes. But to make customize systems that use GPS as per our requirement, we just require a GPS receiver. A GPS receiver is a chip that receives microwave signals from satellites, converts that signals to a particular message protocol like NMEA and gives serial output. We can use that serial output in our system. The canonical hassle is to understand the protocol of NMEA. We are going to describe an algorithm that takes serial input, analyze it and recites the superfluous information. The algorithm is very easygoing, can be implemented to any programming language, any embedded system’s compiler like Keil, AVR studio, winAVR, Keil for ARM etc. What is NMEA message format?, National Marine Electronics Association (NMEA) is an organisation that is creating standards for marine electronics to unify the systems. In GPS’s context NMEA standards are the communication protocol, followed by GPS receiver to give serial output.
  • 3. Fig 1 | Understanding NMEA messages. The diagram shows that a GPS receiver receives microwave signals from satellite system and gives output in NMEA messages. NMEA messages are basically packets of data or information. GPS receiver delivers information line by line, here we refer these lines as the packets of information. These messages are classified in various types of packets. Each packet has its own protocol to send the information. These packets are identified by their names. GPS receiver sends these packets serially, every second it delivers a packet of information. Fig 2 | understanding of NMEA Packets First five character of a packet represent the packet name, and other superfluous information separated by comma.
  • 4. Ie. $GPVTG,176.41,T,,M,0.00,N,0.00,K,A*38 Here β€˜$GPVTG’ is packet name and it is followed by other information. Fig 3 | Actual NMEA messages Important NMEA message packets. a. GGA – Global Positioning System Fix Data b. GLL – Geographic Position – Latitude/Longitude c. GSA – DOP and Active Satellites d. GSV – Satellites in view e. RMC – Recommended Minimum Specific GNSS Data f. VTG – Course Over Ground and Ground Speed a. $GPGGA - Global Positioning System Fix Data Data/Information : Time, Position, Numbers of satellite used, altitude etc. Message format: $GPGGA,hhmmss.ss,LLmm.llll,{N/S},yyymm.mmmm,{E/W},i,ns,h.d,a.h,M, g.s,M,a.s,XXXX*CS Index Message Discription 0 $GPGGA Packet name (Global Positioning System Fix Data) 1 hhmmss.ss UTC Time hh : hours mm : minutes ss.ss : seconds 2 LLmm.mmmm Latitude LL : Degree mm.mmmm = minutes 3 {N/S} North or South
  • 5. 4 yyymmm.mmmm Longitude yyy : Degree mmm.mmmm : minutes 5 {E/W} East or West 6 i Valid indicator (Fix value) 0: Not valid 1: Valid 7 ns Number satellites used 8 h.d HDOP : Horizontal Dilution Of Precision 9 a.h Altitude 10 M Antenna height Unit (meters) 11 g.s Difference between the WGS-84 reference ellipsoid surface and the mean-sea-level altitude. 12 M Unit of above parameter (meters) 13 a.s Age in seconds since last update 14 XXXX Reference station ID 15 CS Check Sum Table 1 | GGA Packet format b. $GPGLL – Geographic Position – Latitude/Longitude Data/Information: Position, UTC time, and status etc. Packet format: $GPGLL,LLmm.mmmm,{N/S},yyymm.mmmm,{E/W},hhmmss.ss,i,m*CS Index Message Discription 0 $GPGLL Packet name (Geographic Position – Latitude/Longitude) 1 LLmm.mmmm Latitude LL : Degree mm.mmmm = minutes 2 {N/S} North or South 3 yyymmm.mmmm Longitude yyy : Degree mmm.mmmm : minutes 4 {E/W} East or West 5 hhmmss.ss UTC Time hh : hours mm : minutes ss.ss : seconds 6 i Status indicator A : valid V : invalid 7 m Mode indicator A: autonomous N: data not valid 8 CS Check sum Table 2 | GLL Packet format c. $GPGSA – DOP and Active Satellites Data/Information : Operating mode, satellite used in fix position and DOP etc.
  • 6. Packet format: $GPGSA,i,j,aa,aa,aa,aa,aa,aa,aa,aa,aa,aa,aa,aa,p.d,h.d,v.d*CS Index Message Discription 0 $GPGSA Packet name (DOP and Active Satellites) 1 i : Mode M : Manual, forced to operate in 2D or 3D A : Automatic, 3D/2D 2 J : Mode 1 : Fix not available 2 : 2D 3 : 3D 3 aa Ids of Satellites used in position fix , null for unused 4 p.d PDOP 5 h.d HDOP 6 v.d VDOP 7 CS Check sum Table 3 | GSA packet format d. $GPGSV : GPS Satellites in view Data/information : Messages, messages id, satellite id, elevation, azimuth etc. Packet format: $GPGSV,N,M, ns,si,se,saz,sn,…………. , ns,si,se,saz,sn *CS Index Message Discription 0 $GPGSV Packet name (GPS Satellites in view) 1 N Number of messages 2 M Message Number 3 ns Number of satellites in view 4 si Satellites ID 5 Se Satellites Elevation 6 saz Satellite azimuth 7 sn SNR number 8-19 3 set of 4-7 Satellites information 20 CS Checksum Table 4 | GSV packet format e. $GPRMC – Recommended Minimum Specific GNSS Data Data/information : Time, Date, Position, speed and status etc. Packet Format: $GPRMC,hhmmss.ss,i,LLmm.mmmm,{N/S},yyymm.mmmm,{E/W},s.n,t.c,DDMMYY,m.v, {E/W}, m*CS<CR><LF>
  • 7. Index Message Discription 0 $GPRMC Packet name (Recommended Minimum Specific GNSS Data) 1 hhmmss.ss UTC Time hh : hours mm : minutes ss.ss : seconds 2 i Valid indicator 0: Not valid 1: Valid 3 LLmm.mmmm Latitude LL : Degree mm.mmmm = minutes 4 {N/S} North or South 5 yyymmm.mmmm Longitude yyy : Degree mmm.mmmm : minutes 6 {E/W} East or West 7 s.n Speed in Knots 8 t.c True Course/ Heading 9 DDMMYY Date 10 m.v Magnetic variation 11 {E/W} East or West 12 m Mode indicator A: autonomous N: data not valid 13 CS Check Sum Table 5 | RMC packet format f. $GPVTG – Course Over Ground and Ground Speed Data/Information: Speed and course. Packet format: $GPVTG,m.v,T,m.h,M,s.n,N,s.k,K,m*CS<CR><LF> Index Message Discription 0 $GPVTG Packet name (Course Over Ground and Ground Speed) 1 m.v Magnetic Variation / heading 2 T Fixed text (Heading unit degree) 3 m.h Magnetic heading 4 M Degree, magnetic heading unit 5 s.n Speed in Knots 6 N Speed unit Knots 7 s.k Speed in KM per Hour 8 K Speed unit KM / hr 9 m Mode indicator A: autonomous N: data not valid 10 CS Check sum Table 4 | GSV packet format
  • 8. Algo for extracting GPS data form NMEA messages Step 1. Create connection with GPS receiver. Step 2. While RX: go to Step 3 – Step3. Message = Read Line (Rx data) Step4. if ( message [0:2] ! = β€˜$GP’ ) – we are not getting NMEA messages / packets { Break – go to step 3. } . else – we are getting NMEA messages. { Step 5. if (message [0:5+ = = β€˜$GPGGA’ ) { Fragments [] = explode(β€œ,” message) if (Fragments [2] == β€˜β€™β€ OR Fragments [4] == β€œβ€˜β€™) { latitude or longitude can’t be determined Break loop – go to step 3 } UTCTime = Fragments[1] – Format :- hhmmss.ss UTCTime = UTCTime *0:1+ . β€œ:”.UTCTime *2:3+ . β€œ:”.UTCTime *4:5+ – Format :- hh:mm:ss Latitude = Fragments [2] -Format :- xxmm.dddd Latitude = Latitude[0:1] + Latitude[2:8] / 60 -Format :- Decimal format Loc_N/S = Fragments[3] Longitude = Fragments[4] -Format:- yyymm.dddd Longitude = Longitude[0:2] + Longitude [3:9] / 60 -Format :- Decimal format
  • 9. Loc_E/W = Fragments[5] Fix = Fragments[6] Nos_satellite = Fragments[7] HDOP = Fragments[8] Altitude = Fragments[9] Break – go to step 3. } Step6. if (message *0:5+ = = β€˜$GPGLL’ ) { Fragments *+ = explode(β€œ,” message) if (Fragments *1+ == β€˜β€™β€ OR Fragments *3+ == β€œβ€˜β€™) { latitude or longitude can’t be determined Break loop – go to step 3 } Latitude = Fragments [1] -Format :- xxmm.dddd Latitude = Latitude[0:1] + Latitude[2:8] / 60 -Format :- Decimal format Loc_N/S = Fragments[2] Longitude = Fragments[3] -Format:- yyymm.dddd Longitude = Longitude[0:2] + Longitude [3:9] / 60 -Format :- Decimal format Loc_E/W = Fragments[4] UTCTime = Fragments[5] – Format :- hhmmss.ss UTCTime = UTCTime *0:1+ . β€œ:”.UTCTime *2:3+ . β€œ:”.UTCTime *4:5+ – Format :- hh:mm:ss Status = Fragments[6] Mode = Fragments [7] Break – go to step 3.
  • 10. } Step7. if (message *0:5+ = = β€˜$GPGSA’ ) { Fragments *+ = explode(β€œ,” message) Mode_a = Fragments[1] Mode_b = Fragments[2] Operating_setellites = Fragments[3] PDOP = Fragments[4] HDOP = Fragments[5] VDOP = Fragments[6] Break – go to step 3. } Step8. if (message *0:5+ = = β€˜$GPGSV’ ) { Fragments *+ = explode(β€œ,” message) Nos_messages = Fragments[1] Message_No = Fragments[2] Nos_setellites = Fragments[3] Satellite_ID = Fragments[4] Satellite_elevation = Fragments[5] Satellite_azimuth = Fragments[6] SNR_No = Fragments[7] Break – go to step 3. } Step 9. if (message *0:5+ = = β€˜$GPRMC’ ) { Fragments *+ = explode(β€œ,” message) if (Fragments *3+ == β€˜β€™β€ OR Fragments *5+ == β€œβ€˜β€™) { latitude or longitude can’t be determined Break loop – go to step 3 } UTCTime = Fragments[1] – Format :- hhmmss.ss UTCTime = UTCTime *0:1+ . β€œ:”.UTCTime *2:3+ . β€œ:”.UTCTime *4:5+ – Format :- hh:mm:ss Status = Fragments[2]
  • 11. Latitude = Fragments [3] -Format :- xxmm.dddd Latitude = Latitude[0:1] + Latitude[2:8] / 60 -Format :- Decimal format Loc_N/S = Fragments[4] Longitude = Fragments[5] -Format:- yyymm.dddd Longitude = Longitude[0:2] + Longitude [3:9] / 60 -Format :- Decimal format Loc_E/W = Fragments[6] Speed = Fragments[7] Heading = Fragments[8] Date = Fragments[9] -format :- ddmmyy Date = Date*0:1+. β€œ-”. Date*2:3+. β€œ-”. Date*4:5+ -Format:- dd-mm-yy Magnetic_variation = Fragments[10] Mode = Fragments[12] Break – go to step 3. } Step10. if (message *0:5+ = = β€˜$GPVTG’ ) { Fragments *+ = explode(β€œ,” message) Heading = Fragments[1] Heading_unit = Fragments[2] Magnetic_heading = Fragments[3] Magnetic_heading_unit= Fragments[4] Speed_knots= Fragments[5] Speed_unit_knots = Fragments[6] Speed_KM = Fragments[7] Speed_unit_KM = Fragments[8] Mode = Fragments[9] Break -go to step. 3 } Break – go to step 3. }
  • 12. Explanation for some functions used in algo : Message[i:j] : here message in a string that stores a packet in it. Message[i:j] : represent a substring of message from index i to j elements (note i and j both are included). Explode : it splits the string in to fragments by a specific character, here we are splitting message by comma β€œ,”, and it stores all the fragments in to an array named fragments[]. Other notations are common notations for many programming languages like C, C++. User can use either full or partial algorithm according to requirement.