Martin Spott writes:
> The prototype is in Perl, aside from Pascal (o.k., and Basic) this is the
> only programming language I'm capable of writing a whole program from
> scratch ....  This is one main reason why I prefer to having a bit scheme I
> can stick to - whatever language I'm writing in. The other reason is that
> I'd like to 'know' (TM) what I'm doing here  :-)

If you are doing perl, then look at the pack() and unpack() perl
functions.  In this case you might want to avoid converting to network
byte order unless you are a better perl hacker than I am.  I could
never reliably swap the bytes back ... probably some sort of binary
vs. ascii interpretation which I wasn't able to resolve correctly.

Assuming you can read the data packet with something like:

    $handle->recv($msg, 32768);

Then you can do something like:

    @s = unpack("iiddfffffffiffffiiffifff", $msg);

... to extract the message into a perl array i = int, d = double, f =
float, etc.

Regards,

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    curt 'at' me.umn.edu             curt 'at' flightgear.org
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to