• 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 XML Tape Gauge Help

Messages
260
Country
us-kentucky
Hello again everyone,

I was bitten by the panel bug (maybe 20 years too late for FS9 but oh well) and I am now programming lots of gauges for my 747.

After successfully making a Surface Position Indicator, I decided to try my hand at an N1 gauge. I got the background, and needle completed and the needle is moving correctly.
During my trials of making the rolling tape style numerical readout however, I have been stalled.
So far I only have the readout for the ones place in the N1% display. I have the tape moving correctly, but it never displays the correct value and blanks (looks as though it is running out of tape) every time it cycles through 10.

Here is the code. The strip is 265 px long and runs from 0 to 0 (1-9 in between).

Code:
<Gauge Name="747 N1 Indicator" Version="1.0">
    <Image Name="N1.bmp"/>
    <Element>
        <Position X="74" Y="74"/>
            <Image Name="N1_Needle.bmp">
            <Axis X="53" Y="4"/>
            </Image>
        <Rotate>
            <Value Minimum="0" Maximum="120">(A:ENG1 N1 RPM, percent)</Value>
                <Nonlinearity>
                    <Item Value="0" Degrees="20"/>
                    <Item Value="20" Degrees="56"/>
                    <Item Value="40" Degrees="91"/>
                    <Item Value="60" Degrees="127"/>
                    <Item Value="80" Degrees="162"/>
                    <Item Value="100" Degrees="196"/>
                    <Item Value="120" Degrees="231"/>
                </Nonlinearity>
        </Rotate>
    </Element>
    <Element>
    <MaskImage Name="N1_mask.bmp">
        <Axis X="75" Y="75"/>
    </MaskImage>
        <Image Name="N1_Tape.bmp">
            <Nonlinearity>
                <Item Value="0" X="-7" Y="255"/>
                <Item Value="10" X="-7" Y="12"/>
            </Nonlinearity>
        </Image>
        <Shift>
            <Value>(A:ENG1 N1 RPM, percent) 10 %</Value>
        </Shift>
    </Element>
</Gauge>
 
An addendum:

I now have the gauge indicating the correct numerical values, but the animation loop is still rather buggy looking. It doesn't cleanly loop back around. This version uses a tape running from 9 down to 0 that is 240 px long.

Here is the code for that:

XML:
<Gauge Name="747 N1 Indicator" Version="1.0">
    <Image Name="N1.bmp"/>
    <Element>
        <Position X="74" Y="74"/>
            <Image Name="N1_Needle.bmp">
            <Axis X="53" Y="4"/>
            </Image>
        <Rotate>
            <Value Minimum="0" Maximum="120">(A:ENG1 N1 RPM, percent)</Value>
                <Nonlinearity>
                    <Item Value="0" Degrees="20"/>
                    <Item Value="20" Degrees="56"/>
                    <Item Value="40" Degrees="91"/>
                    <Item Value="60" Degrees="127"/>
                    <Item Value="80" Degrees="162"/>
                    <Item Value="100" Degrees="196"/>
                    <Item Value="120" Degrees="231"/>
                </Nonlinearity>
        </Rotate>
    </Element>
    <Element>
    <MaskImage Name="N1_mask.bmp">
        <Axis X="75" Y="75"/>
    </MaskImage>
        <Image Name="N1_Tape.bmp">
        <Axis X="-7" Y="190"/>
        </Image>
        <Shift>
            <Value Minimum="0" Maximum="9">
                (A:ENG1 N1 RPM, percent) abs 120 min 0 max 10 %
            </Value>
            <Scale Y="24"/>
        </Shift>
    </Element>
    <Element>
    <Text X="150" Y="150" Length="11" Font="Arial" Color="White" Adjust="Center" VerticalAdjust="Center">
        <String>%((A:ENG1 N1 RPM, percent))%!05d!  10 %</String>
    </Text>
    </Element>
</Gauge>
 
Last edited:
Nevermind all, I fixed my problem.

I added a 0 to the top of my bitmap over the ending 9, and a 9 at the end of the bitmap after the starting 0, and adjusted my scale. Looks smooth as all getout now!

Here is my code for those interested. It took me a lot longer than I'd care to admit to get here.

