Sign in to follow this  
jvile

Replacing approaches/waypoints w/o affecting other airp...

Recommended Posts

Not strictly scenery per se, but BGL files just the same. Would it be possible to replace approaches, legs, waypoints in FS9 scenery files by themselves through add-on scenery? That is, without replacing the entire airport they're a part of? If so could it be done on a case by case basis (i.e. replace one approach but not another for the same airport), or would you have to use the deleteAllApproaches attribute of the DeleteAirport element and redefine them all?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

For fs9, I've added approaches to airports that didn't have them to begin with by making an afcad and then decompiling it, adding the approachs, and recompiling with bglcomp.I don't see why you couldn't do this with an airport with existing approaches as well. You could decompile the default AP****.bgl and copy the approaches and waypoints for the airport and paste them into your decompiled afcad, modify them as desired, add the deleteAllApproaches="TRUE" line, and recompile.Seems like it should work, no?Jim

Share this post


Link to post
Share on other sites

That's what I'm hoping to do but didn't want to start the research if someone else had already tried it and found it wouldn't work. The idea is to replace the stock FS9 STARs with current navdata, and add the waypoints used by newer SIDs as well.

Share this post


Link to post
Share on other sites

I think it'll work, I just did some experimenting by first decompiling an afcad I'm using for KGEG and adding only the deleteAllApproaches="TRUE" line. I recompiled and fired up the sim and tried to "Select Approach" for KGEG in the GPS. It worked, no approaches. Next I decompiled AP916150.BGL and copied KGEG's approaches and waypoints (over 2000 lines for the approaches alone :-eek ) and tried it again. That worked too, XML compiled OK and the approaches showed up in the GPS.Have fun with those 2000+ lines of code though :) .Jim

Share this post


Link to post
Share on other sites

Waypoints:FS9/FSX have two types: waypoints and terminal waypoints. Waypoints are in the default AT9/ATX files and are drawn in magenta on the map/GPS. Terminal waypoints are tied to specific airports in the default AP9/APX files and are drawn in blue on the map/GPS. You can update or add to either. Note that waypoints and terminal waypoints with the same names are treated as different points so don't use the wrong type. The terminal waypoints must be contained in an airport element.Approaches:Approaches are part of an airport in the default AP9/APX files. You can add an approach, but to change one I believe you must use the deleteAllApproaches setting for the airport. that means you will have to decode all the default approaches and include all the unmodified ones along with the modified one(s). Unfortunately, the FS9 disassemblers don't do a 100% job of decoding the approaches, so tread carefully if you want to modify approaches. If it's just a runway number change I think you can probably get away with leaving the old approaches alone and just add new ones but I'm not 100% sure on that.scott s..

Share this post


Link to post
Share on other sites

Do Not decompile a af2 AFCAD airport bgl and add/copy approach/scenery Elemets to that BGL. Many parts of the airport are refered to as unseen scenery such as approach data.Even if you add a deleteAllApproaches=TRUE Lee Swordy designed AFCAD so it will delete all approach data if AFCAD opens and saves the file a second time. AFCAD always resets any deleteAllApproaches= statement back to FALSE and flushes out anything that it sees. Some scenery designers in the past learn this the hard way by adding data to a AFCAD bgl. If the User open that AFCAD and added or changed a simple parking spot all scenery/approach data was lost.If you are adding a new ILS to a runway including new companion approach code or adding TERMINAL_WAYPOINTS, LDA/IGS/VORDME/NDB/etc approaches that are not part of the default FS database then there is no need for using deleteAllApproaches= or coping anything into any type bgl.Only if you are modifing what is already in the database do you have to copy out ALL approach data to your new XML with the deleteAllApproaches=TRUE so FS does not read the approaches x2 and displays them twice in the GPS List.

Share this post


Link to post
Share on other sites

Allrighty then... So what do you add your new approach to then. I assume they need to be within a set of tags somewhere, what do I do, make a new XML with just the airport tags and the approaches? Doesn't that effectively constitute "duplicate afcads"?Jim

Share this post


Link to post
Share on other sites

>Allrighty then... So what do you add your new approach to>then. I assume they need to be within a set of tags>somewhere, what do I do, make a new XML with just the airport>tags and the approaches? Doesn't that effectively constitute>"duplicate afcads"?>Yes. Which is why simply blindly following a "no duplicateafcads" rule will cause problems. An afcad (that is, airport datacompiled with the AFCAD2 program by L Swordy) is not the same asairport data compiled with BGLComp, such as used in SGX or hand-written XML code for approaches. Unfortunately, the "scanAFD"programs don't make this distinction. Also, AFCAD2 was designed to modify the default airport without actually editing the default file, as was the case in AFCAD1. For a more casual use, such as adding parking to a default airport it works as intended. When AFCAD2 gets applied to addon scenery, that's where problems can creep in.scott s..

