• 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

Messages
1,468
Country
italy
Hi Tom,
All sems to be working well. The rate of change in the needle movement seems more accurate now. I even have one engine starting hot!
BUT
There is another problem which I can't trace. That is at hot airfields at or above 38c the (L:Eng3 Stable,bool) doesn't trigger. It remains zero.
When the engine is "stable" the (A:General eng3 exhaust gas temperature, celsius) remains higher than (L:EGT3_read_out,number). It's not a problem with the hot start variable as that rewinds back to less than 1 as the EGT comes back from max to 595c.
For an extreme example at Kuwait with an ambient temperature of 45c (A:General eng3 exhaust gas temperature, celsius) settles at 341c whereas for (L:EGT3_read_out,number) the lowest value is 333c. Is it something to do with the range or with (>L:EGT_per_AmbTemp_correction,number) ?
Here's the current code as a reminder.
Code:
<Gauge Name="TGT 3" Version="2.0">
   <Image Name="EGT_back.bmp" Luminous="1"/>

<Element>
        <Select>
            <Value>(A:Ambient Temperature, Celsius) (>L:E3Row1Y1,number)</Value>
        </Select>
    </Element>  
 
 
    <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  L:E3Row1Y1,number)
            16            200
            22            411
            25            490
            30            560
            32            572
            54            289
            56            295
        -->

        (L:E3Row1Y1,number) sp0   <!-- (A:Ambient Temperature, Celsius) = 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,16,(L:E3Row1Y1,number),200)
        @TableRow(16,22,200,411)
        @TableRow(22,25,411,490)
        @TableRow(25,30,490,560)
        @TableRow(30,32,560,572)
        @TableRow(32,54,572,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) 56 > = (A:ENG3 COMBUSTION,bool) and (>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) }
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) if{ (L:EGT3_read_out,number) (L:E3_hotstart, 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="16"/>
      </Rotate>
   </Element>

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

It would appear to be an issue with @Table1((A:Ambient Temperature, Celsius)) 545 / (>L:EGT_per_AmbTemp_correction,number) As if I reduce the 545 to 535 it triggers (L:Eng3 Stable,bool).
 
Last edited:

taguilo

Resource contributor
Messages
1,585
Country
argentina
Volo,

I am rather lost after you additions to my original code.
Perhaps this :

Code:
           <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>

is the origin of you problems at high temperatures, not the table. Why is that you added that snippet?

Besides, what do (L:temp adj3,number), (L:E3_hotstart, number) and (L:LastEGT3,enum) mean? How and where are they updated?

Tom
 
Messages
2,077
Country
us-ohio
The values in the table being used are for normal temperature ranges... it would be illogical to expect them to match high temperature ranges.
 

taguilo

Resource contributor
Messages
1,585
Country
argentina
There is another table that takes care of that, updating (L:EGT_per_AmbTemp_correction,number) variable.

I used Volo's observations on high and low temperature range so it is in fact a convention, but should work rather fine.

Tom
 
Messages
1,468
Country
italy
Volo,

I am rather lost after you additions to my original code.
Perhaps this :

Code:
           <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>

is the origin of you problems at high temperatures, not the table. Why is that you added that snippet?

Besides, what do (L:temp adj3,number), (L:E3_hotstart, number) and (L:LastEGT3,enum) mean? How and where are they updated?

Tom

HI Tom,
(L:temp adj3,number) was an adjustment to an adjustment run in the original code before your tables. It is actually superfluous now so in the code that is currently running I have ditched it.
If you remember I mentioned a few times that the needles were jumping about. That was because (L:Eng3 Stable,bool) was coming on too soon. And the needles went from recording the table overlay code to the real EGT code from the sim. So all the code snippet does is to hold on to your table code longer until the temperatures match. Thus stopping the needles from fluctuating. (A:General eng3 exhaust gas temperature, celsius) 3 - is now (A:General eng3 exhaust gas temperature, celsius) 1 - . I have also significantly slowed down the delay to <Delay DegreesPerSecond="16"/>

I discovered that at extreme temperatures i.e. above 38c and below -20c that (L:Eng3 Stable,bool) didn't trigger at all. So I changed this part of your code to what you see here
Code:
    <Element>
        <Select>
            <Value>
                <!-- 530 Celsius is peak temp at ISA -->
                @Table1((A:Ambient Temperature, Celsius)) 530 / (>L:EGT_per_AmbTemp_correction,number)
                (A:Eng3 N2 RPM, percent) 52 > = (A:ENG3 COMBUSTION,bool) and (>L:Eng3 StableA,bool)
            </Value>
        </Select>
    </Element>
And that seems to have solved that problem. Whether it was correct to change that or to change something else I don't know. But at least it does work.
I have also changed the numbers in the table a bit to produce a sharper curve. This is for engine 3 which I have made to deliberately start a bit hot.
e3.jpg


L:E3_hotstart, number) is outside the EGT gauge code controlled by another "systems" gauge as it were. On the engineer's panel are "Top Temperature" control switches for each engine. If the EGT rises to 595c and above then these switches in the "norm" position divert the excess heat through the airframe anti-ice system. And in fact the airframe anti-ice panel (wot I modelled :yikes:) if opened during the start-up shows the temperature rise if there is a hot start. In the code I replaced the A: EGT var with the one from your code (L:EGT3_read_out,number) and when the temperature gets to and exceeds 595c the difference is fed into (L:E3_hotstart, number). So the needle stays at 595c and the difference is fed into the airframe anti-ice system. The airframe anti-ice system also uses air from the engine cooling system. All these different airflows are "mixed" in the duct resulting in an aiframe anti-ice temp of approx. 240c. before delivery to the leading edge surfaces etc. To be really really really accurate lol the EGT temperature during a hot start doesn't actually stop at 595c but very slowly creeps up a bit more until it drops back. I could model that but.......
Code:
 <Element>
      <Select>
         <Value>(L:EGT3_read_out,number) 595 &gt; (L:E3_tempcontrol,bool) 1 == and
if{ (L:EGT3_read_out,number) 595 - (>L:E3_hotstart, number) } els{ (L:E3_hotstart, number) 0 &gt;
if{ (L:E3_hotstart, number) 1 - (&gt;L:E3_hotstart, number) } }</Value>
      </Select>
   </Element>

(L:LastEGT3,enum)
is used for ambient cooling of the engine after shut-down. Otherwise EGT will drop to ambient temperature immediately when shut down.
Code:
   <Element>
      <Select>
         <Value>(A:General eng3 exhaust gas temperature, celsius) (L:LastEGT3,enum) &gt;= (L:runonce, enum) 1 == &amp;&amp; (A:ENG3 N1 RPM, percent) 0 &gt; &amp
if{ (A:General eng3 exhaust gas temperature, celsius) (>L:ModEGT3,enum) (L:ModEGT3,enum) (>L:LastEGT3,enum) }
els{ (L:ModEGT3,enum) (A:General eng3 exhaust gas temperature, celsius) - abs 12.5 * /-/ 5000 + 2500 min 60 max s0 (L:ModEGT3,enum) (A:General eng3 exhaust gas temperature, celsius) - l0 / (>L:E3TGTcool, enum) (L:E3TGTcool, enum) (A:AIRCRAFT WIND Z,knots) 25 / (A:AIRSPEED TRUE, knot) 10 / + 0.5 max 40 min * (>L:E3TGTcool, enum) (L:LastEGT3,enum) (L:E3TGTcool, enum) - (>L:ModEGT3,enum) (L:ModEGT3,enum) (>L:LastEGT3,enum) </Value>
      </Select>
   </Element>
This correctly uses (A:General eng3 exhaust gas temperature, celsius) as the engines have been started and are running. There is a bit of a twitch if the engines are shut down immediately because it takes time for the code to catch up with (A:General eng3 exhaust gas temperature, celsius) based on the assumption that the engines will have been running for a bit longer.

So the current code for EGT start-up is as below.
Code:
<Gauge Name="TGT 3" Version="2.0">
   <Image Name="EGT_back.bmp" Luminous="1"/>

<Element>
        <Select>
            <Value>(A:Ambient Temperature, Celsius) (>L:E3Row1Y1,number)</Value>
        </Select>
    </Element>
 
 
    <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  L:E3Row1Y1,number)
            16            200
            22            411
            25            480
            30            557
            32            565
            54            294
            56            295
        -->

        (L:E3Row1Y1,number) sp0   <!-- (A:Ambient Temperature, Celsius) = 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,16,(L:E3Row1Y1,number),200)
        @TableRow(16,22,200,411)
        @TableRow(22,25,411,480)
        @TableRow(25,30,480,557)
        @TableRow(30,32,557,565)
        @TableRow(32,54,565,294)
        @TableRow(54,56,294,287)
        @TableEnd(@1,56,287)
        l0   <!-- Return value -->
    </Macro>


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

    <Element>
        <Select>
            <Value>(A:General eng3 exhaust gas temperature, celsius) 1 - (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) }
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) if{ (L:EGT3_read_out,number) (L:E3_hotstart, 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="16"/>
      </Rotate>
   </Element>

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

taguilo

Resource contributor
Messages
1,585
Country
argentina
Volo,

First of all,

(A:Eng3 N2 RPM, percent) 56 > = (A:ENG3 COMBUSTION,bool) and (>L:Eng3 StableA,bool)

must be the only condition to consider an engine "stable", and it is so when it reaches, or almost, normal idle RPM. It does not depend at all on any temperature, so it has nothing to do with high or low ambient temperature at startup.

Before we continue here, please check this VC10 video:


Note how the EGT needle behaves after reaching max temp, and how it lows down until engine "stable" (idle) at or around 58-60% N2 RPM.
I guess ambient temperature on that plane might be ~ ISA (15 C) watching crew clothes, month of the year and location.

Tom
 
Messages
1,468
Country
italy
Hi Tom,
Yes I based my numbers on that video too. Unfortunately the temperature gauge is hidden by the chair back! The video was recorded at Bruntingthorpe on the 30th April 2014 so yes one cannot expect the ambient temperature to be much higher than 15c. If that! The airfield though is at an elevation of 500 feet.
One of the aircraft "maintainers" will do a much more detailed video for me the next time they do an engine run-up. Though that is likely to be again not until April ish.
If I did you another video of the current code you'll see the needles behaving almost exactly as in the video. The dials are not that clear but stop framing the video gave me needle positions that I can equate with the more detailed gauge image in the sim. I'll try and stick up a video of the current code by tomorrow Tom. It's acceptable at the very least. More than, I would say. But then I would say that wouldn't I !!!
In the video his starting sequence is 3 4 2 1 but the video only shows 3 and 4. Obviously I know all the dials and I made engine 3 the hot one instead of 4 as in the video.
 
Last edited:
Messages
1,468
Country
italy
Hi Tom,
There is still a little bit of a problem with (L:LastEGT3,enum). I noticed that it wasn't kicking in and that the engines ran down to zero EGT. So I added this code to the end.
Code:
els{ (A:General eng3 exhaust gas temperature, celsius) (A:Ambient Temperature, Celsius) > (L:EGT3_read_out,number) (A:Ambient Temperature, Celsius) > | (A:ENG3 COMBUSTION,bool) 0 == and if{ (L:LastEGT3,enum) (L:LastEGT3,enum) (>L:EGT3_read_out,number) } }
Which works ok except when the engines are shut down during the start-up itself i.e. while (L:Eng3 Stable,bool) equals zero. In this case the needle runs all the way to the max EGT as prescribed in the tables and back down to zero.
This is the extra code snippet within the main code.
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) - }
 } } } d (>L:EGT3_read_out,number) if{ (L:EGT3_read_out,number) (L:E3_hotstart, number) - els{ (A:General eng3 exhaust gas temperature, celsius) (A:Ambient Temperature, Celsius) > (L:EGT3_read_out,number) (A:Ambient Temperature, Celsius) > | (A:ENG3 COMBUSTION,bool) 0 == and if{ (L:LastEGT3,enum) (L:LastEGT3,enum) (>L:EGT3_read_out,number) } } }
