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

FSXA Making a PFD

Messages
75
Country
unitedstates
Hey everyone I am making a PFD. I have the bank working but the pitch is non functioning. I was also wondering about making some parts of the gauges like the attitude indicator outline using the XML draw in aces as opposed to images. Would it also be possible to do that for the FD? I am also having trouble with the bank indicator as it does not completely line up. I would like to try and maximize the use of the XML draw where possible. Any and all input is very much appreciated. The highlighted portions are the trouble spots.

PFDlayout.jpg


Here is the code so far

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

<SimBase.Document
        Type="AceXML"
        version="1,0"
        id="PFD Screen">
    <Descr>AceXML Document</Descr>
    <Filename>PFD Screen.xml</Filename>
    <SimGauge.Gauge id="PFD Screen" ArtDirectory=".">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Size>131,145</Size>
        <Element id="PFD Screen">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Visibility>(A:CIRCUIT GENERAL PANEL ON, bool)</Visibility>
            <Element id="ATT">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Element id="Attitude Ball">
                    <FloatPosition>64.500,76.000</FloatPosition>
                    <Image id="Blue-Brown1.bmp" Name="Blue-Brown1.bmp">
                        <Transparent>True</Transparent>
                        <Axis>67.500,300.000</Axis>
                        <Bright>True</Bright>
                    </Image>
                    [COLOR="Red"]<Shift id="Shift">
                        <Expression id="Expression">
                            <Minimum>-90.000</Minimum>
                            <Maximum>90.000</Maximum>
                            <Script>(A:Attitude indicator pitch degrees,degrees) </Script>[/COLOR]
                        </Expression>
                    </Shift>
                    <Rotation id="Rotation">
                        <Expression id="Expression">
                            <Script>(A:Attitude indicator bank degrees,radians)</Script>
                        </Expression>
                    </Rotation>
                </Element>
                <Element id="Roll Scale">
                    <FloatPosition>0.000,3.000</FloatPosition>
                    <Image id="bank.bmp" Name="bank.bmp">
                        <Transparent>True</Transparent>
                        <Bright>True</Bright>
                    </Image>
                </Element>
            </Element>
            <Element id="Screen Outline">
                <FloatPosition>4.000,8.000</FloatPosition>
                <Image id="screenoutline.bmp" Name="screenoutline.bmp">
                    <Transparent>True</Transparent>
                    <Bright>True</Bright>
                </Image>
            </Element>
            <Element id="Airplane Symbol">
                <FloatPosition>4.500,73.500</FloatPosition>
                <Image id="fixed pitch.bmp" Name="fixed pitch.bmp">
                    <Transparent>True</Transparent>
                    <Bright>True</Bright>
                </Image>
            </Element>
            <Element id="Element">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Image id="leveltriangle.bmp" Name="leveltriangle.bmp">
                    <Transparent>True</Transparent>
                    <Axis>-60.500,0.000</Axis>
                    <Bright>True</Bright>
                </Image>
            </Element>
        </Element>
[COLOR="Red"]        <Element id="Bank ind">
            <FloatPosition>64.500,73.500</FloatPosition>
            <Image id="bankind.bmp" Name="bankind.bmp">
                <Transparent>True</Transparent>
                <Axis>4.000,64.500</Axis>
                <Bright>True</Bright>
            </Image>
            <Rotation id="Rotation">
                <PointsTo>NORTH</PointsTo>
                <Expression id="Expression">
                    <Minimum>-360.000</Minimum>
                    <Maximum>360.000</Maximum>
                    <Script>(A:Attitude indicator bank degrees:1, radians)</Script>[/COLOR]
                </Expression>
            </Rotation>
        </Element>
    </SimGauge.Gauge>
</SimBase.Document>
 
Thanks Bill! I forgot about that page. I have most of the XML done now for the outlines. Now I need to get pitch working.
 
Your <Shift> won't work simply because you haven't told it how to move!

<Scale>0.000,-3.467</Scale>

The <Scale> entry tells the sim which direction to move, and how much to move.

The value for <Scale> is the result of dividing the "number of pixels to move" by the "amount of radians or degrees"

Open the pfd.xml file in the Bombardier_CRJ_700.CAB file and use it for a reference.
 
Ah no kidding. I was looking at the PFD for the FSX 738 and did not see any scale. I must have missed it. Thanks again!
 
Well I have the masking complete as well as the new background. Pitch and bank kind of work now but there is image shearing.
brrrr.jpg

Bank between 25° and 70°
brrr2.jpg


pfdprelim.jpg

in aces

Here is the code
Code:
<?xml version="1.0" encoding="UTF-16"?>

