Author Topic: How do you convert GPS coordinates back to float during the Sigfox callback?  (Read 287 times)

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
In the sample code the GPS coordinates are encoded into msg using the AddFloat() function like this...

         msg.AddFloat(Lat)
         msg.AddFloat(Lon)

Upon receiving the data during the SigFox callback, how would I convert this back to a float value? Say like in php or javascript.

anyone have any suggestions?

Share on Facebook Share on Twitter


Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
You extract the bytes as two IEEE 32 bit floats. There are quite a number of IEEE float32 extractors out there in google land. it's not mc code, 'cause you are extracting it in your environment at the other end of the sigfox link (and I don't know what that is).

I did help someone else with the same problem here in the forums somewhere, if you search carefully you can probably find it, should explain everything.