mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2025-12-06 07:12:04 +01:00
63 lines
2.4 KiB
Markdown
63 lines
2.4 KiB
Markdown
Nmea Parser
|
|
=========
|
|
|
|
Library for reading and parsing NMEA data message streams.
|
|
It makes it easy to connect and listen for NMEA messages coming from various devices in Windows Store, Windows Phone, Windows Desktop/.NET and Windows Universal apps as well as Xamarin for iOS and Android.
|
|
|
|
The following inputs are supported:
|
|
- System.IO.Stream (all platforms)
|
|
- Emulation from NMEA log file (all platforms)
|
|
- Bluetooth: Windows Universal. Desktop is supported using the bluetooth device via the SerialPortDevice.
|
|
- Serial Device: Windows Desktop and Windows Universal.
|
|
|
|
|
|
Currently supported NMEA messages:
|
|
- GPS: GPBOD, GPGGA, GPGLL, GPGNS, GPGSA, GPGST, GPGSV, GPRMB, GPRMC, GPRTE
|
|
- GLONASS: GLGNS, GLGSV
|
|
- GALILEO: GAGSV
|
|
- Generic GNSS: GNGGA, GNGLL, GNGNS, GNGSA, GNGST, GNRMC
|
|
- Garmin GPS NMEA (PGRME, PGRMZ)
|
|
- Trimble Laser Range Finder (PTNLA, PTNLB)
|
|
- TruePulse Laser Range Finder (PLTIT)
|
|
|
|
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.
|
|
|
|
Example:
|
|
```csharp
|
|
[NmeaMessageType("GPRMC")]
|
|
public class Gprmc : NmeaMessage
|
|
{
|
|
protected override void LoadMessage(string[] message)
|
|
{
|
|
//TODO: Process message parts
|
|
}
|
|
}
|
|
```
|
|
|
|
If you add new messages, please fork, provide a simple unit test for the message and submit a pull request.
|
|
|
|
|
|
### 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).
|
|
|
|
<table border="4px">
|
|
<tr><td>
|
|
<code>PM> Install-Package SharpGIS.NmeaParser</code>
|
|
</td></tr></table>
|
|
|
|
Usage
|
|
=====================
|
|
|
|
Please see the [WIKI](http://www.github.com/dotMorten/NmeaParser/wiki) how to use it on the various platforms
|
|
|
|
Screenshots
|
|
=====================
|
|
Screenshots from Desktop sample app:
|
|
|
|

|
|

|
|
|
|
Map view using the [ArcGIS Runtime](http://developer.arcgis.com/net) (see [separate branch](https://github.com/dotMorten/NmeaParser/tree/ArcGISLocationProvider)):
|
|

|
|
|