<SimGauge.Gauge id="PFD" ArtDirectory=".">
    <FloatPosition>0.000,0.000</FloatPosition>
    <Size>600,600</Size>
    <Element id="PFD">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Visibility>(A:CIRCUIT GENERAL PANEL ON, bool) 1 !=</Visibility>
        <Element id="Attitude">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Image id="Blue-Brown3.bmp" Name="Blue-Brown3.bmp">
                <Transparent>True</Transparent>
                <Axis>300.000,1380.000</Axis>
                <Bright>True</Bright>
            </Image>
            <Rotation id="Rotation">
                <PointsTo>NORTH</PointsTo>
                <Expression id="Expression">
                    <Script>(A:Attitude indicator bank degrees,radians)</Script>
                </Expression>
            </Rotation>
            <Shift id="Shift">
                <Scale>0.000,-12.000</Scale>
                <Expression id="Expression">
                    <Minimum>-90.000</Minimum>
                    <Maximum>90.000</Maximum>
                    <Script>(A:Attitude indicator pitch degrees,degrees)</Script>
                </Expression>
            </Shift>
            <MaskImage id="MaskImage" Name="AttMask2.bmp">
                <Axis>300.000,300.000</Axis>
            </MaskImage>
        </Element>
        <Element id="Screen outline">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Element id="Top Arc">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Arc id="Arc">
                    <Bright>True</Bright>
                    <Radius>300</Radius>
                    <LineWidth>1</LineWidth>
                    <LineColorScript>&apos;White&apos;</LineColorScript>
                    <StartAngle>330</StartAngle>
                    <EndAngle>210</EndAngle>
                </Arc>
            </Element>
            <Element id="Bottom Arc">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Arc id="Arc">
                    <Bright>True</Bright>
                    <Radius>300</Radius>
                    <LineWidth>1</LineWidth>
                    <LineColorScript>&apos;White&apos;</LineColorScript>
                    <StartAngle>150</StartAngle>
                    <EndAngle>30</EndAngle>
                </Arc>
            </Element>
            <Element id="Left Line">
                <FloatPosition>41.000,150.000</FloatPosition>
                <VerticalLine id="VerticalLine">
                    <Bright>True</Bright>
                    <Height>300</Height>
                </VerticalLine>
            </Element>
            <Element id="Right Line">
                <FloatPosition>559.000,150.000</FloatPosition>
                <VerticalLine id="VerticalLine">
                    <Bright>True</Bright>
                    <Height>300</Height>
                </VerticalLine>
            </Element>
        </Element>
    </Element>
</SimGauge.Gauge>

Any and all help is greatly appreciated. I thought I followed the PFD examples very closely.

EDIT:

Here is where I think the issue is
notright.jpg
the opposite occurs with pitch up. Also when pitched up 90 degrees the screen flips to 90 degrees down instead of rotating and counting back down from 90 degrees up.
 
Last edited:
Your drawing order is incorrect. The sequence must always be:

Image
Mask (Axis is set here!)
Shift
Rotate

Your drawing order is:

Image
Rotate
Shift
Mask (Axis isn't defined until after the Rotate and Shift has already occurred!)

Keep in mind that XML script is always interpreted from top to bottom. Order of definitions and operations is critical... :)
 
Last edited:
Wow I had no idea! Thanks Bill
It works up most of the time. I am still getting image shearing in a level bank attitude on the same spot on the screen
shearing.jpg

From 60°-90° pitch: The edge dividing the lower right portion is the same shear line as the image above.
afterfix.jpg


And from 25° to 50° degrees bank to the right only the image becomes like the pitch image above