</Value>
With (L:Eng3 Stable,bool) as 1 everything works well and as expected.
 

taguilo

Resource contributor
Messages
1,585
Country
argentina
Volo,

I think numbers in the RAF video are a bit different than in yours, particulary EGT rollback before engine stable. I'll check it in detail and post what I see.

Besides, I notice in your video (and watching the code) that starter switch goes OFF automatically following (L:Ign) variable at 30% N2. Are you sure that is correct? I doubt the engine can substain increasing rotation at half the speed of idle without a starter's aid, that number should be close to 50 %, like in other turbine engines.

Regarding your explanation of hot start and needle not passing 595 C, it doesn't make sense to me either.
First of all, your EGT gauges' bezels show "max EGT 650C", which according to your explanation would never happen as exceeding heat would be released through AIce system.
And, if EGT cannot be measured above 595, how would be possible to identify the severity of a hot start? As you know, engine must be shut if a hot start is suspected by watching temp behavior (rate of change, peak), but if temp is stuck at that value I guess the engine is left running, unless other indications are used besides EGT?

Tom
 
Messages
1,468
Country
italy
Hi Tom,
The starter switches are manual and are held on until about 24%n2. I think it's to do with the igniters. That is correct and according to the manuals. Also the engines are the same in both the civilian and RAF versions. The only difference is that in my BOAC manual which dates from 1975 it has numerous engine limitation schedules. Because at that time there was no FADEC control (nor are there still) or in fact anything! Fuel limiters for overspooling were added much later and are on all the 10's that the RAF took over. So the BOAC crew had to use tables to not advance the throttle to maximum above 20c. Even less above 30c. The practice was for the FE to either advance his throttles or adjust back the throttles after the pilots had advanced them. Not only that on the other side of the coin the FE had a graph to calculate P7 and if the engines did not reach within half a percent the take-off was aborted. Also the Top Temp switches are only used for hot starts. You can just see them in the video above the large EGT gauge. Clearer in my videos. There set correctly according to the checklist to "Norm". If the aircraft is taking-off from a very hot airfield like Kuwait then once started the switches are set to isolate the EGT temperature is then free to go where it wills as all available thrust is required for take-off. In this scenario yes the EGT can rise to the max allowable.
I will have to "consult" about the hot start characteristics as I am sure the EGT does continue to rise beyond 595c.

