aircraft:tmd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
aircraft:tmd [2019/07/07 17:15] – [Aircraft Definition File (TMD-File)] jh | aircraft:tmd [2019/07/21 15:21] – 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: | ||
- | The core of each aircraft in the Aerofly flight simulator is a [[aircraft: | + | The core of each aircraft in the Aerofly flight simulator is a [[aircraft: |
- | The objects defined in the graphics and sound section use the output generated by the dynamics simulation to render the 3D objects and animations. Therefore it is necessary to hand over the required values to the graphics and sound using an [[aircraft: | + | The objects defined in the graphics and sound section use the output generated by the dynamics simulation to render the 3D objects and animations. Therefore it is necessary to hand over the required values to the graphics and sound using an output object. This includes the position of all control surfaces and primary flight controls as well as values that are visible on any display in the cockpit. An example can be found below. |
Here is a list of pages that describe the systems within the dynamics section of the TMD file further: | Here is a list of pages that describe the systems within the dynamics section of the TMD file further: | ||
* [[aircraft: | * [[aircraft: | ||
+ | * [[aircraft: | ||
* [[aircraft: | * [[aircraft: | ||
* [[aircraft: | * [[aircraft: | ||
* [[aircraft: | * [[aircraft: | ||
+ | * [[aircraft: | ||
* [[aircraft: | * [[aircraft: | ||
+ | * [[aircraft: | ||
* [[aircraft: | * [[aircraft: | ||
- | * [[aircraft: | + | * [[aircraft: |
* [[aircraft: | * [[aircraft: | ||
+ | * [[aircraft: | ||
+ | * [[aircraft: | ||
Line 73: | Line 81: | ||
The rendering engine itself can't directly access the user's control inputs or simulate the position of slow moving actuators; this is what the physics engine does. Every animation, therefore, needs to get their inputs from the dynamics section where all the physical movements or delays can be simulated. To send a value from the dynamics section to the graphics section the dynamics section needs to define an ' | The rendering engine itself can't directly access the user's control inputs or simulate the position of slow moving actuators; this is what the physics engine does. Every animation, therefore, needs to get their inputs from the dynamics section where all the physical movements or delays can be simulated. To send a value from the dynamics section to the graphics section the dynamics section needs to define an ' | ||
+ | |||
+ | Collection of the pages relevant to the GraphicObjects section: | ||
+ | * [[aircraft: | ||
+ | * [[aircraft: | ||
+ | * [[aircraft: | ||
+ | * [[aircraft: | ||
+ | * [[aircraft: | ||
+ | |||
==== SoundObjects ==== | ==== SoundObjects ==== | ||
Line 80: | Line 96: | ||
Similar to the graphics section a [[aircraft: | Similar to the graphics section a [[aircraft: | ||
+ | Most relevant pages | ||
+ | * [[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 94: | Line 113: | ||
===== Object structure ===== | ===== Object structure ===== | ||
+ | |||
The example code below creates an object of the class ' | The example code below creates an object of the class ' | ||
Line 113: | Line 133: | ||
</ | </ | ||
- | ===== Object | + | ===== Object |
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 131: | Line 152: | ||
These manually programmed connections allow enormous flexibility, | These manually programmed connections allow enormous flexibility, | ||
- | ===== Object | + | ===== Object |
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 138: | 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 184: | Line 207: | ||
==== Summary ==== | ==== Summary ==== | ||
+ | |||
- The ' | - The ' | ||
- An ' | - An ' |
aircraft/tmd.txt · Last modified: 2022/07/19 21:14 by jh