I’m having an issue with decoding longitude using the RakWireless’s github payload decoder for The Things Network at [https://github.com/RAKWireless/RUI_LoRa_node_payload_decoder/blob/master/RUISensorDataDecoder_for_TTN.js]. I discovered the lat/lon decoding works fine for positive values but fails when a value is negative. For example the longitude of FB024E27 shows up as 4211232295 but the “Decimal from signed 2’s complement” using the hex to decimal converter (https://www.rapidtables.com/convert/number/hex-to-decimal.html?x=FF) is correct with -83735001. Anyway for someone at RAK to update the TTN decoder for negative lat/lons?
Thank you for your question, and we will deal with it as soon as possible.
Thanks! BTW I increased the precision which is why my example has two extra bytes. The issue is still the same with the default GPS precision.
we have fixed the bug. you can use https://github.com/RAKWireless/RUI_LoRa_node_payload_decoder/blob/master/RUISensorDataDecoder_for_TTN.js for normal.
if you increased the precision, you should use