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

FS2004 EGT Question

Many thanks Tom,
I'll try that out. I did a "quick fix" on your original code this morning which mostly works shock horror. Your opinion??
I changed
Code:
    <Element>
        <Select>
            <Value>
                <!-- 545 Celsius is peak temp at ISA -->
                @Table1((A:Ambient Temperature, Celsius)) 545 / (>L:EGT_per_AmbTemp_correction,number)
                (A:Eng3 N2 RPM, percent) 55 > (>L:Eng3 Stable,bool)     I changed this to   (>L:Eng3 StableA,bool)     
            </Value>
        </Select>
    </Element>
And then added this
Code:
    <Element>
        <Select>
            <Value>
                (A:General eng3 exhaust gas temperature, celsius) 3 - (L:EGT3_read_out,number) &lt; (L:Eng3 StableA,bool) 0 &gt; and
                if{ 1 (>L:Eng3 Stable,bool) }            
            </Value>
        </Select>
    </Element>
It's a fudge if ever there was one lol.
I'll try your code when I get back from Turin this evening. Alitalia pilot requiring a check-ride. Poverino!!
 
Ok Volo.

BTW, I think you should replace (A:ENG Combustion) variable in the EGT needle element with " (A:GENERAL ENG3 MIXTURE LEVER POSITION, percent ) 0 > ", as combustion perhaps occurs near 20 % N2.

Tom
 
Volo,

Please read post #42. You will have to do that replacement. Even better you could use " (A:GENERAL ENG3 MIXTURE LEVER POSITION, percent ) 0.5 > ".
I am assuming also that you are using the Starter gauge I posted (!)

Tom
 
Volo,

Please read post #42. You will have to do that replacement. Even better you could use " (A:GENERAL ENG3 MIXTURE LEVER POSITION, percent ) 0.5 > ".
I am assuming also that you are using the Starter gauge I posted (!)

Tom

Hi Tom,
Yes I will experiment tomorrow. And I am using the starter gauge :-)
 
Hi Tom,
Your second code even with the corrections you suggested actually doesn't work at all. Combustion doesn't commence until 22%n2 and the EGT gauge behaves as I had originally set it up.
Your first code though does seem to work. The only problem there is there is some time before the numbers agree and (L:Eng3 Stable,bool) is triggered.
 
Volo,

PLEASE, take a time to understand how the code works!!

The logic of the last one, with the MIXTURE ammend MUST work. It is a fact, no doubt at all.
BUT, as I cannot test it, I told you to check for typos and or/inconsistencies
And there is one, crucial: (A:GENERAL ENG3 MIXTURE LEVER POSITION, percent )
The space before the closing parens is wrong. Should be (A:GENERAL ENG3 MIXTURE LEVER POSITION, percent)
I spotted that after a simple inspection of the code.

Tom
 
Hi Tom,
I am not doubting your expertise in any way. In fact you should invoice me for what you have done so far. I will go through the code and check any discrepancies and see what comes up.
I have gone through it and can't find any obvious errors so I don't see why it doesn't work.

