1
0
Fork 0

FG1000 : APR and GS modes

Approach and GS modes - FG1000 and GFC700 can now be used for
autopilot coupled ILS or GPS approaches

Also:
- FLC mdoe now include an airspeed bug
- VDI indicator beside altitude tape now works
- Marker beacon displays O/M/I as appropriate
This commit is contained in:
Stuart Buchanan 2019-02-21 22:09:48 +00:00
parent 0ffc00ed18
commit f09b49e006
10 changed files with 571 additions and 125 deletions

View file

@ -185,14 +185,56 @@
<target>LOC-ARM</target>
<condition>
<or>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV1</value>
</equals>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV2</value>
</equals>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV1</value>
</equals>
<equals>
<property>/instrumentation/nav[0]/nav-loc</property>
<value>true</value>
</equals>
</and>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV2</value>
</equals>
<equals>
<property>/instrumentation/nav[1]/nav-loc</property>
<value>true</value>
</equals>
</and>
</or>
</condition>
</transition>
<transition>
<name>NAV-VOR</name>
<source>NAV-SRC</source>
<target>VOR-ARM</target>
<condition>
<or>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV1</value>
</equals>
<equals>
<property>/instrumentation/nav[0]/nav-loc</property>
<value>false</value>
</equals>
</and>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV1</value>
</equals>
<equals>
<property>/instrumentation/nav[1]/nav-loc</property>
<value>false</value>
</equals>
</and>
</or>
</condition>
</transition>
@ -212,16 +254,10 @@
<source>GPS-ARM</source>
<target>GPS</target>
<condition>
<and>
<less-than>
<property>/instrumentation/gps/wp/wp[1]/course-error-nm</property>
<value>0.5</value>
</less-than>
<greater-than>
<property>/instrumentation/gps/wp/wp[1]/course-error-nm</property>
<value>-0.5</value>
</greater-than>
</and>
<equals>
<property>/autopilot/internal/nav-capture</property>
<value>1</value>
</equals>
</condition>
</transition>
@ -239,6 +275,18 @@
</enter>
</state>
<transition>
<name>LOC-ARM - LOC</name>
<source>LOC-ARM</source>
<target>LOC</target>
<condition>
<equals>
<property>/autopilot/internal/nav-capture</property>
<value>1</value>
</equals>
</condition>
</transition>
<state>
<name>VOR-ARM</name>
<enter>
@ -253,6 +301,18 @@
</enter>
</state>
<transition>
<name>VOR-ARM - VOR</name>
<source>VOR-ARM</source>
<target>VOR</target>
<condition>
<equals>
<property>/autopilot/internal/nav-capture</property>
<value>1</value>
</equals>
</condition>
</transition>
<state>
<name>GPS</name>
<enter>
@ -289,6 +349,11 @@
<property>/autopilot/annunciator/lateral-mode-armed</property>
<value></value>
</enter>
<enter>
<command>property-assign</command>
<property>/autopilot/locks/heading</property>
<value>nav-hold</value>
</enter>
</state>
<state>
@ -303,6 +368,11 @@
<property>/autopilot/annunciator/lateral-mode-armed</property>
<value></value>
</enter>
<enter>
<command>property-assign</command>
<property>/autopilot/locks/heading</property>
<value>nav-hold</value>
</enter>
</state>
<!-- From the OFF state, pressing any of FD, AP, CWS, NAV, BC, APR, changes to ROL mode -->
@ -323,7 +393,6 @@
</condition>
</transition>
<transition>
<name>OFF-HDG</name>
<source>OFF</source>
@ -414,19 +483,26 @@
</condition>
</transition>
<!-- From (just about) any state, pressing NAV goes to NAV mode-->
<!-- From (just about) any state, pressing NAV or APR goes to NAV mode. APR mode should
have a slightly different VOR version (VAPP), but is otherwise identical in lateral,
if not vertical modes. So we will just overload the states for simplicity. -->
<transition>
<name>To NAV</name>
<target>NAV-SRC</target>
<exclude-target>true</exclude-target>
<condition>
<and>
<equals><property>/autopilot/lateral-mode-button</property><value>NAV</value></equals>
<or>
<equals><property>/autopilot/lateral-mode-button</property><value>NAV</value></equals>
<equals><property>/autopilot/lateral-mode-button</property><value>APR</value></equals>
</or>
<not><equals><property>/autopilot/locks/heading</property><value>nav-hold</value></equals></not>
</and>
</condition>
</transition>
<!-- Only switch off NAV/APR when NAV is pressed, as user may press APR to enable glideslope while already
in NAV mode -->
<transition>
<name>From NAV</name>
<source>GPS-ARM</source>

View file

