parent
fdd0b4b13f
commit
b2699b133d
1 changed files with 29 additions and 35 deletions
|
@ -552,16 +552,13 @@ var ap_various = func {
|
|||
}
|
||||
|
||||
var lnavCalc = maketimer(0.05, func {
|
||||
if (getprop("/autopilot/route-manager/active") == 1) {
|
||||
var f = flightplan();
|
||||
var total_distance = getprop("/autopilot/route-manager/total-distance");
|
||||
var distance = total_distance - getprop("/autopilot/route-manager/distance-remaining-nm");
|
||||
var destination_elevation = getprop("/autopilot/route-manager/destination/field-elevation-ft");
|
||||
var leg = f.currentWP();
|
||||
if (leg == nil) {
|
||||
if (getprop("/it-autoflight/output/vert") == 1) {
|
||||
setprop("/it-autoflight/input/lat", 3);
|
||||
}
|
||||
return;
|
||||
}
|
||||
var groundspeed = getprop("/velocities/groundspeed-kt");
|
||||
|
@ -585,9 +582,6 @@ var lnavCalc = maketimer(0.05, func {
|
|||
CourseError -= 360;
|
||||
}
|
||||
setprop("/it-autoflight/internal/lnav-error-deg", CourseError);
|
||||
} else {
|
||||
setprop("/it-autoflight/internal/lnav-error-deg", 0);
|
||||
}
|
||||
});
|
||||
|
||||
var flch_on = func {
|
||||
|
|
Reference in a new issue