The LoRa Developer Forum is now in read-only mode and new content will not be added.
Semtech, in its commitment to enhance user experience and streamline content, has successfully integrated the LoRa Developer Portal content into Semtech.com. As a result of this consolidation effort, the LoRa® Developer Portal Forum will be discontinued on May 1st. After this date, you will be automatically redirected to Semtech.com.
For any technical support related to LoRa, please feel free to reach out to our experts here. If you have sales inquiries, please contact us here.

FORUM

SX1280 Ranging Demo

Hello,

I download a 1280 ranging demo. I the code, valLsb value is read from the RangingResult register, and then the distance is calculated like this,

val = ( double )SX1280complement2( valLsb, 24 ) / ( double )SX1280GetLoRaBandwidth( ) * 36621.09375;

this is not the same as is in the 1280 datasheet.

Does anyone know the differences? What does 36621.09375 stand for?

Thanks a lot!

Sun Dayang

Hello Sun,

You can find the corresponding equation in the datasheet SX1280/SX1281 Rev 3.2 in Table 14-63: Ranging Result Type Selection on page 139. You can find the datasheet on the product page.

The 36621.09375 comes from the 150/(2^12) factor. There is a 10^6 factor due to the fact that in the datasheet the bandwidth is expressed in MHz, but in the driver it is expressed in Hz.

I hope it helps, if it is still not clear please tell me.

Oh! I got it! Thanks very much!