User Tools

Site Tools


No renderer 'pdf' found for mode 'pdf'
aircraft:tmd:inputs

This is an old revision of the document!


TMD Inputs

Aircraft in the Aerofly FS 2 simulate interactive cockpits where each button, switch, knob, lever, selector, etc. are individual parts. We're now describing how to set up the most common inputs for your own custom aircraft.

General principle

The keyboard, joystick or clickspot activated by the mouse, VR hands or touch inputs generate a message from the controls.tmd (ControlObjects) that is send to the TMD. These messages contain the message name string, a message qualifier like step, toggle, move, event, etc. and a value like 1.0 for example or -1.0.

On the side of the DynamicObjects within the TMD file there is no further distinction of the input device needed, all input methods result in the same outcome. The TMD contains objects that listen to the incoming messages (Input) and filter them based by the name. Depending on weather it is a switch, button or lever a certain movement or behavior is generated. The button is depressed, the switch change the position and the lever moves for example.

That position is then send to the GraphicObjects section, where the geometry is animated so that the visual part is also moving.

A sound can also be triggered by the movement which happens with the event_sound objects that trigger a sound in the SoundObjects section.

It is important to get the combination of control message Type, trigger mode of message (e.g. OnStep, OnRotate) as well as the message qualifier (step, event, etc.) correctly. Otherwise you might not see the desired results for all input devices if anything happens at all.

Naming Convention

Copy & Paste

After setting up every input in all of our default aircraft we can give some recommendations on how to name all of these inputs in a certain way to not get confused. Once a good name is found it can pretty much be copy-pasted throughout the different sections and we highly recommend doing that to save time. E.g. you don't need to come up with different names for the graphics section than for the physics. Just re-use the same one everywhere. Much easier.

E.g. In the GraphicObjects section you can re-use the same name for the graphic object, e.g. the hingedbodygraphics LandingLightSwitch can use the AngleID LandingLightSwitch.Output without problem. This speeds things up when you only need to copy paste. Sometimes you have to do more on the graphics side of things, then you could use the name with a “Graphics” at the end, e.g. “LandingLightSwitchGraphics” but you could also copy-paste the Geometry name, e.g. SwLdgLt… though this is not recommended as it is harder to decipher and generally costs more time because it can't be copy pasted to other places.

…Knob, …Switch

In the TMD the name of the input should contain the type of the input at the end of the name. E.g. LandingLightSwitch, PilotPFDBrightnessKnob, Throttle1Lever, GearLever, PackFlowSelector, etc.

Pilot/Copilot or Left/Right

In general it is easier to stick with Pilot and Copilot, even though this may no longer be correct terminology. You could of course use Captain and FirstOfficer or Left/Right everywhere but it is somewhat easier to rename Pilot to Copilot as there are only three characters difference. Typically we have the name location leading the function, so for example: PilotNDBrightnessInput or NAV1FrequencyInput.

When there are more than two devices or the device is located in the center, accessible to both pilots, or when they are usually named this way you can also use a numbering (e.g. RPM1, RMP2, NAV1, NAV2) or left and right (LeftCDU, CenterCDU, RightCDU). The name should be helpful when you search and replace it. For example you can setup the left CDU keys first and then just copy the entire section and then rename all “LeftCDU” with “RightCDU” on the entire block.

Controls

In the controls.tmd the name of the clickspots (control_box, control_cylinder, control_sphere) should not include the type itself (remove the Switch, Knob, etc.). So for the landing lights it should be LandingLight and not LandingLightSwitch. This is because the clickspot name itself is totally irrelevant and the name LandingLightSwitch can then be used for the control_input, used to transform the clickspot (animate the movement with the switch or lever). Also the type is defined just one line below, so even if you forget if it is a switch or knob or button you can easily check it.

In the controls.tmd the name of the messages doesn't yet follow a convention but this might change in the future. If you find similar controls in other aircraft, especially for the ones that you can assign in the controller settings, re-use the message names of the default aircraft as much as you can. Good names are for example: Controls.Lighting.Landing or Autopilot.Disengage, LeftMCDU.Key.

Sound