Share this post


Link to post
Share on other sites

What I was thinking of doing is leaving all existing scenery files alone, instead creating new XML files that had only approach data in them (preceded by the DeleteAirport approaches element). The replacement approach XML files could be generated off current AIRAC data without too much trouble, and placed at a higher priority than other scenery files.Crazy? Or might it work?

Share this post


Link to post
Share on other sites

>>Allrighty then... So what do you add your new approach to then. >After you write a new XML of approaches and TERMINAL_WAYPOINTS you compile and place into the ...FS9SceneryGenericscenery folder. FS9 will handle the reindexing and the read sort order (your XML elements/Attributes) of the bgl automactically. What this does is unlocks the Approach data that is in the original AP9nnnn.bgl, layers it as a proper priority and then relocks the approach data at the proper higher layer without any intervention on the designers part.That should also answer Gaf's question on where to put is Approach bgl which does not belong above all other 3rd party scenery. It MUST BE layered between the AP9/Xnnnnn.bgl appropriate folder and the Addon Sceneryscenery folder which is were MS requires ALL enhanced airports if a sub scenery folder of Addon is not made. >>I assume they need to be within a set of tags somewhere, >Yes, Approach data has to nest under a airport header because the Airport owns the data and then everything resides inside the FSdata. This becomes very complex because1. The Airport header owns most everything that is not a subset to something else except non Terminal Navaids2. The Airport owns the Runways but the Runway owns the ILS data.3. The Airport owns the Runways, the Runway owns the ILS, but the ATC owns the Approach data for the ILS or any approach associated to the runway.4. The Airport owns the Runway, the Runway owns the pattern, but the pattern is owned by the TNG FP for AI Planes and the Control tower (if it exsit) for the User Plane.5. The Airport property does not own the runway but the Airport Header does. This is the foundation of my Crosswind Runway Technique I introduced when FS9 was released. A runway for a airport can be placed halfway around the world and the Airport knows it is there.6. The Airport owns the Runway, the Runway owns the length, the Aircraft.cfg file for both the USER/AI Plane owns the Empty Weight of the Aircraft (EW) which then tells ATC what runway the AI/User is assigned for takeoff and arrival. This is the foundation I use to open all 5 parallel runways for arrival at my KATL for FSX. The list can be endless but as you peck your way down through the XML you have to understand who controls and owns what subset. Another example is some Scenery that you see (or lack of) on airport property is owned by the scenery database. That means you can build a exclude XML and compile every single exclude that you created for the entire world in a master XML because excludes are owned by the scenery database. > >what do I do, make a new XML with just the >airport tags and the approaches? >Yes if that is all that you want in that bgl. Besides new or edited Approach data you can also place all 1. Multiple excludes which in some cases number more then 50 per airport 2. 100's of scenery libraryObject GUID's including both generic buildings and mdl models that also come from many different Regions. Regardless of what you are told by others that certain model.mdl is Region specific and locked, it is not. This does not require hacking any type FS9/FSX default bgl's3. New Control Towers with Beacon's, 4. New Wind Socks, 5. Jetways made by Shez or other public 3rd party6. Many many different types of static ground support equipment7. New NDB's both TERMINAL and non TERMINAL based on who owns it and where it is prioritized in the XML structure8. VOR's if new ones have been commissioned9. TERMINAL_WAYPOINTS which are owned by the airport10. WAYPOINTS again based on prioritizing and read sort order that the Airport does not own 11. New Taxiway signs12. Move exsiting default Taxiway signs once they are unlocked13. Add STAR approaches so ATC will vector all arrival's USER/AI off the STAR and onto the IAF Transition prior to the 30 degree offset vectors for final14. Create exoctic VMC (clear weather) approaches so all AI Planes are forced to fly a LDA, SDA, IGS, GPS, RNAV, VORDME, VOR, NDBDME, NDB, Curved approaches to avoid high terrain on final, circle to land type approaches, etc. 13. the list continuesSome of what is in the list above requires a deleteALLxxxxxxxxx='s statement to block the default so it is not x2. Some require a proper XML exclusion. Some require a certain read order structure. Some areas cannot be blocked or excluded and even if in your XML are still read from the original AP9nnnnn.bgl. Some don't require any blocking, read order or excluding. FS9/FSX is smart enough to know if you add a certain element/attribute in your XML it will not load the default data but load what you have added so no duplicates occur at your airport when processed by the dll's. >>Doesn't that effectively constitute "duplicate afcads"?>No, because none of what I listed above can even be in a Lee Swordy af2_xxxx.bgl enhanced airport. A AFCAD bgl is designed to control all Ground behavior of User/AI Airplanes with the exception of the invisible scenery related to Freq's, Start Locations which are multi functional when passed through the dll, and some forms of Navaid data that displays on the Grid which is not owned by the Airport.Dulicate AFCAD bgl's designed with Lee Swordy's Utility can cause a CTD because a Designer does not understand what causes the CTD inside the XML (AFCAD) to begin with.You can have many many AFCAD's for one airport. I don't mean put one in and take one out like so many PAYWARE and FREEWARE scenery designers do to open and close different runways based on winds.What I am talking about is the 8 AFCAD's I have for KATL or the 9 AFCAD's I have for KDFW that all together make up a single entire airport. We call those Overlay AFCAD's which is misleading because they are really side by side independent (8 or 9) Airports to make one functional Airport.Most of what I have said above is pure FS9. There are a few exceptions for FSX because of the way MS realigned certain airport elements in the default APXnnnnn.bgl but the same applies during construction of a FSX enhanced airport which also follows the guidlines above.One of the differences is that FSX did away with the Generic folder so all additional enhanced airport bgl's that are not part of ADE/FSXP/AFX or even AFCAD if it is used in FSX enhanced airport design now belongs in the ....FSXSceneryGlobalscenery folder.Probably a lot more then what you wanted to know so I will stop here unless you have more questions.

