Hi

   I need to know if the inputs coming from FG, while using a generic
protocol having binary mode set to true, are coming in as integers that need
to be converted to floating point or is FG actually sending in a floating
point word, a byte at a time?  So my code to receive FG data looks something
like this....


for ( int i = 0; i <= 3; i++ ) { dummy_var = (dummy_var << 8) |
rs232_uart1; }



  return ( (float) dummy_var);

What I am wondering is, is the " return ( (float) dummy_var); " cast to a
float necessary, or is the number already in floating point format, if so
then I need to instruct my hardware to retrieve a full word at a time.  I've
included the xml file just in case you guys have any questions about what
data I am asking FG to transmit.
<?xml version="1.0"?> 
<PropertyList>
<generic>

   <input>
	<line_separator>\n</line_separator>	
	<var_separator>,</var_separator>

	<chunk>
         <name>Throttle (rad)</name>
	   <type>integer</type>
         <node>/controls/engines/engine[0]/throttle</node>  
        </chunk>

	<chunk>
         <name>Aileron (rad)</name>
	   <type>float</type>
         <node>/controls/flight/aileron</node>  
        </chunk>

	<chunk>
         <name>Elevator (rad)</name>
	   <type>float</type>
         <node>/controls/flight/elevator</node> 
        </chunk>

	<chunk>
         <name>rudder (rad)</name>
	   <type>float</type>
         <node>/controls/flight/rudder</node> 
        </chunk>

	<chunk>
         <name>Gears </name>
	   <type>float</type>
         <node>/controls/gear/gear-down</node>  
        </chunk>

	<chunk>
         <name>Steering </name>
	   <type>float</type>
         <node>/controls/gear/steering</node>  
        </chunk>

   </input>

</generic>
</PropertyList>
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to