A python3 module for the Open Glider Network.
Go to file
dependabot-preview[bot] 002d92a42b Bump flake8 from 3.4.1 to 3.7.7
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.4.1 to 3.7.7.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.4.1...3.7.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-07 20:07:10 +02:00
ogn Add Inreach parser 2019-06-05 20:11:59 -07:00
tests Add a blank line in the test case for CI? 2019-06-05 20:17:05 -07:00
.gitignore Initial commit; Import from ogn-python 2016-02-28 12:11:16 +01:00
.travis.yml Release v0.8.0 2017-10-02 19:43:06 +02:00
CHANGELOG.md Release v0.9.3 2019-06-03 23:19:53 +02:00
CONTRIBUTORS Update changelog and contributors 2017-09-09 11:35:20 +02:00
LICENSE Initial commit; Import from ogn-python 2016-02-28 12:11:16 +01:00
MANIFEST.in Initial commit; Import from ogn-python 2016-02-28 12:11:16 +01:00
README.md Fixes #54 2018-09-29 23:19:01 +02:00
requirements.txt Initial commit; Import from ogn-python 2016-02-28 12:11:16 +01:00
setup.cfg Initial commit; Import from ogn-python 2016-02-28 12:11:16 +01:00
setup.py Bump flake8 from 3.4.1 to 3.7.7 2019-06-07 20:07:10 +02:00

README.md

python-ogn-client

Build Status PyPi Version Coverage Status

A python3 module for the Open Glider Network. It can be used to connect to the OGN-APRS-Servers and to parse APRS-/OGN-Messages.

A full featured gateway with build-in database is provided by ogn-python.

Installation

python-ogn-client is available at PyPI. So for installation simply use pip:

pip install ogn-client

Example Usage

Parse APRS/OGN packet.

from ogn.parser import parse
from datetime import datetime

beacon = parse("FLRDDDEAD>APRS,qAS,EDER:/114500h5029.86N/00956.98E'342/049/A=005524 id0ADDDEAD -454fpm -1.1rot 8.8dB 0e +51.2kHz gps4x5",
				reference_timestamp=datetime(2015, 07, 31, 12, 34, 56))

Connect to OGN and display all incoming beacons.

from ogn.client import AprsClient
from ogn.parser import parse, ParseError

def process_beacon(raw_message):
    try:
        beacon = parse(raw_message)
        print('Received {aprs_type}: {raw_message}'.format(**beacon))
    except ParseError as e:
        print('Error, {}'.format(e.message))

client = AprsClient(aprs_user='N0CALL')
client.connect()

try:
    client.run(callback=process_beacon, autoreconnect=True)
except KeyboardInterrupt:
    print('\nStop ogn gateway')
    client.disconnect()

License

Licensed under the AGPLv3.