1
0
Fork 0

DU: Redrawn and smoothed FPV animations

This commit is contained in:
Josh Davidson 2022-11-14 18:12:50 -05:00
parent 94fba50bc2
commit 8b77f09fe7
5 changed files with 58 additions and 37 deletions

View file

@ -2041,6 +2041,7 @@
<horizon-ground type="double">0</horizon-ground>
<horizon-pitch type="double">0</horizon-pitch>
<track-deg type="double">0</track-deg>
<track-hdg-diff type="double">0</track-hdg-diff>
</pfd>
<radar-altimeter n="0">

View file

@ -1,5 +1,5 @@
# A3XX PFD
# Copyright (c) 2020 Josh Davidson (Octal450)
# Copyright (c) 2022 Josh Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
@ -13,9 +13,9 @@ var air_data_switch = props.globals.getNode("/controls/navigation/switching/air-
var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1);
var alt_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1);
var alt_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1);
var aoa_1 = props.globals.getNode("/systems/navigation/adr/output/aoa-1", 1);
var aoa_2 = props.globals.getNode("/systems/navigation/adr/output/aoa-2", 1);
var aoa_3 = props.globals.getNode("/systems/navigation/adr/output/aoa-3", 1);
var aoa_1 = props.globals.getNode("/systems/navigation/adr/output/aoa-1-damped", 1);
var aoa_2 = props.globals.getNode("/systems/navigation/adr/output/aoa-2-damped", 1);
var aoa_3 = props.globals.getNode("/systems/navigation/adr/output/aoa-3-damped", 1);
var hundredAbove = props.globals.getNode("/instrumentation/pfd/hundred-above", 1);
var minimum = props.globals.getNode("/instrumentation/pfd/minimums", 1);
@ -253,8 +253,8 @@ var canvas_pfd = {
obj["FMA_lvrclb"].hide();
}
}),
props.UpdateManager.FromHashList(["trackPFD","headingPFD","aoaPFD"], 0.01, func(val) {
obj.track_diff = geo.normdeg180(val.trackPFD - val.headingPFD); # store this to use in FPV
props.UpdateManager.FromHashList(["trackHdgDiff","aoaPFD"], 0.01, func(val) {
obj.track_diff = val.trackHdgDiff; # store this to use in FPV
obj["TRK_pointer"].setTranslation(obj.getTrackDiffPixels(obj.track_diff),0);
obj.AI_fpv_trans.setTranslation(obj.getTrackDiffPixels(math.clamp(obj.track_diff, -21, 21)), math.clamp(val.aoaPFD, -20, 20) * 12.5);
}),
@ -2201,7 +2201,7 @@ var input = {
vsNeedle: "/instrumentation/pfd/vs-needle",
vsPFD: "/it-autoflight/internal/vert-speed-fpm-pfd",
trackPFD: "/instrumentation/pfd/track-deg",
trackHdgDiff: "/instrumentation/pfd/track-hdg-diff",
headingPFD: "/instrumentation/pfd/heading-deg",
headingScale: "/instrumentation/pfd/heading-scale",
localizer: "/instrumentation/nav[0]/heading-needle-deflection-norm",

View file

@ -41,12 +41,12 @@
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="1592"
inkscape:cy="700.39821"
inkscape:cx="666.95147"
inkscape:cy="693.1507"
inkscape:cx="1036.3363"
inkscape:zoom="0.50000001"
showgrid="false"
id="namedview371"
inkscape:window-height="1017"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="1"
@ -871,35 +871,36 @@
<g
id="FPV"
inkscape:label="#g4866"
transform="matrix(1.1096498,0,0,1.1096488,-47.205197,-44.038897)">
transform="matrix(0.79660117,0,0,0.79660575,91.726164,113.07112)"
style="stroke-width:7.20948505;stroke-miterlimit:4;stroke-dasharray:none">
<rect
transform="matrix(0,1,-1,0,0,0)"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:4.32775021;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:7.20948505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4864"
width="11.546137"
height="4.3256927"
x="471.68945"
y="-445.96243" />
width="26.21059"
height="9.5405254"
x="454.79132"
y="-448.55917" />
<path
style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:4.32568979;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 461.34624,502.24844 c 0,9.69662 -7.86065,17.55727 -17.55727,17.55727 -9.69662,0 -17.55727,-7.86065 -17.55727,-17.55727 0,-9.69662 7.86065,-17.55727 17.55727,-17.55727 9.69662,0 17.55727,7.86065 17.55727,17.55727 z"
style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:9.54052925;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 462.33255,502.24797 c 0,10.24192 -8.30251,18.54462 -18.54421,18.54462 -10.24169,0 -18.5442,-8.3027 -18.5442,-18.54462 0,-10.24193 8.30251,-18.54462 18.5442,-18.54462 10.2417,0 18.54421,8.30269 18.54421,18.54462 z"
id="path4858"
inkscape:connector-curvature="0"
sodipodi:nodetypes="zzzzz" />
<rect
y="500.03757"
x="399.82227"
height="4.3256927"
width="25.012779"
y="497.478"
x="369.83731"
height="9.540534"
width="53.938961"
id="rect4860"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:6.36979008;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:7.20948505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:6.36977005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:7.20948505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4862"
width="25.012671"
height="4.3256927"
x="462.76437"
y="500.03757" />
width="53.939117"
height="9.540534"
x="463.82291"
y="497.478" />
</g>
<g
id="AI_stick_pos"
@ -970,7 +971,7 @@
</g>
</g>
<rect
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.7799499;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="AI_center"
width="15.997256"
height="16.492025"
@ -999,7 +1000,7 @@
inkscape:connector-curvature="0"
id="fixed_aircraft_outline_1"
d="m 279.39676,473.84829 20.67975,-1.3e-4 0,15.43882 0,0 1.8e-4,25.65723 -15.4389,0 -0.14628,-25.65723 0,0 -81.2588,-5e-5 0,-15.43891 76.16405,2.1e-4 z"
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375005;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.75005385;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="fixed_aircraft_outline_1" />
</g>
<g
@ -1020,7 +1021,7 @@
x="286.12354"
y="486.37204" />
<path
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375005;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.75005385;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 279.39676,473.84829 20.67975,-1.3e-4 0,15.43882 0,0 1.8e-4,25.65723 -15.4389,0 -0.14628,-25.65723 0,0 -81.2588,-5e-5 0,-15.43891 76.16405,2.1e-4 z"
id="fixed_aircraft_outline_2"
inkscape:connector-curvature="0"

Before

Width:  |  Height:  |  Size: 401 KiB

After

Width:  |  Height:  |  Size: 401 KiB

View file

@ -61,6 +61,11 @@
</quantization>
</sensor>
<lag_filter name="/systems/navigation/adr/output/aoa-1-damped">
<input>/systems/navigation/adr/output/aoa-1</input>
<c1>10</c1>
</lag_filter>
<sensor name="/systems/navigation/probes/aoa-2">
<input>aero/alpha-deg-fixed</input>
<quantization name="/systems/navigation/adr/output/aoa-2">
@ -70,6 +75,11 @@
</quantization>
</sensor>
<lag_filter name="/systems/navigation/adr/output/aoa-2-damped">
<input>/systems/navigation/adr/output/aoa-2</input>
<c1>10</c1>
</lag_filter>
<sensor name="/systems/navigation/probes/aoa-3">
<input>aero/alpha-deg-fixed</input>
<quantization name="/systems/navigation/adr/output/aoa-3">
@ -78,6 +88,11 @@
<max>180</max>
</quantization>
</sensor>
<lag_filter name="/systems/navigation/adr/output/aoa-3-damped">
<input>/systems/navigation/adr/output/aoa-3</input>
<c1>10</c1>
</lag_filter>
<sensor name="/systems/navigation/probes/pitot-1">
<input>/systems/pitot[0]/measured-total-pressure-inhg</input>

View file

@ -49,7 +49,6 @@
<filter>
<name>Track heading diff</name>
<type>gain</type>
<update-interval-secs type="double">0.05</update-interval-secs>
<gain>1.0</gain>
<input>
<property>/orientation/track-deg</property>
@ -63,7 +62,6 @@
<filter>
<name>Heading scale</name>
<type>gain</type>
<update-interval-secs type="double">0.05</update-interval-secs>
<gain>1.0</gain>
<input>
<condition>
@ -78,7 +76,6 @@
<filter>
<name>Heading bug diff</name>
<type>gain</type>
<update-interval-secs type="double">0.05</update-interval-secs>
<gain>1.0</gain>
<input>
<property>/it-autoflight/input/hdg</property>
@ -104,7 +101,6 @@
<filter>
<name>Track bug diff</name>
<type>gain</type>
<update-interval-secs type="double">0.05</update-interval-secs>
<gain>1.0</gain>
<input>
<property>/instrumentation/pfd/track-deg</property>
@ -114,19 +110,27 @@
</period>
</input>
<reference>
<property>/instrumentation/pfd/heading-scale</property>
<property>/instrumentation/pfd/heading-deg</property>
<period>
<min>-180.0</min>
<max>180.0</max>
</period>
</reference>
<output>/instrumentation/pfd/track-hdg-diff</output>
<output>/instrumentation/pfd/track-hdg-diff-cmd</output>
<period>
<min>-180.0</min>
<max>180.0</max>
</period>
</filter>
<filter>
<name>Track bug diff smoothed</name>
<type>exponential</type>
<input>/instrumentation/pfd/track-hdg-diff-cmd</input>
<output>/instrumentation/pfd/track-hdg-diff</output>
<filter-time>0.16</filter-time>
</filter>
<filter>
<name>Altitude bug diff</name>
<type>gain</type>