For the sounds, group several switches or buttons together to one group and name them after the location, e.g. LeftPedestalButtonSoundIn or RearOverheadSwitchSound.


Buttons, Switches, Knobs and Levers

Button

The button object simulates the depressing and release of a physical button or knob that can be pushed in. The typical chain consists of control_box, input_button, movinggraphics and sound_multi.

ControlObjects

            <[control_box][Example][]
                <[string8][Type][ button ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 1.0 0.0 0.0 ]>
                <[control_message][OnPush][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ event ]>
                    <[float64][Value][1.0]>
                >
                <[vector3_float64][Dimensions][ 0.01 0.01 0.01 ]>
            >

Direction is the axis along which the button is to be pressed. This usually points away from the pilot, into the panel.

DynamicObjects

            <[event_sound][ButtonSoundIn][]
            >
            <[event_sound][ButtonSoundOut][]
            >
            <[input_button][ExampleButton][]
                <[string8][Input][Controls.Example]>
                <[float64][InputValue][1.0]>
                <[string8][Events]       [ ButtonSoundIn.Trigger  ]>
                <[string8][EventsRelease][ ButtonSoundOut.Trigger ]>
            >
Parameters input_button
InputValue Filters messages by a specific message value, e.g. if several buttons in a row all use the same message name.
Inputs
Inputs ControlObjects Yes, Input is the message name
Inputs DynamicObjects None
Outputs
To DynamicObjects None
To ControlObjects Automatic, same name + .Output
To GraphicObjects Automatic, same name + .Output
Events
Events Fired when button is activated, only used for sound. For event logic use the input_event class, for other purposes use input_binary, input_discrete, etc.
EventsRelease Fired when released, only used for sound.

GraphicObjects

            <[movinggraphics][ExampleButton][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][OrientationID][Fuselage.Q]>
                <[string8][GeometryList][ ExampleButton ]>
                <[tmvector3d][Axis][ 1.0 0.0 0.0 ]>
                <[uint32][AngleID][ExampleButton.Output]>
                <[float64][Pos0][-0.001]>
                <[float64][Pos1][0.001]>
            >

Pos0 and Pos1 determine the movement length, how far the button is pressed in. Pos0 represents the value for input a theoretical -1.0 and Pos1 for an input of 1.0. The average between these two is the zero position.

In the example the button moves by 0.001 meter or 1 mm. To increase the amount of translation change Pos0 and Pos1 to e.g. 0.002 for 2 mm.

This may be changed in the future to be less confusing.

SoundObjects

            <[soundinput][ButtonSoundIn][]
                <[string8][InputID][ButtonSoundIn.Output]>
            >
            <[sound_multi][SoundButtonIn][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][ButtonSoundIn.Output]>
                <[string8][InputVolume] [0.5]>
                <[string8][InputPitch]  [1.0]>
                <[string8][SoundFile][button_small.wav]>
                <[bool][External][false]>
            >
            <[soundinput][ButtonSoundOut][]
                <[string8][InputID][ButtonSoundOut.Output]>
            >
            <[sound_multi][SoundButtonOut][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][ButtonSoundOut.Output]>
                <[string8][InputVolume] [0.5]>
                <[string8][InputPitch]  [0.8]>
                <[string8][SoundFile][button_small.wav]>
                <[bool][External][false]>
            >

There is no need, nor is it recommended to have an individual sound for each button. Try to group nearby buttons and reuse the same sounds if possible. You can also trigger the same event_sound for button press and release and thus save the work of having two sounds.


Toggle Switch

The switch object represents a two-state toggle switch with on/off positions (0.0 and 1.0). The typical chain consists of control_cylinder, input_switch, hingedbodygraphics and sound_multi.

