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

FSX Engine Starter Sequence...

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
...or, how to spend the entire day in utter frustration... :rotfl:

1. Engine Start Sequence

FWIW, after five hours of head-banging, I finally got the bloody "air starter" working in the T-38A. Have I ever mentioned just how annoying -not to mention FUBARed- FS's starter system is?

There is only one TOGGLE_STARTERn command, click once and the starter engages, and won't disengage automatically after engine start.

It's especially a PITA when one only presses the starter button momentarialy, because it's difficult to stop the starter that way.

Anyway, I remembered having written code in C++ for just this type of system, I had to "translate" it into XML ass-backwards syntax...

Here then is the XML Kung-Fu necessary:
Code:
[COLOR="Red"]<!-- ENGINE STARTER SYSTEM LOGIC -->[/COLOR]
  <Update>

    [COLOR="red"]<!-- LEFT ENGINE -->[/COLOR]
    (A:TURB ENG CORRECTED N2:1,percent) 23 &lt;
    (L:StarterLeft,bool) 1 == and
    (L:StartLeftLatch,bool) 0 == and
    (A:ELECTRICAL MASTER BATTERY,bool) 1 == and
    if{ (>K:TOGGLE_STARTER1) 1 (>L:StartLeftLatch,bool) }
    els{ 
    (A:TURB ENG CORRECTED N2:1,percent) 23 &gt;
    (L:StartLeftLatch,bool) 1 == and
    if{ (>K:TOGGLE_STARTER1) 0 (>L:StarterLeft,bool) 0 (>L:StartLeftLatch,bool) }

    (L:StarterLeft,bool) 0 ==
    (A:GENERAL ENG STARTER ACTIVE:1,bool) and
    if{ (>K:TOGGLE_STARTER1) 0 (>L:StartLeftLatch,bool) }

    [COLOR="Red"]<!-- RIGHT ENGINE -->[/COLOR]
    (A:TURB ENG CORRECTED N2:2,percent) 23 &lt;
    (L:StarterRight,bool) 1 == and
    (L:StartRightLatch,bool) 0 == and
    (A:ELECTRICAL MASTER BATTERY,bool) 1 == and
    if{ (>K:TOGGLE_STARTER2) 1 (>L:StartRightLatch,bool) }
    els{
    (A:TURB ENG CORRECTED N2:2,percent) 23 &gt;
    (L:StartRightLatch,bool) 1 == and
    if{ (>K:TOGGLE_STARTER1) 0 (>L:StarterRight,bool) 0 (>L:StartRightLatch,bool) }

    (L:StarterRight,bool) 0 ==
    (A:GENERAL ENG STARTER ACTIVE:2,bool) and
    if{ (>K:TOGGLE_STARTER2) 0 (>L:StartRightLatch,bool) }
  </Update>
[COLOR="red"]<!-- END ENGINE STARTER SYSTEM LOGIC -->

<!-- LEFT STARTER BUTTON -->[/COLOR]
  <PartInfo>
    <Name>T38_switch_starter_left</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>(L:StarterLeft_reset) (P:local time, seconds) &gt; if{ 50 } els{ 0 }</Code>
        <Lag>400</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <HelpID>HELPID_GAUGE_STARTER_SWITCH</HelpID>
      <TooltipID>TOOLTIPTEXT_STARTER_SWITCH</TooltipID>
      <CallbackCode>
        1 (>L:StarterLeft,bool)
        (P:local time, seconds) 0.5 + (>L:StarterLeft_reset)
      </CallbackCode>
    </MouseRect>
  </PartInfo>

[COLOR="red"]<!-- RIGHT STARTER BUTTON -->[/COLOR]
  <PartInfo>
    <Name>T38_switch_starter_right</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>(L:StarterRight_reset) (P:local time, seconds) &gt; if{ 50 } els{ 0 }</Code>
        <Lag>400</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <HelpID>HELPID_GAUGE_STARTER_SWITCH</HelpID>
      <TooltipID>TOOLTIPTEXT_STARTER_SWITCH</TooltipID>
      <CallbackCode>
        1 (>L:StarterRight,bool)
        (P:local time, seconds) 0.5 + (>L:StarterRight_reset)
      </CallbackCode>
    </MouseRect>
  </PartInfo>
 
Last edited:

Roy Holmes

Resource contributor
Messages
1,795
Country
us-virginia
Starter

Bill,

That solves a problem I have had ever since FSX came out. They changed the system to be like the A321. I believe this aircraft has the starter continually engaged in flight so that it will automatically restart after a flame-out.

I tried using Turb Eng Master Starter Switch, but the problem with that is it shuts down the engine if you switch it off!

Off to fix starters in 12 projects,
Thanks
Roy
 

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
Hi Roy. I'm glad you find this useful!

Here is the detailed description of the squawk I had to resolve, from a T-38A instructor pilot's perspective:

2) The engine start sequence is a bit off. The Engine Start buttons should position the air diverter valve, and arm the ignition. I assume you're simulating a start cart that's always attached and available, right? The button should only have to be pressed momentarily, and the start cart will accelerate the engine.

At 14%, the throttle lever should be moved from Cutoff to to Idle, using the finger lifts. This action activates the ignitors and starts the fuel flow. Assuming yuo're not going to model malfunctions, lightoff should occur within 5 seconds of moving the throttle to Idle, and the engine should accelerate to stabilized idle.

When 30 seconds elapses from the time the button was pressed, the diverter valve closes and ignition ceases. There's some issues with the 30 second time limit when starting both engines in rapid succession, but I don't know if you intend to model that or not.

Some notes about the actual script I wrote might prove useful as well:

1. Mouse scripts
Code:
     <Code>(L:StarterLeft_reset) (P:local time, seconds) &gt; if{ 50 } els{ 0 }</Code>
     <Lag>400</Lag>


      <CallbackCode>
        1 (>L:StarterLeft,bool)
        (P:local time, seconds) 0.5 + (>L:StarterLeft_reset)
      </CallbackCode>
The "timer" created by the mouse click is used only for animation of the physical button in the model. Clicking on it will cause it to depress, and return automatically after 0.5 seconds. The <Lag> simply slows the animation a bit.

The (L:StarterLeft,bool) variable is used to signal the "logic" that the button was pressed.

2. Logic Section
The logic section is where the real work is done.
Code:
    [COLOR="Red"]<!-- LEFT ENGINE -->[/COLOR]
    (A:TURB ENG CORRECTED N2:1,percent) 23 &lt;
    (L:StarterLeft,bool) 1 == and
    (L:StartLeftLatch,bool) 0 == and
    (A:ELECTRICAL MASTER BATTERY,bool) 1 == and
    if{ (>K:TOGGLE_STARTER1) 1 (>L:StartLeftLatch,bool) }
    els{ 
    (A:TURB ENG CORRECTED N2:1,percent) 23 &gt;
    (L:StartLeftLatch,bool) 1 == and
    if{ (>K:TOGGLE_STARTER1) 0 (>L:StarterLeft,bool) 0 (>L:StartLeftLatch,bool) }

    (L:StarterLeft,bool) 0 ==
    (A:GENERAL ENG STARTER ACTIVE:1,bool) and
    if{ (>K:TOGGLE_STARTER1) 0 (>L:StartLeftLatch,bool) }
As mentioned above, the (L:StarterLeft,bool) is flagged to indicate that the button was pressed. We need another flag to indicate when the starter has been engaged which is (L:StartLeftLatch,bool).

The first thing we do is evaluate for battery on, N2% less than 23%, starter button pressed, and starter not engaged. If all conditions are TRUE, then we send the TOGGLE_STARTER command and set the latch flag TRUE.

The els{ if{ section evaluates N2% over 23% and the starter latch, when both are TRUE, we send the TOGGLE_STARTER command again, and set the latch flag and button flag back to FALSE.

The final section of the logic is a "catch all" routine that will detect occasional FS foibles and force the starter to disengage if somehow the silly thing gets "stuck..." :D

3. Turbine N2%
The specific N2% limit of 23% I've used may or may not be valid for all flight models. You may have to adjust that limit for your specific engine's parameters.
 

hairyspin

Resource contributor
Messages
3,253
Country
unitedkingdom
This might be a bit elementary, but is it possible to set up a startup sequence other than engines 1,2,3 and finally 4? I'm thinking of some classic multi-engined aircraft like the Avro Lancaster which starts 3-4-2-1, but I'm sure I wouldn't want the throttles arranged thus in the VC :(
 

Roy Holmes

Resource contributor
Messages
1,795
Country
us-virginia
Engine starting sequence

Tom,
The easiest way to do this is simply have four engine start switches and operate them in whatever sequence you want.

Roy
 

Roy Holmes

Resource contributor
Messages
1,795
Country
us-virginia
Starter code

Hi Bill,
Thanks for the background to why you coded it this way. I was able to follow your logic on first read through since it was so "logical"!

The T-38 has what I would call a combined High Pressure Cock and Throttle which I suppose could be modelled by turning on the engine fuel cock when N2 reaches 14%. Just a thought, might make your instructor more happy! Basically that equates to moving the Throttle from Cut-off to Idle.

Half of my "fleet" are turbojets with one big shaft connecting the compressor and turbine. Had a lot of fun getting N1 and N2 to stay the same, but I guess that is a Flight Dynamics issue. However while I'm on the engine subject, FS adjusts engine thrust according to inverse pressure ratio instead of density ratio. This is why thrust falls off at the wrong rate as altitude is increased. I have been able to fix that by drastic changes to the turbo tables in the air file.

If your instructor wants the altitude performance to match the manual you might need to look at that topic also.

Roy
 
Messages
497
Country
unitedstates
However while I'm on the engine subject, FS adjusts engine thrust according to inverse pressure ratio instead of density ratio. This is why thrust falls off at the wrong rate as altitude is increased. I have been able to fix that by drastic changes to the turbo tables in the air file.

If your instructor wants the altitude performance to match the manual you might need to look at that topic also.

Roy

Roy

Would you be willing to share what you did to the airfile turbo tables, to make the thrust change correctly with altitude ..

Maybe an example of the table, before and after !! :)

Geoff
 

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
Hi Bill,
Thanks for the background to why you coded it this way. I was able to follow your logic on first read through since it was so "logical"!

The T-38 has what I would call a combined High Pressure Cock and Throttle which I suppose could be modelled by turning on the engine fuel cock when N2 reaches 14%. Just a thought, might make your instructor more happy! Basically that equates to moving the Throttle from Cut-off to Idle.

As a matter of fact Roy, I use the FS fuel values as they were intended. On the T-38A/C they are guarded switches, and are intended only for emergency use.

Because FS doesn't make provision for "Idle Cutoff," what I've done is to issue Mixture Full and Mixture Cut commands for the power lever's "finger lifts."

A nice side benefit of this is that I no longer have to explain to users that they must have any physical mixture lever(s) on their hardware set to full...

...which of course has always prompted said users to exclaim that "jets don't use mixture controls!" Of course they don't, but FS nonetheless isn't coded that way! :rotfl:

The following is in an init section and only executes on first load. It allows the user to save a flight in midair, then reload the flight later with engines running.
Code:
          <!-- SET FUEL ON IF ENGINE(S) RUNNING ON LOAD -->
          (A:GENERAL ENG COMBUSTION:1, bool)
          if{ 1 (>L:T38_FuelCutoff_Left,bool) }
          (A:GENERAL ENG COMBUSTION:2, bool)
          if{ 1 (>L:T38_FuelCutoff_Right,bool) }
The following is contained in the logic section of the script so it will follow the mouse actions.
Code:
          <!-- SET FUEL CUTOFF(S) TO SHUT DOWN ENGINE(S) -->
          (L:T38_FuelCutoff_Left,bool) 1 ==
          if{ (&gt;K:MIXTURE1_RICH) }
          els{ (&gt;K:MIXTURE1_LEAN) }
          (L:T38_FuelCutoff_Right,bool) 1 ==
          if{ (&gt;K:MIXTURE2_RICH) }
          els{ (&gt;K:MIXTURE2_LEAN) }
          }

Thankfully, I don't have to worry about the FDE as Bernt Stole is taking very good care of that for this project! ;)
 

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
This might be a bit elementary, but is it possible to set up a startup sequence other than engines 1,2,3 and finally 4? I'm thinking of some classic multi-engined aircraft like the Avro Lancaster which starts 3-4-2-1, but I'm sure I wouldn't want the throttles arranged thus in the VC :(

Assuming that you're referring to FS's lamentable "Auto Start" no. However, it's a trivial matter to set up any sequence you want for a single button "Auto Start" sequence...

...it just won't be "keyboardable," but limited to a mouse rectangle.
 

Roy Holmes

Resource contributor
Messages
1,795
Country
us-virginia
Turbo Air Tables

Geoff,

What I'll do is prepare a short article of the subject and post it in the Flight Dynamics section. Probably take a day or so.

Roy
 

Roy Holmes

Resource contributor
Messages
1,795
Country
us-virginia
Engine fuel valves

Bill,
Neat way to emulate the fuel cut-off. The mixture control acts on high pressure fuel so that is the way to go. A fuel valve in FS is like a Low Pressure cock, stops the flow to the HP fuel pump. Using the LP cock to shut down an engine does nasty things to the fuel pump and is an emergency procedure as you said. The mixture control can also be used as a condition lever to reduce ground idle thrust in turbines like those in the KingAir and turbo helos.

Thanks again for the code and explanation
Roy
 

hairyspin

Resource contributor
Messages
3,253
Country
unitedkingdom
Assuming that you're referring to FS's lamentable "Auto Start" no. However, it's a trivial matter to set up any sequence you want for a single button "Auto Start" sequence...

...it just won't be "keyboardable," but limited to a mouse rectangle.

That was it, thanks Bill! :)
 
Messages
28
Country
monaco
I come a bit late on this thread, but I recently disovered in fs9gauges.h that KEY_STARTER1_OFF has the same ID than KEY_MAGNETO1_OFF and the first one has disapeared in fsxgauges.h.
Here is what I found in fs9gauges.h :

#define KEY_MAGNETO1_OFF (KEY_ID_MIN + 391)
#define KEY_STARTER1_OFF (KEY_ID_MIN + 391)
#define KEY_MAGNETO1_RIGHT (KEY_ID_MIN + 392)
#define KEY_STARTER1_START (KEY_ID_MIN + 392)
#define KEY_MAGNETO1_LEFT (KEY_ID_MIN + 393)
#define KEY_STARTER1_GEN (KEY_ID_MIN + 393)
#define KEY_MAGNETO1_BOTH (KEY_ID_MIN + 394)
#define KEY_MAGNETO1_START (KEY_ID_MIN + 395)
#define KEY_STARTER1_SET (KEY_ID_MIN + 396)

In fsxgauges.h you will find:

#define KEY_MAGNETO1_OFF (KEY_ID_MIN + 391)
#define KEY_MAGNETO1_RIGHT (KEY_ID_MIN + 392)
#define KEY_MAGNETO1_LEFT (KEY_ID_MIN + 393)
#define KEY_MAGNETO1_BOTH (KEY_ID_MIN + 394)
#define KEY_MAGNETO1_START (KEY_ID_MIN + 395)
#define KEY_STARTER1_SET (KEY_ID_MIN + 396)

So you can stop the starter with KEY_MAGNETOx_OFF in FSX.

Hope this helps
Jean-Pierre
 

n4gix

Resource contributor
Messages
11,662
Country
unitedstates
I come a bit late on this thread, but I recently disovered in fs9gauges.h that KEY_STARTER1_OFF has the same ID than KEY_MAGNETO1_OFF and the first one has disapeared in fsxgauges.h.
Here is what I found in fs9gauges.h :

None of which has much relevance to XML scripted K: events, unfortunately. I actually tried using the XML (>K:MAGNETO1 OFF) event and found that it simply doesn't work.

As noted, it does seem to work in a pure C gauge though...
 
Messages
497
Country
unitedstates
Interesting

KEY_STARTER1_SET (KEY_ID_MIN + 396)

KEY_STARTER2_SET
KEY_STARTER3_SET
KEY_STARTER4_SET

Are not included in FSUIPs list of events, but fill in "holes" in the list.

Probably not relevent to what you are talking about, but of interesting significance to me, and what I am doing. :)

Got me now wondering what goes in the other "holes"

=========================================

Have just checked out fsxgauges.h -- {sigh} -- another Pandora's Box opened !!!

Interesting reading. You can tell when different developers have added different data. Some document, some format, some don't !. ( some can SPELL, other's it would seem, cannot --- amazing anything works !! -- or maybe thats why so much does not )

Geoff
 
Last edited:
Top