Howto:Implement pushback
Currently, pushback is only used on JSBSim planes.
Within a short period, some generic pushback models will be available in the $FG_ROOT/Models directory. These models can be used at any plane, in a process that is described below.
Systems/pushback.xml
Create the following directory, if not present:
- $FG_ROOT/Aircraft/.../Systems
<system name="pushback"> <channel name="Pushback"> <switch name="systems/pushback/linked"> <default value="0"/> <test logic="AND" value="1"> /sim/model/pushback/position-norm == 1 /gear/gear/wow == 1 </test> </switch> <switch name="systems/pushback/force"> <default value="0"/> <test logic="AND" value="/sim/model/pushback/magnitude"> systems/pushback/linked == 1 gear/unit[0]/wheel-speed-fps lt 500 </test> <output>external_reactions/pushback/magnitude</output> </switch> </channel> </system>
.xml
In the FDM file we have to add the pushback engine.
<engine file="pushback"> ...
After the </propulsion> tag we add a reference to the pushback system:
<system file="pushback"/>
And at the end of the FDM, the following is needed to attach the forces of the pushback to the aircraft:
<external_reactions> <force name="pushback" frame="BODY"> <location unit="IN"> <x> -139 </x> <y> 0.0 </y> <z> -71.0 </z> </location> <direction> <x>1</x> <y>0</y> <z>0</z> </direction> </force> </external_reactions>
-set.xml
Between the <model> tags in the -set.xml file we set two properties to false (0).
<model> <pushback> <magnitude>0</magnitude> <linked>0</linked> <position-norm>0</position-norm> </pushback> </model>
Models/ .xml
In your planes model file, we add a reference to one of the generic pushback models, or a custom made truck, shipped with your plane. Edit the offsets to fit your plane. The nosegear of the aircraft should be between the rear gear of the pushback, when it is connected.
<model> <name>Pushback</name> <path>Models\Airport\Pushback\Goldhofert.xml</path> <offsets> <x-m>-25.0</x-m> <y-m>0</y-m> <z-m>-4.0</z-m> </offsets> </model>