XML:
<Gauge Name="747 N1 Indicator" Version="1.0">
    <Image Name="N1.bmp"/>
    <Element>
        <Position X="74" Y="74"/>
            <Image Name="N1_Needle.bmp">
            <Axis X="53" Y="4"/>
            </Image>
        <Rotate>
            <Value Minimum="0" Maximum="120">(A:ENG1 N1 RPM, percent)</Value>
                <Nonlinearity>
                    <Item Value="0" Degrees="20"/>
                    <Item Value="20" Degrees="56"/>
                    <Item Value="40" Degrees="91"/>
                    <Item Value="60" Degrees="127"/>
                    <Item Value="80" Degrees="162"/>
                    <Item Value="100" Degrees="196"/>
                    <Item Value="120" Degrees="231"/>
                </Nonlinearity>
        </Rotate>
    </Element>
    <Element>
    <MaskImage Name="N1_mask.bmp">
        <Axis X="75" Y="75"/>
    </MaskImage>
        <Image Name="N1_Tape.bmp">
        <Axis X="-7" Y="212"/>
        </Image>
        <Shift>
            <Value Minimum="0" Maximum="9.99">
                (A:ENG1 N1 RPM, percent) abs 120 min 0 max 10 %
            </Value>
            <Scale Y="24.08333"/>
        </Shift>
    </Element>
</Gauge>
 
I am reviving this thread because I am once again struggling with a tape gauge and I'm driving myself crazy figuring out what's going wrong.

I made a fuel quantity gauge for the beginnings of my fuel panel on the 747, and both the needle and tape readouts are showing the correct values. However, any time one of the tapes reaches 0 (say, decreasing from 10000 lbs down to 9000), the tape rapidly swings from 0 back UPWARDS to 9, rather than smoothly rotating DOWN to 9. I have implemented several tape gauges on my panel already and none of them display this issue. My N1 gauges, for example, use number strips that are exactly the same format: they run from 0 to 9 bottom to top.

The number strip for the ones position on this fuel gauge is 208 pixels tall, while the 10s and 100s positions is 207.

Here is the code for the tapes on the fuel gauge:

XML:
    <Element>
    <MaskImage Name="Fuel_qty_mask.bmp">
        <Axis X="75" Y="75"/>
    </MaskImage>
        <Image Name="Fuel_Qty_1s.bmp">
        <Axis X="-13" Y="144"/>
        </Image>
        <Shift>
            <Value Minimum="0" Maximum="9.99">
                (L:AC Bus 1 Powered, bool) 0 ==
                if{ 0 }
                els{ (A:FUEL TANK LEFT AUX QUANTITY, gallons) 6.7 * 1000 % 100 / }
            </Value>
            <Scale Y="17.33333"/>
            <Delay PixelsPerSecond="300"/>
        </Shift>
    </Element>
    <Element>
    <MaskImage Name="Fuel_qty_mask.bmp">
        <Axis X="75" Y="75"/>
    </MaskImage>
        <Image Name="Fuel_Qty_10s.bmp">
        <Axis X="6" Y="143"/>
        </Image>
        <Shift>
            <Value Minimum="0" Maximum="9.99">
                (L:AC Bus 1 Powered, bool) 0 ==
                if{ 0 }
                els{ (A:FUEL TANK LEFT AUX QUANTITY, gallons) 6.7 * 10000 % 1000 / s1 d flr - s2 0.9 &lt;=
                if{ l1 flr }
                els{ l1 flr l2 10 * 9 - + } }
            </Value>
            <Scale Y="17.25"/>
            <Delay PixelsPerSecond="300"/>
        </Shift>
    </Element>
        <Element>
    <MaskImage Name="Fuel_qty_mask.bmp">
        <Axis X="75" Y="75"/>
    </MaskImage>
        <Image Name="Fuel_Qty_10s.bmp">
        <Axis X="24" Y="143"/>
        </Image>
        <Shift>
            <Value Minimum="0" Maximum="9.99">
                (L:AC Bus 1 Powered, bool) 0 ==
                if{ 0 }
                els{ (A:FUEL TANK LEFT AUX QUANTITY, gallons) 6.7 * 100000 % 10000 / s3 d flr - s4 0.99 &lt;=
                if{ l3 flr }
                els{ l3 flr l4 100 * 99 - + } }
            </Value>
            <Scale Y="17.25"/>
            <Delay PixelsPerSecond="300"/>
        </Shift>
    </Element>
 
Maybe try commenting out the delays -
<!-- <Delay PixelsPerSecond="300"/> -->

This does work, however it's not really the idea I was hoping for, lol... While this does make the gauge work as intended, the gauge will rapidly snap to 0 when unpowered. The weird thing is, all of my engine gauges (of which they are the same kind of gauge - round dial with digital drum readout) have delays on the tapes, and don't exhibit this issue.

Perhaps there is something different about those, but I've looked that code up and down and can't figure out what it would be. :banghead:
 
Back
Top