• 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 FS9 GPS: What makes this airport runway map show up?

Messages
10,088
Country
us-arizona
Hey all,

Where in this code does it say to make the map show up for the runways? I am not seeing it... :(


Code:
// AIRPORT RUNWAYS PAGE INFO PAGE 2
        <Element Name="Airport Runways Page">
            <Visible>(@g:currentPageWPT) 1 == (@g:currentGroup) @kWPTPageGroup  == and</Visible>
                <Position X="205" Y="0"/>
                                                               <Image Name="AIRPORT_INFO_2.bmp"></Image>
            </Element>
        <Element Name="Airport Runways Page">
            <Visible>(@g:currentPageWPT) 1 == (@g:currentGroup) @kWPTPageGroup  == and</Visible>
            <Position X="56" Y="0"/>
            <Element>

                <Element>
                    <Position X="10" Y="5"/>
                    <Text X="50" Y="20" Length="3" Font="Arial Black" FontSize="10" Adjust="Left" VerticalAdjust="Center" Color="0xF0D0D0"

Multiline="No" Bright="Yes">
                        <String>APT</String>
                    </Text>
                </Element>
                <!-- Airport Info Box -->
                <Element>
                    <Position X="70" Y="5"/>
                    <Element>
                        <Position X="4" Y="1"/>
                        <FormattedText X="700" Y="374" Font="Arial Black" FontSize="24" LineSpacing="32" Adjust="Left" Color="0x00FF00"

Bright="Yes" Tabs="0,104,152,290,435">
                            <Image Name="Airport_Hard_NS.bmp"/>
                            <Image Name="Airport_Hard_NE_SW.bmp"/>
                            <Image Name="Airport_Hard_EW.bmp"/>
                            <Image Name="Airport_Hard_NW_SE.bmp"/>
                            <Image Name="Airport_Soft.bmp"/>
                            <Image Name="Anchor.bmp"/>
                            <Image Name="Helipad.bmp"/>
                            <Image Name="Private_Airfield.bmp"/>
                            <BlinkCode>@BlinkerCode</BlinkCode>
                            <String>
                                @AirportInfoBox
                            </String>
                        </FormattedText>
                    </Element>

                </Element>
                <Element>
                    <Position X="195" Y="30"/>
                    <Text X="60" Y="10" Length="10" Font="Arial Black" FontSize="10" VerticalAdjust="Center" Color="Cyan" Multiline="No" Bright="Yes">
                        <String>RUNWAY</String>
                    </Text>
                </Element>
                <Element>
                    <Position X="195" Y="43"/>

                    <Element>
                        <Position X="2" Y="2"/>
                        <FormattedText X="700" Y="374" Font="Arial Black" FontSize="24" LineSpacing="32" Adjust="Left" Color="0x00FF00"

Bright="Yes" Tabs="0,104,152,290,435">
                            <BlinkCode>@BlinkerCode</BlinkCode>
                            <String>
                                %((@g:currentAirportRunway) (>@c:WaypointAirportCurrentRunway))
                                %((@g:blinkingField) 2 ==)%{if}\{blnk}%{end}%((@c:WaypointAirportRunwayDesignation))%!s!\{nr}
                            </String>
                        </FormattedText>
                    </Element>
                </Element>
                <Element>
                    <Position X="195" Y="67"/>
                    <Text X="60" Y="10" Length="10" Font="Arial Black" FontSize="10" VerticalAdjust="Center" Color="Cyan" Multiline="No" Bright="Yes">
                        <String>INFO</String>
                    </Text>
                </Element>
                <Element>
                    <Position X="195" Y="80"/>

                    <Element>
                        <Position X="2" Y="2"/>
                        <FormattedText X="700" Y="374" Font="Arial Black" FontSize="24" LineSpacing="32" Adjust="Left" Color="0x00FF00"

Bright="Yes" Tabs="0,104,152,290,435">
                            <String>
                                \{ladj=L}%((@c:WaypointAirportRunwayLength, feet))%!d!\{dpl=ft}\n
                                \{ladj=R}x %((@c:WaypointAirportRunwayWidth, feet))%!d!\{dpl=ft}\n                   

            
                            </String>
                        </FormattedText>
                    </Element>
                </Element>
                <Element>
                    <Position X="195" Y="124"/>
                    <Element>
                        <Position X="2" Y="2"/>
                        <FormattedText X="700" Y="374" Font="Arial Black" FontSize="24" LineSpacing="32" Adjust="Left" Color="0x00FF00"

Bright="Yes" Tabs="0,104,152,290,435">
                            <String>
                                \{ladj=L}%((@c:WaypointAirportRunwaySurface))%{case}%{:1}Concrete%{:2}Asphalt%{:101}Grass

%{:102}Turf%{:103}Dirt%{:104}Coral
                                        %{:105}Gravel%{:106}Oil%{:107}Steel%{:108}Bituminus%{:109}Brick%{:110}

Macadam%{:111}Planks%{:112}Sand%{:113}Shale%{:114}Tarmac%{:115}Snow%{:116}Ice%{:201}Water%{end}\n
                                \{ladj=R}Surface\n                               
                            </String>
                        </FormattedText>
                    </Element>
                </Element>
                <Element>
                    <Position X="195" Y="168"/>
                    <Rectangle Width="75" Height="40" LineWidth="1" Color="Cyan" FillColor="Black" Bright="Yes"/>
                    <Element>
                        <Position X="2" Y="2"/>
                        <FormattedText X="700" Y="374" Font="Arial Black" FontSize="24" LineSpacing="32" Adjust="Left" Color="0x00FF00"

Bright="Yes" Tabs="0,104,152,290,435">
                            <String>
                                %((@c:WaypointAirportRunwayLighting))%{case}%{:1}No Lights%{:2}Part Time%{:3}Full Time%{:4}

Frequency%{end}
                            </String>
                        </FormattedText>
                    </Element>
                </Element>
            </Element>
        </Element>
 
Messages
10,088
Country
us-arizona
Well, trying to figure out how they make the maps show up in the Airport Info pages in FS9GPS. The way it calls them up is eluding me.

The only thing I can think of is that it is bringing up the maps via the page code enums. But how does it know to bring it up with its zoom settings and map sizes and beginning coordinates?

This is what I am getting right now...
2018-7-31_21-17-51-529.jpg


This (above) is the runway page. You can see that the center of the map is cut off and below the bottom (on its center). This gauge is 1500 x 681, high resolution. So how its small fs9gps is boosting the imagine this big is past me.

2018-7-31_21-52-43-772.jpg


Below, this is what I want. I was experimenting again and messed it up for my Flightplan page. FlightPlan usually doesnt have a map, it blanks out the screen when the page is up. So I added one, but messed that up.

I had done small mini maps on my older PFD units. I guess I can import those into this, but I should be able to figure this out and use this system as its 'right here'. How its telling the map to show and what size and where its centers are and zoom rate is just ellusive...

etogepro.jpg


This is photoshopped, its what I want. But for the other screens, the two on the top, screenshots, they are supposed to inhabit a small window in that page, each one, about the same size, one showing the runways zoomed in. So I need to figure out how to make those fit into neat little windows... SOME DANG HOW....
 
Messages
913
Country
indonesia
finally my curiosity is showing up... great work.

Btw, do you mean airport or runway only?

if airport, it around this
XML:
            <LayerAirports>(L:ARPTLayer, bool)</LayerAirports>    
            <DetailLayerAirports>-1</DetailLayerAirports>
            <TextDetailLayerAirports>1</TextDetailLayerAirports>
            <ObjectDetailLayerAirports>5</ObjectDetailLayerAirports>
            <ColorLayerAirports>0xAD8408</ColorLayerAirports>
            <TextColorLayerAirports>0xAD8408</TextColorLayerAirports>
            <ColorLayerAirportsTowered>0xFF9400</ColorLayerAirportsTowered>
            <ColorLayerAirportsUntowered>0xCE00C5</ColorLayerAirportsUntowered>

I think you need read Bob Documentation
https://www.fsdeveloper.com/forum/threads/fs9gps-documentation.23549/
 
Messages
542
Country
australia
Refer to replies # 7 and # 8 at following link ,
https://www.fsdeveloper.com/forum/threads/solved-nesting-xml-macros.443037/

The extremely complex and interlinked macros in the coding of for example the GPS500 control
the switching and display in that unit .
Trying to follow the flow and understand the function of the macros is very difficult , it will drive you
to the edge , it can be done , but takes a long time .
I shudder to think what a complete flow chart for the GPS500 would look like , it would in all probability
cover the area of a kitchen table .

The beauty of those macros is that they keep the number of code lines down to about 4,500 for the GPS500 .
I have only " some " of the GPS500 functions in two instruments (a radar and an MFD ) and their combined code
totals about 9,500 lines .

Cheers
Karol
 
Messages
1,564
Country
thailand
Pak Maryadi,

I appreciate your pointing Bill to the gps and map guidebooks. Terima kasih banyak.



Bill,

Looks like you're making significant changes to the layout (appearance) of the stock gps_500.xml gauge, but hopefully, no functional changes.

The map you want is in the WPTMap element found at line ~2700 in the gps_500.xml gauge. Play around with X=, Y=, CenterX=, CenterY= values of <CustomDraw> within that element.

This "pop-up" map displays either a stick diagram of the airport runways, which is what you're asking about, or the approach procedure depending on the value of @g:currentPageWPT. Zoom is also an important consideration for this pop-up and that is controlled by @g:smallmap_ZoomFactor.

A word about @g variables:

There are two categories of fs9gps variables found in the stock gps_500.xml gauge:

1) The “@c” core gps variables that control gps navigation, access to the airport and navaid database, nearest searches, instrument approaches, etc.

