-
Notifications
You must be signed in to change notification settings - Fork 464
/
Copy pathc172_elevator_doublet.xml
117 lines (110 loc) · 3.57 KB
/
c172_elevator_doublet.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
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSimScript.xsl"?>
<runscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sf.net/JSBSimScript.xsd"
name="C172 elevator doublet">
<!--
This run is for testing the C172 at altitude with an elevator doublet applied
-->
<use aircraft="c172x" initialize="elevator_doublet_init"/>
<run start="0.0" end="40" dt="0.0083333">
<property> simulation/notify-time-trigger </property>
<property value="1"> simulation/run_id </property>
<!--
For "do_simple_trim" (Classic trim):
0: Longitudinal
1: Full
2: Ground
3: Pullup
4: Custom
5: Turn
6: None
-->
<event name="Trim">
<description>Trim at the initial conditions state</description>
<condition>
simulation/sim-time-sec gt 1.0
</condition>
<set name="simulation/do_simple_trim" value="1"/>
<notify>
<property>velocities/vc-kts</property>
<property>velocities/vt-fps</property>
<property>attitude/phi-rad</property>
<property>attitude/theta-rad</property>
<property>attitude/psi-rad</property>
</notify>
</event>
<event name="Elevator doublet" continuous="true">
<description> Do an elevator doublet from between
5 and 7 seconds. </description>
<condition>
simulation/sim-time-sec ge 5
simulation/sim-time-sec le 7
</condition>
<set name="fcs/elevator-cmd-norm">
<function>
<sin>
<product>
<difference>
<property> simulation/sim-time-sec </property>
<value> 5 </value>
</difference>
<value> 3.1415927 </value>
</product>
</sin>
</function>
</set>
<notify>
<property>velocities/vc-kts</property>
<property>velocities/vt-fps</property>
<property>attitude/phi-rad</property>
<property>attitude/theta-rad</property>
<property>attitude/psi-rad</property>
</notify>
</event>
<event name="Re-Trim at 20 seconds">
<description>Trim at the initial conditions state</description>
<condition>
simulation/sim-time-sec gt 20.0
</condition>
<set name="simulation/do_simple_trim" value="1"/>
<notify>
<property>velocities/vc-kts</property>
<property>velocities/vt-fps</property>
<property>attitude/phi-rad</property>
<property>attitude/theta-rad</property>
<property>attitude/psi-rad</property>
</notify>
</event>
<event name="Aileron doublet" continuous="true">
<description>
Do an elevator doublet from between
25 and 27 seconds.
</description>
<condition>
simulation/sim-time-sec ge 25
simulation/sim-time-sec le 27
</condition>
<set name="fcs/aileron-cmd-norm">
<function>
<sin>
<product>
<difference>
<property> simulation/sim-time-sec </property>
<value> 25 </value>
</difference>
<value> 3.1415927 </value>
</product>
</sin>
</function>
</set>
<notify>
<property>velocities/vc-kts</property>
<property>velocities/vt-fps</property>
<property>attitude/phi-rad</property>
<property>attitude/theta-rad</property>
<property>attitude/psi-rad</property>
</notify>
</event>
</run>
</runscript>