GPS- Deriving British Ordnance Survey Grid Reference from NMEA data

Part 5 - Putting it to use

So now we have created the class, here is a small demo project in C# 2005 demonstrating its use by reading the NMEA from a GPS conected to a serial port and displaying the OS grid reference.

It's available in the downloads section to the left as NMEA2OSGdemo.zip

The project makes use of the NET 2 serialport class to read the GPS.
The NMEA strings are parsed via NMEAinterpreter
The lat and lon are parsed via NMEA2OSG
The resulting events caused the respective text boxes to be updated with the appropriate data.

Oh and I like to know the number of satellites in view and how many are in use by the GPS so this functionality is also added to the NMEAinterpreter class.



I hope this article has been useful and/or informative.

Accuracy of the conversion should be within less than 4 meters (which is better than the inbuilt conversion of my Garmin Vista)

If you need to know more about the underlying mathematics, I suggest you go to the resources refered to in the article as a deeper explanation is beyond me!

Alex Etchells  March 2006

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An idiot with a computer is a faster, better idiot” - Rich Julius