<$BlogRSDUrl$>

Sunday, October 31, 2004

More on NMEA 0183


NMEA 0183 is an ASCII based protocol used by GPS to transmit data. The NMEA data is usually categorized as sentences. These sentences always start with a “$” and ends with CRLF followed by a checksum data in Hex. The checksum data confirms the integrity of that sentence. These sentences are nothing but a comma separated value/fields. The 1st field of NMEA Sentence contains the “Command”, followed by the data, ended with a
”*” is a hh, a 2 digit hex number. checksum is calculated by XORing all the ASCII data between “$” and a “*”.

Some of the commonly used NMEA Sentences and the transmitted data is as below

Sentence Description

$GPGGA Global positioning system fixed data$GPGLL Geographic position - latitude / longitude
$GPGSA GNSS DOP and active satellites
$GPGSV GNSS satellites in view
$GPRMC Recommended minimum specific GNSS data
$GPVTG Course over ground and ground speed






$GPGGA Sentence (Fix data)

Example (signal not acquired): $GPGGA,235947.000,0000.0000,N,00000.0000,E,0,00,0.0,0.0,M,,,,0000*00

Example (signal acquired): $GPGGA,092204.999,4250.5589,S,14718.5084,E,1,04,24.4,19.7,M,,,,0000*1F


Fields

Sentence ID $GPGGA
UTC Time 092204.999 hhmmss.sss
Latitude 4250.5589 ddmm.mmmm
N/S Indicator S N = North, S = South
Longitude 14718.5084 dddmm.mmmm
E/W Indicator E E = East, W = West
Position Fix 1 0 = Invalid, 1 = Valid SPS, 2 = Valid DGPS, 3 = Valid PPS
Satellites Used 04 Satellites being used (0-12)
HDOP 24.4 Horizontal dilution of precision
Altitude 19.7 Altitude in meters according to WGS-84 ellipsoid
Altitude Units M M = Meters
Geoid Seperation Geoid seperation in meters according to WGS-84 ellipsoid
Seperation Units M = Meters
DGPS Age Age of DGPS data in seconds
DGPS Station ID 0000
Checksum *1F
Terminator CR/LF




$GPGLL Sentence (Position)
Example (signal not acquired): $GPGLL,0000.0000,N,00000.0000,E,235947.000,V*2D

Example (signal acquired): $GPGLL,4250.5589,S,14718.5084,E,092204.999,A*2D

Fields

Sentence ID $GPGLL
Latitude 4250.5589 ddmm.mmmm
N/S Indicator S N = North, S = South
Longitude 14718.5084 dddmm.mmmm
E/W Indicator E E = East, W = West
UTC Time 092204.999 hhmmss.sss
Status A A = Valid, V = Invalid
Checksum *2D
Terminator CR/LF



posted by Logu Krishnan : 12:19 PM

A Question on GPS



Recently there was a MAIL at Chennai .NET User Group - CNUG on implementation of GPS on a web application… somehow I had this thought that this question generalizes and overshadows many internals of GPS , which would leave the basics behind the scenes… and many people would implement this without understanding the intricacies of the GPS…

Here is a small writeup i wrote on GPS in simple terms…in reply to that mail...

Have you ever wondered how this whole concept of GPS works synchronously?? Implementing something without understanding the crux would be fine sometimes, but absolutely lacks fun and adventurism. Thought I shall share something I know to clarify those generalization. If the basics does not interest you, very well go to the last part of the mail for the direct answers….

Okay the answer to your question is… The answer is YES and NO :-)
Let me justify my answer, but first some basics on GPS, I shall try and keep this as simple as possible. Global Positioning System(GPS) is a worldwide navigation system built around 24 satellites and millions of receivers. Each satellite has a very exact atomic clock to keep time accurate so that the deviation is less than 3 nanoseconds. Fine, but how do they help in location services ? All these satellites have an exact model of their orbit around the earth, and constantly broadcasts it’s time-stamped position to the ground stations. Now by measuring the differences in timestamp and satellite positions, a receiver on earth can determine its position using triangulation.The killer application of the GPS is, to know a position in real time. But, there are also a few other elements related to basic navigation, such as converting latitude/longitude information to easting/northing the coordinates used by many maps, or calculating distance/direction between known positions.

GIS – geographic information systems, complements the GPS very much. GIS system typically contains information about objects(e.g. roads,hospitals etc) and other characteristics in a database. This database is used to plot maps or make queries such as “how many hospitals are located in a particular area”.

But, how do we normal humans get information using these GPS and GIS ? the answer is the GPS Devices usually connected to a computer/PPC using serial ports/USB/Bluetooth, and as always we have issues with the proprietary protocols like SiRF and Garmin, but much like our TCP/IP which acts as a standard, we have NMEA 0183 (National Marine Electrinocs Association) you should have guessed who invented this protocol and why.

