Updated version.
This commit is contained in:
parent
a9ab25ddd1
commit
5121057dea
1 changed files with 48 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
Users Guide to Joystick Usage Under FlightGear Flight Simulator
|
||||
First Draft
|
||||
version 0.2 9/23/2000
|
||||
Author John Check <j4strngs@rockfish.net>
|
||||
|
||||
This document is written with versions of FlightGear 0.7.5 and greater
|
||||
|
@ -9,6 +9,7 @@ nature of FGFS should ensure the information presented is useful on other
|
|||
platforms. I'd like to say thanks to all the developers who make FGFS happen
|
||||
and forgive me for not giving credit with regard to the property
|
||||
manager and js_demo. Corrections and additions are encouraged.
|
||||
The most current version can be found at http://rockfish.net/shell/aboutjoy.txt
|
||||
|
||||
Some History:
|
||||
Earlier versions of FGFS had assignments of joystick axis/buttons
|
||||
|
@ -104,7 +105,7 @@ I preferred. I set this value to -1.0 and everything was groovy.
|
|||
|
||||
Also a float. Used to maximize a controls use of it's axis, as in the case of a
|
||||
throttle where zero would be a minimum and not a center point like in the case
|
||||
of a rudder. Typical value -1.0 (Am I close? Anybody?)
|
||||
of a rudder. Typical value -1.0.
|
||||
|
||||
|
||||
Button properties
|
||||
|
@ -129,7 +130,7 @@ elevator trim and -0.34 / 0.34 for flaps
|
|||
In this case repeatable means when the button is held down the value continues
|
||||
to increment. repeatable is a true / false value. The default for brakes is
|
||||
false. This is appropriate since by default brakes are a switch that are full
|
||||
on (right?) Elevator trim on the other hand defaults to true. Holding down the
|
||||
on. Elevator trim on the other hand defaults to true. Holding down the
|
||||
button for elevator trim will cause a continuous adjustment until the button
|
||||
is released. Being a fine adjustment this is appropriate behaviour. Flaps
|
||||
on the otherhand default to false. Clicking the flaps button will cause the
|
||||
|
@ -202,5 +203,42 @@ In my case I had to make entries to put the throttle on axis2.
|
|||
--prop:/input/js0/button6/step=0.34
|
||||
--prop:/input/js0/button6/repeatable=false
|
||||
|
||||
Determining approriate values for axes:
|
||||
|
||||
FlightGear uses the PLIB library to handle the joystick input.
|
||||
PLIB applies the values for deadband then hands the result over to FGFS,
|
||||
where offset and factor are applied, the result is passed to the FG control
|
||||
property.
|
||||
|
||||
It's important to understand how the dead-band, offset and factor properties
|
||||
work together for axes in order to determine apropriate values.
|
||||
|
||||
The full order of precedence for axis properties is
|
||||
|
||||
1. The raw PLIB axis value ...
|
||||
2. is adjusted to dead-band, then passed to FGFS, which ...
|
||||
3. applies the offset, then the result...
|
||||
4. is multiplied by factor, which ...
|
||||
5. is assigned to the FlightGear control property.
|
||||
|
||||
Put another way....
|
||||
PLIB lightly_toasted_value = ( raw_value > dead-band )
|
||||
FGFS cooked_value = ( lightly_toasted_value + offset) * factor
|
||||
|
||||
Well, kind of. The dead-band value is applied +/- 0. Which is to say
|
||||
when we assign it a value of 0.1 the effective value is -0.1 to 0.1
|
||||
If the raw value is less than the dead-band then the raw_value is 0.
|
||||
|
||||
Here's a visual aid.
|
||||
|
||||
-1 0 1
|
||||
.......................
|
||||
-1 | | 1
|
||||
^
|
||||
deadband
|
||||
|
||||
This diagram represents a dead-band value of 0.1. Let's say we
|
||||
have an el cheapo joystick with noisy pots. The noise level is +/-0.09.
|
||||
With the raw signal our control would constantly be moving slightly.
|
||||
A deadband value of 0.1 acts as a filter suppressing the noise.
|
||||
|
||||
|
|
Loading…
Reference in a new issue