• 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 <Shift> vs. <Rotate>

Messages
181
Country
czechrepublic
Hello. I noticed some weired thing in fs2x.com tutorials for gauges - they have:

Code:
<Nonlinearity>
	</Nonlinearity>
	<Shift>
	</Shift>

for shift, but
Code:
<Rotate>
<Nonlinearity>
</Nonlinearity>
</Rotate>

for rotating. Is it correct or a mistake? I am trying to develop fuel flow indication

Code:
<Element>
		<Position X="160" Y="72"/>
			<Image Name="rucicka2.bmp" PointsTo="North">
			<Axis X="10" Y="10"/>	
			<Nonlinearity>
				<Item Value=   "0" X= "160" Y="253" />
				<Item Value= "100" X="160" Y="207" />
				<Item Value= "200" X="160" Y="162 />
				<Item Value= "300" X="160" Y="118" />
				<Item Value= "400" X="160" Y="72" />
			</Nonlinearity>
			</Image>
		<Shift>
			<Value Minimum="0" Maximum="400">(A:TURB ENG1 CORRECTED FF,pound per hour)</Value>
		</Shift>
</Element>

but it doesnt work (the gauge doesnt even appear in cockpit), so I guess some mistake is there...

Thank you for your tips,
PB
 
Last edited:
Code:
<Element>
		<Position X="160" Y="72"/>
			<Image Name="rucicka2.bmp" PointsTo="North">
			<Axis X="10" Y="10"/>
		<Shift>
			<Value Minimum="0" Maximum="400">(A:TURB ENG1 CORRECTED FF,pound per hour)</Value>	
			<Nonlinearity>
				<Item Value=   "0" X= "160" Y="253" />
				<Item Value= "100" X="160" Y="207" />
				<Item Value= "200" X="160" Y="162 />
				<Item Value= "300" X="160" Y="118" />
				<Item Value= "400" X="160" Y="72" />
			</Nonlinearity>
		</Shift>
			</Image>
	</Element>

Still doesnt appear...
 
Also, and this is a guess; is Nonlinearity actually spelled with a capital L?

NonLinearity
 
Rotate using <Nonlinearity>:

Code:
  <Element>
    <Position X="121" Y="121"/>
    <Image Name="C310_Left Needle.bmp">
      <Axis X="11" Y="12.5" PointsTo="East"/>
    </Image>
    <Rotate>
      <Value Minimum="0" Maximum="155">(A:ENG FUEL FLOW PPH:1, pph) 8 *</Value>
      <Delay Value_Per_Second="15"/>
      <Nonlinearity>
        <Item Value="0" X="38" Y="32"/>
        <Item Value="50" X="127" Y="0"/>
        <Item Value="75" X="200" Y="32"/>
        <Item Value="100" X="235" Y="91"/>
        <Item Value="110" X="238" Y="136"/>
        <Item Value="120" X="221" Y="184"/>
        <Item Value="130" X="182" Y="225"/>
        <Item Value="140" X="129" Y="240"/>
        <Item Value="150" X="66" Y="228"/>
        <Item Value="200" X="36" Y="208"/>
      </Nonlinearity>
    </Rotate>
  </Element>

Shift using <Scale>

Code:
  <Element>
    <Position X="108" Y="208"/>
    <Image Name="C310_Prop_Left.bmp"/>
    <Shift>
      <Value>
        (A:GENERAL ENG PROPELLER LEVER POSITION:1,percent)
      </Value>
      <Scale Y="-2"/>
    </Shift>
  </Element>

Shift using <Nonlinearity>

Code:
   <Element>
      <Image Name="C310_TurnBank_Ball.bmp">
         <Axis X="12" Y="0"/>
      </Image>
      <Shift>
         <Value Minimum="-1" Maximum="1">(A:Turn coordinator ball,position)</Value>
         <Nonlinearity>
            <Item Value="-1" X="67" Y="185"/>
            <Item Value="0" X="124" Y="192"/>
            <Item Value="1" X="181" Y="185"/>
         </Nonlinearity>
         <Delay PixelsPerSecond="20"/>
         <Failures>
            <GAUGE_TURN_COORDINATOR Action="Freeze"/>
         </Failures>
      </Shift>
   </Element>
 
The <Nonlinearity> table always comes immediately after the <Value> entry, and both should always be placed within the <Shift> or <Rotate> entries!

See the examples above for each type.

Your script should look like this:

Code:
<Element>
  <Position X="160" Y="72"/>
  <Image Name="rucicka2.bmp" PointsTo="North">
    <Axis X="10" Y="10"/>
  </Image>
  <Shift>
    <Value Minimum="0" Maximum="400">(A:TURB ENG1 CORRECTED FF,pound per hour)</Value>
    <Nonlinearity>
      <Item Value=   "0" X= "160" Y="253" />
      <Item Value= "100" X="160" Y="207" />
      <Item Value= "200" X="160" Y="162" />
      <Item Value= "300" X="160" Y="118" />
      <Item Value= "400" X="160" Y="72" />
    </Nonlinearity>
  </Shift>
