A python3 module for the Open Glider Network.
Go to file
dependabot[bot] 471840f657
Bump coveralls from 3.2.0 to 3.3.1 (#105)
Bumps [coveralls](https://github.com/TheKevJames/coveralls-python) from 3.2.0 to 3.3.1.
- [Release notes](https://github.com/TheKevJames/coveralls-python/releases)
- [Changelog](https://github.com/TheKevJames/coveralls-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TheKevJames/coveralls-python/compare/3.2.0...3.3.1)

---
updated-dependencies:
- dependency-name: coveralls
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-12 00:54:28 +01:00
.github Upgrade to GitHub-native Dependabot (#26) 2021-05-08 10:32:16 +02:00
ogn Use timestamp from APRS server (fixes #85) 2021-06-13 00:04:13 +02:00
tests Added rainfall data to position_weather beacons 2021-06-06 12:00:52 +02:00
.gitignore Initial commit; Import from ogn-python 2016-02-28 12:11:16 +01:00
.travis.yml Added current python versions 2020-05-21 20:04:06 +02:00
CHANGELOG.md Use timestamp from APRS server (fixes #85) 2021-06-13 00:04:13 +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 Updated readme and changelog 2021-06-06 12:01:37 +02:00
requirements.txt Initial commit; Import from ogn-python 2016-02-28 12:11:16 +01:00
setup.cfg Refactoring 2020-10-04 11:06:28 +02:00
setup.py Bump coveralls from 3.2.0 to 3.3.1 (#105) 2022-03-12 00:54:28 +01: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, 7, 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))
    except NotImplementedError as e:
        print('{}: {}'.format(e, raw_message))

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

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

Connect to telnet console and display all decoded beacons.

from ogn.client import TelnetClient
from ogn.parser.telnet_parser import parse

def process_beacon(raw_message):
    beacon = parse(raw_message)
    if beacon:
        print(beacon)

client = TelnetClient()
client.connect()

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

License

Licensed under the AGPLv3.