On Tue, 16 Aug 2011, Derrick Washington wrote:

> One last thing is there a way to ensure that FG is sending out its outputs
> in floating point format, because I'm not sure it is, I have the generic
> file setup for binary mode, but I'm not convinced that FG is transmitting
> data as floats, I think it might actually be transmitting data as integers
> or something else.  I make this observation because the data I did get cause
> an action in my algorithm which didn't make sense.  The auto pilot switched
> to flight mode while still on the ground, it wasn't susposed to do that
> until it reached 1800 feet, so thats why I'am assuming that the output it
> received from FG as the altitude couldn't have been in floating point format
> it must have been an integer or maybe a double, or something but whatever it
> was it wasn't a float.

The good way to verify if the transmission of float values work is to 
print the value in your receiver and compare that to the value of the 
property you transmit in FG.
Btw. if your generic protocol is set to use network byte order 
(endianness MSB) you have to take that into account when unpacking the 
float value.

> I looked at the perferences file in the FG directory, and I changed all the
> double types to float, should that do it?  I loaded it under the
> configuration option in the advanced options menu, but when I started FG
> back up and hit the "/" key and looked at the outputs the values still said
> double.

No, don't do that. It should have no influence on this issue. The sender 
code converts the property value to float before encoding it.

Cheers,

Anders
-- 
---------------------------------------------------------------------------
Anders Gidenstam
WWW: http://www.gidenstam.org/FlightGear/

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to