Fix IGRA release timestamp
This commit is contained in:
parent
60bfe3fa09
commit
8787a37773
1 changed files with 7 additions and 0 deletions
|
@ -131,6 +131,13 @@ class IGRAReader():
|
||||||
if match['relmin'] != '99':
|
if match['relmin'] != '99':
|
||||||
timestamp_release += datetime.timedelta(minutes=int(match['relmin']))
|
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
|
lat = int(match['lat']) / 1000.0
|
||||||
lon = int(match['lon']) / 1000.0
|
lon = int(match['lon']) / 1000.0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue