Hi again!
My next pain in FSX conversion of my panel / gauges: The starters are doing very strange things...
My starting code does the following:
This works very nicely in FS9 along with my modified .air tables, but in FSX there are several problems.
I'm obviously doing something silly because I have read in many threads how FS9 XML will work fine in FSX, but that is clearly not the case.
Geoff
PS. Actual code, it's a bit of a mess as all the 'interaction with the rest of the system is there as well...
Starter switch:
Elsewhere in systems code:
My next pain in FSX conversion of my panel / gauges: The starters are doing very strange things...
My starting code does the following:
- Set starter on with mouse click, as long as certain conditions are met, and a timer of 5 seconds in which time it will fire continuously until a rise in N2 is seen.
- Set mixture rich after 23 seconds (just happens to work best) as long as fuel valve is open. In practice, the pilot should only open the valve once the N2 is stable and this is usually longer.
This works very nicely in FS9 along with my modified .air tables, but in FSX there are several problems.
- One is that during start, the N2 spoolup is different (much slower) than FS9 and unless I toggle the mixture (fire handle is good for that but really isn't ideal
) it won't always go above 14% N2. - Then, if I do actually get the engine to start, the starter does not cut out, even if I toggle it. Something 'keeps it alive'.
- Finally, I cannot then get the engine to shut down easily. Even switching the fuel valves off and turning the fire handle (mixture lean) will not properly turn the engine off as the starter is still alive!
I'm obviously doing something silly because I have read in many threads how FS9 XML will work fine in FSX, but that is clearly not the case.
Geoff
PS. Actual code, it's a bit of a mess as all the 'interaction with the rest of the system is there as well...
Starter switch:
Code:
<Gauge Name="Engine Start light 1" Version="1.0">
<Element>
<Select>
<Value>(G:Var1) if{ (L:Air1startAVAIL, enum) 0 == (A:AIRSPEED TRUE, knot) 180 < && (L:ElecAVAIL, enum) 0 == (L:FENG1AVAIL, enum) 0 == (L:StartTIMER1,enum) 1500 > (L:MOD Eng1 oil quantity, percent) 0 max 99 min 55 < (L:ModEGT1,enum) (L:TRP_TGTorange, enum) > (A:Airspeed select indicated or true, knots) 120 < && (L:ModEGT1,enum) (L:TRP_TGTRED1, enum) >= (L:ModOILT1,enum) 150 > (L:ENG1burntimer, enum) 300 > (A:Turb eng1 N2, percent) 95 >= (A:Sim on ground,bool) && (L:FirepanelE1,enum) 1 > || || || || || || || || || || if{ 0 (>G:Var1) (A:General eng1 starter, bool) if{ 0 (>K:TOGGLE_STARTER1) 0 (>G:Var1) 0 (>G:Var2) (E:Absolute Time, seconds) (>L:startabort1, enum) } } (L:ElecAVAIL, enum) 1 == (A:Eng1 N2 RPM, percent) 50 < && (G:Var2) 0 == & if{ (A:General eng1 starter, bool) ! if{ (>K:TOGGLE_STARTER1) } } els{ (G:Var1) -- (>G:Var1) } }
(G:Var2) 1 >= (A:General eng1 starter, bool) (G:Var1) 0 != || || (A:Turb eng1 N2, percent) 40 <= (L:MOD TURB ENG1 FUEL FLOW PPH, enum) 0.45359237 * 200 < (L:startvar1,enum) 10 > || || && if{ (G:Var1) 0 != (A:General eng1 starter, bool) (G:Var2) 0 != (G:Var2) 150 < && || || (L:ElecAVAIL, enum) 1 == && if{ 1 } els{ 2 } } els{ 0 } sp0 l0 0 == if{ 0 } els{ 1 } sp1 l1 (L:startlast1,bool) != if{ (G:Var3) 0 == l1 0 == && if{ 1 (>L:SWITCH_LARGE,number) } l1 (>L:startlast1,bool) } (G:Var3) 0 > if{ (G:Var3) 1 - 0 max (>G:Var3) } l0</Value>
<Failures>
<SYSTEM_ELECTRICAL_PANELS Action="0"/>
</Failures>
<Case Value="0">
<Image Name="lightstartoff_in.bmp" ImageSizes="23,35,23,35"/>
</Case>
<Case Value="2">
<Image Name="lightstartoff.bmp" ImageSizes="23,35,23,35"/>
</Case>
<Case Value="1">
<Image Name="lightstarton.bmp" Bright="Yes" ImageSizes="23,35,23,35"/>
</Case>
</Select>
</Element>
<Element>
<Select>
<Value>
(G:Var2) 1 > (A:General eng1 starter, bool) ! && if{ (G:Var2) 1 - (>G:Var2) (G:Var2) 30 < if{ (A:General eng2 starter, bool) (L:PackOveridesw,enum) 0 == && (L:AIRAPU, enum) 1 == (L:AirENG2, enum) 1 == || && (A:General eng2 starter, bool) ! || (L:Air1startAVAIL, enum) 1 == && (A:Airspeed select indicated or true, knots) 220 > (A:Sim on Ground, bool) ! && || (L:ElecAVAIL, enum) 1 == && (L:FENG1AVAIL, enum) 1 == & if{ (L:StartTIMER1,enum) 20 < if{ 5 (>G:Var1) (E:Absolute Time, seconds) (>L:TimeStart1,enum) (E:Absolute Time, seconds) (>L:TimeStart1x,enum) (L:HYDRAULIC1 RESERVOIR PERCENT, percent) (>L:HydStart1,enum) (L:MOD Eng1 oil quantity, percent) (>L:OilStart1,enum) 0 (>G:Var2) } } } } els{ (G:Var2) 1 == if{ 0 (>G:Var2) } }
(A:General eng1 starter, bool) if{ (L:MOD Eng1 oil quantity, percent) (L:OilStart1,enum) < if{ (L:MOD Eng1 oil quantity, percent) (>L:OilStart1,enum) } }
(A:General eng1 starter, bool) ! (A:TURB ENG1 N2,percent) 40 > && (L:Timefuelvalve1,enum) 1 == & if{ 0 (>L:Timefuelvalve1,enum) }
</Value>
</Select>
</Element>
<Element>
<Select>
<Value>
(G:Var2) (L:startvar1,enum) != if{ (G:Var2) (>L:startvar1,enum) }
(A:General eng2 starter, bool) (L:PackOveridesw,enum) 0 == && (L:AIRAPU, enum) 1 == (L:AirENG2, enum) 1 == || && (A:General eng2 starter, bool) ! || (L:Air1startAVAIL, enum) 1 == && (A:Airspeed select indicated or true, knots) 220 > (A:Sim on Ground, bool) ! && || (L:ElecAVAIL, enum) 1 == && (L:FENG1AVAIL, enum) 1 == & (A:TURB ENG1 N2,percent) 20 > & (A:TURB ENG1 N2,percent) 50 < & (A:TURB ENG1 N1,percent) 5 > & (A:TURB ENG1 N1,percent) 15 < & (L:ENG1burntimer, enum) 250 < & (A:GENERAL ENG1 FUEL VALVE, bool) & (A:GROUND VELOCITY, knots) 60 > (A:sim on Ground,bool) ! || && (L:FirepanelE2,enum) 0 == & (A:General eng1 starter, bool) ! & if{ (A:sim on Ground,bool) if{ (E:Absolute Time, seconds) 28 - (>L:TimeStart1,enum) (E:Absolute Time, seconds) 28 - (>L:TimeStart1x,enum) } els{ (E:Absolute Time, seconds) 14 - (>L:TimeStart1,enum) (E:Absolute Time, seconds) 14 - (>L:TimeStart1x,enum) } (A:General eng1 starter, bool) ! if{ (>K:TOGGLE_STARTER1) } 5 (>G:Var1) }
(L:startabort1, enum) (E:Absolute Time, seconds) - abs 120 < (L:startabort1, enum) (E:Absolute Time, seconds) - abs 10 > && (A:Turb eng1 N2, percent) 40 > (A:General eng1 starter, bool) || && if{ 0 (>L:startabort1, enum) }
</Value>
</Select>
</Element>
<Mouse>
<Help ID="HELPID_GAUGE_STARTER_SWITCH"/>
<Cursor Type="Hand"/>
<Click>(G:Var2) 1 > (A:General eng1 starter, bool) ! && if{ (L:startlast1,bool) if{ 1 (>L:BUTTON_NORM,number) 500 (>G:Var3) } 0 (>G:Var1) 0 (>G:Var2) } els{ (A:General eng1 starter, bool) ! if{ (L:EICAS2 Display Mode, enum) 0 != if{ 0 (>L:EICAS2 Display Mode, enum) } (L:startlast1,bool) ! if{ 1 (>L:BUTTON_NORM,number) 0 (>G:Var3) } (A:sim on Ground,bool) if{ 160 } els{ 40 } (>G:Var2) } (G:Var1) 0 > if{ 0 (>G:Var1) (A:General eng1 starter, bool) if{ 0 (>K:TOGGLE_STARTER1) } (L:startlast1,bool) if{ 1 (>L:BUTTON_NORM,number) 500 (>G:Var3) } } }</Click>
</Mouse>
</Gauge>
Code:
<!-- Fuel to Eng 1 cutoff when no fuel config -->
<Element>
<Select>
<Value>
(L:runonce, enum) 1 == (E:Absolute Time, seconds) (L:begin_timestamp, enum) - abs 5 > && (L:begin_timestamp, enum) 0 != & if{ (L:FENG1AVAIL, enum) 0 == (A:GENERAL ENG1 FUEL VALVE, bool) ! (A:General eng1 starter, bool) (E:Absolute Time, seconds) (L:TimeStart1x,enum) - abs 22 < && (A:TURB ENG1 N2,percent) 40 < & (A:Sim on ground, bool) & (L:IGN, bool) ! & (A:General eng1 starter, bool) (E:Absolute Time, seconds) (L:TimeStart1x,enum) - abs 15 < && (A:TURB ENG1 N2,percent) 40 < & (A:TURB ENG1 N2,percent) 20.5 < & (A:Sim on ground, bool) ! & (L:IGN, bool) ! & (L:FirepanelE1,enum) 1 > || || || || (A:General eng1 mixture lever position, percent) 0 > && if{ (>K:MIXTURE1_LEAN) } els{ (A:GENERAL ENG1 FUEL VALVE, bool) (A:General eng1 mixture lever position, percent) 100 < && (L:FENG1AVAIL, enum) 1 == & (A:General eng1 starter, bool) ! (E:Absolute Time, seconds) (L:TimeStart1x,enum) - abs 22 >= (A:TURB ENG1 N2,percent) 22 > && (A:Sim on ground, bool) ! (L:IGN, bool) || || || && if{ 1 (>K:MIXTURE1_RICH) } } } els{ (A:Sim on ground, bool) ! (A:TURB ENG1 N2,percent) 5 > && if{ 1 (>K:MIXTURE1_RICH) } }
</Value>
</Select>
</Element>




