• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Using Waypoints

Messages
377
Country
unitedstates
Is there a way to make AI aircraft fly to/from specific waypoints?

For example, if I would like my military AI aircraft to use the military routes when flying to/from MOAs, can I do that using AIFP or another tool?
 
The basic rules for waypoints in FS9 are as follows:-

There are two types of waypoint, the first (type 1) is within the current AI area such that the AI aircraft can take off from base and reach the waypoint whilst remaining within the current AI boundary area at all times. The second (type 2) is one which is at such a distance from the take off that it is outside the AI boundary as it exists at take off. The use of mutliple waypoints on a single flight cannot be guaranteed to work as designed and usually causes problems, so is not advised. The use of a single waypoint works as it should given the requirements below.

type 1:

An AI aircraft will take off and head for the waypoint where it can perform a TNG before return to base for a landing. The waypoint should have an afcad which requires only an ICAO code and a runway, which can be very small (10 x 10m for example) and can be invisible. An entry is required in the airports.txt file. The altitude of the waypoint must be no greater than 1700 ft above the ground altitude of the base airport or the aircraft will crash on the return leg. AI will follow a series of waypoints IF they are all within the same AI boundary area, BUT there could be some unusual (unrealistic) activity unless the FS session is started prior to the aircraft taking off from the base airfield. A scenery target for military AI can effectively be placed at the waypoint.

type 2:

An AI aircraft will take off and head for the waypoint and at the edge of the AI boundary it will disappear (see below for following user aircraft). At an appropriate time the AI aircraft will reappear at the boundary incoming to the base for landing. An entry with ICAO code is required in the airports.txt file. Multiple waypoints will usually result in non appearance of the aircraft unless the session is started prior to take off at base, in which event it is likely the aircraft will disappear at the boundary and will not reappear for landing but will probably reappear at the ramp prior to the next take off from base.

If following the AI aircraft in a user aircraft, then effectively the AI aircraft does not leave the AI boundary, in which case see type 1.
 
The waypoint should have an afcad which requires only an ICAO code and a runway, which can be very small (10 x 10m for example) and can be invisible.

So, this is really a work around, right? Basically, where the waypoint actually exists, I'd need to create a "fake airport," create a flight plan to the fake airport then a TNG, and a departure to the next fake airport waypoint.

Interesting.
 
That is correct, Bob, but make careful note of the altitude restriction and reliability is dependant on using only one waypoint per flight, you must use a genuine airport after each waypoint. Going from waypoint to waypoint does not work correctly.
 
Last edited:
Graham, I gather from your response to Bob below that the AI engine doesn't actually recognize these destinations as waypoints but, rather, treats them as any other airport where the runway is too short to land.

If so, most of your observations can be explained in that context. The two that can't are:
  • The 1700' altitude difference. Perhaps this is a result of pattern altitude of two airports in close proximity.
  • The likely no-show at the final destination for routes involving multiple distant airports. This one is rather curious since, if the user aircraft remains at the base airport, the only aspect of the routing relevant to arrival is the final sector entry time - which should be 15 minutes before ETA. Are you sure this is not the "37-minute" problem at play here?
Don
 
The 1700 ft limit is a result of the AI engine not resetting the ground altitude to the destination airfield until the aircraft responds to the destination ATC. The result of that is that if, for example, the waypoint altitude is at 2000 ft then the aircraft will hit the ground at 2000 ft as it reduces altitude to line up for the destination runway. The upper limit is 1700 ft to allow the AI aircraft to reduce altitude below 2000 and have the ground altitude reset before is comes into hard contact with the false ground.

On your second point, I have tested what works and what doesn't. Yes, it could well be the 37 minute problem as leaving base to waypoint 1, to waypoint 2 and return to base will without question take more than 37 minutes.

The AI engine does not recognise waypoints within a traffic file, only airports.
 
