User Tools

Site Tools


aircraft:tmd

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
aircraft:tmd [2019/07/21 15:21] jhaircraft:tmd [2022/07/19 21:14] (current) – [Example Dynamics to Graphics Section] jh
Line 125: Line 125:
             // throttle             // throttle
             <[input_lever][ThrottleInput][]             <[input_lever][ThrottleInput][]
-                <[string8][Input][Controls.Throttle1]>+                <[string8][Message][Controls.Throttle1]>
             >             >
  
Line 133: Line 133:
 </code> </code>
  
-===== Object Communication Within a Section =====+===== Communication Within a Section =====
  
 Most objects in the tmd file need to communicate in some form. For example, a jet_engine object needs to know the throttle lever position so that it can calculate the thrust increase or decrease over time and apply a variable strength force to the 'Fuselage' to accelerate it. In the tmd code snipped below, the developer defined that the engine should use the output of the ThrottleLever object as its ThrottleControl input. It would also be possible to use the autothrottle output as an example or any other imaginable output from an instrument reading or an output of a logic circuit if that is desired. Most objects in the tmd file need to communicate in some form. For example, a jet_engine object needs to know the throttle lever position so that it can calculate the thrust increase or decrease over time and apply a variable strength force to the 'Fuselage' to accelerate it. In the tmd code snipped below, the developer defined that the engine should use the output of the ThrottleLever object as its ThrottleControl input. It would also be possible to use the autothrottle output as an example or any other imaginable output from an instrument reading or an output of a logic circuit if that is desired.
Line 141: Line 141:
             // throttle             // throttle
             <[input_lever][ThrottleInput][]             <[input_lever][ThrottleInput][]
-                <[string8][Input][Controls.Throttle1]>+                <[string8][Message][Controls.Throttle1]>
             >             >
             <[jet_engine][JetEngine][]             <[jet_engine][JetEngine][]
Line 152: Line 152:
 These manually programmed connections allow enormous flexibility, easy debugging and incredibly simple and fast object code. Each object can be as 'stupid' as can be, it just uses its inputs, does something with it and sets its output value or internal state if it has one. Then, if another object comes by and wants to know the output value, it just grabs it and calculates its outputs with that. This way very long chains, logic trees or even iterations and control loops can be created that actually perform different logic depending on the aircraft's state or the user's inputs. It's important to note that the order in which the objects appear in the tmd code has no effect on the simulation. These manually programmed connections allow enormous flexibility, easy debugging and incredibly simple and fast object code. Each object can be as 'stupid' as can be, it just uses its inputs, does something with it and sets its output value or internal state if it has one. Then, if another object comes by and wants to know the output value, it just grabs it and calculates its outputs with that. This way very long chains, logic trees or even iterations and control loops can be created that actually perform different logic depending on the aircraft's state or the user's inputs. It's important to note that the order in which the objects appear in the tmd code has no effect on the simulation.
  
-===== Object Communication Across Sections =====+===== Communication Across Sections =====
  
 Objects defined in different sections of the tmd cannot communicate directly. The only possible connections are from the dynamics section to the graphics section and from the dynamics section to the sound section. Objects defined in different sections of the tmd cannot communicate directly. The only possible connections are from the dynamics section to the graphics section and from the dynamics section to the sound section.
Line 196: Line 196:
             >             >
             <[hingedbodygraphics][ThrottleLeverGraphics][]             <[hingedbodygraphics][ThrottleLeverGraphics][]
-                <[uint32][PositionID]   [Fuselage.R]>+                <[uint32][PositionID][Fuselage.R]>
                 <[uint32][OrientationID][Fuselage.Q]>                 <[uint32][OrientationID][Fuselage.Q]>
                 <[string8][GeometryList][ ThrottleLever ]>                 <[string8][GeometryList][ ThrottleLever ]>
-                <[string8][InputAngle][ThrottleLeverPosition.Output]> +                <[string8][Input][ThrottleLeverPosition.Output]> 
-                <[tmvector3d][Axis] [ 0.0 1.0 0.0 ]>+                <[float64][Scaling][0.5]> 
 +                <[tmvector3d][Axis][ 0.0 1.0 0.0 ]>
                 <[tmvector3d][Pivot][ 5.123 0.0 -0.321 ]>                 <[tmvector3d][Pivot][ 5.123 0.0 -0.321 ]>
-                <[float64][AngleMax][0.5]> 
             >             >
 </code> </code>
aircraft/tmd.1563715306.txt.gz · Last modified: 2019/07/21 15:21 by jh