aircraft:tmd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
aircraft:tmd [2019/07/20 19:00] – [DynamicObjects] jh | aircraft:tmd [2022/07/19 21:14] (current) – [Example Dynamics to Graphics Section] jh | ||
---|---|---|---|
Line 10: | Line 10: | ||
===== Purpose ===== | ===== Purpose ===== | ||
+ | |||
The TMD-file contains the main definition of an aircraft. It describes the aircraft as a collection of objects that can have different attributes and connections to each other in an object-oriented approach. Among the objects that can be defined in a tmd file are engines, propellers, wings, airfoils, wheels, actuators, logic circuits, rigidbodies, | The TMD-file contains the main definition of an aircraft. It describes the aircraft as a collection of objects that can have different attributes and connections to each other in an object-oriented approach. Among the objects that can be defined in a tmd file are engines, propellers, wings, airfoils, wheels, actuators, logic circuits, rigidbodies, | ||
===== Sections ===== | ===== Sections ===== | ||
+ | |||
The TMD file consist of three sections: | The TMD file consist of three sections: | ||
* [[# | * [[# | ||
Line 37: | Line 39: | ||
==== DynamicObjects ==== | ==== DynamicObjects ==== | ||
+ | |||
The dynamics section defines all objects that create the dynamics and systems simulation for an aircraft. Physical values, such as the location of the aircraft, it's speed and orientation as well as the deflection of it's control surfaces, the rotation speed of engines or [[aircraft: | The dynamics section defines all objects that create the dynamics and systems simulation for an aircraft. Physical values, such as the location of the aircraft, it's speed and orientation as well as the deflection of it's control surfaces, the rotation speed of engines or [[aircraft: | ||
Line 97: | Line 100: | ||
* [[aircraft: | * [[aircraft: | ||
- | ===== Object | + | ===== Object |
Each object in a section must have a unique name by which it can be referenced. Using a name for more than one object in a section can have undesired effects. | Each object in a section must have a unique name by which it can be referenced. Using a name for more than one object in a section can have undesired effects. | ||
- | ===== Naming Conventions ===== | + | ===== Object |
We use naming rules and give similar objects the same names across different airplanes: | We use naming rules and give similar objects the same names across different airplanes: | ||
*The name of an object uses the characters A-Z, a-z, 0-9 only and the first character of the name is always capitalized. | *The name of an object uses the characters A-Z, a-z, 0-9 only and the first character of the name is always capitalized. | ||
Line 109: | Line 112: | ||
*Abbreviations are avoided, the full name is always preferred. | *Abbreviations are avoided, the full name is always preferred. | ||
- | ===== Object | + | ===== Object |
The example code below creates an object of the class ' | The example code below creates an object of the class ' | ||
Line 121: | Line 125: | ||
// throttle | // throttle | ||
< | < | ||
- | < | + | < |
> | > | ||
Line 129: | Line 133: | ||
</ | </ | ||
- | ===== Object communication within | + | ===== Communication Within |
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 ' | 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 ' | ||
Line 136: | Line 141: | ||
// throttle | // throttle | ||
< | < | ||
- | < | + | < |
> | > | ||
< | < | ||
Line 147: | Line 152: | ||
These manually programmed connections allow enormous flexibility, | These manually programmed connections allow enormous flexibility, | ||
- | ===== 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 154: | Line 160: | ||
One way to imagine the communication between the sections is that each value from the dynamics section is sent through a wire to either the graphics processing unit or the sound processing devices. | One way to imagine the communication between the sections is that each value from the dynamics section is sent through a wire to either the graphics processing unit or the sound processing devices. | ||
- | ==== Example | + | ==== Example |
In the example below the position of the throttle lever input is put out by the dynamics section and then in the graphics section the value is read in. We usually give the ' | In the example below the position of the throttle lever input is put out by the dynamics section and then in the graphics section the value is read in. We usually give the ' | ||
Line 189: | Line 196: | ||
> | > | ||
< | < | ||
- | < | + | < |
< | < | ||
< | < | ||
- | < | + | < |
- | < | + | < |
+ | < | ||
< | < | ||
- | < | ||
> | > | ||
</ | </ | ||
==== Summary ==== | ==== Summary ==== | ||
+ | |||
- The ' | - The ' | ||
- An ' | - An ' |
aircraft/tmd.txt · Last modified: 2022/07/19 21:14 by jh