User Tools

Site Tools


aircraft:controls

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aircraft:controls [2017/01/17 22:00]
jh created
aircraft:controls [2019/07/07 17:35] (current)
jh
Line 1: Line 1:
 ====== Controls TMD ====== ====== Controls TMD ======
  
-The optional '​controls.tmd'​ file adds 3D click spots to the virtual cockpit in the shape of a cylinder, box or sphere. Each of the clickspots can have different messages assigned to it that allow the user to interact with the cockpit using the left and right mouse buttons as well as the mouse wheel. A message that is sent from the '​controls.tmd'​ has a value and qualifier assigned to it that allows either direct assignment of a valueincrement/​decrement ​or toggling of. The messages are received by the '​control_input'​ objects in dynamics section of the main .tmd file as described in the examples above.+The optional '​controls.tmd'​ file adds 3D click spots to the virtual cockpit in the shape of a cylinder, boxsphere ​or rings. Each of the clickspots can have different messages assigned to it that allow the user to interact with the cockpit using the left and right mouse buttons as well as the mouse wheel or by dragging ​the mouse with the left mouse button held down or by pointing at it with VR controllers,​ flipping ​it, or grabbing and moving ​the VR hand controller.
  
-The definition of a click spot is rather simple. After deciding on the best shape that fits best the position ​is adjusted in the R0 attribute, the orientation is set by the B0 matrix and then the size is adjusted. If another aircraft already uses a similar function, then its best to copy the message name from its '​controls.tmd' ​file. But it is also ok to use own custom names for the messages ​if desired.+A message ​that is sent from the '​controls.tmd' ​has a value and qualifier assigned ​to it that allows either direct assignment of a value, step (increment/​decrement) or toggling. The messages ​are received by  '​input_control',​ '​input_default',​ '​input_discrete',​ '​input_binary',​ '​input_switch',​ '​input_knob',​... objects in dynamics section of the main  in the [[aircraft:​tmd|aircraft TMD]] file.
  
-Experience shows that it is good practice ​to sort the click spots within ​the '​controls.tmd'​ file similar to how a pilot would scan the cockpitFor example, most airliner overhead panels have columns which are gone through one by one from top to bottom starting with the left column. Sorting the click spots in a similar way will make it easier ​to find a click spot again later.+The definition of a click spot is rather simple. After deciding on the best shape that fits best the position is adjusted in the R0 attribute, the orientation is set by the B0 matrix and then the size is adjusted. For VR hands and mouse dragging ​it is important to also define an '​Direction'​ axis. If another aircraft already uses a similar function, then its best to copy the message name from its '​controls.tmd'​ file. But it is also ok to use own custom names for the messages if desired, just note that some default key assignments may not work then.
  
