Debian Codegraph @

Docs/README.autopush

raw
1 AUTOMATIC PUSHBACK FOR FLIGHTGEAR
2
3 Version 2.0.1
4
5 Copyright (c) 2018 Autopush authors:
6 Joshua Davidson http://github.com/Octal450
7 Merspieler http://gitlab.com/merspieler
8 Some of the code (c) FlightGear
9 Distribute under the terms of GPLv2.
10
11
12 This project aims to develop a generic pushback for JSBSim and YASim
13 aircraft, with the following characteristics.
14
15 1. Do the pushback procedure automatically.
16 2. Scale to different aircraft with minimum changes to their logic.
17 3. Use no computer resources in flight.
18
19
20 INSTALLATION
21
22 Minimum FlightGear version: 2018.0
23
24 NOTE: these steps cover the minimal testing setup. To get the most
25 realism out of Autopush, you will have to add logic aircraft-side as
26 described in the last step.
27
28 1. Copy the autopush.config.xml.template into your aircraft directory
29 and the Goldhofert.xml into <your-airfraft>/Models/Autopush/
30
31 2. Set up the pushback logic.
32
33 Add the following line under <sim><model> of your set.xml
34
35 <autopush include="autopush-config.xml"/>
36
37 Rename autopush-config.xml.template to autopush-config.xml and edit
38 the file as described below.
39
40 Alternatively, you can copy the contents of
41 autopush-config.xml.template to under <sim><model><autopush> of your
42 set.xml and make these modifications there.
43
44 Change the aliases to point to the following data:
45
46 steer-cmd-norm nose wheel steering command norm
47 yaw nose wheel steering output norm or angle (see below)
48 chocks chocks command bool (or leave it until step 7)
49 available pushback availability bool (or leave it until step 7)
50
51 Replace the MULTIPLIER in yaw-mult with:
52
53 max steering angle if yaw is norm
54 1.0 if yaw is degrees
55 57.3 if yaw is radians
56
57 Replace PITCH with the pushback's pitch relative to aircraft. If your
58 aircraft's ground pitch varies greatly, you can make an alias to
59 property with calculated relative pitch.
60
61 Replace MIN_RADIUS with the minimum allowed turning radius in m of the
62 center of the aircraft during pushback procedure.
63
64 NOTE: on some aircraft the turning radius is different for taxi and
65 pushback. Please check the aircraft's literature.
66
67 Replace STOP_DIST with the stopping distance in m from pushback speed.
68
69 Add under <nasal> of your set.xml:
70
71 <autopush>
72 <file>Nasal/Autopush/autopush.nas</file>
73 </autopush>
74 <autopush_driver>
75 <file>Nasal/Autopush/driver.nas</file>
76 </autopush_driver>
77 <dynarr>
78 <file>Nasal/Autopush/dynarr.nas</file>
79 </dynarr>
80 <autopush_route>
81 <file>Nasal/Autopush/route.nas</file>
82 </autopush_route>
83
84 Add under <sim><aircraft-data> of your set.xml:
85
86 <path>/sim/model/autopush/route/show</path>
87 <path>/sim/model/autopush/route/show-wingtip</path>
88
89 3. Connect the force to FDM.
90
91 3.a. JSBSim:
92
93 3.a.1. Add the following under <external_reactions> of your JSBSim
94 XML.
95
96 <force name="tractor" frame="BODY">
97 <location unit="M">
98 <x>FRONT-X</x>
99 <y>FRONT-Y</y>
100 <z>FRONT-Z</z>
101 </location>
102 <direction>
103 <x>1.0</x>
104 <y>0.0</y>
105 <z>0.0</z>
106 </direction>
107 </force>
108
109 Replace FRONT-X, FRONT-Y, FRONT-Z with coordinates of your front
110 bogey.
111
112 3.a.2. Add the following under <fdm><jsbsim><external_reactions> of
113 your set.xml.
114
115 <tractor>
116 <magnitude alias="/sim/model/autopush/force-lbf"/>
117 <x alias="/sim/model/autopush/force-x"/>
118 <y alias="/sim/model/autopush/force-y"/>
119 <z alias="/sim/model/autopush/force-z"/>
120 </tractor>
121
122 3.b. YASim. Add the following under <airplane> of your YASim xml.
123
124 <thruster x="FRONT-X" y="FRONT-Y" z="FRONT-Z" vx="1" vy="0" vz="0" thrust="100000.0">
125 <control-input axis="/sim/model/autopush/force-x-yasim" control="THROTTLE" src0="-1" src1="1" dst0="-1" dst1="1"/>
126 </thruster>
127 <thruster x="FRONT-X" y="FRONT-Y" z="FRONT-Z" vx="0" vy="1" vz="0" thrust="100000.0">
128 <control-input axis="/sim/model/autopush/force-y-yasim" control="THROTTLE" src0="-1" src1="1" dst0="-1" dst1="1"/>
129 </thruster>
130 <thruster x="FRONT-X" y="FRONT-Y" z="FRONT-Z" vx="0" vy="0" vz="1" thrust="100000.0">
131 <control-input axis="/sim/model/autopush/force-z-yasim" control="THROTTLE" src0="-1" src1="1" dst0="-1" dst1="1"/>
132 </thruster>
133
134 Replace FRONT-X, FRONT-Y, FRONT-Z with coordinates of your front
135 bogey.
136
137 4. Add the pushback model to your Model XML:
138
139 <model>
140 <name>Pushback</name>
141 <path>MODEL</path>
142 <offsets>
143 <x-m>FRONT-X</x-m>
144 <y-m>FRONT-Y</y-m>
145 <z-m>FRONT-Z</z-m>
146 </offsets>
147 </model>
148
149 Replace FRONT-X, FRONT-Y, FRONT-Z with coordinates of your front
150 bogey. Replace MODEL with one of the following file names:
151
152 Autopush/Goldhofert.xml for Goldhofer towbarless pushback
153
154 Edit the "SETTINGS" part in the beginning of the Goldhofert.xml to match
155 your setup.
156
157 5. Add gui/dialogs/autopush.xml to your aircraft's menu (see
158 FlightGear documentation for editing the menu).
159
160 6. Launch the simulator and try Autopush. After making sure it works,
161 complete the support by implementing some logic in your aircraft
162 and connecting the rest of the interface.
163
164 CAUTION.
165 1. Make sure to HAVE A BACK-UP COPY of your work.
166 2. If anything is not clear in the instruction below, do not guess --
167 contact the authors.
168
169 7.1. When pushback is connected ("/sim/model/autopush/connected"),
170 nose wheel steering must actuate at different speed, depending
171 on its rollspeed. The exact dependency is different per aircraft
172 and used pushback visual, and for most aircraft the only way to
173 find it is trial and error until it "looks right":
174 - the input must be taken from pushback steering command norm
175 (set by autopush-config.xml, default:
176 "/controls/flight/rudder");
177 - the output must be written to pushback orientation in degrees,
178 radians or norm (set by autopush-config.xml, default:
179 "/gear/gear[0]/steering-norm").
180
181 7.2. Set or alias (in autopush-config.xml) the availability property
182 "/sim/model/autopush/available". It must be false if e.g. the
183 aircraft is moving too fast, the front wheel is not touching
184 the ground, the aircraft is damaged or is outside of an airport
185 etc.
186
187 7.3. Make Autopush remove wheel chocks by setting the alias in
188 autopush-config.xml to the chocks property. (default:
189 "/controls/gear/wheel-chocks").
190
191 7.4. Optionally, Autopush may be made visible in multiplayer by
192 duplicating the properties used in its model.xml into some
193 unused MP properties. See the list in
194
195 https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/MultiPlayer/multiplaymgr.cxx
196
197 around line 215, and then using those properties in the
198 "SETTINGS" part of Autopush model.xml.
199
200 After making these changes check the Autopush model.xml's settings
201 and make sure they match the setup. Launch the simulator and try
202 Autopush.
203
204
205 TUNING
206
207 There should normally be no need to change the coefficients, because
208 the inertia of different aircraft is already taken into account. But
209 the gear setup may differ enough to require some tuning.
210
211 If these settings are changed during simulation, they take effect
212 after disconnecting and reconnecting the pushback.
213
214 Pushback (/sim/model/autopush):
215
216 Coefficient Unit Description
217
218 K_p ((km/h)/s)/(km/h) Proportional coefficient of PID.
219 Defines the start/stop throttle
220 and immediate response to speed
221 difference deltaV = V_set - V.
222
223 F_p (km/h)/s Proportional clipping.
224
225 K_i ((km/h)/s)/((km/h)*s) Integral coefficient of PID.
226 Defines how fast the steady
227 throttle is ramped during the
228 push.
229
230 F_i (km/h)/s Integral clipping.
231
232 K_d -((km/h)/s)/((km/h)/s) Differential coefficient of PID.
233 Stabilizes the approaching of
234 steady throttle.
235
236 F_d (km/h)/s Differential clipping.
237
238 Pushback driver (/sim/model/autopush/driver):
239
240 Coefficient Unit Description
241
242 F_V km/h Max towing speed in auto mode.
243 K_psi 1/deg Amount of steering per heading correction.
244 F_psi 1/deg Max steering per heading correction.
245 K_deltapsi -1/(deg/s) Amount of steering compensation per heading
246 derivative.
247 F_psi 1/(deg/s) Max amount of steering compensation per
248 heading derivative.