The 1700 ft limit is a result of the AI engine not resetting the ground altitude to the destination airfield until the aircraft responds to the destination ATC. The result of that is that if, for example, the waypoint altitude is at 2000 ft then the aircraft will hit the ground at 2000 ft as it reduces altitude to line up for the destination runway. The upper limit is 1700 ft to allow the AI aircraft to reduce altitude below 2000 and have the ground altitude reset before is comes into hard contact with the false ground.
Thanks for the explanation.
On your second point, I have tested what works and what doesn't. Yes, it could well be the 37 minute problem as leaving base to waypoint 1, to waypoint 2 and return to base will without question take more than 37 minutes.
The "37-minute problem" (a moniker perhaps not in general use) is a situation that develops when user-specified arrival times are substantially later (about 37 minutes) than the time calculated as departure time plus distance/cruise speed - a situation likely to occur only with long-haul traffic. (For a fuller explanation, please see Section 4 of the AIFP User Manual.
The AI engine does not recognise waypoints within a traffic file, only airports.
WHEW!!

Don
 
Hehe, well whether 37 minute problem or no, more than one consecutive waypoint, does not work in any reliable fashion.
 
more than one consecutive waypoint, does not work in any reliable fashion.

I've never found this a problem. I created a racetrack pattern as used by refuelling tankers and it worked fine (except that the gear kept going down and up :D )
 
Ultimate Traffic 2

So, I just read about the release of Ultimate Traffic 2 for FSX. One of the features includes realistic AI traffic that flies actual ATC routes, etc. Given the limitations of building AI flight plans, how does UT2 create flight plans that follow actual waypoint routes, etc?

More importantly, how can I create an AI flight plan that does the same using tools like AIFP?
 
So, I just read about the release of Ultimate Traffic 2 for FSX. One of the features includes realistic AI traffic that flies actual ATC routes, etc. Given the limitations of building AI flight plans, how does UT2 create flight plans that follow actual waypoint routes, etc?

More importantly, how can I create an AI flight plan that does the same using tools like AIFP?

Can't. traffic files will run independently from UT2. If you use SDK traffic explorer, you see it provides options to set waypoints, create/remove AI, etc. Seems what UT2 does, is it has its own database of flightplans, based on ATS routes, and injects it into FSX via simconnect at runtime.

scott s.
.
 
Can't. traffic files will run independently from UT2. If you use SDK traffic explorer, you see it provides options to set waypoints, create/remove AI, etc. Seems what UT2 does, is it has its own database of flightplans, based on ATS routes, and injects it into FSX via simconnect at runtime.

scott s.

So, is this something that AIFP could eventually do with further development?
 
So, is this something that AIFP could eventually do with further development?
Bob, AIFP's primary function is to create, edit and otherwise "massage" traffic files. Without knowing anything more about this new capability other than what is in this thread, it appears to be a completely new approach to managing AI traffic, independent of traffic files. Hence, it would be completely new capability (and, I suspect a major development) vis-a-vis AIFP. However, if someone can provide further details of the new feature, perhaps it wouldn't be as big a project as I suspect.

As I think has been mentioned elsewhere in this forum, you can route AI via waypoints with AIFP by creating uniquely-named airports without runways positioned directly over the relevant waypoints. This is most easily accomplished by editing small XML files as opposed to, say, creating new airports with ADE, and setting the arrival/departure times such that the AI engine doesn't actually attempt to land at those airports. It may be that AIFP could easily be extended to facilitate this operation.

Don

Don
 
Don,

Search the SDK .chm for "SimConnect_AICreateParkedATCAircraft" in the SimConnect SDK Reference.

Waypoints can be inclufed in flightplans, eg.

Code:
<?xml version="1.0" encoding="UTF-8"?>

<SimBase.Document Type="AceXML" version="1,0">
    <Descr>AceXML Document</Descr>
    <WorldBase.FlightPlan>
        <Title>KSEA to KSFO</Title>
        <FPType>IFR</FPType>
        <RouteType>HighAlt</RouteType>
        <CruisingAlt>31000</CruisingAlt>
        <DepartureID>KSEA</DepartureID>
        <DepartureLLA>N47 25' 53.27",W122 18' 28.83",+000433.00</DepartureLLA>
        <DestinationID>KSFO</DestinationID>
        <DestinationLLA>N37 36' 26.00",W122 22' 49.59",+000013.00</DestinationLLA>
        <Descr>KSEA, KSFO</Descr>
        <DeparturePosition>34R</DeparturePosition>
        <DepartureName>Seattle-Tacoma Intl</DepartureName>
        <DestinationName>San Francisco Intl</DestinationName>
        <AppVersion>
            <AppVersionMajor>10</AppVersionMajor>
            <AppVersionBuild>60327</AppVersionBuild>
        </AppVersion>


        <ATCWaypoint id="KSEA">
            <ATCWaypointType>Airport</ATCWaypointType>
            <WorldPosition>N47 25' 53.27",W122 18' 28.83",+000433.00</WorldPosition>
            <ICAO>
                <ICAOIdent>KSEA</ICAOIdent>
            </ICAO>
        </ATCWaypoint>


        <ATCWaypoint id="SEA">
            <ATCWaypointType>VOR</ATCWaypointType>
            <WorldPosition>N47 26' 7.36",W122 18' 34.59",+000000.00</WorldPosition>
            <ICAO>
                <ICAORegion>K1</ICAORegion>
                <ICAOIdent>SEA</ICAOIdent>
            </ICAO>
        </ATCWaypoint>


        <ATCWaypoint id="LMT">
            <ATCWaypointType>VOR</ATCWaypointType>
            <WorldPosition>N42 9' 11.34",W121 43' 39.10",+000000.00</WorldPosition>
            <ATCAirway>J65</ATCAirway>
            <ICAO>
                <ICAORegion>K1</ICAORegion>
                <ICAOIdent>LMT</ICAOIdent>
            </ICAO>
        </ATCWaypoint>


        <ATCWaypoint id="RBL">
            <ATCWaypointType>VOR</ATCWaypointType>
            <WorldPosition>N40 5' 56.07",W122 14' 10.88",+000000.00</WorldPosition>
            <ATCAirway>J65</ATCAirway>
            <ICAO>
                <ICAORegion>K2</ICAORegion>
                <ICAOIdent>RBL</ICAOIdent>
            </ICAO>
        </ATCWaypoint>


        <ATCWaypoint id="OAK">
            <ATCWaypointType>VOR</ATCWaypointType>
            <WorldPosition>N37 43' 33.30",W122 13' 24.92",+000000.00</WorldPosition>
            <ATCAirway>J3</ATCAirway>
            <ICAO>
                <ICAORegion>K2</ICAORegion>
                <ICAOIdent>OAK</ICAOIdent>
            </ICAO>
        </ATCWaypoint>


        <ATCWaypoint id="KSFO">
            <ATCWaypointType>Airport</ATCWaypointType>
            <WorldPosition>N37 36' 26.00",W122 22' 49.59",+000013.00</WorldPosition>
            <ICAO>
                <ICAOIdent>KSFO</ICAOIdent>
            </ICAO>
        </ATCWaypoint>


    </WorldBase.FlightPlan>
</SimBase.Document>
 
Thanks, George.

I'm rather busy at the moment but will take a look ASAP.

Don
 
Thanks again for the tip, George.

I've briefly reviewed the SimConnect SDK. While it would not be a difficult job to adapt AIFP to create the XML flight plans for SimConnect-initiated AI, it would appear that a complete SimConnect-based user interface (missions or manual)is necessary to make use of such flight plans. Based on my reading of the SDK, once such AI/flight plans are initiated, they are "managed" in the normal way by the AI engine. So, this seems like a lot of effort - both in design and for users - just to route aircraft via waypoints.

Earlier in this thread, GrahamS put forward a scheme (albeit somewhat limited, to allow use of waypoints in a normal traffic file. I'm wondering if we couldn't build on that positions and, with AIFP doing most of the "grunt-work", accomplish much the same thing without the involvement of SimConnect.

I envisage the implementation as AIFP:
  • determining the position of user-designated waypoints (don't know how I'd do that yet),
  • automatically creating a corresponding set of airport records to be saved and used with the traffic file - each airport representing a waypoint, designated by the last three characters of the waypoint designator and preceded by a special character that is invalid for ICAO codes or one of a set of such special characters to allow multiple regions to be addressed, and
  • referring to these pseudo airports in a "normal" AI flight plan.

Comments anyone?

Don
 
Don,

Could the user provide the waypoint coords in a standard coord format and AIFP take them to create "fake airports"?

Example:

If I go to fltplan.com and file a flight plan from KCMH to KLAS, I get the following flight plan:

DQN VHP J80 MCI J24 SLN J18 FTI J8 GUP J72 PGS.TYSSN2

Fltplan.com also provides the coords for the waypoints:
KCMH COLUMBUS N3959.9W08253.5
DQN 114.5 DAYTON N4001.0W08423.8
VHP 116.3 BRICKYARD N3948.9W08622.0
SPI 112.7 SPINNER N3950.4W08940.7
MCI 113.25KANSAS CITY N3917.1W09444.2
SLN 117.1 SALINA N3855.5W09737.3
GCK 113.3 GARDEN CITY N3755.1W10043.5
FTI 117.3 FORT UNION N3539.5W10508.1
BUKKO 117.3/255/140 N3531.7W10759.8
GUP 115.1 GALLUP N3528.6W10852.4
PGS 112.0 PEACH SPRING N3537.5W11332.7
CEJAY 112.0/265/19 N3540.7W11355.6
KADDY N3544.5W11423.0
TYSSN N3551.3W11426.2
SUZSI N3602.2W11431.3
PRINO N3604.4W11443.6
KLAS 116.9 LAS VEGAS N3604.8W11509.1

Could AIFP take these coords and automatically create the necessary airports to build the flight plan?
 
Thanks for the pointer to Fltplan.com, Bob. AIFP will need a position reference of some sort. However, using an external (to FS) source may not work because the waypoints in FS may not be co-located. I have no idea what sort of difficulty, if any, that might cause.

In any case, that's a minor concern at the moment since waypoint positions are also stored internally in FS. What's troubling me is the caution given by Graham that you can have only one waypoint between airports (contradicted by George) and by George's note that the wheels go down and up at each waypoint.

I would like find some way to trick FS into simply routing via waypoints and not trying to land there. Apparently, this is possible, since that seems to be what is happening in the SimConnect mode. I need to understand how the AI engine can be made to do that - and it will likely mean some experimentation.

Hopefully, someone who has already done some of the "legwork" will jump in and point me in the right direction.

Don
 
I have little time at present but can confirm that AI aircraft will and must attempt to land at waypoints included in the traffic file. There is no way the AI engine can operate in any other way. You cannot say that just because SimConnect can do something that the AI engine can also do the same thing.

Many, many hours have been spent trying to fool AI into passing a waypoint included in the traffic file without attempting to land. The point about using SimConnect is it does not rely on the traffic file.

Using waypoint data and including it in the traffic file will enable AI traffic to use the waypoint, but it will make an attempted landing at each, and that automatically means the lowering of undercarriage and flaps. Using that waypoint data in the traffic file will also require an altitude to be registered for that waypoint, be aware of the altitude restriction for waypoints if a landing is to be made at a following destination airport.
 
Back
Top