aircraft:tmd:logic
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
aircraft:tmd:logic [2019/07/12 20:37] – jh | aircraft:tmd:logic [2022/07/19 21:03] – [integral] jh | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Logic Circuits | + | ====== |
- | ===== Math ===== | + | Aerofly FS 2 [[aircraft: |
+ | 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, | ||
+ | |||
+ | Together with the powerful [[aircraft: | ||
+ | |||
+ | > All of the following components have an '' | ||
+ | ===== Simple Algebra ===== | ||
+ | |||
+ | Let us introduce the simple mathematical building blocks one at a time. | ||
==== constant ==== | ==== constant ==== | ||
Line 21: | Line 31: | ||
< | < | ||
< | < | ||
- | <[string8][Offset][0.0]> | + | <[float64][Offset][0.0]> |
> | > | ||
</ | </ | ||
Line 149: | Line 159: | ||
</ | </ | ||
- | ===== Dynamic | + | ===== Dynamic |
+ | Moving on from the basic functions, let's get into the more advanced mathematics. | ||
==== integral ==== | ==== integral ==== | ||
+ | |||
+ | Integrates the input with time. When the input is 1.0 then the output changes by 1.0 each second. When the input is 0.0 the output value doesn' | ||
+ | |||
+ | Can also be used to simulate first and second order systems with the input being the differential equation for the rate of change. | ||
+ | |||
+ | Examples: | ||
+ | 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 the '' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
==== differentiator ==== | ==== differentiator ==== | ||
- | ==== delay_clamped ==== | + | Differentiates the input value over time. When the input increases very quickly the output is very high and returns the rate of change. When the input remains constant the output is zero. |
+ | |||
+ | Most airliners have a speed trend arrow on the primary flight displays. The airspeed is differentiated to get the rate of change of the airspeed, the airspeed trend. | ||
+ | |||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
==== first_order_low_pass ==== | ==== first_order_low_pass ==== | ||
+ | Simulates a first order system where the rate of change is proportional to the difference between the output and the input. | ||
+ | Great low pass filter! | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ==== delay_clamped ==== | ||
+ | |||
+ | The output slowly follows the input with the set '' | ||
+ | |||
+ | Sort of like a slow dog on a leash that trots along when you walk slowly but as you start running the dog is more or less pulled along. | ||
+ | |||
+ | The output stays clamped within the Input +/- the threshold border. | ||
+ | |||
+ | Useful to detect if the pitch trim is running away, or in other words: the input is constantly changing in one direction so that the output can't keep up. In this case the OutputClamped would be used. | ||
+ | |||
+ | < | ||
+ | // One direction: | ||
+ | // Input moving: | ||
+ | // Output | ||
+ | // | ||
+ | // Input moving: | ||
+ | // Output | ||
+ | // | ||
+ | // Other direction | ||
+ | // Input moving: | ||
+ | // Output | ||
+ | // | ||
+ | // Input moving: | ||
+ | // Output | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
- | ===== Any value to binary | + | ===== Binary / Discretization |
==== logic_greater ==== | ==== logic_greater ==== | ||
Line 222: | Line 299: | ||
</ | </ | ||
- | ===== Binary | + | ==== variable |
+ | |||
+ | Can dynamically be assigned using [[aircraft: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ==== state_frozen ==== | ||
+ | |||
+ | Follows the input as long as it is enabled. When InputEnable drops below 0.5 the output value doesn' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ==== logic_confirm_delay ==== | ||
+ | |||
+ | Same as logic_greater but with an adjustable time delay. | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ==== flasher_rectangle ==== | ||
+ | |||
+ | Periodically turns on and off. The total time in seconds for a cycle is the '' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ===== Logic Gates ===== | ||
+ | |||
+ | ==== input_active ==== | ||
+ | |||
+ | Returns 1.0 as long as a button is depressed. Returns 0.0 if not. | ||
+ | Incoming messages are filtered with the InputValue (see [[tmd: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ==== input_binary ==== | ||
+ | |||
+ | Binary | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
+ | |||
+ | ==== input_discrete | ||
+ | |||
+ | Simulated integer state within a certain range. E.g. can be used for the selected menu item, to step through a range setting, digital volume setting, etc. | ||
+ | |||
+ | '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | > | ||
+ | </ | ||
==== logic_invert ==== | ==== logic_invert ==== | ||
Line 314: | Line 473: | ||
| OutputExclusively7 | Only the eighth input above 0.5 | | | OutputExclusively7 | Only the eighth input above 0.5 | | ||
- | ==== input_active ==== | ||
- | |||
- | Returns 1.0 as long as a button is depressed. Returns 0.0 if not. | ||
- | Incoming messages are filtered with the InputValue (see [[tmd: | ||
- | |||
- | < | ||
- | < | ||
- | < | ||
- | > | ||
- | </ | ||
- | |||
- | ==== variable ==== | ||
- | |||
- | Can dynamically be assigned using [[aircraft: | ||
- | |||
- | < | ||
- | < | ||
- | > | ||
- | </ | ||
- | |||
- | ==== state_frozen ==== | ||
- | |||
- | Follows the input as long as it is enabled. When InputEnable drops below 0.5 the output value doesn' | ||
- | |||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | > | ||
- | </ | ||
- | |||
- | ==== logic_confirm_delay ==== | ||
- | |||
- | Same as logic_greater but with an adjustable time delay. | ||
- | |||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | > | ||
- | </ | ||
- | |||
- | ==== flasher_rectangle ==== | ||
- | |||
- | < | ||
- | </ | ||
- | |||
- | ==== state_frozen ==== | ||
- | |||
- | < | ||
- | </ | ||
aircraft/tmd/logic.txt · Last modified: 2022/07/19 21:04 by jh