Closed Meisterschueler closed 8 years ago
The interval is 5 minutes, so I would guess it's a receiver beacon with a bad timestamp.
2016-01-13 00:19:26,752 - ERRO - ogn.gateway.client - Drop packet, -82658s from past.
2016-01-13 00:19:26,753 - ERRO - ogn.gateway.client - Dropped packet: Moosburg>APRS,TCPIP*,qAC,GLIDERN1:/231705h...
It is Moosburg sending beacons with a wrong timestamp. 23:17 at 00:19 UTC 23:22 at 00:24 UTC Unfortunately there is no contact data in the wiki or any related email-address on their website (EDPI).
Our simple date correction algorithm fails under this condition and thus produces such great intervals (3742s).
It is possible that a receiver send very old data when there is internet access issue. We already seen 6 or more hours late.
Should we change the checker, so it fails only if packets are delayed > 12 hours?
I propose the following (reference):
def createTimestamp(hhmmss, reference):
packet_time = datetime.strptime(hhmmss, '%H%M%S').time()
timestamp = datetime.combine(reference, packet_time)
delta = timestamp - reference
if abs(delta) < timedelta(hours=12):
return timestamp
else:
if delta > timedelta(0):
# Packet from previous day
return createTimestamp(hhmmss, reference+timedelta(hours=-12))
else:
# Packet from the next day
return createTimestamp(hhmmss, reference+timedelta(hours=+12))
We could add the case 6h < delta < 12h
and drop these packets which were more than 6h delayed, but I think it's not necessary.
Wont work for delayed reference time...
Sorry... I was wrong. Works!
(venv) KonstantinsiMac:ogn konstantin$ python manage.py gateway.run Start ogn gateway 2016-01-12 23:28:27,778 - INFO - ogn.gateway.client - Connect to OGN as anon-dev with filter 'full-feed' 2016-01-12 23:29:26,994 - ERRO - ogn.gateway.client - Drop packet, 3742s from past. 2016-01-12 23:32:29,178 - INFO - ogn.gateway.client - Send keepalive 2016-01-12 23:34:26,954 - ERRO - ogn.gateway.client - Drop packet, 3742s from past. 2016-01-12 23:36:29,291 - INFO - ogn.gateway.client - Send keepalive 2016-01-12 23:39:26,960 - ERRO - ogn.gateway.client - Drop packet, 3742s from past. 2016-01-12 23:40:29,385 - INFO - ogn.gateway.client - Send keepalive 2016-01-12 23:44:27,097 - ERRO - ogn.gateway.client - Drop packet, 3742s from past. 2016-01-12 23:44:29,808 - INFO - ogn.gateway.client - Send keepalive 2016-01-12 23:48:31,223 - INFO - ogn.gateway.client - Send keepalive 2016-01-12 23:49:27,131 - ERRO - ogn.gateway.client - Drop packet, 3742s from past. 2016-01-12 23:52:31,353 - INFO - ogn.gateway.client - Send keepalive 2016-01-12 23:54:27,091 - ERRO - ogn.gateway.client - Drop packet, 3742s from past. 2016-01-12 23:56:33,227 - INFO - ogn.gateway.client - Send keepalive 2016-01-12 23:59:26,854 - ERRO - ogn.gateway.client - Drop packet, 3742s from past. 2016-01-13 00:00:33,267 - INFO - ogn.gateway.client - Send keepalive