Board index FlightGear Development Aircraft

Glider ground movement system for yasim gliders

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Glider ground movement system for yasim gliders

Postby D-ECHO » Mon Dec 12, 2016 8:06 pm

Hi!
In the past few weeks/months I've developed a simple system to move gliders while they are on the ground. As they have no engines (obviously) gliders have to be carried around with external force, be it people or cars pulling them. This is also the base for my system. It consists of two major parts:
1. assisting gears: These are extra "gears" simulating a person standing next to your glider and holding its wings levelled. It is enabled when the menu entry is selected while the aircraft is on ground and not faster than 15kts (have you ever seen a person running faster than that? :P)
2. movement system: This also consists of another two parts:
2.1 turn system: These are forces added to the wingtips of the gliders for turning it right/left. It's connected to /controls/flight/rudder when the conditions (same as for asssting gears) are met
2.2 motion system: These are forces added similar to a pushback on the main wheel simulating pushing it back or forward. It's connected to the throttle and reversed by Del-key when the conditions mentioned are met.
The code
Here's the code to add it to any yasim glider you want:
FDM file
Code: Select all
 <!--Added for easy ground handling-->
<!--Assiting gears for ground movement-->
<gear x="-2" y="3" z="-0.25" compression=".1"   <!-- x/y coordinates: somewhere under your wing, about 3-5m from root--> <!--z coordinate: some centimeters above main wheel contact point-->
    spring="0.8" damp="1.2" sfric="0.8" dfric="0.7" skid="true">
  <control-input axis="/controls/gear/assist" control="EXTEND"/>
  <control-output control="EXTEND" prop="/gear/gear[6]/position-norm"/>
</gear>
<gear x="-2" y="-3" z="-0.25" compression=".1"   <!-- x/y coordinates: somewhere under your wing, about 3-5m from root--> <!--z coordinate: some centimeters above main wheel contact point-->
    spring="0.8" damp="1.2" sfric="0.8" dfric="0.7" skid="true">
  <control-input axis="/controls/gear/assist" control="EXTEND"/>
  <control-output control="EXTEND" prop="/gear/gear[7]/position-norm"/>
</gear>
<!--Pushing/pulling the aircraft around:-->
<!--TURN, this is done by tearing the wings around-->
  <thruster x="-2.615"  y="8" z="0.1" vx="1" vy="-1" vz="0" thrust="100">    <!-- x/y/z coordinates: wingtip-->
  <control-input axis="/controls/flight/rudder2" control="THROTTLE" src0="-1" src1="1" dst0="-1" dst1="1"/>
  </thruster>
  <thruster x="-2.615"  y="-8" z="0.1" vx="-1" vy="1" vz="0" thrust="100">    <!-- x/y/z coordinates: wingtip-->
  <control-input axis="/controls/flight/rudder2" control="THROTTLE" src0="-1" src1="1" dst0="-1" dst1="1"/>
  </thruster>
  <!--Push/pull forward-->
  <thruster x="-2.615" y="0" z="-0.466" vx="1" vy="0" vz="0" thrust="200">   <!-- x/y/z coordinates: Main wheel contact point-->
  <control-input axis="/controls/throttle-2" control="THROTTLE"/>
  </thruster>
  <!--Push/pull backward-->
  <thruster x="-2.615" y="0" z="-0.466" vx="-1" vy="0" vz="0" thrust="200">   <!-- x/y/z coordinates: Main wheel contact point-->
      <control-input axis="/controls/throttle-reverse" control="THROTTLE"/>
  </thruster>

The nasal file
Put the following into a nasal file called ground-handling.nas (inside YOURAIRCRAFT/Nasal/)
Code: Select all
####ASK13 Ground handling system

setlistener("/sim/signals/fdm-initialized", func {
    print("Ground handling system loaded");
    settimer(update_systems, 2);
    });

var update_systems = func {
#Assisting person
if(getprop("/velocities/groundspeed-kt")<15 & getprop("gear/gear[1]/wow")==1 & getprop("/controls/gear/assist-1")==1){
setprop("controls/gear/assist", 1);
}else{
setprop("controls/gear/assist", 0);
}
#Rudder
#Conditions: must be on ground, must have ground handling enabled (have people standing there) and people can only run up to 15kts (about)
if(getprop("/controls/ground-handling")==1 & getprop("/gear/gear[1]/wow")==1 & getprop("/velocities/groundspeed-kt")<15){
    setprop("/controls/flight/rudder2", getprop("/controls/flight/rudder"));
    setprop("/controls/flight/aileron2", getprop("/controls/flight/aileron"));
    setprop("/controls/throttle-2", getprop("/controls/engines/engine/throttle"));
    if(getprop("/controls/engines/engine/reverser")==1){
        setprop("/controls/throttle-2", 0);
        setprop("/controls/throttle-reverse", getprop("/controls/engines/engine/throttle"));
    }else{
        setprop("/controls/throttle-reverse", 0);
    }
}else{
        setprop("/controls/flight/aileron2", 0);
        setprop("/controls/flight/rudder2", 0);
        setprop("/controls/throttle-2", 0);
        setprop("/controls/throttle-reverse", 0);
        }

    settimer(update_systems,0);
}

