1
0
Fork 0

Add power and ADIRS to DDRMI, fix decimal point when > 20 nautical miles

This commit is contained in:
legoboyvdlp R 2020-04-18 13:16:47 +01:00 committed by Jonathan Redpath
parent 762a832bb9
commit d7579a9df8
4 changed files with 98 additions and 100 deletions

View file

@ -1107,6 +1107,9 @@
</static>
<navigation>
<aligned-1 type="bool">0</aligned-1>
<aligned-2 type="bool">0</aligned-2>
<aligned-3 type="bool">0</aligned-3>
<adr>
<operating-1 type="bool">0</operating-1>
<operating-2 type="bool">0</operating-2>

View file

@ -7506,9 +7506,18 @@
<property>instrumentation/dme[2]/indicated-distance-nm</property>
<value>20</value>
</less-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-1</property>
<value>1</value>
</equals>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>dme20</object-name>
@ -7520,9 +7529,18 @@
<property>instrumentation/dme[2]/indicated-distance-nm</property>
<value>20</value>
</greater-than>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-1</property>
<value>1</value>
</equals>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>dme1</object-name>
@ -7534,9 +7552,18 @@
<property>instrumentation/dme[3]/indicated-distance-nm</property>
<value>20</value>
</less-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-2</property>
<value>1</value>
</equals>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>dme120</object-name>
@ -7548,6 +7575,14 @@
<property>instrumentation/dme[3]/indicated-distance-nm</property>
<value>20</value>
</greater-than>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-2</property>
<value>1</value>
</equals>
</and>
</condition>
</animation>
@ -7594,7 +7629,7 @@
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">number-value</type>
<format type="string">%4.0f.</format>
<format type="string">%4.0f</format>
<property>instrumentation/dme[2]/indicated-distance-nm</property>
<truncate>false</truncate>
<layout>left-to-right</layout>
@ -7654,7 +7689,7 @@
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">number-value</type>
<format type="string">%4.0f.</format>
<format type="string">%4.0f</format>
<property>instrumentation/dme[3]/indicated-distance-nm</property>
<truncate>false</truncate>
<layout>left-to-right</layout>

View file

@ -35,6 +35,7 @@ var ADIRU = {
var adiru = { parents:[ADIRU] };
adiru.num = n;
adiru.alignTimer = maketimer(0.1, adiru, me.alignLoop);
return adiru;
},
setOperative: func(newOperative) {
@ -90,7 +91,6 @@ var ADIRU = {
if (!ADIRSnew.skip.getValue()) {
if (time > 0 and me.aligned == 0 and me.inAlign == 0 and me.operative == 1) {
me._alignTime = pts.Sim.Time.elapsedSec.getValue() + time;
print("Alignment Started");
me.inAlign = 1;
if (me.alignTimer != nil) {
me.alignTimer.start();
@ -99,7 +99,6 @@ var ADIRU = {
} else {
if (me.aligned == 0 and me.inAlign == 0 and me.operative == 1) {
me._alignTime = pts.Sim.Time.elapsedSec.getValue() + 5;
print("Fast Alignment Started");
me.inAlign = 1;
if (me.alignTimer != nil) {
me.alignTimer.start();
@ -111,14 +110,15 @@ var ADIRU = {
print("Stopping alignment or setting unaligned state");
me.inAlign = 0;
me.aligned = 0;
setprop("systems/navigation/aligned-" ~ me.num + 1, false);
if (me.alignTimer != nil) {
me.alignTimer.stop();
}
},
stopAlignAligned: func() {
print("Aligned");
me.inAlign = 0;
me.aligned = 1;
setprop("systems/navigation/aligned-" ~ me.num + 1, true);
if (me.alignTimer != nil) {
me.alignTimer.stop();
}

View file

@ -955,20 +955,16 @@
<gain>1.0</gain>
<enable>
<condition>
<or>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/dc-bat</property>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
<equals>
<property>/systems/navigation/aligned-1</property>
<value>1</value>
</equals> <!-- TODO ATT HDG SWITCH -->
</and>
</condition>
</enable>
<input>/orientation/heading-magnetic-deg</input>
@ -1001,20 +997,10 @@
<input>
<condition>
<and>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-1</property>
<value>1</value>
@ -1023,6 +1009,10 @@
<property>/instrumentation/nav[2]/in-range</property>
<value>1</value>
</equals>
<equals>
<property>/systems/navigation/aligned-1</property>
<value>1</value>
</equals>
</and>
</condition>
<property>/instrumentation/ddrmi/vor-1-error</property>
@ -1031,20 +1021,10 @@
<input>
<condition>
<and>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-1</property>
<value>-1</value>
@ -1053,6 +1033,10 @@
<property>/instrumentation/adf[0]/in-range</property>
<value>1</value>
</equals>
<equals>
<property>/systems/navigation/aligned-1</property>
<value>1</value>
</equals>
</and>
</condition>
<property>/instrumentation/adf[0]/indicated-bearing-deg</property>
@ -1088,20 +1072,10 @@
<input>
<condition>
<and>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-2</property>
<value>1</value>
@ -1110,6 +1084,10 @@
<property>/instrumentation/nav[3]/in-range</property>
<value>1</value>
</equals>
<equals>
<property>/systems/navigation/aligned-1</property>
<value>1</value>
</equals>
</and>
</condition>
<property>/instrumentation/ddrmi/vor-2-error</property>
@ -1118,20 +1096,10 @@
<input>
<condition>
<and>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/instrumentation/ddrmi/vor-adf-2</property>
<value>-1</value>
@ -1140,6 +1108,10 @@
<property>/instrumentation/adf[1]/in-range</property>
<value>1</value>
</equals>
<equals>
<property>/systems/navigation/aligned-1</property>
<value>1</value>
</equals>
</and>
</condition>
<property>/instrumentation/adf[1]/indicated-bearing-deg</property>
@ -1156,20 +1128,14 @@
<input>
<condition>
<and>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/systems/navigation/aligned-1</property>
<value>1</value>
</equals>
<or>
<and>
<equals>
@ -1208,20 +1174,14 @@
<input>
<condition>
<and>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>/systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>/systems/navigation/aligned-1</property>
<value>1</value>
</equals>
<or>
<and>
<equals>