NmeaParser/README.md

60 lines
2.4 KiB
Markdown
Raw Normal View History

2014-07-25 19:25:10 +02:00
Nmea Parser
2014-02-11 06:57:05 +01:00
=========
Library for reading and parsing data NMEA message streams.
It makes it easy to connect and listen for NMEA messages from coming from various devices in Windows Store, Windows Phone, Windows Desktop./NET, Windows Universal apps as well as Xamarin for iOS and Android.
2014-07-25 21:58:49 +02:00
The following inputs are supported:
- System.IO.Stream (all platforms)
- Emulation from NMEA log file (all platforms)
- BlueTooth: Windows Store, Windows Phone, Windows Universal. Desktop is supported using the bluetooth device via the SerialPortDevice.
- Serial Device: Windows Desktop and Windows Universal.
2014-02-11 07:33:55 +01:00
2014-07-31 23:09:39 +02:00
Currently supported NMEA messages:
2015-03-20 23:17:09 +01:00
- Generic GPS NMEA (GPRMC, GPGGA, GPGLL, GPGSA, GPGSCV, GPRMB, GPRMC, GPBOD, GPRTE, GPGST)
2014-07-31 23:09:12 +02:00
- Garmin GPS NMEA (PGRME, PGRMZ)
2014-07-31 08:18:31 +02:00
- Trimble Laser Range Finder (PTNLA, PTNLB)
- TruePulse Laser Range Finder (PLTIT)
2014-02-11 07:38:13 +01:00
2014-07-31 08:20:17 +02:00
The API is easily extensible with more NMEA messages. Simply create a new class inheriting from "NmeaMessage" and use the NmeaMessageType Attribute to tag it with the NMEA Message Token it supports.
2014-02-11 07:38:13 +01:00
Example:
2014-07-31 23:09:12 +02:00
```csharp
2014-11-15 20:58:25 +01:00
[NmeaMessageType("GPRMC")]
2014-02-11 07:38:13 +01:00
public class Gprmc : NmeaMessage
{
protected override void LoadMessage(string[] message)
{
2014-07-25 22:01:36 +02:00
//TODO: Process message parts
2014-02-11 07:38:13 +01:00
}
}
```
2014-02-11 07:41:13 +01:00
If you add new messages, please fork, provide a simple unit test for the message and submit a pull request.
2014-02-11 07:33:55 +01:00
2014-07-31 08:16:16 +02:00
### NuGet
You can get the library via [NuGet](http://www.nuget.org) if you have the extension installed for Visual Studio or via the PowerShell package manager. This control is published via NuGet at [SharpGIS.NmeaParser](https://nuget.org/packages/SharpGIS.NmeaParser).
2015-01-30 21:26:30 +01:00
<table border="4px">
<tr><td>
<code>PM&gt; Install-Package SharpGIS.NmeaParser</code>
</td></tr></table>
2014-07-31 08:16:16 +02:00
2014-07-25 21:58:49 +02:00
Usage
2014-02-11 07:33:55 +01:00
=====================
2014-07-25 21:26:16 +02:00
2014-07-25 22:00:29 +02:00
Please see the [WIKI](http://www.github.com/dotMorten/NmeaParser/wiki) how to use it on the various platforms
2014-11-16 19:01:15 +01:00
Screenshots
=====================
Screenshots from Desktop sample app:
![sampleapp2](https://cloud.githubusercontent.com/assets/1378165/5062460/10cc3064-6d77-11e4-8365-1e9c7c346afc.png)
![sampleapp3](https://cloud.githubusercontent.com/assets/1378165/5062461/123adfc2-6d77-11e4-8573-1fe95fa0325f.png)
Map view using the [ArcGIS Runtime](http://developer.arcgis.com/net) (see [separate branch](https://github.com/dotMorten/NmeaParser/tree/ArcGISLocationProvider)):
2014-11-16 19:28:14 +01:00
![sampleapp1](https://cloud.githubusercontent.com/assets/1378165/5062617/3419eef4-6d7b-11e4-8c8b-a6c4eaa212f0.jpg)
2014-11-16 19:01:15 +01:00