• 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 VSI gauge problem

mskhan1991

Resource contributor
Messages
935
Country
pakistan
Code:
<PartInfo>
        <Name>MFI_VERSPEED_NEEDLE</Name>
        <AnimLength>40</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>VERTICAL SPEED</Variable>
                    <units>F/M</units>
                    <Scale>1</Scale>
                    <Bias>20</Bias>
                </Sim>
            </Parameter>
        </Animation>
    </PartInfo>

I am using this code to model my needle for 3d vertical speed indicator.

It shows the -2000f/m on keyframe=0 and +2000f/m on keyfram=40

so keyframes are from 0 to 40 and the needle goes from -20 to +20 (100 feet/min)

So that makes the needle stay on 0 feet per min when on keyframe 20...when not descending or climbing, right? which I have mentioned in the BIAS code above

But using the above code when I export the gauges..... level flight is shown on keyframe 0 which means -2000f/m and when I am climbing at about +2000f/m it shows me keyframe 20 which is 0 feet/min.

more elaborated in the picture below that how it shows in the sim is in RED and how it shows in 3ds max in blue

Vertical Spd.jpg
 
Last edited:
Also tried this code:

Code:
 <PartInfo>
        <Name>MFI_VERSPEED_NEEDLE</Name>
        <AnimLength>40</AnimLength>
        <Animation>
            <Parameter>
             <Code>
              (A:VERTICAL SPEED, ft/min ) 20 +
             </Code>
            </Parameter>
        </Animation>
    </PartInfo>

The needle is at correct position but no animation?
 
Update: Starting to understand the SDK and instrumentation variables, the animation is working now but in m/s.... can anyone here write a code so that it works for feet(in 100)/min ?

Why it wasn't working properly was because I was using MCX... don't know what the problem is but the airspeed seemed to be working fine :/
 
Last edited:
Just create 1 xml universal code and animate using the correct frames. This way you never need to write more than 1 code.
Your max setting for this VSI is 2000 ft/min. So your keyframes would be 40-60.
So in the animation manager use 0-100 frames, but only create keys 40 thru 60.


ft/min = keyframe:stirthepo
--------------------
-6000 = 20
-5000 = 25
-4000 = 30
-3000 = 35
-2000 = 40
-1000 = 45
0 = 50
1000 = 55
2000 = 60
3000 = 65
4000 = 70
5000 = 75
6000 = 80

variable
(A:VERTICAL SPEED, ft/min ) 200 / 50 +

And a lag of 40.
<Lag>40</Lag>
 
Last edited:
While dg's code probably works just fine (I haven't tried it myself) his post doesn't explain how it works, which is what you're missing so far. Try this thread where Bill explains a VSI keyframed animation
 
While dg's code probably works just fine (I haven't tried it myself) his post doesn't explain how it works, which is what you're missing so far. Try this thread where Bill explains a VSI keyframed animation

Great, I was adding scale the same way as the <sim> ****** </sim> .......
Thanks that's what I was looking for exactly. I tried it a few times just need to check it... but don't you think the code for Ft(in 100)/min would go to be something like this for my gauge, as far as bill explains in his thread?

(A:VERTICAL SPEED, ft/min ) 100 / 20 + (Scale to be set for 100 as my gauge is using 100 feet per min) (BIAS is set to 20 since my gauge is only from 0-40)

Just create 1 xml universal code and animate using the correct frames. This way you never need to write more than 1 code.
Your max setting for this VSI is 2000 ft/min. So your keyframes would be 40-60.
So in the animation manager use 0-100 frames, but only create keys 40 thru 60.


ft/min = keyframe:stirthepo
--------------------
-6000 = 20
-5000 = 25
-4000 = 30
-3000 = 35
-2000 = 40
-1000 = 45
0 = 50
1000 = 55
2000 = 60
3000 = 65
4000 = 70
5000 = 75
6000 = 80

variable
(A:VERTICAL SPEED, ft/min ) 200 / 50 +

And a lag of 40.
<Lag>40</Lag>

I totally get the part with universal code but if I were to use frames 30-70 (40 frames in total)... would I go like (A:VERTICAL SPEED, ft/min ) 100 / 50 + ?

for
-2000ft/min = 30
-1000ft/min = 40
____0ft/min = 50
+1000ft/min = 60
+2000ft/min = 70
 
Last edited:
TESTED and found that yes its working correct for

(A:VERTICAL SPEED, ft/min) 100 / 20 +

and not

(A:VERTICAL SPEED, ft/min ) 100 / 20 + < space between unit and bracket was causing a lot of problems!
 
I rarely use the <Sim> syntax in modeldef.xml scripts. The <Code> syntax is much easier to work with, IMHO.
 
I totally get the part with universal code but if I were to use frames 30-70 (40 frames in total)... would I go like (A:VERTICAL SPEED, ft/min ) 100 / 50 + ?

for
-2000ft/min = 30
-1000ft/min = 40
____0ft/min = 50
+1000ft/min = 60
+2000ft/min = 70


This will work but will cost more in animation keys and FPS. The vertical speed does not need a lot of keys since the VSI scale is a fraction of the value.

By the way it's 50 + not 20 + as i see above.
 
Last edited:
Back
Top