Author Topic: Understanding and Modifying World of AI Flight Plans  (Read 3524 times)

April 29, 2017, 10:52:32 PM

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Understanding and Modifying World of AI Flight Plans
« on: April 29, 2017, 10:52:32 PM »
Hello, I have been looking for a while now but can't seem to find an answer to my question so I thought I would ask you guys.

Basically, I use World of AI in P3D v3 and absolutely love it, the model accuracy and the simplicity just makes it so much better than anything else out there.  However, my problem is that the packages that I like or want are now becoming very outdated (a lot of them coming up to one decade old) so I would like to contribute to getting them updated (at least for myself to start with).  I have many years of programming experience and can get access to the latest flight plans and schedules for airlines.

My problem currently is:
1. I want to find new aircraft model types (e.g. Qatar Airways now have an A380 and 787), could I download any A380 and 787 from Avsim and link it to WoAI? Is this possible to do and does anyone have any past experience doing this?
2. I have no idea how the decompiled BGL files are formatted (i.e. what is what variable), I was just looking at Qatar airways and I can't really figure it out properly.  Does anyone have a link to how the BGL files are formatted.  For example, here is one line from the Qatar Airways package:
AC#1012,A7-AGD,52%,WEEK,IFR,1/10:14:53,@1/19:58:08,340,F,0817,OTBD,2/09:45:00,@2/17:26:26,380,F,0001,EGLL,2/20:29:46,@3/03:05:59,350,F,0002,OTBD,3/09:44:39,@3/17:29:46,340,F,0001,EGLL,3/20:29:25,@4/03:09:19,370,F,0002,OTBD,4/08:34:10,@4/23:36:06,380,F,0051,KIAD,5/04:08:02,@5/15:56:47,370,F,0052,OTBD,6/08:32:14,@6/23:39:05,360,F,0051,KIAD,0/04:06:06,@0/15:59:46,330,F,0052,OTBD,0/22:49:31,@1/06:13:43,350,F,0816,VHHH

I can understand basic things such as the aircraft registration and reference to AC#1012 in other files, but I get confused when I see other variables like @3 or 52% which I can't really figure out how they work.  I would really appreciate if someone can point me to the right documentation or explain this to me, as soon as I can figure this out I can start moving real world up to date data into WoAI packages, the only challenge will be getting a hold of new aircraft.

May 12, 2017, 08:38:23 PMReply #1

Offline f14driver

  • Administrator
  • Newbie
  • *****
  • Posts: 105
    • View Profile
    • http://www.world-of-ai.com
Re: Understanding and Modifying World of AI Flight Plans
« Reply #1 on: May 12, 2017, 08:38:23 PM »
ok here we go with some basics:

If you want to modify you will need an AI aircraft.
If you are going to use a flyable aircraft ( AI are not flyable by the user) it will hurt your framerate big time.

