Control: Fix AFS VS and FPA limits
This commit is contained in:
parent
01d4bfb09c
commit
b91978be04
4 changed files with 21 additions and 20 deletions
|
@ -451,7 +451,6 @@ var canvas_PFD_base = {
|
|||
fbw_curlaw = fbw_law.getValue();
|
||||
me["FMA_combined"].setText(sprintf("%s", pitch_mode_act));
|
||||
|
||||
|
||||
if (pitch_mode_act == "LAND" or pitch_mode_act == "FLARE" or pitch_mode_act == "ROLL OUT") {
|
||||
me["FMA_pitch"].hide();
|
||||
me["FMA_roll"].hide();
|
||||
|
|
|
@ -27,6 +27,8 @@ var R = 0;
|
|||
var dist_coeff = 0;
|
||||
var turn_dist = 0;
|
||||
var vsnow = 0;
|
||||
var fpanow = 0;
|
||||
var altinput = 0;
|
||||
setprop("/it-autoflight/internal/heading-deg", getprop("/orientation/heading-magnetic-deg"));
|
||||
setprop("/it-autoflight/internal/track-deg", getprop("/orientation/track-magnetic-deg"));
|
||||
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
|
||||
|
@ -444,9 +446,9 @@ var vertical = func {
|
|||
alandt1.stop();
|
||||
mng_sys_stop();
|
||||
setprop("/it-autoflight/output/appr-armed", 0);
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
vsnow = math.round(getprop("/it-autoflight/internal/vert-speed-fpm"), 100);
|
||||
vsnow = math.clamp(math.round(getprop("/it-autoflight/internal/vert-speed-fpm"), 100), -6000, 6000);
|
||||
setprop("/it-autoflight/input/vs", vsnow);
|
||||
setprop("/it-autoflight/output/vert", 1);
|
||||
setprop("/it-autoflight/mode/vert", "V/S");
|
||||
|
@ -504,7 +506,7 @@ var vertical = func {
|
|||
alandt1.stop();
|
||||
mng_sys_stop();
|
||||
setprop("/it-autoflight/output/appr-armed", 0);
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
var alt = getprop("/it-autoflight/internal/alt");
|
||||
|
@ -526,9 +528,9 @@ var vertical = func {
|
|||
alandt1.stop();
|
||||
mng_sys_stop();
|
||||
setprop("/it-autoflight/output/appr-armed", 0);
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
var fpanow = math.round(getprop("/it-autoflight/internal/fpa"), 0.1);
|
||||
fpanow = math.clamp(math.round(getprop("/it-autoflight/internal/fpa"), 0.1), -9.9, 9.9);
|
||||
setprop("/it-autoflight/input/fpa", fpanow);
|
||||
setprop("/it-autoflight/output/vert", 5);
|
||||
setprop("/it-autoflight/mode/vert", "FPA");
|
||||
|
@ -559,7 +561,7 @@ var vertical = func {
|
|||
} else {
|
||||
setprop("/it-autoflight/mode/arm", " ");
|
||||
}
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
thrustmodet.start();
|
||||
} else if (vertset == 8) {
|
||||
|
@ -571,7 +573,7 @@ var vertical = func {
|
|||
mng_run();
|
||||
setprop("/it-autoflight/mode/vert", "mng");
|
||||
setprop("/it-autoflight/mode/arm", " ");
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
if (getprop("/it-autoflight/output/loc-armed")) {
|
||||
setprop("/it-autoflight/mode/arm", "LOC");
|
||||
|
@ -591,7 +593,7 @@ var vertical = func {
|
|||
alandt1.stop();
|
||||
mng_sys_stop();
|
||||
setprop("/it-autoflight/output/appr-armed", 0);
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
setprop("/it-autoflight/output/vert", 9);
|
||||
setprop("/it-autoflight/mode/vert", " ");
|
||||
|
@ -837,7 +839,7 @@ var altcapt = func {
|
|||
}
|
||||
}
|
||||
}
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
}
|
||||
|
||||
|
@ -1013,7 +1015,7 @@ var aland1 = func {
|
|||
# Managed Climb/Descent
|
||||
var mng_main = func {
|
||||
if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
|
||||
var altinput = getprop("/it-autoflight/input/alt");
|
||||
altinput = getprop("/it-autoflight/input/alt");
|
||||
setprop("/it-autoflight/internal/alt", altinput);
|
||||
var wp_curr = getprop("/autopilot/route-manager/current-wp");
|
||||
var mng_alt_wp = getprop("/autopilot/route-manager/route/wp",wp_curr,"altitude-ft");
|
||||
|
|
|
@ -1133,8 +1133,8 @@
|
|||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/it-autoflight/input/fpa</property>
|
||||
<min>-20.9</min>
|
||||
<max>20.9</max>
|
||||
<min>-9.9</min>
|
||||
<max>9.9</max>
|
||||
<step>-1</step>
|
||||
<wrap>false</wrap>
|
||||
</binding>
|
||||
|
@ -1154,8 +1154,8 @@
|
|||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/it-autoflight/input/fpa</property>
|
||||
<min>-20.9</min>
|
||||
<max>20.9</max>
|
||||
<min>-9.9</min>
|
||||
<max>9.9</max>
|
||||
<step>-0.1</step>
|
||||
<wrap>false</wrap>
|
||||
</binding>
|
||||
|
@ -1193,8 +1193,8 @@
|
|||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/it-autoflight/input/fpa</property>
|
||||
<min>-20.9</min>
|
||||
<max>20.9</max>
|
||||
<min>-9.9</min>
|
||||
<max>9.9</max>
|
||||
<step>0.1</step>
|
||||
<wrap>false</wrap>
|
||||
</binding>
|
||||
|
@ -1215,8 +1215,8 @@
|
|||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/it-autoflight/input/fpa</property>
|
||||
<min>-20.9</min>
|
||||
<max>20.9</max>
|
||||
<min>-9.9</min>
|
||||
<max>9.9</max>
|
||||
<step>1</step>
|
||||
<wrap>false</wrap>
|
||||
</binding>
|
||||
|
|
|
@ -1 +1 @@
|
|||
4729
|
||||
4730
|
Reference in a new issue