set gnss timestamp in location

This commit is contained in:
2025-01-28 22:12:48 +01:00
parent 452589d11d
commit 59dc57a618
3 changed files with 16 additions and 0 deletions

View File

@ -51,6 +51,14 @@ router.post(
)?.measurementValue,
};
const gnssTimestamp = {
timestamp: message.uplink_message.decoded_payload?.messages[0].find(
(e) => e.type === "Latitude"
)?.timestamp
};
const wifiScans =
message.uplink_message.decoded_payload?.messages[0]
.find((e) => e.type === "Wi-Fi Scan")
@ -96,8 +104,11 @@ router.post(
? {
latitude: gnnsLocation.latitude,
longitude: gnnsLocation.longitude,
}
: undefined,
gnss_timestamp: new Date(gnssTimestamp.timestamp),
});
};
createDatabaseEntries().then();