Fix fractional part of gwTime in case of uplink received via LoRa Basics Station #234
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Whenever an uplink is received via a LoRa Basics Station gateway which doesn't gave GPS time available, the fractional second of the receive time is missing in the reported
gwTime
of therx_info
element.Example:
It seems the fractional part of the
rxtime
(as float) is not properly scaled to nanoseconds before it is cast toint64
.chirpstack-gateway-bridge/internal/backend/basicstation/structs/radio_meta_data.go
Lines 80 to 86 in 6897fe5
This PR fixes that.
Note:
rxtime
in Basics Station is the radio receive time (xtime
) converted into UTC. This conversion is susceptible to UTC synchronization issues (e.g. NTP not functioning correctly, or large/asymmetric network latencies in case of LNS-based timesync) and therefore must be used with care by any consumer.