RadioLib icon indicating copy to clipboard operation
RadioLib copied to clipboard

LoRa Airtime Calculation: getTimeOnAir Vs LoRaTools Air time calculator

Open Mostafa-ashraf19 opened this issue 1 year ago • 1 comments

Describe the bug I think there is an error in calculations of getTimeOnAir method.

Expected behavior I used LoRaTools Air time calculator, with these settings:

  • SF = 7
  • BW = 125
  • CR = 3 -> 4/7
  • Payload = 127 bytes
  • Preamble length = 8 symbols I got Time on air from LoRaTools Air time calculator = 285.95 Millisecond, but the result coming from getTimeOnAir method is = 914432 Microseconds so 914.432 Millisecond.

Are those calculations from the getTimeOnAir method, right?

Mostafa-ashraf19 avatar Sep 14 '22 12:09 Mostafa-ashraf19

I tried to replicate this, but got the result 286000, i.e. 286 ms

  int state = radio.begin(434, 125, 7, 7);
  Serial.println(radio.getTimeOnAir(127));

Please share your code and information about your platform.

jgromes avatar Sep 15 '22 15:09 jgromes

Closed due to inactivity.

jgromes avatar Oct 01 '22 06:10 jgromes