• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Adding apples to watermelons

Messages
218
Country
greece
I'm attempting to program a simple variable intake ramp and my <Code> section is this:
Code:
(conditions) if{ (A:AIRSPEED MACH, Mach) 100 * 150 - (A:INCIDENCE BETA, degrees) 6.5 - 7.1429 * - } else{ (A:AIRSPEED MACH, Mach) 100 * 150 - }

What this does is convert Mach to a keyframe [(Mach x 100) - 150] and then add the sideslip shadowing angle multiplied by a number in order to convert it to keyframes [(Beta-6.5) x 7.1429]

Then the two values are subtracted.
Code:
For example, at Mach 2.5 it should give kf100 :(2.5 x 100) - 150=100
At a sideslip angle of 8.5deg, the result of the conversion should be (8.5-6.5) x 7.1429 = 14.2858.
The end result should be 100-14.2858 ~ 86.

The animation doesn't play at all and I had the same problem with another gauge, trying to add acceleration keyframes to fuel quantity keyframes.

So, am I trying to add apples to watermelons, or is it just a syntax error?
 
Last edited:
If your animation has a range of 0-100, it will only work at max Mach of 2.5.
Any lesser Mach value means a negative frame (ie Mach 1.0 = -50)
If this is the case, just divide by Mach top value.

Example: (A:AIRSPEED MACH, Mach) 100 * 2.5 / for a Mach 2.5 top.

Tom
 
I know. It is only supposed to be active from Mach 1.5->2.4
So in the (conditions) I have this stuff defined.
What's strange is that it doesn't work at all.

I also tried assigning the results to an L:var, sort of like this:
Code:
 if{ (A:AIRSPEED MACH, Mach) 100 * 150 - (A:INCIDENCE BETA, degrees) 6.5 - 7.1429 * - (&gt;L:Intakepos, number) } else{ (A:AIRSPEED MACH, Mach) 100 * 150 - (&gt;L:Intakepos, number) }

Still no cigar.
 
It is only supposed to be active from Mach 1.5->2.4

Then, supposing:

Mach-----Frame
1.5 ----- 0
2.4 ----- 100

a useful formula would be (verbosed) :

Code:
(conditions) if{ (A:AIRSPEED MACH, Mach) 111.1111 * 166.66667 - 0 max 100 min  (A:INCIDENCE BETA, degrees) 6.5 - 7.1429 * - } else{ (A:AIRSPEED MACH, Mach) 111.1111 * 166.66667 - 0 max 100 min }

No need to use a Local Var.

Tom
 
Last edited:
Back
Top