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

FSXA Two Controllable Hydraulic Systems

Messages
5
Country
unitedkingdom
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:

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 (&gt;K:HYDRAULIC_SWITCH_TOGGLE) // Set Left Engine Hydraulics to off
2 (&gt;K:HYDRAULIC_SWITCH_TOGGLE) // Set Right Engine Hydraulics to off
-1 (&gt;L:LHydSwitch,bool) // Set LH Hydraulic switch to off (3 Pos Switch)
-1 (&gt;L:RHydSwitch,bool) // Set LH Hydraulic switch to off (3 Pos Switch)
1 (&gt;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 (&gt;L:RHydSwitch,bool) }
        	(M:Event) 'RightSingle' scmp 0 == if{ (L:RHydSwitch,bool) ++ 1 min (&gt;L:RHydSwitch,bool) }
        	(M:Event) 'WheelDown' scmp  0 == if{ (L:RHydSwitch,bool) -- -1 max (&gt;L:RHydSwitch,bool) }
        	(M:Event) 'WheelUp' scmp 0 == if{ (L:RHydSwitch,bool, bool) ++ 1 min (&gt;L:RHydSwitch,bool) }

	(L:RHydSwitch,bool) 1 ==
	if{ 1 (&gt;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 (&gt;K:HYDRAULIC_SWITCH_TOGGLE) // Toggle Hyd System 2
	    1 (&gt;L:RHydAuto,bool)
	    0 (&gt;L:RHydOn,bool) } } }
		
	(L:RHydSwitch,bool) -1 ==
	if{ (L:RHydAuto,bool) 1 ==
	if{ 2 (&gt;K:HYDRAULIC_SWITCH_TOGGLE) // Toggle Hyd System 2
	     0 (&gt;L:RHydAuto,bool)
	     0 (&gt;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 (&gt;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
 
Back
Top