Then the BGL files:
you will have 3 files when you decompile the bgl file
Aircraft.txt ( here are the aircraft numbers and exact titles listed)
Airports.txt (here are the airports used in the flightplan and thier coordinates listed)
Flightplan.txt. (here are teh flightplan legs listed.

Then the line in the flightplan itself
From your example line :
AC#1012,A7-AGD,52%,WEEK,IFR,1/10:14:53,@1/19:58:08,340,F,0817,OTBD,2/09:45:00,@2/17:26:26,380,F,0001,EGLL,2/20:29:46,@3/03:05:59,350,F,0002,OTBD

AC#1012  -     The number of the aircraft in the aircraft.txt file
A7-AGD -         The aircraft registration that will be visible in FS
52% -             Minimum percentage level of AI traffic in the settings 
WEEK -           This flightplan uses a weekly schedule ( other varible could be 24hr or 12hr or even 1 hr) minimum turnaround time between flights is 45 minutes in FS
IFR -               The aircraft will follow IFR procedures ( other variable could be VFR, visual flying rules, when the weather is bad the VFR flight will not recieve clearance)
1/10:14:53 -   Depature time of the aircraft (timezone is always UTC) on day 1
                       All AI times are UTC. You have to do the conversion to local time. When spotting for a particular flight, I always use the UTC time setting in FS, not the local time.
                       FS2004 days are Sunday = 0, Monday = 1, etc.
                       FSX days are Monday = 0, Tuesday = 1, etc.
@1/19:58:08- Fixed arrival time on the destination airport (@ sign fixes the arrival time. When not used FS will calculate the arrival time when compiling)
340 -              Flightlevel used for the flight while enroute
F -                  Flightnumber will be used in communication with ATC ( other variable is R ( registration, usally used for GA)
0817 -            Flightnumber of this specific leg in the week flightplan
OTDB -           Destination airport ( listed in the airports.txt)

Then on day 2 it will depart from OTDB towards EGLL (London Heathrow) at 09:45 UTC, arriving at a fixed arrival time of 17:26:26 (hh:mm:ss) enroute at flightlevel 380 using the callsign and flightnumber 0001,and wil depart again towards OTDB at 20:29:46 on day 2

I hope this explains the different items in a flightplan.txt file and the BGL in general  ;)




Kind regards,

Tom vd Horst
World of AI

May 29, 2017, 01:50:14 PMReply #2

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #2 on: May 29, 2017, 01:50:14 PM »
Amazing, thank you so much! I almost forgot about this :).

So in the first bit you explain, I see that it has a destination airport of OTBD on day 1 but then what is the departure airport?

Also normally Qatar will have say for example one flight number (e.g. QR10) and it will operate it every day 7 days a week.  However, the aircraft may change on each day (not just the registration but also the type).  If they have a daily schedule like this should I use the WEEK variable or not? Do you have any examples with the 24h variable etc as I'm not sure I fully understand it.