The -set.xml
Put these snippets into your -set.xml
1. Nasal file include: Add this into the <nasal> section under the <nameofyouraircraft>
Code: Select all
         <file>Aircraft/ASK13/Nasal/systems.nas</file>

2. Keyboard binding - reverse: Add this into <input> <keyboard>:
Code: Select all
        <key n="127">
            <name>Delete</name>
            <desc>Toggle Reversers</desc>
            <binding>
                <condition>
                    <less-than>
                        <property>controls/engines/engine[0]/throttle</property>
                        <value>0.1</value>
                    </less-than>
                </condition>
                <command>property-toggle</command>
                <property>controls/engines/engine[0]/reverser</property>
            </binding>
        </key>

3. Property intialization: Add this into <controls>
Code: Select all
            <ground-handling type="bool">false</ground-handling>

4. Menu bindings: Add this into your menu section <sim> <menubar> <default> <menu n="10">
Code: Select all
     <item>
       <label>Toggle ground handling</label>
       <binding>
         <command>property-toggle</command>
         <property>/controls/ground-handling</property>
       </binding>
     </item>   
     <item>
       <label>Toggle assiting gears</label>
       <binding>
         <command>property-toggle</command>
         <property>/controls/gear/assist-1</property>
       </binding>
     </item>   

5. Help (optional): Add this into <sim> <help> <text>
Code: Select all
=== Ground handling ===
This aircraft has some features to make ground handling easier/possible at all. When pressing "Toggle assiting gears" the aircraft gets levelled around the x-axes as if someone was holding your wing ;) When pressing "Toggle ground handling", two features are enanled to pull the aircraft around on the ground: 1. All rudder inputs are copied to a thruster, as if someone was pulling your wing so the aircraft turns and 2.  all throttle inputs cause your aircraft to taxi, as if someone (or a car) was pulling/pushing it.
When there is somebody with a followme around, you can connect to it by pressing Ctrl+o (release: Ctrl+shift+o) so he can carry you around the airport or even tow you into the air! (also check the Aerotow Settings therefor).

Example:
You can take my ASK13 improved version as an example: https://github.com/D-ECHO/ASK13
What's left to say
Regards and happy gliding!
D-ECHO
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Glider ground movement system for yasim gliders

Postby LesterBoffo » Sun Dec 25, 2016 7:46 pm

D-Echo, you mentioned that there could be animations of walkers to add as submodels?. This could be a good feature with WWI aircraft that need ground handling crews.
User avatar
LesterBoffo
 
Posts: 2171
Joined: Sun Oct 02, 2011 5:02 pm
Location: Oregon, USA
Callsign: LesBof
Version: 2018.3.2
OS: Win10 Pro

Re: Glider ground movement system for yasim gliders

Postby D-ECHO » Sun Dec 25, 2016 8:16 pm

Generally, what I did in the DG1001 was to add a simple model of a pilot holding the wing to the dg1001.ac and a select animation that shows him when /controls/gear/assist is true
D-ECHO
 
Posts: 2462
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Glider ground movement system for yasim gliders

Postby LesterBoffo » Tue Dec 27, 2016 5:49 am

I think the legs animation from the FG Hang-glider would suffice, I could use my pre-WWI pilot figure as he is set up with articulated body parts.
User avatar
LesterBoffo
 
Posts: 2171
Joined: Sun Oct 02, 2011 5:02 pm
Location: Oregon, USA
Callsign: LesBof
Version: 2018.3.2
OS: Win10 Pro

Re: Glider ground movement system for yasim gliders

Postby Octal450 » Tue Dec 27, 2016 6:00 am

Why don't you just use a glorified pushback system? It already works, just add a custom dialog/nasal script to control it, and maybe some key bindings?
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5601
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: Glider ground movement system for yasim gliders

Postby LesterBoffo » Wed Dec 28, 2016 7:25 pm

Because I don't need a pushback. I would like to implement a selective animation with submodels that 'walk' with the aircraft while its under it's own power, and when turning forces are needed, the wing crews will stop walking and 'dig their heels in' to pivot the aircraft by creating ground drag on the invisible wing bogies. This is exactly how ground crews helped steer taxiing WWI aircraft around, especially when in adverse wind conditions.

This is because most WWI aircraft sat at an angle of attack that most assuredly would cause for some spectacular ground loops and stubborn adverse yaw force problems because of the rudder being nearly ineffective while the tail was down. Add into the mix a lot of P-effect and gyro procession with a rotary engine which made for even more problems on the ground.
User avatar
LesterBoffo
 
Posts: 2171
Joined: Sun Oct 02, 2011 5:02 pm
Location: Oregon, USA
Callsign: LesBof
Version: 2018.3.2
OS: Win10 Pro


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 7 guests