Howto:Implement pushback: Difference between revisions

Jump to navigation Jump to search
Adding How-To Yasim-Pushback- Thanks for the idea Gijs!
(Adding How-To Yasim-Pushback- Thanks for the idea Gijs!)
Line 1: Line 1:
[[Image:747-400_pushback_eham.jpg|thumb|270px|A KLM [[Boeing 747-400]] ready for pushback at [[EHAM]]. This is the Goldhofert truck.]]
[[Image:747-400_pushback_eham.jpg|thumb|270px|A KLM [[Boeing 747-400]] ready for pushback at [[EHAM]]. This is the Goldhofert truck.]]
[[Image:F-16 pushback.jpg|thumb|270px|A [[F-16]] being towed at [[KLSV]]. This is the military truck.]]
[[Image:F-16 pushback.jpg|thumb|270px|A [[F-16]] being towed at [[KLSV]]. This is the military truck.]]
Currently, [[pushback]] is only used on [[JSBSim]] planes. It should be possible with [[YASim]] aswell, but it has never be done yet.
Currently, [[pushback]] is only used on [[JSBSim]] planes. It is possible with [[YASim]] aswell, but the method differs a bit.


'''Please note: this system does not work over a [[Howto: Multiplayer|multiplay]] network.'''
'''Please note: this system does not work over a [[Howto: Multiplayer|multiplay]] network.'''


===Systems/pushback.xml===
 
== For JSBSim ==
 
 
=== Systems/pushback.xml===
Create the following directory, if not present <tt>[[$FG_ROOT]]/Aircraft/.../Systems</tt> and create a file named pushback.xml with the following content:
Create the following directory, if not present <tt>[[$FG_ROOT]]/Aircraft/.../Systems</tt> and create a file named pushback.xml with the following content:


Line 49: Line 53:
This is the "cruise control" for the pushback truck. You define the cruise speed at the dialog and the controller varies the external force in a way that the actual speed matches your given value. The working horses here are the summer, which compares actual and reference speed, and the PID controller which calculates the resulting force. A basic description is: "the more actual and reference speed differ, the more force is applied (kp) plus the more time passes until the reference speed is reached, the more force is applied (ki)". The switches check, if the pushback truck is actually linked to the aircraft.
This is the "cruise control" for the pushback truck. You define the cruise speed at the dialog and the controller varies the external force in a way that the actual speed matches your given value. The working horses here are the summer, which compares actual and reference speed, and the PID controller which calculates the resulting force. A basic description is: "the more actual and reference speed differ, the more force is applied (kp) plus the more time passes until the reference speed is reached, the more force is applied (ki)". The switches check, if the pushback truck is actually linked to the aircraft.


===.xml (FDM)===
=== .xml (FDM)===
After the </propulsion> tag we add a reference to the pushback system:
After the </propulsion> tag we add a reference to the pushback system:


Line 73: Line 77:
  </external_reactions>
  </external_reactions>


===-set.xml===
=== -set.xml===
Between the <model> tags in the -set.xml file add the definitions for the speed-hold controller:
Between the <model> tags in the -set.xml file add the definitions for the speed-hold controller:
  <model>
  <model>
Line 105: Line 109:
  </menubar>
  </menubar>


===Models/ .xml===
=== 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 z offset should be at ground level, while the x offset is at the nosewheel(center).
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 z offset should be at ground level, while the x offset is at the nosewheel(center).


Line 122: Line 126:
   </offsets>
   </offsets>
  </model>
  </model>
== For YASim ==
For YASim we have to fake the external forces with the thruster. A thruster in YASim is a very simple "thrust only" engine object which not consume any fuel etc.
=== .xml (FDM)===
So we add this following lines to our yasim.xml:
<thruster x="19.246"  y="0.00" z="-2.7" vx="1" vy="0" vz="0" thrust="20000">
  <control-input axis="/sim/model/pushback/target-speed-fps" control="THROTTLE"
  src0="-1" src1="1" dst0="-1" dst1="1"/>
</thruster>
For the coordinates use the same like the ccordinates of the Nosegear. The thrust itself is in lbs- don't set it too high! 1/3 of the of the aircrafts empty mass should be enough!
Then we just have to add our [[Menubar|menu]] dialog. A generic one is available at <tt>$FG_ROOT/gui/Dialogs/pushback.xml</tt>. Add the following lines to include it in the Equipment menu of the aircraft. Note: if the menubar and default tags are already there, you do no need to add them again. Just place the stuff between them.
<menubar>
  <default>
   
  <menu n="5">
    <item n="10">
    <label>Pushback</label>
    <name>pushback</name>
    <binding>
      <command>dialog-show</command>
      <dialog-name>pushback</dialog-name>
    </binding>
    </item>
  </menu>
  </default>
</menubar>
=== Models/ .xml===
And lke in JSBSim, 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 z offset should be at ground level, while the x offset is at the nosewheel(center).
<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>
Note: If the aircraft author didn't use gear/gear[0]/steering-norm for ground steering, the pushback model won't be turn with the nosegear
Done! Now you have Pushback on your favourite YASim-Model!


[[Category:Aircraft enhancement|Implent pushback]]
[[Category:Aircraft enhancement|Implent pushback]]
[[Category:Howto|Implent pushback]]
[[Category:Howto|Implent pushback]]
884

edits

Navigation menu