On 04/02/2007 11:17 AM, Nick Warne wrote:

> By my reckoning, if a throttle is OFF, then it is OFF, and not 0.000015 ON. 

I beseech you to change your reckoning.

1) As previously mentioned, real aircraft don't work that way.

In real aircraft, this is even more noticeable with respect to the
full-on position than w.r.t the full-off position.  Try shoving the
throttle all the way forward in a typical GA aircraft sometime,
and then look at the position of the control.  It does *not* go all
the way forward to the firewall.  There is, by design, some "relief"
between the max position and the fully-forward position.  (The same
is true of the mixture control and a wide class of other controls.)
Aircraft designers have arranged that proper operation of the control
does not depend on the control cable length being "equal" to the ideal
length.

Almost any design that requires one thing to be "equal" to another
is an unsound design, and should be *instantly* recognized as such.

I cannot imagine any good reason for checking for "throttle 0.000000"
*or* "throttle 0.000015 ON", either one.  If you have a good reason,
please explain.

In contrast, as Ron pointed out, a real C182rg has a real microswitch
that tests for throttle less than 30% open ... and the FG C182rg
faithfully models this.  No test for equality.  No problem.

2) More generally, as a matter of standard good practice, testing
real-world data for floating-point equality is almost always unsound,
and should be *instantly* recognized as such.  Floating point has
been around for a long time, and people have learned how to test
for equality ... which usually means /avoiding/ testing real-world
data for floating-point equality.

   http://www.google.com/search?q=floating-point+equality

-------------------------------------------------------------------------
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