From 5e615b5d59779c02871f526eb1a4621af117ac5d Mon Sep 17 00:00:00 2001
From: XANTRONIX Industrial <xan@xantronix.com>
Date: Tue, 25 Feb 2025 21:37:58 -0500
Subject: [PATCH] Adjust sounding queries

---
 lib/xmet/sounding.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/xmet/sounding.py b/lib/xmet/sounding.py
index 9551cd2..4603779 100644
--- a/lib/xmet/sounding.py
+++ b/lib/xmet/sounding.py
@@ -131,9 +131,9 @@ class Sounding(DatabaseTable):
                 xmet_sounding
             where
                 station = :station
-                and timestamp_released <= :timestamp
+                and timestamp_observed <= :timestamp
             order by
-                timestamp_released desc
+                timestamp_observed desc
             limit 1
         """
 
@@ -167,10 +167,10 @@ class Sounding(DatabaseTable):
             from
                 xmet_sounding
             where
-                timestamp_released <= :timestamp
+                timestamp_observed <= :timestamp
             order by
                 distance asc,
-                timestamp_released desc
+                timestamp_observed desc
             limit 1
         """.format(crs=COORD_SYSTEM)