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

Center of gravity gauge

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
Hi folks, very quick XML question! I have a CoG gauge that is working perfectly well over 100 frames. The problem is that the gauge in my aircraft only depicts the 50% to 60% CoG range of CoG movement, so my animated CoG marker of course only moves about in the centre 10% or so of the gauge. How would I use scale in XML, in order to get my CoG marker to move from the top to the bottom of the gauge in the correct way? I've tried all sorts of methods but nothing's really worked at all. This would be easy in a 2D gauge using <value> and <scale> etc, but is not so easy in a 3D modeled gauge.

Code:
  <PartInfo>
    <Name>needle_CG</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:CG PERCENT, percent) 0 max 100 min</Code>
        <Lag>50</Lag>
        </Parameter>
    </Animation>
  </PartInfo>

CoG.png


Thanks in advance to anybody who takes the time to answer :)
 
Messages
440
Country
us-wisconsin
Dean,

What you would need is bias/offset* to get the gauge to display properly.
The minimum CG is 50 and this at KF zero so offset it by:
(A:CG PERCENT, percent) 50 -
Now that you have your zero KF point you need bias the remaining keyframes (100) compared to values (61-50 = 11) .
100 / 11 = 9.090909
Now the full code :
<Code>(A:CG PERCENT, percent) 50 max 61 min 50 - 9.090909 *</Code>

*Fr Bill has more info about this in the modelling sub forum, somewhere. ( sorry, don't have time to find )

EDIT - "sometimes a picture can tell a thousand words"
Example.png
 
Last edited:

Deano1973

Resource contributor
Messages
384
Country
unitedkingdom
Dean,

What you would need is bias/offset* to get the gauge to display properly.

Ah, thanks so much Roman, that worked perfectly! I'd tried the bias and offset method, but didn't understand & add the calculations at the end! Method saved for future reference :)
 
Top