ControlObjects

            <[control_input][ExampleSwitch][]
                <[uint32][InputID][ExampleSwitch.Output]>
                <[float64][Scaling][0.6]>
                <[float64][Offset][0.0]>
            >
            <[control_rotation][ExampleSwitchRotation][]
                <[string8][Input][ExampleSwitch.Output]>
                <[tmvector3d][Axis][ 0.0 1.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
            >
            <[control_cylinder][Example][]
                <[string8][Type][ switch toggle ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 0.0 0.0 1.0 ]>
                <[string8][InputTransform][ExampleSwitchTransform.Output]>
                <[control_message][OnStep][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ step ]>
                    <[float64][Value][1.0]>
                >
                <[float64][Radius][0.005]>
                <[float64][Length][0.015]>
            >
            <[control_cylinder][ExampleBase][]
                <[string8][Type][ switch toggle base ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 0.0 0.0 1.0 ]>
                <[control_message][OnStep][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ step ]>
                    <[float64][Value][1.0]>
                >
                <[float64][Radius][0.008]>
                <[float64][Length][0.003]>
            >

Direction is the axis across the panel that causes the switch to change the state, this at a 90° angle to the rotation axis of the switch and also 90° to the switch's X axis - should be in the plane of the panel.

The base object is a flat cylinder that is located at the bottom of the switch on the panel (base of the switch). It has a larger diameter and is thus easier to hit with a mouse or with a touch input. The base is not active for VR hand controllers.

DynamicObjects

            <[event_sound][SwitchSoundOn][]
            >
            <[event_sound][SwitchSoundOff][]
            >
            <[input_switch][ExamleSwitch][]
                <[string8][Input][Controls.Examle]>
                <[float64][Value][1.0]>
                <[string8][Events]       [ SwitchSoundOn.Trigger  ]>
                <[string8][EventsRelease][ SwitchSoundOff.Trigger ]>
            >
Parameters input_switch
Value Initial position of the switch
Inputs
Inputs ControlObjects Yes, Input is the message name
Inputs DynamicObjects None
Outputs
To DynamicObjects .Output
To ControlObjects Automatic, same name + .Output
To GraphicObjects Automatic, same name + .Output
Events
Events Fired when the switch state changes from 0.0 to 1.0, only used for sound.
EventsRelease Fired when the switch state changes from 1.0 to 0.0, only used for sound.

GraphicObjects

            <[hingedbodygraphics][ExampleSwitch][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][OrientationID][Fuselage.Q]>
                <[string8][GeometryList][ ExampleSwitch ]>
                <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
                <[string8][AngleID][ExampleSwitch.Output]>
                <[float64][AngleMax][0.6]>
            >

SoundObjects

            <[soundinput][SwitchSoundOn][]
                <[string8][InputID][SwitchSoundOn.Output]>
            >
            <[sound_multi][SoundSwitchOn][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][SwitchSoundOn.Output]>
                <[string8][InputVolume] [1.0]>
                <[string8][InputPitch]  [1.0]>
                <[string8][SoundFile][switch_small.wav]>
                <[bool][External][false]>
            >
            <[soundinput][SwitchSoundOff][]
                <[string8][InputID][SwitchSoundOff.Output]>
            >
            <[sound_multi][SoundSwitchOff][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][SwitchSoundOff.Output]>
                <[string8][InputVolume] [1.0]>
                <[string8][InputPitch]  [0.9]>
                <[string8][SoundFile][switch_small.wav]>
                <[bool][External][false]>
            >

Discrete Switch

The input_discrete object can be used for a multi-state switch with discrete positions (e.g. -1.0, 0.0, 1.0, 2.0, etc.). The typical chain consists of control_cylinder, input_discrete, output_free, hingedbodygraphics and sound_multi.

The setup is similar to the toggle switch only with minor differences like the use of input_discrete and output_free as well as different values for Scaling/AngleMax and an no toggle option.

ControlObjects

            <[control_input][ExampleSwitch][]
                <[uint32][InputID][ExampleSwitch.Output]>
                <[float64][Scaling][0.3]>
                <[float64][Offset][0.0]>
            >
            <[control_rotation][ExampleSwitchRotation][]
                <[string8][Input][ExampleSwitch.Output]>
                <[tmvector3d][Axis][ 0.0 1.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
            >
            <[control_cylinder][Example][]
                <[string8][Type][ switch ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 0.0 0.0 1.0 ]>
                <[string8][InputTransform][ExampleSwitchTransform.Output]>
                <[control_message][OnStep][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ step ]>
                    <[float64][Value][1.0]>
                >
                <[float64][Radius][0.005]>
                <[float64][Length][0.015]>
            >
            <[control_cylinder][ExampleBase][]
                <[string8][Type][ switch base ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 0.0 0.0 1.0 ]>
                <[control_message][OnStep][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ step ]>
                    <[float64][Value][1.0]>
                >
                <[float64][Radius][0.008]>
                <[float64][Length][0.003]>
            >

The base object is a flat cylinder that is located at the bottom of the switch on the panel (base of the switch). It has a larger diameter and is thus easier to hit with a mouse or with a touch input. The base is not active for VR hand controllers.

DynamicObjects

            <[event_sound][SwitchSoundOn][]
            >
            <[event_sound][SwitchSoundOff][]
            >
            <[input_discrete][ExamleSwitch][]
                <[string8][Input][Controls.Example]>
                <[tmvector2d][Range][ 0.0 2.0 ]>
                <[float64][Value][1.0]>
                <[string8][EventsUp]  [ SwitchSoundOn.Trigger  ]>
                <[string8][EventsDown][ SwitchSoundOff.Trigger ]>
            >
            <[output_free][ExamleSwitchOutput][]
                <[string8][Input][ExamleSwitch.Output]>
            >
Parameters input_discrete
Value Initial position of the switch
Range Minimum and maximum values of the switch. Should fall on whole numbers, can also be negative (e.g. -1.0 to 1.0)
Inputs
Inputs ControlObjects Yes, Input is the message name
Inputs DynamicObjects InputEnable available but shouldn't be used unless the switch is physically guarded.
Outputs
To DynamicObjects .Output
To ControlObjects or GraphicObjects Manual, recommended to use output_free with the switch name and an Output after it.
Events
Events Fired when the switch state decreases, only used for sound.
EventsRelease Fired when the switch state increases, only used for sound.

GraphicObjects

            <[hingedbodygraphics][ExampleSwitch][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][OrientationID][Fuselage.Q]>
                <[string8][GeometryList][ ExampleSwitch ]>
                <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
                <[string8][AngleID][ExampleSwitch.Output]>
                <[float64][AngleMax][0.3]>
            >

SoundObjects

            <[soundinput][SwitchSoundOn][]
                <[string8][InputID][SwitchSoundOn.Output]>
            >
            <[sound_multi][SoundSwitchOn][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][SwitchSoundOn.Output]>
                <[string8][InputVolume] [1.0]>
                <[string8][InputPitch]  [1.0]>
                <[string8][SoundFile][switch_small.wav]>
                <[bool][External][false]>
            >
            <[soundinput][SwitchSoundOff][]
                <[string8][InputID][SwitchSoundOff.Output]>
            >
            <[sound_multi][SoundSwitchOff][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][SwitchSoundOff.Output]>
                <[string8][InputVolume] [1.0]>
                <[string8][InputPitch]  [0.9]>
                <[string8][SoundFile][switch_small.wav]>
                <[bool][External][false]>
            >

Discrete Selector

The input_discrete can also be used for selector type inputs, rotary knob input with discrete positions (e.g. OFF, AUTO, ON or LOW, MEDIUM, HIGH).

It works similar to a discrete switch but the rotation axis and direction are changed and the OnRotate message is used instead of OnStep and the type of the controls is knob and there is no base.

ControlObjects

            <[control_cylinder][Example][]
                <[string8][Type][ knob ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 0.0 0.0 1.0 ]>
                <[control_message][OnRotate][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ step ]>
                    <[float64][Value][1.0]>
                >
                <[float64][Radius][0.005]>
                <[float64][Length][0.015]>
            >

The base object is a flat cylinder that is located at the bottom of the switch on the panel (base of the switch). It has a larger diameter and is thus easier to hit with a mouse or with a touch input. The base is not active for VR hand controllers.

DynamicObjects

            <[event_sound][SwitchSoundOn][]
            >
            <[event_sound][SwitchSoundOff][]
            >
            <[input_discrete][ExamleSwitch][]
                <[string8][Input][Controls.Example]>
                <[tmvector2d][Range][ 0.0 2.0 ]>
                <[float64][Value][1.0]>
                <[string8][EventsUp]  [ SwitchSoundOn.Trigger  ]>
                <[string8][EventsDown][ SwitchSoundOff.Trigger ]>
            >
            <[output_free][ExamleSwitchOutput][]
                <[string8][Input][ExamleSwitch.Output]>
            >
Parameters input_discrete
Value Initial position of the switch
Range Minimum and maximum values of the switch. Should fall on whole numbers, can also be negative (e.g. -1.0 to 1.0)
Inputs
Inputs ControlObjects Yes, Input is the message name
Inputs DynamicObjects InputEnable available but shouldn't be used unless the switch is physically guarded.
Outputs
To DynamicObjects .Output
To ControlObjects or GraphicObjects Manual, recommended to use output_free with the switch name and an Output after it.
Events
Events Fired when the switch state decreases, only used for sound.
EventsRelease Fired when the switch state increases, only used for sound.

GraphicObjects

            <[hingedbodygraphics][ExampleSwitch][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][OrientationID][Fuselage.Q]>
                <[string8][GeometryList][ ExampleSwitch ]>
                <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
                <[string8][AngleID][ExampleSwitch.Output]>
                <[float64][AngleMax][0.3]>
            >

SoundObjects

            <[soundinput][SwitchSoundOn][]
                <[string8][InputID][SwitchSoundOn.Output]>
            >
            <[sound_multi][SoundSwitchOn][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][SwitchSoundOn.Output]>
                <[string8][InputVolume] [1.0]>
                <[string8][InputPitch]  [1.0]>
                <[string8][SoundFile][switch_small.wav]>
                <[bool][External][false]>
            >
            <[soundinput][SwitchSoundOff][]
                <[string8][InputID][SwitchSoundOff.Output]>
            >
            <[sound_multi][SoundSwitchOff][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][SwitchSoundOff.Output]>
                <[string8][InputVolume] [1.0]>
                <[string8][InputPitch]  [0.9]>
                <[string8][SoundFile][switch_small.wav]>
                <[bool][External][false]>
            >

Knob

The knob object simulates a rotary input that can be turned freely without any mechanical stops.

ControlObjects

            <[control_cylinder][Example][]
                <[string8][Type][ knob ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 1.0 0.0 0.0 ]>
                <[control_message][OnRotate][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ step ]>
                    <[float64][Value][1.0]>
                >
                <[float64][Radius][0.012]>
                <[float64][Length][0.015]>
            >

DynamicObjects

            <[event_sound][KnobSound][]
            >
            <[input_knob][ExampleKnob][]
                <[string8][Input][Controls.Example]>
                <[float64][InputValue][1.0]>
                <[string8][Events][ KnobSound.Trigger ]>
            >
Parameters input_knob
InputValue Filer by step message magnitude (absolute value), e.g. 1.0 for fine steps (+/- 1.0), 20.0 for coarse steps (+/- 20.0) messages
Inputs
Inputs ControlObjects Yes, Input is the message name
Inputs DynamicObjects None
Outputs
To DynamicObjects None
To GraphicObjects Automatic, same name + .Output
Events
Events Fired when the knob is stepped by one increment (both directions). Only used for sounds, use input_event for logic stuff.

GraphicObjects

            <[hingedbodygraphics][ExampleKnob][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][OrientationID][Fuselage.Q]>
                <[string8][GeometryList][ ExampleKnob ]>
                <[tmvector3d][Axis][ -1.0 0.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
                <[string8][AngleID][ExampleKnob.Output]>
                <[float64][AngleMax][0.0872665]>
            >

SoundObjects

            <[soundinput][KnobSound][]
                <[string8][InputID][KnobSound.Output]>
            >
            <[sound_multi][SoundKnob][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][VelocityID][Fuselage.V]>
                <[string8][InputTrigger][KnobSound.Output]>
                <[string8][InputVolume] [1.0]>
                <[string8][InputPitch]  [1.0]>
                <[string8][SoundFile][knobturn.wav]>
                <[bool][External][false]>
            >

Lever

The lever class simulates inputs with non-discrete character, e.g. for your throttle or mixture levers.

ControlObjects

            <[control_input][ExampleLever][]
                <[uint32][InputID][ExampleLever.Output]>
                <[float64][Scaling][1.0]>
            >
            <[control_rotation][ExampleLeverTransform][]
                <[string8][Input][ExampleLever.Output]>
                <[tmvector3d][Axis][ 0.0 1.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
            >
            <[control_cylinder][Example][]
                <[string8][Type][ lever ]>
                <[vector3_float64][R0][ 0.0 0.0 0.0 ]>
                <[matrix3_float64][B0][ 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0 ]>
                <[vector3_float64][Direction][ 1.0 0.0 0.0 ]>
                <[float64][StepDistance][0.0003]>
                <[string8][InputTransform][ExampleLeverTransform.Output]>
                <[control_message][OnStep][]
                    <[string8][Message][Controls.Example]>
                    <[string8][Qualifiers][ step ]>
                    <[float64][Value][0.002]>
                >
                <[float64][Radius][0.01]>
                <[float64][Length][0.02]>
            >

DynamicObjects

            <[input_lever][ExampleLever][]
                <[string8][Input][Controls.Example]>
                <[string8][InputEnable][1.0]>
                <[tmvector2d][Range][ 0.0 1.0 ]>
                <[uint][Positions][201]>
                <[float64][Value][0.0]>
                <[float64][Speed][0.1]>
            >
            <[output_free][ExampleLeverOutput][]
                <[string8][Input][ExampleLever.Output]>
            >
Parameters input_lever
Range Minimum and maximum stops of the lever.
Positions Number of steps used then a key command steps the input
Value Initial position
Speed When an input is depressed the input increases/decreases at this set speed
Inputs
Inputs ControlObjects Yes, Input is the message name
Inputs DynamicObjects InputEnable, 1.0 allows movement, 0.0 locks the lever (e.g. latched)
Outputs
To DynamicObjects .Output
To ControlObjects or GraphicObjects Manual, use output_free

GraphicObjects

            <[hingedbodygraphics][ExampleLever][]
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][OrientationID][Fuselage.Q]>
                <[string8][GeometryList][ ExampleLever ]>
                <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
                <[string8][AngleID][ExampleLever.Output]>
                <[float64][AngleMax][1.0]>
            >

Lever2 - Dual Lever

            <[input_lever2][Throttle1Input][]
                <[string8][Input0][Controls.Throttle1]>
                <[string8][Input1][Controls.ThrustReverse1]>
                <[float64][StepSize0][1.0]>
                <[float64][StepSize1][2.2222222]>
                <[bool][Input0ClampZero][true]>
                <[bool][Input1ClampZero][true]>
                <[string8][Range][ -1.0 1.35 ]>
                <[string8][Range0][ 0.0 1.0 ]>
            >

Rocker Button and Switch

            <[input_button_rocker][RudderTrimKnob][]
                <[string8][Input][Controls.RudderTrim]>
                <[string8][EventsUp]         [ RockerSoundIn.Trigger  ]>
                <[string8][EventsDown]       [ RockerSoundIn.Trigger  ]>
                <[string8][EventsUpRelease]  [ RockerSoundOut.Trigger ]>
                <[string8][EventsDownRelease][ RockerSoundOut.Trigger ]>
            >
            <[input_switch_rocker][DirectionalGyroCorrectionSwitch][]
                <[string8][Input][Navigation.DirectionalGyroCorrection]>
                <[string8][EventsUp]         [ SwitchSound.Trigger ]>
                <[string8][EventsDown]       [ SwitchSound.Trigger ]>
                <[string8][EventsUpRelease]  [ SwitchSound.Trigger ]>
                <[string8][EventsDownRelease][ SwitchSound.Trigger ]>
            >

Digital States

input_binary, input_discrete, input_discrete_cyclic, input_discrete_momentary, input_event, input_active, input_cyclic, input_pair, input_default, input_scratchpad

Flight Controls

input_control

aircraft/tmd/inputs.1562512299.txt.gz · Last modified: 2019/07/07 17:11 by jh