set gnss timestamp in location
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user