mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* new packet score function
This commit is contained in:
parent
7da0a5f7ec
commit
a93412216a
6 changed files with 28 additions and 21 deletions
|
|
@ -21,11 +21,6 @@ public:
|
|||
|
||||
float packetScore(float snr, int packet_len) override {
|
||||
int sf = ((CustomLLCC68 *)_radio)->spreadingFactor;
|
||||
const float A = 0.7;
|
||||
const float B = 0.4;
|
||||
|
||||
float ber = exp(-pow(10, (snr / 10)) / (A * pow(10, (snr / 10)) + B * (1 << sf)));
|
||||
|
||||
return pow(1 - ber, packet_len * 8);
|
||||
return packetScoreInt(snr, sf, packet_len);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue