Jump to content


- - - - -

AI Code


  • Please log in to reply
6 replies to this topic

#1 peter10

peter10

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 707 posts
  • Location:Buffalo NY

Posted 01 December 2006 - 07:49 PM

What's wrong with this AI code ?

AC#1343,CX9981,99%,2Hr,IFR,03:30:00,00:00:00,160,F,9981,MYNN,00:00:00,00:00:00,160,F,9988,KCMC

Peter  :lol:

#2 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 01 December 2006 - 11:42 PM

peter10, on Dec 1 2006, 08:49 PM, said:

What's wrong with this AI code ?

AC#1343,CX9981,99%,2Hr,IFR,03:30:00,00:00:00,160,F,9981,MYNN,00:00:00,00:00:00,160,F,9988,KCMC
First of all, I can't find the ICAO KCMC for any existing airport .... nothing in FS9, nothing in any addon sceneries I've looked for, and nothing coming up on a real-world search of airports.  That alone will cause TTools to balk at compiling the flightplan (you should have gotten a rejection from TTools with the erroneous part of the flightplan highlighted in red).  If this is a brand new airport that you've made and assigned KCMC to, you probably didn't add the airport data into your airports.txt file; that is the part of the traffic BGL (decompiled) that is looked at to verify the airport data for any flightplan you write.

Second of all, you have it scheduled to depart at 03:30 GMT and arrive at it's destination 20.5 hrs later (midnight).  That's a pretty long flight.  Two problems could arise ..... the AI engine can't make the aircraft fly slow enough to go from point A to point B in 20.5 hrs, and you failed to give the day number as part of the departure/arrival times.  For instance, if the aircraft is departing on Monday at 03:30 and arriving at midnight, your departure time would be written as 1/03:30:00 and the arrival time would be 2/00:00:00.

Third, if the aircraft is arriving at midnight, it can't depart at midnight; it won't have even cleared the active runway before it's time to take-off again.  Fourth, you also don't give day number (1/00:00:00 departure, 2/00:00:00 arrival) for the second leg.  Fifth, without the day number specified, the AI engine won't know how to make it arrive at the destination at the same time it departed (both are stated as 00:00:00).

Edited by sarge, 01 December 2006 - 11:44 PM.


#3 TechnicolorYawn

TechnicolorYawn

    Orville Reincarnate

  • Members
  • PipPipPipPipPipPipPip
  • 8,581 posts
  • Location:Manchester, UK(EGCC)

Posted 02 December 2006 - 06:13 AM

Arrival times are calculated by TTools using the distance between the lat and long coordinates given in the 'airports_xxx' file, and the cruising speed for that aircraft given in the 'aircraft_xxx' file. These calculated values replace anything you put in the arrival times part of the code, so it won't be the arrival thats stopping it compiling.

#4 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 02 December 2006 - 08:23 AM

TechnicolorYawn, on Dec 2 2006, 07:13 AM, said:

Arrival times are calculated by TTools using the distance between the lat and long coordinates given in the 'airports_xxx' file, and the cruising speed for that aircraft given in the 'aircraft_xxx' file. These calculated values replace anything you put in the arrival times part of the code, so it won't be the arrival thats stopping it compiling.
Only if he writes the flightplan as:

AC#1343,CX9981,99%,2Hr,IFR,03:30:00,,160,F,9981,MYNN,00:00:00,,160,F,9988,KCMC

Otherwise, it will try to compile the flightplan within the arrival/departure times given.  The double comma tells TTools to calculate the arrival time.

Edited by sarge, 02 December 2006 - 08:24 AM.


#5 peter10

peter10

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 707 posts
  • Location:Buffalo NY

Posted 02 December 2006 - 08:33 AM

Yeah, KCMC is a custom airport  :lol:

Peter  :lol:

#6 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,718 posts
  • Location:Central Florida

Posted 02 December 2006 - 12:26 PM

peter10, on Dec 2 2006, 09:33 AM, said:

Yeah, KCMC is a custom airport  :lol:
Okay, then you have add it into airports.txt as well.  You'll need the ICAO (KCMC), lat/lon from the AFCAD (airport center point, the pink dot) written as N00* 00.00',W00* 00.00', and the airport elevation -- no spaces in the line entry, just commas seperating the different pieces of data.  Then just put your desired departure times for each leg and let TTools calculate the arrival times (don't forget the double comma between the departure time and the flight level).  If the second leg departs on a different day than the first leg departure time, remember to specify the day number as shown above.

Edited by sarge, 02 December 2006 - 12:27 PM.


#7 peter10

peter10

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 707 posts
  • Location:Buffalo NY

Posted 03 December 2006 - 08:44 AM

Yay! It worked  :lol:

Peter  :lol:

Edited by peter10, 03 December 2006 - 08:45 AM.