• 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.

EPR in fs9

Then take some time to understand XML.
If you notice in the first equation I used several times "pow".
What I want to understand and how can I do something like this:
{A + (X * 2.56) - (57 + Y)]: Z} ^ 3
 
Code:
X 2.56 * A + Y 57 + - Z / 3 pow

That might work.

If you want things to be more understandable in XML's reverse polish notation you can also try to use the stack operators to split the equation into more understandble parts. s0 - write to stack zero, l0 - read from stack zero, s1 - write to stack one, etc...
Code:
X 2.56 * A + s0
57 Y + s1
l0 l1 - Z / s2
l2 3 pow

You also do not have to put the equations for Delta2 and the other variables into your EPR equation. MSFS will read the script from top to bottom 18 times a second and adhere to all (correctly forumlated) read and write commands it encounters.

So...
Code:
X=5
Y=X+20
Z=Y*4
...will evaluate to Z=100.

This...
Code:
X=2
A=4
B=A*X
Y=A/4
Z=X+Y
...will evaluate to B=8, Y=1 and Z=3.
 
If you notice in the first equation I used several times "pow".
What I want to understand and how can I do something like this:
{A + (X * 2.56) - (57 + Y)]: Z} ^ 3
x n pow ....... Power of the first value to the power of the second.

Example:
2 to the 5th power = 3 5 pow = 32

10 to the 3rd power = 10 3 pow = 1000

Simple, eh?
 
So, let's recap:
I want to calculate the EPR function of the thrust.
1) The thrust depends on the temperature, the pressure and the speed.
2) The EPR it from an idea of the thrust, it is calculated as the ratio between the compressor outlet pressure and the pressure before the fan, so it is a reference of the thrust on certain conditions.
3) For these considerations, the thrust from which to calculate my EPR should be that which would be calculated from standstill under normal conditions to SL
So the push is for me is:
(A: TURB ENG1 JET THRUST, pounds) (L: Ram Drag Factor, enum) +
E 'right?
Why appear pounds and enum?
 
You can change "enum" for the variable to "pounds", if it helps. FS9 doesn't care.

And yes F_Gross = F_net + F_ram
 
I tried to approximate an equation table in 1507.
The equation obtained is: Y = -29,43X ^ 3 ^ 2 + 63,32X - 11,87X + 4,685

With X = (A: TURB ENG1 CORRECTED N1 percent) 100 /

XML is:
29.43 / - / (A: TURB ENG1 CORRECTED N1 percent) 100/3 pow * 63.32 (A: TURB ENG1 CORRECTED N1 percent) 100/2 pow 11,87 * + (A: TURB ENG1 CORRECTED N1 , percent) 100 / * - 4,685 +

can you tell me if it is correct?
 
A: Commas between names and units!
B: Decimal signs!

Code:
-29.43 (A: TURB ENG1 CORRECTED N1, percent) 100 / 3 pow * 63.32 (A: TURB ENG1 CORRECTED N1, percent) 100 / 2 pow * + -11.87 (A: TURB ENG1 CORRECTED N1, percent) 100 / * + 4.685 + (>L:Ram Drag Factor, enum)

If this looks too complicated:
Code:
-29.43 (A: TURB ENG1 CORRECTED N1, percent) 100 / 3 pow * s0
63.32 (A: TURB ENG1 CORRECTED N1, percent) 100 / 2 pow * s1
-11.87 (A: TURB ENG1 CORRECTED N1, percent) 100 / * s2
l0 l1 + l2 + 4.685 + (>L:Ram Drag Factor, enum)
 
1)Why you always end up all the codes in this way?

(>L:Ram Drag Factor, enum)

2)" -a = a /-/ "?
 
Last edited:
1) This is the result (answer) of what your formula is calculating! (>L:Ram Drag Factor, enum)
The > (or > symbol) means "stick the answer in this variable".

2) Yes. Either way will have the same result in this specific case. However the symbol /-/ means to "negate the number immediately to the left." However, it is normally used only for special cases.

You could even simply multiply by -1 to achieve the same result!

Example:
  1. -2.84
  2. 2.84 /-/
  3. 2.84 -1 *
All three will have the same end result.

3) Just to clarify "Heretic's" alternate script.
The "s0" means "Store the result of the calculation in temporary memory slot zero."
The "l0" (lower case L) means "Load the result of the calculation stored in temporary memory slot zero."
 