This is your first code which I tweaked as mentioned earlier. Which does work. The only drawback is having to wait 30 or so seconds when the engine has stabilised for the numbers to agree and (L:Eng3 Stable,bool) to switch value to 1.
Code:
<Gauge Name="TGT 3" Version="1.0">
   <Image Name="EGT_back.bmp" Luminous="1"/>

    <Macro Name="TableRow">
        l1 @1 > l1 @2 &lt;= and
        if{
            @2 @1 - sp10
            @4 @3 - sp11
            l11 l10 / sp20
            l1 @1 - sp21
            l21 l20 * @3 + sp0
            }
    </Macro>

    <Macro Name="TableEnd">
        @1 @2 >
        if{
            @3 sp0
            }
    </Macro>

    <Macro Name="Table1">
        <!--
 
        -->
        385 sp0   <!-- 385 = lower value to return -->
        @1 sp1   <!-- source value (A:Ambient Temperature, Celsius) -->
        @TableRow(-40,15,385,545)
        @TableRow(15,50,545,630)
        @TableEnd(@1,50,630)
        l0   <!-- Return value -->
    </Macro>



    <Macro Name="Table2">
        <!--

        N2 RPM %    EGT Celsius
        =========================
            11            20
            16            200
            22            398
            25            485
            30            552
            32            560
            54            289
            56            295
        -->

        20 sp0   <!-- 20 = lower value to return -->
        @1 sp1   <!-- source value (A:Eng4 N2 RPM, percent) -->

        <!-- TableRow meanings
        for each row:
        #1 parameter = lowest source value
        #2 parameter = greatest source value
        #3 parameter = return value for lowest source value
        #4 parameter = return value for greatest source value
        -->
        <!-- TableEnd meaning
        #1 parameter = source value
        #2 parameter = greatest source value of the table
        #3 parameter = return value for greatest source value of the table
        -->
        @TableRow(11,16,20,200)
        @TableRow(16,22,200,398)
        @TableRow(22,25,398,485)
        @TableRow(25,30,485,552)
        @TableRow(30,32,552,560)
        @TableRow(32,54,560,289)
        @TableRow(54,56,289,295)
        @TableEnd(@1,56,295)
        l0   <!-- Return value -->
    </Macro>


    <Element>
        <Select>
            <Value>
                <!-- 545 Celsius is peak temp at ISA -->
                @Table1((A:Ambient Temperature, Celsius)) 545 / (>L:EGT_per_AmbTemp_correction,number)
                (A:Eng3 N2 RPM, percent) 55 > (>L:Eng3 StableA,bool)           
            </Value>
        </Select>
    </Element>

    <Element>
        <Select>
            <Value>
                (A:General eng3 exhaust gas temperature, celsius) 3 - (L:EGT3_read_out,number) &lt; (L:Eng3 StableA,bool) 0 &gt; and
                if{ 1 (>L:Eng3 Stable,bool) }           
            </Value>
        </Select>
    </Element>
  
  

    <Element>
      <Position X="448" Y="452"/>
      <Image Name="Needle_EGT.bmp" PointsTo="North" Luminous="1">
         <Axis X="145" Y="365"/>
      </Image>
      <Rotate>
         <Value Minimum="0" Maximum="800">
        (L:Eng3 Stable,bool)
        if{
            (A:General eng3 exhaust gas temperature, celsius) (L:LastEGT3,enum) &gt;
            if{ (A:ENG3 EXHAUST GAS TEMPERATURE, celsius) (L:temp adj3,number) - (L:E3_hotstart, number) - }
            els{ (L:LastEGT3,enum) }
            }
        els{
              (A:Ambient Temperature, Celsius) (A:General eng3 exhaust gas temperature, celsius) > (A:Eng3 N2 RPM, percent) 10 &lt; and
              if{ (A:Ambient Temperature, Celsius) }
              els{
                    @Table2((A:Eng3 N2 RPM, percent)) (L:EGT_per_AmbTemp_correction,number) * 0 max 
                  }
                }
        d (>L:EGT3_read_out,number)
        </Value> 
         <Nonlinearity>
            <Item Value="0" X="111" Y="622"/>
            <Item Value="50" X="90" Y="570"/>
            <Item Value="200" X="98" Y="290"/>
            <Item Value="400" X="402" Y="87"/>
            <Item Value="600" X="754" Y="257"/>
            <Item Value="800" X="774" Y="629"/>
         </Nonlinearity>
        <Delay DegreesPerSecond="60"/>
      </Rotate>
   </Element>

   <Mouse>
    <Tooltip>Engine3 EGT: %((L:EGT3_read_out,number))%!03d!&#176;%c %</Tooltip>
   </Mouse>
</Gauge>



