Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add frequency offset to UplinkRXInfo #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions internal/backend/semtechudp/packets/push_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,14 @@ func getUplinkFrame(gatewayID []byte, rxpk RXPK, FakeRxInfoTime bool) (gw.Uplink
Frequency: uint32(rxpk.Freq * 1000000),
},
RxInfo: &gw.UplinkRXInfo{
GatewayId: gatewayID,
Rssi: int32(rxpk.RSSI),
LoraSnr: rxpk.LSNR,
Channel: uint32(rxpk.Chan),
RfChain: uint32(rxpk.RFCh),
Board: uint32(rxpk.Brd),
Context: make([]byte, 4),
GatewayId: gatewayID,
Rssi: int32(rxpk.RSSI),
LoraSnr: rxpk.LSNR,
Channel: uint32(rxpk.Chan),
RfChain: uint32(rxpk.RFCh),
Board: uint32(rxpk.Brd),
Context: make([]byte, 4),
FrequencyOffset: int32(rxpk.FOff),
},
}

Expand Down Expand Up @@ -304,6 +305,7 @@ type RXPK struct {
LSNR float64 `json:"lsnr"` // Lora SNR ratio in dB (signed float, 0.1 dB precision)
Data []byte `json:"data"` // Base64 encoded RF packet payload, padded
RSig []RSig `json:"rsig"` // Received signal information, per antenna (Optional)
FOff int32 `json:"foff"` // The frequency offset of the received signal from the channel it was received on.
}

// RSig contains the received signal information per antenna.
Expand Down