[throttle precision]
* Nick Warne -- Monday 02 April 2007:
> Surely 1.5e -5 is way over the top?

Depending on the js quality, joysticks can return different 
number ranges. If I turn off the "cooked" joystick mode in
Linux for my 6 axes Saitek Cyborg-Gold-3D-USB:

  $ jscal -s 6,0,0,0,0,0,0,0,0,0,0,0,0 /dev/input/js0

then I get pretty poor results:

  $ jstest /dev/input/js0
  Axes:  [...]  3:   168 [...]
  [...]
  Axes:  [...]  3:   12 [...]

Only a range of 12..168. Maybe I could get a few notches out
of it by recalibrating, but that's it. As every joystick can
return different values, depending on brand, type, age, etc.,
it's the kernel's job to normalize that into a "standardized"
range. After calibrating it maps the 12..168 to -32767..32767.

And because that's still not very usable for apps like fgfs,
plib normalizes that again to -1.0 .. 1.0, which is most useful
to scale other values (such as throttle input to the FDM).
By applying factors and offsets, turning the integer range
into a floating point number range creates the illusion of
high precision. But the resolution hasn't become any better.

m.

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