I wrote the equations for the table 1506 for M = 0 and M = 0.9.
But which one to choose? is possibide insert them both?

thrust factor (M=0): 0.921 (A:TURB ENG1 CORRECTED N1,percent) 100 / 2 pow * 0.178 (A:TURB ENG1 CORRECTED N1,percent) 100 / + 0,014 +

thrust factor (M=0.9): 0.604 (A:TURB ENG1 CORRECTED N1,percent) 100 / 2 pow * 0.759 (A:TURB ENG1 CORRECTED N1,percent) 100 / + 0,046 -

it is better to make an equation mean here?
 
1) This is the result (answer) of what your formula is calculating! (>L:Ram Drag Factor, enum)
The > (or > symbol) means "stick the answer in this variable".

Under value I can confine myself to only write the equation?
 
This should be the final equation.
The only problem is that the equation of ram drag the speed is the TAS.
Can someone tell me how you indicate in XML?

Gross thrust: (L:Corrected Net Thrust, enum) (A:AIRSPEED MACH, mach) 32.174 / [Value for intake area from aircraft.cfg] * -29.43 (A:TURB ENG1 CORRECTED N1,percent) 100 / 3 pow * 63.32 (A:TURB ENG1 CORRECTED N1,percent) 100 / 2 pow * + 11.87 (A:TURB ENG1 CORRECTED N1,percent) 100 / * - 4,685 + * (A:AIRSPEED MACH, mach) 2 pow 0.2 * 1 + 288.15 (A:pLANE ALTITUDE,feet) 1000 / 1.98 * - 288.15 / * sqrt * (A:AIRSPEED MACH, mach) 2 pow 0.2 * 1 + 3.5 pow 288.15 (A:pLANE ALTITUDE,feet) 1000 / 1.98 * - 288.15 / 5.256 pow * * +
 
I corrected the Mach in the spray formulations of ram drag, because it must be in ft / sec.
Knowing that 1 M = 1116.44 ft / sec get "(A: AIRSPEED MACH, mach) 1116.44 /"
So the final formula of the gross thrust will be:

Code:
(A: TURB ENG JET THRUST, pounds) (A: AIRSPEED MACH, mach) 1116.44 / 32,174 / 47.5000 * -29.43 (A: TURB ENG1 CORRECTED N1 percent) 100/3 pow * 63.32 (A: TURB ENG1 CORRECTED N1 percent) 100/2 pow * + 11.87 (A: TURB ENG1 CORRECTED N1 percent) 100 / * - + 4.685 * (A: AIRSPEED MACH, mach) 2 pow 0.2 * 1 + 288.15 (A: PLANE ALTITUDE, feet ) 1000 / * 1.98 - 288.15 / * * sqrt (A: AIRSPEED MACH, mach) 2 0.2 * 1 + 3.5 pow pow 288.15 (A: PLANE ALTITUDE, feet) 1000 / * 1.98 - 288.15 / 5,256 pow * * +
[\ Code]

Substituting in the formula EPR get:

[Code]

0002 (A: TURB ENG JET THRUST, pounds) (A: AIRSPEED MACH, mach) 1116.44 / 32,174 / 47.5000 * -29.43 (A: TURB ENG1 CORRECTED N1 percent) 100/3 pow * 63.32 (A: TURB ENG1 CORRECTED N1 percent) 100/2 pow * + 11.87 (A: TURB ENG1 CORRECTED N1 percent) 100 / * - + 4.685 * (A: AIRSPEED MACH, mach) 2 pow 0.2 * 1 + 288.15 (A: PLANE ALTITUDE, feet) 1000 / * 1.98 - 288.15 / * * sqrt (A: AIRSPEED MACH, mach) 2 0.2 * 1 + 3.5 pow pow 288.15 (A: PLANE ALTITUDE, feet) 1000 / * 1.98 - 288.15 / 5,256 pow * * +
 10000/4 pow *