May 30, 2017, 12:17:43 PMReply #3

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #3 on: May 30, 2017, 12:17:43 PM »
Just to update you, I have now started the process to collect data for this.  You have a very good point on framerate impact if I were to use flyable aircrafts for traffic so I think that will be my next big problem, finding the correct AI model with the correct livery (e.g. Qatar's new A359).   But I guess I'll deal with that as I get closer to finishing.

For now I have some more questions, can you please confirm what the other two files also mean, i.e. Airports.txt:
HELX,N25* 40.23',E32* 42.37',292
HKJK,S1* 19.10',E36* 55.54',5325
HLLT,N32* 40.15',E13* 9.39',262
HSSS,N15* 35.07',E32* 33.40',1260
HTDA,S6* 52.67',E39* 12.14',180

... and also Aircraft.txt:
AC#1009,200,"WoA_TFS_A330-300_GE_QTR-Qatar Airways"
AC#1010,200,"WoA_TFS_A330-300_GE_QTR-Qatar Airways Orange"
AC#1011,200,"WoA_TFS_A330-300_GE_QTR-Qatar Airways Red"
AC#1012,200,"WoA_TFS_A340-600_QTR-Qatar Airways"

I know most of it is self-explanatory but there are a couple variables in there that I'm not 100% on so would appreciate your input.

EDIT:
Another question, can the flight number have letters in it like a callsign, e.g. flight number QR10 could have a callsign as QTR8Z6 - should I just use flight number 10 in this case or can I put in the proper alphanumeric callsign number?
« Last Edit: May 30, 2017, 01:20:06 PM by 777GE90 »

June 01, 2017, 06:01:32 PMReply #4

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #4 on: June 01, 2017, 06:01:32 PM »
I know it's going to be a while before you guys check this thread again, so thought I would update you.  I've managed to create some sample data, see here:
AC#1001,A7-CJA,93%,WEEK,IFR,3/15:25:00,@3/20:35:00,360,F,0679,OTHH,2/23:40:00,@3/04:50:00,360,F,0678,FSIA,2/15:25:00,@2/20:35:00,360,F,0679,OTHH,1/23:40:00,@2/04:50:00,360,F,0678,FSIA,1/15:25:00,@1/20:35:00,360,F,0679,OTHH,0/23:40:00,@1/04:50:00,360,F,0678,FSIA,0/15:25:00,@0/20:35:00,360,F,0679,OTHH,6/23:40:00,@0/04:50:00,360,F,0678,FSIA,6/15:25:00,@6/20:35:00,360,F,0679,OTHH,5/23:40:00,@6/04:50:00,360,F,0678,FSIA,5/15:25:00,@5/20:35:00,360,F,0679,OTHH,4/23:40:00,@5/04:50:00,360,F,0678,FSIA,4/15:25:00,@4/20:35:00,360,F,0679,OTHH,3/23:40:00,@4/04:50:00,360,F,0678,FSIA,3/19:40:00,@3/20:55:00,360,F,1121,OTHH,3/17:25:00,@3/18:40:00,360,F,1120,OMRK

What do you think? Does it look valid? This is data from the past week for that specific aircraft.  Note, some of the variables are currently random or fixed, for example the % is random and the flight level is fixed to 360. I will soon get some real data for flight level too, but I think the % will have to remain random as I have no idea how to determine that value in a better way.

The key thing I was not sure about is the days do not necessarily start at day 0, for example this one starts at day 3 and goes up to day 6 before resetting back to day 0 and then going up to 6 again.  Is this ok or MUST the data be ordered from day 0 to 6?

Looking forward to hearing from you, hopefully soon I can get a scaleable solution and generate real time schedules for the past week on over 900 airlines.

June 03, 2017, 01:48:17 AMReply #5

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #5 on: June 03, 2017, 01:48:17 AM »
Just to update all, I have had major success in that I have managed to successfully compile a flight plan.  It turned out to be a little more work than I expected since I ran into a couple of problems:
1. Some of the airports that the real world aircraft fly to simply do not exist in FSX (as they were built after FSX was released), in the case of Qatar Airways I believe I found some 10+ examples.  So I had to reroute all of that traffic to temporary airports.
2. As mentioned before, I don't have access to newer models like the B788, A359, A388, etc so all the routes for these aircraft will either have to be deleted or assigned to another aircraft.  I reassigned all of these aircraft to the A330. If any aircraft model creator / painter wants to team up with me then that would be awesome, I can bring real world aircraft data very quickly (I think within a days work for any airline) and they can make sure we have all aircraft covered.
3. I am now also testing on P3D v4 and realised all aircraft appear as black, my understanding is because P3D v4 has dropped support for FS9 flight formats, so my flight plans work fine in P3D v3 but how do I convert them to make them compatible with P3D v4?
4. Some aircraft are under maintenance at the time the data is collected, this means they are not included in the schedule.  In this particular example I found about 7 aircraft in the Qatar fleet was under maintenance and not included in the schedule.  I guess this is something we will just have to live with.

Just to demonstrate my success, I went from having maybe 3 planes max at OTHH airport (practically empty) to now having almost every gate filled, I have literally bought the airport to life with real world data (that brings the schedule a whole decade up to date) within a weeks work, check out a couple of quick screenshots on what it looks like now:


June 06, 2017, 12:44:00 PMReply #6

Offline f14driver

  • Administrator
  • Newbie
  • *****
  • Posts: 105
    • View Profile
    • http://www.world-of-ai.com
Re: Understanding and Modifying World of AI Flight Plans
« Reply #6 on: June 06, 2017, 12:44:00 PM »
Nice work.

If you need more explaing then let me know.

In regard to your first question the originating airport will be the departure airport on the last leg of your flightplan.
I would use the WEEK option instead of the 24h option  ;)

Aplha numeric callsigns don't work in FS, you will have to stick to numeric callsigns.

Airports.txt :
HELX,N25* 40.23',E32* 42.37',292
HELX - Airport ICAO code
N25*40.23' - Airport longtitude in degrees, minutes and seconds
E32* 32.37' - Airport latitude in degrees, minutes and seconds
292 - Airport Elevation above MSL ( center of the airport)

Aircraft.txt :
AC#1009,200,"WoA_TFS_A330-300_GE_QTR-Qatar Airways"