Surprisingly, NMEA is a very simple ASCII based protocol. The GPS Sends NMEA data continuously over the serial port. There are 3 types of NMEA Sentences – GGA, RMC and GLL, these sentences start with a “$” and provide details like UTC,Latitude,Hemisphere,Longitude,direction et al as comma separated values and ends with a “*” followed by the checksum. Some GPS receivers send all the three sentences, but not a mandatory one. Latitude determines the position in the south to north direction(0 @ equator, -90d @ south pole, +90d @ northpole), likewise longitude determines west to east direction.

How how do we exactly pin point a location on earth…i.e. “datum” in GPS Terms, for this you need to refresh your science and mathematics part of ur brains you studied at school, i.e. earth is an ellipsoid (sphere that is slightly pressed together at the top and bottom) the parameters that define ellipsoid is major axis, minor axis and displacement from center of the earth – this is datum. The datum used in GPS is called “WGS84”, therefore a position described in lat/long defines a point on a datum and thus we are able to pinpoint and locate a particular point on earth. You can call that type of data as “GeoCoded”. This datum is just projected on the map projections. These datas are manipulated using simple Cartesian coordinate systems and mapped against something called as UTM – Universal Transverse Mercator

Okie okie…. Now I’m answering your question… after all these information have been fetched, calculating the distance between two points is as simple as using your Pythagorean theorem and simple trigonometry.

Ah… should you go thro’ all these troubles, just to get a distance between 2 places… if you are adventurous the answer is yes, otherwise no :)

Now, the real part of the answer…. You can very well use the location services provided by the location servers of many vendors or use third party API’s that work on geocodes.
Such as those provided by
1. Microsoft MAP Point SDK – if your applicaton is extensible on implementation of location services, this is the best bet, but you might need to signup for an map point account with Microsoft. This will enable you to access the web services exposed to get more location based information. If you are a MSDN subscriber you might get it free. Just browse MSDN for more details.
2. Use third party components, some of my recommendations would be http://www.franson.biz/
3. Signup with some API Providers like Advantage API from MapQuest.

Ah…. A Long post !!! but fine :-) basics are pretty important….

references Franson.biz...


posted by Logu Krishnan : 10:21 AM

Saturday, October 30, 2004

My Ex-Boss[es]



Recently I received a mail from my ex-project manager "Kesavan Krishnan", narrating experiences of his recent Motorbike expedition from Kashmir-to-Kanyakumari, organized by "WHO". Thought I should blog this.
Read his full experience here


I should write something about him, actually this man is really Adventurous and makes me Envy most of the time :-) He is the man who has announced himself as “Professionally-Retired” at the age of 35, though he was a typical software personality and have almost traveled and worked at most of the countries, he is always a dedicated person, who can tackle stress, workloads and other software chores. Today he enjoys every bit of his life he is involved in bits of Adventure, spirituality, Service to society, trekking, expeditions, family tours…

Ah... Boy... am I Missing out some spice in my life... and tracing something that really don’t exist? He makes me feel so...

Incidentally, I also recollect some interesting people I’ve met here at my Chennai life… 2004 has been quite eventful year to me. Too many events occurred both at career and personal life. Too many people – “known faces”, “unknown faces of known faces”!!... Too many unique characters – charming, egoistic, sheepish, air headed, cool headed, just gas, third-dimensional thoughts, who lives life, sometimes too sweet to ignore…. sometimes a person who understands every bit of you….


The last category is the rarest of all, very rarely I get to meet such persons. "Anand Srinivasan" and "Aravind" fits that rarest breed. Frankly speaking they have inspired me a lot and I’ve learnt a lot even on basics like doing your job with perfection, thinking about technology in its purest perspective, mapping technology with business perspective et al… sure they have redefined many things with in me…and I’m neither ashamed nor filled with ego to say “I’ve learned from him”, instead I’m glad to say this… but It’s difficult to decipher when this cadre of people vanishes from the life. It would take lots of time to fill up that empty space. Sometimes that place is just empty always…………… !!!


posted by Logu Krishnan : 12:45 PM

Tuesday, October 26, 2004

Robotics Framework for .NET and [a]c#



Robotics4.NET initiative aims to develop a framework for programming robots
and defining their architecture with managed languages for .NET as C# and
VB.NET. you can find more documents posted by Antonio Cisternino at http:
//www.robotics4.net/Shared%20Documents/Forms/AllItems.aspx



Annotated C# now supports C#2.0
http://codebricks.sscli.net/


Antonio Cisternino's blog on [a]C#


And here is an related interesting link http://research.microsoft.com/ero/







posted by Logu Krishnan : 10:13 PM

This page is powered by Blogger. Isn't yours?