- Messages
- 5
- Country

I hope this can help those who have struggled like me in trying to have two separate hydraulic systems with their own on/off switches.
1. First change the hydraulic settings in the aircraft.cfg file to the following:
2. I have found that when FSX starts the hydraulics are defaulted to on, so you need to create an initialization to set them to off. I have an initialization gauge for this which allows me to set various systems to their start position. My gauge is as follows
3. Now to the switch. I am using a 3 position switch, this enables me to switch on or off various systems based on the switch position off/auto/on i.e Radar, Flyby wire etc. Also either the APU or the relevant engine must be running for the hydraulic system to energize. The following code shows the RH Engine Number 2 Hydraulic System.
4. Finally the Indicator Dial Gauge. This gauge depicts the Right engine Number 2 System. ( 13.3 / is for converting from psi to bar ), The update section de-energizes the hyd 2 system if the APU is Shutdown, I have still to code the No.2 engine to do the same.
There may still be bugs in the code but I am sure over time I will clear them out. I hope this helps. Any comments, suggestions, criticisms are most welcome.
Cheers
GR4Jockey
1. First change the hydraulic settings in the aircraft.cfg file to the following:
Code:
[hydraulic_system]
normal_pressure=3916.0
electric_pumps=2 // Set electric pumps to 2
//engine_map=1,1,0,0 // Remove or remark out the engine map
2. I have found that when FSX starts the hydraulics are defaulted to on, so you need to create an initialization to set them to off. I have an initialization gauge for this which allows me to set various systems to their start position. My gauge is as follows
Code:
<Gauge Name="Aircraft Initialization" Version="1.0">
<Image Name="Gauge_Background.bmp" ImageSizes="41,41" Luminous="0"/>
//---------------- Panavia Tornado GR4 initial Settings
<Update Hidden="Yes">(L:GR1_Init,bool) 0 ==
1 (>K:HYDRAULIC_SWITCH_TOGGLE) // Set Left Engine Hydraulics to off
2 (>K:HYDRAULIC_SWITCH_TOGGLE) // Set Right Engine Hydraulics to off
-1 (>L:LHydSwitch,bool) // Set LH Hydraulic switch to off (3 Pos Switch)
-1 (>L:RHydSwitch,bool) // Set LH Hydraulic switch to off (3 Pos Switch)
1 (>L:GR1_Init,bool) } // Only enable for initial setting
</Update>
</Gauge>
3. Now to the switch. I am using a 3 position switch, this enables me to switch on or off various systems based on the switch position off/auto/on i.e Radar, Flyby wire etc. Also either the APU or the relevant engine must be running for the hydraulic system to energize. The following code shows the RH Engine Number 2 Hydraulic System.
Code:
<Gauge Name="Right Hand Hydraulic Switch" Version="1.0">
<Image Name="RH_HYD_Switch_Background.bmp" ImageSizes="44,49" Luminous="0"/>
<Element>
<Position X="0" Y="0"/>
<Select>
<Value>(L:RHydSwitch,bool)</Value>
<Case Value="1">
<Image Name="RH_HYD_Switch_On.bmp" ImageSizes="44,49"/>
</Case>
<Case Value="0">
<Image Name="RH_HYD_Switch_Auto.bmp" ImageSizes="50,49"/>
</Case>
<Case Value="-1">
<Image Name="RH_HYD_Switch_Off.bmp" ImageSizes="44,49"/>
</Case>
</Select>
</Element>
<Mouse>
<Area Left="0" Top="0" Width="44" Height="49">
<Cursor Type="Hand"/>
<Click Kind="LeftSingle+RightSingle+WheelDown+WheelUp">
(M:Event) 'LeftSingle' scmp 0 == if{ (L:RHydSwitch,bool) -- -1 max (>L:RHydSwitch,bool) }
(M:Event) 'RightSingle' scmp 0 == if{ (L:RHydSwitch,bool) ++ 1 min (>L:RHydSwitch,bool) }
(M:Event) 'WheelDown' scmp 0 == if{ (L:RHydSwitch,bool) -- -1 max (>L:RHydSwitch,bool) }
(M:Event) 'WheelUp' scmp 0 == if{ (L:RHydSwitch,bool, bool) ++ 1 min (>L:RHydSwitch,bool) }
(L:RHydSwitch,bool) 1 ==
if{ 1 (>L:RHydOn,bool) }
(L:RHydSwitch,bool) 0 == if{
(L:RHydOn,bool) 0 ==
if{ (L:APUStartCycle,bool) 1 ==
(A:GENERAL ENG COMBUSTION:2,Bool) 1 == ||
if{ 2 (>K:HYDRAULIC_SWITCH_TOGGLE) // Toggle Hyd System 2
1 (>L:RHydAuto,bool)
0 (>L:RHydOn,bool) } } }
(L:RHydSwitch,bool) -1 ==
if{ (L:RHydAuto,bool) 1 ==
if{ 2 (>K:HYDRAULIC_SWITCH_TOGGLE) // Toggle Hyd System 2
0 (>L:RHydAuto,bool)
0 (>L:RHydOn,bool) } }
</Click>
<Tooltip>RH Hydraulic Switch Off/Auto/On</Tooltip>
</Area>
</Mouse>
</Gauge>
4. Finally the Indicator Dial Gauge. This gauge depicts the Right engine Number 2 System. ( 13.3 / is for converting from psi to bar ), The update section de-energizes the hyd 2 system if the APU is Shutdown, I have still to code the No.2 engine to do the same.
Code:
<Gauge Name="RH HYD Pressure" Version="1.0">
<Image Name="HYD_Pressure.bmp" ImageSizes="256,256" Luminous="1"/>
<Update>
(L:APUShutDownAct,bool) 1 ==
if{ 2 (>K:HYDRAULIC_SWITCH_TOGGLE) }
</Update>
//--------------------HYD Pressure Needle
<Element>
<Position X="128" Y="128"/>
<Image Name="HYD_pointer.bmp" ImageSizes="112,26" PointsTo="East" Luminous="1">
<Axis X="12" Y="12"/>
</Image>
<Rotate>
<Value Minimum="-50" Maximum="350">
(A:ELECTRICAL MASTER BATTERY,bool) 0 ==
if{ (L:RHydSwitch,bool) -1 ==
if{ (A:HYDRAULIC PRESSURE:2,psi) 13.3 / } }
(A:ELECTRICAL MASTER BATTERY,bool) 0 ==
if{ -50 }
(A:ELECTRICAL MASTER BATTERY,bool) 1 ==
if{ (L:RHydSwitch,bool) 0 == (L:RHydSwitch,bool) 1 == ||
if{ (A:HYDRAULIC PRESSURE:2,psi) 13.3 / } }
</Value>
<Failures>
<SYSTEM_ELECTRICAL Action="Freeze"/>
<SYSTEM_ENGINE Action="0"/>
</Failures>
<Nonlinearity>
<Item Value="-50" X="52" Y="188"/>
<Item Value="0" X="28" Y="155"/>
<Item Value="100" X="55" Y="55"/>
<Item Value="200" X="155" Y="28"/>
<Item Value="300" X="228" Y="102"/>
<Item Value="350" X="238" Y="157"/>
</Nonlinearity>
<Delay DegreesPerSecond="60"/>
</Rotate>
</Element>
<Mouse>
<Area Top="2" Left="2" Width="256" Height="256">
<Tooltip>RH Hydraulic Pressure%((A:Eng hydraulic pressure:2,psi) 13.3 / )%!6.1f!bar</Tooltip>
</Area>
</Mouse>
</Gauge>
There may still be bugs in the code but I am sure over time I will clear them out. I hope this helps. Any comments, suggestions, criticisms are most welcome.
Cheers
GR4Jockey

