skyhop / Aprs

https://skyhop.org
10 stars 7 forks source link
aprs boerman ogn tcp-library

skyhop logo


AprsClient

The Aprs project contains everything to get started to parse APRS messages. This project is focused on working with APRS messages from Open Glider Net (known as OGN flavoured APRS).

This project has been kickstarted by the code found on aprs.codeplex.com. The following edits have been made:

Installing the library (NuGet)

The library is available for download on NuGet:

Install-Package Skyhop.Aprs.Client

Configuring the library

Configuration of this library happens through a config file. Please create a file named appconfig.json in the root of your project and set it to copy to your build output. Configuration in the JSON file goes as follows:

{
  "aprsClient": {
    "uri": "aprs.glidernet.org",
    "port": "14580",
    "callsign": "0",
    "password": "-1",
    "filter": "t/poimqstunw",
    "useOgnAdditives": "true"
  }
}

For more information about the possible configuration check out AprsConfig.cs.

Using the library

Please be aware this library expects to work with OGN flavoured APRS by default! Use the App.Config file to turn this off.

To start listening for incoming APRS messages you can kickstart the library:

using Skyhop.Aprs.Client;
...
new Listener().PacketReceived += (sender, eventArgs) =>
{
    // Do some work...
};

To only receive the raw messages without any parsing you can use the DataReceived event.

new Listener().DataReceived += async (sender, eventArgs) =>
{
    // Do some work...
};

A command line tool which shows how to use this library is available at https://github.com/CorstianBoerman/AprsClient-Example