Jump to content

Sign in to follow this  
harryw

Touchdown speed gauge similar to FSUIPC plugin (for folks without FSUIPC)

Recommended Posts

Hey all,

this thread:

http://forum.avsim.net/topic/469334-landing-rate-plugin-for-fsuipc-improve-your-landings-fsxp3d/

 

inspired me to try myself at gauge programming, since I don't have FSUIPC and wanted something similar:

 

VSpeed.jpg

 

 

It's a bit more involved that the FSUIPC implementation  - it requires a new panel definition in the airplanes for which the gauge is to be used; this is what I'm using:

 

[Window10]
visible=1
size_mm=80,50
window_size=0.08,0.05
window_pos=0.0,0.5
background_color=0,0,0
ident=14080
zorder=5
alpha_blend=0.4
type=special
gauge00=Touchdown!VSpeed,0,0

 

(ident has to be a number greater than 10000 not used in the panel.cfg, and replace the 10 in [Window10] with a number that doesn't clash with any other window, probably best to stay greater than 10.

 

in the gauges directory, create a folder named 'Touchdown' and create a file named 'VSpeed.xml' in there, containing the following code:

 

<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document
        Type="AceXML"
        version="1,0"
        id="VSpeed">
    <Descr>AceXML Document</Descr>
    <SimGauge.Gauge id="Gauge">
        <Update>
            <Frequency>6</Frequency>
            <Script>
                (A:SIM ON GROUND, bool)
                if{
                    (L:TookOff,bool)
                    if{
                        0 (>L:TookOff)
                        (E:ABSOLUTE TIME,Seconds) 7 +  (>L:Timer)
                    }
                 }
                 els{
                     (A:VERTICAL SPEED, Feet per minute) (>L:VSpeed)
                     (A:GROUND VELOCITY, Knots) (>L:HSpeed)
                     1 (>L:TookOff)
                 }
             </Script>
         </Update>
        <Element id="Touchdown">
            <Visibility>(E:ABSOLUTE TIME,Seconds)  (L:Timer,Seconds)  <  </Visibility>
            <Element id="VSpeed">
                <GaugeText id="VSpeedText">
                     <Size>50,28</Size>               
                    <FontFace>Arial</FontFace>
                    <FontColor>red</FontColor>
                    <BackgroundColor>azure</BackgroundColor>
                    <FontHeight>25</FontHeight>
                    <HorizontalAlign>CENTER</HorizontalAlign>
                    <GaugeString>%((L:VSpeed,Number))%!d!</GaugeString>
                    <Length>5</Length>
                </GaugeText>
            </Element>
             <Element id="HSpeed">
                <FloatPosition>50,0</FloatPosition>
                <GaugeText id="HSpeedText">
                     <Size>30,28</Size>               
                    <FontFace>Arial</FontFace>
                    <FontColor>red</FontColor>
                    <BackgroundColor>azure</BackgroundColor>
                    <FontHeight>25</FontHeight>
                    <HorizontalAlign>CENTER</HorizontalAlign>
                    <GaugeString>%((L:HSpeed,Number))%!d!</GaugeString>
                    <Length>3</Length>
                </GaugeText>
            </Element>
        </Element>
        
    </SimGauge.Gauge>
</SimBase.Document>

 

That should give you an entry 'VSpeed' in the 'Views->Instruments Panel'  pulldown menu. Enable that and every time you touch down your vertical speed in FPM and horizontal speed in Knots will display for 7 seconds. The gauge updates 6 times a second; I felt that was enough to be reasonably accurate while having a minimal perfomance impact.

 

Hope somebody gets some use out of it!

Share this post


Link to post

I forgot:  In the [Window Titles] section in panel.cfg, add

 

WindowXX=VSpeed

 

to get the gauge selection into the pulldown menus.

Share this post


Link to post

Well, thanks!  I've modified the code a bit to take care of bouncing: Now only the first ground contact within 7 secs will be displayed. Also, the variable L:Timer clashed with one used somewhere in the A2A C172 gauges; needed to be renamed.

Since the community interest seems to be very close to zero I'll probably limit myself to topics such as 'My feelings towards X' from now on.

 

gauge code update:

 

<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document
        Type="AceXML"
        version="1,0"
        id="VSpeed">
    <Descr>AceXML Document</Descr>
    <SimGauge.Gauge id="Gauge">
        <Update>
            <Frequency>6</Frequency>
            <Script>
                (A:SIM ON GROUND, bool)
                if{
                    (E:ABSOLUTE TIME,Seconds)  (L:DisplayInterval,Seconds)  >
                    (L:TookOff,bool)
                    and
                    if{
                        (E:ABSOLUTE TIME,Seconds) 7 +  (>L:DisplayInterval)
                        0 (>L:TookOff)
                    }
                 }
                 els{
                    (E:ABSOLUTE TIME,Seconds)  (L:DisplayInterval,Seconds)  >
                    if{
                        (A:VERTICAL SPEED, Feet per minute) (>L:VSpeed)
                        (A:GROUND VELOCITY, Knots) (>L:HSpeed)
                        1 (>L:TookOff)
                    }
                 }
             </Script>
         </Update>
        <Element id="Touchdown">
            <Visibility>(E:ABSOLUTE TIME,Seconds)  (L:DisplayInterval,Seconds)  <</Visibility>
            <Element id="VSpeed">
                <GaugeText id="VSpeedText">
                     <Size>50,28</Size>               
                    <FontFace>Arial</FontFace>
                    <FontColor>red</FontColor>
                    <BackgroundColor>azure</BackgroundColor>
                    <FontHeight>25</FontHeight>
                    <HorizontalAlign>CENTER</HorizontalAlign>
                    <GaugeString>%((L:VSpeed,Number))%!d!</GaugeString>
                    <Length>5</Length>
                </GaugeText>
            </Element>
             <Element id="HSpeed">
                <FloatPosition>50,0</FloatPosition>
                <GaugeText id="HSpeedText">
                     <Size>30,28</Size>               
                    <FontFace>Arial</FontFace>
                    <FontColor>red</FontColor>
                    <BackgroundColor>azure</BackgroundColor>
                    <FontHeight>25</FontHeight>
                    <HorizontalAlign>CENTER</HorizontalAlign>
                    <GaugeString>%((L:HSpeed,Number))%!d!</GaugeString>
                    <Length>3</Length>
                </GaugeText>
            </Element>
        </Element>
        
    </SimGauge.Gauge>
</SimBase.Document>

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  
×
×
  • Create New...