</Element>
 
Last edited:
Wow, thanks anyone for your reply, but the problem still remains. Now I guess it will be something with the variable, coz the gauge doesnt event appear in my aircraft!

Code:
<Gauge Name="EV-55 EICAS lower" Version="1.0">
<Image Name="background_upper.bmp"/>

<!-- pozadi --><Element>
		<Position X="13" Y="12"/>
		<Image Name="background_lower_grafika.bmp"/>
	</Element>

<!-- rucicka FF1 -->
<Element>
  	<Position X="160" Y="72"/>
  	<Image Name="rucicka2.bmp" PointsTo="North">
    	<Axis X="10" Y="10"/>
 	 </Image>
  	<Shift>
    	<Value Minimum="0" Maximum="400">(A:TURB ENG1 FUEL FLOW,PPH)</Value>
    		<Nonlinearity>
     	 		<Item Value=   "0" X= "160" Y="253" />
      			<Item Value= "100" X="160" Y="207" />
      			<Item Value= "200" X="160" Y="162 />"
     			 <Item Value= "300" X="160" Y="118" />
      			<Item Value= "400" X="160" Y="72" />
    		</Nonlinearity>
  	</Shift>
</Element>

</Gauge>

I did some experiments with the variable, but the result is still the same - the pointing needle appears only if I delete whole <Shift> -> </Shift> code, so it must be somewhere there...


PB
 
Check the position of last " in the 200 PPH line
<Item Value= "200" X="160" Y="162 />"



Roy
 
Also, if you havent textured the unit, it will be located in the core of the aircraft where the famous FSX no-material black hole forms, drawing, magnetically, all untextured parts into its wrathful center.....

:eek:
 
Works. The " was my problem... however, new one appeared:

I am making indication of remaining fuel, using FUEL TANK LEFT MAIN LEVEL,Pound but with my code
<Element>
<Position X="55" Y="573"/>
<Text X="80" Y="28" Bright="Yes" Length="5" Font="Arial" Color="white" Adjust="Right" VerticalAdjust="Center">
<String>%((A:FUEL TANK LEFT MAIN LEVEL,Pound))%!5d!</String>
</Text>
</Element>
returns still only 2 - and I am sure I have more than 2 pounds of fuel loaded... I am using "left/right main" tanks in my aircraft.cfg - any issue?
 
That variable returns only a percentage, not quantity!

You need to use the correct variable:

Code:
<String>%((A:FUEL TANK LEFT MAIN QUANTITY,Pound))%!5d!</String>
 
I tried (I hope) all fuel variables I found, but all of them return "2"...

Code:
<!-- rucicka fuel2 -->
<Element>
  	<Position X="306" Y="370"/>
  	<Image Name="rucicka2.bmp" PointsTo="North">
    	<Axis X="10" Y="10"/>
 	 </Image>
  	<Shift>
    	<Value Minimum="0" Maximum="2000">(A:FUEL TANK LEFT MAIN QUANTITY,Pound)</Value>
    		<Nonlinearity>
     	 		<Item Value=   "20000" X= "306" Y="370"/>
      			<Item Value= "1600" X="306" Y="406"/>
      			<Item Value= "1200" X="306" Y="442"/>
     			<Item Value= "800" X="306" Y="478"/>
      			<Item Value= "0" X="306" Y="551"/>
    		</Nonlinearity>
  	</Shift>
</Element>

<!-- text fuel2 --><Element>
	<Position X="201" Y="573"/>
	<Text X="80" Y="28" Bright="Yes" Length="4" Font="Arial" Color="white" Adjust="Right" VerticalAdjust="Center">
	<String>%((A:FUEL TANK LEFT MAIN QUANTITY,Pound))%!4d!</String>
	</Text>
	</Element>

Result:

35892174.jpg


I am talking about FS9... or I guess, the capacity of one of my fuel tanks is about 1800 pounds - could it be somehow connected?
 
Have you looked at how much fuel you actually have? As a simple minded old guy, and looking the the needle and readout being the same, I think it may be 2 pounds.

Roy
 
Is Pound a valid unit? I found with those variables I had to use gallons and multiply by the weight of a gallon of fuel (6 for turbines, 6.7 for pistons).
 
Pound is listed as a valid unit in the SDK docs. Of course, the pedant in me says that it should be Pounds anyway. :) Try "Pounds" or "lbs", but it's entirely possible the unit just does not work, and you may need to use a different unit and convert, as tgibson pointed out.
 
Tom is quite correct. Quantity means quantity in volume, hence gallons. There is a FUEL TOTAL QUANTITY WEIGHT variable which is in pound, pounds or lbs, but this one is gallons.

Roy
 
Back
Top