While working on 3D cockpit instruments I keep hitting into issues with
internal floating point representation and the <textranslate><step> tag.

The <step> tag effectively truncates the property, 29.919999999999
becomes 29.91, so a (3D) readout reads off one number.  The electronics
technician in me says, "but digital readouts are always +/- the last
digit."  But the craftsman in me wants the readout to read correctly.

The tag I expected to use to fix this,  <offset>, is applied after the
<step> tag and therefore has no effect.

I am proposing an new tag, <bias>, that will act like <offset> but be
applied before <step> and <scroll>

Example:
 <animation>
   <type>textranslate</type>
   <object-name>digit5</object-name>
   <property>autopilot/KAP140/settings/baro-setting-inhg</property>
   <factor>10</factor>
   <step>0.01</step>
   <bias>0.005</bias>
   <axis>
     <x>1</x>
     <y>0</y>
     <z>0</z>
   </axis>
 </animation>

I've hardcoded this into simgear and it works.  If no one objects or has
a better idea I will try to figure out how to add this tag.

Thanks,

Ron





-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to