• 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 Case (stack) limit?

Messages
862
Country
indonesia
I'm using case to generate a non-linearity number, dependant upon airspeed. Everything works fine up until the 27th number then the value returned is zero.
With the calculations included, that would be 32 items on the stack. Is this a limit for xml gauges?
 
I believe you have indeed maxed the limit for a single stack, Chris!
 
Oh b****r!

I can use 25kt increments, which makes 25 cases between 100kts & 700kts, but there is a touch of jumpiness as you pass the boundaries. I was trying to use 10kt increments which uses 61 cases and was very smooth - all the way up to 380kts when it went blurp.

I suppose I'll have to live with it until another idea hits me.

Thanks anyway for the info Bill.
 
Chris,
I have no idea what the non-linearity is for, but perhaps you could make the intervals non-linear depending on how the result varies with airspeed. Most aerodynamic effects vary as the square of airspeed, so you could make the interval between lower airspeeds bigger and close them up with higher airspeeds.

For smoothing, a chart of non-linearity versus airspeed squared could help.

Roy
 
Chris,
I have no idea what the non-linearity is for, but perhaps you could make the intervals non-linear depending on how the result varies with airspeed. Most aerodynamic effects vary as the square of airspeed, so you could make the interval between lower airspeeds bigger and close them up with higher airspeeds.
For smoothing, a chart of non-linearity versus airspeed squared could help.
Roy
This is an airspeed/mach combined gauge. I'm using a nonlinearity for the airspeed gauge bitmap which is not linear and since the mach bitmap uses the same needle it also needs to add its non-linearity to the airspeed nonlinearity.
Unless you're staring at the gauge as you cross the 25kt increment speed thresholds (as you do when you're tweaking the gauge) you probably won't notice it - I hope.
It would be even nicer if (real) gauge designers would use linear scales and play with the linkage instead of pumping the gauge up to set pressures and drawing a line on the card wherever the needle is sitting :D
 
Need some time to digest that!
I'll try your calcs and see what it looks like.
 
Chris, I was just thinking. If you like the 10 knot increments, is it at all possible to have 3 gauges hovering over the background, and have one that goes up to one point, then cuts out (disappears) and the next gauge pops up, seamlessly, and that too goes to its limit, and then the next gauge pops up as the other disappears?

They would be 'hovering' gauges (my thoughts) with a background picture being separate. Thus, if they were all appearing, they would be shown all at the same time, stacked and visible, but in program theory, they would appear/disappear precisely as they kicked out/kicked in. The background would have nothing to do with them.
 
Chris,
In case you still are interested in the way I did it, I'm including images of the Mask, Mach Scale and Needle.

The Airspeed scale on the mask and the Mach Scale are correct with respect to each other at sea level. By that I mean any specific rotation of the needle will give the correct relationship between airspeed and Mach. Their non-linearities correspond. So, at sea level the Mach scale does not rotate.

At altitude increases, the Mach scale begins to rotate counter-clockwise, because, for a given airspeed indication the Mach number is higher. That is the basic mechanics of the gauge. The code does not use altitude directly. It uses two different expressions for the non-linearity because one is for airspeed and the other is for Mach.

The airspeed needle is rotated according to a standard X, Y non-linearity table. The non-linearity expression calculates how many degrees it has rotated which is AIRSPEED ANGLE and acts as a datum for the subsequent calculations. The Mach non-linearity is then calculated and is MACH ANGLE in degrees. MACH ANGLE is subtracted from AIRSPEED ANGLE to give AIRSPEED MACH, which is the amount of rotation of the MACH scale. As it happens that angle is zero at sea level, so the MACH scale does not rotate. At higher altitudes where Mach is greater for a given rotation of the datum, then the result is not zero so the Mach scale is rotated appropriately.

It is a bit complicated without pictures, so I added them

Regards
Roy
 

Attachments

  • Airspeed_needle.jpg
    Airspeed_needle.jpg
    3.7 KB · Views: 503
  • Mach_mask.jpg
    Mach_mask.jpg
    16.1 KB · Views: 493
  • Mach_Scale_new.jpg
    Mach_Scale_new.jpg
    10.1 KB · Views: 461
Back
Top