The scenario is like that:
- FGFS sends bytes over the serial link, one after another according to your custom protocol definition;
- Arduino receives them one after another, it doesn't know if they represent floats, strings or whatever, they're plain bytes.
Arduino has to parse the incoming bytes, grouping together the ones that arrive between each variable/line separator and using those variable values according to what you intended Arduino to do with them.
It doesn't matter if FGFS sends the throttle value as a float/string or whatever; over the serial line (as it arrives to Arduino) it's just a plain sequence of bytes.
You have to code Arduino so that it reassembles the bytes together according to what it's expecting on the line (if I remember well, the variables are sent as Little Endian so pay attention to how you reassemble them together).
As a side note to that, I have a request for the more experienced Serial Programmers out there. I am starting coding a testbed on Windows, it's going to talk to Flightgear over a serial line. I'm going to use Code::Blocks/GCC.
Which Serial library would you suggest?
I'm not going to write my own! And I don't seem to find a standard (in the sense of widely accepted and used) Serial C++ Class on Windows. I'd prefer to use GNU/GPL stuff.