@ -305,6 +305,100 @@
<name>VNV</name>
</state>
<state>
<name>GS-ARM</name>
<enter>
<command>property-assign</command>
<property>/autopilot/annunciator/vertical-mode-armed</property>
<value>GS</value>
</enter>
<enter>
<!-- Reset button to avoid triggering next transition immediately -->
<command>property-assign</command>
<property>/autopilot/vertical-mode-button</property>
<value></value>
</enter>
</state>
<transition>
<name>GS Enabled</name>
<source>GS-ARM</source>
<target>GS</target>
<condition>
<or>
<and>
<not-equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV2</value>
</not-equals>
<equals>
<property>/instrumentation/nav[0]/gs-in-range</property>
<value>true</value>
</equals>
<less-than>
<!-- Must intercept the glideslope from below -->
<property>/instrumentation/nav[0]/gs-needle-deflection-norm</property>
<value>0.2</value>
</less-than>
<greater-than>
<!-- Must intercept the glideslope from below -->
<property>/instrumentation/nav[0]/gs-needle-deflection-norm</property>
<value>0.0</value>
</greater-than>
</and>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV2</value>
</equals>
<equals>
<property>/instrumentation/nav[1]/gs-in-range</property>
<value>true</value>
</equals>
<less-than>
<!-- Must intercept the glideslope from below -->
<property>/instrumentation/nav[1]/gs-needle-deflection-norm</property>
<value>0.2</value>
</less-than>
<greater-than>
<!-- Must intercept the glideslope from below -->
<property>/instrumentation/nav[1]/gs-needle-deflection-norm</property>
<value>0.0</value>
</greater-than>
</and>
</or>
</condition>
</transition>
<state>
<name>GS</name>
<enter>
<command>property-assign</command>
<property>/autopilot/annunciator/vertical-mode</property>
<value>GS</value>
</enter>
<enter>
<command>property-assign</command>
<property>/autopilot/annunciator/vertical-mode-armed</property>
<value></value>
</enter>
<enter>
<command>property-assign</command>
<property>/autopilot/annunciator/vertical-mode-target</property>
<value></value>
</enter>
<enter>
<command>property-assign</command>
<property>/autopilot/locks/altitude</property>
<value>gs-hold</value>
</enter>
<enter>
<command>property-assign</command>
<property>/autopilot/locks/speed</property>
<value></value>
</enter>
</state>
<state>
<name>BC</name>
</state>
@ -446,6 +540,19 @@
</condition>
</transition>
<!-- From any state pressing APR changes to GS mode, if not already enabled -->
<transition>
<name>GS-ON</name>
<target>GS-ARM</target>
<exclude-target>true</exclude-target>
<condition>
<and>
<equals><property>/autopilot/vertical-mode-button</property><value>APR</value></equals>
<not><equals><property>/autopilot/locks/altitude</property><value>gs-hold</value></equals></not>
</and>
</condition>
</transition>
<!-- Transitions to switch off various AP modes, which return to PIT mode. This is complicated as in many cases they may be in ALTS-ARM -->

View file

@ -262,6 +262,58 @@
<output>/autopilot/annunciator/flight-director-enabled</output>
</logic>
<!-- Logic filter to indicate if we can transtion to GPS/LOC/VOR mode -->
<logic>
<input>
<or>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV1</value>
</equals>
<less-than>
<property>/instrumentation/nav[0]/heading-needle-deflection</property>
<value>4.0</value>
</less-than>
<greater-than>
<property>/instrumentation/nav[0]/heading-needle-deflection</property>
<value>-4.0</value>
</greater-than>
</and>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV2</value>
</equals>
<less-than>
<property>/instrumentation/nav[1]/heading-needle-deflection</property>
<value>4.0</value>
</less-than>
<greater-than>
<property>/instrumentation/nav[1]/heading-needle-deflection</property>
<value>-4.0</value>
</greater-than>
</and>
<and>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>GPS</value>
</equals>
<less-than>
<property>/instrumentation/gps/wp/wp[1]/course-error-nm</property>
<value>0.5</value>
</less-than>
<greater-than>
<property>/instrumentation/gps/wp/wp[1]/course-error-nm</property>
<value>-0.5</value>
</greater-than>
</and>
</or>
</input>
<output>/autopilot/internal/nav-capture</output>
</logic>
<!-- =============================================================== -->
<!-- Roll Axis Modes -->
<!-- =============================================================== -->
@ -655,16 +707,27 @@
<!-- Glideslope hold. -->
<!-- Stage #2 drives the elevator-trim to achieve the desired climb rate. -->
<pid-controller>
<name>Glideslope Hold</name>
<name>NAV1/GPS Glideslope Hold</name>
<debug>false</debug>
<enable>
<condition>
<equals>
<property>/autopilot/locks/altitude</property>
<value>gs1-hold</value>
</equals>
<and>
<equals>
<property>/autopilot/locks/altitude</property>
<value>gs-hold</value>
</equals>
<or>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>GPS</value>
</equals>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV1</value>
</equals>
</or>
</and>
</condition>
</enable>
<input>
@ -677,15 +740,54 @@
<prop>/autopilot/settings/target-pitch-deg</prop>
</output>
<config>
<Kp>-0.01</Kp> <!-- proportional gain -->
<Kp>0.1</Kp> <!-- proportional gain -->
<beta>1.0</beta> <!-- input value weighing factor -->
<alpha>0.1</alpha> <!-- low pass filter weighing factor -->
<gamma>0.0</gamma> <!-- input value weighing factor for -->
<!-- unfiltered derivative error -->
<Ti>10.0</Ti> <!-- integrator time -->
<Ti>1.0</Ti> <!-- integrator time -->
<Td>0.00001</Td> <!-- derivator time -->
<u_min>-1.0</u_min> <!-- minimum output clamp -->
<u_max>1.0</u_max> <!-- maximum output clamp -->
<u_min>-15.0</u_min><!-- minimum output clamp -->
<u_max>15.0</u_max> <!-- maximum output clamp -->
</config>
</pid-controller>
<pid-controller>
<name>NAV1/GPS Glideslope Hold</name>
<debug>false</debug>
<enable>
<condition>
<and>
<equals>
<property>/autopilot/locks/altitude</property>
<value>gs-hold</value>
</equals>
<equals>
<property>/autopilot/settings/nav-mode-source</property>
<value>NAV2</value>
</equals>
</and>
</condition>
</enable>
<input>
<prop>/velocities/vertical-speed-fps</prop>
</input>
<reference>
<prop>/instrumentation/nav[1]/gs-rate-of-climb</prop>
</reference>
<output>
<prop>/autopilot/settings/target-pitch-deg</prop>
</output>
<config>
<Kp>0.1</Kp> <!-- proportional gain -->
<beta>1.0</beta> <!-- input value weighing factor -->
<alpha>0.1</alpha> <!-- low pass filter weighing factor -->
<gamma>0.0</gamma> <!-- input value weighing factor for -->
<!-- unfiltered derivative error -->
<Ti>1.0</Ti> <!-- integrator time -->
<Td>0.00001</Td> <!-- derivator time -->
<u_min>-15.0</u_min><!-- minimum output clamp -->
<u_max>15.0</u_max> <!-- maximum output clamp -->
</config>
</pid-controller>

