Find observed timestamp of BUFR sounding

This commit is contained in:
XANTRONIX 2025-04-13 13:11:41 -04:00
parent 322c7fa6bb
commit 6e13729a8c

View file

@ -1,3 +1,5 @@
import datetime
from typing import Self from typing import Self
from awips.dataaccess import DataAccessLayer from awips.dataaccess import DataAccessLayer
@ -52,6 +54,12 @@ class BUFRSounding(Sounding):
sounding = BUFRSounding() sounding = BUFRSounding()
dt = response[0].getDataTime()
epoch = dt.getRefTime().time / 1000.0
sounding.timestamp_observed = datetime.datetime.fromtimestamp(epoch,
datetime.UTC)
for item in response: for item in response:
params = item.getParameters() params = item.getParameters()