2) The “@g” gps 500 variables that are specific to, and facilitate the coding of, certain operating features of the gps_500 gauge (such as page display), a Garmin GPS 500 near-replica. Variables from the two categories should not be confused.

The core gps variables are the subject of my guidebooks, whereas the @g variables are not covered. @g vars are uncomplicated. Many are simple counters; some are just bool-type on-off flags. They are mostly controlled by the users' clicking of the gps 500 push buttons and cursor knob. All could be replaced by L:Vars if the user wanted to do some work and edit the gps_500 gauge.

The same comments apply to @g vars of the FSX thru P3D g1000_pfd.xml gauge. Although different from the gps_500 @g vars, they serve the same purpose.

If you begin to make functional changes to the gps gauge, then you're really going to have to understand xml and both the map and gps sides of the gps.dll module. The guidebooks are there when you get to that step.

FS9GPS Module Guidebook

CustomDraw fs9gps:Map Guidebook

Bob
 
Messages
10,088
Country
us-arizona
Ahh sooo...! Many thanks guys. I will get that literature and start reading.

I think this might help me with how they manage things.
c=core and commands
g=graphics and pages

I was trying to figure out the wiring by tracing back the Macros and its exactly what Karol says, drives you to the edge. I was going to just start putting my own custom mini maps in, but needed the settings for the 'stick runways' and also the approach plates settings. The manuals should help me with that.

