diff --git a/Aircraft/Generic/flightrecorder/components/controls.xml b/Aircraft/Generic/flightrecorder/components/controls.xml new file mode 100644 index 000000000..8b2d99b41 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/controls.xml @@ -0,0 +1,73 @@ + + + + + + + + + float + /controls/flight/aileron + + + float + /controls/flight/elevator + + + float + /controls/flight/rudder + + + float + /controls/flight/aileron-trim + + + float + /controls/flight/elevator-trim + + + float + /controls/flight/rudder-trim + + + float + /controls/flight/flaps + + + float + /controls/flight/speedbrake + + + float + /controls/flight/spoilers + + + float + /controls/gear/brake-left + + + float + /controls/gear/brake-right + + + float + /controls/gear/copilot-brake-left + + + float + /controls/gear/copilot-brake-right + + + float + /controls/gear/brake-parking + + + bool + /controls/gear/gear-down + + + bool + /controls/switches/master-avionics + + + diff --git a/Aircraft/Generic/flightrecorder/components/engine-jet.xml b/Aircraft/Generic/flightrecorder/components/engine-jet.xml new file mode 100644 index 000000000..09611bec9 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/engine-jet.xml @@ -0,0 +1,72 @@ + + + + + + + + + float + /systems/electrical/outputs/fuel-pump[%i] + + + + float + /controls/engines/engine[%i]/starter + + + + float + /controls/engines/engine[%i]/throttle + + + + float + /controls/engines/engine[%i]/condition + + + + bool + /engines/engine[%i]/running + + + + bool + /engines/engine[%i]/cranking + + + + float + /engines/engine[%i]/rpm + + + + float + /engines/engine[%i]/n1 + + + + float + /engines/engine[%i]/n2 + + + + float/engines/engine[%i]/thrust-lbs + + + + float + /engines/engine[%i]/egt-degf + + + + float + /engines/engine[%i]/epr + + + + float + /engines/engine[%i]/oil-pressure-psi + + + diff --git a/Aircraft/Generic/flightrecorder/components/engine-piston-prop.xml b/Aircraft/Generic/flightrecorder/components/engine-piston-prop.xml new file mode 100644 index 000000000..ef4ea2ec5 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/engine-piston-prop.xml @@ -0,0 +1,108 @@ + + + + + + + + + float + /systems/electrical/outputs/fuel-pump[%i] + + + + float + /controls/engines/engine[%i]/starter + + + + bool + /controls/engines/engine[%i]/master-bat + + + + bool + /controls/engines/engine[%i]/master-alt + + + + float + /controls/engines/engine[%i]/throttle + + + + float + /controls/engines/engine[%i]/mixture + + + + float + /controls/engines/engine[%i]/propeller-pitch + + + + float + /controls/engines/engine[%i]/condition + + + + float + /controls/engines/engine[%i]/magnetos + + + + bool + /engines/engine[%i]/running + + + + bool + /engines/engine[%i]/cranking + + + + float + /engines/engine[%i]/rpm + + + + float + /engines/engine[%i]/fuel-flow-gph + + + + float + /engines/engine[%i]/fuel-px-psi + + + + float + /engines/engine[%i]/egt-degf + + + + float + /engines/engine[%i]/cht-degf + + + + float + /engines/engine[%i]/mp-osi + + + + float + /engines/engine[%i]/tit + + + + float + /engines/engine[%i]/oil-temperature-degf + + + + float + /engines/engine[%i]/oil-pressure-psi + + + diff --git a/Aircraft/Generic/flightrecorder/components/engine-turboprop.xml b/Aircraft/Generic/flightrecorder/components/engine-turboprop.xml new file mode 100644 index 000000000..8e99246b8 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/engine-turboprop.xml @@ -0,0 +1,122 @@ + + + + + + + + + float + /systems/electrical/outputs/fuel-pump[%i] + + + + float + /controls/engines/engine[%i]/starter + + + + bool + /controls/engines/engine[%i]/master-bat + + + + bool + /controls/engines/engine[%i]/master-alt + + + + float + /controls/engines/engine[%i]/throttle + + + + float + /controls/engines/engine[%i]/mixture + + + + float + /controls/engines/engine[%i]/propeller-pitch + + + + float + /controls/engines/engine[%i]/condition + + + + bool + /engines/engine[%i]/running + + + + bool + /engines/engine[%i]/cranking + + + + float + /engines/engine[%i]/rpm + + + + float + /engines/engine[%i]/fuel-flow-gph + + + + float + /engines/engine[%i]/fuel-px-psi + + + + float + /engines/engine[%i]/egt-degf + + + + float + /engines/engine[%i]/cht-degf + + + + float + /engines/engine[%i]/mp-osi + + + + float + /engines/engine[%i]/tit + + + + float + /engines/engine[%i]/oil-temperature-degf + + + + float + /engines/engine[%i]/oil-pressure-psi + + + + float + /engines/engine[%i]/n1 + + + + float + /engines/engine[%i]/n2 + + + + float/engines/engine[%i]/thrust-lbs + + + + float + /engines/engine[%i]/epr + + + diff --git a/Aircraft/Generic/flightrecorder/components/environment.xml b/Aircraft/Generic/flightrecorder/components/environment.xml new file mode 100644 index 000000000..eab533358 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/environment.xml @@ -0,0 +1,41 @@ + + + + + + + + + float + /environment/wind-speed-kt + + + float + /environment/wind-from-heading-deg + + + float + /environment/turbulence/magnitude-norm + + + float + /environment/temperature-degc + + + float + /environment/pressure-sea-level-inhg + + + float + /environment/magnetic-variation-deg + + + bool + /hazards/icing/wing + + + float + /environment/visibility-m + + + diff --git a/Aircraft/Generic/flightrecorder/components/faults-engines.xml b/Aircraft/Generic/flightrecorder/components/faults-engines.xml new file mode 100644 index 000000000..af41fd223 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/faults-engines.xml @@ -0,0 +1,42 @@ + + + + + + + + + bool + /controls/flight/flaps-serviceable + + + bool + /controls/engines/engine[%i]/faults/serviceable + + + + bool + /controls/engines/engine[%i]/faults/left-magneto-serviceable + + + + bool + /controls/engines/engine[%i]/faults/right-magneto-serviceable + + + + bool + /controls/engines/engine[%i]/faults/spark-plugs-serviceable + + + + bool + /controls/engines/engine[%i]/faults/oil-pressure-status + + + + bool + /controls/engines/engine[%i]/faults/fuel-pump-serviceable + + + diff --git a/Aircraft/Generic/flightrecorder/components/gear-fixed.xml b/Aircraft/Generic/flightrecorder/components/gear-fixed.xml new file mode 100644 index 000000000..a005a586c --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/gear-fixed.xml @@ -0,0 +1,28 @@ + + + + + + + + + float + /gear/gear[%i]/steering-norm + + + + float + /gear/gear[%i]/compression-norm + + + + bool + /gear/gear[%i]/wow + + + + float + /gear/gear[%i]/rollspeed-ms + + + diff --git a/Aircraft/Generic/flightrecorder/components/gear-retractable.xml b/Aircraft/Generic/flightrecorder/components/gear-retractable.xml new file mode 100644 index 000000000..165fb81dd --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/gear-retractable.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + float + /gear/gear[%i]/position-norm + + diff --git a/Aircraft/Generic/flightrecorder/components/position.xml b/Aircraft/Generic/flightrecorder/components/position.xml new file mode 100644 index 000000000..634143709 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/position.xml @@ -0,0 +1,132 @@ + + + + + + + + + double + angular-deg + /position/longitude-deg + + + + double + angular-deg + /position/latitude-deg + + + + double + /position/altitude-ft + + + double + /position/altitude-agl-ft + + + + float + angular-deg + /orientation/roll-deg + + + float + angular-deg + /orientation/pitch-deg + + + float + angular-deg + /orientation/heading-deg + + + + float + angular-deg + /orientation/alpha-deg + + + float + angular-rad + /orientation/side-slip-rad + + + float + angular-deg + /orientation/beta-deg + + + float + /orientation/roll-rate-degps + + + float + /orientation/pitch-rate-degps + + + float + /orientation/yaw-rate-degps + + + float + /velocities/airspeed-kt + + + float + /velocities/vertical-speed-fps + + + float + /velocities/speed-north-fps + + + float + /velocities/speed-east-fps + + + float + /velocities/speed-down-fps + + + float + /velocities/vBody-fps + + + float + /velocities/uBody-fps + + + float + /velocities/wBody-fps + + + float + /accelerations/pilot/x-accel-fps_sec + + + float + /accelerations/pilot/y-accel-fps_sec + + + float + /accelerations/pilot/z-accel-fps_sec + + + + bool + /sim/alarms/stall-warning + + + + float + /instrumentation/slip-skid-ball/indicated-slip-skid + + + + float + /position/ground-elev-m + + + diff --git a/Aircraft/Generic/flightrecorder/components/rotor.xml b/Aircraft/Generic/flightrecorder/components/rotor.xml new file mode 100644 index 000000000..7496421bd --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/rotor.xml @@ -0,0 +1,41 @@ + + + + + + + + + float + roll-deg + angular-deg + + + float + rpm + + + float + stall + + + float + torque + + + float + yaw-deg + angular-deg + + + float + cone-deg + angular-deg + + + diff --git a/Aircraft/Generic/flightrecorder/components/surfaces.xml b/Aircraft/Generic/flightrecorder/components/surfaces.xml new file mode 100644 index 000000000..92daeec95 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/surfaces.xml @@ -0,0 +1,45 @@ + + + + + + + + + float + /surface-positions/elevator-pos-norm + + + float + /surface-positions/elevator-trim-tab-pos-norm + + + float + /surface-positions/flap-pos-norm + + + float + /surface-positions/left-aileron-pos-norm + + + float + /surface-positions/right-aileron-pos-norm + + + float + /surface-positions/rudder-pos-norm + + + float + /surface-positions/speedbrake-pos-norm + + + float + /surface-positions/spoilers-pos-norm + + + float + /surface-positions/nose-wheel-pos-norm + + + diff --git a/Aircraft/Generic/flightrecorder/components/tanks.xml b/Aircraft/Generic/flightrecorder/components/tanks.xml new file mode 100644 index 000000000..4a423cf2f --- /dev/null +++ b/Aircraft/Generic/flightrecorder/components/tanks.xml @@ -0,0 +1,17 @@ + + + + + + + + + float + /consumables/fuel/tank[%i]/level-gal_us + + + bool + /controls/fuel/tank[%i]/fuel_selector + + + diff --git a/Aircraft/Generic/flightrecorder/generic-glider.xml b/Aircraft/Generic/flightrecorder/generic-glider.xml new file mode 100644 index 000000000..29ca92fbd --- /dev/null +++ b/Aircraft/Generic/flightrecorder/generic-glider.xml @@ -0,0 +1,29 @@ + + + + + + Generic Flight Recorder for Gliders (no engines/no tanks/single non-retractable gear) + + + + + + 1 + + + + + + float + /controls/engines/engine/throttle + + + + diff --git a/Aircraft/Generic/flightrecorder/generic-helicopter.xml b/Aircraft/Generic/flightrecorder/generic-helicopter.xml new file mode 100644 index 000000000..297d7a74a --- /dev/null +++ b/Aircraft/Generic/flightrecorder/generic-helicopter.xml @@ -0,0 +1,39 @@ + + + + + + Generic Flight Recorder for Helicopters + + + + + 2 + + + + + /rotors/main + + + + + /rotors/tail + + + + + + float + /controls/engines/engine/throttle + + + + diff --git a/Aircraft/Generic/flightrecorder/generic-jet.xml b/Aircraft/Generic/flightrecorder/generic-jet.xml new file mode 100644 index 000000000..76c555ab0 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/generic-jet.xml @@ -0,0 +1,29 @@ + + + + + + Generic Flight Recorder for Jets (2 jet engines/4 tanks/3 retractable gear) + + + + + + 2 + + + 2 + + + 4 + + + 3 + + diff --git a/Aircraft/Generic/flightrecorder/generic-piston-propeller-1.xml b/Aircraft/Generic/flightrecorder/generic-piston-propeller-1.xml new file mode 100644 index 000000000..0e228ed6e --- /dev/null +++ b/Aircraft/Generic/flightrecorder/generic-piston-propeller-1.xml @@ -0,0 +1,29 @@ + + + + + + Generic Flight Recorder (1 piston engine/1 propeller/4 tanks/3 fixed gear) + + + + + + 1 + + + 1 + + + 2 + + + 3 + + diff --git a/Aircraft/Generic/flightrecorder/generic-piston-propeller-4.xml b/Aircraft/Generic/flightrecorder/generic-piston-propeller-4.xml new file mode 100644 index 000000000..be7ee7cb6 --- /dev/null +++ b/Aircraft/Generic/flightrecorder/generic-piston-propeller-4.xml @@ -0,0 +1,30 @@ + + + + + + Generic Flight Recorder (4 piston engines/4 propellers/4 tanks/3 retractable gear) + + + + + + 4 + + + 4 + + + 4 + + + 3 + + diff --git a/Aircraft/Generic/flightrecorder/generic-turboprop-2.xml b/Aircraft/Generic/flightrecorder/generic-turboprop-2.xml new file mode 100644 index 000000000..15f20eefd --- /dev/null +++ b/Aircraft/Generic/flightrecorder/generic-turboprop-2.xml @@ -0,0 +1,29 @@ + + + + + + Generic Flight Recorder (2 turboprop engines/2 propellers/4 tanks/3 retractable gear) + + + + + + 2 + + + 2 + + + 4 + + + 3 + + diff --git a/Aircraft/c172p/c172p-set.xml b/Aircraft/c172p/c172p-set.xml index 0b7e7e874..8a5eeb9b9 100644 --- a/Aircraft/c172p/c172p-set.xml +++ b/Aircraft/c172p/c172p-set.xml @@ -108,7 +108,14 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net 0 - + + + 0 + + C172p Flight Recorder + + + diff --git a/Docs/README.flightrecorder b/Docs/README.flightrecorder new file mode 100644 index 000000000..e8a40ebe1 --- /dev/null +++ b/Docs/README.flightrecorder @@ -0,0 +1,292 @@ +FlightGear Flight Recorder Mini-HOWTO + +Thorsten Brehm +Started in August 2011 +Last revised: 2011-09-26 + + +FlightGear provides a customizable flight recorder capable of capturing +any selection of properties described via XML configuration files. +The recorder is currently used for the replay system. + + +Feature Brief +------------- +* Generic recording system, adaptable to any aircraft/data, provided that + data is accessible via the property tree. No hard-coded selections or + assumptions on properties to be recorded. +* Configuration read from XML files or the property tree itself. +* Interpolation method configurable per recorded/replayed signal. +* Adaptable recording resolution per signal. +* Multiple configurations supported. + + +Quick Start: Basic Configuration +-------------------------------- +To configure and adapt the flight recorder, add a "/sim/flight-recorder" +section to your aircraft -set.xml file. + +Example: + + + + + + + 0 + + My Aircraft's Flight Recorder + + + float + /controls/gear/nosegear-steering-cmd-norm + linear + + + + + + + + + +Default type for each signal is "float". Default "interpolation" method +is "linear" (for float/double). Default values may be omitted. See +configuration details below. + + +Generic Configuration Files +--------------------------- +Select one of the default configuration files to specify the basic +properties to be recorded. It's not recommended to specify all +properties to be recorded individually. +The following generic files are provided: + +* /Aircraft/Generic/flightrecorder/generic-piston-propeller-4.xml + Matches propeller aircraft with 4 piston engines, 4 tanks, + 3 retractable gear. + It is the same configuration that was hard-coded for the replay system + up to FlightGear 2.4.0. To provide backward compatibility this + configuration is loaded by default, unless an aircraft provides a + specific flight recorder configuration. + +* /Aircraft/Generic/flightrecorder/generic-piston-propeller-1.xml + Matches propeller aircraft with 1 piston engines, 2 tanks, 3 fixed + gear. + +* /Aircraft/Generic/flightrecorder/generic-turboprop-2.xml + Matches turboprop aircraft with 2 turbines/propellers, 4 tanks, + 3 retractable gear. + +* /Aircraft/Generic/flightrecorder/generic-jet.xml + Matches jet aircraft with 2 jet engines, 4 tanks. + +* /Aircraft/Generic/flightrecorder/generic-glider.xml + Matches gliders (no engines, no tanks, single fixed gear). + +* /Aircraft/Generic/flightrecorder/generic-helicopter.xml + Matches helicopters with main and tail rotor (tested with YASim). + +If none of the generic files matches your aircraft, simply use a +configuration which covers more than you need. Alternatively, copy the +contents of one of these generic files to your aircraft, and adapt as +needed (see below). + +FDM experts are welcome to add more generic configuration files to +/Aircraft/Generic/flightrecorder - such as YASim-/JSBSim-specific +configurations, and configurations for other types of aircraft +(balloons, airships, ...). + + +Generic Components +----------------- +The generic configuration files in turn include a set of generic +components. If you copy the contents of a generic file to your aircraft, +you can adapt the components to your needs. See examples. +It is not recommended to copy the contents of the _component_ files to +an aircraft though (causes too much hassle and dependencies). + +Engine Selection: + * /Aircraft/Generic/flightrecorder/components/engine-jet.xml + Records properties of a single jet engine. + For multiple jet engines, use "count". Example for 4 jets: + + 4 + + + * /Aircraft/Generic/flightrecorder/components/engine-piston.xml + Records properties of a single piston engine and propeller. + For multiple piston engines, use "count" (see "jet" example). + + * /Aircraft/Generic/flightrecorder/components/rotor.xml + Records properties of a single helicopter rotor (tested with YASim). + To use this, provide the base property path to the rotor as "prefix". + Example recording the rotor below "/rotors/main": + + /rotors/main + + +Gear Selection: + * /Aircraft/Generic/flightrecorder/components/gear-fixed.xml + Records properties of a single non-retractable gear. + For multiple fixed gear, use "count" (see "jet" example). + + * /Aircraft/Generic/flightrecorder/components/gear-retractable.xml + Records properties of a single retractable gear. + For multiple retractable gear, use "count" (see "jet" example). + +Tanks: + * /Aircraft/Generic/flightrecorder/components/tanks.xml + Records properties of a single fuel tank. + For multiple fuel tanks, use "count" (see "jet" example). + +Other: + * /Aircraft/Generic/flightrecorder/components/surfaces.xml + Records properties of flight control surfaces. Include this + for aircraft (with wings). Not useful for helicopters, + balloons, ... + + * /Aircraft/Generic/flightrecorder/components/faults-engines.xml + Records fault properties of a single engine. Only include this + if your aircraft supports fault simulation. + For multiple engines, use "count" (see "jet" example). If used, + it should be compined with piston or jet engine. + + * /Aircraft/Generic/flightrecorder/components/environment.xml + Records properties of environment/weather (visibility, + temperature - but _not_ cloud position...). + + * /Aircraft/Generic/flightrecorder/components/position.xml + Records properties of a the aircrafts main position (latitude, + longitude, velocities, ...). + This is the most important component. Always include this. + + * /Aircraft/Generic/flightrecorder/components/controls.xml + Records most important flight controls (rudder, aileron, + elevator, ...). Always include this. + + +Custom Properties +----------------- +When the generic or component files are not be sufficient to record or +replay aircraft-specific effects, you can add custom properties (signals +to be recorded) to the configuration. +Each signal consits of a recording type/resolution (which does _not_ +need to match the actual type in the property tree!), the path to the +property and interpolation type. + +Example recording some additional custom properties: + + + + + + float + /controls/gear/nosegear-steering-cmd-norm + + + double + rotational-deg + /ai/model/carrier/alpha-angle-deg + + + bool + /controls/panel/custom-switch + + + + + + +Signal Configuration +-------------------- +Template: + + bool + angular-deg + /controls/panel/custom-switch + + +* type: The signal's type specifies the recording resolution - not the + type of the original property. The following types are supported: + + - double: 8 byte/sample + - float: 4 byte/sample (default) + - int: 4 byte/sample, integer + - int16: 2 byte/sample, integer + - int8: 1 byte/sample, integer + - bool: 1 bit/sample (yes, 1 bit. 8 bools per byte). + + String type is unsupported (too expensive). + +* interpolation: Specifies how values are interpolated during replay, i.e. + when replay is in slow-motion mode and more frames/second are required + than recorded, or when replaying data from the medium/long term memory. + Supported methods: + - discrete: No interpolation. Default for integer/bool types. + - linear: Standard linear interpolation. Default for float/double. + - angular-rad (or angular): Angular values in radians (0-2pi). + - angular-deg: Angular values in degrees (0-360). + +* property: Path to the property to be recorded. + + +Advanced Configuration +---------------------- +- Multipe recorder configurations for a single aircraft are supported + (multiple "" sections for n=0,1,...). + Active configuration to be used for the replay system is selected via + /sim/flight-recorder/replay-config (= 0,1,...). + This can be useful for specific recorders for specific scenarios, + which should not be used by default. For example, a specific recorder + configuration could be provided which also records the position of + an aircraft carrier, of other AI aircraft, ... + This may also be useful for future use, i.e. to select another flight + recorded configuration for a different purpose, such as for the + multiplayer system. + +- Flight recorder configuration can be adapted during run-time + (configuration is visible in the property browser below + /sim/flight-recorder). However it is necessary to reset (reinit) the + replay subsystem first - which also erases earlier recordings. It is + not possible to mix recordings of different configurations on to a + single "tape". + +- Each configuration should be given a name. Useful for a (future) + selection GUI, when multiple configurations are available. + + +Optimizing Performance +---------------------- +- Recording properties consumes memory and also CPU time. A few + additional properties don't matter much, but avoid execessive numbers. + Reduce the resolution (type) of signals to the minimum necessary to + save space. +- Use "bool" types where possible, they are most efficient. +- Avoid recording with "double" resolution (type "double"). Use "float" + instead - even if the original property in the property tree is a + "double" (almost all of them do). "float" precision is almost always + sufficient for recording/replay purposes, with few exceptions (like + latitude/longitude properties). +- Use int16/int8 for "small" integer values. + + +Recording/Replay Limits +----------------------- +- All properties can be recorded, however, only writable properties can + be replayed. Properties marked as read-only, or tied properties not + implementing the "set" method cannot be replayed. +- Replaying a property overwrites the property's value. However, other + sources may also write to the same property - such as Nasal code, + autopilot rules etc. When multiple sources "fight" over a property's + value then the last update "wins" - resulting in a dependency to an + unknown/random sequence. Hence, during deplay, try to disable other + sources writing to properties which were recorded and should be + replayed. + If the other source cannot be disabled, check if you're recording the + right property. It may be better to record the input properties of the + other source instead (i.e. the inputs processed by the Nasal or + autopilot rule). + +__end__ + diff --git a/Input/Joysticks/ThrustMaster/Warthog/README b/Input/Joysticks/ThrustMaster/Warthog/README index fc0e4d898..a0aa1d4e5 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/README +++ b/Input/Joysticks/ThrustMaster/Warthog/README @@ -33,3 +33,75 @@ axis definition uses the same index as the master file. The n-th uses etc. Nasal blocks are properly executed in the namespace of the master file, so you can access all its functions and variables. + + + + + + +Joystick configuration from within FlightGear under Linux: +-------------------------------------------------------------------------------- +This allows to set backlight brightness and LEDs from within FlightGear +without requiring any config application, by directly writing to the devices +via raw HID support. + + + +(1) Make sure your kernel has hidraw support compiled in: check if there is at + least one file listed with + + $ ls /dev/hidraw* + + or if your kernel .config contains: + + CONFIG_HIDRAW=y + + + +(2) To get a reliable, persistent file name for your Warthog devices, create + a file /etc/udev/rules.d/00-local.rules and add these lines: + + SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}!="?*", IMPORT{program}="input_id %p" + SUBSYSTEM=="hidraw", ENV{ID_SERIAL}!="?*", IMPORT{program}="usb_id --export %p" + SUBSYSTEM=="hidraw", SYMLINK+="input/hidraw/%E{ID_SERIAL}" + SUBSYSTEM=="hidraw", ENV{ID_INPUT_JOYSTICK}!="0", GROUP:="js" + + If you don't have a user group "js" (for joystick hardware access) either + create one or, in the fourth line, use a group instead where all joystick + users are member, e.g. GROUP:="users". Then plug your Warthog devices out + and in again and check if this created two device files under /dev/hid/: + + $ ls -l /dev/input/hidraw/* + lrwxrwxrwx 1 root root 10 Oct 2 14:23 Thrustmaster_Throttle_-_HOTAS_Warthog -> ../hidraw1 + lrwxrwxrwx 1 root root 10 Oct 2 14:23 Thustmaster_Joystick_-_HOTAS_Warthog -> ../hidraw0 + + Also check if the linked-to hidraw devices have proper permissions (rw for "js"): + + $ ls -l /dev/hidraw* + crw-rw---- 1 root js 251, 0 Oct 2 09:11 /dev/hidraw0 + crw-rw---- 1 root js 251, 1 Oct 2 14:23 /dev/hidraw1 + + + +(3) Allow FlightGear to write to the two devices. The best way to do this is + to edit a local copy of the global IOrules. Just copy the global file + to your FG_HOME directory: + + $ mkdir -p ~/.fgfs/Nasal + $ cp $FG_ROOT/Nasal/IOrules ~/.fgfs/Nasal + + Now add these two lines there: + + WRITE ALLOW /dev/input/hidraw/Thustmaster_Joystick_-_HOTAS_Warthog + WRITE ALLOW /dev/input/hidraw/Thrustmaster_Throttle_-_HOTAS_Warthog + + CAVE: Don't fix the bad spelling of "Thrustmaster", unless your stick + really uses that! + + + + +DISCLAIMER: Of course, you take all responsibility for any possible +damages to your hardware if you make these changes. Neither the +FlightGear project nor any of its developers and contributors are in +any way liable. diff --git a/Input/Joysticks/ThrustMaster/Warthog/Throttle/seahawk.xml b/Input/Joysticks/ThrustMaster/Warthog/Throttle/seahawk.xml new file mode 100644 index 000000000..b41ada8f4 --- /dev/null +++ b/Input/Joysticks/ThrustMaster/Warthog/Throttle/seahawk.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml index 0ab91c505..896b6192c 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml @@ -11,12 +11,16 @@ Thustmaster Joystick - HOTAS Warthog + Thrustmaster Joystick - HOTAS Warthog - nasal + - + updateListener : func( n ) { + var SpeedUp = getprop("/sim/speed-up"); + if (SpeedUp<0.9) + { + SpeedUp=1/SpeedUp; + SpeedUp = "1/" ~ SpeedUp; + } + setprop("/sim/gui/dialogs/replay/time-factor","" ~ SpeedUp ~ "x"); + }, - + close : func { + #removelistener( me.maxListenerId ); + }, - - - # Populate the view combo box with a list of the available views - var combo = cmdarg().getChildren("group")[1].getNode("combo"); - combo.removeChildren("value"); + findElementByName : func(base,name) { + foreach( var child; base.getChildren() ) { + var n = child.getNode( "name" ); + if( n != nil and n.getValue() == name ) + return child; + var f = me.findElementByName(child,name); + if( f != nil ) return f; + } + return nil; + }, - var current_view = getprop("/sim/current-view/view-number"); - var i = 0; - foreach (var v; view.views) { + }; - var name = "Unnamed view " ~ v.getIndex(); + var controller = ReplayDialogController.new( cmdarg() ); + controller.open(); + ]]> - if (v.getNode("name") != nil) { - name = v.getNode("name").getValue(); - } + + - # Pre-populate the combo box selected value - if (v.getIndex() == current_view) { - setprop("/sim/replay/view-name", name); - } + + hbox + fill + 28 - combo.getNode("value[" ~ i ~ "]", 1).setValue(name); - i = i + 1; - } - - + + + SANS_12B + + + + 0.9 + 0.9 + 0.9 + 1 + + 70 + - - table + + + + 0.7 + 0.7 + 0.7 + 1 + + - - 00 - right - - + + replay-looped + left + + 0.6 + 0.6 + 0.6 + 0.8 + + /sim/replay/looped + + dialog-apply + replay-looped + + + + replay-duration + 40 + + 0.5 + 0.5 + 0.5 + 0.8 + + /sim/replay/duration + + dialog-apply + replay-duration + + - - 01 - 40 - left - /sim/replay/duration - + 40 - - 10 - right - - + + + Time: %s + + 0.7 + 0.7 + 0.7 + 1 + + true + /sim/replay/time-str + - - 11 - left - 200 - /sim/replay/view-name - - dialog-apply - - + 10 - - 21 - left - /sim/replay/looped - - - dialog-apply - - - + + + Size: %.1fMB + + 0.7 + 0.7 + 0.7 + 1 + + /sim/replay/buffer-size-mbyte + - + 40 - - left - - + + + + 0.7 + 0.7 + 0.7 + 1 + + + + + + 28 + %s + + 0.7 + 0.7 + 0.7 + 1 + + true + /sim/gui/dialogs/replay/time-factor + + - - table + 1 + + + - - 10 - center - - + + hbox + center - - 11 - left - - + - - 20 - center - - + - - 21 - left - - + + + + 0.7 + 0.7 + 0.7 + 1 + + %8s + right + true + /sim/replay/start-time-str + - - 30 - center - - + + replay-time-slider + 0 + + 0.4 + 0.4 + 0.4 + 1 + + left + 350 + 0 + 1.0 + /sim/replay/time + true + + dialog-apply + replay-time-slider + + - - 31 - left - - - + + + + 0.7 + 0.7 + 0.7 + 1 + + %s + left + true + /sim/replay/end-time-str + - + - - hbox - true - - true - - true - - true - + + + + hbox + center + false + 3 + + + + + + + diff --git a/gui/menubar.xml b/gui/menubar.xml index e75a0715d..834c0c71b 100644 --- a/gui/menubar.xml +++ b/gui/menubar.xml @@ -190,6 +190,9 @@ + + replay + dialog-show replay diff --git a/keyboard.xml b/keyboard.xml index aabb75488..ce8a214ed 100644 --- a/keyboard.xml +++ b/keyboard.xml @@ -168,6 +168,10 @@ top down before the key bindings are parsed. replay + + dialog-show + replay + @@ -268,9 +272,22 @@ top down before the key bindings are parsed. ESC Prompt and quit FlightGear + + + /sim/freeze/replay-state + + dialog-show exit + + + /sim/freeze/replay-state + + property-assign + /sim/replay/disable + true + Reset FlightGear diff --git a/preferences.xml b/preferences.xml index a714cb827..f5831610b 100644 --- a/preferences.xml +++ b/preferences.xml @@ -677,6 +677,17 @@ Started September 2000 by David Megginson, david@megginson.com 90 1 true + + + 60.0 + + + 0.5 + 600.0 + + 5.0 + 3600.0 + @@ -768,6 +779,11 @@ Started September 2000 by David Megginson, david@megginson.com svn + + + /Aircraft/Generic/flightrecorder/generic-piston-propeller-4.xml + +