Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packets with bad timestamps are with no exception 3742s back. #31

Closed
Meisterschueler opened this issue Jan 12, 2016 · 7 comments
Closed
Assignees
Labels

Comments

@Meisterschueler
Copy link
Collaborator

(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

@kerel-fs
Copy link
Collaborator

The interval is 5 minutes, so I would guess it's a receiver beacon with a bad timestamp.

@kerel-fs
Copy link
Collaborator

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).

@snip
Copy link

snip commented Jan 13, 2016

It is possible that a receiver send very old data when there is internet access issue. We already seen 6 or more hours late.

@Meisterschueler
Copy link
Collaborator Author

Should we change the checker, so it fails only if packets are delayed > 12 hours?

@kerel-fs
Copy link
Collaborator

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.

@Meisterschueler Meisterschueler self-assigned this Feb 20, 2016
@Meisterschueler
Copy link
Collaborator Author

Wont work for delayed reference time...

@Meisterschueler
Copy link
Collaborator Author

Sorry... I was wrong. Works!

Meisterschueler added a commit that referenced this issue Jun 9, 2019
…inary-2.8.2

Bump psycopg2-binary from 2.8.1 to 2.8.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants