Adjust sounding queries

This commit is contained in:
XANTRONIX 2025-02-25 21:37:58 -05:00
parent 37c5b1f77a
commit 5e615b5d59

View file

@ -131,9 +131,9 @@ class Sounding(DatabaseTable):
xmet_sounding xmet_sounding
where where
station = :station station = :station
and timestamp_released <= :timestamp and timestamp_observed <= :timestamp
order by order by
timestamp_released desc timestamp_observed desc
limit 1 limit 1
""" """
@ -167,10 +167,10 @@ class Sounding(DatabaseTable):
from from
xmet_sounding xmet_sounding
where where
timestamp_released <= :timestamp timestamp_observed <= :timestamp
order by order by
distance asc, distance asc,
timestamp_released desc timestamp_observed desc
limit 1 limit 1
""".format(crs=COORD_SYSTEM) """.format(crs=COORD_SYSTEM)