AC#1009, - Aircraft number in flightplan
200 -  Aircraft speed
WoA_TFS_A330-300_GE-QTR-Qatar Airways - Title of the aircraft in the aircraft.txt file in the Aircraft directory. If the title doesn't match the title in the aircraft.txt file then the aircraft won't show up in FS.

« Last Edit: June 06, 2017, 12:47:33 PM by f14driver »
Kind regards,

Tom vd Horst
World of AI

June 15, 2017, 12:48:25 PMReply #7

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #7 on: June 15, 2017, 12:48:25 PM »
Nice work.

If you need more explaing then let me know.

In regard to your first question the originating airport will be the departure airport on the last leg of your flightplan.
I would use the WEEK option instead of the 24h option  ;)

Aplha numeric callsigns don't work in FS, you will have to stick to numeric callsigns.

Airports.txt :
HELX,N25* 40.23',E32* 42.37',292
HELX - Airport ICAO code
N25*40.23' - Airport longtitude in degrees, minutes and seconds
E32* 32.37' - Airport latitude in degrees, minutes and seconds
292 - Airport Elevation above MSL ( center of the airport)

Aircraft.txt :
AC#1009,200,"WoA_TFS_A330-300_GE_QTR-Qatar Airways"

AC#1009, - Aircraft number in flightplan
200 -  Aircraft speed
WoA_TFS_A330-300_GE-QTR-Qatar Airways - Title of the aircraft in the aircraft.txt file in the Aircraft directory. If the title doesn't match the title in the aircraft.txt file then the aircraft won't show up in FS.

Ah thank you, that clears up so much! Sorry for my late response, I've been very busy with work so haven't had much more time with this project, however I do have amazing progress once again.

I've actually successfully managed to compile the entire Qatar Airways flight plan for late May 2017 now.  This includes all AI aircraft and thanks to the amazing AI community, I've found models for the missing aircraft such as QR A380, QR 787, QR A350 as well as TFS repaints for the 77W, 77L, etc. So I now have a fully functioning flight plan with real world data, I just need to test it a bit now to see how accurate it is :).  It's amazing seeing OTHH airport packed full of QR planes in all sorts of shapes.

I want to give you guys a copy but not sure if I am allowed to with the third-party AI models, as I'm just sharing my package (and not releasing) I guess I can post it here?

My main question right now is, how do I get the package to work with P3D v4? I noticed if I put the package in V4 the aircraft show up and appear to be working as normal, however they are all invisible or blacked out (probably outdated textures).  The only aircraft that shows up properly is the QR 787 that was developed by UTT, all the others don't.  Any ideas how to fix this? Is there something I need to change in my flight plan code?

Edit: Also, my other question is how do I package this up so that the WoAI installer could install it for me? What files are required? Do I just ZIP up the folder structure? How does the installer add in the [fltsim] entries in the aircraft.cfg file?
« Last Edit: June 15, 2017, 12:50:18 PM by 777GE90 »

June 15, 2017, 06:12:43 PMReply #8

Offline f14driver

  • Administrator
  • Newbie
  • *****
  • Posts: 105
    • View Profile
    • http://www.world-of-ai.com
Re: Understanding and Modifying World of AI Flight Plans
« Reply #8 on: June 15, 2017, 06:12:43 PM »
You can't get the package into the woa installer format since you will need the compling software.

Only a few people have the compiler software.

You could upload the flightplan to avsim and then refer to the needed models and repaints in an addtional readme.

You can also post the flightplan here for others to use it.

As far as P3D v4 goes, I can't help you with that since I don't own the P3D software. Still FS9 and FSX here  :) :D ;)
Kind regards,

Tom vd Horst
World of AI

June 16, 2017, 04:15:29 PMReply #9

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #9 on: June 16, 2017, 04:15:29 PM »
You can't get the package into the woa installer format since you will need the compling software.

Only a few people have the compiler software.

You could upload the flightplan to avsim and then refer to the needed models and repaints in an addtional readme.