The difference between hot starts and normal "full" throttle application is that the temperature rise for a hot start is much more rapid and can damage the engine. Normal full throttle application results in a much more gradual AGT increase.
 
Last edited:
Messages
2
Country
colombia
Ok, I was able to make an aproximation for FS2004 of what XMLTables does in FSX.

Here are a couple of basic tables that can be used to calculate engine EGT at startup:

Code:
<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 = lowest 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            400
        25            400
        30            540
        32            545
        54            285
        56            295
    -->

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

    <!-- TableRow meanings
    for each row:
    #1 parameter = lowest row source value
    #2 parameter = greatest row source value
    #3 parameter = return value for lowest row source value
    #4 parameter = return value for greatest row source value
    --> 
    <!-- TableEnd meaning
    #1 parameter = source value
    #2 parameter = greatest row source value of the table
    #3 parameter = return value for greatest row source value of the table
    --> 
    @TableRow(11,16,20,200)
    @TableRow(16,22,200,400)
    @TableRow(22,25,400,400)
    @TableRow(25,30,400,540)
    @TableRow(30,32,540,545)
    @TableRow(32,54,545,285)
    @TableRow(54,56,285,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)
        </Value>
    </Select>
</Element>


<Element>
    <Select>
        <Value>
            @Table2((A:Eng3 N2 RPM, percent)) (L:EGT_per_AmbTemp_correction,number) * 0 max (>L:Eng3 EGT, celsius)
        </Value>
    </Select>
</Element>

Take a look at Table2 to understand how the concept works. It is very simple to adapt it to other needs.


Now, to complete the logic I need to know some things :

-When you switch the starter ON, I guess you are constant firing TOGGLE_STARTER for the proper engine right? What is the LVar name for the Starter switch?

Now, at some point you need to turn on another switch to enable FUEL ON, right? At what point of N2 RPM do you do that? I guess that switch fires a MIXTURE event, right? Are you sending Combustion AVar?

Any other info that might be relevant will be welcomed.

Tom
Hi everyone! I'm new here.

I'm learning about XML and macros.
I would like to know how can I do to make (If the engine shuts down) the needle come back from 295 to 0 without making her come back or go through 285,545,540,400?
Also that the movement of the needle come back slowly simulating the cooling of the engine?

Eduardo
 
Top