Wykres commitów

158 Commity (a6c320c4441d0cae97a12678557d7440264f288c)

Autor SHA1 Wiadomość Data
Zoran Bošnjak 689d60ebbe Allow dynamic settings override
Additional (optional) 'settings' attribute in AprsClient,
to be able to pass custom settings to the client,
without changing the settings.py file.

Added 'CustomSettings' class for backward compatible attribute access.

Example (myapp.py):
...
args = ... parse arguments from command line

settings = CustomSettings(
    APRS_SERVER_HOST = args.server,
    APRS_SERVER_PORT_FULL_FEED = args.port,
    APRS_SERVER_PORT_CLIENT_DEFINED_FILTERS = args.port,
    APRS_APP_NAME = 'python-ogn-client',
    PACKAGE_VERSION = '0.9.5',
    APRS_APP_VER = '0.9',
    APRS_KEEPALIVE_TIME = 240,
    TELNET_SERVER_HOST = 'localhost',
    TELNET_SERVER_PORT = 50001,
    )

client = AprsClient(aprs_user='N0CALL', aprs_filter=args.filter, settings=settings)
client.connect()
...
2019-12-18 08:30:39 +01:00
Konstantin Gründger 226a8239fa Release v0.9.5 2019-09-07 16:26:32 +02:00
Konstantin Gründger 7260245e15 Changed telnet parser from fixed size to regex 2019-07-20 11:11:19 +02:00
Konstantin Gründger 2e02015e52 Fixed telnet parser (see #18) 2019-07-07 12:48:57 +02:00
Konstantin Gründger 342af0a253 Add support for capturs (fixes #42) 2019-06-08 14:48:42 +02:00
Konstantin Gründger 37d089acac Bugfix Spider parser (fixes #60) 2019-06-08 14:20:19 +02:00
Konstantin Gründger b7f51b92f8 Added support for OGFLYM beacons (fixes #63) 2019-06-08 14:02:18 +02:00
Konstantin Gründger 706a725305 Allow comment in tracker status beacon (fixes #56) 2019-06-08 08:03:34 +02:00
Konstantin Gründger 7682a69fd7 Fixed inReach parser 2019-06-07 20:50:54 +02:00
Konstantin Gründger b8f0028f1e Small changes for inReach parser 2019-06-07 20:34:50 +02:00
Konstantin Gründger 1eae059cf6 Fix some flake8 problems 2019-06-07 20:08:51 +02:00
Konstantin Gründger 061d47bb03 Reduce flask8 warnings 2019-06-07 20:08:51 +02:00
Philip Lee 55e3696a34 Add Inreach parser
Based on documentation here...
https://github.com/glidernet/ogn-aprs-protocol/blob/master/aprsmsgs.txt
2019-06-05 20:11:59 -07:00
Konstantin Gründger 37de8673c2 Release v0.9.3 2019-06-03 23:19:53 +02:00
Konstantin Gründger 7a577ab9ef Added generic parser for unknown protocol 2019-06-03 22:45:31 +02:00
Konstantin Gründger dab3ca3ddb Use precompiled regex 2019-06-03 22:45:31 +02:00
Konstantin Gründger b0bf5c82ee Release v0.9.2 2019-05-07 23:27:21 +02:00
Matt b6659bb216 Bugfix for #61 2019-05-07 21:20:54 +02:00
Konstantin Gründger 0ec3dc277d Release v0.9.1 2018-09-18 19:12:05 +02:00
Konstantin Gründger 32064f5364 Fix SPOT and Tracker parser 2018-09-18 19:01:34 +02:00
Konstantin Gründger 595519053d Change conversion factor kph->ms (fixes #53) 2018-09-18 18:37:01 +02:00
Konstantin Gründger 84dbfdecdb Catch ConnectionResetError (fixes #52) 2018-09-18 18:35:44 +02:00
Konstantin Gründger 485282ea3b Release v0.9.0 2018-05-14 00:04:58 +02:00
Konstantin Gründger c779e908af Modified example code 2018-05-03 07:47:38 +02:00
Konstantin Gründger a1f84c6cb7 Removed AmbigousTimeError 2018-05-01 11:21:28 +02:00
Konstantin Gründger 79ab1cfc8a Changed half turn per minute to degrees per second 2018-04-30 22:29:13 +02:00
Konstantin Gründger 3c63cffb23 Refactoring: constants 2018-04-30 21:32:15 +02:00
Konstantin Gründger cda1cb511b LT24, Skylines: <id> --> <address> 2018-04-28 21:31:50 +02:00
Konstantin Gründger fabb92bc88 Changed spider/spot <id> to <address> 2018-04-28 18:45:23 +02:00
Konstantin Gründger 8c874a3226 Spider: signal_strength -> signal_power 2018-04-28 15:16:02 +02:00
Konstantin Gründger c8d739eccd Change <id> to <address> 2018-04-28 13:44:01 +02:00
Konstantin Gründger 572d8bbc54 Refactoring 2018-04-21 10:13:49 +02:00
Konstantin Gründger 8cff2a2c4d GPS: status to quality and refactoring 2018-04-20 23:57:51 +02:00
Konstantin Gründger 6e0271cfc1 Split new OGFLR parser from old APRS parser 2018-04-20 18:51:18 +02:00
Konstantin Gründger b7458fa021 Refactoring 2018-04-12 23:24:52 +02:00
Meisterschueler c3012784ab
Merge branch 'master' into feature/+telnet_parser 2018-04-10 22:56:13 +02:00
Konstantin Gründger 12bdf25243 Added Support for FANET beacons 2018-04-10 18:54:30 +02:00
Konstantin Gründger a8a83e960b Introduce generic APRS pattern 2018-04-10 08:33:48 +02:00
Konstantin Gründger aa682a9e10 Let the parser parse comments 2018-03-18 17:55:01 +01:00
Konstantin Gründger 8f8974446c Parse (server) comments 2018-03-17 11:19:34 +01:00
Konstantin Gründger a8d0901192 Test telnet parser 2018-03-10 10:37:58 +01:00
Konstantin Gründger c58739705f Added telnet parser and test
Added TelnetClient

Change encoding, added connect() and disconnect()

Bugfixes
2018-03-10 09:52:52 +01:00
Konstantin Gründger 52468a4bd1 Refactoring: pattern naming 2018-03-10 09:46:31 +01:00
Konstantin Gründger 7ca937a17d Skylines parser, fixes #38 2018-03-10 09:17:13 +01:00
Konstantin Gründger 48d0faf374 Renamed beacon_types and LT24, Spider and Spot parsers, fixes #37, #38, #40 2018-03-10 08:58:32 +01:00
Colin S 5a0a382914
Update exceptions.py 2018-02-28 14:43:17 +02:00
Konstantin Gründger fdb05074a3 Release v0.8.2 2018-01-20 13:11:57 +01:00
Konstantin Gründger b1d26ce0c0 Better altitude validation 2018-01-13 13:49:26 +01:00
Konstantin Gründger 41e7128253 Allow valid timestamp only 2018-01-13 13:23:18 +01:00
Konstantin Gründger caffdabb4e Allow valid lat/lon only 2018-01-13 08:54:39 +01:00
Konstantin Gründger 37e239fb3a Release v0.8.1 2018-01-12 19:03:47 +01:00
kammermark@gmx.de f1a9788078 Updated Changelog 2018-01-12 12:28:31 +01:00
Konstantin Gründger 1607738b12 IDs must be hexadecimal 2018-01-12 08:26:38 +01:00
Konstantin Gründger c2b82817c7 Fix for fortyfour #44 2017-12-13 19:26:56 +01:00
Konstantin Gründger 85b7ae5adb Refactoring 2017-12-02 09:31:03 +01:00
Konstantin Gründger 2ccdcd90be put parser functions in classes 2017-10-05 08:10:28 +02:00
Konstantin Gründger 382eae4ef7 Release v0.8.0 2017-10-02 19:43:06 +02:00
Konstantin Gründger 384f0edc7e Fixes #25 2017-10-02 19:22:34 +02:00
Konstantin Gründger 8857a31e78 Allow negative altitudes 2017-10-02 19:19:39 +02:00
Konstantin Gründger e613abdbcb Fixed OGNTRK parser 2017-10-01 12:59:53 +02:00
Konstantin Gründger e1247467e5 Added test for receiver OGNSDR 2017-09-30 19:27:46 +02:00
Konstantin Gründger 7361ea7392 Fixed createTimestamp 2017-09-30 18:25:02 +02:00
Konstantin Gründger 054c9eeed0 Fixed ddhhmm vs. hhmmss problem 2017-09-30 14:28:00 +02:00
Konstantin Gründger 33a7690f7d Added Tracker (OGNTRK) and Receiver (OGNSDR) parser 2017-09-30 11:42:16 +02:00
Konstantin Gründger 127f3935d2 Separated parser in separate files 2017-09-30 09:45:50 +02:00
Konstantin Gründger ca5636456a Add APRS type to message 2017-09-30 09:45:50 +02:00
Konstantin Gründger 6044e58773 Tests for OGFLR, OGNTRK and OGNSDR 2017-09-30 09:45:50 +02:00
Konstantin Gründger 4f1f6c09ae Added group 'relay' 2017-09-30 09:45:50 +02:00
Konstantin Gründger 76a45bc531 Each dstcall gets a separate treatment 2017-09-30 09:45:50 +02:00
Konstantin Gründger 5fcaf04125 If we have a dstcall other than "APRS" the pattern must match 2017-09-30 09:45:50 +02:00
Konstantin Gründger 63d8d2fc4e Implemented Naviter parser 2017-09-30 09:45:50 +02:00
Konstantin Gründger 5faf78b239 Test beacon_type 2017-09-30 09:45:50 +02:00
Konstantin Gründger e63b746504 parser: distinguish between different dstcalls 2017-09-30 09:45:50 +02:00
Konstantin Gründger c2c38bb337 Timestamp zulu can also be a z instead h and other small improvements 2017-09-30 09:45:50 +02:00
Konstantin Gründger 9ae25a4500 Added support for heared aircrafts 2017-09-09 11:28:22 +02:00
Anze Kolar 13cc75cf03 Allow client to do sequential connect-disconnect
With introduction of the kill switch it was impossible to restart the
consumption of the OGN messages after a .disconnect() method has been
called.

This commit resets the kill flag after .connect() has been called.

Minimal example:

```
client = AprsClient(aprs_user='testuser', aprs_filter='')
client.connect()
client.run(callback=lambda x: x, autoreconnect=True)
...
client.disconnect()
client.connect()
client.run()
```
2017-07-20 15:28:01 +02:00
Anze Kolar 182f9518a4 Add kill flag to AprsClient
When starting an AprsClient with AprsClient.run(...) the client enters
a loop without an exit condition (i.e. a while True loop).  If autoreconnect
is set to True, it is impossible to exit the aforementioned loop even if
AprsClient.disconnect() is called.

This causes problems when running the client in a thread (or as a
background service, etc.) as the process will not join nor terminate
unless explicitly shutdown with SIGKILL.

Minimal example:

```
import signal

from ogn.client import AprsClient
from ogn.parser import parse_aprs, parse_ogn_beacon, ParseError

def process_beacon(raw_message):
    print('Received message')

client = AprsClient(aprs_user='N0CALL')
signal.signal(signal.SIGTERM, lambda signo, stackno: client.disconnect())
client.connect()
client.run(callback=process_beacon, autoreconnect=True)
```

This commit fixes such issues by adding a kill flag that is raised when
calling AprsClien.disconnect() to the while conditions of both loops inside
AprsClient.run().

Note: the outermost loop could still remain a while True loop as the
exit condition is checked at the end of the loop body.
2017-07-20 11:12:04 +02:00
Konstantin Gründger d0044deb47 Release v0.7.1 2017-06-05 10:07:04 +02:00
Konstantin Gründger e7cc73b220 Bugfix: error_count in AircraftBeacon is a int, not a float 2017-06-05 09:54:49 +02:00
Fabian P. Schmidt 24336cf689 Release v0.7.0 2017-06-04 07:22:39 +02:00
Fabian P. Schmidt 3ba39c266f parser: Fix copy-and-paste error 2017-06-04 07:17:04 +02:00
Konstantin Gründger 36ce45fe20 Empty APRS comment belongs to a receiver beacon 2017-05-16 14:36:38 +02:00
Konstantin Gründger d2973c1b93 Updated descriptions 2017-05-07 13:20:04 +02:00
Konstantin Gründger c98c8eca04 The comment is just optional 2017-05-07 12:56:06 +02:00
Konstantin Gründger a90f3ed1a9 Sync aircraft regex patter with ogn_client-ruby 2017-05-07 12:29:05 +02:00
Konstantin Gründger 539562c708 Sync receiver regex patter with ogn_client-ruby 2017-05-07 12:14:32 +02:00
Konstantin Gründger 00eaffd2aa Protocol parts not available will set to None instead of 0.0 2017-05-07 11:47:58 +02:00
Fabian P. Schmidt 7565de6c16 Release v0.6.0 2016-10-21 22:11:40 +02:00
Konstantin Gründger 43f2f344f5 Renaming signal_strength -> signal_quality, power -> signal_power 2016-10-13 19:34:34 +02:00
Konstantin Gründger 81758975f8 Removed debug code 2016-10-10 19:29:03 +02:00
Konstantin Gründger b5b85d7e1b Added "power", "voltage" and "amperage" 2016-10-10 19:26:46 +02:00
Konstantin Gründger d33cd5b7b9 Bugfix 2016-10-09 22:27:44 +02:00
Konstantin Gründger 6e2c59594f Adopt naming from ruby-client_ogn 2016-10-09 22:01:06 +02:00
Konstantin Gründger 5bcd04fe20 Implemented new receiver protocol for 0.2.5
Update for 0.2.5 protocol
2016-10-07 22:27:24 +02:00
Fabian P. Schmidt 13adb3efed Release v0.5.0 2016-09-29 18:42:26 +02:00
Konstantin Gründger 1b485e7629 Split reference_datetime to reference_date and reference_time 2016-09-28 11:08:44 +02:00
Fabian P. Schmidt d48b360141 Add aprs position enhancement before the sign adjustment
Patch provided by shortjonescipher.

Fixes #7.
2016-09-01 13:58:56 +02:00
Heikki Hannikainen de99c3b052 Relax APRS packet parser pattern to allow other destination calls than APRS
APRS spec allows any callsign-like string, and it is widely used to signal
which software or device generated the packet.
For OGN use, I would recommend using OGN-specific destination callsigns,
maybe software/tracker-specific OGN-prefixed calls. APRS tocall
index is found here, AP-prefixed tocalls are used for APRS devices.
https://github.com/hessu/aprs-deviceid/blob/master/tocalls.yaml

Fixes #9.
2016-09-01 11:28:46 +02:00
Fabian P. Schmidt 58cceb9aa2 Release v0.4.0 2016-03-29 15:24:09 +02:00
Fabian P. Schmidt 763826953a Add submodule ddb 2016-03-29 12:02:00 +02:00