I forgot that they redid things with FSX. I forgot about the G1000 MFD's.

So, Maryadi, you hit that its possibly the Mouse command that is bringing up the custom fs9gps:map windows! Why didnt I think to look there.... Thats how I might have wired it. argh.. Thanks everyone.

Bill
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I shudder to think what a complete flow chart for the GPS500 would look like , it would in all probability
cover the area of a kitchen table .
I actually tried my hand at flowcharting the default G500 script. It actually became so convoluted that my flowcharting software choked and crashed... :yikes:
 
Messages
10,088
Country
us-arizona
I actually tried my hand at flowcharting the default G500 script. It actually became so convoluted that my flowcharting software choked and crashed... :yikes:

LOLOLOL... I believe it.

I went with bitmaps on mine instead of rendered windows. I was deleting Elements (Rectangles) here and there, adding Bitmap Images, and found I had 2 and 3 layers of Positions. Just 2 nights ago, from watching videos on the GPS500 on YouTube (FSXGPS500 or FS9GPS) and seeing new windows I never knew were in it, its like my work just became double. I never knew this gauge could do THIS MUCH stuff...! My goodness... I never did this with my old G1000's. It almost makes me want to make a G5000, now that I am seeing how its done. I have been logging all the location points with // NOTATIONS of what each section is, so I can use it in the future as a template.

Bill Leaming, perhaps instead of doing a flow chart, just do one that is filled with notes so you can easily go in and click and change.

For me, I should almost go into the stock GPS500 and make all the notes entries in that so the rendered windows are retained and then make a template version of that one.
 
Messages
10,088
Country
us-arizona
I just went with a new 'knob' management system; up / down and right / left, with 'enter' in the middle and cursor above it. Makes more sense and its a fresh approach.

The right side of the screen presently is tucked under. I have to redo my screen edges as they are cut off by the bazel.


2018-8-1_15-52-14-982.jpg


This is a typical 'new' Bitmap popup screen. Same fonts layout, higher (bigger) resolution. All the 'marker' icons are double sized and they auto-space properly. I think I reset their axis though. There arent that many, so that was an easy task.

2018-8-1_15-51-44-573.jpg


Another custom screen.

2018-8-1_15-51-25-582.jpg


Another custom screen.

2018-8-1_15-44-45-994.jpg


The new Zoom and Nav panel on the right with arrow directions. Dwight had made a really cool 4 axis 'roam' system which the real ones have. I am not going to put that in though.