-Please note that a click spot cannot work if there is an analog axis assigned in the controls setting of the Aerofly FS 2 Flight Simulator that uses the exact same message nameAn example ​would be the Throttle command, which pretty much always has an axis assigned ​to it. A click spot with the same message would be obsolete because ​the user can't actually overwrite the analog input.+Experience shows that it is good practice to sort the click spots within ​the '​controls.tmd' file similar to how a pilot would scan the cockpit. For examplemost airliner overhead panels have columns ​which are gone through one by one, from top to bottom, starting ​with the left column. Sorting ​the click spots in a similar way will make it easier to find a click spot again later. 
 + 
 +=== Example === 
 +<​code>​ 
 +<​[file][][] 
 +    <​[modelmanager][][] 
 +        <​[pointer_list_tmcontrol][ControlObjects][] 
 +         
 +            // autopilot 
 +            <​[control_box][AutopilotKeyFD][33] 
 +                <​[string8][Type][ button ]> 
 +                <​[vector3_float64][R0][ 12.6453291050949 0.2585 -0.13 ]> 
 +                <​[matrix3_float64][B0][ 0.241921895599668 0.0 0.970295726275997 ​ 0.0 1.0 0.0  0.970295726275997 0.0 -0.241921895599668 ]> 
 +                <​[vector3_float64][Direction][ 0.965926 0.0 -0.258819 ]> 
 +                <​[control_message][OnPush][] 
 +                    <​[string8][Message][Autopilot.FlightDirector0]>​ 
 +                    <​[string8][Qualifiers][toggle]>​ 
 +                    <​[float64][Value][1.0]>​ 
 +                > 
 +                <​[vector3_float64][Dimensions][0.011 0.013 0.004]>​ 
 +            > 
 +            <​[control_cylinder][SelectedAirspeed][24] 
 +                <​[string8][Type][ knob ]> 
 +                <​[vector3_float64][R0][ 12.6392172575 0.0885 -0.1016476485]>​ 
 +                <​[matrix3_float64][B0][ 0.965926 0.0 -0.258819 ​ 0.0 1.0 0.0  0.258819 0.0 0.965926 ]> 
 +                <​[vector3_float64][Direction][ 0.965926 0.0 -0.258819 ]> 
 +                <​[float64][StepAngle][0.1]>​ 
 +                <​[float64][StepDistance][0.02]>​ 
 +                <​[control_message][OnPush][] 
 +                    <​[string8][Message][Autopilot.ManagedSpeed]>​ 
 +                    <​[string8][Qualifiers][event]>​ 
 +                    <​[float64][Value][1.0]>​ 
 +                > 
 +                <​[control_message][OnPull][] 
 +                    <​[string8][Message][Autopilot.Speed]>​ 
 +                    <​[string8][Qualifiers][event]>​ 
 +                    <​[float64][Value][1.0]>​ 
 +                > 
 +                <​[control_message][OnRotate][] 
 +                    <​[string8][Message][Autopilot.SelectedSpeed]>​ 
 +                    <​[string8][Qualifiers][step]>​ 
 +                    <​[float64][Value][1.0]>​ 
 +                > 
 +                <​[float64][Radius][0.008]>​ 
 +                <​[float64][Length][0.026]>​ 
 +            > 
 + 
 +            // gear lever 
 +            <​[control_cylinder][GearLeverKnob][31] 
 +                <​[string8][Type][ lever toggle ]> 
 +                <​[vector3_float64][R0][ 12.81048 -0.1424327 -0.4347819 ]> 
 +                <​[matrix3_float64][B0][ 0.0 1.0 0.0  1.0 0.0 0.0  0.0 0.0 1.0 ]> 
 +                <​[vector3_float64][Direction][ 0.25882 0.0 0.965926 ]> 
 +                <​[control_message][OnStep][] 
 +                    <​[string8][Message][Controls.Gear]>​ 
 +                    <​[string8][Qualifiers][step]>​ 
 +                    <​[float64][Value][-1.0]>​ 
 +                > 
 +                <​[float64][Radius][0.012]>​ 
 +                <​[float64][Length][0.012]>​ 
 +            > 
 +            <​[control_box][GearLeverBase][31] 
 +                <​[string8][Type][ lever toggle base ]> 
 +                <​[vector3_float64][R0][ 12.83026 -0.1420449 -0.4704933 ]> 
 +                <​[matrix3_float64][B0][ 0.25882 0.0 0.965926 ​ 0.0 1.0 0.0  -0.965926 0.0 0.25882 ]> 
 +                <​[vector3_float64][Direction][ 0.25882 0.0 0.965926 ]> 
 +                <​[control_message][OnStep][] 
 +                    <​[string8][Message][Controls.Gear]>​ 
 +                    <​[string8][Qualifiers][step]>​ 
 +                    <​[float64][Value][-1.0]>​ 
 +                > 
 +                <​[vector3_float64][Dimensions][0.05 0.012 0.003]> 
 +            > 
 +             
 +             
 +        > 
 +    > 
 +
 +</​code>​
aircraft/controls.1484686831.txt.gz · Last modified: 2017/01/17 22:00 by jh