Jump to content

Archived

This topic is now archived and is closed to further replies.

martinlest2

Error in default AP bgl file

Recommended Posts

Hi. I was trying to fix some addon airports and need to make a few changes to one of the default AP bgl files (EurW\scenery\AP949130.bgl). I corrected the elevation, but then found that the xml file I produced to do this won't recompile with BglComp.exe - I get a number of errors. It turns out that the original MSFS file won't recompile either when you reduce it to an xml and try with that, so it's nothing I did!My problems are, first, I don't know how to keep the cmd screen (which comes up when I drag the xml file to BglComp.exe of course) open, in order to read the errors - it closes within a few seconds. I can keep it open by grabbing the side slider and holding it, but although I managed to correct one of the erros ("FixType" error), there are lots more and I have no idea what to do about them.I'd appreciate some help. First, how do I tweak BglComp.exe so that the error cmd box stays open? And (this is a big favour to ask!!), would anyone have the time and inclination (and kindness) to decompile AP949130.cgl and try to see what the errors might be. Maybe someone with more knowledge than I have would be able to fix these problems and perhaps even let me have a working copy of the file (????!!!).Anyway, thanks for looking at the problem,Martin :-).. er, this is in FS9.1. Sorry!


Martin Stebbing, EGLF (UK)

Share this post


Link to post
Share on other sites

Luis, thanks: I already have the OpenCommandWindowHere installed, but it will only open a new cmd window at the folder of your choice - it won't stop the cmd window created by BglComp.exe from closing. You'd need to add a 'pause' line somehow to the script, but I don't know how to open the BglComp script to do that. May not be possible.Thanks David for the link to the elevation tool. I've just downloaded it (luckily one of AVSIM's files that is not missing!). Sounds like it's a good alternative to doing this manually.Martin


Martin Stebbing, EGLF (UK)

Share this post


Link to post
Share on other sites
Thanks David for the link to the elevation tool. I've just downloaded it (luckily one of AVSIM's files that is not missing!). Sounds like it's a good alternative to doing this manually.Martin
You are welcome.The "search" function in that utility can be a bit flakey at times so I always use Afcad first to check the Properties of the airport in question. That gives me the name of the file to work on and it's location. I also write down the exact name of the airport as that name can be used in the search function once you have set it to search the proper scenery subfolder - i.e. Namw/scenery as an example.Once you get the hang of setting it up to find the airport file you want to work on it is very simple to use.

Share this post


Link to post
Share on other sites

Excuse me, Martin, I was not clear. Use the Power Toy to open a Command Window in the same directory where you have BGLComp and the xml file. Then, manually type in the command, which should be something like:The Command Window will stay open until you close it, and the error messages will all be visible.Luis


do.png Hot, humid Caribbean paradise!

Share this post


Link to post
Share on other sites

Sorry Luis, I misunderstood. Thanks!With the little grey cells dying off at a rate of knots, seems I downloaded and installed the elevation tool last February - then forgot about it completely! Am using it now.. Ho hum....M. :-)


Martin Stebbing, EGLF (UK)

Share this post


Link to post
Share on other sites
Hi. I was trying to fix some addon airports and need to make a few changes to one of the default AP bgl files (EurW\scenery\AP949130.bgl). I corrected the elevation, but then found that the xml file I produced to do this won't recompile with BglComp.exe - I get a number of errors. It turns out that the original MSFS file won't recompile either when you reduce it to an xml and try with that, so it's nothing I did!My problems are, first, I don't know how to keep the cmd screen (which comes up when I drag the xml file to BglComp.exe of course) open, in order to read the errors - it closes within a few seconds. I can keep it open by grabbing the side slider and holding it, but although I managed to correct one of the erros ("FixType" error), there are lots more and I have no idea what to do about them.I'd appreciate some help. First, how do I tweak BglComp.exe so that the error cmd box stays open? And (this is a big favour to ask!!), would anyone have the time and inclination (and kindness) to decompile AP949130.cgl and try to see what the errors might be. Maybe someone with more knowledge than I have would be able to fix these problems and perhaps even let me have a working copy of the file (????!!!).Anyway, thanks for looking at the problem,Martin :-).. er, this is in FS9.1. Sorry!
You might want to go to www.fsdeveloper.com and the download section and get Compiler Helper.

Jon

-------

Microsoft Flight Sim MVP

Airport Design Editor FSDeveloper.com

Share this post


Link to post
Share on other sites

Yes, I had an old version laready in fact, but never used it (and forgot about it). I just downloaded the latest version and will try it ASAP. Many thanks,Martin

You might want to go to www.fsdeveloper.com and the download section and get Compiler Helper.

Martin Stebbing, EGLF (UK)

Share this post


Link to post
Share on other sites

