Debian Codegraph @

Aircraft/c172p/Systems/engine.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 Copyright (c) 2015 onox
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 -->
19
20 <PropertyList>
21
22 <!-- ============================================================== -->
23 <!-- Throttle -->
24 <!-- ============================================================== -->
25
26 <switch name="fcs/throttle-pos-norm[0]">
27 <default value="0"/>
28 <test logic="AND" value="fcs/throttle-cmd-norm[0]">
29 /controls/engines/active-engine == 0
30 </test>
31 </switch>
32 <switch name="fcs/throttle-pos-norm[1]">
33 <default value="0"/>
34 <test logic="AND" value="fcs/throttle-cmd-norm[0]">
35 /controls/engines/active-engine == 1
36 </test>
37 </switch>
38
39 <filter>
40 <name>Engine 180 HP Throttle</name>
41 <type>gain</type>
42 <input>
43 <condition>
44 <equals>
45 <property>/controls/engines/active-engine</property>
46 <value>0</value>
47 </equals>
48 </condition>
49 <property>/controls/engines/engine[0]/throttle</property>
50 </input>
51 <input>
52 <condition>
53 <equals>
54 <property>/controls/engines/active-engine</property>
55 <value>1</value>
56 </equals>
57 </condition>
58 <property>/controls/engines/engine[1]/throttle</property>
59 </input>
60 <output>
61 <property>/controls/engines/current-engine/throttle</property>
62 </output>
63 </filter>
64
65 <!-- ============================================================== -->
66 <!-- Read-Only Properties -->
67 <!-- ============================================================== -->
68
69 <logic>
70 <name>Engine Starter</name>
71 <input>
72 <and>
73 <less-than>
74 <property>/systems/electrical/outputs/starter</property>
75 <value>31.5</value>
76 </less-than>
77 <greater-than>
78 <property>/systems/electrical/outputs/starter</property>
79 <value>20.0</value>
80 </greater-than>
81 </and>
82 </input>
83 <output>
84 <property>/controls/engines/current-engine/starter</property>
85 </output>
86 </logic>
87
88 <filter>
89 <name>Engine RPM</name>
90 <type>gain</type>
91 <input>
92 <condition>
93 <equals>
94 <property>/controls/engines/active-engine</property>
95 <value>1</value>
96 </equals>
97 </condition>
98 <property>/engines/engine[1]/rpm</property>
99 </input>
100 <input>
101 <property>/engines/engine[0]/rpm</property>
102 </input>
103 <output>
104 <property>/engines/active-engine/rpm</property>
105 </output>
106 </filter>
107
108 <logic>
109 <name>Engine Cranking</name>
110 <input>
111 <or>
112 <and>
113 <equals>
114 <property>/controls/engines/active-engine</property>
115 <value>0</value>
116 </equals>
117 <property>/engines/engine[0]/cranking</property>
118 </and>
119 <and>
120 <equals>
121 <property>/controls/engines/active-engine</property>
122 <value>1</value>
123 </equals>
124 <property>/engines/engine[1]/cranking</property>
125 </and>
126 </or>
127 </input>
128 <output>
129 <property>/engines/active-engine/cranking</property>
130 </output>
131 </logic>
132
133 <logic>
134 <name>Engine Running</name>
135 <input>
136 <or>
137 <and>
138 <equals>
139 <property>/controls/engines/active-engine</property>
140 <value>0</value>
141 </equals>
142 <property>/engines/engine[0]/running</property>
143 </and>
144 <and>
145 <equals>
146 <property>/controls/engines/active-engine</property>
147 <value>1</value>
148 </equals>
149 <property>/engines/engine[1]/running</property>
150 </and>
151 </or>
152 </input>
153 <output>
154 <property>/engines/active-engine/running</property>
155 </output>
156 </logic>
157
158 <logic>
159 <name>Engine Exhaust</name>
160 <input>
161 <and>
162 <property>/engines/active-engine/cranking</property>
163 <not>
164 <property>/engines/active-engine/running</property>
165 </not>
166 <greater-than>
167 <property>/engines/active-engine/rpm</property>
168 <value>0.0</value>
169 </greater-than>
170 <greater-than>
171 <property>/controls/engines/current-engine/mixture</property>
172 <value>0.0</value>
173 </greater-than>
174 </and>
175 </input>
176 <output>
177 <property>/engines/active-engine/exhaust</property>
178 </output>
179 </logic>
180
181 <logic>
182 <name>Engine Crashed</name>
183 <input>
184 <or>
185 <property>/engines/active-engine/crash-engine</property>
186
187 <!-- Nose gear broken or pontoons damaged or broken crashes engine -->
188 <property>/fdm/jsbsim/gear/unit[0]/broken</property>
189 <not-equals>
190 <property>/fdm/jsbsim/pontoon-damage/left-pontoon</property>
191 <value>0</value>
192 </not-equals>
193 <not-equals>
194 <property>/fdm/jsbsim/pontoon-damage/right-pontoon</property>
195 <value>0</value>
196 </not-equals>
197 </or>
198 </input>
199 <output>
200 <property>/engines/active-engine/crashed</property>
201 </output>
202 </logic>
203
204 <filter>
205 <name>Engine MP-OSI</name>
206 <type>gain</type>
207 <input>
208 <condition>
209 <equals>
210 <property>/controls/engines/active-engine</property>
211 <value>1</value>
212 </equals>
213 </condition>
214 <property>/engines/engine[1]/mp-osi</property>
215 </input>
216 <input>
217 <property>/engines/engine[0]/mp-osi</property>
218 </input>
219 <output>
220 <property>/engines/active-engine/mp-osi</property>
221 </output>
222 </filter>
223
224 <filter>
225 <name>Engine Fuel Flow</name>
226 <type>gain</type>
227 <input>
228 <condition>
229 <equals>
230 <property>/controls/engines/active-engine</property>
231 <value>1</value>
232 </equals>
233 </condition>
234 <property>/engines/engine[1]/fuel-flow-gph</property>
235 </input>
236 <input>
237 <property>/engines/engine[0]/fuel-flow-gph</property>
238 </input>
239 <output>
240 <property>/engines/active-engine/fuel-flow-gph</property>
241 </output>
242 </filter>
243
244 <filter>
245 <name>Engine EGT Temp</name>
246 <type>gain</type>
247 <input>
248 <condition>
249 <equals>
250 <property>/controls/engines/active-engine</property>
251 <value>1</value>
252 </equals>
253 </condition>
254 <property>/engines/engine[1]/egt-degf</property>
255 </input>
256 <input>
257 <condition>
258 <equals>
259 <property>/controls/engines/active-engine</property>
260 <value>0</value>
261 </equals>
262 </condition>
263 <property>/engines/engine[0]/egt-degf</property>
264 </input>
265 <output>
266 <property>/engines/active-engine/egt-degf</property>
267 </output>
268 </filter>
269
270 <filter>
271 <name>Engine EGT Norm</name>
272 <type>gain</type>
273 <input>
274 <condition>
275 <equals>
276 <property>/controls/engines/active-engine</property>
277 <value>1</value>
278 </equals>
279 </condition>
280 <property>/engines/engine[1]/egt-norm</property>
281 </input>
282 <input>
283 <property>/engines/engine[0]/egt-norm</property>
284 </input>
285 <output>
286 <property>/engines/active-engine/egt-norm</property>
287 </output>
288 </filter>
289
290 <filter>
291 <name>Engine Oil Temperature</name>
292 <type>gain</type>
293 <gain>
294 <property>/engines/active-engine/low-oil-temperature-factor</property>
295 </gain>
296 <input>
297 <condition>
298 <equals>
299 <property>/controls/engines/active-engine</property>
300 <value>0</value>
301 </equals>
302 </condition>
303 <property>/engines/engine[0]/oil-temperature-degf</property>
304 </input>
305 <input>
306 <condition>
307 <equals>
308 <property>/controls/engines/active-engine</property>
309 <value>1</value>
310 </equals>
311 </condition>
312 <property>/engines/engine[1]/oil-temperature-degf</property>
313 </input>
314 <output>
315 <property>/engines/active-engine/oil-temperature-degf</property>
316 </output>
317 </filter>
318
319 <filter>
320 <name>Engine Oil Pressure</name>
321 <type>gain</type>
322 <gain>
323 <property>/engines/active-engine/low-oil-pressure-factor</property>
324 </gain>
325 <input>
326 <condition>
327 <equals>
328 <property>/controls/engines/active-engine</property>
329 <value>1</value>
330 </equals>
331 </condition>
332 <property>/engines/engine[1]/oil-pressure-psi</property>
333 </input>
334 <input>
335 <property>/engines/engine[0]/oil-pressure-psi</property>
336 </input>
337 <output>
338 <property>/engines/active-engine/oil-pressure-psi</property>
339 </output>
340 </filter>
341
342 <!-- ============================================================== -->
343 <!-- Magnetos -->
344 <!-- ============================================================== -->
345
346 <filter>
347 <name>Engine 160 HP Magnetos</name>
348 <type>gain</type>
349 <input>
350 <condition>
351 <equals>
352 <property>/controls/engines/active-engine</property>
353 <value>0</value>
354 </equals>
355 </condition>
356 <property>/controls/switches/magnetos</property>
357 </input>
358 <input>
359 <value>0.0</value>
360 </input>
361 <output>
362 <property>/controls/engines/engine[0]/magnetos</property>
363 </output>
364 </filter>
365
366 <filter>
367 <name>Engine 180 HP Magnetos</name>
368 <type>gain</type>
369 <input>
370 <condition>
371 <equals>
372 <property>/controls/engines/active-engine</property>
373 <value>1</value>
374 </equals>
375 </condition>
376 <property>/controls/switches/magnetos</property>
377 </input>
378 <input>
379 <value>0.0</value>
380 </input>
381 <output>
382 <property>/controls/engines/engine[1]/magnetos</property>
383 </output>
384 </filter>
385
386 <!-- ============================================================== -->
387 <!-- Starter -->
388 <!-- ============================================================== -->
389
390 <logic>
391 <name>Engine 160 HP Starter</name>
392 <input>
393 <and>
394 <equals>
395 <property>/controls/engines/active-engine</property>
396 <value>0</value>
397 </equals>
398 <property>/controls/engines/current-engine/starter</property>
399 </and>
400 </input>
401 <output>
402 <property>/controls/engines/engine[0]/starter</property>
403 </output>
404 </logic>
405
406 <logic>
407 <name>Engine 180 HP Starter</name>
408 <input>
409 <and>
410 <equals>
411 <property>/controls/engines/active-engine</property>
412 <value>1</value>
413 </equals>
414 <property>/controls/engines/current-engine/starter</property>
415 </and>
416 </input>
417 <output>
418 <property>/controls/engines/engine[1]/starter</property>
419 </output>
420 </logic>
421
422 <!-- ============================================================== -->
423 <!-- Mixture -->
424 <!-- ============================================================== -->
425
426 <filter>
427 <name>Engine 160 HP Mixture</name>
428 <type>gain</type>
429 <input>
430 <condition>
431 <equals>
432 <property>/controls/engines/active-engine</property>
433 <value>0</value>
434 </equals>
435 </condition>
436 <property>/controls/engines/current-engine/mixture</property>
437 </input>
438 <input>
439 <value>0.0</value>
440 </input>
441 <output>
442 <property>/controls/engines/engine[0]/mixture</property>
443 </output>
444 </filter>
445
446 <filter>
447 <name>Engine 180 HP Mixture</name>
448 <type>gain</type>
449 <input>
450 <condition>
451 <equals>
452 <property>/controls/engines/active-engine</property>
453 <value>1</value>
454 </equals>
455 </condition>
456 <property>/controls/engines/current-engine/mixture</property>
457 </input>
458 <input>
459 <value>0.0</value>
460 </input>
461 <output>
462 <property>/controls/engines/engine[1]/mixture</property>
463 </output>
464 </filter>
465
466 <!-- ============================================================== -->
467 <!-- Carburetor Heat -->
468 <!-- ============================================================== -->
469
470 <filter>
471 <name>Engine 160 HP Carb Heat</name>
472 <type>gain</type>
473 <input>
474 <condition>
475 <equals>
476 <property>/controls/engines/active-engine</property>
477 <value>0</value>
478 </equals>
479 </condition>
480 <property>/controls/engines/current-engine/carb-heat</property>
481 </input>
482 <input>
483 <value>0.0</value>
484 </input>
485 <output>
486 <property>/controls/anti-ice/engine[0]/carb-heat</property>
487 </output>
488 </filter>
489
490 <filter>
491 <name>Engine 180 HP Carb Heat</name>
492 <type>gain</type>
493 <input>
494 <condition>
495 <equals>
496 <property>/controls/engines/active-engine</property>
497 <value>1</value>
498 </equals>
499 </condition>
500 <property>/controls/engines/current-engine/carb-heat</property>
501 </input>
502 <input>
503 <value>0.0</value>
504 </input>
505 <output>
506 <property>/controls/anti-ice/engine[1]/carb-heat</property>
507 </output>
508 </filter>
509
510 <!-- ============================================================== -->
511 <!-- Fuel contamination and low oil level -->
512 <!-- ============================================================== -->
513
514 <logic>
515 <name>Engine Killed</name>
516 <input>
517 <or>
518 <property>/engines/active-engine/crashed</property>
519 <property>/engines/active-engine/kill-engine</property>
520
521 <!-- engine is killed if fuel contamination is higher than 0.2 on a selected tank -->
522 <and>
523 <property>consumables/fuel/tank[0]/selected</property>
524 <greater-than>
525 <property>/consumables/fuel/tank[0]/water-contamination</property>
526 <value>0.2</value>
527 </greater-than>
528 </and>
529 <and>
530 <property>consumables/fuel/tank[1]/selected</property>
531 <greater-than>
532 <property>/consumables/fuel/tank[1]/water-contamination</property>
533 <value>0.2</value>
534 </greater-than>
535 </and>
536
537 <!-- engine is also killed if oil level is critical. Minimum oil level in the sump for safe operation (according
538 to Lycomings manual, page 3-10) is 2 quarts, which explains the value of 1.97 below-->
539 <less-than>
540 <property>/engines/active-engine/oil-level</property>
541 <value>1.97</value>
542 </less-than>
543
544 <!-- kill engine if the oil pressure is too low while the engine is running, according to Lycoming manaul 3-6 minimum oil pressure
545 in normal flight is 60psi, we use quite a bit below that to avoid excessive coughing during start. The engine will run for a while
546 probably at these low pressures, but if you have zero, you need to cut the engine fast! -->
547 <and>
548 <property>/engines/active-engine/running</property>
549 <equals>
550 <property>/engines/active-engine/ready-oil-press-checker</property>
551 <value>2</value>
552 </equals>
553 <less-than>
554 <property>/engines/active-engine/oil-pressure-psi</property>
555 <value>20</value> <!-- POH 2-3, our 172 has the Rochester gauge installed -->
556 </less-than>
557 </and>
558
559 <!-- also kill when pressure is too high (simulates pipes bursting under extreme pressure)-->
560 <and>
561 <property>/engines/active-engine/running</property>
562 <greater-than>
563 <property>/engines/active-engine/oil-pressure-psi</property>
564 <value>120</value> <!-- POH 2-5 -->
565 </greater-than>
566 </and>
567
568 <!-- engine is also killed if there is too much ice in the carburettor. Limit value is arbitrarily set to 0.32 -->
569 <greater-than-equals>
570 <property>/engines/active-engine/carb_ice</property>
571 <value>0.32</value>
572 </greater-than-equals>
573 </or>
574 </input>
575 <output>
576 <property>/engines/active-engine/killed</property>
577 </output>
578 </logic>
579
580 <!-- Low level of fuel contamination or just above oil minimal level makes engine cough-->
581 <logic>
582 <name>Engine Coughing</name>
583 <input>
584 <or>
585
586 <!-- engine coughs if fuel contamination is present on a selected tank, but lower than the critical value of 0.2 -->
587 <and>
588 <or>
589 <and>
590 <property>consumables/fuel/tank[0]/selected</property>
591 <greater-than>
592 <property>/consumables/fuel/tank[0]/water-contamination</property>
593 <value>0.0</value>
594 </greater-than>
595 </and>
596 <and>
597 <property>consumables/fuel/tank[1]/selected</property>
598 <greater-than>
599 <property>/consumables/fuel/tank[1]/water-contamination</property>
600 <value>0.0</value>
601 </greater-than>
602 </and>
603 </or>
604 <not>
605 <and>
606 <property>consumables/fuel/tank[0]/selected</property>
607 <greater-than>
608 <property>/consumables/fuel/tank[0]/water-contamination</property>
609 <value>0.2</value>
610 </greater-than>
611 </and>
612 </not>
613 <not>
614 <and>
615 <property>consumables/fuel/tank[1]/selected</property>
616 <greater-than>
617 <property>/consumables/fuel/tank[1]/water-contamination</property>
618 <value>0.2</value>
619 </greater-than>
620 </and>
621 </not>
622 </and>
623
624 <!-- coughing due to low oil pressure -->
625 <and>
626 <property>/engines/active-engine/running</property>
627 <equals>
628 <property>/engines/active-engine/ready-oil-press-checker</property>
629 <value>2</value>
630 </equals>
631 <less-than>
632 <property>/engines/active-engine/oil-pressure-psi</property>
633 <value>22.5</value>
634 </less-than>
635 <greater-than>
636 <property>/engines/active-engine/oil-pressure-psi</property>
637 <value>20</value>
638 </greater-than>
639 </and>
640
641 <!-- engine also coughs if ice is present in the carburettor and is melting at a noticiable rate -->
642 <and>
643 <greater-than>
644 <property>/engines/active-engine/carb_ice</property>
645 <value>0.0</value>
646 </greater-than>
647 <less-than>
648 <property>/engines/active-engine/carb_icing_rate</property>
649 <value>-0.5</value>
650 </less-than>
651 <!-- leaning the mixture while the carb ice is melting helps with the cough in RL, which is why
652 the egt-norm property is used here -->
653 <greater-than>
654 <property>/engines/active-engine/egt-norm</property>
655 <value>0.5</value>
656 </greater-than>
657 </and>
658 </or>
659 </input>
660 <output>
661 <property>/engines/active-engine/coughing</property>
662 </output>
663 </logic>
664
665 <!-- ============================================================== -->
666 <!-- Carburetor Icing drops RPM -->
667 <!-- ============================================================== -->
668
669 <filter>
670 <name>Engine 160 HP Carb Icing Factor</name>
671 <type>gain</type>
672 <input>
673 <property>/engines/active-engine/volumetric-efficiency-factor</property>
674 </input>
675 <output>
676 <property>/fdm/jsbsim/propulsion/engine[0]/volumetric-efficiency</property>
677 </output>
678 </filter>
679
680 <filter>
681 <name>Engine 180 HP Carb Icing Factor</name>
682 <type>gain</type>
683 <input>
684 <property>/engines/active-engine/volumetric-efficiency-factor</property>
685 </input>
686 <output>
687 <property>/fdm/jsbsim/propulsion/engine[1]/volumetric-efficiency</property>
688 </output>
689 </filter>
690
691 <!-- ============================================================== -->
692 <!-- Complex engine procedures -->
693 <!-- ============================================================== -->
694
695 <logic>
696 <name>Complex engine procedures</name>
697 <input>
698 <property>/engines/active-engine/complex-engine-procedures</property>
699 </input>
700 <output>
701 <name>damage</name>
702 <property>/engines/active-engine/damage_allowed</property>
703 </output>
704 <output>
705 <name>oil</name>
706 <property>/engines/active-engine/oil_consumption_allowed</property>
707 </output>
708 <output>
709 <name>carb-icing</name>
710 <property>/engines/active-engine/carb_icing_allowed</property>
711 </output>
712 <output>
713 <name>fuel-contamination</name>
714 <property>/consumables/fuel/contamination_allowed</property>
715 </output>
716 </logic>
717
718 <!-- ============================================================== -->
719 <!-- Save state of aircraft between sessions -->
720 <!-- ============================================================== -->
721
722 <logic>
723 <name>Save state of aircraft between sessions</name>
724 <input>
725 <property>/sim/model/c172p/save-state</property>
726 </input>
727 <output>
728 <name>fuel</name>
729 <property>/consumables/fuel/save-fuel-state</property>
730 </output>
731 <output>
732 <name>battery</name>
733 <property>/systems/electrical/save-battery-charge</property>
734 </output>
735 <output>
736 <name>instruments</name>
737 <property>/instrumentation/save-switches-state</property>
738 </output>
739 </logic>
740
741 <!-- ============================================================== -->
742 <!-- Converting fuel from US gallons to litres -->
743 <!-- ============================================================== -->
744
745 <filter>
746 <name>Left Tank: US Gallons to Litres</name>
747 <type>gain</type>
748 <gain>3.785411784</gain>
749 <input>
750 <property>/consumables/fuel/tank[0]/level-gal_us</property>
751 </input>
752 <output>
753 <property>/consumables/fuel/tank[0]/level-litres</property>
754 </output>
755 </filter>
756
757 <filter>
758 <name>Right Tank: US Gallons to Litres</name>
759 <type>gain</type>
760 <gain>3.785411784</gain>
761 <input>
762 <property>/consumables/fuel/tank[1]/level-gal_us</property>
763 </input>
764 <output>
765 <property>/consumables/fuel/tank[1]/level-litres</property>
766 </output>
767 </filter>
768
769 <filter>
770 <name>Integral Left Tank: US Gallons to Litres</name>
771 <type>gain</type>
772 <gain>3.785411784</gain>
773 <input>
774 <property>/consumables/fuel/tank[2]/level-gal_us</property>
775 </input>
776 <output>
777 <property>/consumables/fuel/tank[2]/level-litres</property>
778 </output>
779 </filter>
780
781 <filter>
782 <name>Integral Right Tank: US Gallons to Litres</name>
783 <type>gain</type>
784 <gain>3.785411784</gain>
785 <input>
786 <property>/consumables/fuel/tank[3]/level-gal_us</property>
787 </input>
788 <output>
789 <property>/consumables/fuel/tank[3]/level-litres</property>
790 </output>
791 </filter>
792
793 <!-- ============================================================== -->
794 <!-- Limit Fuel and Payload selection -->
795 <!-- ============================================================== -->
796
797 <filter>
798 <name>limit-fuel-and-payload-selection-tank0</name>
799 <type>gain</type>
800 <input>
801 <condition>
802 <property>/fdm/jsbsim/fuel/tank</property>
803 </condition>
804 <value>0</value>
805 </input>
806 <input>
807 <property>/consumables/fuel/tank[0]/selected</property>
808 </input>
809 <output>
810 <property>/consumables/fuel/tank[0]/selected</property>
811 </output>
812 </filter>
813 <filter>
814 <name>limit-fuel-and-payload-selection-tank1</name>
815 <type>gain</type>
816 <input>
817 <condition>
818 <property>/fdm/jsbsim/fuel/tank</property>
819 </condition>
820 <value>0</value>
821 </input>
822 <input>
823 <property>/consumables/fuel/tank[1]/selected</property>
824 </input>
825 <output>
826 <property>/consumables/fuel/tank[1]/selected</property>
827 </output>
828 </filter>
829 <filter>
830 <name>limit-fuel-and-payload-selection-tank2</name>
831 <type>gain</type>
832 <input>
833 <condition>
834 <not>
835 <property>/fdm/jsbsim/fuel/tank</property>
836 </not>
837 </condition>
838 <value>0</value>
839 </input>
840 <input>
841 <property>/consumables/fuel/tank[2]/selected</property>
842 </input>
843 <output>
844 <property>/consumables/fuel/tank[2]/selected</property>
845 </output>
846 </filter>
847 <filter>
848 <name>limit-fuel-and-payload-selection-tank3</name>
849 <type>gain</type>
850 <input>
851 <condition>
852 <not>
853 <property>/fdm/jsbsim/fuel/tank</property>
854 </not>
855 </condition>
856 <value>0</value>
857 </input>
858 <input>
859 <property>/consumables/fuel/tank[3]/selected</property>
860 </input>
861 <output>
862 <property>/consumables/fuel/tank[3]/selected</property>
863 </output>
864 </filter>
865
866 <!-- ============================================================== -->
867 <!-- Limit Fuel and Payload level-norm -->
868 <!-- ============================================================== -->
869
870 <filter>
871 <name>limit-fuel-and-payload-level-norm-tank0</name>
872 <type>gain</type>
873 <input>
874 <condition>
875 <not>
876 <property>/fdm/jsbsim/fuel/tank</property>
877 </not>
878 </condition>
879 <property>/consumables/fuel/tank[0]/level-norm</property>
880 </input>
881 <input>
882 <value>0</value>
883 </input>
884 <output>
885 <property>/consumables/fuel/tank[0]/level-norm</property>
886 </output>
887 </filter>
888 <filter>
889 <name>limit-fuel-and-payload-level-norm-tank1</name>
890 <type>gain</type>
891 <input>
892 <condition>
893 <not>
894 <property>/fdm/jsbsim/fuel/tank</property>
895 </not>
896 </condition>
897 <property>/consumables/fuel/tank[1]/level-norm</property>
898 </input>
899 <input>
900 <value>0</value>
901 </input>
902 <output>
903 <property>/consumables/fuel/tank[1]/level-norm</property>
904 </output>
905 </filter>
906 <filter>
907 <name>limit-fuel-and-payload-level-norm-tank2</name>
908 <type>gain</type>
909 <input>
910 <condition>
911 <property>/fdm/jsbsim/fuel/tank</property>
912 </condition>
913 <property>/consumables/fuel/tank[2]/level-norm</property>
914 </input>
915 <input>
916 <value>0</value>
917 </input>
918 <output>
919 <property>/consumables/fuel/tank[2]/level-norm</property>
920 </output>
921 </filter>
922 <filter>
923 <name>limit-fuel-and-payload-level-norm-tank3</name>
924 <type>gain</type>
925 <input>
926 <condition>
927 <property>/fdm/jsbsim/fuel/tank</property>
928 </condition>
929 <property>/consumables/fuel/tank[3]/level-norm</property>
930 </input>
931 <input>
932 <value>0</value>
933 </input>
934 <output>
935 <property>/consumables/fuel/tank[3]/level-norm</property>
936 </output>
937 </filter>
938
939 <!-- ============================================================== -->
940 <!-- Starter overheating -->
941 <!-- ============================================================== -->
942 <filter>
943 <name>Starter temperature</name>
944 <type>noise-spike</type>
945 <!--<debug>true</debug>-->
946 <enable>
947 <condition>
948 <and>
949 <property>/engines/active-engine/complex-engine-procedures</property>
950 <property>/engines/active-engine/starter-management</property>
951 </and>
952 </condition>
953 </enable>
954 <initialize-to>input</initialize-to>
955
956 <!-- Init / repairing: allow temp value to sdrop rapidly -->
957 <max-rate-of-change>
958 <condition>
959 <and>
960 <not><property>/systems/electrical/outputs/starter</property></not>
961 <or>
962 <property>/fdm/jsbsim/damage/repairing</property>
963 <less-than>
964 <property>/sim/time/elapsed-sec</property>
965 <value>5.0</value>
966 </less-than>
967 </or>
968 </and>
969 </condition>
970 <expression>
971 <value>250.0</value>
972 </expression>
973 </max-rate-of-change>
974
975 <!-- starter engaged: heat up -->
976 <max-rate-of-change>
977 <condition>
978 <property>/systems/electrical/outputs/starter</property>
979 </condition>
980 <expression>
981 <value>3.5</value> <!-- deg/second -->
982 </expression>
983 </max-rate-of-change>
984 <input>
985 <condition>
986 <property>/systems/electrical/outputs/starter</property>
987 </condition>
988 <value>300</value>
989 </input>
990
991 <!-- starter inactive: cooldown -->
992 <max-rate-of-change>
993 <expression>
994 <value>1.0</value> <!-- deg/second -->
995 </expression>
996 </max-rate-of-change>
997 <input>
998 <expression>
999 <product>
1000 <difference>
1001 <property>/engines/active-engine/cowling-air-temperature-degf</property>
1002 <value>32</value>
1003 </difference>
1004 <value>0.556</value>
1005 </product>
1006 </expression>
1007 </input>
1008 <output>/engines/active-engine/starter/temperature-degc</output>
1009 </filter>
1010 <logic>
1011 <name>Starter overheated</name>
1012 <input>
1013 <and>
1014 <property>/engines/active-engine/complex-engine-procedures</property>
1015 <property>/engines/active-engine/starter-management</property>
1016 <or>
1017 <and> <!-- if it was molten, keep it molten - unless we repair -->
1018 <property>/engines/active-engine/starter/overheated</property>
1019 <not><property>/fdm/jsbsim/damage/repairing</property></not>
1020 </and>
1021
1022 <and> <!-- if starter is engaging and exceeding critical temp, melt down -->
1023 <property>systems/electrical/outputs/starter</property>
1024 <greater-than-equals>
1025 <property>/engines/active-engine/starter/temperature-degc</property>
1026 <value>100</value> <!-- critical temp -->
1027 </greater-than-equals>
1028 </and>
1029 </or>
1030 </and>
1031 </input>
1032 <output>
1033 <property>/engines/active-engine/starter/overheated</property>
1034 </output>
1035 </logic>
1036
1037 </PropertyList>