forked from NikolaiVChr/f16
-
Notifications
You must be signed in to change notification settings - Fork 0
/
f16-simplified.xml
1967 lines (1870 loc) · 60.6 KB
/
f16-simplified.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSim.xsl"?>
<fdm_config name="General Dynamics F-16A" version="2.0" release="PRODUCTION"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<fileheader>
<author> Erik Hofman </author>
<filecreationdate> 2001-12-28 </filecreationdate>
<version> $Revision: 1.93 $ </version>
<license>
<licenseName>GPL (General Public License)</licenseName>
<licenseURL>http://www.gnu.org/licenses/gpl.html</licenseURL>
</license>
<description> Models an F-16A Block-32 (Basic US configuration) </description>
<note>
This model was created using data that is, or has been, publically
available by means of technical reports, textbooks, image graphs or
published code. This aircraft description file is in no way related
to the manufacturer of the real aircraft.
Neither the name of (any of) the authors nor the names of (any of) the
manufacturers may be used to endorse or promote products derived from
this file.
The data is provided ''as is'' and any express or implied
warranties, including, but not limitted to the implied warranties of
merchantability and fitness for a particular purpose are disclaimed.
</note>
<reference refID="ISBN 0-7232-3458-2" author="William Green" title="General Dynamics F-16 Dash-1" date="1987"/>
<reference refID="NASA TP-1538" author="" title="wind tunnel data" date="12/1979"/>
<reference refID="None" author="Richard Murray" title="http://www.cds.caltech.edu/~murray/projects/afosr95-vehicles/models/f16/" date="n/a"/>
<reference refID="H-1999" author="NASA" title="Dynamic ground effects flight test of an F-15 aircraft" date="n/a"/>
<reference refID="H-2177" author="NASA" title="Dynamic ground effect for a Cranked Arrow Wing Airplane" date="n/a"/>
<reference refID="None" author="n/a" title="http://www.codeonemagazine.com/archives/1991/articles/jul_91/july2a_91.html" date="n/a"/>
</fileheader>
<metrics>
<wingarea unit="FT2"> 300 </wingarea>
<wingspan unit="FT"> 30 </wingspan>
<chord unit="FT"> 11.32 </chord>
<htailarea unit="FT2"> 63.7 </htailarea>
<htailarm unit="FT"> 16.46 </htailarm>
<vtailarea unit="FT2"> 54.75 </vtailarea>
<vtailarm unit="FT"> 0 </vtailarm>
<location name="AERORP" unit="IN">
<x> -9.5 </x>
<y> 0 </y>
<z> 3.9 </z>
</location>
<location name="EYEPOINT" unit="IN">
<x> -156.2 </x>
<y> 0 </y>
<z> 29.5 </z>
</location>
<location name="VRP" unit="IN">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
</metrics>
<mass_balance>
<ixx unit="SLUG*FT2"> 9496 </ixx>
<iyy unit="SLUG*FT2"> 55814 </iyy>
<izz unit="SLUG*FT2"> 63100 </izz>
<ixy unit="SLUG*FT2"> 0 </ixy>
<ixz unit="SLUG*FT2"> -982 </ixz>
<iyz unit="SLUG*FT2"> 0 </iyz>
<emptywt unit="LBS"> 17400 </emptywt>
<location name="CG" unit="IN">
<x> -13 </x>
<y> 0 </y>
<z> -5.1 </z>
</location>
<pointmass name="Pilot">
<weight unit="LBS"> 230 </weight>
<location name="POINTMASS" unit="IN">
<x> -156.2 </x>
<y> 0 </y>
<z> 0 </z>
</location>
</pointmass>
</mass_balance>
<ground_reactions>
<contact type="BOGEY" name="NOSE_LG">
<location unit="M">
<x> -3.02153 </x>
<y> -0.03405 </y>
<z> -1.91735 </z>
</location>
<static_friction> 0.8 </static_friction>
<dynamic_friction> 0.5 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 17250 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 4250 </damping_coeff>
<max_steer unit="DEG"> 32 </max_steer><!-- as per manual -->
<brake_group> NONE </brake_group>
<retractable>1</retractable>
</contact>
<contact type="BOGEY" name="LEFT_MLG">
<location unit="M">
<x> 0.56097 </x>
<y> -1.16952 </y>
<z> -1.79705 </z>
</location>
<static_friction> 0.8 </static_friction>
<dynamic_friction> 0.5 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 37500 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 7500 </damping_coeff>
<max_steer unit="DEG"> 0.0 </max_steer>
<brake_group> LEFT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="BOGEY" name="RIGHT_MLG">
<location unit="M">
<x> 0.56097 </x>
<y> 1.18118 </y>
<z> -1.79705 </z>
</location>
<static_friction> 0.8 </static_friction>
<dynamic_friction> 0.5 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 37500 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 7500 </damping_coeff>
<max_steer unit="DEG"> 0.0 </max_steer>
<brake_group> RIGHT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="STRUCTURE" name="LEFT_WT">
<location unit="IN">
<x> 58.7 </x>
<y> -189 </y>
<z> 0 </z>
</location>
<static_friction> 5.0 </static_friction>
<dynamic_friction> 4.0 </dynamic_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC"> 40000 </damping_coeff_rebound>
</contact>
<contact type="STRUCTURE" name="RIGHT_WT">
<location unit="IN">
<x> 58.7 </x>
<y> 189 </y>
<z> 0 </z>
</location>
<static_friction> 5.0 </static_friction>
<dynamic_friction> 4.0 </dynamic_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC"> 40000 </damping_coeff_rebound>
</contact>
<contact type="STRUCTURE" name="TOP_VS">
<location unit="IN">
<x> 152.8 </x>
<y> 0 </y>
<z> 123.2 </z>
</location>
<static_friction> 5.0 </static_friction>
<dynamic_friction> 4.0 </dynamic_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC"> 40000 </damping_coeff_rebound>
</contact>
<contact type="STRUCTURE" name="LEFT_VFT">
<location unit="IN">
<x> 82.4 </x>
<y> -24.8 </y>
<z> -52 </z>
</location>
<static_friction> 5.0 </static_friction>
<dynamic_friction> 4.0 </dynamic_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC"> 40000 </damping_coeff_rebound>
</contact>
<contact type="STRUCTURE" name="RIGHT_VFT">
<location unit="IN">
<x> 82.4 </x>
<y> 24.8 </y>
<z> -52 </z>
</location>
<static_friction> 5.0 </static_friction>
<dynamic_friction> 4.0 </dynamic_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC"> 40000 </damping_coeff_rebound>
</contact>
<contact type="STRUCTURE" name="INTAKE">
<location unit="IN">
<x> -142.4 </x>
<y> 0 </y>
<z> -36.6 </z>
</location>
<static_friction> 5.0 </static_friction>
<dynamic_friction> 4.0 </dynamic_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC"> 40000 </damping_coeff_rebound>
</contact>
<contact type="STRUCTURE" name="RADOME">
<location unit="IN">
<x> -306.6 </x>
<y> 0 </y>
<z> -8.7 </z>
</location>
<static_friction> 5.0 </static_friction>
<dynamic_friction> 4.0 </dynamic_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC"> 40000 </damping_coeff_rebound>
</contact>
</ground_reactions>
<external_reactions>
<force name="pushback" frame="BODY">
<location unit="IN">
<x> 177.02 </x>
<y> 0.0 </y>
<z> -1.9683 </z>
</location>
<direction>
<x>1</x>
<y>0</y>
<z>0</z>
</direction>
</force>
<force name="hook" frame="BODY">
<location unit="IN">
<x> 280.669 </x>
<y> 0.0 </y>
<z> -28.818 </z>
</location>
<direction>
<x> -0.9995 </x>
<y> 0.0 </y>
<z> 0.01 </z>
</direction>
</force>
</external_reactions>
<propulsion>
<engine file="F100-PW-229">
<location unit="IN">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<orient unit="DEG">
<roll> 0.0 </roll>
<pitch> 0 </pitch>
<yaw> 0 </yaw>
</orient>
<feed>0</feed>
<feed>1</feed>
<feed>2</feed>
<feed>3</feed>
<thruster file="direct">
<location unit="IN">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<orient unit="DEG">
<roll> 0.0 </roll>
<pitch> 0.0 </pitch>
<yaw> 0.0 </yaw>
</orient>
</thruster>
</engine>
<tank type="FUEL"> <!-- Tank number 0 -->
<location unit="IN">
<x> 5.6 </x>
<y> 65.0 </y>
<z> 5.0 </z>
</location>
<capacity unit="LBS"> 3486 </capacity>
<contents unit="LBS"> 1500 </contents>
</tank>
<tank type="FUEL"> <!-- Tank number 1 -->
<location unit="IN">
<x> 5.6 </x>
<y> -65.0 </y>
<z> 5.0 </z>
</location>
<capacity unit="LBS"> 3486 </capacity>
<contents unit="LBS"> 1500 </contents>
</tank>
<tank type="FUEL"> <!-- External Tank number 0 (station 4) -->
<location unit="IN">
<x> 5.6 </x>
<y> 65.0 </y>
<z> -15.0 </z>
</location>
<capacity unit="LBS"> 2991 </capacity>
<contents unit="LBS"> 0 </contents>
</tank>
<tank type="FUEL"> <!-- External Tank number 1 (station 6) -->
<location unit="IN">
<x> 5.6 </x>
<y> -65.0 </y>
<z> -15.0 </z>
</location>
<capacity unit="LBS"> 2991 </capacity>
<contents unit="LBS"> 0 </contents>
</tank>
</propulsion>
<system file="jsb-pushback">
<property>/sim/model/pushback/kp</property>
<property>/sim/model/pushback/ki</property>
<property>/sim/model/pushback/kd</property>
</system>
<system file="jsb-hook"/>
<system file="jsb-hydraulics"/>
<system file="jsb-electrical"/>
<system file="jsb-misc"/>
<flight_control name="F-16 FC">
<!-- Declare some interface properties -->
<property>fcs/alpha-norm</property>
<property>fcs/hook-engage</property>
<property>fcs/canopy-engage</property>
<property>fcs/fbw-override</property>
<channel name="Flaps">
<switch name="fcs/tef-pos-rad">
<default value="0.0"/>
<test logic="AND" value="0.349">
velocities/vc-kts lt 250
</test>
<test logic="AND" value="-0.0349">
velocities/mach gt 0.9
</test>
</switch>
<pure_gain name="fcs/tef-pos-norm">
<input>fcs/tef-pos-rad</input>
<gain>2.864789</gain>
</pure_gain>
<kinematic name="fcs/tef-control">
<input>fcs/tef-pos-norm</input>
<traverse>
<setting>
<position>-1.0</position>
<time>3.0</time>
</setting>
<setting>
<position>0</position>
<time>0</time>
</setting>
<setting>
<position>1.0</position>
<time>3.0</time>
</setting>
</traverse>
</kinematic>
</channel>
<channel name="Roll">
<!-- Calculate the normalized roll-rate -->
<pure_gain name="fcs/roll-rate-norm">
<input>velocities/p-aero-rad_sec</input>
<gain>0.31821</gain>
</pure_gain>
<!--
- Calculate the difference between actual roll-rate and
- commanded roll-rate.
-->
<summer name="fcs/roll-trim-error">
<input>fcs/aileron-cmd-norm</input>
<input>-fcs/roll-rate-norm</input>
</summer>
<!--
- Make sure the PID controller is only active when the aircraft
- has gained some speed. This will prevent bad behaviour when the
- aircraft has been parked for a while.
-->
<switch name="fcs/aileron-pid-trigger">
<default value="1"/>
<test value="0">
velocities/vc-kts lt 20.0
</test>
</switch>
<pid name="fcs/roll-rate-pid">
<trigger>fcs/aileron-pid-trigger</trigger>
<input>fcs/roll-trim-error</input>
<kp> 3.00000 </kp>
<ki> 0.00050 </ki>
<kd> -0.00125 </kd>
</pid>
<summer name="fcs/roll-rate-command">
<input>fcs/roll-rate-pid</input>
<input>fcs/aileron-cmd-norm</input>
<clipto>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<aerosurface_scale name="fcs/aileron-control">
<input>fcs/roll-rate-command</input>
<range>
<min>-0.375</min>
<max>0.375</max>
</range>
<output>fcs/aileron-pos-rad</output>
</aerosurface_scale>
<!--
- FBW override swich
-->
<switch name="fcs/roll-rate-command-switch">
<default value="fcs/roll-rate-command"/>
<test value="fcs/aileron-cmd-norm">
fcs/fbw-override == 1
</test>
</switch>
<kinematic name="fcs/aileron-position">
<input>fcs/roll-rate-command-switch</input>
<traverse>
<setting>
<position>-1</position>
<time>0.3</time>
</setting>
<setting>
<position>1</position>
<time>0.3</time>
</setting>
</traverse>
<output>fcs/left-aileron-pos-norm</output>
</kinematic>
<scheduled_gain name="fcs/aileron-speed-compensated">
<input>fcs/left-aileron-pos-norm</input>
<table>
<independentVar>velocities/mach</independentVar>
<tableData>
0.0 1.0
1.0 0.15
</tableData>
</table>
</scheduled_gain>
<summer name="fcs/left-flaperon-norm">
<input>-fcs/tef-control</input>
<input>-fcs/aileron-speed-compensated</input>
<clipto>
<min>-1.0</min>
<max>1.0</max>
</clipto>
</summer>
<summer name="fcs/right-flaperon-norm">
<input>fcs/tef-control</input>
<input>-fcs/aileron-speed-compensated</input>
<clipto>
<min>-1.0</min>
<max>1.0</max>
</clipto>
</summer>
<summer name="fcs/flaperon-summer">
<input>fcs/left-flaperon-norm</input>
<input>fcs/right-flaperon-norm</input>
</summer>
<pure_gain name="fcs/flaperon-mix-rad">
<input>fcs/flaperon-summer</input>
<gain>1.4324</gain>
</pure_gain>
<aerosurface_scale name="fcs/left-aileron-control">
<input>fcs/aileron-speed-compensated</input>
<range>
<min>-0.375</min>
<max>0.375</max>
</range>
<output>fcs/left-aileron-pos-rad</output>
</aerosurface_scale>
<aerosurface_scale name="fcs/right-aileron-control">
<input>-fcs/aileron-speed-compensated</input>
<range>
<min>-0.375</min>
<max>0.375</max>
</range>
<output>fcs/right-aileron-pos-rad</output>
</aerosurface_scale>
<pure_gain name="fcs/right-aileron-control-norm">
<input>fcs/right-aileron-control</input>
<gain>2.6649</gain>
<output>fcs/right-aileron-pos-norm</output>
</pure_gain>
</channel>
<channel name="Pitch">
<!--
- accelerations/n-pilot-z-norm has the disadvantage that it
- has an offset of 1G when positioned horizontal (and -1G
- when upside down). To calculate the difference between the
- commanded pitch-rate and actual pitch-rate this offset has
- to be eliminated. The following function calculates an offset
- to compensate for the earth's gravity.
-->
<fcs_function name="fcs/n-pilot-z-correction">
<function>
<product>
<cos><property>attitude/pitch-rad</property></cos>
<cos><property>attitude/roll-rad</property></cos>
</product>
</function>
</fcs_function>
<summer name="fcs/g-load-corrected">
<input>accelerations/n-pilot-z-norm</input>
<input>-fcs/n-pilot-z-correction</input>
</summer>
<!--
- The F-16 has a G limit of 9G positive and 4G negative (44.44%
- of 9G). This section limits the stick output to 100% up and 44%
- down.
-->
<summer name="fcs/elevator-cmd-limiter">
<input>fcs/elevator-cmd-norm</input>
<input>fcs/pitch-trim-cmd-norm</input>
<clipto>
<min>-1</min>
<max>0.44</max>
</clipto>
</summer>
<!--
- If alpha (the difference between the pitch vector and the
- thrust vector) approaches 30 degrees the Flight Computer will
- command full down elevator deflection to prevent stalling.
- This section reduces pilot command to zero when alpha
- exceeds 28 degrees and approaches 30 degrees.
- (note: JSBSim doesn't extrapolate, so no need to specify
- beyond 30 degrees)
-->
<scheduled_gain name="fcs/elevator-scheduler">
<input>fcs/elevator-cmd-limiter</input>
<table>
<independentVar>aero/alpha-rad</independentVar>
<tableData>
-0.5236 0.0
-0.5 0.11
0.0 1.0
0.5 0.11
0.5236 0.0
</tableData>
</table>
</scheduled_gain>
<!-- Command full pitch down when approaching 30 degrees alpha -->
<pure_gain name="fcs/alpha-limiter-norm">
<input>aero/alpha-rad</input>
<gain>1.0472</gain>
</pure_gain>
<!-- Calculate the normalized current pitch-rate -->
<pure_gain name="fcs/pitch-rate-norm">
<input>velocities/q-aero-rad_sec</input>
<gain>6.2</gain>
</pure_gain>
<!-- Calculate the normalized current pilot g-load -->
<pure_gain name="fcs/g-load-norm">
<input>fcs/g-load-corrected</input>
<gain>0.020</gain>
</pure_gain>
<!--
- Calculated the difference between the commanded pitch-rate
- (elevator-scheduler) and the current pitch-rate and g-load.
- The difference has to be compensated for straight flight.
-->
<summer name="fcs/pitch-trim-error">
<input>fcs/elevator-scheduler</input>
<input>fcs/pitch-rate-norm</input>
<input>-fcs/g-load-norm</input>
</summer>
<!--
- Make sure the PID controller is only active when the aircraft
- has gained some speed. This will prevent bad behaviour when the
- aircraft has been parked for a while.
-->
<switch name="fcs/elevator-pid-trigger">
<default value="1"/>
<test value="0">
velocities/vc-kts lt 5.0
</test>
</switch>
<pid name="fcs/g-load-pid">
<trigger>fcs/elevator-pid-trigger</trigger>
<input>fcs/pitch-trim-error</input>
<kp> 0.3000 </kp>
<ki> 0.0250 </ki>
<kd> 0.0000 </kd>
<clipto>
<min>-1</min>
<max>1</max>
</clipto>
</pid>
<!--
- Calculate the difference between the current pitch-rate and
- the one requested for. Compensate for too high alpha values.
-->
<summer name="fcs/pitch-scheduler">
<input>fcs/elevator-scheduler</input>
<input>fcs/alpha-limiter-norm</input>
<input>fcs/g-load-pid</input>
<clipto>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<!--
- FBW override swich
-->
<switch name="fcs/pitch-scheduler-switch">
<default value="fcs/pitch-scheduler"/>
<test value="fcs/elevator-cmd-limiter">
fcs/fbw-override == 1
</test>
</switch>
<kinematic name="fcs/elevator-position-normalized">
<input>fcs/pitch-scheduler-switch</input>
<traverse>
<setting>
<position>-1</position>
<time>0.3</time>
</setting>
<setting>
<position>1</position>
<time>0.3</time>
</setting>
</traverse>
<!--<output>fcs/elevator-pos-norm</output>-->
</kinematic>
<aerosurface_scale name="fcs/elevator-position">
<input>fcs/elevator-position-normalized</input>
<range>
<min>-0.436</min>
<max>0.436</max>
</range>
<output>fcs/elevator-pos-rad</output>
</aerosurface_scale>
<summer name="fcs/dht-left-pos-rad">
<input>-fcs/elevator-pos-rad</input>
<input>-fcs/left-aileron-pos-rad</input>
<clipto>
<min>-0.436</min>
<max>0.436</max>
</clipto>
<output>fcs/elevator-pos-norm</output>
</summer>
<summer name="fcs/dht-right-pos-rad">
<input>fcs/elevator-pos-rad</input>
<input>fcs/right-aileron-pos-rad</input>
<clipto>
<min>-0.436</min>
<max>0.436</max>
</clipto>
<output>/sim/multiplay/generic/float[4]</output>
</summer>
</channel>
<channel name="Yaw">
<!-- Calculate the normalized yaw-rate -->
<scheduled_gain name="fcs/yaw-rate-norm">
<input>velocities/r-aero-rad_sec</input>
<table>
<independentVar>velocities/vg-fps</independentVar>
<tableData>
80.0 0.0
100.0 15.0
150.0 100.0
</tableData>
</table>
</scheduled_gain>
<!-- Calculate the normalized yaw-load -->
<pure_gain name="fcs/yaw-load-norm">
<input>accelerations/n-pilot-y-norm</input>
<gain>0.25</gain>
</pure_gain>
<!--
- Calculate the difference between the current yaw-rate
- and the one requiested for.
-->
<summer name="fcs/yaw-trim-error">
<input>fcs/rudder-cmd-norm</input>
<input>fcs/yaw-rate-norm</input>
<input>fcs/yaw-load-norm</input>
</summer>
<!--
- Make sure the PID controller is only active when the aircraft
- has gained some speed. This will prevent bad behaviour when the
- aircraft has been parked for a while.
-->
<switch name="fcs/rudder-pid-trigger">
<default value="1"/>
<test value="0">
velocities/vc-kts lt 10.0
</test>
</switch>
<pid name="fcs/yaw-load-pid">
<trigger>fcs/rudder-pid-trigger</trigger>
<input>fcs/yaw-trim-error</input>
<kp> 0.105500 </kp>
<ki> 0.000010 </ki>
<kd> 0.00005 </kd>
<clipto>
<min>-1</min>
<max>1</max>
</clipto>
<output>fcs/rudder-pos-norm</output>
</pid>
<summer name="fcs/yaw-scheduler">
<input>fcs/rudder-cmd-norm</input>
<input>fcs/yaw-trim-cmd-norm</input>
<input>fcs/yaw-load-pid</input>
<clipto>
<min>-1</min>
<max>1</max>
</clipto>
</summer>
<kinematic name="fcs/rudder-position">
<input>fcs/yaw-scheduler</input>
<traverse>
<setting>
<position>-1</position>
<time>0.4</time>
</setting>
<setting>
<position>1</position>
<time>0.4</time>
</setting>
</traverse>
<output>fcs/rudder-pos-norm</output>
</kinematic>
<aerosurface_scale name="fcs/rudder-control">
<input>fcs/rudder-pos-norm</input>
<range>
<min>-0.524</min>
<max>0.524</max>
</range>
<output>fcs/rudder-pos-rad</output>
</aerosurface_scale>
</channel>
<channel name="Landing Gear">
<switch name="fcs/gear-wow">
<default value="0"/>
<test logic="AND" value="1">
gear/unit[1]/WOW eq 1
gear/unit[2]/WOW eq 1
</test>
</switch>
<kinematic name="fcs/gear-control">
<input>gear/gear-cmd-norm</input>
<traverse>
<setting>
<position>0</position>
<time>0</time>
</setting>
<setting>
<position>1</position>
<time>5</time>
</setting>
</traverse>
<output>gear/gear-pos-norm</output>
</kinematic>
<scheduled_gain name="fcs/scheduled-steer-pos-deg">
<input>fcs/steer-cmd-norm</input>
<table>
<independentVar>velocities/vg-fps</independentVar>
<tableData>
10.0 80.0
50.0 15.0
150.0 2.0
</tableData>
</table>
<output>fcs/steer-pos-deg</output>
</scheduled_gain>
</channel>
<channel name="Leading Edge Flap">
<switch name="fcs/lef-pos-rad">
<default value="0.0"/>
<test logic="AND" value="-0.0349">
fcs/gear-wow eq 1
gear/gear-pos-norm gt 0
</test>
<test logic="AND" value="0.436">
gear/gear-pos-norm eq 0
aero/alpha-rad gt 0.2618
</test>
<test logic="AND" value="0.262">
fcs/gear-wow eq 0
aero/alpha-rad gt 0.0873
</test>
<test logic="AND" value="-0.0349">
velocities/mach gt 0.9
</test>
</switch>
<pure_gain name="fcs/lef-pos-norm">
<input>fcs/lef-pos-rad</input>
<gain>2.293578</gain>
</pure_gain>
<kinematic name="fcs/lef-control">
<input>fcs/lef-pos-norm</input>
<traverse>
<setting>
<position>-1.0</position>
<time>3.0</time>
</setting>
<setting>
<position>1.0</position>
<time>3.0</time>
</setting>
</traverse>
</kinematic>
<aerosurface_scale name="fcs/lef-pos-deg">
<input>fcs/lef-control</input>
<domain>
<min>-1.0</min>
<max>1.0</max>
</domain>
<range>
<min>-25</min>
<max>25</max>
</range>
</aerosurface_scale>
</channel>
<channel name="Throttle">
<pure_gain name="fcs/throttle1">
<input>fcs/throttle-cmd-norm</input>
<gain>2</gain>
<output>fcs/throttle-pos-norm</output>
</pure_gain>
</channel>
<channel name="Speedbrake">
<!--
- To prevent deep stall the Flight Computer commands speedbrake
- deflection at high angle of attack (alpha) and low speeds. This
- will provide just enough pitch down moment to keep the aircraft
- under control.
-->
<switch name="fcs/speedbrake-alpha-limiter">
<default value="0"/>
<test logic="AND" value="1">
aero/alpha-deg ge 53
velocities/v-fps le 18
</test>
</switch>
<switch name="fcs/speedbrake-initiate">
<default value="0"/>
<test logic="OR" value="1">
fcs/speedbrake-alpha-limiter eq 1
fcs/speedbrake-cmd-norm eq 1
</test>
</switch>
<!--
- Speedbrake deflection is limited to 43 degrees (instead of 60
- degrees) when the gear is extended to prevent physical
- speedbrake damage on touchdown.
-->
<scheduled_gain name="fcs/speedbrake-scheduler">
<input>fcs/speedbrake-initiate</input>
<table>
<independentVar>gear/gear-cmd-norm</independentVar>
<tableData>
0 1.0
1 0.71667
</tableData>
</table>
<!-- <output>fcs/speedbrake-pos-norm</output> -->
</scheduled_gain>
<kinematic name="fcs/speedbrake-control">
<input>fcs/speedbrake-scheduler</input>
<traverse>
<setting>
<position>0</position>
<time>0</time>
</setting>
<setting>
<position>60</position>
<time>1</time>
</setting>
</traverse>
<output>fcs/speedbrake-pos-deg</output>
</kinematic>
<aerosurface_scale name="fcs/speedbrake-position-normalizer">
<input>fcs/speedbrake-control</input>
<domain>
<min>0</min>
<max>60</max>
</domain>
<range>
<min>0</min>
<max>1</max>
</range>
<output>fcs/speedbrake-pos-norm</output>
</aerosurface_scale>
</channel>
<channel name="Hook">
<kinematic name="fcs/hook-control">
<input>fcs/hook-engage</input>
<traverse>
<setting>
<position>0</position>
<time>0</time>
</setting>
<setting>
<position>1</position>
<time>2.5</time>
</setting>
</traverse>
<output>fcs/hook-pos-norm</output>
</kinematic>
</channel>
<channel name="Canopy">
<switch name="fcs/canopy-trigger">
<default value="fcs/canopy-engage"/>
<test value="0">
velocities/u-fps gt 1.0
</test>
</switch>
<kinematic name="fcs/canopy-control">
<input>fcs/canopy-trigger</input>
<traverse>
<setting>
<position>0</position>
<time>0</time>
</setting>
<setting>
<position>1</position>
<time>10</time>
</setting>
</traverse>
<output>fcs/canopy-pos-norm</output>