ogn-client 1.2.1
pip install ogn-client
Latest version
Released:
A python module for the Open Glider Network
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU Affero General Public License v3 (AGPLv3)
- Author: Konstantin Gründger aka Meisterschueler, Fabian P. Schmidt aka kerel
- Tags gliding, ogn
- Requires: Python >=3
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
Project description
python-ogn-client
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.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU Affero General Public License v3 (AGPLv3)
- Author: Konstantin Gründger aka Meisterschueler, Fabian P. Schmidt aka kerel
- Tags gliding, ogn
- Requires: Python >=3
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ogn-client-1.2.1.tar.gz
.
File metadata
- Download URL: ogn-client-1.2.1.tar.gz
- Upload date:
- Size: 3.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ec0032604a86752b2e8c4e7d67a867ff0e33f9d1315607a66e4c35702601b46 |
|
MD5 | 18871e60f39a8682c09e25c16086e39d |
|
BLAKE2b-256 | 4d709c25b856b13c0372fbdf737b091d385d27df607d48588117149f24b648d9 |
File details
Details for the file ogn_client-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: ogn_client-1.2.1-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a4b5df6375f268bdddb1ab47c0775831519ccbd6e373e11dd85e47d4c0f1178 |
|
MD5 | d6854f7c614c980d9a818bacfafe7929 |
|
BLAKE2b-256 | 2b7ecd9d19267e8fab8e97e95b03baecff43c8cfd00db986ef34709edad5714c |