View file

@ -11,7 +11,7 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="PFDInstruments.svg"
inkscape:version="0.91 r13725"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
version="1.1"
id="svg3140"
height="768"
@ -24,18 +24,18 @@
borderopacity="1"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="2.6295535"
inkscape:cx="378.97168"
inkscape:cy="351.68237"
inkscape:zoom="1.8593751"
inkscape:cx="588.67127"
inkscape:cy="449.20136"
inkscape:document-units="px"
inkscape:current-layer="PFDInstrumentsBankPoint"
inkscape:current-layer="PFDInstrumentsSelectedALT"
showgrid="false"
showguides="false"
inkscape:guide-bbox="true"
inkscape:window-width="2495"
inkscape:window-height="1416"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-width="2493"
inkscape:window-height="1385"
inkscape:window-x="67"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
inkscape:snap-to-guides="true"
@ -2335,8 +2335,7 @@
y="427.92041"
x="460.43945"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30px;line-height:0%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="0%"><tspan
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30px;line-height:0%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1"
y="427.92041"
x="460.43945"
@ -2468,6 +2467,15 @@
y="-393.92044"
transform="matrix(0.6108206,0.79176903,-0.6108206,0.79176903,0,0)"
inkscape:label="GS-ILS" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.33333333px;line-height:150%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
x="683.56299"
y="172.10088"
id="PFDInstrumentsGS-type"
inkscape:label="#text2095"><tspan
sodipodi:role="line"
id="tspan2103">G</tspan></text>
</g>
<g
style="display:inline;opacity:1"
@ -5838,8 +5846,7 @@
y="291.20926"
x="873.64142"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="0%"><tspan
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan5397"
x="873.64142"
@ -5857,8 +5864,7 @@
x="204.87395"
y="294.5"
id="PFDInstrumentsSpeed110"
inkscape:label="Speed110"
sodipodi:linespacing="125%"><tspan
inkscape:label="Speed110"><tspan
sodipodi:role="line"
id="tspan4971"
x="206.87395"
@ -6616,8 +6622,7 @@
x="770.98077"
y="294.26346"
id="PFDInstrumentsAlt11100"
inkscape:label="Alt11100"
sodipodi:linespacing="125%"><tspan
inkscape:label="Alt11100"><tspan
sodipodi:role="line"
id="tspan4973"
x="770.98077"
@ -6630,8 +6635,7 @@
x="799.36157"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4691-7)"
xml:space="preserve"
clip-path="none"
sodipodi:linespacing="0%"><tspan
clip-path="none"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'Sans, Normal';text-align:end;writing-mode:lr-tb;text-anchor:end;fill:#ffffff;fill-opacity:1"
y="-32.394936"
x="799.36157"
@ -6895,8 +6899,7 @@
x="239.58443"
y="611.12927"
id="PFDInstrumentsDME1-title"
inkscape:label="DME1-title"
sodipodi:linespacing="125%"><tspan
inkscape:label="DME1-title"><tspan
sodipodi:role="line"
id="tspan6098"
x="239.58443"
@ -6908,8 +6911,7 @@
x="239.77455"
y="628.24243"
id="PFDInstrumentsDME1-SRC-text"
inkscape:label="DME1-SRC-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="DME1-SRC-text"><tspan
sodipodi:role="line"
id="tspan6111"
x="239.77455"
@ -6921,8 +6923,7 @@
x="237.4928"
y="647.4472"
id="PFDInstrumentsDME1-FREQ-text"
inkscape:label="DME1-FREQ-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="DME1-FREQ-text"><tspan
sodipodi:role="line"
id="tspan6115"
x="237.4928"
@ -6934,8 +6935,7 @@
x="237.68295"
y="666.27173"
id="PFDInstrumentsDME1-DST-text"
inkscape:label="DME1-DST-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="DME1-DST-text"><tspan
sodipodi:role="line"
id="tspan6119"
x="237.68295"
@ -6970,8 +6970,7 @@
x="239.5529"
y="695.16937"
id="PFDInstrumentsBRG1-DST-text"
inkscape:label="BRG1-DST-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="BRG1-DST-text"><tspan
sodipodi:role="line"
id="tspan5857-2-0"
x="239.5529"
@ -6983,8 +6982,7 @@
x="241.2616"
y="713.16797"
id="PFDInstrumentsBRG1-WPID-text"
inkscape:label="BRG1-WPID-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="BRG1-WPID-text"><tspan
sodipodi:role="line"
id="tspan5857-9-3"
x="241.2616"
@ -6996,8 +6994,7 @@
x="240.84253"
y="731.08093"
id="PFDInstrumentsBRG1-SRC-text"
inkscape:label="BRG1-SRC-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="BRG1-SRC-text"><tspan
sodipodi:role="line"
id="tspan5857-0"
x="240.84253"
@ -7053,7 +7050,6 @@
x="186.54517"
y="508.86316"
id="PFDInstrumentsOrientationDisplay"
sodipodi:linespacing="125%"
inkscape:label="#text14869"><tspan
sodipodi:role="line"
id="tspan14871"
@ -7069,7 +7065,6 @@
id="rect14873"
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.97517461;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="PFDInstrumentsRangeDisplay"
y="704.09003"
x="223.3855"
@ -7118,8 +7113,7 @@
x="681.39441"
y="729.5387"
id="PFDInstrumentsBRG2-SRC-text"
inkscape:label="BRG2-SRC-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="BRG2-SRC-text"><tspan
sodipodi:role="line"
id="tspan5857"
x="681.39441"
@ -7131,8 +7125,7 @@
x="681.29822"
y="712.19135"
id="PFDInstrumentsBRG2-WPID-text"
inkscape:label="BRG2-WPID-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="BRG2-WPID-text"><tspan
sodipodi:role="line"
id="tspan5857-9"
x="681.29822"
@ -7144,8 +7137,7 @@
x="681.88885"
y="694.95819"
id="PFDInstrumentsBRG2-DST-text"
inkscape:label="BRG2-DST-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="BRG2-DST-text"><tspan
sodipodi:role="line"
id="tspan5857-2"
x="681.88885"
@ -7200,8 +7192,7 @@
x="8.9626169"
y="458.55432"
id="PFDInstrumentsWindData-OPTN2-SPD-text"
inkscape:label="WindData-OPTN2-SPD-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="WindData-OPTN2-SPD-text"><tspan
sodipodi:role="line"
id="tspan10920"
x="8.9626179"
@ -7237,8 +7228,7 @@
x="16.583868"
y="477.01712"
id="PFDInstrumentsWindData-OPTN3-SPD-text"
inkscape:label="WindData-OPTN3-SPD-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="WindData-OPTN3-SPD-text"><tspan
sodipodi:role="line"
id="tspan10667-6"
x="16.583868"
@ -7250,8 +7240,7 @@
x="-24.043869"
y="441.57062"
id="PFDInstrumentsWindData-OPTN3-HDG-text"
inkscape:label="WindData-OPTN3-HDG-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="WindData-OPTN3-HDG-text"><tspan
sodipodi:role="line"
id="tspan10667"
x="-24.043869"
@ -7288,8 +7277,7 @@
y="518.24725"
id="PFDInstrumentsWindData-OPTN1-crosswind-text"
inkscape:label="WindData-OPTN1-crosswind-text"
transform="matrix(0.99992526,-0.0122259,0.0122259,0.99992526,0,0)"
sodipodi:linespacing="125%"><tspan
transform="matrix(0.99992526,-0.0122259,0.0122259,0.99992526,0,0)"><tspan
sodipodi:role="line"
id="tspan11152"
x="-15.893252"
@ -7302,7 +7290,6 @@
y="542.45251"
id="PFDInstrumentsWindData-OPTN1-headwind-text"
inkscape:label="WindData-OPTN1-headwind-text"
sodipodi:linespacing="125%"
transform="matrix(0.99992526,-0.0122259,0.0122259,0.99992526,0,0)"><tspan
sodipodi:role="line"
id="tspan11152-7"
@ -7346,8 +7333,7 @@
x="285.13638"
y="483.44598"
id="PFDInstrumentsWindData-NODATA"
inkscape:label="WindData-NODATA"
sodipodi:linespacing="125%"><tspan
inkscape:label="WindData-NODATA"><tspan
sodipodi:role="line"
id="tspan6137"
x="285.13638"
@ -7376,8 +7362,7 @@
x="755.6665"
y="475.64999"
id="PFDInstrumentsBARO-text"
inkscape:label="BARO-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="BARO-text"><tspan
sodipodi:role="line"
id="tspan5399"
x="755.6665"
@ -7418,8 +7403,7 @@
y="737.25531"
x="4.242641"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:100%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="100%"><tspan
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:100%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff"
y="737.25531"
x="4.242641"
@ -7431,8 +7415,7 @@
x="96.332848"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.33374977px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
inkscape:label="OAT-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="OAT-text"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.33374977px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;writing-mode:lr-tb;text-anchor:end;fill:#ffffff"
y="738.1048"
x="96.332848"
@ -7458,8 +7441,7 @@
y="471.6181"
x="70.5"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="125%"><tspan
xml:space="preserve"><tspan
style="fill:#ffffff"
y="471.6181"
x="70.5"
@ -7471,8 +7453,7 @@
y="474.04486"
x="92.749992"
style="font-style:normal;font-weight:normal;font-size:18.66666603px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="125%"><tspan
xml:space="preserve"><tspan
style="text-align:start;text-anchor:start;fill:#ffffff"
y="474.04486"
x="92.749992"
@ -7498,8 +7479,7 @@
y="471.6181"
x="156.5"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="125%"><tspan
xml:space="preserve"><tspan
style="fill:#ffffff"
y="471.6181"
x="156.5"
@ -7511,8 +7491,7 @@
x="179.75"
style="font-style:normal;font-weight:normal;font-size:18.66666603px;line-height:125%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
inkscape:label="TAS-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="TAS-text"><tspan
style="text-align:start;text-anchor:start;fill:#ffffff"
y="474.04486"
x="179.75"
@ -7536,8 +7515,7 @@
y="444.86816"
x="564.85876"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="125%"><tspan
xml:space="preserve"><tspan
style="fill:#ffffff"
y="444.86816"
x="564.85876"
@ -7549,8 +7527,7 @@
x="644.60211"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33374977px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
inkscape:label="SelectedCRS-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="SelectedCRS-text"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33374977px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;writing-mode:lr-tb;text-anchor:end;fill:#ff00ff;fill-opacity:1"
y="448.26562"
x="644.60211"
@ -7574,8 +7551,7 @@
y="444.86816"
x="277"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="125%"><tspan
xml:space="preserve"><tspan
style="fill:#ffffff"
y="444.86816"
x="277"
@ -7587,8 +7563,7 @@
x="358.6001"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33374977px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#00ffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
inkscape:label="SelectedHDG-text"
sodipodi:linespacing="125%"><tspan
inkscape:label="SelectedHDG-text"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.33374977px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:end;writing-mode:lr-tb;text-anchor:end;fill:#00ffff;fill-opacity:1"
y="448.26562"
x="358.6001"
@ -7620,8 +7595,7 @@
y="106.73632"
x="725.75"
style="font-style:normal;font-weight:normal;font-size:24px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="125%"><tspan
xml:space="preserve"><tspan
style="fill:#ffffff"
y="106.73632"
x="725.75"
@ -7634,6 +7608,41 @@
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc"
inkscape:label="SelectedALT-symbol" />
<path
style="fill:#00ffff;stroke:none;stroke-width:1.00699997;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 239.50495,273.07678 -13.50494,0.0625 -1e-5,4.92322 9.00001,6.4375 -9.00001,6.5625 1e-5,4.12239 13.50494,-0.0625 z"
id="PFDInstrumentsSelectedSPD-bug"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc"
inkscape:label="SelectedALT-bug" />
<rect
style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1.08987784;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="PFDInstrumentsSelectedSPD-bg"
width="86.139915"
height="21.767265"
x="153.36008"
y="91.687782"
inkscape:label="SelectedALT-bg" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="166.88083"
y="117.39941"
id="PFDInstrumentsSelectedSPD-text"
inkscape:label="SelectedALT-text"
transform="scale(1.0797965,0.92610045)"><tspan
sodipodi:role="line"
id="tspan2109"
x="166.88083"
y="117.39941"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;stroke-width:1px">99999</tspan></text>
<path
inkscape:label="SelectedALT-symbol"
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
id="PFDInstrumentsSelectedSPD-symbol"
d="m 157.11026,94.787023 11.08867,0.04401 1e-5,3.466989 -7.38975,4.533368 7.38975,4.62139 -1e-5,2.90303 -11.08867,-0.044 z"
style="display:inline;fill:#00ffff;stroke:none;stroke-width:1.00699997;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
<g

