1,376
edits
| Line 929: | Line 929: | ||
|text = Function for retrieval of airport, heliport, or seaplane base information. It returns a Nasal ghost; however, its structure is like that of a Nasal hash. The following information is returned: | |text = Function for retrieval of airport, heliport, or seaplane base information. It returns a Nasal ghost; however, its structure is like that of a Nasal hash. The following information is returned: | ||
* '''parents''': A vector containing a hash of various functions to access information about the runway. These functions are: | * '''parents''': A vector containing a hash of various functions to access information about the runway. These functions are: | ||
** '''findBestRunwayForPos()''' return runway as ghost by given geo position, e.g. <code>var rwy = | ** '''findBestRunwayForPos()''' return runway as ghost by given geo position, e.g. <code>var rwy = airportinfo().findBestRunwayForPos(geo.aircraft_position());</code>. | ||
** '''runway()''' return runway as ghost by runway ID, e.g. <code>var rwy = | ** '''runway()''' return runway as ghost by runway ID, e.g. <code>var rwy = airportinfo().runway("18R");</code>. | ||
** '''runwaysWithoutReciprocals()''' return vector of runways as ghost. | ** '''runwaysWithoutReciprocals()''' return vector of runways as ghost. | ||
** '''helipad()''' return helipad as ghost by helipad ID, e.g. <code>var heli = | ** '''helipad()''' return helipad as ghost by helipad ID, e.g. <code>var heli = airportinfo().helipad("H19");</code>. | ||
** '''tower()''' return hash with <code>lat</code>, <code>lon</code>, <code>elevation</code> fields. | ** '''tower()''' return hash with <code>lat</code>, <code>lon</code>, <code>elevation</code> fields. | ||
** '''comms()''' return vector of hashes, each hash with <code>frequency</code> and <code>ident</code> fields. | ** '''comms()''' return vector of hashes, each hash with <code>frequency</code> and <code>ident</code> fields. | ||
| Line 939: | Line 939: | ||
** '''getApproachList()''' return vector of string with approaches. | ** '''getApproachList()''' return vector of string with approaches. | ||
** '''parking()''' return vector of hashes, each hash with <code>lat</code>, <code>lon</code>, <code>elevation</code>, <code>name</code> fields. | ** '''parking()''' return vector of hashes, each hash with <code>lat</code>, <code>lon</code>, <code>elevation</code>, <code>name</code> fields. | ||
** '''getSid()''' return SID as ghost, e.g. <code>var sid = | ** '''getSid()''' return SID as ghost, e.g. <code>var sid = airportinfo().getSid("SA1A");</code>. | ||
** '''getStar()''' return STAR as ghost, e.g. <code>var star = | ** '''getStar()''' return STAR as ghost, e.g. <code>var star = airportinfo().getStar("KEILA1");</code>. | ||
** '''getIAP()''' return IAP as ghost, e.g. <code>var iap = | ** '''getIAP()''' return IAP as ghost, e.g. <code>var iap = airportinfo().getIAP("ILS02");</code>. | ||
** '''getApproach()''' return approach as ghost, e.g. <code>var approach = | ** '''getApproach()''' return approach as ghost, e.g. <code>var approach = airportinfo().getApproach("ILS02");</code>. | ||
** '''tostring()''' just return string "an airport ICAO". | ** '''tostring()''' just return string "an airport ICAO". | ||
** See also {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1902}}. | ** See also {{flightgear file|src/Scripting/NasalPositioned.cxx|l=1902}}. | ||
edits