1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AIFPC – AI Flight Plan Compiler/Decompiler for FS9 and FSX RC1

Discussion in 'Tools programming' started by garfield_x, 19/4/07.

  1. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    Introduction

    AIFPC is a program for compiling/decompiling flight plans in the TTools txt format to the native BGL format and vice versa that are used by FS9 or FSX.

    Because there is a different in the format of the FS9 BGL files and the FSX BGL one need to choose the compile target (FS9/FSX) before compiling.

    The main difference between the FS9 and FSX BGL files is the way the times are stored. Although FS9 BGL files work in FSX you cannot use FS9 and FSX BGL files at the same time in FSX. FSX BGL files do not work in FS9
    Another difference between FS9 and FSX is the numbering of the days. In FS9 the week starts on Sunday which has the number 0. In FSX the week starts on Monday with the number 0. So when using FS9 compiled flight plans there is a shift in the days. Flights who would departure on Sunday in FS9 will departure on Monday in FSX.
    For this AIFPC has the possibility to renumber the days when compiling the flight plan.

    To distinguish between the different BGL files AIFPC can automatically add FS9 or FSX to the end of the BGL file name.

    When FS9 or FSX is present on your system (AIFPC looks for the registry key) one can set the output folder to the scenery folder. But also a custom output path can be chosen.

    Another feature is the possibility to batch compile/decompile flight plans. Just select more than one flight plan in the selection window.


    Installation

    AIFPC uses the .NET Framework 2.0 so that must be present on your system.
    Furthermore its only unzipping the contents of the zip file in a folder of your choice an run the program by double clicking


    Bugs and Comments

    This is a first Release Candidate. So there still can be bugs present and maybe one have comments or whishes for the final version.
    When finding a bug in the compilation/decompilation process please provide me with the flight plan or BGL file so I can check/solve it more easily.
    Bugs and comments can be send to aifs@pvdveen.net
    Last edited: 23/4/07
  2. Alex Barrett

    Alex Barrett

    Joined:
    19/4/07
    Messages:
    48
    Country:
    unitedkingdom
    Thank you Peter!

    I'm downloading now. Always appreciate new tools.

    Alex
  3. KaelO

    KaelO

    Joined:
    18/12/06
    Messages:
    66
    Country:
    australia
    Why use FSX style flightplans

    Hey guys,

    Firstly, thanks for the programs your producing, good work.

    My question is though, why bother with the FSX format for flightplans? Aside from the different day/numbering system, I don't see an advantage. From what I understand FSX compiled flightplans won't display if there isn't a parking spot available at either the departure or arrival airport. This is a significant disadvantage in my opinion. At least with the FS9 style .BGL format you can see all the aircraft, worst case scenario the aircraft will disappear after landing.

    Am I missing something or is there another advantage to the FSX style?

    Cheers,
    Kael
  4. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    I think you mean that the TDB compiler would not compile a flightplan if there is not the right parking space present.

    That has nothing to do with compiled BGL files in FSX. So i think you misunderstand it.
  5. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    An other reason not to use FS9 BGL files is that also the boat traffic files do not work when an FS9 BGL is present.

    Using only FSX compiled files these work perfectly.
  6. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,363
    Country:
    ca-britishcolumbia
    Thanks, Peter. Being able to generate FSX flight plans from TTools format files is going to save a lot of people a lot of time. Too bad it wasn't around a month ago when I converted CYYJ to FSX. But, at least, I'll be able to keep the two versions in step now with a single source file.

    Don
  7. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    New version available. Solved a bug due to some regional settings.
    Last edited: 9/5/07
  8. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,247
    Country:
    scotland
    Hi Folks

    Peter -
    Thanks for your excellent utility.

    Could you possibly please add
    a)
    The ability to use single common lists for each of airport & aircraft.
    Rather than specifically requiring the filenames to match the flightplan filename.

    b)
    Error trapping to match, rather than an unhandled exception error.

    Many thanks
    ATB
    Paul
  9. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    What you mean by this?
  10. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,247
    Country:
    scotland
    Hi Folks

    Pater -
    Say I have 3 sets of flightplans -

    flighplans_a.txt
    flighplans_b.txt
    flighplans_c.txt

    Currently,
    your applet requires all the following to be present -

    aircraft_a.txt
    aircraft_b.txt
    aircraft_c.txt

    airports_a.txt
    airports_b.txt
    airports_c.txt

    Can it be modified to work with just -

    aircraft.txt
    airports.txt

    i.e.
    a single list for each, covering all airports, and all aircraft.

    HTH
    ATB
    Paul
  11. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    But the flightplans will be still be flightplans_a.txt, flightplans_b.txt?

    So when u compile the fp's for a you also get in your BGL all airpots and all aircraft, even those who are not used in that flightplan at all.

    Isn't that a strange way of working?

    A program like ACA2005 will find then a lot of errors for aircraft not used in the FP
  12. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,247
    Country:
    scotland
    Hi Folks

    Peter -
    Surely not. :eek:

    The only references that should get compiled,
    are those called by the F/P.

    I'd certainly hope the latter was the case. :)

    ATB
    Paul
    Last edited: 24/4/07
  13. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    I do not know what u used until now, because TTools just add all airports and aircraft that are in those files. It does not looks which airports and aircraft are used and only add those. The same applies to AIFPC.
  14. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,247
    Country:
    scotland
    Hi Folks

    Peter -
    I am very surprised.
    I hadn't been aware that was the case.



    Does that mean
    each f/p will behave entirely independently ?

    e.g.
    If I create 5 sets of F/Ps,
    each containing destination airport AAAA

    Then in each of the 5 airport.txt files
    give different sets of lat/long coords for AAAA

    Will the 5 aircraft go to 5 different AAAA locations ?



    If not
    then what's the point of including redundant data ?

    Or am I missing something ?



    PS
    TTools must check whats used for airport & aircraft,
    as it throws an error for any missing.



    ATB
    Paul
    Last edited: 24/4/07
  15. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    No they will go to the same airport. Because the airport is defined in FS itself too.

    The lat/lon values are used to calculated the route/sector transitions eq. the place where an aircraft is at a certain time. So giving wrong values the aircraft start at a wrong point/place in FS and will not arrive at the right time on the destination and will certainly disappear. (or maybe will never appear, or just popup at the airport)

    Adding allways all the airport to a FP is a giant overhead. There are 24000+ airports. (A small FP which only visits 10 airports will have 24000+ airports in the BGL.)
    FS has to read all tha data and have to process it. So its is certain an performance drop maybe not when flying, but certainly when starting a flight and FS has to load all the FP data.

    TTools and AIFPC only checks if an airport in the FP is present in the airport list, (same for aircraft) otherwise it can not do the sector calculations, whci are needed to be present in the BGL file.
  16. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,363
    Country:
    ca-britishcolumbia
    Peter, your decompiler "saved my bacon" yesterday. After spending the afternoon updating my CYYJ flight plans from mid-2006 vintage to the present, I initiated what I thought would be the final compile (with tTools, since your compiler had a little problem - now fixed). Immediately upon clicking the "Compile" button, my flight plan file disappeared from the screen and, as far as I can tell, completely from my computer. What to do to save the afternoon's work?

    I checked the destination folder and found that the file had successfully compiled. I ran your de-compiler and, voila, I had a new flight plan file.
    Thanks!

    However, from that experience, I would offer one suggestion. The default time format output from AIFPC is HH:MM:SS. Apparently, the times are randomized slightly in the compiled flight plans since only a few came back with departure time on the even minute. So, for clarity, I would suggest the default format be changed to HH:MM - with the time rounded to the nearest minute - or a user option for that format be provided.

    Thanks again,
    Don
  17. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    Strange that the flightplan disappeared. I do nothing mare then reading that file, not copying/moving etc.

    Between compiles/decompiles time can differ a littel bit due to rounding errors. Also the when not using the @ symbol the arrival time is calculated from the departure time and the speed stetting, so that can differ too.

    I will look for the removing of the seconds (always found it curious that seconds were used :) )
  18. gadgets

    gadgets Resource contributor

    Joined:
    8/11/05
    Messages:
    4,363
    Country:
    ca-britishcolumbia
    Peter, I was using TTools at the time, not AIFPC. (I only mentioned that problem to "set the scene" for AIFPC "to the rescue".)

    Sorry for the confusion.

    Don
  19. BASys

    BASys

    Joined:
    25/5/06
    Messages:
    1,247
    Country:
    scotland
    Hi Folks

    Peter -
    Had a couple of issues when compiling with AIFPC.

    1) Failed Compile
    See screenie.
    May I email you a zip of the source files ?

    Compiles ok with TTools.
    Airport count: 543
    Aircraft count: 16
    Flight plans: 23 Legs: 753



    2) File Locks
    Not releasing file-locks for f/p, airport, & aircraft files
    following a failed compile.

    Error example -
    FILE NOT COMPILED: flightplans_odg_ukez_bhl.txt



    3) Window Titles
    Error dialog has the same title as parent window,
    hence unable to capture active window screenie.



    Back to my earlier query.
    TTools does support dissimilar filenames.



    HTH
    ATB
    Paul
    Last edited: 9/8/09
  20. garfield_x

    garfield_x

    Joined:
    30/11/06
    Messages:
    72
    Country:
    netherlands
    Yes please send me the source files so i can have a look of what went wrong.

    My email adress is in the documentation

    I dod not know that TTools uses these files that way. I'll check that.

Share This Page