You can also post the flightplan here for others to use it.

As far as P3D v4 goes, I can't help you with that since I don't own the P3D software. Still FS9 and FSX here  :) :D ;)

Oh alright :), you must upgrade someday, trust me it's worth it!

The packaging up is going to cause me a bit of hassle.  I want to develop these updated packages, I can produce the flight schedule data but I can't make the A/C models or repaints (not in any reasonable time anyway).  I'm doing this work for free as I want to repackage the awesome free stuff already out there and bring it up to date.  The problem is, it's going to be impossible for me to contact the model makers, paint makers, etc as usually these aircraft's don't come with contact details, just names.  I would love to get in touch with people such as The Fruit Stand to get their permission to include their aircraft but I guess they don't even exist anymore in some cases.

What I am thinking of doing is creating like a folder structure with all the aircraft, flight plans, textures, etc and then developing a desktop application tool (in C#) that essentially extracts all of it to the relevant places (e.g. SimObjctives folder, sorts out the fltplan entries for you, etc).  This would be awesome as I could then have easy to install, reworked packages that I can manage.  I was thinking of doing this by adding a readme file that credits all the authors and indicates that it is free of charge.  What do you think? Is this allowed?

If not the other alternative is to still have the same solution but to automatically download the required packages from third-party sites like Avsim using the C# tool I develop, I guess this can work too but then it is dependent on third-party download links which can expire or become unavailable if the servers went down for example, which I want to avoid.

Edit: Also I will definitely share the BGL files with you guys, I am just not ready to do so yet :).  My OCD means I have to test, test, test and see if I can find any issues with it first before I give it to others.  In addition to this, it would be great if I can send out more than just BGL files (such as the packaged solution I mentioned above) if I can get away with crediting authors in the packages.
« Last Edit: June 16, 2017, 04:18:39 PM by 777GE90 »

June 28, 2017, 04:55:41 PMReply #10

Offline 777GE90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #10 on: June 28, 2017, 04:55:41 PM »
I've been testing and have run into some hurdles that I am struggling with, it seems almost as if the flight plans are not really designed to be used with real world data as I think it makes some incorrect assumptions.  I'll give you an example, flight A7-CJA for the last week between 28 June to 21 June has the following schedule:

Using FSX day scale:
Mon = 0
Tues = 1
Wed = 2
Thur = 3
Fri = 4
Sat = 5
Sun = 6

------------------------------------
QR919
DEP [WED (2) 28-JUN-17 @ 02:05] VYYY
ARR [WED (2) 28-JUN-17 @ 08:30] OTHH
------------------------------------

------------------------------------
QR918
DEP [TUES (1) 27-JUN-17 @ 17:00] OTHH
ARR [TUES (1) 27-JUN-17 @ 23:30] VYYY
------------------------------------

------------------------------------
QR220
DEP [MON (0) 26-JUN-17 @ 21:45] LROP
ARR [TUES (1) 27-JUN-17 @ 02:20] OTHH
------------------------------------

------------------------------------
QR219
DEP [MON (0) 26-JUN-17 @ 12:00] OTHH
ARR [MON (0) 26-JUN-17 @ 16:55] LROP
------------------------------------

------------------------------------
QR919
DEP [MON (0) 26-JUN-17 @ 02:05] VYYY
ARR [MON (0) 26-JUN-17 @ 08:30] OTHH
------------------------------------

------------------------------------
QR918
DEP [SUN (6) 25-JUN-17 @ 17:00] OTHH
ARR [SUN (6) 25-JUN-17 @ 23:30] VYYY
------------------------------------

------------------------------------
QR220
DEP [THUR (3) 22-JUN-17 @ 21:45] LROP
ARR [FRI (4) 23-JUN-17 @ 02:20] OTHH
------------------------------------

------------------------------------
QR219
DEP [THUR (3) 22-JUN-17 @ 12:00] OTHH
ARR [THUR (3) 22-JUN-17 @ 16:55] LROP
------------------------------------

