A32X: Canvas PFD Improvements, AI almost done, improve flight director in V/S mode

This commit is contained in:
Joshua Davidson 2017-11-04 20:53:30 -04:00
parent 1320dc700f
commit 6f02559a40
5 changed files with 86 additions and 23 deletions

View file

@ -15,6 +15,7 @@ setprop("/it-autoflight/output/ap2", 0);
setprop("/it-autoflight/output/fd1", 0);
setprop("/it-autoflight/output/fd2", 0);
setprop("/it-autoflight/output/athr", 0);
setprop("/instrumentation/pfd/horizon-pitch", 0);
var ASI = 0;
var ASItrgt = 0;
var alt = 0;
@ -77,6 +78,11 @@ var canvas_PFD_base = {
me.AI_horizon_trans = me["AI_horizon"].createTransform();
me.AI_horizon_rot = me["AI_horizon"].createTransform();
me.AI_horizon_ground_trans = me["AI_horizon_ground"].createTransform();
me.AI_horizon_ground_rot = me["AI_horizon_ground"].createTransform();
me.AI_horizon_sky_rot = me["AI_horizon_sky"].createTransform();
me.page = canvas_group;
@ -105,7 +111,7 @@ var canvas_PFD_1 = {
getKeys: func() {
return ["FMA_man","FMA_manmode","FMA_flxtemp","FMA_thrust","FMA_lvrclb","FMA_pitch","FMA_pitcharm","FMA_pitcharm2","FMA_roll","FMA_rollarm","FMA_combined","FMA_catmode","FMA_cattype","FMA_nodh","FMA_dh","FMA_dhn","FMA_ap","FMA_fd","FMA_athr",
"FMA_man_box","FMA_flx_box","FMA_thrust_box","FMA_pitch_box","FMA_pitcharm_box","FMA_roll_box","FMA_rollarm_box","FMA_combined_box","FMA_catmode_box","FMA_cattype_box","FMA_cat_box","FMA_dh_box","FMA_ap_box","FMA_fd_box","FMA_athr_box","FMA_Middle1",
"FMA_Middle2","ASI_scale","ASI_target","ASI_mach","ASI_mach_decimal","ASI_ten_sec","AI_center","AI_bank","AI_slipskid","AI_horizon","FD_roll","FD_pitch","ALT_digits","ALT_tens","VS_pointer","QNH_setting","LOC_pointer","LOC_scale","GS_scale","GS_pointer","HDG_target"];
"FMA_Middle2","ASI_scale","ASI_target","ASI_mach","ASI_mach_decimal","ASI_ten_sec","AI_center","AI_bank","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","FD_roll","FD_pitch","ALT_digits","ALT_tens","VS_pointer","QNH_setting","LOC_pointer","LOC_scale","GS_scale","GS_pointer","HDG_target"];
},
update: func() {
state1 = getprop("/systems/thrust/state1");
@ -354,6 +360,9 @@ var canvas_PFD_1 = {
me.AI_horizon_trans.setTranslation(0, pitch * 11.825);
me.AI_horizon_rot.setRotation(-roll * D2R, me["AI_center"].getCenter());
me.AI_horizon_ground_trans.setTranslation(0, getprop("/instrumentation/pfd/horizon-ground") * 11.825);
me.AI_horizon_ground_rot.setRotation(-roll * D2R, me["AI_center"].getCenter());
me.AI_horizon_sky_rot.setRotation(-roll * D2R, me["AI_center"].getCenter());
me["AI_slipskid"].setTranslation(getprop("/instrumentation/slip-skid-ball/indicated-slip-skid") * -15, 0);
me["AI_bank"].setRotation(-roll * D2R);

View file

@ -42,9 +42,9 @@
inkscape:window-height="1030"
id="namedview371"
showgrid="true"
inkscape:zoom="0.70710678"
inkscape:cx="461.56075"
inkscape:cy="538.82439"
inkscape:zoom="0.3535534"
inkscape:cx="1384.9211"
inkscape:cy="1063.0453"
inkscape:window-x="1592"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -79,6 +79,22 @@
x="203.79523"
y="229.74361"
inkscape:label="#rect9211" />
<rect
inkscape:label="#rect9211"
y="229.74361"
x="203.79523"
height="562.93713"
width="489.23914"
id="AI_horizon_ground_clip"
style="opacity:0.46000001;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1.27696717;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="opacity:0.46000001;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1.27696717;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="AI_horizon_sky_clip"
width="489.23914"
height="562.93713"
x="203.79523"
y="229.74361"
inkscape:label="#rect9211" />
<g
id="AI_horizon"
transform="translate(0,-97.082454)"
@ -94,6 +110,12 @@
x="-195.3976"
y="611.74884"
inkscape:label="#rect5809" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m -193.7976,610.26868 1284.1095,0"
id="path4602"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<rect
inkscape:label="#rect5809"
y="-493.56796"
@ -102,12 +124,6 @@
width="1287.3096"
id="AI_sky"
style="opacity:1;fill:#328acd;fill-opacity:1;stroke:none;stroke-width:2.58921981;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4665"
d="m -193.7976,610.26868 1284.1095,0"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
</g>
<g
inkscape:label="#g5341"
@ -1034,6 +1050,44 @@
</g>
</g>
</g>
<g
id="AI_horizon_ground"
transform="translate(0,-97.082454)"
inkscape:label="#g4918">
<rect
style="opacity:1;fill:#522001;fill-opacity:1;stroke:none;stroke-width:2.48752213;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4914"
width="1287.3097"
height="1102.3192"
x="-195.3976"
y="611.74884"
inkscape:label="#rect5809" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4916"
d="m -193.7976,610.26868 1284.1095,0"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
</g>
<g
id="AI_horizon_sky"
inkscape:label="#g4606"
transform="translate(0,-206.0288)">
<rect
inkscape:label="#rect5809"
y="409.34946"
x="-195.39726"
height="102.31912"
width="1287.3096"
id="rect4600"
style="opacity:1;fill:#328acd;fill-opacity:1;stroke:none;stroke-width:2.58921981;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m -193.7976,513.1864 1284.1095,0"
id="path4665"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
<path
inkscape:connector-curvature="0"
id="AI_horizon_mask"

Before

Width:  |  Height:  |  Size: 365 KiB

After

Width:  |  Height:  |  Size: 368 KiB

View file

@ -347,7 +347,7 @@
<value>1</value>
</equals>
</condition>
<property>/it-autoflight/internal/vs</property>
<property>/it-autoflight/input/vs</property>
</input>
<input>
<condition>

View file

@ -301,13 +301,13 @@
<dif>
<table>
<property>/position/gear-agl-ft</property>
<entry><ind> 1</ind><dep> 0</dep></entry>
<entry><ind>150</ind><dep> 16</dep></entry>
<entry><ind> 1</ind><dep> 0.00</dep></entry>
<entry><ind>150</ind><dep> 17.35</dep></entry>
</table>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind> 0</ind><dep> 0</dep></entry>
<entry><ind>16</ind><dep>-16</dep></entry>
<entry><ind> 0.00</ind><dep> 0.00</dep></entry>
<entry><ind>17.35</ind><dep>-17.35</dep></entry>
</table>
</dif>
</expression>
@ -329,21 +329,21 @@
<dif>
<table>
<property>/position/gear-agl-ft</property>
<entry><ind> 1</ind><dep> 0</dep></entry>
<entry><ind>150</ind><dep> 16</dep></entry>
<entry><ind> 1</ind><dep> 0.00</dep></entry>
<entry><ind>150</ind><dep> 17.35</dep></entry>
</table>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind>-16</ind><dep> 16</dep></entry>
<entry><ind> 0</ind><dep> 0</dep></entry>
<entry><ind> 16</ind><dep>-16</dep></entry>
<entry><ind>-17.35</ind><dep> 17.35</dep></entry>
<entry><ind> 0.00</ind><dep> 0.00</dep></entry>
<entry><ind> 17.35</ind><dep>-17.35</dep></entry>
</table>
</dif>
</expression>
</input>
<output>/instrumentation/pfd/horizon-ground</output>
<min>-16</min>
<max>16</max>
<min>-17.35</min>
<max>17.35</max>
</filter>
<filter>

View file

@ -1 +1 @@
3045
3046