Debian Codegraph @

Aircraft/Generic/JSBSim/Systems/visual-reference-point-extensions.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2 <!--
3
4 Extension properties for the JSBSim visual reference point (VRP).
5
6 Copyright (C) 2015 Anders Gidenstam (anders(at)gidenstam.org)
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 -->
23 <system name="visual-reference-point-extensions">
24
25 <channel name="position">
26
27 <fcs_function name="position/vrp-cg-altitude-offset-ft">
28 <documentation>
29 Altitude offset of the visual reference point w.r.t. the centre of gravity.
30 FIXME: Verify the roll dependence.
31 </documentation>
32 <function>
33 <sum>
34 <product>
35 <value>-0.083333333</value>
36 <difference>
37 <property>metrics/visualrefpoint-x-in</property>
38 <property>inertia/cg-x-in</property>
39 </difference>
40 <sin>
41 <property>attitude/pitch-rad</property>
42 </sin>
43 </product>
44 <product>
45 <value>0.083333333</value>
46 <difference>
47 <property>metrics/visualrefpoint-z-in</property>
48 <property>inertia/cg-z-in</property>
49 </difference>
50 <cos>
51 <property>attitude/pitch-rad</property>
52 </cos>
53 </product>
54 <product>
55 <value>-0.083333333</value>
56 <difference>
57 <property>metrics/visualrefpoint-y-in</property>
58 <property>inertia/cg-y-in</property>
59 </difference>
60 <sin>
61 <property>attitude/roll-rad</property>
62 </sin>
63 </product>
64 <!-- product>
65 <value>0.083333333</value>
66 <difference>
67 <property>metrics/visualrefpoint-z-in</property>
68 <property>inertia/cg-z-in</property>
69 </difference>
70 <cos>
71 <property>attitude/roll-rad</property>
72 </cos>
73 </product -->
74 </sum>
75 </function>
76 </fcs_function>
77
78 <fcs_function name="position/vrp-altitude-ft">
79 <documentation>
80 Altitude of the visual reference point.
81 </documentation>
82 <function>
83 <sum>
84 <property>position/h-sl-ft</property>
85 <property>position/vrp-cg-altitude-offset-ft</property>
86 </sum>
87 </function>
88 </fcs_function>
89
90 <fcs_function name="position/vrp-altitude-agl-ft">
91 <documentation>
92 Distance between the visual reference point and the ground surface.
93 </documentation>
94 <function>
95 <sum>
96 <property>position/h-agl-ft</property>
97 <property>position/vrp-cg-altitude-offset-ft</property>
98 </sum>
99 </function>
100 </fcs_function>
101
102 <fcs_function name="position/vrp-latitude-deg">
103 <documentation>
104 Latitude of the visual reference point.
105
106 Based on the geocentric to geodetic conversion
107 vrp-latitude-deg = atan(tan(vrp-gc-latitude_deg)/(1-f)^2))
108 where for WGS 84 f = 1.0/298.25722.
109 </documentation>
110 <function>
111 <product>
112 <value>57.29578</value>
113 <atan>
114 <product>
115 <tan>
116 <product>
117 <value>0.017453293</value>
118 <property>position/vrp-gc-latitude_deg</property>
119 </product>
120 </tan>
121 <value>1.0067395</value>
122 </product>
123 </atan>
124 </product>
125 </function>
126 </fcs_function>
127
128 <fcs_function name="position/vrp-longitude-deg">
129 <documentation>
130 Longitude of the visual reference point.
131 </documentation>
132 <function>
133 <property>position/vrp-longitude_deg</property>
134 </function>
135 </fcs_function>
136
137 <fcs_function name="position/latitude-unit-distance-ft_deg">
138 <documentation>
139 Feet per degree of latitude at the present position.
140
141 The conversion is based on
142 http://gis.stackexchange.com/questions/75528/length-of-a-degree-where-do-the-terms-in-this-formula-come-from
143 but further truncated.
144 </documentation>
145 <function>
146 <product>
147 <value>3.2808399</value>
148 <!-- Approximate WGS 84 meters per latitude deg. -->
149 <sum>
150 <value>111132.92</value>
151 <product>
152 <value>-559.82</value>
153 <cos>
154 <product>
155 <value>2.0</value>
156 <value>0.017453293</value>
157 <property>position/vrp-latitude-deg</property>
158 </product>
159 </cos>
160 </product>
161 </sum>
162 </product>
163 </function>
164 </fcs_function>
165
166 <fcs_function name="position/longitude-unit-distance-ft_deg">
167 <documentation>
168 Feet per degree of longitude at the present position.
169
170 The conversion is based on
171 http://gis.stackexchange.com/questions/75528/length-of-a-degree-where-do-the-terms-in-this-formula-come-from
172 but further truncated.
173 </documentation>
174 <function>
175 <product>
176 <value>3.2808399</value>
177 <!-- Approximate WGS 84 meters per longitude deg. -->
178 <sum>
179 <product>
180 <value>111412.84</value>
181 <cos>
182 <product>
183 <value>0.017453293</value>
184 <property>position/vrp-latitude-deg</property>
185 </product>
186 </cos>
187 </product>
188 <product>
189 <value>-93.5</value>
190 <cos>
191 <product>
192 <value>3.0</value>
193 <value>0.017453293</value>
194 <property>position/vrp-latitude-deg</property>
195 </product>
196 </cos>
197 </product>
198 </sum>
199 </product>
200 </function>
201 </fcs_function>
202
203 </channel>
204
205 <channel name="velocities">
206 <!-- NOTE:
207 Computing the velocity by derivating the position is probably not
208 the best way.
209 -->
210
211 <pid name="velocities/vrp-v-north-deg_sec">
212 <documentation>
213 </documentation>
214 <input>position/vrp-latitude-deg</input>
215 <kp>0.0</kp>
216 <ki>0.0</ki>
217 <kd>1.0</kd>
218 </pid>
219
220 <fcs_function name="velocities/vrp-v-north-fps">
221 <documentation>
222 The conversion from degrees of latitude per second to ft/sec is based on
223 http://gis.stackexchange.com/questions/75528/length-of-a-degree-where-do-the-terms-in-this-formula-come-from
224 but further truncated.
225 </documentation>
226 <function>
227 <product>
228 <property>position/latitude-unit-distance-ft_deg</property>
229 <property>velocities/vrp-v-north-deg_sec</property>
230 </product>
231 </function>
232 </fcs_function>
233
234 <pid name="velocities/vrp-v-east-deg_sec">
235 <documentation>
236 </documentation>
237 <input>position/vrp-longitude-deg</input>
238 <kp>0.0</kp>
239 <ki>0.0</ki>
240 <kd>1.0</kd>
241 </pid>
242
243 <fcs_function name="velocities/vrp-v-east-fps">
244 <documentation>
245 The conversion from degrees of longitude per second to ft/sec is based on
246 http://gis.stackexchange.com/questions/75528/length-of-a-degree-where-do-the-terms-in-this-formula-come-from
247 but further truncated.
248 </documentation>
249 <function>
250 <product>
251 <property>position/longitude-unit-distance-ft_deg</property>
252 <property>velocities/vrp-v-east-deg_sec</property>
253 </product>
254 </function>
255 </fcs_function>
256
257 <pid name="velocities/vrp-v-down-fps">
258 <documentation>
259 </documentation>
260 <input>position/vrp-altitude-ft</input>
261 <kp>0.0</kp>
262 <ki>0.0</ki>
263 <kd>-1.0</kd>
264 </pid>
265
266 </channel>
267
268 </system>