I subscribe to a service that allows me to login ( via Net::Telnet ) and download a small message containing the gps position of a number of platforms we have deployed in oceans around the world. The gps positions are triangulated using the ARGOS satellite constellation.
In addition to this ASCII encoded message, each platform transmits a 32 byte message from the platform itself, ( containing the position as measured by the platform's gps unit, status messages, etc ) are encoded according to a know specification. Here's an example:
05 F9 AD F4 EC 9E 00 05 05 F9 E2 F4 EC A6 02 5B 05 FF 28 F4 AF 84 FF FF 0B 5C 00 06 06 FD 74 2F
The first piece of the message contains the gps position of the platform. The latitude is encoded as a 3 byte signed integer:
05F9ADthe longitude as a 3 byte signed integer:
F4EC9Eand the relative number of seconds since the measurement was made as a 2 byte unsigned integer:
0005At first glance, I figured pack/unpack was the way to go. I read over pfaut's pack/unpack tutorial, but I still can't seem to get my hands around how to decode this message.
Any help would be greatly appreciated.
njcodewarrior
In reply to Decoding binary information by njcodewarrior
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |