Closed HyeonHo-Jung closed 2 years ago
Hello
I was looking through the ADR code and had a question.
Here is the getMaxSNR function part in the code of path "chirpstack-network-server/internal/adr/default.go"
I was able to check the contents by putting the fmt.Println(m.MaxSNR) function.
func (h *DefaultHandler) getMaxSNR(req adr.HandleRequest) float32 { var snrM float32 = -999 for _, m := range req.UplinkHistory {
fmt.Println(m.MaxSNR) if m.MaxSNR > snrM { snrM = m.MaxSNR } } return snrM
}
Here, I found that UplinkHistory is initialized whenever SF changes.
Is this intentional? What should I change so that UplinkHistory won't initialize even if SF changes?
A SF change invalidates the uplink history because it affects the SNR. The ADR algorithm should only consider the SNR values that were reported using the current SF / data-rate.
Hello
I was looking through the ADR code and had a question.
Here is the getMaxSNR function part in the code of path "chirpstack-network-server/internal/adr/default.go"
I was able to check the contents by putting the fmt.Println(m.MaxSNR) function.
func (h *DefaultHandler) getMaxSNR(req adr.HandleRequest) float32 { var snrM float32 = -999 for _, m := range req.UplinkHistory {
}
Here, I found that UplinkHistory is initialized whenever SF changes.
Is this intentional? What should I change so that UplinkHistory won't initialize even if SF changes?