Well it's one thing getting the error message into a readable form, yet another to know what to fix. I think I managed the fix type, but I can't see from all these lines exactly what it is that needs to be changed. If it's in fact quite a simple thing, maybe someone could kindly show me exactly where the errors actually are (all part of the learning curve!).Thanks again,Martin--------------------------------------------------------------------------------------------------------------------Parsing document: D:\Program Files\Compile Helper\AP949130.xmlERROR: This LEG is missing some of this required part (000049C1 00004BC1) Missing: Theta, ERROR C2031: Failed element parse <Leg>ERROR C2032: XML Parse Error! Element tree follows:ERROR: <FSData ERROR: version = 9.0ERROR: >ERROR: <Airport ERROR: ident = EHVBERROR: region = ERROR: country = Netherlands, TheERROR: state = ERROR: city = LeidenERROR: name = Valkenburg NavyERROR: lat = N52 9.96667ERROR: lon = E004 25.08333ERROR: alt = 0.30MERROR: magvar = 1.60ERROR: >ERROR: <Approach ERROR: type = VORDMEERROR: gpsOverlay = FALSEERROR: runway = 23ERROR: designator = NONEERROR: fixType = TERMINAL_WAYPOINTERROR: fixIdent = FD23ERROR: fixRegion = EHERROR: heading = 229.80ERROR: altitude = 1000.00FERROR: missedAltitude = 2000.00FERROR: >ERROR: <Transition ERROR: transitionType = FULLERROR: fixType = TERMINAL_WAYPOINTERROR: fixRegion = EHERROR: fixIdent = GUBASERROR: altitude = 2000.00FERROR: >ERROR: <TransitionLegs ERROR: >ERROR: <Leg ERROR: type = CRERROR: recommendedType = VORERROR: recommendedRegion = EHERROR: recommendedIdent = SPLERROR: magneticCourse = 140.0ERROR: time = 0.00ERROR: >ERROR: ERROR C2033: XML Parse Error (line, column, error)ERROR: 19674, 10, enumeration constraint failed.The attribute: 'fixType' has an invalid value according to its data type.ERROR: Bad Fix Type.ERROR C2031: Failed element parse <Leg>ERROR C2032: XML Parse Error! Element tree follows:ERROR: <FSData ERROR: version = 9.0ERROR: >ERROR: <Airport ERROR: ident = EHAMERROR: region = ERROR: country = Netherlands, TheERROR: state = ERROR: city = AmsterdamERROR: name = SchipholERROR: lat = N52 18.48334ERROR: lon = E004 45.85002ERROR: alt = -3.35MERROR: magvar = 2.00ERROR: >ERROR: <Approach ERROR: type = ILSERROR: gpsOverlay = FALSEERROR: runway = 22ERROR: designator = NONEERROR: fixType = TERMINAL_WAYPOINTERROR: fixIdent = FI22ERROR: fixRegion = EHERROR: heading = 221.39ERROR: altitude = 3000.00FERROR: missedAltitude = 2000.00FERROR: >ERROR: <MissedApproachLegs ERROR: >ERROR: <Leg ERROR: type = VMERROR: fixType = ERROR: fixRegion = ERROR: fixIdent = ERROR: magneticCourse = 160.0ERROR: altitudeDescriptor = AERROR: altitude1 = 2000.00FERROR: >ERROR: ERROR: Compilation errors detected, compilation failed!Parse complete!


Martin Stebbing, EGLF (UK)

Share this post


Link to post
Share on other sites

The various disassembly programs out there for bglcomp files such as AP9 aren't 100% accurate. They are known in particular to not handle approach data correctly, since before the release of ADE9X, very few people attempted to work with approach data (which at any rate was ignored by the AFCAD2 program).JABbgl will correctly patch the altitudes in an AP9 file, EXCEPT IIRC it doesn't work correctly when the airport is below sea level, but that method has been deprecated in favor of using the "airport alt stub" file. This is a small bgl file with the airport attribute data, including the corrected alt, that is placed in world\scenery. The advantage of this method is that the default files are not patched, making it easier when the addon is released to the community. The ADE9X program will create this "stub" file automatically , when the "change airport elevation" tool is used. (In FS9, ADE9 will not create a matching "flatten" terrain poly, though).Edit: BTW the problem in your first error, is the VORDME 23 approach requires a CR leg, which tells the GPS to draw a leg which follows a set course until intercepting a VOR radial. It looks like you are missing the "theta" line, which is where the VOR radial to intercept is placed (should be 242). The problem in the second error, is that the ILS 22 approach at EHAM missed approach ends with a VM leg, which is a constant heading (160) with a manual termination (keep flying until ATC gives you a new clearance). There is no fix associated with a VM so it shouldn't have the fixType, fixRegion, or fixIdent lines. scott s..

Share this post


Link to post
Share on other sites

Thanks Scott for the information and the explanations. I have ADE9x installed already, but have yet to use the change elevation tool. I will have a look at that and try to use it in future in preference to JABbgl. Certainly for anything I upload to AVSIM requiring a change in airport elevation, it's quite right that it is a huge advantage not having to have users replace default scenery files.Martin


Martin Stebbing, EGLF (UK)

Share this post


Link to post
Share on other sites

The errors in the log relate to the format of the instrument approach segments being in the incorrect format in the original bgl files.I have found this also while changing the ap file for Geneva to stop AI aircraft going underground on the approach. The offending airport was in France. I have secceeded in solving the AI flight profile and recompiling the bgl.I use a process of splitting the opened file in half and compiling them separately to find which half is faulty. Use the faulty half, then try again and so on.The route segments for fs9 follow the format of actual FMS systems in their definition of the route segments. I found problems with the missed approach segments on the approaches. The definitions are not allowed in the FMS programming.I did download a PDF file a few years ago with all the definitions in. I printed it out so it will take me a while to find it on my back-up disks if anyone is interested.

Share this post


Link to post
Share on other sites

×
×
  • Create New...