On Mon, 2007-04-02 at 14:43 +0100, Nick Warne wrote:
> Hi Ron,
> 
> On Monday 02 April 2007 14:19:17 Ron Jensen wrote:
> 
> > > So, how accurate does the throttle need to be?  Surely not 1.5e -5?
> > >
> > > Nick
> >
> > You probably should change the condition to not depend on a perfectly
> > rigged joystick.  Testing for equal is not a great idea any time you are
> > using floating point math...  This is the gear warning out of the
> > c182rg:
> 
> > As you can see, it only needs the throttle to be less than 30%.  Try
> > something like this for the spitfire:
> 
> >             <less-than>
> >               <property>controls/engines/engine/throttle</property>
> >               <value>0.2</value>
> >             </less-than>
> 
> Yes, as discussed in IRC today, this solution came up, but why on earth are 
> the throttle values measured with so much accuracy?  Surely 1.5e -5 is way 
> over the top?
> 
> Nick


In computer science integer land you can use 8-bits (-127 to 128 or 0 to
255 ) or 16-bits (-32767 to 32768 or 0 to 65536) there isn't any in
between solution and 8-bit isn't accurate enough, so all the axises are
16-bit.  1.5e -5 equals 1/65536.

The question is, why do you expect the throttle axis to exactly hit its
low stop?  I don't have the reference handy for the c182rg, but the 30%
setting we used is based on real numbers for the plane.

Ron



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to