Showing 15 changed files with 6 additions and 1122 deletions
Systems/EIS/single-prop.svg → Models/EIS/single-prop.svg
File renamed without changes.
Systems/PFD.svg → Models/PFD.svg
File renamed without changes.
Systems/header-nav-comm.svg → Models/header-nav-comm.svg
File renamed without changes.
Systems/softkeys.svg → Models/softkeys.svg
File renamed without changes.
Systems/tcas.svg → Models/tcas.svg
File renamed without changes.
+1 -1
Nasal/EIS/single-prop.nas
... ...
@@ -2,7 +2,7 @@
2 2
 # power % is throttle %
3 3
 # assumes that there are two tanks with equals quantity...
4 4
 displayClass.showEIS = func (groups) {
5
-    canvas.parsesvg(me.screen, data.zkv1000_reldir ~ 'Systems/EIS/single-prop.svg');
5
+    canvas.parsesvg(me.screen, data.zkv1000_reldir ~ 'Models/EIS/single-prop.svg');
6 6
     append(groups.show, 'EIS', 'POWER-pointer', 'FUEL-RIGHT-pointer', 'FUEL-LEFT-pointer');
7 7
     append(groups.text,
8 8
             'RPM-text', 'EGT-text', 'CHT-text', 'FUEL-USED-text',
-247
Nasal/afcs.nas
... ...
@@ -1,247 +0,0 @@
1
-var pitModes = {
2
-    'PIT': 'pitch-hold',
3
-    'ALT': 'altitude-hold',
4
-    'VS': 'vertical-speed-hold',
5
-    'FLC': 'flight-level-change',
6
-    'GS': 'gs1-hold',
7
-    'GP': '',
8
-    'VPTH': 'vertical-path',
9
-    'GA': 'go-around'
10
-};
11
-var pitMode = '';
12
-
13
-var rollModes = {
14
-    'ROL': 'wing-leveler',
15
-    'HDG': 'dg-heading-hold',
16
-    'GA': 'go-around',
17
-    'GPS': '',
18
-    'VOR': 'nav1-hold',
19
-    'LOC': '',
20
-    'VAPP': '',
21
-};
22
-var rollMode = '';
23
-
24
-var AFCS = {
25
-    nose_inc : 0,
26
-    nose_node : '',
27
-    nose_max : 0,
28
-    nose_min : 0,
29
-    AP  : func { 
30
-              getprop('/instrumentation/zkv1000/status') or return;
31
-              if (getPitchMode() == '') setPitchMode('PIT');
32
-              setprop('/autopilot/locks/passive-mode', getprop('/autopilot/locks/passive-mode')? 0 : 1);
33
-          },
34
-    FD : func { 
35
-             getprop('/instrumentation/zkv1000/status') or return;
36
-             setPitchMode(getPitchMode() == '' ? 'PIT' : '');
37
-         },
38
-    ROL : func {
39
-              setRollMode('ROL');
40
-              settings.getNode('heading-bug-deg').unalias();
41
-              afcs.getNode('roll-armed').setBoolValue(0);
42
-              setprop('/autopilot/internal/target-roll-deg', 0);
43
-          },
44
-    HDG : func { 
45
-              settings.getNode('heading-bug-deg').alias(afcs.getNode('heading-bug-deg')); 
46
-          },
47
-    NAV : func { 
48
-              settings.getNode('heading-bug-deg').unalias();
49
-              afcs.getNode('roll-armed').setBoolValue(0);
50
-              checkRollAcquisition = checkNavAcquisition;
51
-          },
52
-    PIT : func { 
53
-              AFCS.nose_inc = 0.5;
54
-              AFCS.nose_node = '/autopilot/internal/target-pitch-deg';
55
-              AFCS.nose_min = -15;
56
-              AFCS.nose_max = 20;
57
-              setprop(AFCS.nose_node, round(pitch));
58
-          },
59
-    VS  : func { 
60
-              AFCS.nose_node = '/autopilot/settings/vertical-speed-fpm';
61
-              AFCS.nose_inc = 100;
62
-              AFCS.nose_min = -3000;
63
-              AFCS.nose_max = 1500;
64
-              setprop(AFCS.nose_node, round(vs, AFCS.nose_inc));
65
-              setprop('/autopilot/settings/target-altitude-ft', getprop(afcs.getNode('selected-alt-ft').getPath()));
66
-              checkPitchAcquisition = checkSelectedAltAcquisition;
67
-          },
68
-    ALT : func { 
69
-              setprop('/autopilot/settings/target-altitude-ft', getprop(afcs.getNode('selected-alt-ft').getPath()));
70
-              checkPitchAcquisition = checkSelectedAltAcquisition;
71
-          },
72
-    FLC : func { 
73
-              AFCS.nose_node = '/autopilot/settings/target-speed-kt';
74
-              AFCS.nose_inc = 1;
75
-              AFCS.nose_min = 70;
76
-              AFCS.nose_max = 165;
77
-              computeAirspeedDiff = _computeAirspeedDiff;
78
-              checkPitchAcquisition = checkSelectedAltAcquisition;
79
-              setprop(AFCS.nose_node, round(ias, AFCS.nose_inc));
80
-              setprop('/autopilot/settings/target-altitude-ft', getprop(afcs.getNode('selected-alt-ft').getPath()));
81
-              FLCcomputation = _FLCcomputation;
82
-          },
83
-    NOSEUP : func { 
84
-                 AFCS.nose_inc or return;
85
-                 var s = getprop(AFCS.nose_node) + AFCS.nose_inc;
86
-                 s <= AFCS.nose_max or return;
87
-                 setprop(AFCS.nose_node, getprop(AFCS.nose_node) + AFCS.nose_inc);
88
-             },
89
-    NOSEDOWN : func { 
90
-                   AFCS.nose_inc or return;
91
-                   var s = getprop(AFCS.nose_node) - AFCS.nose_inc;
92
-                   s >= AFCS.nose_min or return;
93
-                   setprop(AFCS.nose_node, getprop(AFCS.nose_node) - AFCS.nose_inc);
94
-               },
95
-    VNV : func { 
96
-              nyi('VNV');
97
-          },
98
-    APR : func {
99
-              nyi('APR');
100
-          },
101
-    APDISC : void,
102
-    CWS : void,
103
-    GA : void
104
-};
105
-
106
-var checkNavAcquisition = func {
107
-    var r = getprop('/instrumentation/zkv1000/cdi/radial');
108
-    var h = getprop('/orientation/heading-deg');
109
-    var d = getprop('/instrumentation/zkv1000/cdi/course-deflection');
110
-    if (d < 0.5) {
111
-        rollBlinking.switch(0);
112
-        setprop('/instrumentation/zkv1000/afcs/roll-armed-mode', 0);
113
-    }
114
-    elsif (d > 1) {
115
-        rollBlinking.switch(0);
116
-        setprop('/instrumentation/zkv1000/afcs/roll-armed-mode', pitMode);
117
-    }
118
-    else {
119
-        getprop('/instrumentation/zkv1000/afcs/roll-armed') or rollBlinking.switch(1);
120
-        setprop('/instrumentation/zkv1000/afcs/roll-armed-mode', rollMode);
121
-    }
122
-}
123
-
124
-var checkSelectedAltAcquisition = func {
125
-    var s = getprop('/autopilot/settings/target-altitude-ft');
126
-    var diff = abs(alt - s);
127
-    var climb = (alt - s > 0);
128
-    if (diff < 50) {
129
-        pitchBlinking.switch(0);
130
-        setPitchMode('ALT');
131
-    }
132
-    elsif (diff > 400) {
133
-        setprop('/instrumentation/zkv1000/vertical-speed-fpm', (climb and !getPitchMode('VS'))? 1000 : -500);
134
-        if (!getPitchMode('FLC')) setPitchMode('VS', 0);
135
-        pitchBlinking.switch(0);
136
-    }
137
-    else {
138
-        setprop('/instrumentation/zkv1000/vertical-speed-fpm', climb? 100 : -100);
139
-        setPitchMode('VS');
140
-        getprop('/instrumentation/zkv1000/afcs/pitch-armed') or pitchBlinking.switch(1);
141
-    }
142
-}
143
-
144
-# Note: use SetPitchMode('') to exit the Flight Director mode
145
-var setPitchMode = func (m, s=1) {
146
-    checkPitchAcquisition = void;
147
-    FLCcomputation = void;
148
-    computeAirspeedDiff = void;
149
-    AFCS.nose_inc = 0;
150
-    if (pitMode == m and s) pitMode = 'PIT';
151
-    else pitMode = m;
152
-    setprop('/autopilot/locks/pitch', pitMode != '' ? pitModes[pitMode] : pitMode);
153
-    setprop('/instrumentation/zkv1000/afcs/pit-active-mode', pitMode);
154
-    setprop('/instrumentation/zkv1000/afcs/pit-armed-mode', pitMode);
155
-    setprop('/instrumentation/zkv1000/afcs/pit-armed-mode-text', pitMode);
156
-    setprop('/instrumentation/zkv1000/afcs/pit-active-mode-text', pitMode);
157
-    setprop('/instrumentation/zkv1000/afcs/pit-active-mode-blink', 0);
158
-    if (pitMode != '') {
159
-        computeAltitudeDiff = _computeAltitudeDiff;
160
-        setprop('/instrumentation/zkv1000/afcs/alt-bug-visible', 1);
161
-        if (getRollMode() == '') setRollMode('ROL');
162
-    }
163
-    else {
164
-        setprop('/instrumentation/zkv1000/afcs/alt-bug-visible', 0);
165
-        rollBlinking.switch(0);
166
-        computeAltitudeDiff = void;
167
-        computeAirspeedDiff = void;
168
-        setRollMode('', 0);
169
-    }
170
-    init_main_loop();
171
-}
172
-
173
-var setRollMode = func (m, s=1) {
174
-    checkRollAcquisition = void;
175
-    if (rollMode == m and s) rollMode = 'ROL';
176
-    else rollMode = m;
177
-    setprop('/autopilot/locks/roll', (rollMode != '')? rollModes[rollMode] : rollMode);
178
-    setprop('/instrumentation/zkv1000/afcs/roll-active-mode', rollMode);
179
-    setprop('/instrumentation/zkv1000/afcs/roll-armed-mode', rollMode);
180
-    setprop('/instrumentation/zkv1000/afcs/roll-armed-mode-text', rollMode);
181
-    setprop('/instrumentation/zkv1000/afcs/roll-active-mode-text', rollMode);
182
-    setprop('/instrumentation/zkv1000/afcs/roll-active-mode-blink', 0);
183
-    if (rollMode != '') {
184
-        setprop('/instrumentation/zkv1000/afcs/fd-bars-visible', 1);
185
-        if (getPitchMode() == '') setPitchMode('PIT');
186
-    }
187
-    else {
188
-        setprop('/instrumentation/zkv1000/afcs/fd-bars-visible', 0);
189
-        settings.getNode('heading-bug-deg').unalias();
190
-        rollBlinking.switch(0);
191
-    }
192
-    init_main_loop();
193
-}
194
-
195
-var getPitchMode = func (mode = nil) {
196
-    var m = getprop('/autopilot/locks/pitch');
197
-    if (mode)
198
-        return (m == mode);
199
-    else
200
-        return m;
201
-}
202
-
203
-var getRollMode = func (mode = nil) { 
204
-    var m = getprop('/autopilot/locks/roll'); 
205
-    if (mode)
206
-        return (m == mode);
207
-    else
208
-        return m;
209
-}
210
-
211
-
212
-var _FLCcomputation = func {
213
-    var t1 = getprop('/autopilot/internal/flc-airspeed-pitch-deg');
214
-    var t2 = getprop('/autopilot/internal/flc-altitude-pitch-deg');
215
-    setprop('/autopilot/internal/target-pitch-deg', (t1 + t2) / 2);
216
-}
217
-
218
-var _computeAltitudeDiff = func {
219
-    var sel = getprop('/instrumentation/zkv1000/afcs/selected-alt-ft');
220
-    setprop('/instrumentation/zkv1000/afcs/selected-alt-ft-diff', sel - alt);
221
-}
222
-
223
-var _computeAirspeedDiff = func {
224
-    var sel = getprop('/autopilot/settings/target-speed-kt');
225
-    setprop('/instrumentation/zkv1000/afcs/selected-ias-kt-diff', sel - ias);
226
-}
227
-
228
-var settings = props.globals.getNode('/autopilot/settings');
229
-
230
-var pitchBlinking = nil;
231
-var rollBlinking = nil;
232
-
233
-var init_AFCS = func {
234
-     pitchBlinking = aircraft.light.new(afcs.getNode('pit-active-mode-blink').getPath(), 
235
-        [0.5, 0.5], 
236
-        afcs.getNode('pitch-armed').getPath());
237
-     pitchBlinking.switch(0);
238
-
239
-     rollBlinking = aircraft.light.new(afcs.getNode('roll-active-mode-blink').getPath(), 
240
-        [0.5, 0.5], 
241
-        afcs.getNode('roll-armed').getPath());
242
-     rollBlinking.switch(0);
243
-     if (getprop('/sim/systems/autopilot/path') == 'Aircraft/Generic/generic-autopilot.xml') {
244
-         setprop('/sim/systems/autopilot/path', 'Aircraft/Instruments-3d/zkv1000/Systems/autopilot.xml');
245
-     }
246
-}
247
-
-86
Nasal/alerts.nas
... ...
@@ -1,86 +0,0 @@
1
-var vs_gearup = 300;
2
-var ias_gearup = 90;
3
-var agl_geardown = 1000;
4
-var ias_geardown = 100;
5
-var VNE = 240;
6
-
7
-# hash table which contains informations needed to display warning messages and alerts messages
8
-# alerts and warnings keys should be 'alert|warning.message', the keys priority and msg_id are
9
-# placed here for convenience.
10
-# each key is associated with a 2 elements array:
11
-# 0: the text to be displayed
12
-# 1: priority of the message should be <= 20, also used for display duration
13
-# cooked_duration = 21 - priority
14
-var alerts_table = {
15
-    'warning.gears_up':   ['GEARS UP',   10],
16
-    'warning.gears_down': ['GEARS DOWN', 0 ],
17
-    'warning.traffic':    ['TRAFFIC',    20],
18
-    'warning.overspeed':  ['OVER SPEED', 15],
19
-    'warning.stall':      ['STALL',      18],
20
-    'warning.push_down':  ['PUSH DOWN',  17],
21
-    'warning.pull_up':    ['PULL UP',    15],
22
-    'warning.ground':     ['GROUND',     15],
23
-    'alert.traffic':      ['TRAFFIC',    20],
24
-    'alert.overspeed':    ['OVER SPEED', 20],
25
-    'priority': 0,
26
-    'msg_id': '',
27
-};
28
-
29
-var getAircraftDefaultSpecs = func () {
30
-    var d = props.globals.getNode('/instrumentation/zkv1000/defaults');
31
-    d != nil or return;
32
-    if (d.getNode('vs-gearup') != nil) vs_gearup = d.getNode('vs-gearup').getValue();
33
-    if (d.getNode('ias-gearup') != nil) ias_gearup = d.getNode('ias-gearup').getValue();
34
-    if (d.getNode('agl-geardown') != nil) agl_geardown = d.getNode('agl-geardown').getValue();
35
-    if (d.getNode('ias-geardown') != nil) ias_geardown = d.getNode('ias-geardown').getValue();
36
-    if (d.getNode('VNE') != nil) VNE = d.getNode('VNE').getValue();
37
-}
38
-    
39
-var inAirCheckings = func {
40
-    if (getprop('/gear/gear/wow')) {
41
-        alerts.getNode('traffic-proximity').setIntValue(0);
42
-        checkTrafficProximity = void;
43
-        checkAlerts = void;
44
-        GND(); # set XPDR mode
45
-    }
46
-    else {
47
-        if (props.globals.getNode('/sim/multiplay/online').getBoolValue()) 
48
-            checkTrafficProximity = _checkTrafficProximity;
49
-        checkAlerts = _checkAlerts;
50
-        ALT(); # set XPDR mode
51
-    }
52
-    init_main_loop();
53
-}
54
-
55
-var _checkTrafficProximity = func {
56
-    var ttc = 0; # Time To Conflict
57
-    var self = geo.aircraft_position();
58
-    foreach (var mp; multiplayer.model.list) {
59
-        var n = mp.node;
60
-        var x = n.getNode('position/global-x').getValue();
61
-        var y = n.getNode('position/global-y').getValue();
62
-        var z = n.getNode('position/global-z').getValue();
63
-        var ac = geo.Coord.new().set_xyz(x, y, z);
64
-        if (ac == nil) continue;
65
-        ttc = self.direct_distance_to(ac) * 0.5144 / ias; # ias in kt, distance in m, ttc in seconds
66
-        if (ttc < 20) {
67
-            set_alert('alert.traffic');
68
-            return;
69
-        }
70
-        else if (ttc < 60) {
71
-            set_alert('warning.traffic');
72
-        }
73
-    }
74
-}
75
-
76
-var checkAlerts = void;
77
-var _checkAlerts = func {
78
-    if (stall) set_alert('warning.stall');
79
-    if (pitch > 50) set_alert('warning.push_down');
80
-    if (pitch < -30) set_alert('warning.pull_up');
81
-    if (agl < 1500 and vs < -800) set_alert('warning.ground');
82
-    if (vs < -3000) set_alert('warning.pull_up');
83
-    if (gear and ias > ias_gearup and agl > agl_geardown) set_alert('warning.gears_down');
84
-    elsif (agl < agl_geardown and ias < ias_geardown) set_alert('warning.gears_up');
85
-}
86
-
+3 -3
Nasal/display.nas
... ...
@@ -148,7 +148,7 @@ var displayClass = {
148 148
                         'AltSmallD' ~ place
149 149
                     );
150 150
                 }
151
-                canvas.parsesvg(m.screen, data.zkv1000_reldir ~ 'Systems/PFD.svg');
151
+                canvas.parsesvg(m.screen, data.zkv1000_reldir ~ 'Models/PFD.svg');
152 152
             }
