Debian Codegraph @

Aircraft/Generic/g-forces.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ###################################################################################
4 ## ##
5 ## Improved redout/blackout system for Flightgear ##
6 ## ##
7 ## Author: Nikolai V. Chr. (property rules), Thorsten Renk (shaders), ##
8 ## Benedikt Hallinger (groundshake effect) ##
9 ## ##
10 ## ##
11 ## ##
12 ## ##
13 ## Version 2.10 License: GPL 2.0 ##
14 ## ##
15 ###################################################################################
16 -->
17 <PropertyList>
18
19 <params>
20 <onset-b>sim/rendering/redout/parameters/blackout-onset-g</onset-b>
21 <fast-b>sim/rendering/redout/parameters/blackout-complete-g</fast-b>
22 <onset-r>sim/rendering/redout/parameters/redout-onset-g</onset-r>
23 <fast-r>sim/rendering/redout/parameters/redout-complete-g</fast-r>
24 <onset-t-b>sim/rendering/redout/parameters/onset-blackout-sec</onset-t-b>
25 <fast-t-b>sim/rendering/redout/parameters/fast-blackout-sec</fast-t-b>
26 <onset-t-r>sim/rendering/redout/parameters/onset-redout-sec</onset-t-r>
27 <fast-t-r>sim/rendering/redout/parameters/fast-redout-sec</fast-t-r>
28 <rec-f>sim/rendering/redout/parameters/recover-fast-sec</rec-f>
29 <rec-s>sim/rendering/redout/parameters/recover-slow-sec</rec-s>
30 <log>
31 <g-force>sim/rendering/redout/internal/log/g-force</g-force>
32 <onset-b>sim/rendering/redout/internal/log/onset-b</onset-b>
33 <fast-b>sim/rendering/redout/internal/log/fast-b</fast-b>
34 <g-force-r>sim/rendering/redout/internal/log/g-force-r</g-force-r>
35 <onset-r>sim/rendering/redout/internal/log/onset-r</onset-r>
36 <fast-r>sim/rendering/redout/internal/log/fast-r</fast-r>
37 </log>
38 <g-damp>accelerations/pilot-gdamped</g-damp>
39 <g-force-inv>sim/rendering/redout/internal/g-force-inv</g-force-inv>
40 <blackout>sim/rendering/redout/internal/blackout</blackout>
41 <redout>sim/rendering/redout/internal/redout</redout>
42 <jsb>sim/rendering/redout/internal/jsb</jsb>
43 <alpha>sim/rendering/redout/alpha</alpha>
44 <red>sim/rendering/redout/red</red>
45 <inside>sim/current-view/internal</inside>
46 <sum>sim/rendering/redout/internal/sum</sum>
47 <enable>sim/rendering/redout/enabled</enable>
48 <g-force>accelerations/pilot-g[0]</g-force>
49 <greyout>sim/rendering/als-filters/grey-factor</greyout>
50 <tunnel>sim/rendering/als-filters/black-factor</tunnel>
51 <als>sim/rendering/shaders/skydome</als>
52 <filters>sim/rendering/als-filters/use-filtering</filters>
53 <groundshake>
54 <!-- inputs -->
55 <effect-factor>sim/rendering/headshake/groundshake/effect-factor</effect-factor>
56 <aircraft-scale-prop>sim/rendering/headshake/groundshake/custom-aircraft-scaler</aircraft-scale-prop>
57 <default-aircraft-scaler-minkts>sim/rendering/headshake/groundshake/default-aircraft-scaler-min-knots</default-aircraft-scaler-minkts>
58 <default-aircraft-scaler-maxkts>sim/rendering/headshake/groundshake/default-aircraft-scaler-max-knots</default-aircraft-scaler-maxkts>
59 <default-aircraft-scaler-factor>sim/rendering/headshake/groundshake/default-aircraft-scaler-factor</default-aircraft-scaler-factor>
60
61 <!-- internal -->
62 <rng-source>sim/rendering/headshake/groundshake/internal/groundbump</rng-source>
63 <terrain-bumpiness>/fdm/jsbsim/ground/bumpiness</terrain-bumpiness>
64 <has-ground-contact>sim/rendering/headshake/groundshake/internal/ground-contact</has-ground-contact>
65 <is-moving>sim/rendering/headshake/groundshake/internal/is-moving</is-moving>
66 <default-aircraft-scaler>sim/rendering/headshake/groundshake/internal/default-aircraft-scaler</default-aircraft-scaler>
67
68 <!-- outputs -->
69 <result>sim/rendering/headshake/groundshake/result-g</result>
70 </groundshake>
71 </params>
72
73 <filter><!-- check for NaN -->
74 <type>gain</type>
75 <gain>0</gain>
76 <enable>
77 <condition>
78 <property alias="/params/enable"/>
79 <not>
80 <less-than>
81 <property alias="/params/blackout"/>
82 <value>1000.0</value>
83 </less-than>
84 <greater-than>
85 <property alias="/params/blackout"/>
86 <value>-1000.0</value>
87 </greater-than>
88 </not>
89 </condition>
90 </enable>
91 <input>
92 <value>0</value>
93 </input>
94 <output alias="/params/blackout"/>
95 </filter>
96
97 <filter><!-- check for NaN -->
98 <type>gain</type>
99 <gain>0</gain>
100 <enable>
101 <condition>
102 <property alias="/params/enable"/>
103 <not>
104 <less-than>
105 <property alias="/params/redout"/>
106 <value>1000.0</value>
107 </less-than>
108 <greater-than>
109 <property alias="/params/redout"/>
110 <value>-1000.0</value>
111 </greater-than>
112 </not>
113 </condition>
114 </enable>
115 <input>
116 <value>0</value>
117 </input>
118 <output alias="/params/redout"/>
119 </filter>
120
121 <filter>
122 <type>gain</type>
123 <gain>1</gain>
124 <enable>
125 <!-- check if blackout onset has sane value. -->
126 <condition>
127 <or>
128 <less-than>
129 <property alias="/params/onset-b"/>
130 <value>1.25</value>
131 </less-than>
132 </or>
133 </condition>
134 </enable>
135 <input>
136 <expression>
137 <max>
138 <property alias="/params/fast-b"/>
139 <value>1.25</value>
140 </max>
141 </expression>
142 </input>
143 <output alias="/params/onset-b"/>
144 </filter>
145
146 <filter>
147 <type>gain</type>
148 <gain>1</gain>
149 <enable>
150 <!-- check if blackout complete has sane value. -->
151 <condition>
152 <or>
153 <greater-than>
154 <property alias="/params/onset-b"/>
155 <property alias="/params/fast-b"/>
156 </greater-than>
157 <less-than>
158 <property alias="/params/fast-b"/>
159 <value>1.5</value>
160 </less-than>
161 </or>
162 </condition>
163 </enable>
164 <input>
165 <expression>
166 <max>
167 <sum>
168 <property alias="/params/onset-b"/>
169 <value>0.50</value>
170 </sum>
171 <value>1.5</value>
172 </max>
173 </expression>
174 </input>
175 <output alias="/params/fast-b"/>
176 </filter>
177
178 <filter>
179 <type>gain</type>
180 <gain>1</gain>
181 <enable>
182 <!-- check if redout onset has sane value. -->
183 <condition>
184 <or>
185 <greater-than>
186 <property alias="/params/onset-r"/>
187 <value>-1.00</value>
188 </greater-than>
189 </or>
190 </condition>
191 </enable>
192 <input>
193 <expression>
194 <min>
195 <property alias="/params/fast-r"/>
196 <value>-1.00</value>
197 </min>
198 </expression>
199 </input>
200 <output alias="/params/onset-r"/>
201 </filter>
202
203 <filter>
204 <type>gain</type>
205 <gain>1</gain>
206 <enable>
207 <!-- check if redout complete has sane value. -->
208 <condition>
209 <or>
210 <greater-than>
211 <property alias="/params/fast-r"/>
212 <property alias="/params/onset-r"/>
213 </greater-than>
214 <greater-than>
215 <property alias="/params/fast-r"/>
216 <value>-1.25</value>
217 </greater-than>
218 </or>
219 </condition>
220 </enable>
221 <input>
222 <expression>
223 <min>
224 <sum>
225 <property alias="/params/onset-r"/>
226 <value>-0.50</value>
227 </sum>
228 <value>-1.25</value>
229 </min>
230 </expression>
231 </input>
232 <output alias="/params/fast-r"/>
233 </filter>
234
235 <filter>
236 <type>gain</type>
237 <gain>-1</gain>
238 <enable>
239 <!-- check if JSBSim is the FDM. -->
240 <condition>
241 <equals>
242 <property alias="/params/jsb"/>
243 <value>1</value>
244 </equals>
245 </condition>
246 </enable>
247 <input>
248 <expression>
249 <sum>
250 <div>
251 <property>accelerations/pilot/z-accel-fps_sec</property>
252 <value>32.174</value>
253 </div>
254 <property alias="/params/groundshake/result" />
255 </sum>
256 </expression>
257 </input>
258 <output alias="/params/g-force"/>
259 </filter>
260
261 <filter>
262 <!-- for backwards compatibility for planes that use gdamped property -->
263 <type>exponential</type>
264 <filter-time>0.2</filter-time>
265 <input alias="/params/g-force"/>
266 <output alias="/params/g-damp"/>
267 </filter>
268
269 <filter>
270 <type>gain</type>
271 <gain>1</gain>
272 <enable>
273 <condition>
274 <property alias="/params/enable"/>
275 </condition>
276 </enable>
277 <input>
278 <expression>
279 <log10>
280 <property alias="/params/fast-b"/>
281 </log10>
282 </expression>
283 </input>
284 <output alias="/params/log/fast-b"/>
285 </filter>
286
287 <filter>
288 <type>gain</type>
289 <gain>1</gain>
290 <enable>
291 <condition>
292 <property alias="/params/enable"/>
293 </condition>
294 </enable>
295 <input>
296 <expression>
297 <log10>
298 <property alias="/params/onset-b"/>
299 </log10>
300 </expression>
301 </input>
302 <output alias="/params/log/onset-b"/>
303 </filter>
304
305 <filter>
306 <type>gain</type>
307 <gain>1</gain>
308 <enable>
309 <condition>
310 <property alias="/params/enable"/>
311 <less-than-equals>
312 <property alias="/params/g-force"/>
313 <value>1</value>
314 </less-than-equals>
315 </condition>
316 </enable>
317 <input>
318 <value>0</value>
319 </input>
320 <output alias="/params/log/g-force"/>
321 </filter>
322
323 <filter>
324 <type>gain</type>
325 <gain>1</gain>
326 <enable>
327 <condition>
328 <property alias="/params/enable"/>
329 <greater-than>
330 <property alias="/params/g-force"/>
331 <value>1</value>
332 </greater-than>
333 </condition>
334 </enable>
335 <input>
336 <expression>
337 <log10>
338 <property alias="/params/g-force"/>
339 </log10>
340 </expression>
341 </input>
342 <output alias="/params/log/g-force"/>
343 </filter>
344
345 <filter><!-- reduce blackout -->
346 <type>gain</type>
347 <gain>1</gain>
348 <enable>
349 <condition>
350 <property alias="/params/enable"/>
351 <less-than>
352 <property alias="/params/g-force"/>
353 <property alias="/params/onset-b"/>
354 </less-than>
355 </condition>
356 </enable>
357 <input>
358 <expression>
359 <min>
360 <value>1</value>
361 <max>
362 <value>0</value>
363 <dif>
364 <property alias="/params/blackout"/>
365 <product>
366 <property>sim/time/delta-sec</property>
367 <div>
368 <value>1</value>
369 <max>
370 <value>0</value>
371 <sum>
372 <property alias="/params/rec-f"/>
373 <product>
374 <div>
375 <dif>
376 <property alias="/params/log/g-force"/>
377 <log10>
378 <value>1</value>
379 </log10>
380 </dif>
381 <dif>
382 <property alias="/params/log/onset-b"/>
383 <log10>
384 <value>1</value>
385 </log10>
386 </dif>
387 </div>
388 <dif>
389 <property alias="/params/rec-s"/>
390 <property alias="/params/rec-f"/>
391 </dif>
392 </product>
393 </sum>
394 </max>
395 </div>
396 </product>
397 </dif>
398 </max>
399 </min>
400 </expression>
401 </input>
402 <output alias="/params/blackout"/>
403 </filter>
404
405 <filter><!-- increase blackout -->
406 <type>gain</type>
407 <gain>1</gain>
408 <enable>
409 <condition>
410 <property alias="/params/enable"/>
411 <greater-than-equals>
412 <property alias="/params/g-force"/>
413 <property alias="/params/onset-b"/>
414 </greater-than-equals>
415 </condition>
416 </enable>
417 <input>
418 <expression>
419 <min>
420 <value>1</value>
421 <max>
422 <value>0</value>
423 <sum>
424 <property alias="/params/blackout"/>
425 <product>
426 <property>sim/time/delta-sec</property>
427 <div>
428 <value>1</value>
429 <max>
430 <value>0</value>
431 <pow>
432 <value>10</value>
433 <sum>
434 <log10>
435 <property alias="/params/onset-t-b"/>
436 </log10>
437 <product>
438 <div>
439 <dif>
440 <property alias="/params/log/g-force"/>
441 <property alias="/params/log/onset-b"/>
442 </dif>
443 <dif>
444 <property alias="/params/log/fast-b"/>
445 <property alias="/params/log/onset-b"/>
446 </dif>
447 </div>
448 <dif>
449 <log10>
450 <property alias="/params/fast-t-b"/>
451 </log10>
452 <log10>
453 <property alias="/params/onset-t-b"/>
454 </log10>
455 </dif>
456 </product>
457 </sum>
458 </pow>
459 </max>
460 </div>
461 </product>
462 </sum>
463 </max>
464 </min>
465 </expression>
466 </input>
467 <output alias="/params/blackout"/>
468 </filter>
469
470 <filter>
471 <type>gain</type>
472 <gain>1</gain>
473 <enable>
474 <condition>
475 <property alias="/params/enable"/>
476 </condition>
477 </enable>
478 <input>
479 <expression>
480 <log10>
481 <product>
482 <value>-1</value>
483 <dif>
484 <property alias="/params/fast-r"/>
485 <value>2</value>
486 </dif>
487 </product>
488 </log10>
489 </expression>
490 </input>
491 <output alias="/params/log/fast-r"/>
492 </filter>
493
494 <filter>
495 <type>gain</type>
496 <gain>1</gain>
497 <enable>
498 <condition>
499 <property alias="/params/enable"/>
500 </condition>
501 </enable>
502 <input>
503 <expression>
504 <log10>
505 <product>
506 <value>-1</value>
507 <dif>
508 <property alias="/params/onset-r"/>
509 <value>2</value>
510 </dif>
511 </product>
512 </log10>
513 </expression>
514 </input>
515 <output alias="/params/log/onset-r"/>
516 </filter>
517
518 <filter>
519 <type>gain</type>
520 <gain>-1</gain>
521 <enable>
522 <condition>
523 <property alias="/params/enable"/>
524 </condition>
525 </enable>
526 <input>
527 <expression>
528 <dif>
529 <property alias="/params/g-force"/>
530 <value>2</value>
531 </dif>
532 </expression>
533 </input>
534 <output alias="/params/g-force-inv"/>
535 </filter>
536
537 <filter>
538 <type>gain</type>
539 <gain>1</gain>
540 <enable>
541 <condition>
542 <property alias="/params/enable"/>
543 <less-than-equals>
544 <property alias="/params/g-force-inv"/>
545 <value>1</value>
546 </less-than-equals>
547 </condition>
548 </enable>
549 <input>
550 <value>0</value>
551 </input>
552 <output alias="/params/log/g-force-r"/>
553 </filter>
554
555 <filter>
556 <type>gain</type>
557 <gain>1</gain>
558 <enable>
559 <condition>
560 <property alias="/params/enable"/>
561 <greater-than>
562 <property alias="/params/g-force-inv"/>
563 <value>1</value>
564 </greater-than>
565 </condition>
566 </enable>
567 <input>
568 <expression>
569 <log10>
570 <property alias="/params/g-force-inv"/>
571 </log10>
572 </expression>
573 </input>
574 <output alias="/params/log/g-force-r"/>
575 </filter>
576
577 <filter><!-- reduce redout -->
578 <type>gain</type>
579 <gain>1</gain>
580 <enable>
581 <condition>
582 <property alias="/params/enable"/>
583 <greater-than>
584 <property alias="/params/g-force"/>
585 <property alias="/params/onset-r"/>
586 </greater-than>
587 </condition>
588 </enable>
589 <input>
590 <expression>
591 <min>
592 <value>1</value>
593 <max>
594 <value>0</value>
595 <dif>
596 <property alias="/params/redout"/>
597 <product>
598 <property>sim/time/delta-sec</property>
599 <div>
600 <value>1</value>
601 <max>
602 <value>0</value>
603 <sum>
604 <property alias="/params/rec-f"/>
605 <product>
606 <div>
607 <dif>
608 <property alias="/params/log/g-force-r"/>
609 <log10>
610 <value>1</value>
611 </log10>
612 </dif>
613 <dif>
614 <property alias="/params/log/onset-r"/>
615 <log10>
616 <value>1</value>
617 </log10>
618 </dif>
619 </div>
620 <dif>
621 <property alias="/params/rec-s"/>
622 <property alias="/params/rec-f"/>
623 </dif>
624 </product>
625 </sum>
626 </max>
627 </div>
628 </product>
629 </dif>
630 </max>
631 </min>
632 </expression>
633 </input>
634 <output alias="/params/redout"/>
635 </filter>
636
637 <filter><!-- increase redout -->
638 <type>gain</type>
639 <gain>1</gain>
640 <enable>
641 <condition>
642 <property alias="/params/enable"/>
643 <less-than-equals>
644 <property alias="/params/g-force"/>
645 <property alias="/params/onset-r"/>
646 </less-than-equals>
647 </condition>
648 </enable>
649 <input>
650 <expression>
651 <min>
652 <value>1</value>
653 <max>
654 <value>0</value>
655 <sum>
656 <property alias="/params/redout"/>
657 <product>
658 <property>sim/time/delta-sec</property>
659 <div>
660 <value>1</value>
661 <max>
662 <value>0</value>
663 <pow>
664 <value>10</value>
665 <sum>
666 <log10>
667 <property alias="/params/onset-t-r"/>
668 </log10>
669 <product>
670 <div>
671 <dif>
672 <property alias="/params/log/g-force-r"/>
673 <property alias="/params/log/onset-r"/>
674 </dif>
675 <dif>
676 <property alias="/params/log/fast-r"/>
677 <property alias="/params/log/onset-r"/>
678 </dif>
679 </div>
680 <dif>
681 <log10>
682 <property alias="/params/fast-t-r"/>
683 </log10>
684 <log10>
685 <property alias="/params/onset-t-r"/>
686 </log10>
687 </dif>
688 </product>
689 </sum>
690 </pow>
691 </max>
692 </div>
693 </product>
694 </sum>
695 </max>
696 </min>
697 </expression>
698 </input>
699 <output alias="/params/redout"/>
700 </filter>
701
702 <filter>
703 <type>gain</type>
704 <gain>1</gain>
705 <enable>
706 <condition>
707 <property alias="/params/enable"/>
708 </condition>
709 </enable>
710 <input>
711 <expression>
712 <dif>
713 <property alias="/params/blackout"/>
714 <property alias="/params/redout"/>
715 </dif>
716 </expression>
717 </input>
718 <output alias="/params/sum"/>
719 </filter>
720
721 <filter>
722 <!-- When system is on, in pilot view and negative G effect, set fading color to red -->
723 <type>gain</type>
724 <gain>1</gain>
725 <enable>
726 <condition>
727 <property alias="/params/enable"/>
728 <equals>
729 <property alias="/params/inside"/>
730 <value>1</value>
731 </equals>
732 <less-than>
733 <property alias="/params/sum"/>
734 <value>0</value>
735 </less-than>
736 </condition>
737 </enable>
738 <input>
739 <value>1</value>
740 </input>
741 <output alias="/params/red"/>
742 </filter>
743
744 <filter>
745 <!-- When system is on, in pilot view and negative G effect, set fading amount -->
746 <type>gain</type>
747 <gain>1</gain>
748 <enable>
749 <condition>
750 <property alias="/params/enable"/>
751 <equals>
752 <property alias="/params/inside"/>
753 <value>1</value>
754 </equals>
755 <less-than>
756 <property alias="/params/sum"/>
757 <value>0</value>
758 </less-than>
759 </condition>
760 </enable>
761 <input>
762 <expression>
763 <product>
764 <property alias="/params/sum"/>
765 <value>-1</value>
766 </product>
767 </expression>
768 </input>
769 <output alias="/params/alpha"/>
770 </filter>
771
772 <filter>
773 <!-- When system is on, in pilot view and positive G effect, set fading color to black -->
774 <type>gain</type>
775 <gain>1</gain>
776 <enable>
777 <condition>
778 <property alias="/params/enable"/>
779 <equals>
780 <property alias="/params/inside"/>
781 <value>1</value>
782 </equals>
783 <greater-than-equals>
784 <property alias="/params/sum"/>
785 <value>0</value>
786 </greater-than-equals>
787 </condition>
788 </enable>
789 <input>
790 <value>0</value>
791 </input>
792 <output alias="/params/red"/>
793 </filter>
794
795 <filter>
796 <!-- When system is on, in pilot view and effect should be black, set fading amount -->
797 <type>gain</type>
798 <gain>1</gain>
799 <enable>
800 <condition>
801 <property alias="/params/enable"/>
802 <equals>
803 <property alias="/params/inside"/>
804 <value>1</value>
805 </equals>
806 <greater-than-equals>
807 <property alias="/params/sum"/>
808 <value>0</value>
809 </greater-than-equals>
810 </condition>
811 </enable>
812 <input>
813 <expression>
814 <min>
815 <value>1</value>
816 <max>
817 <value>0</value>
818 <sum>
819 <product>
820 <property alias="/params/als"/>
821 <property alias="/params/filters"/>
822 <!-- this will be used when ALS filters are in effect -->
823 <div>
824 <dif>
825 <property alias="/params/sum"/>
826 <value>0.66</value><!-- onset of blackout -->
827 </dif>
828 <value>0.34</value><!-- (full-onset) of blackout -->
829 </div>
830 </product>
831 <product>
832 <dif>
833 <value>1</value>
834 <product>
835 <property alias="/params/als"/>
836 <property alias="/params/filters"/>
837 </product>
838 </dif>
839 <!-- this will be used when ALS filters are off -->
840 <property alias="/params/sum"/>
841 </product>
842 </sum>
843 </max>
844 </min>
845 </expression>
846 </input>
847 <output alias="/params/alpha"/>
848 </filter>
849
850 <filter>
851 <!-- When system is off or not in pilot view, set fading to off -->
852 <type>gain</type>
853 <gain>0</gain>
854 <enable>
855 <condition>
856 <or>
857 <not>
858 <property alias="/params/enable"/>
859 </not>
860 <equals>
861 <property alias="/params/inside"/>
862 <value>0</value>
863 </equals>
864 </or>
865 </condition>
866 </enable>
867 <input>
868 <value>0</value>
869 </input>
870 <output alias="/params/alpha"/>
871 </filter>
872
873 <filter>
874 <!-- When system disabled, set blackout amount to 0 -->
875 <type>gain</type>
876 <gain>0</gain>
877 <enable>
878 <condition>
879 <not>
880 <property alias="/params/enable"/>
881 </not>
882 </condition>
883 </enable>
884 <input>
885 <value>0</value>
886 </input>
887 <output alias="/params/blackout"/>
888 </filter>
889
890 <filter>
891 <!-- When system is disabled, set redout amount to 0 -->
892 <type>gain</type>
893 <gain>0</gain>
894 <enable>
895 <condition>
896 <not>
897 <property alias="/params/enable"/>
898 </not>
899 </condition>
900 </enable>
901 <input>
902 <value>0</value>
903 </input>
904 <output alias="/params/redout"/>
905 </filter>
906
907 <filter>
908 <!-- When system is off or not in pilot view or negative G effect, set greyout to off -->
909 <type>gain</type>
910 <gain>0</gain>
911 <enable>
912 <condition>
913 <or>
914 <not>
915 <property alias="/params/enable"/>
916 </not>
917 <equals>
918 <property alias="/params/inside"/>
919 <value>0</value>
920 </equals>
921 <less-than>
922 <property alias="/params/sum"/>
923 <value>0</value>
924 </less-than>
925 </or>
926 </condition>
927 </enable>
928 <input>
929 <value>0</value>
930 </input>
931 <output alias="/params/greyout"/>
932 </filter>
933
934 <filter>
935 <!-- When system is off or not in pilot view or negative G effect, set tunnel-vision to off -->
936 <type>gain</type>
937 <gain>0</gain>
938 <enable>
939 <condition>
940 <or>
941 <not>
942 <property alias="/params/enable"/>
943 </not>
944 <equals>
945 <property alias="/params/inside"/>
946 <value>0</value>
947 </equals>
948 <less-than>
949 <property alias="/params/sum"/>
950 <value>0</value>
951 </less-than>
952 </or>
953 </condition>
954 </enable>
955 <input>
956 <value>0</value>
957 </input>
958 <output alias="/params/tunnel"/>
959 </filter>
960
961 <filter>
962 <!-- When system is on, in pilot view and positive G effect, set tunnel-vision amount -->
963 <type>gain</type>
964 <gain>1</gain>
965 <enable>
966 <condition>
967 <property alias="/params/enable"/>
968 <equals>
969 <property alias="/params/inside"/>
970 <value>1</value>
971 </equals>
972 <greater-than-equals>
973 <property alias="/params/sum"/>
974 <value>0</value>
975 </greater-than-equals>
976 </condition>
977 </enable>
978 <input>
979 <expression>
980 <min>
981 <value>1</value>
982 <max>
983 <value>0</value>
984 <div>
985 <dif>
986 <property alias="/params/sum"/>
987 <value>0.35</value><!-- onset of tunnel -->
988 </dif>
989 <value>0.65</value><!-- (full-onset) of tunnel -->
990 </div>
991 </max>
992 </min>
993 </expression>
994 </input>
995 <output alias="/params/tunnel"/>
996 </filter>
997
998 <filter>
999 <!-- When system is on, in pilot view and positive G effect, set greyout amount -->
1000 <type>gain</type>
1001 <gain>1</gain>
1002 <enable>
1003 <condition>
1004 <property alias="/params/enable"/>
1005 <equals>
1006 <property alias="/params/inside"/>
1007 <value>1</value>
1008 </equals>
1009 <greater-than-equals>
1010 <property alias="/params/sum"/>
1011 <value>0</value>
1012 </greater-than-equals>
1013 </condition>
1014 </enable>
1015 <input>
1016 <expression>
1017 <min>
1018 <value>1</value>
1019 <max>
1020 <value>0</value>
1021 <div>
1022 <dif>
1023 <property alias="/params/sum"/>
1024 <value>0.15</value><!-- onset of greyout -->
1025 </dif>
1026 <value>0.65</value><!-- (full-onset) of greyout -->
1027 </div>
1028 </max>
1029 </min>
1030 </expression>
1031 </input>
1032 <output alias="/params/greyout"/>
1033 </filter>
1034
1035
1036 <!-- Ground shake effect
1037 The ground shake effect simulates the roughness of the terrain and the
1038 resulting forces onto the pilot when moving over it.
1039 This is achieved by generating random g-forces depending on the current terrain bumpyness.
1040 The force is then applied to the pilot depending on movement speed of the aircraft.
1041
1042 Adjustments reside in sim/rendering/headshake/groundshake and can be done with this properties:
1043 - effect-factor: Overall effect scaling/enabling, so users can disable/adjust in cockpit-gui
1044 - default-aircraft-scaler-factor: allows to adjust the default aircraft effect output.
1045 To be overwritten from aircraft for which the default table is OK but the effect to small/big.
1046 Set to zero in case a separate scaler is provided
1047 - default-aircraft-scaler-min-knots: at this speed the effect starts
1048 - default-aircraft-scaler-max-knots: at this speed the effect reaches its maximum
1049 - custom-aircraft-scaler: aircraft devs calculate their own scaling algorythm result here.
1050 Most probably this is based on speed etc.
1051 Set default-aircraft-scaler-factor to zero, because otherwise the
1052 default still applies (default+custom effects are added)!
1053 -->
1054 <filter>
1055 <name>groundshake-terrain-g</name>
1056 <debug>false</debug>
1057 <type>gain</type>
1058 <gain><property alias="/params/groundshake/effect-factor"/></gain>
1059 <input>
1060 <condition>
1061 <!-- only act when having ground contact -->
1062 <property alias="/params/groundshake/has-ground-contact"/>
1063 <property alias="/params/groundshake/is-moving"/>
1064 </condition>
1065 <expression>
1066 <product>
1067 <!-- defines bumps of surface -->
1068 <property alias="/params/groundshake/rng-source"/>
1069
1070 <!-- apply bumpiness of terrain -->
1071 <product>
1072 <value>1</value>
1073 <sum>
1074 <value>0.1</value> <!-- so we have a effect even on taxiway/runway -->
1075 <property alias="/params/groundshake/terrain-bumpiness"/>
1076 </sum>
1077 </product>
1078
1079 <sum>
1080 <!-- apply the default aircraft scaling -->
1081 <!-- note: in case the aircraft dev wants his own model, he should deactivate the internal one -->
1082 <!-- this can be done by setting the deafualt-aircraft-factor to zero -->
1083 <property alias="/params/groundshake/default-aircraft-scaler" />
1084
1085 <!-- apply aircraft specific scaling -->
1086 <!-- (this is intended to model gear damping based on speed etc) -->
1087 <property alias="/params/groundshake/aircraft-scale-prop"/>
1088 </sum>
1089
1090 </product>
1091 </expression>
1092 </input>
1093 <input><value>0.0</value></input> <!-- in-air: no ground forces -->
1094 <output alias="/params/groundshake/result" />
1095 </filter>
1096
1097 <filter>
1098 <name>Ground bumps</name>
1099 <!-- calculate the ground bump number: The rate and ammount of change simulates bumps in the surface -->
1100 <type>coherent-noise</type>
1101 <debug>false</debug>
1102 <enable>
1103 <condition>
1104 <property alias="/params/groundshake/has-ground-contact"/>
1105 <property alias="/params/groundshake/is-moving"/>
1106 </condition>
1107 </enable>
1108 <input>
1109 <!-- depending on position: the faster we go, the faster the prop changes, the faster the bumps come in -->
1110 <expression>
1111 <product>
1112 <sum>
1113 <property>/position/latitude-deg</property>
1114 <property>/position/longitude-deg</property>
1115 </sum>
1116 <value>50</value>
1117 </product>
1118 </expression>
1119 </input>
1120 <output><property alias="/params/groundshake/rng-source"/></output>
1121 <amplitude>0.5</amplitude>
1122 <absolute type="bool">false</absolute>
1123 <discrete-resolution>1024</discrete-resolution> <!-- frequency of the changes/bumps: the smaller, the more wide the bumps are -->
1124 </filter>
1125
1126 <logic>
1127 <name>Aircraft has ground contact</name>
1128 <input>
1129 <or>
1130 <property>/gear/gear[0]/wow</property>
1131 <property>/gear/gear[1]/wow</property>
1132 <property>/gear/gear[2]/wow</property>
1133 <property>/gear/gear[3]/wow</property>
1134 </or>
1135 </input>
1136 <output>
1137 <property alias="/params/groundshake/has-ground-contact"/>
1138 </output>
1139 </logic>
1140
1141 <logic>
1142 <name>Aircraft is moving</name>
1143 <input>
1144 <greater-than>
1145 <property>/velocities/groundspeed-kt</property>
1146 <value>1</value>
1147 </greater-than>
1148 </input>
1149 <output>
1150 <property alias="/params/groundshake/is-moving"/>
1151 </output>
1152 </logic>
1153
1154 <filter>
1155 <name>Default aircraft scaling by speed</name>
1156 <!-- This filter defines a table for applying the scaled effect by airspeed to
1157 simulate basic damping of the gear. It allows for defining dynamic min/max knots
1158 ranges and scales linearly bin between -->
1159 <debug>false</debug>
1160 <type>gain</type>
1161 <gain> <property alias="/params/groundshake/default-aircraft-scaler-factor"/> </gain>
1162 <input>
1163 <!-- Formula: (1/(max-min))*speed-(min/(max-min)) lets us scale linearly with given min/max values -->
1164 <expression>
1165 <difference>
1166 <prod>
1167 <div>
1168 <value>1</value>
1169 <difference>
1170 <property alias="/params/groundshake/default-aircraft-scaler-maxkts"/>
1171 <property alias="/params/groundshake/default-aircraft-scaler-minkts"/>
1172 </difference>
1173 </div>
1174 <property>/velocities/groundspeed-kt</property>
1175 </prod>
1176
1177 <div>
1178 <property alias="/params/groundshake/default-aircraft-scaler-minkts"/>
1179 <difference>
1180 <property alias="/params/groundshake/default-aircraft-scaler-maxkts"/>
1181 <property alias="/params/groundshake/default-aircraft-scaler-minkts"/>
1182 </difference>
1183 </div>
1184 </difference>
1185 </expression>
1186
1187 <min>0.0</min>
1188 <max>1.0</max>
1189 </input>
1190 <output>
1191 <property alias="/params/groundshake/default-aircraft-scaler" />
1192 </output>
1193 </filter>
1194
1195 </PropertyList>