Before

Width:  |  Height:  |  Size: 469 KiB

After

Width:  |  Height:  |  Size: 471 KiB

View file

@ -33,6 +33,7 @@ new : func ()
obj.addPropMap("AutopilotAltitudeModeArmed", "/autopilot/annunciator/vertical-mode-armed");
obj.addPropMap("AutopilotTargetPitch", "/autopilot/settings/target-pitch-deg");
obj.addPropMap("AutopilotTargetRoll", "/autopilot/settings/target-roll-deg");
obj.addPropMap("AutopilotTargetSpeed", "/autopilot/settings/target-speed-kt");
obj.addPropMap("AutopilotTargetVertical", "/autopilot/annunciator/vertical-mode-target");
return obj;

View file

@ -72,9 +72,10 @@ var GenericNavComPublisher =
obj._periodicPublisher.addPropMap("Nav1CrosstrackErrorM", "/instrumentation/nav/crosstrack-error-m");
obj._periodicPublisher.addPropMap("Nav1Localizer", "/instrumentation/nav/nav-loc");
obj._periodicPublisher.addPropMap("Nav1Deflection", "/instrumentation/nav/heading-needle-deflection-norm");
obj._periodicPublisher.addPropMap("Nav1GSDeflection", "/instrumentation/nav/gs-needle-deflection-norm");
obj._periodicPublisher.addPropMap("Nav1GSInRange", "/instrumentation/nav/gs-in-range");
obj._periodicPublisher.addPropMap("Nav1From", "/instrumentation/nav/from-flag");
obj._triggeredPublisher.addPropMap("Nav1Volume", "/instrumentation/nav/nav-volume");
obj._triggeredPublisher.addPropMap("Nav1AudioID", "/instrumentation/nav/audio-btn");
obj._triggeredPublisher.addPropMap("Nav1Serviceable", "/instrumentation/nav/operable");
@ -90,6 +91,8 @@ var GenericNavComPublisher =
obj._periodicPublisher.addPropMap("Nav2CrosstrackErrorM", "/instrumentation/nav[1]/crosstrack-error-m");
obj._periodicPublisher.addPropMap("Nav2Localizer", "/instrumentation/nav[1]/nav-loc");
obj._periodicPublisher.addPropMap("Nav2Deflection", "/instrumentation/nav[1]/heading-needle-deflection-norm");
obj._periodicPublisher.addPropMap("Nav2GSDeflection", "/instrumentation/nav[1]/gs-needle-deflection-norm");
obj._periodicPublisher.addPropMap("Nav2GSInRange", "/instrumentation/nav[1]/gs-in-range");
obj._periodicPublisher.addPropMap("Nav2From", "/instrumentation/nav/from-flag");
obj._triggeredPublisher.addPropMap("Nav2Volume", "/instrumentation/nav[1]/nav-volume");
@ -103,6 +106,10 @@ var GenericNavComPublisher =
obj._triggeredPublisher.addPropMap("ADFVolume", "/instrumentation/adf/volume-norm");
obj._triggeredPublisher.addPropMap("ADFServiceable", "/instrumentation/adf/operable");
obj._triggeredPublisher.addPropMap("MarkerBeaconInner", "/instrumentation/marker-beacon/inner");
obj._triggeredPublisher.addPropMap("MarkerBeaconMiddle", "/instrumentation/marker-beacon/middle");
obj._triggeredPublisher.addPropMap("MarkerBeaconOuter", "/instrumentation/marker-beacon/outer");
obj._triggeredPublisher.addPropMap("NavSelected", "/instrumentation/nav-selected");
obj._triggeredPublisher.addPropMap("TransponderMode", "/instrumentation/transponder/inputs/knob-mode");

