njcodewarrior has asked for the wisdom of the Perl Monks concerning the following question:
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Decoding binary information
by liverpole (Monsignor) on Feb 10, 2007 at 17:28 UTC | |
by njcodewarrior (Pilgrim) on Feb 10, 2007 at 17:49 UTC | |
by bart (Canon) on Feb 10, 2007 at 18:18 UTC | |
by liverpole (Monsignor) on Feb 10, 2007 at 18:11 UTC | |
by njcodewarrior (Pilgrim) on Feb 10, 2007 at 18:25 UTC | |
by liverpole (Monsignor) on Feb 10, 2007 at 18:43 UTC | |
Re: Decoding binary information
by almut (Canon) on Feb 10, 2007 at 19:21 UTC | |
Re: Decoding binary information
by jwkrahn (Abbot) on Feb 10, 2007 at 22:25 UTC |