Nasal library: Difference between revisions

Jump to navigation Jump to search
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 = airport.findBestRunwayForPos(geo.aircraft_position());</code>.
** '''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 = airport.runway("18R");</code>.
** '''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 = airport.helipad("H19");</code>.
** '''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 = airport.getSid("SA1A");</code>.
** '''getSid()''' return SID as ghost, e.g. <code>var sid = airportinfo().getSid("SA1A");</code>.
** '''getStar()''' return STAR as ghost, e.g. <code>var star = airport.getStar("KEILA1");</code>.
** '''getStar()''' return STAR as ghost, e.g. <code>var star = airportinfo().getStar("KEILA1");</code>.
** '''getIAP()''' return IAP as ghost, e.g. <code>var iap = airport.getIAP("ILS02");</code>.
** '''getIAP()''' return IAP as ghost, e.g. <code>var iap = airportinfo().getIAP("ILS02");</code>.
** '''getApproach()''' return approach as ghost, e.g. <code>var approach = airport.getApproach("ILS02");</code>.
** '''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}}.
1,376

edits

Navigation menu