Share this post


Link to post
Share on other sites

Wow Jim, there's a lot of info there, thanks. I've got a thousand questions actually, but I haven't even thought of 'em all yet. Let me digest this for a day or so, play with it a little in the sim and I'm sure I'll be back. I've got a folder full of .txt files that contain copies of certain forum posts I've run across that I thought were worth saving. This one's already in there. Thanks,Jim

Share this post


Link to post
Share on other sites

JimYou are welcomeWe have to keep reminding ourselfs that some SDK's are not knowledge based but design based.In order to understand FS9/FSX behavior takes a long time of study which is not a MS priority for the User.Some of us like Reggie, Scott and myself spend a lot of time breaking FS9/FSX in order to understand what works and what does not work. In doing so we then try to help others understand the behaviors without having to spend the years we have spent in the studies of FS.It is surprizing at times how many designers are resistant to change or continue to adapt older rules to a newer product. When something no longer works correctly because they broke the sim then you see the post that blames MS for the problem and not the fact the actual Payware or Freeware broke the system.One very important comment I would like to add. AFCAD was a work in progress when Lee stopped the design. AFCAD works in FS9 but is a FS2002 Utility. Lee did update it to read XML format code so it would open a FS9 airport bgl but most of the optional features, checks and value changes are based on FS2002.He had on his to do list many features that needed removing and features that needed added but once again stopped the design work at beta version 2.21.Any Utility that is in current production (Freeware or Payware) and is based on AFCAD (look and feel) is also a FS2002 Utility and many features when used will cause problems and break a FS9/FSX airport.The BGLComp SDK is correct for the most part but the interpretation of certain Element and Attribute values work very differently between FS2002, FS9 and FSX. A simple example is the following SDK Attribute acceptable values statement which was in the FS2002, FS9 and now the FSX SDKprimaryClosed (base end runway) Primary end is closed TRUE, FALSEsecondaryClosed (recip end runway) Secondary is closed TRUE, FALSEwhich is not knowledge based and is written correctly but applied in rules differently per each version of FS. The SDK tells us what is acceptable for the BGLcomp compiler schema .xsd but does not tell us the behavior of Aircraft if the value is changed for each version of FS.

Share this post


Link to post
Share on other sites

Wow, look what I started! This is the most informative thread I've seen on scenery! Ever consider writing a book Jim? You've got the communication skill for it and scenery developers everywhere would sing songs about you.I'm really only dabbling in scenery to get the arrivals/approaches/departures updated. There are so many facets to FS; it's clear to me now that any one of them could easily consume a ton of time to really understand. Man, I sure wish MS would give us the kind of in-depth understanding that Jim has obviously worked so hard to develop.

Share this post


Link to post
Share on other sites

Thankyou GafMost of my help files, writings, tutorials, etc over the past 5 years were on the old and older PAI forums and lost when new ownership occured months ago.Presently you will find many of my current post on FSdeveloper.com but just like many others I am still learning and helping others with their questions.I visit other forums from time to time but most of us have a home forum where we can be found on a day to day basis.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this