• 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 About the rotate knob code

Another problem is that there is another way to rotate,but why the radians must be 2 π (2 times pie)?It means that the radius of a circle is 1.If the background's size is 20×20,why the radius is not 20√2 π?

Sent from my MALATA I8 using Tapatalk 2
 
In your code you misspelled Maximum, and it's G:Var1, not G:VarI.
 
Another problem is that there is another way to rotate,but why the radians must be 2 π (2 times pie)?It means that the radius of a circle is 1.If the background's size is 20×20,why the radius is not 20√2 π?

That is simply translating "radians" into a 360º arc (full circle). It is not describing a "radius" at all

And the Minimum and Maximum have nothing to do with rotational speed. They are the permitted range for the (G:Var1) token variable.
 
Last edited:
In your code you misspelled Maximum, and it's G:Var1, not G:VarI.

Very sorry about this,but what's the G:Var1 means? And what speed does the knob move if the minimun is 0 and the maximum is 4?Can I change these 2 numbers(0 and 4) into the others?

Sent from my MALATA I8 using Tapatalk 2
 
That is simply translating "radians" into a 360º arc (full circle). It is not describing a "radius" at all

And the Minimum and Maximum have nothing to do with rotational speed. They are the permitted range for the (G:Var1) token variable.

You says the minimum and maximum is the movement range,not speed? What's the meaning of G:Var1 ?

Sent from my MALATA I8 using Tapatalk 2
 
(G:Varn) are "local variables" that may be read only within the scope of the XML script. The number (n) may be 1 through 9.

Look pal, this is all explained in the SDK:
Parameters of the “G” kind have names from Var1 to Var9. These are used by gauge developers to store and retrieve variables across gauge elements. These values are unitless so do not put unit names after them. The default value of a gauge parameter is 0.

Minimum and Maximum values specify the range that the variable is allowed. In your example that range is set from 0 to 4. Therefore, the G:Var1 can be set to any number between 0 and 4. Normally whole numbers are used (if for a 5 position switch for example), but fractional numbers may also be stored (such as 2.521465 for example).
 
There are three big differences between G: variables and L: variables.

1. G: variables are not shared between gauges.

2. G: variables will reset to 0 when almost ANY change is made to the panel, while L: variables reset only when the plane is reloaded (and a few other situations).

3. G: variables cannot have custom names.
 
Back
Top