The second code does not start to increase EGT at 11%. It waits until the default 22%n2. So its effect it's no different to the original code.
Code:
<Gauge Name="TGT 3" Version="2.0">
   <Image Name="EGT_back.bmp" Luminous="1"/>

    <Macro Name="TableRow">
        l1 @1 > l1 @2 &lt;= and
        if{ @2 @1 - sp10
            @4 @3 - sp11
            l11 l10 / sp20
            l1 @1 - sp21
            l21 l20 * @3 + sp0 }
    </Macro>

    <Macro Name="TableEnd">
        @1 @2 >
        if{ @3 sp0 }
    </Macro>

    <Macro Name="Table1">
        <!--
 
        -->
        385 sp0 <!-- 385 = lower value to return -->
        @1 sp1 <!-- source value (A:Ambient Temperature, Celsius) -->
        @TableRow(-40,15,385,545)
        @TableRow(15,50,545,630)
        @TableEnd(@1,50,630)
        l0   <!-- Return value -->
    </Macro>



    <Macro Name="Table2">
        <!--

        N2 RPM %    EGT Celsius
        =========================
            11            20
            20            400
            25            400
            30            540
            32            545
            56            430
        -->

        20 sp0   <!-- 20 = lower value to return -->
        @1 sp1   <!-- source value (A:Eng3 N2 RPM, percent) -->

        <!-- TableRow meanings
        for each row:
        #1 parameter = lowest source value
        #2 parameter = greatest source value
        #3 parameter = return value for lowest source value
        #4 parameter = return value for greatest source value
        -->
        <!-- TableEnd meaning
        #1 parameter = source value
        #2 parameter = greatest source value of the table
        #3 parameter = return value for greatest source value of the table
        -->
        @TableRow(11,20,20,400)
        @TableRow(20,25,400,400)
        @TableRow(25,30,400,540)
        @TableRow(30,32,540,545)
        @TableRow(32,56,545,430)
        @TableEnd(@1,56,430)
        l0   <!-- Return value -->
    </Macro>


    <Element>
        <Select>
            <Value>
                <!-- 545 Celsius is peak temp at ISA -->
                @Table1((A:Ambient Temperature, Celsius)) 545 / (>L:EGT_per_AmbTemp_correction,number)
                (A:Eng3 N2 RPM, percent) 56 > = (A:ENG3 COMBUSTION,bool) and (>L:Eng3 Stable,bool)
            </Value>
        </Select>
    </Element>



    <Element>
      <Position X="448" Y="452"/>
      <Image Name="Needle_EGT.bmp" PointsTo="North" Luminous="1">
         <Axis X="145" Y="365"/>
      </Image>
      <Rotate>
         <Value Minimum="0" Maximum="800">
            (L:Eng3 Stable,bool)
if{ (A:General eng3 exhaust gas temperature, celsius) }
els{ (A:Ambient Temperature, Celsius) (A:General eng3 exhaust gas temperature, celsius) > (A:Eng3 N2 RPM, percent) 10 &lt; and
if{ (A:Ambient Temperature, Celsius) }
els{ (A:GENERAL ENG3 MIXTURE LEVER POSITION, percent ) 0 >
if{ @Table2((A:Eng3 N2 RPM, percent)) (L:EGT_per_AmbTemp_correction,number) * 0 max }
els{ (A:General eng3 exhaust gas temperature, celsius) (L:LastEGT3,enum) >
if{ (A:ENG3 EXHAUST GAS TEMPERATURE, celsius) (L:temp adj3,number) - (L:E3_hotstart, number) - }
els{ (L:LastEGT3,enum) } } } } d (>L:EGT3_read_out,number)
        </Value> 
         <Nonlinearity>
            <Item Value="0" X="111" Y="622"/>
            <Item Value="50" X="90" Y="570"/>
            <Item Value="200" X="98" Y="290"/>
            <Item Value="400" X="402" Y="87"/>
            <Item Value="600" X="754" Y="257"/>
            <Item Value="800" X="774" Y="629"/>
         </Nonlinearity>
        <Delay DegreesPerSecond="60"/>
      </Rotate>
   </Element>

   <Mouse>
    <Tooltip>Engine3 EGT: %((L:EGT3_read_out,number))%!03d!&#176;%c %</Tooltip>
   </Mouse>
</Gauge>
I can't see why it doesn't work.
 
Last edited:
I can't see why it doesn't work.

Volo, I've told you why it is not working, in my previous post (!?) Did you read it? :banghead:
Check your code, find the snippet, fix it, try it and let me know.