153 153
             else {
154 154
                 var eis_file = getprop('/instrumentation/zkv1000/eis/type');
... ...
@@ -186,8 +186,8 @@ var displayClass = {
186 186
                         append(groups.text, 'DATA-FIELD' ~ i ~ '-' ~ t ~ '-text');
187 187
             }
188 188
 
189
-            canvas.parsesvg(m.screen, data.zkv1000_reldir ~ 'Systems/softkeys.svg');
190
-            canvas.parsesvg(m.screen, data.zkv1000_reldir ~ 'Systems/header-nav-comm.svg');
189
+            canvas.parsesvg(m.screen, data.zkv1000_reldir ~ 'Models/softkeys.svg');
190
+            canvas.parsesvg(m.screen, data.zkv1000_reldir ~ 'Models/header-nav-comm.svg');
191 191
 
192 192
             m.loadGroup(groups);
193 193
 
-49
Nasal/infos.nas
... ...
@@ -1,49 +0,0 @@
1
-var wind_opt1 = func () {
2
-    if (ias > 50) {
3
-        var n = getprop('/environment/wind-from-north-fps') * 0.59248;
4
-        var e = getprop('/environment/wind-from-east-fps') * 0.59248;
5
-        setprop('/instrumentation/zkv1000/infos/wind-line', n > 0 ?
6
-                sprintf('N %i', n)
7
-               :sprintf('S %i', -n));
8
-        setprop('/instrumentation/zkv1000/infos/wind-line[1]', e > 0 ?
9
-                sprintf('E %i', e)
10
-               :sprintf('W %i', -e));
11
-    }
12
-    else {
13
-        setprop('/instrumentation/zkv1000/infos/wind-line', 'WIND');
14
-        setprop('/instrumentation/zkv1000/infos/wind-line[1]', 'DATA');
15
-    }
16
-}
17
-
18
-var wind_opt2 = func () {
19
-    if (ias > 50) {
20
-        setprop('/instrumentation/zkv1000/infos/wind-line', sprintf('SPD %i', getprop('/environment/wind-speed-kt')));
21
-        setprop('/instrumentation/zkv1000/infos/wind-line[1]', sprintf('DIR %03i', getprop('/environment/wind-from-heading-deg')));
22
-    }
23
-    else {
24
-        setprop('/instrumentation/zkv1000/infos/wind-line', 'WIND');
25
-        setprop('/instrumentation/zkv1000/infos/wind-line[1]', 'DATA');
26
-    }
27
-}
28
-
29
-var wind_opt3 = func () {
30
-    if (ias > 50) {
31
-        var n = getprop('/environment/wind-from-north-fps') * 0.59248;
32
-        var e = getprop('/environment/wind-from-north-fps') * 0.59248;
33
-        var h = getprop('/orientation/heading-magnetic-deg') * D2R;
34
-        var f = e * math.cos(h) - n * math.sin(h);
35
-        var x = n * math.cos(h) + e * math.sin(h);
36
-        setprop('/instrumentation/zkv1000/infos/wind-line', f > 0 ?
37
-                sprintf('HD %i', f)
38
-               :sprintf('RR %i', -f));
39
-        setprop('/instrumentation/zkv1000/infos/wind-line[1]', x > 0 ?
40
-                sprintf('XR %i', x)
41
-               :sprintf('XL %i', -x));
42
-    }
43
-    else {
44
-        setprop('/instrumentation/zkv1000/infos/wind-line', 'WIND');
45
-        setprop('/instrumentation/zkv1000/infos/wind-line[1]', 'DATA');
46
-    }
47
-}
48
-
49
-var wind_infos = void;
+1 -1
Nasal/maps/tcas.nas
... ...
@@ -6,7 +6,7 @@ var TcasItemClass = {
6 6
         var m = {parents : [TcasItemClass]};
7 7
         m._group = canvasGroup.createChild("group", "TcasItem_" ~ index);
8 8
 
9
-        canvas.parsesvg(m._group, data.zkv1000_reldir ~ "Systems/tcas.svg");
9
+        canvas.parsesvg(m._group, data.zkv1000_reldir ~ "Models/tcas.svg");
10 10
         m._can = {
11 11
             Alt : [
12 12
                 m._group.getElementById("Alt_above").setVisible(0),
-166
Nasal/mud.nas
... ...
@@ -1,166 +0,0 @@
1
-var mudClass = {
2
-    new: func (node, lines=10) {
3
-        var m = { parents: [ mudClass ] };
4
-        m.node = node.getNode('mud', 1);
5
-        m.content = []; # displayed
6
-        m.data = []; # not displayed
7
-        m.callback = []; # callback functions for selected items
8
-        m.node.getNode('displayed', 1).setBoolValue(0);
9
-        m.node.getNode('title', 1).setValue('');
10
-        m.lines = lines;
11
-        for (var i = 0; i < me.lines; i += 1) {
12
-            m.node.getNode('line[' ~ i ~ ']', 1).setValue('');
13
-            m.node.getNode('sel-line[' ~ i ~ ']', 1).setBoolValue(0);
14
-        }
15
-        return m;
16
-    },
17
-
18
-    lines: 10,
19
-
20
-    total_lines: 0,
21
-
22
-    wrap: 0,
23
-
24
-    selected: {
25
-        block: 0,
26
-        first_line: 0,
27
-        last_line: 0,
28
-    },
29
-
30
-    first: 0,
31
-
32
-    last: 0,
33
-
34
-    wipe: func {
35
-        me.content = [];
36
-        me.data = [];
37
-        me.callback = [];
38
-        me.selected.block = 0;
39
-        me.selected.first_line = -1;
40
-        me.selected.last_line = -1;
41
-        foreach (var p; me.node.getChildren('line')) {
42
-            p.setValue('');
43
-        }
44
-        me.node.getNode('title').setValue('');
45
-    },
46
-
47
-    setTitle: func (t) {
48
-        me.node.getNode('title').setValue(t);
49
-    },
50
-
51
-    add: func (content, callback = void, data = nil) {
52
-        append(me.content, content);
53
-        append(me.callback, callback);
54
-        append(me.data, data);
55
-        me.total_lines += size(content);
56
-    },
57
-
58
-    open: func (wrap = 0) {
59
-        me.fill();
60
-        me.wrap = wrap;
61
-        me.node.getNode('displayed').setBoolValue(1);
62
-    },
63
-
64
-    close: func () {
65
-        me.node.getNode('displayed').setBoolValue(0);
66
-        me.wipe();
67
-        me.wrap = 0;
68
-    },
69
-
70
-    fill: func (starting_block = 0) {
71
-        var f = 0;
72
-        var b = 0;
73
-        for (b = starting_block; b < size(me.content); b += 1) {
74
-            var s = size(me.content[b]);
75
-            f + s <= me.lines or break;
76
-            for (var i = 0; i < s; i += 1) {
77
-                var c = f + i;
78
-                me.node.getNode('line[' ~ c ~ ']').setValue(me.content[b][i]);
79
-            }
80
-            f += s;
81
-        }
82
-        me.first = starting_block;
83
-        me.last = b - 1;
84
-    },
85
-
86
-    invfill: func (block) {
87
-        var f = me.lines;
88
-        me.last = block;
89
-        for (me.first = block; me.first >= 0; me.first -= 1) {
90
-            var s = size(me.content[me.first]);
91
-            for (var i = size(me.content[me.first]) - 1; i >=0; i -= 1) {
92
-                f -= 1;
93
-                if (f < 0) {
94
-                    me.first += 1;
95
-                    return;
96
-                }
97
-                me.node.getNode('line[' ~ f ~ ']').setValue(me.content[me.first][i]);
98
-            }
99
-        }
100
-    },
101
-
102
-    select: func (dir = 0) {
103
-        foreach (var c; me.node.getChildren('sel-line')) c.setBoolValue(0);
104
-        var next = me.selected.block + dir;
105
-        if (next > (size(me.content) - 1)) {
106
-            if (me.wrap) {
107
-                next = 0;
108
-                me.fill(0);
109
-                me.selected.first_line = 0;
110
-                me.selected.last_line = size(me.content[0]) - 1;
111
-            }
112
-            else
113
-                next = size(me.content) - 1;
114
-        }
115
-        elsif (next < 0) {
116
-            if (me.wrap) {
117
-                next = size(me.content) - 1;
118
-                if (me.total_lines > me.lines) {
119
-                    me.invfill(next);
120
-                    me.selected.last_line = me.lines - 1;
121
-                }
122
-                else {
123
-                    me.fill(0);
124
-                    me.selected.last_line = me.total_lines - 1;
125
-                }
126
-                me.selected.first_line = me.selected.last_line - (size(me.content[next]) - 1);
127
-            }
128
-            else
129
-                next = 0;
130
-        }
131
-        elsif (next > me.last) {
132
-            me.invfill(next);
133
-            me.selected.last_line = me.lines - 1;
134
-            me.selected.first_line = me.selected.last_line - (size(me.content[next]) - 1);
135
-        }
136
-        elsif (next < me.first) {
137
-            me.fill(next);
138
-            me.selected.first_line = 0;
139
-            me.selected.last_line = size(me.content[0]) - 1;
140
-        }
141
-        elsif (dir > 0) {
142
-            me.selected.first_line += size(me.content[me.selected.block]);
143
-            me.selected.last_line = me.selected.first_line + size(me.content[next]) - 1;
144
-        }
145
-        elsif (dir < 0) {
146
-            me.selected.last_line = me.selected.first_line - 1;
147
-            me.selected.first_line = me.selected.last_line - (size(me.content[next]) - 1);
148
-        }
149
-        else {
150
-            me.selected.first_line = 0;
151
-            me.selected.last_line = size(me.content[next]) - 1;
152
-        }
153
-        me.selected.block = next;
154
-        for (var i = me.selected.first_line; i <= me.selected.last_line; i += 1) {
155
-            me.node.getNode('sel-line[' ~ i ~ ']').setBoolValue(1);
156
-        }
157
-    },
158
-
159
-    getdata: func {
160
-        return me.data[me.selected.block];
161
-    },
162
-
163
-    apply: func {
164
-        me.callback[me.selected.block](me.data[me.selected.block]);
165
-    }
166
-};
-154
Nasal/routes.nas
... ...
@@ -1,154 +0,0 @@
1
-var selectNextWayPoint = func (_me_, command) {
2
-    var w = geo.Coord.new();
3
-    var r = geo.Coord.new();
4
-    var c = [];
5
-    var scratch = '/instrumentation/gps/scratch/';
6
-    w.set_latlon(getprop(_me_.map_path ~ '/latitude-deg'),
7
-                 getprop(_me_.map_path ~ '/longitude-deg'));
8
-    lockSearches();
9
-    foreach (var t; ['fix', 'airport', 'vor', 'ndb']) {
10
-        searchNearestNavaid(t, 3, _me_.map_path);
11
-        while (getprop(scratch ~ '/has-next')) {
12
-            r.set_latlon(getprop(scratch ~ 'latitude-deg'),
13
-                         getprop(scratch ~ 'longitude-deg'));
14
-            append(c, [ w.distance_to(r),
15
-                        getprop(scratch ~ 'name'),
16
-                        getprop(scratch ~ 'ident'),
17
-                        getprop(scratch ~ 'mag-bearing-deg'),
18
-                        t
19
-                       ]
20
-             );
21
-             setprop('/instrumentation/gps/command', 'next');
22
-        }
23
-    }
24
-    unlockSearches();
25
-    c = sort(c, func (a,b) { return a[0] - b[0] });
26
-    _me_.mud.wipe();
27
-    var action = '';
28
-    if (command == 'dto') {
29
-        _me_.mud.setTitle('DIRECT TO...');
30
-        action = 'direct to '
31
-    }
32
-    else {
33
-        _me_.mud.setTitle('SELECT A WAYPOINT');
34
-        action = 'appended to route ';
35
-    }
36
-    _me_.mud.add(['CANCEL'], func { _me_.mud.close() });
37
-    _me_.mud.add(['HERE'], func {
38
-                               var n = 'instrumentation/gps/scratch/';
39
-                               lockSearches();
40
-                               setprop(n ~ 'longitude-deg', _me_.map_path ~ '/longitude-deg');
41
-                               setprop(n ~ 'latitude-deg', _me_.map_path ~ '/latitude-deg');
42
-                               setprop(n ~ 'type', 'USER');
43
-                               setprop(n ~ 'name', 'USER WAYPOINT');
44
-                               setprop(n ~ 'ident', '---');
45
-                               setprop(n ~ 'index', -1);
46
-                               setprop(n ~ '../command', command);
47
-                               unlockSearches();
48
-                               msg(action ~ 'unnamed waypoint');
49
-                           });
50
-    for (var i = 0; i < size(c) and c[i][0] < 18520 and i < 10; i += 1) { # only the 10 nearest and distance < 10NM
51
-        _me_.mud.add(
52
-            [c[i][1], sprintf('%s -- DST %.1fNM BRG %03i', c[i][2], c[i][0] / 1852, c[i][3])], 
53
-            func { 
54
-                var n = '/instrumentation/gps/scratch/';
55
-                lockSearches();
56
-                setprop(n ~ 'longitude-deg', getprop(_me_.map_path ~ '/longitude-deg'));
57
-                setprop(n ~ 'latitude-deg', getprop(_me_.map_path ~ '/latitude-deg'));
58
-                setprop(n ~ 'type', arg[0][0]);
59
-                setprop(n ~ 'query', arg[0][1]);
60
-                setprop(n ~ 'order-by-range', 1);
61
-                setprop(n ~ 'exact', 1);
62
-                setprop(n ~ '../command', 'search');
63
-                setprop(n ~ 'index', -1);
64
-                setprop(n ~ '../command', command);
65
-                unlockSearches();
66
-                msg(action ~ arg[0][0] ~ ' ' ~ arg[0][1]);
67
-            },
68
-            [ c[i][4], c[i][2] ]
69
-        );
70
-    }
71
-    c = nil;
72
-    _me_.mud.open(1); # allow wrapping
73
-    _me_.mud.select(); # select the first entry
74
-    _me_.mud.select(1); # select HERE;
75
-    if (size(_me_.mud.content) > 2) _me_.mud.select(1); # select nearest navaid if available
76
-    _me_.largeFMSknob = func (dir) { _me_.mud.select(dir) };
77
-}
78
-
79
-showSearchResults = func (mud, title, freq, callback) {
80
-    var scratch = '/instrumentation/gps/scratch/';
81
-    mud.wipe();
82
-    mud.setTitle(title);
83
-    while (getprop(scratch ~ 'has-next')) {
84
-        mud.add([getprop(scratch ~ 'name'),
85
-                 sprintf('%s -- DST %.1fNM BRG %03i', 
86
-                    getprop(scratch ~ 'ident'),
87
-                    getprop(scratch ~ 'distance-nm'), 
88
-                    getprop(scratch ~ 'mag-bearing-deg')
89
-                 )],
90
-                 callback,
91
-                 [ getprop(scratch ~ freq), getprop(scratch ~ 'ident'), getprop(scratch ~ 'type') ]);
92
-        setprop('/instrumentation/gps/command', 'next');
93
-    }
94
-    mud.open();
95
-    mud.select();
96
-}
97
-
98
-var selectSearchType = func (mud, dir) {
99
-    lockSearches();
100
-    var title = mud.node.getNode('title').getValue();
101
-    if (title == 'NEAREST AIRPORTS') {
102
-        searchNearestNavaid('vor',     5);
103
-        showSearchResults(mud, 'NEAREST VOR', 'frequency-mhz',
104
-                func { msg('set NAV1 standby freq to: ' ~ arg[0][0] ~ 'MHz');
105
-                    setprop('/instrumentation/nav/frequencies/standby-mhz', arg[0][0]) 
106
-                }
107
-        );
108
-    }
109
-    elsif (title == 'NEAREST VOR') {
110
-        searchNearestNavaid('ndb',     5);
111
-        showSearchResults(mud, 'NEAREST NDB', 'frequency-khz', 
112
-                func { msg('set ADF standby freq to ' ~ arg[0][0] ~ 'kHz');
113
-                    setprop('/instrumentation/adf/frequencies/standby-khz', arg[0][0]) 
114
-                }
115
-        );
116
-    }
117
-    elsif (title == 'NEAREST NDB') {
118
-        searchNearestNavaid('airport', 10);
119
-        showSearchResults(mud, 'NEAREST AIRPORTS', 'mag-bearing-deg', 
120
-                func { msg('set HDG to ' ~ arg[0][0]); 
121
-                    setprop('/instrumentation/zkv1000/afcs/heading-bug-deg', arg[0][0]) 
122
-                }
123
-        );
124
-    }
125
-    unlockSearches();
126
-}
127
-
128
-var showAvailableFPL = func (_me_) {
129
-    var files = [];
130
-    var mud = _me_.mud;
131
-    foreach (var subdir; ['/zkv1000/routes/', '/Routes/']) { # compatibility with zkv500 route store path
132
-        var path = getprop('/sim/fg-home') ~ subdir;
133
-        var s = io.stat(path);
134
-        (s != nil and s[11] == 'dir') or continue;
135
-        foreach (var f; directory(path)) {
136
-            if (f[0] != `.` and substr(f, -4) == '.xml') append(files, path ~ f);
137
-        }
138
-    }
139
-    if (size(files) == 0) {
140
-        msg('unable to find a directory containing routes');
141
-        return;
142
-    }
143
-    files = sort(files, func (a,b) { a[0] - b[0] });
144
-    mud.wipe();
145
-    mud.setTitle('STORED FLIGHTPLANS');
146
-    mud.add(['CANCEL'], func { mud.close(mud) });
147
-    for (var i = 0; i < size(files); i += 1) {
148
-        mud.add([string.uc(split('.', split('/', files[i])[-1])[0])], loadFPLfromFile, files[i]);
149
-    }
150
-    mud.open(1); # allow wrapping
151
-    mud.select(); # select CANCEL
152
-    if (size(mud.content) > 1) mud.select(1); # select first entry if exists
153
-    _me_.largeFMSknob = func (dir) { mud.select(dir) }
154
-}
+1 -1
README.md
... ...
@@ -189,7 +189,7 @@ or the one from another aircraft. Anyway if the EIS nasal file targeted doesn't
189 189
         </eis>
190 190
 
191 191
 Be aware that `canvas.parsesvg` uses only relative path and should not work properly if your .nas is outside of the FG tree.  
192
-If you want to add your own EIS, just copy the `Systems/EIS/single-prop.svg`, modify it to fit your needs, and refer to it in a function named `displayClass.showEIS`, another very important function is `displayClass.updateEIS` (example in [Nasal/EIS/single-prop.nas](zkv1000/blob/master/Nasal/EIS/single-prop.nas))  
192
+If you want to add your own EIS, just copy the `Models/EIS/single-prop.svg`, modify it to fit your needs, and refer to it in a function named `displayClass.showEIS`, another very important function is `displayClass.updateEIS` (example in [Nasal/EIS/single-prop.nas](zkv1000/blob/master/Nasal/EIS/single-prop.nas))  
193 193
 You are even free to modify the softkeys map in order to get according menus, but this has to be described on another document (check [Nasal/softkeys.nas](zkv1000/master/blob/Nasal/softkeys.nas)).
194 194
 
195 195
 No matter of the EIS width, as the map size and center are computed relative to the EIS width automatically.  
-414
Systems/autopilot.xml
... ...
@@ -1,414 +0,0 @@
1
-<?xml version="1.0"?>
2
- 
3
-<!-- From Generic Autopilot Configuration -->
4
-
5
-<PropertyList>
6
-
7
-  <!-- =============================================================== -->
8
-  <!-- Roll Axis Modes                                                 -->
9
-  <!-- =============================================================== -->
10
-
11
-  <pid-controller>
12
-    <name>Wing Leveler (Turn Coordinator based)</name>
13
-    <debug>false</debug>
14
-    <enable>
15
-      <condition>
16
-        <and>
17
-          <equals>
18
-            <property>/autopilot/locks/roll</property>
19
-            <value>wing-leveler</value>
20
-          </equals>
21
-          <not>
22
-            <property>/autopilot/locks/passive-mode</property>
23
-          </not>
24
-        </and>
25
-      </condition>
26
-    </enable>
27
-    <input>
28
-      <prop>/instrumentation/turn-indicator/indicated-turn-rate</prop>
29
-    </input>
30
-    <reference>
31
-      <value>0.0</value>
32
-    </reference>
33
-    <output>
34
-      <prop>/controls/flight/aileron</prop>
35
-    </output>
36
-    <config>
37
-      <Kp>0.5</Kp>
38
-      <beta>1.0</beta>
39
-      <alpha>0.1</alpha>
40
-      <gamma>0.0</gamma>
41
-      <Ti>10.0</Ti>
42
-      <Td>0.00001</Td>
43
-      <u_min>-1.0</u_min>
44
-      <u_max>1.0</u_max>
45
-    </config>
46
-  </pid-controller>
47
-
48
-  <pid-controller>
49
-    <name>Heading Bug Hold (DG based) Stage 1</name>
50
-    <debug>false</debug>
51
-    <enable>
52
-      <prop>/autopilot/locks/roll</prop>
53
-      <value>dg-heading-hold</value>
54
-    </enable>
55
-    <input>
56
-      <prop>/autopilot/internal/heading-bug-error-deg</prop>
57
-    </input>
58
-    <reference>
59
-      <value>0.0</value>
60
-    </reference>
61
-    <output>
62
-      <prop>/autopilot/internal/target-roll-deg</prop>
63
-    </output>
64
-    <config>
65
-      <Kp>-1.0</Kp>
66
-      <beta>1.0</beta>
67
-      <alpha>0.1</alpha>
68
-      <gamma>0.0</gamma>
69
-      <Ti>10.0</Ti>
70
-      <Td>0.00001</Td>
71
-      <u_min>-22.0</u_min>
72
-      <u_max>22.0</u_max>
73
-    </config>
74
-  </pid-controller>
75
-
76
-  <pid-controller>
77
-    <name>NAV Hold Stage 1</name>
78
-    <debug>false</debug>
79
-    <enable>
80
-      <prop>/autopilot/locks/roll</prop>
81
-      <value>nav1-hold</value>
82
-    </enable>
83
-    <input>
84
-      <prop>/instrumentation/zkv1000/cdi/course-deflection</prop>
85
-    </input>
86
-    <reference>
87
-      <value>0.0</value>
88
-    </reference>
89
-    <output>
90
-      <prop>/autopilot/internal/target-roll-deg</prop>
91
-    </output>
92
-    <config>
93
-      <Kp>-1.0</Kp>
94
-      <beta>1.0</beta>
95
-      <alpha>0.1</alpha>
96
-      <gamma>0.0</gamma>
97
-      <Ti>10.0</Ti>
98
-      <Td>0.00001</Td>
99
-      <u_min>-22.0</u_min>
100
-      <u_max>22.0</u_max>
101
-    </config>
102
-  </pid-controller>
103
-
104
-  <pid-controller>
105
-    <name>Approach mode Stage 1</name>
106
-    <debug>false</debug>
107
-    <enable>
108
-      <prop>/autopilot/locks/roll</prop>
109
-      <value>APR</value>
110
-    </enable>
111
-    <input>
112
-      <prop>/instrumentation/zkv1000/cdi/course-deflection</prop>
113
-    </input>
114
-    <reference>
115
-      <value>0.0</value>
116
-    </reference>
117
-    <output>
118
-      <prop>/autopilot/internal/target-roll-deg</prop>
119
-    </output>
120
-    <config>
121
-      <Kp>-1.0</Kp>
122
-      <beta>1.0</beta>
123
-      <alpha>0.1</alpha>
124
-      <gamma>0.0</gamma>
125
-      <Ti>10.0</Ti>
126
-      <Td>0.00001</Td>
127
-      <u_min>-22.0</u_min>
128
-      <u_max>22.0</u_max>
129
-    </config>
130
-  </pid-controller>
131
-
132
-  <pid-controller>
133
-    <name>Ailerons control</name>
134
-    <debug>false</debug>
135
-    <enable>
136
-      <condition>
137
-        <and>
138
-          <not-equals>
139
-            <property>/autopilot/locks/roll</property>
140
-            <value>wing-leveler</value>
141
-          </not-equals>
142
-          <not>
143
-            <property>/autopilot/locks/passive-mode</property>
144
-          </not>
145
-        </and>
146
-      </condition>  
147
-      <honor-passive>true</honor-passive>
148
-    </enable>
149
-    <input>
150
-      <prop>/orientation/roll-deg</prop>
151
-    </input>
152
-    <reference>
153
-      <prop>/autopilot/internal/target-roll-deg</prop>
154
-    </reference>
155
-    <output>
156
-      <prop>/controls/flight/aileron</prop>
157
-    </output>
158
-    <config>
159
-      <Kp>0.1</Kp>
160
-      <beta>1.0</beta>
161
-      <alpha>0.1</alpha>
162
-      <gamma>0.0</gamma>
163
-      <Ti>10.0</Ti>
164
-      <Td>0.00001</Td>
165
-      <u_min>-1.0</u_min>
166
-      <u_max>1.0</u_max>
167
-    </config>
168
-  </pid-controller>
169
-
170
- <!-- =============================================================== -->
171
- <!-- Pitch Axis Modes                                                -->
172
- <!-- =============================================================== -->
173
-
174
- <pid-controller>
175
-    <name>Pitch hold</name>
176
-    <debug>false</debug>
177
-    <enable>
178
-      <condition>
179
-        <and>
180
-          <equals>
181
-            <property>/autopilot/locks/pitch</property>
182
-            <value>pitch-hold</value>
183
-          </equals>
184
-          <not>
185
-            <property>/autopilot/locks/passive-mode</property>
186
-          </not>
187
-        </and>
188
-      </condition>
189
-    </enable>
190
-    <input>
191
-      <prop>/orientation/pitch-deg</prop>
192
-    </input>
193
-    <reference>
194
-      <prop>/autopilot/internal/target-pitch-deg</prop>
195
-    </reference>
196
-    <output>
197
-      <prop>/controls/flight/elevator-trim</prop>
198
-    </output>
199
-    <config>
200
-      <Kp>-0.05</Kp>
201
-      <beta>1.0</beta>
202
-      <alpha>0.1</alpha>
203
-      <gamma>0.0</gamma>
204
-      <Ti>1.0</Ti>
205
-      <Td>0.00001</Td>
206
-      <u_min>-1.0</u_min>
207
-      <u_max>1.0</u_max>
208
-    </config>
209
-   </pid-controller>
210
-  
211
-  <pid-controller>
212
-    <name>Altitude Hold</name>
213
-    <debug>false</debug>
214
-    <enable>
215
-      <prop>/autopilot/locks/pitch</prop>
216
-      <value>altitude-hold</value>
217
-    </enable>
218
-    <input>
219
-      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
220
-    </input>
221
-    <reference>
222
-      <prop>/autopilot/settings/target-altitude-ft</prop>
223
-    </reference>
224
-    <output>
225
-      <prop>/autopilot/internal/target-pitch-deg</prop>
226
-    </output>
227
-    <config>
228
-      <Kp>0.025</Kp>
229
-      <beta>1.0</beta>
230
-      <alpha>0.1</alpha>
231
-      <gamma>0.0</gamma>
232
-      <Ti>50.0</Ti>
233
-      <Td>0.0</Td>
234
-      <u_min>-20.0</u_min>
235
-      <u_max>15.0</u_max>
236
-    </config>
237
-  </pid-controller>
238
-
239
-  <!--pid-controller>
240
-    <name>Selected Altitude Hold</name>
241
-    <debug>false</debug>
242
-    <enable>
243
-      <prop>/autopilot/locks/pitch</prop>
244
-      <value>ALTS</value>
245
-    </enable>
246
-    <input>
247
-      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
248
-    </input>
249
-    <reference>
250
-      <prop>/autopilot/settings/target-altitude-ft</prop>
251
-    </reference>
252
-    <output>
253
-      <prop>/autopilot/internal/target-pitch-deg</prop>
254
-    </output>
255
-    <config>
256
-      <Kp>0.025</Kp>
257
-      <beta>1.0</beta>
258
-      <alpha>0.1</alpha>
259
-      <gamma>0.0</gamma>
260
-      <Ti>50.0</Ti>
261
-      <Td>0.0</Td>
262
-      <u_min>-20.0</u_min>
263
-      <u_max>15.0</u_max>
264
-    </config>
265
-  </pid-controller-->
266
-
267
-  <pid-controller>
268
-    <name>Glideslop Hold</name>
269
-    <debug>false</debug>
270
-    <enable>
271
-      <prop>/autopilot/locks/pitch</prop>
272
-      <value>glide-slope</value>
273
-    </enable>
274
-    <input>
275
-      <prop>/instrumentation/zkv1000/cdi/gs-deflection</prop>
276
-    </input>
277
-    <reference>
278
-      <value>0.0</value>
279
-    </reference>
280
-    <output>
281
-      <prop>/autopilot/internal/target-pitch-deg</prop>
282
-    </output>
283
-    <config>
284
-      <Kp>-1.5</Kp>
285
-      <beta>1.0</beta>
286
-      <alpha>0.1</alpha>
287
-      <gamma>0.0</gamma>
288
-      <Ti>10.0</Ti>
289
-      <Td>0.0</Td>
290
-      <u_min>-10</u_min>
291
-      <u_max>5</u_max>
292
-    </config>
293
-  </pid-controller>
294
-
295
-  <pi-simple-controller>
296
-    <name>Vertical Speed Hold</name>
297
-    <debug>false</debug>
298
-    <enable>
299
-      <prop>/autopilot/locks/pitch</prop>
300
-      <value>version-speed-hold</value>
301
-    </enable>
302
-    <input>
303
-      <prop>/velocities/vertical-speed-fps</prop>
304
-    </input>
305
-    <reference>
306
-      <prop>/autopilot/settings/vertical-speed-fpm</prop>
307
-      <scale>0.01667</scale>
308
-    </reference>
309
-    <output>
310
-      <prop>/autopilot/internal/target-pitch-deg</prop>
311
-    </output>
312
-    <config>
313
-      <Kp>0.05</Kp>
314
-      <Ki>0.1</Ki>
315
-      <u_min>-20.0</u_min>
316
-      <u_max>15.0</u_max>
317
-    </config>
318
-  </pi-simple-controller>
319
-
320
-  <pid-controller>
321
-    <name>Flight Change Level (altitude) stage #1</name>
322
-    <debug>false</debug>
323
-    <enable>
324
-      <prop>/autopilot/locks/pitch</prop>
325
-      <value>flight-level-change</value>
326
-    </enable>
327
-    <input>
328
-      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
329
-    </input>
330
-    <reference>
331
-      <prop>/autopilot/settings/target-altitude-ft</prop>
332
-    </reference>
333
-    <output>
334
-      <prop>/autopilot/internal/flc-altitude-pitch-deg</prop>
335
-    </output>
336
-    <config>
337
-      <Kp>0.025</Kp>
338
-      <beta>1.0</beta>
339
-      <alpha>0.1</alpha>
340
-      <gamma>0.0</gamma>
341
-      <Ti>50.0</Ti>
342
-      <Td>0.0</Td>
343
-      <u_min>-20.0</u_min>
344
-      <u_max>15.0</u_max>
345
-    </config>
346
-  </pid-controller>
347
-
348
-  <pid-controller>
349
-    <name>Flight Change Level (airspeed) stage #1</name>
350
-    <debug>false</debug>
351
-    <enable>
352
-      <prop>/autopilot/locks/pitch</prop>
353
-      <value>flight-level-change</value>
354
-    </enable>
355
-    <input>
356
-      <prop>/autopilot/internal/lookahead-5-sec-airspeed-kt</prop>
357
-    </input>
358
-    <reference>
359
-      <prop>/autopilot/settings/target-speed-kt</prop>
360
-    </reference>
361
-    <output>
362
-      <prop>/autopilot/internal/flc-airspeed-pitch-deg</prop>
363
-    </output>
364
-    <config>
365
-      <Kp>-1.0</Kp>
366
-      <beta>1.0</beta>
367
-      <alpha>0.1</alpha>
368
-      <gamma>0.0</gamma>
369
-      <Ti>1.0</Ti>
370
-      <Td>0.00001</Td>
371
-      <u_min>-15.0</u_min>
372
-      <u_max>15.0</u_max>
373
-    </config>
374
-  </pid-controller>
375
-
376
-  <pid-controller>
377
-    <name>Elevator Trim Control</name>
378
-    <debug>false</debug>
379
-    <enable>
380
-      <condition>
381
-        <and>
382
-          <not-equals>
383
-            <property>/autopilot/locks/pitch</property>
384
-            <value>pitch-hold</value>
385
-          </not-equals>
386
-          <not>
387
-            <property>/autopilot/locks/passive-mode</property>
388
-          </not>
389
-        </and>
390
-      </condition>
391
-      <honor-passive>true</honor-passive>
392
-    </enable>
393
-    <input>
394
-      <prop>/orientation/pitch-deg</prop>
395
-    </input>
396
-    <reference>
397
-      <prop>/autopilot/internal/target-pitch-deg</prop>
398
-    </reference>
399
-    <output>
400
-      <prop>/controls/flight/elevator-trim</prop>
401
-    </output>
402
-    <config>
403
-      <Kp>-0.25</Kp>
404
-      <beta>1.0</beta>
405
-      <alpha>0.1</alpha>
406
-      <gamma>0.0</gamma>
407
-      <Ti>20.0</Ti>
408
-      <Td>0.000001</Td>
409
-      <u_min>-1.0</u_min>
410
-      <u_max>1.0</u_max>
411
-    </config>
412
-  </pid-controller>
413
-
414
-</PropertyList>