• 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 NonLinearityTable won't work

Heretic

Resource contributor
Messages
6,830
Country
germany
I'm using the gauge in FSX but it's in FS9 formatting.

Here's the code of the element in question (a G Force needle):

Code:
<Element>
<Position X="100" Y="100"/>
<Image Name="gfneedle.bmp">
<Axis X="20" Y="80"/>
</Image>
<Rotate>
<Value Minimum="-4" Maximum="8">(A:ELECTRICAL MAIN BUS VOLTAGE, volts) 10 &gt; if{ (A:G FORCE,G Force) } els{ 0 }</Value>
<NonLinearity>
<!-- Item Value="-4" Degrees="-90" />
<Item Value="0" Degrees="0" />
<Item Value="4" Degrees="90" />
<Item Value="8" Degrees="180" / -->
<Item Value="-4" X="0" Y="100" />
<Item Value="0" X="100" Y="0" />     
<Item Value="4" X="200" Y="100" />
</NonLinearity>
<!-- Delay DegreesPerSecond="20" / -->
</Rotate>
</Element>

No matter if I try the commented out degree-based approach or the active coordinate based approach, I always end up with this (sitting still on the runway, mind you):

gf.png


What the heck am I doing wrong?


I already had to fix another nonlinear gauge, but at least it responded to my inputs!
 
Recreated the gauge in FSX syntax with the exact same elements and table. Works as it should. Weird.
 
try it once so

<NonLinearity>
<Item Value="-4" Degrees="-90"/>
<Item Value="0" Degrees="0"/>
<Item Value="4" Degrees="90"/>
<Item Value="8" Degrees="180"/>
</NonLinearity>


or this variant


<Element>
<Position X="100" Y="100"/>
<Image Name="gfneedle.bmp">
<Axis X="20" Y="80"/>
</Image>
<Rotate>
<Value>(A:ELECTRICAL MAIN BUS VOLTAGE, volts) 10 &gt; if{ (A:G FORCE, G Force) -4 max 8 min 0.3927 * } els{ 0 }</Value>
</Rotate>
</Element>



This is my G meter in the "L-29 Delfin", version two works perfectly in FS9.
7vbay9i4fct.jpg


The angles are identical with your display.
 
Per the SDK:
Gforce, G Force Unit of acceleration equal to the acceleration of gravity.
Roy
 
try it once so

<NonLinearity>
<Item Value="-4" Degrees="-90"/>
<Item Value="0" Degrees="0"/>
<Item Value="4" Degrees="90"/>
<Item Value="8" Degrees="180"/>
</NonLinearity>

I did already try that yesterday, but it did not work.


<Element>
<Position X="100" Y="100"/>
<Image Name="gfneedle.bmp">
<Axis X="20" Y="80"/>
</Image>
<Rotate>
<Value>(A:ELECTRICAL MAIN BUS VOLTAGE, volts) 10 &gt; if{ (A:G FORCE, G Force) -4 max 8 min 0.3927 * } els{ 0 }</Value>
</Rotate>
</Element>

That might have worked.
I have unfortunately already deleted the original gauge, so I can't test it immediately.
 
Hello

I was learning some XML coding and I find useful to use radians and rotate to do the nonlinear scale.
I have attached the airspeed code for FS9; perhaps you can refresh some ideas.

Cheers,
Sergio.
 

Attachments

Back
Top