Nasal library/io: Difference between revisions

Jump to navigation Jump to search
→‎Functions: More doc on read_airport_properties()
(→‎Functions: Start read_airport_properties())
(→‎Functions: More doc on read_airport_properties())
Line 191: Line 191:
{{Nasal doc
{{Nasal doc
|syntax = io.read_airport_properties(icao, fname[, target]);
|syntax = io.read_airport_properties(icao, fname[, target]);
|text = Loads an airport-related XML file in FlightGear's [[PropertyList]] format. Paths will be concatenated in the following form: <tt>''[[$FG_SCENERY]]/Airports/'''''i'''''/'''''c'''''/'''''a'''''/'''''icao'''''.'''''fname'''''.xml''</tt>. Returns the data as a <code>props.Node</code> object or <code>'''nil'''</code> on error.
|text = Loads an airport-related XML file. Paths will be concatenated in the following form: <tt>''[[$FG_SCENERY]]/Airports/'''''i'''''/'''''c'''''/'''''a'''''/'''''icao'''''.'''''fname'''''.xml''</tt>. Returns the data as a <code>props.Node</code> object or <code>'''nil'''</code> on error. Note that the file ''must'' be in the [[PropertyList XML files|PropertyList]] format, or else the function will fail.
|param1 = icao
|param1 = icao
|param1text = ICAO code of the airport.
|param1text = ICAO code of the airport.
|param2 = fname
|param2 = fname
|param2text = Filename of the airport data file, e.g., "groundnet"see above for its use in the concatenation of the path.
|param2text = Filename of the airport data file, e.g., "groundnet", "ils", "jetways", "rwyuse", "threshold", or "twr". See above for its use in the concatenation of the path.
|param3 = target
|param3 = target
|param3text =  
|param3text = Optional place to put the results in the [[Property Tree]]. May be either a <code>props.Node</code> object or a property path.
|example1 = var data = io.read_airport_properties("KSFO", "rwyuse");
|example1 =  
}}
}}


Navigation menu