Here is the new code
Code:
<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document
        Type="AceXML"
        version="1,0"
        id="PFD">
    <Descr>AceXML Document</Descr>
    <Filename>PFD.xml</Filename>
    <SimGauge.Gauge id="PFD" ArtDirectory=".">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Size>600,600</Size>
        <Element id="PFD">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Visibility>(A:CIRCUIT GENERAL PANEL ON, bool)</Visibility>
            <Element id="Attitude">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Image id="Blue-Brown4.bmp" Name="Blue-Brown4.bmp">
                    <Transparent>True</Transparent>
                    <Axis>300.000,1380.000</Axis>
                    <Bright>True</Bright>
                </Image>
				<MaskImage id="MaskImage" Name="AttMask2.bmp">
                    <Axis>300.000,300.000</Axis>
                </MaskImage>
                <Shift id="Shift">
                    <Scale>0.000,-12.000</Scale>
                    <Expression id="Expression">
                        <Minimum>-90.000</Minimum>
                        <Maximum>90.000</Maximum>
                        <Script>(A:Attitude indicator pitch degrees,degrees)</Script>
                    </Expression>
                </Shift>				
                <Rotation id="Rotation">
                    <PointsTo>NORTH</PointsTo>
                    <Expression id="Expression">
                        <Script>(A:Attitude indicator bank degrees,radians)</Script>
                    </Expression>
                </Rotation>
            </Element>
            <Element id="Screen outline">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Element id="Top Arc">
                    <FloatPosition>0.000,0.000</FloatPosition>
                    <Arc id="Arc">
                        <Bright>True</Bright>
                        <Radius>300</Radius>
                        <LineWidth>1</LineWidth>
                        <LineColorScript>&apos;White&apos;</LineColorScript>
                        <StartAngle>330</StartAngle>
                        <EndAngle>210</EndAngle>
                    </Arc>
                </Element>
                <Element id="Bottom Arc">
                    <FloatPosition>0.000,0.000</FloatPosition>
                    <Arc id="Arc">
                        <Bright>True</Bright>
                        <Radius>300</Radius>
                        <LineWidth>1</LineWidth>
                        <LineColorScript>&apos;White&apos;</LineColorScript>
                        <StartAngle>150</StartAngle>
                        <EndAngle>30</EndAngle>
                    </Arc>
                </Element>
                <Element id="Left Line">
                    <FloatPosition>41.000,149.000</FloatPosition>
                    <VerticalLine id="VerticalLine">
                        <Bright>True</Bright>
                        <Height>301</Height>
                    </VerticalLine>
                </Element>
                <Element id="Right Line">
                    <FloatPosition>559.000,150.000</FloatPosition>
                    <VerticalLine id="VerticalLine">
                        <Bright>True</Bright>
                        <Height>300</Height>
                    </VerticalLine>
                </Element>
            </Element>
            <Element id="Center Square">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Polygon id="Polygon">
                    <Bright>True</Bright>
                    <FillColorScript>&apos;black&apos;</FillColorScript>
                    <LineWidth>1</LineWidth>
                    <LineColorScript>&apos;yellow&apos;</LineColorScript>
                    <Point id="Point">
                        <FloatPosition>296.500,302.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>303.500,302.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>303.500,309.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>296.500,309.500</FloatPosition>
                    </Point>
                </Polygon>
            </Element>
            <Element id="Left Wing">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Polygon id="Polygon">
                    <Bright>True</Bright>
                    <FillColorScript>&apos;Black&apos;</FillColorScript>
                    <LineWidth>1</LineWidth>
                    <LineColorScript>&apos;Yellow&apos;</LineColorScript>
                    <Point id="Point">
                        <FloatPosition>135.500,302.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>238.500,302.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>238.500,334.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>231.500,334.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>231.500,309.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>135.500,309.500</FloatPosition>
                    </Point>
                </Polygon>
            </Element>
            <Element id="Right Wing">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Polygon id="Polygon">
                    <Bright>True</Bright>
                    <FillColorScript>&apos;Black&apos;</FillColorScript>
                    <LineWidth>1</LineWidth>
                    <LineColorScript>&apos;Yellow&apos;</LineColorScript>
                    <Point id="Point">
                        <FloatPosition>464.500,302.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>361.500,302.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>361.500,334.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>368.500,334.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>368.500,309.500</FloatPosition>
                    </Point>
                    <Point id="Point">
                        <FloatPosition>464.500,309.500</FloatPosition>
                    </Point>
                </Polygon>
            </Element>
            <Element id="Left Edge bar">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Rectangle id="Rectangle">
                    <Axis>-42.500,-302.500</Axis>
                    <LineWidth>1</LineWidth>
                    <Bright>True</Bright>
                    <Width>14</Width>
                    <Height>7</Height>
                    <LineColorScript>&apos;Yellow&apos;</LineColorScript>
                    <FillColorScript>&apos;Black&apos;</FillColorScript>
                </Rectangle>
            </Element>
            <Element id="Left Edge bar">
                <FloatPosition>0.000,0.000</FloatPosition>
                <Rectangle id="Rectangle">
                    <Axis>-545.500,-302.500</Axis>
                    <LineWidth>1</LineWidth>
                    <Bright>True</Bright>
                    <Width>14</Width>
                    <Height>7</Height>
                    <LineColorScript>&apos;Yellow&apos;</LineColorScript>
                    <FillColorScript>&apos;Black&apos;</FillColorScript>
                </Rectangle>
            </Element>
        </Element>
    </SimGauge.Gauge>
</SimBase.Document>
 
Last edited:
:eek: I have no idea why it's doing that at this juncture, unless it's because your image is simply too large...

<PointsTo>NORTH</PointsTo> is unnecessary. I don't know if it can cause a problem, only that it's not needed.

How did you calculate the value for your <Scale>?

12 seems a bit too much...
 
Well the background image is 600 x 2760. I thought the image might be a bit large but I was trying to achieve a 50° (+/-25°) FOV on the PFD so if 25° is 300px from center that fits the 600px diameter of the circle. then the whole image needed to be 2760. I will try reducing it.

Flight Director is operational

Thanks for all the help Bill.
 
Last edited:
Fixed! Image size was causing the big issues! Gauge size went from 600 x 600 to 300 x 300 to 150 x 150 which finally worked. 150 still has some minor shearing when blown up but other wise when its small it is a beauty.
 
I suspected that the huge image was the proximate cause of the problem. The rendering system was simply running out of memory space to hold the entire image at one time.
 
Back
Top