The period calculation in index.js/calcFrequency does not account for missing packets.
A ruuvi at distance or in a radio isolation area (like a refrigerator ) may miss packets.
Worst case is receiving 1 packet, missing many, then receiving 2 consequential packets causes the calculation to be the average.
A better algorithm would be min( last calculation , this calculation ) but that's not really good either.
Calculating the frequency requires the time of 2 consequential packets.
The period calculation in index.js/calcFrequency does not account for missing packets.
A ruuvi at distance or in a radio isolation area (like a refrigerator ) may miss packets.
Worst case is receiving 1 packet, missing many, then receiving 2 consequential packets causes the calculation to be the average.
A better algorithm would be min( last calculation , this calculation ) but that's not really good either.
Calculating the frequency requires the time of 2 consequential packets.