SimConnect_AICreateParkedATCAircraft

The SimConnect_AICreateParkedATCAircraft function is used to create an AI controlled aircraft that is currently parked and does not have a flight plan.

 

Syntax
HRESULT SimConnect_AICreateParkedATCAircraft(
    HANDLE  hSimConnect,
    const char*  szContainerTitle,
    const char*  szTailNumber,
    const char*  szAirportID,
    SIMCONNECT_DATA_REQUEST_ID  RequestID
    );

 

Parameters
Parameter Description Type
hSimConnect Handle to a SimConnect object. Integer
szContainerTitle

Null-terminated string containing the container title. The container title is found in the aircraft.cfg file. Alternatively, the aircraft title can be obtained via the Aircraft Selector (DevMode->Windows->Aircraft selector). Examples of aircraft titles:

title=Boeing 747-8f Asobo

title=DA62 Asobo

title=VL3 Asobo

String
szTailNumber Null-terminated string containing the tail number. This should have a maximum of 12 characters. String
szAirportID Null-terminated string containing the airport ID. This is the ICAO code string, for example, KSEA for SeaTac International. String
RequestID Specifies the client defined request ID. Integer

 

Return Values

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return value Description
S_OK The function succeeded.
E_FAIL The function failed.

 

Remarks

Calling this function is no guarantee that there is sufficient parking space at the specified airport. An error will be returned if there is insufficient parking space, and an aircraft will not be created. The following exceptions can be created by this function (refer to the SIMCONNECT_EXCEPTION enum for more details):

  • SIMCONNECT_EXCEPTION_OBJECT_OUTSIDE_REALITY_BUBBLE
  • SIMCONNECT_EXCEPTION_OBJECT_CONTAINER
  • SIMCONNECT_EXCEPTION_OBJECT_AI
  • SIMCONNECT_EXCEPTION_OBJECT_ATC
  • SIMCONNECT_EXCEPTION_OBJECT_SCHEDULE
  • SIMCONNECT_EXCEPTION_CREATE_OBJECT_FAILED

 

After creating an aircraft with this function, a call to SimConnect_AISetAircraftFlightPlan will set the aircraft in motion.

 

When allocating a parking space to an aircraft, the simulation uses a radius based on half the wingspan defined in the [aircraft_geometry] section of the Aircraft Configuration File. Use the Dump Airport List tool (refer to the Traffic Toolbox documentation) to see what parking spaces are available at any airport.

 

Refer also to the remarks for SimConnect_AICreateEnrouteATCAircraft.

 

See Also