signetlabdei / lorawan

An ns-3 module for simulation of LoRaWAN networks
GNU General Public License v2.0
182 stars 130 forks source link

Closing of receive window calculations missing 4.25 #124

Open JacoTuks opened 2 years ago

JacoTuks commented 2 years ago

Expected Behavior

According to The LoRa Modem Designer's guide, the duration of a preamble is (nPreamble + 4.25)*Tsym but in class-a-end-device-lorawan-mac.cc the +4.25 is omitted.

image

Actual Behavior

Both receive windows are scheduled to close too fast.

Code in question

class-a-end-device-lorawan-mac.cc

  1. m_closeFirstWindow = Simulator::Schedule (Seconds (m_receiveWindowDurationInSymbols*tSym), &ClassAEndDeviceLorawanMac::CloseFirstReceiveWindow, this); //m_receiveWindowDuration

  2. m_closeSecondWindow = Simulator::Schedule (Seconds (m_receiveWindowDurationInSymbols*tSym), &ClassAEndDeviceLorawanMac::CloseSecondReceiveWindow, this);

Specifications

Please let me know if I have missed something? I will happily create a pull request if you agree that this is an issue.