setlistener("/sim/signals/fdm-initialized", func {
# default values
print("Initializing Flight Director");
setprop("/instrumentation/flightdirector/lnav", 0.0);
setprop("/instrumentation/flightdirector/vnav", 0.0);
setprop("/instrumentation/flightdirector/vbar-pitch", 0.0);
setprop("/instrumentation/flightdirector/vbar-roll", 0.0);
setprop("/instrumentation/flightdirector/alt-offset", 0.0);
setprop("/instrumentation/flightdirector/autopilot-on",0.0);
setprop("/instrumentation/flightdirector/fd-on",0.0);
setprop("/instrumentation/flightdirector/at-on",0);
setprop("/instrumentation/flightdirector/alt-alert", alt_alert);
setprop("/instrumentation/flightdirector/course", 0.0);
setprop("/instrumentation/flightdirector/dtk", 0.0);
setprop("/instrumentation/flightdirector/nav-hdg", 0.0);
setprop("/instrumentation/flightdirector/gs-pitch", 0.0);
setprop("/instrumentation/flightdirector/nav-mag-brg", 0.0);
setprop("/instrumentation/flightdirector/course-offset", course_offset);
setprop("/instrumentation/flightdirector/target-inhg", 29.92);
setprop("/instrumentation/flightdirector/to-flag",0);
setprop("/instrumentation/flightdirector/from-flag",0);
setprop("/autopilot/settings/heading-bug-deg",0);
setprop("/autopilot/settings/target-altitude-ft",0);
setprop("autopilot/settings/vertical-speed-fpm",0);
setprop("autopilot/settings/target-speed-kt",250);
setprop("/instrumentation/nav/slaved-to-gps",slaved);
current_alt = getprop("/instrumentation/altimer/indicated-altitude-ft");
alt_select = getprop("/autopilot/settings/target-altitude-ft");
FLAG = getprop("/instrumentation/nav/to-flag");
setprop("/instrumentation/flightdirector/to-flag", FLAG);
#route settings
# setprop("/instrumentation/flightdirector/IAS-kt", 0.0);
# setprop("/instrumentation/flightdirector/TAS-kt", 0.0);
setprop("/instrumentation/flightdirector/ground-speed-kt", 0.0);
setprop("/instrumentation/flightdirector/NextWP_trueCourse-deg", 0.0);
setprop("/instrumentation/flightdirector/currTrack_trueCourse-deg", 0.0);
setprop("/instrumentation/flightdirector/turn-distance-m", 0.0);
setprop("/instrumentation/flightdirector/turn-distance-nm", 0.0);
setprop("/instrumentation/flightdirector/wind-speed-kt", 0.0);
setprop("/instrumentation/flightdirector/wind-angle-deg", 0.0);
setprop("/instrumentation/flightdirector/next-heading-diff-deg", 0.0);
setprop("/instrumentation/flightdirector/curr-z-nm", 0.0);
setprop("/instrumentation/flightdirector/curr-trk-lck-mode", 0.0);
setprop("/instrumentation/flightdirector/currTrueHdg-deg", 0.0);
setprop("/instrumentation/flightdirector/currUS-deg", 0.0);
setprop("/instrumentation/flightdirector/track-mode-on", 0);
setprop("/instrumentation/flightdirector/fpa-mode-on", 0);
setprop("/instrumentation/flightdirector/fpa-deg", 0.0);
setprop("/instrumentation/flightdirector/fpa-val-deg", 0.0);
setprop("/instrumentation/flightdirector/currWP_trueCourse-deg",0.0);
setprop("/instrumentation/flightdirector/curr-intrcpt-hdg-err", 0.0);
setprop("/instrumentation/flightdirector/curr-trk-corr-err", 0.0);
setprop("/instrumentation/flightdirector/curr-turn-radius-nm", 0.0);
setprop("/instrumentation/flightdirector/curr-in-turn", 0);
if(getprop("/autopilot/route-manager/route/wp/id")!=nil) {#if waypoint present
if(getprop("/autopilot/route-manager/route/wp/altitude-ft") < 40000) {#setting target altitude
ALTFT = getprop("/autopilot/route-manager/route/wp/altitude-ft");
setprop("/autopilot/settings/target-altitude-ft", ALTFT);
}
}
settimer(init_gps,3);
});
FLAG = getprop("/instrumentation/nav/to-flag");
setprop("/instrumentation/flightdirector/to-flag", FLAG);
Rick Ace wrote:I can't start your version... There is no AutoStart
nickyivyca wrote:What's stopping me from posintng the final version is a little glitch in 2.0. .......
dany93 wrote:For Nickyivyca: I have this "Nasal runtime error: setprop() value is not string or number, at line 562" (not 563),
but no OPEN GL Warnings (FG 2.0.0, Windows Vista, ATI Radeon HD 3800 series w/ Driver V.10.9 [updated 19 sept 2010] ). Aircraft, or airport dependent?
Dany
nickyivyca wrote:Don't worry about the Open GL errors, they always swarm me on my laptop.
wp_altitude_ft = getprop("/autopilot/route-manager/route/wp/altitude-ft");
setprop("/instrumentation/gps/wp/wp[1]/altitude-ft", wp_altitude_ft);
wp_latitude_deg = getprop("/autopilot/route-manager/route/wp/latitude-deg");
setprop("/instrumentation/gps/wp/wp[1]/latitude-deg", wp_latitude_deg);
wp_longitude_deg = getprop("/autopilot/route-manager/route/wp/longitude-deg");
setprop("/instrumentation/gps/wp/wp[1]/longitude-deg", wp_longitude_deg);
nickyivyca wrote:instead of .95 for the HUD value, I'm using .9. It is a bit too seethough when you use .95, and .9 seems to fix the problem correctly.
MATERIAL "Transparent" rgb 1 0.5 0 amb 1 1 1 emis 0 0 0 spec 1 1 1 shi 64 trans 0.85
nickyivyca wrote:....to retune the glideslope, which seems to be unsteady with the new elevator authority. The main problem is transition now instead of the main action-it will go all the way up, then all the way down when it first is enabled. I have to fix that obviously.
Users browsing this forum: No registered users and 12 guests