Fix IGRA release timestamp

This commit is contained in:
XANTRONIX 2025-03-02 13:13:31 -05:00
parent 60bfe3fa09
commit 8787a37773

View file

@ -131,6 +131,13 @@ class IGRAReader():
if match['relmin'] != '99':
timestamp_release += datetime.timedelta(minutes=int(match['relmin']))
#
# Ensure the release timestamp always comes before the observation
# (valid) timestamp.
#
if timestamp_release > timestamp:
timestamp_release -= datetime.timedelta(days = 1)
lat = int(match['lat']) / 1000.0
lon = int(match['lon']) / 1000.0