Afterwards I'll give you some hints on how to check for errors within scripts.

Tom
 
Volo, I've told you why it is not working, in my previous post (!?) Did you read it? :banghead:
Check your code, find the snippet, fix it, try it and let me know.

Afterwards I'll give you some hints on how to check for errors within scripts.

Tom

Well what can I say!! I checked all the spaces too. :confused:
Tom many thanks for your work and assistance. I'll try to learn from the master :)
 
My only experience with a VC-10 was as a passenger - 1998 -Incirlik airbase Turkey, to RAF Akrotiri, Cyprus. The flight engineer prepared us passengers (all US and Brit staff) some lukewarm orange drinks, in paper cups, that he had made from a powder…and stirred with his finger…most excellent!

…I'm not helping this thread am I…back to the coloring book. :)

BTW, that really happened.
 
What! He made the paper cups from powder lol :) If you go to Bruntingthorpe they at least twice a year do a high speed run to test all the car alarms.
 
Last edited:
Well what can I say!! I checked all the spaces too. :confused:
Tom many thanks for your work and assistance. I'll try to learn from the master :)

Tom I decided to add more numbers to the table as it seems to make the needle action smoother. The steeper the curve the slower the rate of change.
The spin-off of doing this is of course that one can have different values for each engine. That leads me to a question. The tables have numbers. Is it possible instead to have variables? As that way I can change the engine reaction more easily.
rate.jpg
 
The tables have numbers. Is it possible instead to have variables?.

Yes it is.

Actually you can define different variables for each row X and Y values, Even you can alter the number of rows dynamically .

For example:

Code:
   <Macro Name="TableX">
       (L:Row1X1,number)  sp0
       @1 sp1
       @TableRow((L:Row1X1,number),(L:Row1X2,number),(L:Row1Y1,number),(L:Row1Y2,number))
       @TableRow((L:Row2X1,number),(L:Row2X2,number),(L:Row2Y1,number),(L:Row2Y2,number))
       (L:Condition1,bool)
       if{
           @TableRow((L:Row3X1,number),(L:Row3X2,number),(L:Row3Y1,number),(L:Row3Y2,number))
          }
       @TableRow((L:Row4X1,number),(L:Row4X2,number),(L:Row4Y1,number),(L:Row4Y2,number))
       @TableEnd(@1,(L:Row4X2,number),(L:Row4Y2,number))
       l0   <!-- Return value -->
  </Macro>

Many combinatios are possible, it's up to you how to arrange each table, providing you keep the basic structure. Bear in mind using var values instead of fixed numbers would make the table difficult to debug. I suggest you first build them with fixed numbers and replace those with var names once proven they work as expected.

And for the payment, that won't be necessary. I am currently working on some aircraft's complex code so making those gauges was kinda relax moment. :cool:
However, if you insist, then please drink a VERY COLD beer in my name (I am sweating bad here at 35 Celsius outside, even with max AC !).

Tom

PS: Beware of coding XML Tables, it can be addictive...
 
Yes it is.

Actually you can define different variables for each row X and Y values, Even you can alter the number of rows dynamically .

For example:

Code:
   <Macro Name="TableX">
       (L:Row1X1,number)  sp0
       @1 sp1
       @TableRow((L:Row1X1,number),(L:Row1X2,number),(L:Row1Y1,number),(L:Row1Y2,number))
       @TableRow((L:Row2X1,number),(L:Row2X2,number),(L:Row2Y1,number),(L:Row2Y2,number))
       (L:Condition1,bool)
       if{
           @TableRow((L:Row3X1,number),(L:Row3X2,number),(L:Row3Y1,number),(L:Row3Y2,number))
          }
       @TableRow((L:Row4X1,number),(L:Row4X2,number),(L:Row4Y1,number),(L:Row4Y2,number))
       @TableEnd(@1,(L:Row4X2,number),(L:Row4Y2,number))
       l0   <!-- Return value -->
  </Macro>

Many combinatios are possible, it's up to you how to arrange each table, providing you keep the basic structure. Bear in mind using var values instead of fixed numbers would make the table difficult to debug. I suggest you first build them with fixed numbers and replace those with var names once proven they work as expected.