View file

@ -90,15 +90,15 @@ getElement : func(e) {
return me._elements[e];
},
addTextElements : func(symbols) {
addTextElements : func(symbols, style=nil) {
foreach (var s; symbols) {
me._textElements[s] = PFD.TextElement.new(me.pageName, me._SVGGroup, s);
me._textElements[s] = PFD.TextElement.new(me.pageName, me._SVGGroup, s, style);
}
},
addTextElement : func(e) {
addTextElement : func(e, style=nil) {
if (me._textElements[e] == nil) {
me._textElements[e] = PFD.TextElement.new(me.pageName, me._SVGGroup, e);
me._textElements[e] = PFD.TextElement.new(me.pageName, me._SVGGroup, e, style);
} else {
die("addTextElement element already exists: "~ me.pageName ~ e);
}

View file

@ -45,6 +45,8 @@ var PFDInstruments =
_Multiline : 0,
_annunciation : 0,
_fd_enabled : 1, # Mark the Flight Director as enabled, as it is visible in the SVG.
_selected_spd : 0,
_selected_spd_visible : 0,
};
# Hide various elements for the moment. TODO - implement
@ -61,9 +63,12 @@ var PFDInstruments =
"HDG-text",
"SelectedHDG-text",
"SelectedALT-text",
"SelectedSPD-text",
"XPDR-DIGIT-3-text", "XPDR-DIGIT-2-text", "XPDR-DIGIT-1-text", "XPDR-DIGIT-0-text",
"XPDR-MODE-text",
"TIME-text",
"GS-type",
"MarkerText",
]);
# Set clipping for the various tapes
@ -383,6 +388,14 @@ var PFDInstruments =
me.getElement("IAS-" ~ v).hide();
}
}
if ((me._selected_spd_visible) and ((me._selected_spd - ias) < 30)) {
me.getElement("SelectedSPD-bug")
.setTranslation(0, (ias - me._selected_spd) * 5.711)
.show();
} else {
me.getElement("SelectedSPD-bug").hide();
}
},
updateVSI: func (vsi) {
@ -395,6 +408,11 @@ var PFDInstruments =
#me.getElement("GSPD-text").setText(sprintf("%iKT", tas));
},
updateGS : func (deflection_norm, type) {
me.getElement("GS-ILS").setTranslation(0, - deflection_norm * 100);
me.setTextElement("GS-type", type);
},
updateALT: func (alt, alt_trend, selected_alt) {
if (alt < 0) {
me.setTextElement("Alt11100", sprintf("-% 3i",abs(math.ceil(alt/100))));
@ -563,6 +581,26 @@ var PFDInstruments =
me.setTextElement("SelectedALT-text", sprintf("%i", selected_alt));
},
setSelectedSPDVisible : func(visible) {
me._selected_spd_visible = visible;
if (visible) {
me.getElement("SelectedSPD-text").show();
me.getElement("SelectedSPD-bg").show();
me.getElement("SelectedSPD-bug").show();
me.getElement("SelectedSPD-symbol").show();
} else {
me.getElement("SelectedSPD-text").hide();
me.getElement("SelectedSPD-bg").hide();
me.getElement("SelectedSPD-bug").hide();
me.getElement("SelectedSPD-symbol").hide();
}
},
updateSelectedSPD : func (selected_spd) {
me._selected_spd = selected_spd;
me.setTextElement("SelectedSPD-text", sprintf("%ikt", me._selected_spd));
},
setBRG1 : func(option) { me._setBRG("BRG1",option); },
setBRG2 : func(option) { me._setBRG("BRG2",option); },
@ -780,7 +818,7 @@ var PFDInstruments =
me.getElement("OMI").hide();
} else {
me.getElement("OMI").show();
me.getElement("MarkerText").setText(omi);
me.setTextElement("MarkerText", omi);
}
me._OMI = omi;
},