2018-8-1_15-44-54-726.jpg


There is some sort of 'Window' option button that the GPS code has in it, but I havent been able to to get that to work. It might be a nothing switch like the Wx readout. I put that in the center of the Zoom button assembly graphic.

Still need to get the OBS arrow tuned for the slider as its now 3x bigger.
 
Messages
1,564
Country
thailand
For me, I should almost go into the stock GPS500 and make all the notes entries in that so the rendered windows are retained and then make a template version of that one.

Good idea. Your gps unit is based on the gps_500.xml gauge albeit with much nicer looking displays. And besides, the g1000_pfd.xml is written in FSX schema, not the simpler FS9 schema that gps_500.xml uses and that you prefer (you're certainly not alone!). For readers of this thread that are not already aware, FS9 XML schema (i.e., syntax or format) works with the following flight sims: FS9, FSX, and all current versions of P3D. The more verbose FSX XML schema works with the FSX sim and all current versions of the P3D sim, but not FS9 (FS2004).

Have you already incorporated the ElevationXXXXColor map variables to produce a richer looking terrain map than the default FS2004 colors, as well as giving you the option to incorporate a TAWS-like map feature? If not, you might think about it. Color palettes and instructions are in the map guidebook. You can add this to your upgraded version of the gps_500 gauge, and do it using FS9 XML schema.

If you add ElevationXXXXColor, then also add <TerrainShadow>1</TerrainShadow> to the <CustomDraw> section.

Bob

Color Terrain2.png
 
Last edited:
Messages
10,088
Country
us-arizona
A thousand thanks, Bob.

I was reading through the PDF books you wrote. I note that FSX GPS (G1000?) has many more features. Is that true? Or is the GPS 'system' basically the same with different XML? Same strings?
 
Messages
10,088
Country
us-arizona
Does anyone know how to adjust the PopupMenu dimensions? Trying to double or triple its height and find that it auto creates (generates) its own dimensions. Tried chasing it down in the Macros and the various sections.

This is the general function (popup message or popup msg) which is uniform to all these smaller 'input' zones, such as in Direct-To, entering the CRS or the FPL entries: popupMenu
 
Messages
1,564
Country
thailand
A thousand thanks, Bob.

I was reading through the PDF books you wrote. I note that FSX GPS (G1000?) has many more features. Is that true? Or is the GPS 'system' basically the same with different XML? Same strings?

With the release of FSX, Microsoft added significantly more CustomDraw:map capability. That's why I no longer make XML maps for the FS9 sim. On the gps side, Microsoft added 65 new variables in FSX but some of them do not function, and in my opinion, the new variables that work don't add capability that cannot be accomplished with the FS9 variables and a little extra script. Microsoft did, however, fix some bugs found in the FS9 version of gps.dll which is nice.

By the way, don't confuse the FS9 or FSX gps.dll modules which contain all the variables with the stock xml gauges released at the same time (gps_500.xml and g1000_pfd.xml).

Bottom line, the FSX version of gps.dll is superior to the FS9 version of gps.dll, especially on the map side. And again, you can write xml gps gauges using either FS9 XML schema or FSX XML schema with the provision that FSX schema won't work in the FS2004 sim.

The latest major upgrade of the gps.dll module was done by LockheedMartin. Starting in P3D v2, I believe it was, map and gps variables were added to the gps.dll module that facilitate use of departures and arrivals, SIDS and STARS. That's not in the SDK yet, not even in v4, but they're in the module and I'll be releasing updated Guidebooks that explain and demonstrate their use when I get around to it.

Bob
 
Last edited:
Messages
1,564
Country
thailand
Does anyone know how to adjust the PopupMenu dimensions? Trying to double or triple its height and find that it auto creates (generates) its own dimensions. Tried chasing it down in the Macros and the various sections.

This is the general function (popup message or popup msg) which is uniform to all these smaller 'input' zones, such as in Direct-To, entering the CRS or the FPL entries: popupMenu


The Message popup? Shouldn't have anything to do with macros. The position and size of the rectangle should be set in lines 3297 and 3298.

Might be worth posting a close-up screen shot of the feature you're describing.

Bob

XML:
<Position X="25" Y="26"/>
<Rectangle Width="230" Height="196" LineWidth="1" FillColor="Blue" Bright="Yes"/>
 
Messages
10,088
Country
us-arizona
// This is the front of the code, quite a few lines for this section (MANY) so its multi tasked for several fields. Including a zipped file of the section as well. (I cant go by lines on the code as I have cut many sections out and done tons of modifications).

I found the rectangle by adding red to the fill color, which was blue. It handles lower section (boxed) settings capabilities, like in this screenshot. In this screenshot, I am in DirectTo mode/window, have have mouse-cursored down to the 'Nearest' window slot and clicked on that. A window opens showing you a list of many Nearest that you can link to as a Direct-To locking option.

Code:
// MENU MESSAGE POPUP
        <Element Name="PopupMenu">
            <Visible>(@g:popupMenu) 0 !=</Visible>
            <Element>
                <Shift>
                    <Value>(@g:popupMenuY)</Value>
                    <Scale Y="1"/>
                </Shift>
                <Shift>
                    <Value>(@g:popupMenuX)</Value>
                    <Scale X="1"/>
                </Shift>
                <Rectangle Width="400" Height="500" Color="0xF0D0D0" FillColor="red" LineWidth="1" Bright="Yes">
                    <HeightCode>(@g:popupMenuHeaderHeight) (@g:popupMenuMaxElements) (@g:popupMenuLineHeight) 17 * * +

(@g:popupMenuHeight) min 4 +</HeightCode>
                    <WidthCode>(@g:popupMenuWidth) 8 +</WidthCode>
                </Rectangle>
                <Element>
                    <Position X="20" Y="2"/>
                    <RelClip>
                        <HeightCode>(@g:popupMenuHeaderHeight) (@g:popupMenuMaxElements) (@g:popupMenuLineHeight) 17 * * +

(@g:popupMenuHeight) min</HeightCode>
                        <WidthCode>(@g:popupMenuWidth)</WidthCode>
                    </RelClip>
                <FormattedText X="700" Y="374" Font="Arial Black" FontSize="24" LineSpacing="32" Adjust="Left" Color="0xF0D0D0" Bright="Yes">
                        <Font FontSize="10"/>
                        <Color Value="Cyan"/>
                        <BlinkCode>@BlinkerCode</BlinkCode>
                        <ScrollY>(@g:popupMenuScroll)</ScrollY>
                        <String>
                            \{rmrg=%((@g:popupMenuWidth))%!d!}
                            %((@g:popupMenu) 1 ==)%{if}
                                \{lsp=14}\{ladj=C}\{clr2}\{fnt1}RUNWAY\{fnt}\n
                                \{lsp=5}\{ladj=C}\{line=95}\{clr}
                                %((@c:WaypointAirportRunwaysNumber) s2 0 >)
                                %{if}
                                    %(0 sp1)
                                    %{loop}


wrmgpword.JPG


That window is usually big in the original GPS500, but with this monster 1500x681 gauge, its tiny. I guess I could use it as it is, as I am looking at it. Just have to find a way to move it, lolol... No Position coordinates for it!!!! none... No size coordinates, no position coordinates. It has X and Y scales..
 
Messages
10,088
Country
us-arizona
By the way, don't confuse the FS9 or FSX gps.dll modules which contain all the variables with the stock xml gauges released at the same time (gps_500.xml and g1000_pfd.xml).

Roger

Bottom line, the FSX version of gps.dll is superior to the FS9 version of gps.dll, especially on the map side. And again, you can write xml gps gauges using either FS9 XML schema or FSX XML schema with the provision that FSX schema won't work in the FS2004 sim.

I didnt know that.

I only write for FSX/P3D these days. The FSX XML to me seems insane. FS9 XML is simple and logical. Easier to write. My ole version of FS9 hasnt started up in many many years since I first tried out P3D V1. I was so impressed, I quit FS9 that week.
 
Messages
10,088
Country
us-arizona
Looking at that code some more, I found something I missed. I had changed the size of the rectangle to 400x500 which did nothing. But this code is above it.

Code:
                <Rectangle Width="400" Height="500" Color="0xF0D0D0" FillColor="red" LineWidth="1" Bright="Yes">
                    <HeightCode>(@g:popupMenuHeaderHeight) (@g:popupMenuMaxElements) (@g:popupMenuLineHeight) 17 * * +

(@g:popupMenuHeight) min 4 +</HeightCode>
                    <WidthCode>(@g:popupMenuWidth) 8 +</WidthCode>
                </Rectangle>

Height Code and Width Code. And this is in an early base Element, not in the upper section Elements. By upper I mean higher layers, not lower in the script lines, but higher in the layers of Elements in that particular section, so that setting is for ALL of the popups, not just each one.

Doubling those numbers, by the way, did nothing. :( Brought it to 30 ** and 16 + to see what would happen. Looks identical as before.
 
Top