Hello there,
As you may know, we're going to expose Jetway's data through SimConnect.
During the last SDK Q&A, we said that we'll expose them through the NavData API but in the end, we're going to separate this feature in another API.
Indeed, NavData are "global" data available everywhere for every airports, waypoints... whereas jetway are linked to SimObject which are spawned next to your current location.
That's why we won't make this Jetway API a part of the NavData API even if both of them are linked.
This is how the Jetway API should be used (keep in mind that every functions name, variables name, tokens, flow... might change):
1. To get data from (a) jetway(s), you will need to use a new SimConnect function:
// C++ SimConnect_RequestJetwayData(HANDLE hSimConnect, const char* szAirportIcao, DWORD dwArrayCount, int* pIndexes) // C# void RequestJetwayData(string szAirportIcao, ICollection<int> pIndexes)
Using this function, you will be able to request one, multiple or all jetway(s) of an airport.
// Request data from a single jetway int index = 123; SimConnect_RequestJetwayData(hSimConnect, "LFPG", 1, &index); // Request data from jetways 123, 456 and 789 int indexes[3] = { 123, 465, 789 }; SimConnect_RequestJetwayData(hSimConnect, "LFPG", 3, indexes); // Request all jetways SimConnect_RequestJetwayData(hSimConnect, "LFPG", 0, nullptr);
2. A jetway is linked to a ParkingSpace, so if you want to request a specific jetway you will have to get the parkingIndex using the NavData API.
// ... SimConnect_AddToFacilityDefinition(hSimConnect, FACILITY_DATA_DEF_AIRPORT, "OPEN JETWAY"); SimConnect_AddToFacilityDefinition(hSimConnect, FACILITY_DATA_DEF_AIRPORT, "PARKING_GATE"); // Might want to filter using this field SimConnect_AddToFacilityDefinition(hSimConnect, FACILITY_DATA_DEF_AIRPORT, "PARKING_SUFFIX"); // Might want to filter using this field SimConnect_AddToFacilityDefinition(hSimConnect, FACILITY_DATA_DEF_AIRPORT, "PARKING_INDEX"); // Index of the Jetway (not the same as PARKING_SPOT) SimConnect_AddToFacilityDefinition(hSimConnect, FACILITY_DATA_DEF_AIRPORT, "CLOSE JETWAY"); // ...
3. This call might send an exception (SIMCONNECT_EXCEPTION_JETWAY_DATA) if the icao is wrong, if one the given indexes is wrong...
Otherwise, this call will send a SIMCONNECT_RECV_JETWAY_DATA message which is an array of SIMCONNECT_JETWAY_DATA
SIMCONNECT_REFSTRUCT SIMCONNECT_RECV_JETWAY_DATA : public SIMCONNECT_RECV_LIST_TEMPLATE { SIMCONNECT_FIXEDTYPE_DATAV(SIMCONNECT_JETWAY_DATA, rgData, dwArraySize, U1 /*member of UnmanagedType enum*/, SIMCONNECT_JETWAY_DATA /*cli type*/); }; SIMCONNECT_REFSTRUCT SIMCONNECT_JETWAY_DATA : public SIMCONNECT_RECV { char AirportIcao[8]; // Icao of the airport (the one you used to request) int ParkingIndex; // Index of the parking space linked to this jetway (the one you used to request) SIMCONNECT_DATA_LATLONALT Lla; // LLA of the jetway int Status; // Enum: Current status of the jetway int Door; // Index of the door attached to the jetway SIMCONNECT_DATA_XYZ ExitDoorRelativePos; // Door position relative to aircraft SIMCONNECT_DATA_XYZ MainHandlePos; // Relative position of IK_MainHandle (world pos, in meters) SIMCONNECT_DATA_XYZ SecondaryHandle; // Relative position of IK_SecondaryHandle (world pos, in meters) SIMCONNECT_DATA_XYZ WheelGroundLock; // Relative position of IK_WheelsGroundLock (world pos, in meters) DWORD JetwayObjectId; // ObjectId of the jetway (used by SimConnect_RequestDataOnSimObject for example) DWORD AttachedObjectId; // ObjectId of the object (aircraft) attached to the jetway (used by SimConnect_RequestDataOnSimObject for example) } enum JetwayStatus { JETWAY_STATUS_REST = 0, JETWAY_STATUS_APPROACH_OUTSIDE, JETWAY_STATUS_APPROACH_DOOR, JETWAY_STATUS_HOOD_CONNECT, JETWAY_STATUS_HOOD_DISCONNECT, JETWAY_STATUS_RETRACT_OUTSIDE, JETWAY_STATUS_RETRACT_HOME, JETWAY_STATUS_FULLY_ATTACHED, };
If you have any feedback (missing data, flow, ideas...), please share it here so we can improve this API and release it in the best state possible.
Best Regards
Maxime / Asobo