View file

@ -72,6 +72,9 @@ var PFDInstrumentsController =
_nav1_distance_m : 0,
_nav1_deviation_deg : 0,
_nav1_loc : 0,
_nav1_deflection : 0,
_nav1_gs_deflection : 0,
_nav1_gs_in_range : 0,
_nav2_id : "",
_nav2_freq : 0.0,
@ -84,6 +87,9 @@ var PFDInstrumentsController =
_nav2_distance_m : 0,
_nav2_deviation_deg : 0,
_nav2_loc : 0,
_nav2_deflection : 0,
_nav2_gs_deflection : 0,
_nav2_gs_in_range : 0,
_adf_freq : 0.0,
_adf_in_range : 0,
@ -93,7 +99,11 @@ var PFDInstrumentsController =
_transponder_code : "1200", # Current code
_transponder_ident : 0,
_transponder_edit : 0, # If we're currently editing the transponder code
_transponder_edit_code : 0 # Current value being edited as transponder code
_transponder_edit_code : 0, # Current value being edited as transponder code
_marker_beacon_outer : 0,
_marker_beacon_middle : 0,
_marker_beacon_inner : 0,
};
obj._current_flightplan = obj.getNavData("Flightplan");
@ -303,6 +313,13 @@ var PFDInstrumentsController =
if (data["AutopilotTargetPitch"] != nil) me._fd_pitch = data["AutopilotTargetPitch"];
if (data["AutopilotTargetRoll"] != nil) me._fd_roll = data["AutopilotTargetRoll"];
if (data["AutopilotTargetSpeed"] != nil) {
me._fd_spd = data["AutopilotTargetSpeed"];
me.page.updateSelectedSPD(me._fd_spd);
}
if (data["AutopilotAltitudeMode"] != nil) me.page.setSelectedSPDVisible(data["AutopilotAltitudeMode"] == "FLC");
var update_fp = 0;
if (data["FMSFlightPlanEdited"] != nil) {
@ -383,8 +400,10 @@ var PFDInstrumentsController =
if (data["Nav1DistanceMeters"] != nil) me._nav1_distance_m = data["Nav1DistanceMeters"];
if (data["Nav1CourseDeviationDeg"] != nil) me._nav1_deviation_deg = data["Nav1CourseDeviationDeg"];
# Deflection range is [-10,10], while deflection_dots is [-2.4, 2.4];
# Deflection range is [-1,1], while deflection_dots is [-2.4, 2.4];
if (data["Nav1Deflection"] != nil) me._nav1_deflection = data["Nav1Deflection"] * 2.4;
if (data["Nav1GSDeflection"] != nil) me._nav1_gs_deflection = data["Nav1GSDeflection"];
if (data["Nav1GSInRange"] != nil) me._nav1_gs_in_range = data["Nav1GSInRange"];
if (data["Nav1CrosstrackErrorM"] != nil) me._nav1_crosstrack_m = data["Nav1CrosstrackErrorM"];
if (data["Nav1From"] != nil) me._nav1_from = data["Nav1From"];
if (data["Nav1Localizer"] != nil) me._nav1_loc = data["Nav1Localizer"];
@ -399,6 +418,8 @@ var PFDInstrumentsController =
# Deflection range is [-1,1], while deflection_dots is [-2.4, 2.4];
if (data["Nav2Deflection"] != nil) me._nav2_deflection = data["Nav2Deflection"] * 2.4;
if (data["Nav2GSDeflection"] != nil) me._nav2_gs_deflection = data["Nav2GSDeflection"];
if (data["Nav2GSInRange"] != nil) me._nav2_gs_in_range = data["Nav2GSInRange"];
if (data["Nav2CrosstrackErrorM"] != nil) me._nav2_crosstrack_m = data["Nav2CrosstrackErrorM"];
if (data["Nav2From"] != nil) me._nav2_from = data["Nav2From"];
if (data["Nav2Localizer"] != nil) me._nav2_loc = data["Nav2Localizer"];
@ -411,6 +432,10 @@ var PFDInstrumentsController =
if (data["TransponderCode"] != nil) me._transponder_code = data["TransponderCode"];
if (data["TransponderIdent"] != nil) me._transponder_ident = data["TransponderIdent"];
if (data["MarkerBeaconInner"] != nil) me._marker_beacon_inner = data["MarkerBeaconInner"];
if (data["MarkerBeaconMiddle"] != nil) me._marker_beacon_middle = data["MarkerBeaconMiddle"];
if (data["MarkerBeaconOuter"] != nil) me._marker_beacon_outer = data["MarkerBeaconOuter"];
if (me.getBRG1() == "NAV1") me.page.updateBRG1(me._nav1_in_range, me._nav1_id, me._nav1_distance_m * M2NM, me._heading_magnetic_deg, me._nav1_heading_deg);
if (me.getBRG1() == "NAV2") me.page.updateBRG1(me._nav2_in_range, me._nav2_id, me._nav2_distance_m * M2NM, me._heading_magnetic_deg, me._nav2_heading_deg);
if (me.getBRG1() == "ADF") me.page.updateBRG1(me._adf_in_range, sprintf("%.1f", me._adf_freq), 0, me._heading_magnetic_deg, me._adf_heading_deg);
@ -432,6 +457,12 @@ var PFDInstrumentsController =
annun: "",
loc : me._nav1_loc,
);
if (me._nav1_gs_in_range) {
me.page.updateGS(me._nav1_gs_deflection, "G");
} else {
me.page.updateGS(0, "");
}
}
if (me.getCDISource() == "NAV2") {
@ -447,6 +478,22 @@ var PFDInstrumentsController =
annun: "",
loc : me._nav2_loc,
);
if (me._nav2_gs_in_range) {
me.page.updateGS(me._nav2_gs_deflection, "G");
} else {
me.page.updateGS(0, "");
}
}
# Special case - if the GPS is being used as the CDI source, then it'll be slaved to Nav1
# and we should used the Nav1 Glideslope to show GPS-controlled glideslope.
if (me.getCDISource() == "GPS") {
if (me._nav1_gs_in_range) {
me.page.updateGS(me._nav1_gs_deflection, "G");
} else {
me.page.updateGS(0, "");
}
}
if ((me._transponder_edit == 0) and
@ -456,6 +503,16 @@ var PFDInstrumentsController =
me.page.updateTransponder(me._transponder_mode, me._transponder_code, me._transponder_ident);
}
if (me._marker_beacon_outer == 1) {
me.page.setOMI("O");
} else if (me._marker_beacon_middle == 1) {
me.page.setOMI("M");
} else if (me._marker_beacon_inner == 1) {
me.page.setOMI("I");
} else {
me.page.setOMI("");
}
return emesary.Transmitter.ReceiptStatus_OK;
},

