lora-rs / lora-rs

LoRa and LoRaWAN crates for End Devices
MIT License
259 stars 56 forks source link

Add functions to calculate air time for packets #13

Closed ivajloip closed 1 year ago

ivajloip commented 4 years ago

It could be useful for user of the library to have an easy way to calculate the time it takes for a packet to be transmitted.

lthiery commented 4 years ago

Just a note about this feature: it would be great to at least have a version that is implemented for devices that is a look-up table rather than requiring float operations. Being able to compile a device-stack without float operations can be a major space savings depending on the chipset.

As LoRaWAN packets cannot be larger than 255 bytes, this makes it quite feasible. In addition, what makes it relatively less expensive is that due to do the coding-rate, a range of bytes for each SF/BW combo has the same TOA. For example, for SF10BW125, 15-19 byte Phy payloads all take 330 ms on air.

lthiery commented 1 year ago

Handle by #145