1
0
Fork 0

add teleport() function

This commit is contained in:
mfranz 2008-10-03 10:48:39 +00:00
parent fbef57eab3
commit 597a7d2187

View file

@ -890,6 +890,27 @@ var autotrim = {
# teleport
# =============================================================================
# Usage: aircraft.teleport(lat:48.3, lon:32.4, alt:5000);
#
var teleport = func(airport = "", runway = "", lat = -9999, lon = -9999, alt = 0,
speed = 0, distance = 0, azimuth = 0, glideslope = 0, heading = 9999) {
setprop("/sim/presets/airport-id", airport);
setprop("/sim/presets/runway", runway);
setprop("/sim/presets/latitude-deg", lat);
setprop("/sim/presets/longitude-deg", lon);
setprop("/sim/presets/altitude-ft", alt);
setprop("/sim/presets/airspeed-kt", speed);
setprop("/sim/presets/offset-distance-nm", distance);
setprop("/sim/presets/offset-azimuth-nm", azimuth);
setprop("/sim/presets/glideslope-deg", glideslope);
setprop("/sim/presets/heading-deg", heading);
fgcommand("presets-commit");
}
# HUD control class to handle both HUD implementations
# ==============================================================================
#