-
Notifications
You must be signed in to change notification settings - Fork 481
/
Copy pathairship-mooring.xml
320 lines (283 loc) · 9.22 KB
/
airship-mooring.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
<?xml version="1.0"?>
<!--
Airship nose cone and main wire mooring system for JSBSim.
Copyright (C) 2008 - 2023 Anders Gidenstam (anders(at)gidenstam.org)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
-->
<system name="airship-mooring">
<description>
This system models a mast mooring system with a mooring cone connection
and a mooring wire. The mooring cone MUST be located at the aircraft's
visual reference point (VRP).
Usage:
Include the visual-reference-point-extensions system first.
Define the following constant properties:
For the mooring cone connection:
mooring/mooring-spring-coeff-lbs_ft [lbs/ft]
mooring/mooring-damping-coeff-lbs_fps [lbs*sec/ft]
mooring/max-mooring-force-lbs [lbs]
For the mooring wire:
mooring/wire-spring-coeff-lbs_ft [lbs/ft]
mooring/max-wire-force-lbs [lbs]
mooring/max-winch-speed-fps [ft/sec]
For the mooring cone connection:
mooring/mooring-spring-coeff-lbs_ft
mooring/mooring-damping-coeff-lbs_fps
mooring/max-mooring-force-lbs
Define the following external forces:
<force name="mooring-coupling-north" frame="LOCAL">
<location unit="M">
{ VRP }
</location>
<direction>
<x> 1.0 </x>
<y> 0.0 </y>
<z> 0.0 </z>
</direction>
</force>
<force name="mooring-coupling-east" frame="LOCAL">
<location unit="M">
{ VRP }
</location>
<direction>
<x> 0.0 </x>
<y> 1.0 </y>
<z> 0.0 </z>
</direction>
</force>
<force name="mooring-coupling-down" frame="LOCAL">
<location unit="M">
{ VRP }
</location>
<direction>
<x> 0.0 </x>
<y> 0.0 </y>
<z> 1.0 </z>
</direction>
</force>
The following control the mooring operation:
mooring/wire-connected Connect the wire {0,1.0}
mooring/winch-speed-fps Winch speed [ft/sec]
mooring/initial-wire-length-ft [ft]
Location of the mooring mast:
mooring/latitude-deg
mooring/longitude-deg
mooring/altitude-ft
</description>
<!-- INTERFACE PROPERTIES -->
<!-- Mooring actions -->
<property value="0.0"> mooring/wire-connected </property>
<property value="0.0"> mooring/winch-speed-fps </property>
<property value="0.0"> mooring/initial-wire-length-ft </property>
<!-- Mooring mast location. Note: Geodetic latitude and altitude. -->
<property value="0.0"> mooring/latitude-deg </property>
<property value="0.0"> mooring/longitude-deg </property>
<property value="0.0"> mooring/altitude-ft </property>
<channel name="Mooring Forces">
<fcs_function name="mooring/latitude-diff-ft">
<function>
<product>
<property> position/latitude-unit-distance-ft_deg </property>
<difference>
<property> mooring/latitude-deg </property>
<property> position/vrp-latitude-deg </property>
</difference>
</product>
</function>
</fcs_function>
<fcs_function name="mooring/longitude-diff-ft">
<function>
<product>
<property> position/longitude-unit-distance-ft_deg </property>
<difference>
<property> mooring/longitude-deg </property>
<property> position/vrp-longitude-deg </property>
</difference>
</product>
</function>
</fcs_function>
<fcs_function name="mooring/altitude-diff-ft">
<function>
<difference>
<property> position/vrp-altitude-ft </property>
<property> mooring/altitude-ft </property>
</difference>
</function>
</fcs_function>
<fcs_function name="mooring/total-distance-ft">
<function>
<pow>
<sum>
<pow>
<property> mooring/latitude-diff-ft </property>
<value> 2.0 </value>
</pow>
<pow>
<property> mooring/longitude-diff-ft </property>
<value> 2.0 </value>
</pow>
<pow>
<property> mooring/altitude-diff-ft </property>
<value> 2.0 </value>
</pow>
</sum>
<value> 0.5 </value>
</pow>
</function>
</fcs_function>
<switch name="mooring/moored">
<default value="0.0"/>
<test logic="AND" value="1.0">
mooring/wire-connected GE 1.0
mooring/total-distance-ft LE 5.0
</test>
</switch>
<fcs_function name="mooring/mooring-force-lbs">
<function>
<product>
<property> mooring/moored </property>
<property> mooring/mooring-spring-coeff-lbs_ft </property>
<property> mooring/total-distance-ft </property>
</product>
</function>
<clipto>
<min> 0.0 </min>
<max> mooring/max-mooring-force-lbs </max>
</clipto>
</fcs_function>
<switch name="mooring/winch-reset">
<default value="-1.0"/>
<test logic="AND" value="0.0">
mooring/wire-connected GT 0.0
</test>
</switch>
<pid name="mooring/wire-length-change-ft">
<!-- NOTE: The plain integrator component does not reset. -->
<input> mooring/winch-speed-fps </input>
<kp> 0.00 </kp>
<ki> 1.00 </ki>
<kd> 0.00 </kd>
<trigger> mooring/winch-reset </trigger>
<clipto>
<min>-mooring/initial-wire-length-ft </min>
<max> 0.0 </max> <!-- Might not be wise. -->
</clipto>
</pid>
<fcs_function name="mooring/wire-length-ft">
<function>
<sum>
<property> mooring/initial-wire-length-ft </property>
<property> mooring/wire-length-change-ft </property>
</sum>
</function>
<clipto>
<min> 0.0 </min>
<max> mooring/initial-wire-length-ft </max> <!-- Might not be wise. -->
</clipto>
</fcs_function>
<fcs_function name="mooring/wire-force-lbs">
<function>
<product>
<property> mooring/wire-connected </property>
<property> mooring/wire-spring-coeff-lbs_ft </property>
<max>
<difference>
<property> mooring/total-distance-ft </property>
<property> mooring/wire-length-ft </property>
</difference>
<value> 0.0 </value>
</max>
</product>
</function>
<clipto>
<min> 0.0 </min>
<max> mooring/max-wire-force-lbs </max>
</clipto>
</fcs_function>
<fcs_function name="mooring/total-force-lbs">
<function>
<sum>
<property> mooring/wire-force-lbs </property>
<property> mooring/mooring-force-lbs </property>
</sum>
</function>
</fcs_function>
<fcs_function name="mooring/force-north-lbs">
<function>
<product>
<property> mooring/wire-connected </property>
<sum>
<product>
<property> mooring/total-force-lbs </property>
<quotient>
<property> mooring/latitude-diff-ft </property>
<property> mooring/total-distance-ft </property>
</quotient>
</product>
<product>
<property> mooring/moored </property>
<property> mooring/mooring-damping-coeff-lbs_fps </property>
<property> velocities/vrp-v-north-fps </property>
</product>
</sum>
</product>
</function>
<output> external_reactions/mooring-coupling-north/magnitude </output>
</fcs_function>
<fcs_function name="mooring/force-east-lbs">
<function>
<product>
<property> mooring/wire-connected </property>
<sum>
<product>
<property> mooring/total-force-lbs </property>
<quotient>
<property> mooring/longitude-diff-ft </property>
<property> mooring/total-distance-ft </property>
</quotient>
</product>
<product>
<property> mooring/moored </property>
<property> mooring/mooring-damping-coeff-lbs_fps </property>
<property> velocities/vrp-v-east-fps </property>
</product>
</sum>
</product>
</function>
<output> external_reactions/mooring-coupling-east/magnitude </output>
</fcs_function>
<fcs_function name="mooring/force-down-lbs">
<function>
<product>
<property> mooring/wire-connected </property>
<sum>
<product>
<property> mooring/total-force-lbs </property>
<quotient>
<property> mooring/altitude-diff-ft </property>
<property> mooring/total-distance-ft </property>
</quotient>
</product>
<product>
<property> mooring/moored </property>
<property> mooring/mooring-damping-coeff-lbs_fps </property>
<property> velocities/vrp-v-down-fps </property>
</product>
</sum>
</product>
</function>
<output> external_reactions/mooring-coupling-down/magnitude </output>
</fcs_function>
</channel>
</system>