I'm writing a Python program to decode Base64(Raw Data) output from my sensors to find it's latitude and longitude.
After checking the documents (attached below) that came with the sensor to decode the values, I'm still unsure on how to achieve it. I found a partial solution to convert it below but not sure how to achieve the final output.
So for example, if the Hexa value is B4 39 F5 42
, my latitude output should be 1.3768
.
import binascii
import struct
data = 'F9 7B 9C 45'
fdata = struct.unpack('<f', binascii.unhexlify(data.replace(' ', '')))[0]
print(fdata)
output:
5007.49658203125