User Tools

Site Tools


aircraft:tmd:logic

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:logic [2019/07/12 21:11] jhaircraft:tmd:logic [2022/07/19 21:04] (current) – [input_active] jh
Line 1: Line 1:
-====== Math ======+====== Math And Logic in Aerofly FS 2 ======
  
 +Aerofly FS 2 [[aircraft:tmd|TMD]] programming is touring complete, which means you can create pretty much any arbitrary complexity and actually code real programs within the tmd.
 +
 +There is a wide range of objects available for you to set up your digital systems or simulate new physical system within the tmd.
 +
 +From simple scaling to complex logic circuits and even flight controller programming, the set of available objects has you covered.
 +
 +Together with the powerful [[aircraft:tmd:events|event programming]] even complex menu systems, iterations, integrations, delays and a lot more are possible to create.
 +
 +> All of the following components have an ''Output'' function. This makes it very easy to set up and chain together. Few of them have more than one output.
 +===== Simple Algebra =====
 +
 +Let us introduce the simple mathematical building blocks one at a time.
 ==== constant ==== ==== constant ====
  
Line 19: Line 31:
                 <[string8][Input][A.Output]>                 <[string8][Input][A.Output]>
                 <[float64][Scaling][1.0]>                 <[float64][Scaling][1.0]>
-                <[string8][Offset][0.0]>+                <[float64][Offset][0.0]>
             >             >
 </code> </code>
Line 147: Line 159:
 </code> </code>
  
-===== Dynamic Values =====+===== Dynamic Systems =====
  
 +Moving on from the basic functions, let's get into the more advanced mathematics.
 ==== integral ==== ==== integral ====
  
Line 158: Line 171:
 Integrating over the rotation speed give the total rotation angle. Integrating 1.0 gives the total time that the simulation run. Integrating the on ground sensor output gives the total time on ground. Integrating over the rotation speed give the total rotation angle. Integrating 1.0 gives the total time that the simulation run. Integrating the on ground sensor output gives the total time on ground.
  
-The integral can be reset to 0.0 with an [[tmd:aircraft:events|event]].+The integral can be reset to 0.0 with the ''Reset'' event.
  
 <code>            <[integral][LeftEngineFanRotationAngle][] <code>            <[integral][LeftEngineFanRotationAngle][]
Line 225: Line 238:
 </code> </code>
  
-====== Logic Circuits ====== +===== Binary / Discretization =====
- +
-===== Any value to binary =====+
  
 ==== logic_greater ==== ==== logic_greater ====
Line 330: Line 341:
 </code> </code>
  
-===== Discrete and Binary Operations =====+===== Logic Gates =====
  
 ==== input_active ==== ==== input_active ====
  
 Returns 1.0 as long as a button is depressed. Returns 0.0 if not. Returns 1.0 as long as a button is depressed. Returns 0.0 if not.
-Incoming messages are filtered with the InputValue (see [[tmd:aircraft:inputs|Inputs]].+Incoming messages are filtered with the InputValue (see [[aircraft:tmd:inputs|Inputs]]).
  
 <code>            <[input_active][ButtonDepressed][] <code>            <[input_active][ButtonDepressed][]
aircraft/tmd/logic.1562958686.txt.gz · Last modified: 2019/07/12 21:11 by jh