GPSReader 1.0.1

dotnet add package GPSReader --version 1.0.1                
NuGet\Install-Package GPSReader -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GPSReader" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GPSReader --version 1.0.1                
#r "nuget: GPSReader, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GPSReader as a Cake Addin
#addin nuget:?package=GPSReader&version=1.0.1

// Install GPSReader as a Cake Tool
#tool nuget:?package=GPSReader&version=1.0.1                

GPSReader

GPSReader is a C# library designed to parse NMEA 0183 sentences from GPS devices. It provides a flexible and extensible way to handle different types of NMEA sentences.

Features

  • Supports reading NMEA sentences from a serial port(real-time) or a file(simulation purpose).
  • Supports multiple NMEA sentence types (GPGGA, GPGSA, GPGLL, GPGSV).
  • Event-driven architecture allows for real-time processing of GPS data.
  • Customizable parser list allows for easy addition of new sentence types.

Hardware Requirements

Any GPS device that outputs NMEA 0183 sentences over a serial port should work with GPSReader. You can also use a file containing NMEA sentences for testing purposes. I bought a GPS module VK-162 and connected it to my computer. You can find it on Amazon or AliExpress.

Usage

To use GPSReader, you need to create an instance of GPSReaderService, passing in an ILogger, an INMEAInput, and a list of BaseNMEAParser objects.

var parsers = new List<BaseNMEAParser>
{
    new GPGGAParser(),
    new GPGSAParser(),
    // Add or remove parsers as needed
};

var gpsReaderService = new GPSReaderService(logger, input, parsers);

You can then subscribe to the events provided by GPSReaderService to handle the parsed data.

gpsReaderService.OnGPGGAUpdated += (sender, args) =>
{
    // Handle GPGGA data
};

gpsReaderService.OnGPGSAUpdated += (sender, args) =>
{
    // Handle GPGSA data
};

// Subscribe to other events as needed

Example

You can find an example of how to use GPSReader in the ConsoleApp project under example folder. This project contains a simple console application that reads GPS data from a file and prints the parsed data to the console.

README.md Screenshot of the example output: screenshot.jpg

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or bug reports.

License

GPSReader is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 142 3/26/2024
1.0.0 122 3/20/2024