As a followup to Thorsten's suggestion I was fooling around with my Arduino, 
making it send a series of fixed lenght float values to FGFS but they got 
"corrupted"!?!? How's that?

Ok, to be more precise, Arduino is sending 7 bytes long strings and a constant 
int value to FGFS that reads it all using this protocol:
  <input>
   <line_separator>newline</line_separator>
   <var_separator>tab</var_separator>
   <chunk>
    <name>CommFreqEncoder</name>
    <type>float</type>
    <node>/instrumentation/comm/frequencies/standby-mhz</node>
   </chunk>
   <chunk>
    <name>arduino_fake_int</name>
    <type>int</type>
    <node>/sim/arduino_fake_integer</node>
   </chunk>
  </input>

Every standby-mhz value Arduino is sending has been previously formatted so 
that it has at most three decimals, something like that: 139.775 or 129.675.
Problem is FGFS shows /instrumentation/comm/frequencies/standby-mhz as 
139.7749939 or 129.6750031. There's something wrong with that and I have no 
idea what it is. It looks like FGFS is receiving 139.775 and stores it as 
139.7749939 (some float rounding up) ... but why? Suggestions?

I even tryed using the  <format>%.3f</format> statement in the CommFreqEncoder 
input chunk, but no success there (I guess <format> works only with output 
formatting).

I have to say that rarely (but that happens too and I want to mention that) the 
standby-mhz is being stored to the correct 3-decimals format.

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!                       
Jetzt informieren: http://www.gmx.net/de/go/freephone

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to