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

Move up or down / acceleration, deceleration

Messages
73
Hello :)

I have a question about gauge developing. In fact, i would like that my arrow move up or down based on a decision of acceleration or deceleration.

But I can not see how I can do that. Just look my exemple :

test.jpg


Someone has an idea ?

Thx for helping :)
 
I'm assuming you want acceleration in terms of speed. There is an ACCELERATION BODY Z variable that gives longitudinal acceleration in feet per second squared. You could scale that to give upward arrow movement when accelerating and vice versa.

Roy
 
Alternatively, you can capture the current speed, then compare it to the speed at the next gauge cycle...

You can scale the difference to provide the trend arrow's animation fast/slow...

This is an example from my G1000 display (not the most elegant of my work!):

Code:
      <!-- ======================= AIRSPEED TREND INDICATOR ======================= -->
      <Element>
        <Select>
          <Value>
            (P:Local Time, seconds) 0.2 % 10 * int 0 == 
            if{ (A:Airspeed select indicated or true, knots) (>L:SpeedPrevious,knot) }
          </Value>
        </Select>
      </Element>

      <Element>
        <Select>
          <Value>
            (P:Local Time, seconds) 0.2 % 10 * int 1 == 
            if{ (A:Airspeed select indicated or true, knots) s1 
                (L:SpeedPrevious,knot) - 0.1 / 10 * l1 + (>L:SpeedTrend,knot) }
          </Value>
        </Select>
      </Element>

      <Element>
        <Position X="275" Y="145"/>
        <Visible>
          (L:SpeedTrend,knot) (A:Airspeed select indicated or true, knots) &gt;
        </Visible>
        <MaskImage Name="G1000_SpeedTrend_Mask.bmp" Bright="Yes">
          <Axis X="0" Y="64"/>
        </MaskImage>
        <Image Name="G1000_SpeedTrend.bmp" Bright="Yes">
          <Nonlinearity>
            <Item Value="2" X="0" Y="0"/>
            <Item Value="40" X="0" Y="64"/>
          </Nonlinearity>
        </Image>
        <Shift>
          <Value Minimum="2" Maximum="40">
            (A:Airspeed select indicated or true, knots) 45 &lt; 
            if{ 0 } 
            els{ (L:SpeedTrend,knot) (A:Airspeed select indicated or true, knots) - }
          </Value>
          <Delay PixelsPerSecond="10"/>
        </Shift>
      </Element>

      <Element>
        <Position X="275" Y="209"/>
        <Visible>
          (L:SpeedTrend,knot) (A:Airspeed select indicated or true, knots) &lt;
        </Visible>
        <MaskImage Name="G1000_SpeedTrend_Mask.bmp" Bright="Yes">
          <Axis X="0" Y="0"/>
        </MaskImage>
        <Image Name="G1000_SpeedTrend.bmp" Bright="Yes">
          <Nonlinearity>
            <Item Value="-2" X="0" Y="64"/>
            <Item Value="-40" X="0" Y="0"/>
          </Nonlinearity>
        </Image>
        <Shift>
          <Value Minimum="-40" Maximum="-2">
            (A:Airspeed select indicated or true, knots) 45 &lt; 
            if{ 0 } 
            els{ (L:SpeedTrend,knot) (A:Airspeed select indicated or true, knots) - }
          </Value>
          <Delay PixelsPerSecond="10"/>
        </Shift>
      </Element>
 
Last edited:
Problem solved using this way, thx for the previous posted code, it help us a lot !

Code:
        <Element id="Element">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Select id="Select">
                <Expression id="(P:Local Time, seconds) 0.2 % 10 * int 0 ==  if{ (A:Airspeed select indicated or true, knots) (&gt;L:SpeedPrevious,knot) }">
                    <Script>(P:LOCAL TIME, SECONDS) 0.2 % 10 * int 0 ==  if{ (A:AIRSPEED SELECT INDICATED OR TRUE, KNOTS) (&gt;L:SPEEDPREVIOUS,KNOT) }</Script>
                </Expression>
            </Select>
        </Element>
        <Element id="Element">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Select id="Select">
                <Expression id="(P:Local Time, seconds) 0.2 % 10 * int 1 ==  if{ (A:Airspeed select indicated or true, knots) s1 (L:SpeedPrevious,knot) - 0.1 / 10 * l1 + (&gt;L:SpeedTrend,knot) }">
                    <Script>(P:LOCAL TIME, SECONDS) 0.2 % 10 * int 1 ==  if{ (A:AIRSPEED SELECT INDICATED OR TRUE, KNOTS) s1 (L:SPEEDPREVIOUS,KNOT) - (&gt;L:SPEEDTREND,KNOT) }</Script>
                </Expression>
            </Select>
        </Element>
        <Element id="Element">
            <FloatPosition>0.000,0.000</FloatPosition>            
            <Image id="indicateur_vitesse.bmp" Name="indicateur_vitesse.bmp">
                <Transparent>True</Transparent>
            </Image>
            <Shift id="Shift">
                <Expression id="Expression">
                    <Minimum>-40.000</Minimum>
                    <Maximum>40.000</Maximum>
                    <Script>(L:SPEEDTREND,KNOT) 100 *</Script>
                </Expression>
                <NonlinearityTable id="NonlinearityTable">
                    <NonlinearityEntry id="NonlinearityEntry">
                        <ExpressionResult>-40.000</ExpressionResult>
                        <FloatPosition>0.000,60.000</FloatPosition>
                    </NonlinearityEntry>
                    <NonlinearityEntry id="NonlinearityEntry">
                        <ExpressionResult>40.000</ExpressionResult>
                        <FloatPosition>0.000,-60.000</FloatPosition>
                    </NonlinearityEntry>
                </NonlinearityTable>
                <Delay id="Delay">
                    <DelayValue>10.000</DelayValue>
                </Delay>
            </Shift>
        </Element>
 
Back
Top