0008 (A: TURB ENG JET THRUST, pounds) (A: AIRSPEED MACH, mach) 1116.44 / 32,174 / 47.5000 * -29.43 (A: TURB ENG1 CORRECTED N1 percent) 100/3 pow * 63.32 (A: TURB ENG1 CORRECTED N1 percent) 100/2 pow * + 11.87 (A: TURB ENG1 CORRECTED N1 percent) 100 / * - + 4.685 * (A: AIRSPEED MACH, mach) 2 pow 0.2 * 1 + 288.15 (A: PLANE ALTITUDE, feet) 1000 / * 1.98 - 288.15 / * * sqrt (A: AIRSPEED MACH, mach) 2 0.2 * 1 + 3.5 pow pow 288.15 (A: PLANE ALTITUDE, feet) 1000 / * 1.98 - 288.15 / 5,256 pow * * +
 10000/3 * pow -

0032 (A: TURB ENG JET THRUST, pounds) (A: AIRSPEED MACH, mach) 1116.44 / 32,174 / 47.5000 * -29.43 (A: TURB ENG1 CORRECTED N1 percent) 100/3 pow * 63.32 (A: TURB ENG1 CORRECTED N1 percent) 100/2 pow * + 11.87 (A: TURB ENG1 CORRECTED N1 percent) 100 / * - + 4.685 * (A: AIRSPEED MACH, mach) 2 pow 0.2 * 1 + 288.15 (A: PLANE ALTITUDE, feet) 1000 / * 1.98 - 288.15 / * * sqrt (A: AIRSPEED MACH, mach) 2 0.2 * 1 + 3.5 pow pow 288.15 (A: PLANE ALTITUDE, feet) 1000 / * 1.98 - 288.15 / 5,256 pow * * +
 10000 / * +

0.997 +

[\ Code]



Unfortunately it does not work .......:(:(:banghead::banghead:
 
yes, using thrust (either net thrust or CN1 to find gross thrust), but you will need to extract the pressure curve for ram pressure (by mach) and any losses in thrust due to utilities or inefficiency (bleed systems, bypass streams, etc).


On a real engine, EPR decreases significantly with speed. This is why EPR is set/crosschecked and throttle position fixed at 80 knots. Similarly, descending at idle at normal speeds will cause most turbofans to fall below 1.00 EPR.


First find the sea level static EPR curve. The Sea Level Static EPR curve is a simple linear function of Gross Thrust.


Once you have an accurate sea level static table, you need to apply decreases with mach and increases with lower temperature. Both will be a curve that is non linear due to ram effect and inefficiencies.


It is easiest to calculate Gross thrust from CN1. They are linearly attached and this automatically accounts for EPR increase with lower temperature (by reducing N1).


The easiest model is:

Static EPR from CN1 * factor of EPR decrease per mach interval


Again, the mach effect will be non-linear. You will need to calculate the changes for each Mach interval from your aircraft data.


This would output something like 2.00 EPR * 0.76 mach factor for a given CN1.
 
Might I suggest you just practice doing some simple XML equations before you try these.
As has been explained a couple of times, the result of an XML equation occurs at the end of the code and is of the form (>L:Ram Drag Factor, enum) You can, instead of using > just use >.
If you just end without that sort of expression there will be a zero result.
Next point, you must not use a comma for a decimal point or your XML will not work. Example, at the end of the code in post #56 you have 5,256 pow. That should be 5.256 pow.
There are other examples that I'll let you find.
Finally, if you want people to seriously look at your code, do not have the code spread over more than one page width, break it up into readable chunks
Roy
 
Might I suggest you just practice doing some simple XML equations before you try these.
As has been explained a couple of times, the result of an XML equation occurs at the end of the code and is of the form (>L:Ram Drag Factor, enum) You can, instead of using > just use >.
If you just end without that sort of expression there will be a zero result.
Next point, you must not use a comma for a decimal point or your XML will not work. Example, at the end of the code in post #56 you have 5,256 pow. That should be 5.256 pow.
There are other examples that I'll let you find.
Finally, if you want people to seriously look at your code, do not have the code spread over more than one page width, break it up into readable chunks
Roy
it is true, I missed a lot "," and I apologize.
As ringuarda closing the code, before I wrote this code in EPR function N1 without the term with "& gt" or ">" has worked great.
The previous code is this:
It is wrong too?

Code:
0.437 (A:TURB ENG3 CORRECTED N1,percent) 100 / 3 pow *
0.041 (A:TURB ENG3 CORRECTED N1,percent) 100 / 2 pow * +
0.016 (A:TURB ENG3 CORRECTED N1,percent) 100 / * - 1.003 +
[\code]
 
Back
Top