View file

@ -85,6 +85,16 @@ var AP_STATUS_STYLE = {
NORMAL_TEXT_COLOR : "#00ff00",
};
# Style element for use by the flight director modes and armed indicators.
# This is normally green text on a black background, but when highlighted is
# black text on a green background
var FD_STATUS_STYLE = {
CURSOR_BLINK_PERIOD : 0.5,
HIGHLIGHT_COLOR : "#00ff00",
HIGHLIGHT_TEXT_COLOR : "#000000",
NORMAL_TEXT_COLOR : "#00ff00",
};
var Surround =
{
new : func (mfd, myCanvas, device, svg, pfd=0)
@ -108,11 +118,11 @@ var Surround =
if (pfd) {
obj.addTextElements(["HeaderFrom", "HeaderTo", "LegDistance", "LegBRG"]);
obj.addTextElements(["HeaderAPLateralArmed", "HeaderAPLateralActive", "HeaderAPVerticalArmed", "HeaderAPVerticalActive", "HeaderAPVerticalReference"]);
obj.addTextElements(["HeaderAPLateralArmed", "HeaderAPLateralActive", "HeaderAPVerticalArmed", "HeaderAPVerticalActive", "HeaderAPVerticalReference"], FD_STATUS_STYLE);
obj._apStatus = PFD.TextElement.new(obj.pageName, svg, "HeaderAPStatus", "", AP_STATUS_STYLE);
obj._apStatusTimer = nil;
obj._apHeadingModeTimer = nil;
obj._apAltitudeModeTimer = nil;
obj._apLateralStatusTimer = nil;
obj._apVerticalStatusTimer = nil;
obj._dto = PFD.HighlightElement.new(obj.pageName, svg, "HeaderDTO", "DTO");
obj._leg = PFD.HighlightElement.new(obj.pageName, svg, "HeaderActiveLeg", "Leg");
} else {
@ -270,11 +280,32 @@ var Surround =
}
}
if (data["AutopilotHeadingMode"] != nil) me.setTextElement("HeaderAPLateralActive", data["AutopilotHeadingMode"]);
# When the Autopilot Heading or Altitude modes change we flash the appropriate annunicator for 10 seconds.
if ((data["AutopilotHeadingMode"] != nil) and
(data["AutopilotHeadingMode"] != me.getTextValue("HeaderAPLateralActive"))) {
me.setTextElement("HeaderAPLateralActive", data["AutopilotHeadingMode"]);
# This code crashes FG at present. No idea why - perhaps reference to "me" in maketimer?
#me.highlightTextElement("HeaderAPLateralActive");
#if (me._apLateralStatusTimer == nil) me._apLateralStatusTimer = maketimer(10.0, me, me._stopLateralStatusFlashing);
#me._apLateralStatusTimer.singleShot = 1;
#me._apLateralStatusTimer.restart(10.0);
}
# When the Autopilot Heading or Altitude modes change we flash the appropriate annunicator for 10 seconds.
if ((data["AutopilotAltitudeMode"] != nil) and
(data["AutopilotAltitudeMode"] != me.getTextValue("HeaderAPVerticalActive"))) {
me.setTextElement("HeaderAPVerticalActive", data["AutopilotAltitudeMode"]);
# This code crashes FG at present. No idea why - perhaps reference to "me" in maketimer?
#me.highlightTextElement("HeaderAPVerticalActive");
#if (me._apVerticalStatusTimer == nil) me._apVerticalStatusTimer = maketimer(10.0, me, me._stopVerticalStatusFlashing);
#me._apVerticalStatusTimer.singleShot = 1;
#me._apVerticalStatusTimer.restart(10.0);
}
if (data["AutopilotHeadingModeArmed"] != nil) me.setTextElement("HeaderAPLateralArmed", data["AutopilotHeadingModeArmed"]);
if (data["AutopilotAltitudeMode"] != nil) me.setTextElement("HeaderAPVerticalActive", data["AutopilotAltitudeMode"]);
if (data["AutopilotAltitudeModeArmed"] != nil) me.setTextElement("HeaderAPVerticalArmed", data["AutopilotAltitudeModeArmed"]);
# When the Autopilot is disengaged, the AP status element flashes for 5 seconds before disappearing
if (data["AutopilotEnabled"] != nil) {
if (data["AutopilotEnabled"] == 1) {
me._apStatus.setValue("AP");
@ -289,11 +320,13 @@ var Surround =
# We were previously enabled, so we want to make the AP Status element
# flash for 5 seconds before removing it. The highlightElement()
# starts it flashing, and we use a timer to stop it.
me._apStatus.highlightElement();
if (me._apStatusTimer == nil) me._apStatusTimer =
maketimer(5.0, me, func() { me._apStatus.unhighlightElement(); me._apStatus.setValue(""); } );
me._apStatusTimer.singleShot = 1;
me._apStatusTimer.restart(5.0);
# This code crashes FG at present. No idea why - perhaps reference to "me" in maketimer?
#me._apStatus.highlightElement();
#if (me._apStatusTimer == nil) me._apStatusTimer = maketimer(5.0, me, me._stopAPStatusFlashing);
#me._apStatusTimer.singleShot = 1;
#me._apStatusTimer.restart(5.0);
me._apStatus.setValue("");
}
}
}
@ -337,6 +370,22 @@ var Surround =
}
},
_stopLateralStatusFlashing : func()
{
me.unhighlightTextElement("HeaderAPLateralActive");
},
_stopVerticalStatusFlashing : func()
{
me.unhighlightTextElement("HeaderAPVerticalActive");
},
_stopAPStatusFlashing : func()
{
me._apStatus.unhighlightElement();
me._apStatus.setValue("");
},
getCurrentPage : func()
{
var currentpage = PAGE_GROUPS[me._selectedPageGroup].pages[me._selectedPage];