FSUIPC Client DLL
.NET interface for FSUIPC
FsAirport Class Reference

A class holding all the information about an Airport. More...

Public Member Functions

override string ToString ()
 Gets a string showing the ICAO code and name of the airport.
 
void CalculateTaxiwayIntersections ()
 Populates the taxiway intersection data for this Airport. Only works if you have set the AiportsDatabase.LoadTaxiways property to true.
 
void LoadComponents (AirportComponents Components)
 Loads the specified component data for this airport. (e.g. Runways, Taxiways etc).
 
void LoadComponents (byte ClassInstance, AirportComponents Components)
 Loads the specified component data for this airport. (e.g. Runways, Taxiways etc).
 
void RemoveComponents (AirportComponents Components)
 Removes the specified component data for this airport. (e.g. Runways, Taxiways etc).
 
void SetReferenceLocation (AirportComponents Components)
 Sets the reference location (from where distance and bearing information is calculated) to the current player position.
 
void SetReferenceLocation (byte ClassInstance, AirportComponents Components)
 Sets the reference location (from where distance and bearing information is calculated) to the current player position.
 
void SetReferenceLocation (FsAirport Airport, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated.
 
void SetReferenceLocation (string ICAO, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated.
 
void SetReferenceLocation (byte ClassInstance, string ICAO, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated.
 
void SetReferenceLocation (FsLatitude NewLatitude, FsLongitude NewLongitude, double MagVar, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated.
 

Properties

string ICAO [get, set]
 The ICAO code of this airport.
 
string Name [get, set]
 The name of this airport.
 
string Country [get, set]
 The country this airport is in.
 
string State [get, set]
 The state of the USA this airport is in. This is blank for airports outside the USA.
 
string City [get, set]
 The name of the city this airports serves.
 
string SceneryFilePath [get, set]
 The path to the scenery (.BGL) file that defines this airport.
 
string SceneryName [get, set]
 The name of the scenery that defines this airport.
 
FsLatLonPoint Location [get, set]
 The Latitude and Longitude of this airport (usually somewhere near the centre).
 
double AltitudeFeet [get, set]
 The altitude of this airport in Feet.
 
double AltitudeMetres [get]
 The altitude of this airport in Metres.
 
double MagVar [get, set]
 The magnetic variation at this airport.
 
double DistanceNauticalMiles [get]
 The distance to this airport in Nautical Miles.
 
double DistanceKilometres [get, set]
 The distance to this airport in Kilometres.
 
double BearingToTrue [get, set]
 The bearing in degrees TRUE to this airport.
 
double BearingToMagnetic [get, set]
 The bearing in degrees MAGNETIC to this airport.
 
bool IsPlayerAtAirport [get, set]
 True if the player's aircraft is currently within the bounds of the airport.
 
AIPlaneInfoCollection AITrafficArrivals = new AIPlaneInfoCollection() [get]
 A list of AIPlaneInfo representing the AI Traffic Planes that are currently assigned to arrive at this airport.
 
AIPlaneInfoCollection AITrafficDepartures = new AIPlaneInfoCollection() [get]
 A list of AIPlaneInfo representing the AI Traffic Planes that are currently assigned to depart from this airport.
 
AIPlaneInfoCollection AITrafficAtThisAirport = new AIPlaneInfoCollection() [get]
 A list of AIPlaneInfo representing the AI Traffic Planes currently on the ground at this airport.
 
FsRunwayCollection Runways = new FsRunwayCollection() [get, set]
 A list of all runways at this airport.
 
FsTaxiwayCollection Taxiways = new FsTaxiwayCollection() [get, set]
 A list of all taxiways at this airport.
 
FsGatesCollection Gates = new FsGatesCollection() [get, set]
 A list of all gates at this airport.
 
FsHelipadsCollection Helipads = new FsHelipadsCollection() [get, set]
 A list of all helipads at this airport.
 
FsAirportComFrequencyCollection COMFrequencies = new FsAirportComFrequencyCollection() [get, set]
 A list of all COM Frequencies used at this airport.
 
FsLatLonQuadrilateral Bounds [get]
 An FsLatLonQuadrilateral representing the estimated boundary of the airport.
 

Detailed Description

A class holding all the information about an Airport.

Member Function Documentation

◆ LoadComponents() [1/2]

void LoadComponents ( AirportComponents Components)
inline

Loads the specified component data for this airport. (e.g. Runways, Taxiways etc).

If a component is already loaded it will not be loaded again

Parameters
ComponentsThe components to load. Combine flags using the bitwise or operator. ( '|' in C#, 'or' in VB.NET )

◆ LoadComponents() [2/2]

void LoadComponents ( byte ClassInstance,
AirportComponents Components )
inline

Loads the specified component data for this airport. (e.g. Runways, Taxiways etc).

If a component is already loaded it will not be loaded again

Parameters
ComponentsThe components to load. Combine flags using the bitwise or operator. ( '|' in C#, 'or' in VB.NET )
ClassInstanceThe class instance of a WideClient.exe to connect to

◆ RemoveComponents()

void RemoveComponents ( AirportComponents Components)
inline

Removes the specified component data for this airport. (e.g. Runways, Taxiways etc).

Parameters
ComponentsThe components to remove. Combine flags using the bitwise or operator. ( '|' in C#, 'or' in VB.NET )

◆ SetReferenceLocation() [1/6]

void SetReferenceLocation ( AirportComponents Components)
inline

Sets the reference location (from where distance and bearing information is calculated) to the current player position.

Requires an open connection to FSUIPC

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [2/6]

void SetReferenceLocation ( byte ClassInstance,
AirportComponents Components )
inline

Sets the reference location (from where distance and bearing information is calculated) to the current player position.

Requires an open connection to FSUIPC

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ClassInstanceThe ID of a specific class instance of WideClient
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [3/6]

void SetReferenceLocation ( byte ClassInstance,
string ICAO,
AirportComponents Components )
inline

Sets the location from where distance and bearing information is calculated.

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ICAOThe ICAO code of the airport to use as the reference location.
ClassInstanceThe class instance of WideClient to connect to.
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [4/6]

void SetReferenceLocation ( FsAirport Airport,
AirportComponents Components )
inline

Sets the location from where distance and bearing information is calculated.

Parameters
AirportThe Airport to use as the reference location.
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [5/6]

void SetReferenceLocation ( FsLatitude NewLatitude,
FsLongitude NewLongitude,
double MagVar,
AirportComponents Components )
inline

Sets the location from where distance and bearing information is calculated.

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
NewLatitudeThe Latitude of the reference location
NewLongitudeThe Longitude of the reference location
MagVarThe Magnetic Variation at the reference location
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [6/6]

void SetReferenceLocation ( string ICAO,
AirportComponents Components )
inline

Sets the location from where distance and bearing information is calculated.

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ICAOThe ICAO code of the airport to use as the reference location.
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ ToString()

override string ToString ( )
inline

Gets a string showing the ICAO code and name of the airport.

Returns

Property Documentation

◆ AITrafficArrivals

AIPlaneInfoCollection AITrafficArrivals = new AIPlaneInfoCollection()
get

A list of AIPlaneInfo representing the AI Traffic Planes that are currently assigned to arrive at this airport.

NOTE: This is only filled in if the AITraffic information has been refreshed.

◆ AITrafficAtThisAirport

AIPlaneInfoCollection AITrafficAtThisAirport = new AIPlaneInfoCollection()
get

A list of AIPlaneInfo representing the AI Traffic Planes currently on the ground at this airport.

NOTE: This is only filled in if the AITraffic information has been refreshed.

◆ AITrafficDepartures

AIPlaneInfoCollection AITrafficDepartures = new AIPlaneInfoCollection()
get

A list of AIPlaneInfo representing the AI Traffic Planes that are currently assigned to depart from this airport.

NOTE: This is only filled in if the AITraffic information has been refreshed.

◆ BearingToMagnetic

double BearingToMagnetic
getset

The bearing in degrees MAGNETIC to this airport.

NOTE: this is only filled in if a reference position has been set

◆ BearingToTrue

double BearingToTrue
getset

The bearing in degrees TRUE to this airport.

NOTE: this is only filled in if a reference position has been set

◆ Bounds

An FsLatLonQuadrilateral representing the estimated boundary of the airport.

This is more accurate if you are loading the taxiways. If not the boundary is estimated using only the runways, gates and helipads.

◆ DistanceKilometres

double DistanceKilometres
getset

The distance to this airport in Kilometres.

NOTE: this is only filled in if a reference position has been set

◆ DistanceNauticalMiles

double DistanceNauticalMiles
get

The distance to this airport in Nautical Miles.

NOTE: this is only filled in if a reference position has been set

◆ IsPlayerAtAirport

bool IsPlayerAtAirport
getset

True if the player's aircraft is currently within the bounds of the airport.

NOTE: this is only filled in if the reference position has been set to the current player position

To test if the player is at the airport without using SetReferenceLocation, use .Bounds.ContainsPoint()