And for the payment, that won't be necessary. I am currently working on some aircraft's complex code so making those gauges was kinda relax moment. :cool:
However, if you insist, then please drink a VERY COLD beer in my name (I am sweating bad here at 35 Celsius outside, even with max AC !).

Tom

PS: Beware of coding XML Tables, it can be addictive...

Tom,
Many thanks. Being able to use vars opens up a lot of possibilities. I can vary the engine's "apparent" performance. With say onr engine running hot under certain conditions. I shall have a cold beer lined up when I get back from Milan tomorrow. I might also have a limoncello to follow :-)
 
Tom,
Had a beer in your honour! This is the fruit of your labour.
At around 400c plus the needles rise a little too fast. Do I change the n2 or the temperature values?
Also I applied my quick fix to stop the needles twitching.
 
Hi Tom,
Some progress. I noticed that the needles twitched as they started moving. This was because the starting temperature was hard coded to 20. Using what you have showed regarding the use of variables instead of hard numbers, I experimented with putting a var in its place.
Code:
<Element>
        <Select>
            <Value>(A:Ambient Temperature, Celsius) (>L:E3Row1Y1,number)</Value>
        </Select>
    </Element>
And then placing that var in the relevant positions.
Code:
        (L:E3Row1Y1,number) sp0   <!-- (A:Ambient Temperature, Celsius) = lower value to return -->
        @1 sp1   <!-- source value (A:Eng3 N2 RPM, percent) -->
and
Code:
@TableRow(11,16,(L:E3Row1Y1,number),200)
It works nicely. Many thanks.

I also made some excel graphs to plot the needle movements. This is the one for Engine 2. It's starting to behave more accurately now. Lots more tweaking to do though. And the next time they do a full engine run-up on the real aircraft they are going to record the actual numbers for me blow by blow.
rate2.jpg
 
Last edited:
Volo,

Great progress! I'm glad that you got the point on all that stuff.

Keep up the good work!

Tom
 
Volo,

Great progress! I'm glad that you got the point on all that stuff.

Keep up the good work!

Tom
Just the hot start to remap.
In this code it only appears outside the macro code. So I'm experimenting with the best place to put it so that it works during the macro execution (which it doesn't at the moment).
Code:
<Value Minimum="0" Maximum="800">
            (L:Eng3 Stable,bool)
if{ (A:General eng3 exhaust gas temperature, celsius) }
els{ (A:Ambient Temperature, Celsius) (A:General eng3 exhaust gas temperature, celsius) > (A:Eng3 N2 RPM, percent) 10 &lt; and
if{ (A:Ambient Temperature, Celsius) }
els{ (A:GENERAL ENG3 MIXTURE LEVER POSITION, percent) 0 >
if{ @Table2((A:Eng3 N2 RPM, percent)) (L:EGT_per_AmbTemp_correction,number) * 0 max }
els{ (A:General eng3 exhaust gas temperature, celsius) (L:LastEGT3,enum) >
if{ (A:ENG3 EXHAUST GAS TEMPERATURE, celsius) (L:temp adj3,number) - (L:E3_hotstart, number) - }
els{ (L:LastEGT3,enum) } } } } d (>L:EGT3_read_out,number)
        </Value>
This snippet (L:temp adj3,number) - (L:E3_hotstart, number) -
I think should go here-ish if{ @Table2((A:Eng3 N2 RPM, percent)) (L:EGT_per_AmbTemp_correction,number) * 0 max }
It looks like I'll have to re-write the whole hot start routine anyway.
 
Last edited:
This seems to do the trick
Code:
els{ (L:LastEGT3,enum) } } } } d (>L:EGT3_read_out,number) if{ (L:EGT3_read_out,number) (L:E3_hotstart, number) - }</Value>
The EGT in the new code does rise phenomenally at airports like Kuwait. And is quite correct. But, such a high hot start temperature would damage the engine. The top temperature control switches limit it to 595c and the excess heat is dissipated through the anti-ice system.
 
Back
Top