------------------------------------
QR679
DEP [WED (2) 21-JUN-17 @ 14:25] FSIA
ARR [WED (2) 21-JUN-17 @ 20:35] OTHH
------------------------------------

Now my script converts this to the below:
AC#1001,A7-CJA,39%,WEEK,IFR,
2/02:05:00,@2/08:30:00,360,F,0919,OTHH,
1/17:00:00,@1/23:30:00,370,F,0918,VYYY,
0/21:45:00,@1/02:20:00,370,F,0220,OTHH,
0/12:00:00,@0/16:55:00,360,F,0219,LROP,
0/02:05:00,@0/08:30:00,380,F,0919,OTHH,
6/17:00:00,@6/23:30:00,370,F,0918,VYYY,
3/21:45:00,@4/02:20:00,370,F,0220,OTHH,
3/12:00:00,@3/16:55:00,340,F,0219,LROP,
2/14:25:00,@2/20:35:00,400,F,0679,OTHH

What are the issues here? How can I convert this better, what should it look like? I know it's a tough question but I'm pretty sure the generated flight plan will have planes flying the wrong times / wrong flight numbers because of the data structure.

July 01, 2017, 09:34:52 AMReply #11

Offline f14driver

  • Administrator
  • Newbie
  • *****
  • Posts: 105
    • View Profile
    • http://www.world-of-ai.com
Re: Understanding and Modifying World of AI Flight Plans
« Reply #11 on: July 01, 2017, 09:34:52 AM »
This is how is shoud look like  ;)

AC#1001,A7-CJA,39%,WEEK,IFR,0/02:05:00,@0/08:30:00,380,F,0919,OTHH,0/12:00:00,@0/16:55:00,360,F,0219,LROP,0/21:45:00,@1/02:20:00,370,F,0220,OTHH,1/17:00:00,@1/23:30:00,370,F,0918,VYYY,2/02:05:00,@2/08:30:00,360,F,0919,OTHH,2/14:25:00,@2/20:35:00,400,F,0679,OTHH,3/12:00:00,@3/16:55:00,340,F,0219,LROP,6/17:00:00,@6/23:30:00,370,F,0918,VYYY








Kind regards,

Tom vd Horst
World of AI

August 06, 2018, 02:27:41 PMReply #12

Offline ZS-RES

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #12 on: August 06, 2018, 02:27:41 PM »
Good Afternoon

If I would like to create an AI-flight plan from A - B at 06h00 and then from B - A at 12h00 and from A - B at 18h00, do you use the weekly, or 24h etc.

Actually what is the diff between weekly, 24h, 12h or 1h? Especially where Ai-planning is involved?

Regards and have a nice day!

Richard E
ZS-RES 

August 06, 2018, 03:27:46 PMReply #13

Offline IflyToIAD

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Understanding and Modifying World of AI Flight Plans
« Reply #13 on: August 06, 2018, 03:27:46 PM »
AC#1001,A7-CJA,39%,WEEK,

I believe my issue stems from the percentage I have put in my Flightplans.  I saw a YouTube video that recommended I put all percentages at 100% and then change my AI settings in FS9 to 100%.  Problem is I can't get a parking spot when I land.  If I set my Flightplan percentage to 10%, should I use "WEEK," or "12Hr", and what should I change my AI settings to in the FS9 Settings page.  If I were to change the percentage to 1% in the Flightplans, again, should I use "WEEK," etc, and what should I have my AI Traffic setting at in the FS9 Setting page.  If i set everything to 1%, and change my AI Traffic density settings to 90-95%, does this mean i will see 90-95% of the AI traffic?  I am trying to get this as realistic as possible while still having functionality for the aircraft I am flying.  For example, I have the entire EK fleet in AI, and when I landed last night at DXB, I saw a very busy airport, but ATC had nowhere for me to park and only gave me the option to "Depart Straight Out," and several other options to take off (to the East, West, South, etc......).  Also, does it make a difference if my AI traffic have atc_heavy=1 in the .cfg file and my flyable aircaft have atc_heavy=0 in their .cfg file?  Thanks.