JSBSim GroundReactions: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
(Switch to {{sourceforge source}} to fix the broken Gitorious link and update to the current JSBSim repository location.)
(29 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[JSBSim]] provides a framework for aerodynamics. This page will attempt to explain how to navigate the black art of [[JSBSim]] ground reactions, and how to create [[FDM]]s that are sane.
[[JSBSim]] provides a framework for aerodynamics. This page will attempt to explain how to navigate the black art of [[JSBSim]] ground reactions, and how to create [[FDM]]s that are sane.


Landing gear model.
You will want to create ground reaction points for every part of the landing gear that may touch or interact with the ground, but also structural points for other parts of the aircraft that may touch or interact with the ground, for instance in a crash.  
    Calculates forces and moments due to landing gear reactions. This is done in
    several steps, and is dependent on what kind of gear is being modeled. Here
    are the parameters that can be specified in the config file for modeling
    landing gear:
    <p>
    <h3>Physical Characteristics</h3>
    <ol>
    <li>X, Y, Z location, in inches in structural coordinate frame</li>
    <li>Spring constant, in lbs/ft</li>
    <li>Damping coefficient, in lbs/ft/sec</li>
    <li>Dynamic Friction Coefficient</li>
    <li>Static Friction Coefficient</li>
    </ol></p><p>
    <h3>Operational Properties</h3>
    <ol>
    <li>Name</li>
    <li>Brake Group Membership {one of LEFT | CENTER | RIGHT | NOSE | TAIL | NONE}</li>
    <li>Max Steer Angle, in degrees</li>
    </ol></p>
    <p>
    <h3>Algorithm and Approach to Modeling</h3>
    <ol>
    <li>Find the location of the uncompressed landing gear relative to the CG of
    the aircraft. Remember, the structural coordinate frame that the aircraft is
    defined in is: X positive towards the tail, Y positive out the right side, Z
    positive upwards. The locations of the various parts are given in inches in
    the config file.</li>
    <li>The vector giving the location of the gear (relative to the cg) is
    rotated 180 degrees about the Y axis to put the coordinates in body frame (X
    positive forwards, Y positive out the right side, Z positive downwards, with
    the origin at the cg). The lengths are also now given in feet.</li>
    <li>The new gear location is now transformed to the local coordinate frame
    using the body-to-local matrix. (Mb2l).</li>
    <li>Knowing the location of the center of gravity relative to the ground
    (height above ground level or AGL) now enables gear deflection to be
    calculated. The gear compression value is the local frame gear Z location
    value minus the height AGL. [Currently, we make the assumption that the gear
    is oriented - and the deflection occurs in - the Z axis only. Additionally,
    the vector to the landing gear is currently not modified - which would
    (correctly) move the point of contact to the actual compressed-gear point of
    contact. Eventually, articulated gear may be modeled, but initially an
    effort must be made to model a generic system.] As an example, say the
    aircraft left main gear location (in local coordinates) is Z = 3 feet
    (positive) and the height AGL is 2 feet. This tells us that the gear is
    compressed 1 foot.</li>
    <li>If the gear is compressed, a Weight-On-Wheels (WOW) flag is set.</li>
    <li>With the compression length calculated, the compression velocity may now
    be calculated. This will be used to determine the damping force in the
    strut. The aircraft rotational rate is multiplied by the vector to the wheel
    to get a wheel velocity in body frame. That velocity vector is then
    transformed into the local coordinate frame.</li>
    <li>The aircraft cg velocity in the local frame is added to the
    just-calculated wheel velocity (due to rotation) to get a total wheel
    velocity in the local frame.</li>
    <li>The compression speed is the Z-component of the vector.</li>
    <li>With the wheel velocity vector no longer needed, it is normalized and
    multiplied by a -1 to reverse it. This will be used in the friction force
    calculation.</li>
    <li>Since the friction force takes place solely in the runway plane, the Z
    coordinate of the normalized wheel velocity vector is set to zero.</li>
    <li>The gear deflection force (the force on the aircraft acting along the
    local frame Z axis) is now calculated given the spring and damper
    coefficients, and the gear deflection speed and stroke length. Keep in mind
    that gear forces always act in the negative direction (in both local and
    body frames), and are not capable of generating a force in the positive
    sense (one that would attract the aircraft to the ground). So, the gear
    forces are always negative - they are limited to values of zero or less. The
    gear force is simply the negative of the sum of the spring compression
    length times the spring coefficient and the gear velocity times the damping
    coefficient.</li>
    <li>The lateral/directional force acting on the aircraft through the landing


    gear (along the local frame X and Y axes) is calculated next. First, the
==Landing gear model==
    friction coefficient is multiplied by the recently calculated Z-force. This
Calculates forces and moments due to landing gear reactions. This is done in
    is the friction force. It must be given direction in addition to magnitude.
several steps, and is dependent on what kind of gear is being modeled. Here
    We want the components in the local frame X and Y axes. From step 9, above,
are the parameters that can be specified in the config file for modeling
    the conditioned wheel velocity vector is taken and the X and Y parts are
landing gear:
    multiplied by the friction force to get the X and Y components of friction.
    </li>
    <li>The wheel force in local frame is next converted to body frame.</li>
    <li>The moment due to the gear force is calculated by multiplying r x F
    (radius to wheel crossed into the wheel force). Both of these operands are
    in body frame.</li>
    </ol>


    <h3>Configuration File Format:</h3>
===Physical Characteristics===
<code>
#Name and type.  BOGEY refers to contact points associated with the landing gear while STRUCTURE represents contact points associated with the airframe.
         &lt;contact type="{BOGEY | STRUCTURE}" name="{string}"&gt;
#*Both of these contact types basically result in a force which resists the penetration of the ground by the aircraft. The main difference between the two types of contacts is how the ground reaction force is computed--BOGEY types exert forces only in the vertical direction in the aircraft's frame of reference, whereas STRUCTURE types can exert force in any direction.
             &lt;location unit="{IN | M}"&gt;
#*Furthermore the BOGEY type includes features which are typical to landing gears such as brake and steering.
                 &lt;x&gt; {number} &lt;/x&gt;
#X, Y, Z location, in inches in structural coordinate frame
                 &lt;y&gt; {number} &lt;/y&gt;
#*It may require experimentation to determine the X,Y,Z coordinates to use for contact points that will correspond to the same points on your visual model and look right.  As weight or force is put on the contact points, they will compress and move--just as a spring compresses and contracts when forced is placed on it.  Just for example, if bottom of the left landing gear is located at 20,40,-60 on your model, locating the JSBSim contact point at 20,40,-60 while most likely result in your landing gear appearing to be underground when the aircraft is on the runway.  The reason is that if you have set the <spring_coeff> for the contact point to be, say, 200 LBS/FT and the landing gear has 400 LBS of force on it, it will be compressed by 2 FT--and thus in a spot 2 FT upwards from the point you specified.  Generally you will need to specify your contact points some distance outwards from the aircraft body itself to compensate for this--a bit below the actual location of the landing gear, above the top of the fuselage, etc.  The exact amount will depend on your <spring_coeff> and the characteristics of your aircraft, including its mass distribution and the location and characteristics of other contact points.
                 &lt;z&gt; {number} &lt;/z&gt;
#Spring constant, in lbs/ft
             &lt;/location&gt;
#Damping coefficient, in lbs/ft/sec for linear damping or lbs/ft/sec^2 for square damping
             &lt;orientation unit="{RAD | DEG}"&gt;
#Dynamic Friction Coefficient
                 &lt;pitch&gt; {number} &lt;/pitch&gt;
#Static Friction Coefficient
                 &lt;roll&gt; {number} &lt;/roll&gt;
 
                 &lt;yaw&gt; {number} &lt;/yaw&gt;
===Operational Properties===
             &lt;/orientation&gt;
 
             &lt;static_friction&gt; {number} &lt;/static_friction&gt;
#Name
             &lt;dynamic_friction&gt; {number} &lt;/dynamic_friction&gt;
BOGEY contact points also have the properties below available.  These additional properties do not apply to STRUCTURE contact points and will be ignored if they are included in contact point definitions:
             &lt;rolling_friction&gt; {number} &lt;/rolling_friction&gt;
#Brake Group Membership {one of LEFT | CENTER | RIGHT | NOSE | TAIL | NONE}
             &lt;spring_coeff unit="{LBS/FT | N/M}"&gt; {number} &lt;/spring_coeff&gt;
#Max Steer Angle, in degrees.  If negative, the steering will be in the opposite direction. 360 represents an un-steered caster.
             &lt;spring_coeff_rebound unit="{LBS/FT | N/M}"&gt; {number} &lt;/spring_coeff_rebound&gt;
 
            &lt;damping_coeff [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC}"&gt; {number} &lt;/damping_coeff&gt;
===Algorithm and Approach to Modeling===
             &lt;damping_coeff_rebound [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC}"&gt; {number} &lt;/damping_coeff_rebound&gt;
#Find the location of the uncompressed landing gear relative to the CG of the aircraft. Remember, the structural coordinate frame that the aircraft is defined in is: X positive towards the tail, Y positive out the right side, Z positive upwards. The locations of the various parts are given in inches in the config file.
             &lt;max_steer unit="DEG"&gt; {number | 0 | 360} &lt;/max_steer&gt;
#The vector giving the location of the gear (relative to the cg) is rotated 180 degrees about the Y axis to put the coordinates in body frame (X positive forwards, Y positive out the right side, Z positive downwards, with the origin at the cg). The lengths are also now given in feet.
             &lt;brake_group&gt; {NONE | LEFT | RIGHT | CENTER | NOSE | TAIL} &lt;/brake_group&gt;
#The new gear location is now transformed to the local coordinate frame using the body-to-local matrix. (Mb2l).
             &lt;retractable&gt;{0 | 1}&lt;/retractable&gt;
#Knowing the location of the center of gravity relative to the ground (height above ground level or AGL) now enables gear deflection to be calculated. The gear compression value is the local frame gear Z location value minus the height AGL. [Currently, we make the assumption that the gear is oriented - and the deflection occurs in - the Z axis only. Additionally, the vector to the landing gear is currently not modified - which would (correctly) move the point of contact to the actual compressed-gear point of contact. Eventually, articulated gear may be modeled, but initially an effort must be made to model a generic system.] As an example, say the aircraft left main gear location (in local coordinates) is Z = 3 feet (positive) and the height AGL is 2 feet. This tells us that the gear is compressed 1 foot.
             &lt;table type="{CORNERING_COEFF}"&gt;
#If the gear is compressed, a Weight-On-Wheels (WOW) flag is set.
             &lt;/table&gt;
#With the compression length calculated, the compression velocity may now be calculated. This will be used to determine the damping force in the strut. The aircraft rotational rate is multiplied by the vector to the wheel to get a wheel velocity in body frame. That velocity vector is then transformed into the local coordinate frame.
         &lt;/contact&gt;
#The aircraft cg velocity in the local frame is added to the just-calculated wheel velocity (due to rotation) to get a total wheel velocity in the local frame.
</code>
#The compression speed is the Z-component of the vector.
#With the wheel velocity vector no longer needed, it is normalized and multiplied by a -1 to reverse it. This will be used in the friction force calculation.
#Since the friction force takes place solely in the runway plane, the Z coordinate of the normalized wheel velocity vector is set to zero.
#The gear deflection force (the force on the aircraft acting along the local frame Z axis) is now calculated given the spring and damper coefficients, and the gear deflection speed and stroke length. Keep in mind that gear forces always act in the negative direction (in both local and body frames), and are not capable of generating a force in the positive sense (one that would attract the aircraft to the ground). So, the gear forces are always negative - they are limited to values of zero or less. The gear force is simply the negative of the sum of the spring compression length times the spring coefficient and the gear velocity times the damping coefficient.
#*BOGEY forces act only in the z direction (vertical plane) whereas structure forces work in any/all directions (that is, the total force is calculated for both BOGEY and STRUCTURE, and then for BOGEY elements only the z component in the aircraft frame of reference is used).  This is one reason it is important to surround BOGEY contact points with STRUCTURE contact points so that BOGEY contact points act only at angles near the vertical.
#The lateral/directional force acting on the aircraft through the landing gear (along the local frame X and Y axes) is calculated next. First, the friction coefficient is multiplied by the recently calculated Z-force. This is the friction force. It must be given direction in addition to magnitude. We want the components in the local frame X and Y axes. From step 9, above, the conditioned wheel velocity vector is taken and the X and Y parts are multiplied by the friction force to get the X and Y components of friction.
#The wheel force in local frame is next converted to body frame.
#The moment due to the gear force is calculated by multiplying r x F (radius to wheel crossed into the wheel force). Both of these operands are in body frame.
 
===Configuration File Format:===
<syntaxhighlight lang="xml">
         <contact type="{BOGEY | STRUCTURE}" name="{string}">
             <location unit="{IN | M}">
                 <x> {number} </x>
                 <y> {number} </y>
                 <z> {number} </z>
             </location>
             <orientation unit="{RAD | DEG}">
                 <pitch> {number} </pitch>
                 <roll> {number} </roll>
                 <yaw> {number} </yaw>
             </orientation>
             <static_friction> {number} </static_friction>
             <dynamic_friction> {number} </dynamic_friction>
             <rolling_friction> {number} </rolling_friction>
             <spring_coeff unit="{LBS/FT | N/M}"> {number} </spring_coeff>
             <damping_coeff [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC | LBS/FT2/SEC2 | N/M2/SEC2}"> {number} </damping_coeff>
             <damping_coeff_rebound [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC| LBS/FT2/SEC2 | N/M2/SEC2}"> {number} </damping_coeff_rebound>
             <max_steer unit="DEG"> {number | 0 | 360} </max_steer>
             <brake_group> {NONE | LEFT | RIGHT | CENTER | NOSE | TAIL} </brake_group>
             <retractable>{0 | 1}</retractable>
             <table type="{CORNERING_COEFF}">
             </table>
         </contact>
</syntaxhighlight>
====Damping coefficients====
The parameters <damping_coeff> and <damping_coeff_rebound> set the damping coefficient on compression and rebound, respectively. If <damping_coeff_rebound> is omitted, the rebound coefficient defaults to the same as the <damping_coeff>.
 
The <damping_coeff> and <damping_coeff_rebound> parameters can be set to use either linear or square damping. The default is linear (damping proportional to the velocity of the compression or rebound). Use 'type="SQUARE"' to specify square damping (damping proportional to the square of velocity of the compression or rebound). 
 
If linear, units are LBS/FT/SEC or N/M/SEC.  If square, units are LBS/FT2/SEC2 or N/M2/SEC2. 
 
Using square damping should result in more vigorous damping under extreme forces and accelerations and its use, especially for <damping_coeff_rebound>, may help reduce extreme ground reaction forces sometimes experienced under JSBSim.
 
====Retractable landing gear====
Setting retractable to 1 simply alerts JSBSim that this gear is retractable.  If the gear is retracted in Flightgear, JSBSim will simply ignore this contact point entirely.
 
JSBSim considers a gear that is even partially retracted (99% extended or less) to be retracted and ignores it.
 
===Hints===
*FlightGear runs JSBSim at 120 Hertz. That's fine for the overall FDM, but incredibly slow for a high fidelity gear model. The problem is worse for a higher spring rate gear, use the softest spring rate you can live with.
*Spring rate (spring_coeff) is the weight on the gear divided by the gear deflection. You can specify Pounds per foot or Newtons per Meter. Look at photos of the aircraft you are modeling before and after it lands to get an idea about how far the gears compress. Multiplying gear/compression-ft by the spring rate will tell you how much weight is on the gear so you can tune it.
*Contacts of type BOGEY get out of control if they intersect the ground at a steep angles. Use STRUCTURE contacts around the BOGEY to limit the ground contact angle.
*Aeromatic uses 20% of the spring rate for a damping rate on the main gear and tail gear and 30% of the nose spring rate.
 
===Additional Parameter: Relaxation Velocity===
Any contact point can have a relaxation_velocity element. Example of the [http://en.wikipedia.org/wiki/Relaxation_(physics) relaxation velocity] parameter input:
<syntaxhighlight>
    <relaxation_velocity>
      <rolling unit="FT/SEC"> 0 </rolling>
      <side unit="FT/SEC"> 0 </side>
    </relaxation_velocity>
</syntaxhighlight>
According to Jon Berndt ([http://permalink.gmane.org/gmane.games.flightgear.devel/41836 here]), "This turns off the fade-in/out for forces at near-zero or zero velocity."  Normally this would ''not'' be set to 0, as it is in this example.
 
===Additional function: Strut Force===
JSBSim now allows inclusion of an arbitrary table or function to calculate strut force, rather than using JSBSim's built-in functions to calculate forces and damping on a contact point.  This should be operational in Flightgear 2.8 and forward.  Include a section like this within your contact definition:
<syntaxhighlight>
            <strut_force>
                <function>
                    <sum>
                        <product>
                            <value> -5400. </value>
                            <property> gear/unit[2]/compression-ft </property>
                        </product>
                        <ifthen>
                            <ge>
                                <property> gear/unit[2]/compression-velocity-fps </property>
                                <value> 0.0 </value>
                            </ge>
                            <product>
                                <value> -160. </value>
                                <property> gear/unit[2]/compression-velocity-fps </property>
                            </product>
                            <product>
                                <value> -320. </value>
                                <property> gear/unit[2]/compression-velocity-fps </property>
                            </product>
                        </ifthen>
                    </sum>
                </function>
            </strut_force>
</syntaxhighlight>
 
The strut_force section above would replace and replicate the function of this section of a contact definition:
<syntaxhighlight>
            <spring_coeff unit="LBS/FT">5400</spring_coeff>
            <damping_coeff unit="LBS/FT/SEC">160</damping_coeff>
            <damping_coeff_rebound unit="LBS/FT/SEC">320</damping_coeff_rebound>
</syntaxhighlight>
[http://forum.flightgear.org/viewtopic.php?f=49&t=20599 More information and example usage here.]
 
{{sourceforge source|proj=jsbsim|repo=code|commit=2f03c48f8e5d7e56ca2f134c0a63efc477616c19|text=JSBSim example usage here}}.
 
===How ground reaction forces are calculated===
 
The ground reactions are computed as forces that support the aircraft above the ground, and affect the motion over the ground. These forces can thus be split into two components:
#the ground normal reaction, ie, support of the aircraft above the ground
#the ground tangential reaction, ie, friction of the aircraft along the ground
 
JSBSim computes the ground normal reaction by a spring/damper model. The normal reaction
force is therefore obtained by the formula
 
  Fn = k*u + b*v (linear damping)
 
Or
 
  Fn = k*u + b*v^2 (square damping)
where k is the spring stiffness, b is the spring damping, u is the displacement due to compression, and v is the rate of compression. Spring damping, b, is
 
Parameters u and v are computed by JSBSim and k and b are given respectively by the <spring_coeff>,
<damping_coeff> and <damping_coeff_rebound> properties in the <contact> element definition. If v is positive then <damping_coeff> is used; if v is negative then <damping_coeff_rebound> is used.
 
If the strut_force element is included, then your calculation of the strut force is substituted in placed of this formula, and parameters <spring_coeff>, <damping_coeff> and <damping_coeff_rebound> are ignored.
 
Note that there is no upper limit to amount of compression of a contact element allowed--and thus the amount of force generated under, for example, extreme ground collisions.  This is one reason for the extremely elastic ground collisions sometimes observed when JSBSim aircraft strike the ground at high speed.
 
([http://jsbsim.sourceforge.net/JSBSim/FGLGear_8cpp_source.html See the actual code that implements this under function ComputeVerticalStrutForce here]
 
===Other resources===
[http://jsbsim.sourceforge.net/documentation.html JSBSim documentation at sourceforge.net]
 
[http://jsbsim.sourceforge.net/JSBSim/classJSBSim_1_1FGLGear.html FGLGear class documentation at sourceforge.net], which documents the code that interprets the GroundReactions section of the XML file.
 
[http://jsbsim.sourceforge.net/CreatingJSBSimAircraft.pdf A Journal for the Creation and Refinement of a JSBSim Aircraft Flight Model], which takes a step-by-step approach to development of a JSBSim flight dynamics model.  Note that this is based on an earlier version of JSBSim, so many of the parameters outlined above where not yet available.  See the Ground Reactions section starting on page 5.
 
{{JSBSim}}

Revision as of 17:39, 9 March 2016

JSBSim provides a framework for aerodynamics. This page will attempt to explain how to navigate the black art of JSBSim ground reactions, and how to create FDMs that are sane.

You will want to create ground reaction points for every part of the landing gear that may touch or interact with the ground, but also structural points for other parts of the aircraft that may touch or interact with the ground, for instance in a crash.

Landing gear model

Calculates forces and moments due to landing gear reactions. This is done in
several steps, and is dependent on what kind of gear is being modeled. Here
are the parameters that can be specified in the config file for modeling
landing gear:

Physical Characteristics

  1. Name and type. BOGEY refers to contact points associated with the landing gear while STRUCTURE represents contact points associated with the airframe.
    • Both of these contact types basically result in a force which resists the penetration of the ground by the aircraft. The main difference between the two types of contacts is how the ground reaction force is computed--BOGEY types exert forces only in the vertical direction in the aircraft's frame of reference, whereas STRUCTURE types can exert force in any direction.
    • Furthermore the BOGEY type includes features which are typical to landing gears such as brake and steering.
  2. X, Y, Z location, in inches in structural coordinate frame
    • It may require experimentation to determine the X,Y,Z coordinates to use for contact points that will correspond to the same points on your visual model and look right. As weight or force is put on the contact points, they will compress and move--just as a spring compresses and contracts when forced is placed on it. Just for example, if bottom of the left landing gear is located at 20,40,-60 on your model, locating the JSBSim contact point at 20,40,-60 while most likely result in your landing gear appearing to be underground when the aircraft is on the runway. The reason is that if you have set the <spring_coeff> for the contact point to be, say, 200 LBS/FT and the landing gear has 400 LBS of force on it, it will be compressed by 2 FT--and thus in a spot 2 FT upwards from the point you specified. Generally you will need to specify your contact points some distance outwards from the aircraft body itself to compensate for this--a bit below the actual location of the landing gear, above the top of the fuselage, etc. The exact amount will depend on your <spring_coeff> and the characteristics of your aircraft, including its mass distribution and the location and characteristics of other contact points.
  3. Spring constant, in lbs/ft
  4. Damping coefficient, in lbs/ft/sec for linear damping or lbs/ft/sec^2 for square damping
  5. Dynamic Friction Coefficient
  6. Static Friction Coefficient

Operational Properties

  1. Name

BOGEY contact points also have the properties below available. These additional properties do not apply to STRUCTURE contact points and will be ignored if they are included in contact point definitions:

  1. Brake Group Membership {one of LEFT | CENTER | RIGHT | NOSE | TAIL | NONE}
  2. Max Steer Angle, in degrees. If negative, the steering will be in the opposite direction. 360 represents an un-steered caster.

Algorithm and Approach to Modeling

  1. Find the location of the uncompressed landing gear relative to the CG of the aircraft. Remember, the structural coordinate frame that the aircraft is defined in is: X positive towards the tail, Y positive out the right side, Z positive upwards. The locations of the various parts are given in inches in the config file.
  2. The vector giving the location of the gear (relative to the cg) is rotated 180 degrees about the Y axis to put the coordinates in body frame (X positive forwards, Y positive out the right side, Z positive downwards, with the origin at the cg). The lengths are also now given in feet.
  3. The new gear location is now transformed to the local coordinate frame using the body-to-local matrix. (Mb2l).
  4. Knowing the location of the center of gravity relative to the ground (height above ground level or AGL) now enables gear deflection to be calculated. The gear compression value is the local frame gear Z location value minus the height AGL. [Currently, we make the assumption that the gear is oriented - and the deflection occurs in - the Z axis only. Additionally, the vector to the landing gear is currently not modified - which would (correctly) move the point of contact to the actual compressed-gear point of contact. Eventually, articulated gear may be modeled, but initially an effort must be made to model a generic system.] As an example, say the aircraft left main gear location (in local coordinates) is Z = 3 feet (positive) and the height AGL is 2 feet. This tells us that the gear is compressed 1 foot.
  5. If the gear is compressed, a Weight-On-Wheels (WOW) flag is set.
  6. With the compression length calculated, the compression velocity may now be calculated. This will be used to determine the damping force in the strut. The aircraft rotational rate is multiplied by the vector to the wheel to get a wheel velocity in body frame. That velocity vector is then transformed into the local coordinate frame.
  7. The aircraft cg velocity in the local frame is added to the just-calculated wheel velocity (due to rotation) to get a total wheel velocity in the local frame.
  8. The compression speed is the Z-component of the vector.
  9. With the wheel velocity vector no longer needed, it is normalized and multiplied by a -1 to reverse it. This will be used in the friction force calculation.
  10. Since the friction force takes place solely in the runway plane, the Z coordinate of the normalized wheel velocity vector is set to zero.
  11. The gear deflection force (the force on the aircraft acting along the local frame Z axis) is now calculated given the spring and damper coefficients, and the gear deflection speed and stroke length. Keep in mind that gear forces always act in the negative direction (in both local and body frames), and are not capable of generating a force in the positive sense (one that would attract the aircraft to the ground). So, the gear forces are always negative - they are limited to values of zero or less. The gear force is simply the negative of the sum of the spring compression length times the spring coefficient and the gear velocity times the damping coefficient.
    • BOGEY forces act only in the z direction (vertical plane) whereas structure forces work in any/all directions (that is, the total force is calculated for both BOGEY and STRUCTURE, and then for BOGEY elements only the z component in the aircraft frame of reference is used). This is one reason it is important to surround BOGEY contact points with STRUCTURE contact points so that BOGEY contact points act only at angles near the vertical.
  12. The lateral/directional force acting on the aircraft through the landing gear (along the local frame X and Y axes) is calculated next. First, the friction coefficient is multiplied by the recently calculated Z-force. This is the friction force. It must be given direction in addition to magnitude. We want the components in the local frame X and Y axes. From step 9, above, the conditioned wheel velocity vector is taken and the X and Y parts are multiplied by the friction force to get the X and Y components of friction.
  13. The wheel force in local frame is next converted to body frame.
  14. The moment due to the gear force is calculated by multiplying r x F (radius to wheel crossed into the wheel force). Both of these operands are in body frame.

Configuration File Format:

        <contact type="{BOGEY | STRUCTURE}" name="{string}">
            <location unit="{IN | M}">
                <x> {number} </x>
                <y> {number} </y>
                <z> {number} </z>
            </location>
            <orientation unit="{RAD | DEG}">
                <pitch> {number} </pitch>
                <roll> {number} </roll>
                <yaw> {number} </yaw>
            </orientation>
            <static_friction> {number} </static_friction>
            <dynamic_friction> {number} </dynamic_friction>
            <rolling_friction> {number} </rolling_friction>
            <spring_coeff unit="{LBS/FT | N/M}"> {number} </spring_coeff>
            <damping_coeff [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC | LBS/FT2/SEC2 | N/M2/SEC2}"> {number} </damping_coeff>
            <damping_coeff_rebound [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC| LBS/FT2/SEC2 | N/M2/SEC2}"> {number} </damping_coeff_rebound>
            <max_steer unit="DEG"> {number | 0 | 360} </max_steer>
            <brake_group> {NONE | LEFT | RIGHT | CENTER | NOSE | TAIL} </brake_group>
            <retractable>{0 | 1}</retractable>
            <table type="{CORNERING_COEFF}">
            </table>
        </contact>

Damping coefficients

The parameters <damping_coeff> and <damping_coeff_rebound> set the damping coefficient on compression and rebound, respectively. If <damping_coeff_rebound> is omitted, the rebound coefficient defaults to the same as the <damping_coeff>.

The <damping_coeff> and <damping_coeff_rebound> parameters can be set to use either linear or square damping. The default is linear (damping proportional to the velocity of the compression or rebound). Use 'type="SQUARE"' to specify square damping (damping proportional to the square of velocity of the compression or rebound).

If linear, units are LBS/FT/SEC or N/M/SEC. If square, units are LBS/FT2/SEC2 or N/M2/SEC2.

Using square damping should result in more vigorous damping under extreme forces and accelerations and its use, especially for <damping_coeff_rebound>, may help reduce extreme ground reaction forces sometimes experienced under JSBSim.

Retractable landing gear

Setting retractable to 1 simply alerts JSBSim that this gear is retractable. If the gear is retracted in Flightgear, JSBSim will simply ignore this contact point entirely.

JSBSim considers a gear that is even partially retracted (99% extended or less) to be retracted and ignores it.

Hints

  • FlightGear runs JSBSim at 120 Hertz. That's fine for the overall FDM, but incredibly slow for a high fidelity gear model. The problem is worse for a higher spring rate gear, use the softest spring rate you can live with.
  • Spring rate (spring_coeff) is the weight on the gear divided by the gear deflection. You can specify Pounds per foot or Newtons per Meter. Look at photos of the aircraft you are modeling before and after it lands to get an idea about how far the gears compress. Multiplying gear/compression-ft by the spring rate will tell you how much weight is on the gear so you can tune it.
  • Contacts of type BOGEY get out of control if they intersect the ground at a steep angles. Use STRUCTURE contacts around the BOGEY to limit the ground contact angle.
  • Aeromatic uses 20% of the spring rate for a damping rate on the main gear and tail gear and 30% of the nose spring rate.

Additional Parameter: Relaxation Velocity

Any contact point can have a relaxation_velocity element. Example of the relaxation velocity parameter input:

    <relaxation_velocity>
      <rolling unit="FT/SEC"> 0 </rolling>
      <side unit="FT/SEC"> 0 </side>
    </relaxation_velocity>

According to Jon Berndt (here), "This turns off the fade-in/out for forces at near-zero or zero velocity." Normally this would not be set to 0, as it is in this example.

Additional function: Strut Force

JSBSim now allows inclusion of an arbitrary table or function to calculate strut force, rather than using JSBSim's built-in functions to calculate forces and damping on a contact point. This should be operational in Flightgear 2.8 and forward. Include a section like this within your contact definition:

             <strut_force>
                <function>
                    <sum>
                        <product>
                            <value> -5400. </value>
                            <property> gear/unit[2]/compression-ft </property>
                        </product>
                        <ifthen>
                            <ge>
                                <property> gear/unit[2]/compression-velocity-fps </property>
                                <value> 0.0 </value>
                            </ge>
                            <product>
                                <value> -160. </value>
                                <property> gear/unit[2]/compression-velocity-fps </property>
                            </product>
                            <product>
                                <value> -320. </value>
                                <property> gear/unit[2]/compression-velocity-fps </property>
                            </product>
                        </ifthen>
                    </sum>
                </function>
            </strut_force>

The strut_force section above would replace and replicate the function of this section of a contact definition:

            <spring_coeff unit="LBS/FT">5400</spring_coeff>		
            <damping_coeff unit="LBS/FT/SEC">160</damping_coeff>		
            <damping_coeff_rebound unit="LBS/FT/SEC">320</damping_coeff_rebound>

More information and example usage here.

JSBSim example usage here.

How ground reaction forces are calculated

The ground reactions are computed as forces that support the aircraft above the ground, and affect the motion over the ground. These forces can thus be split into two components:

  1. the ground normal reaction, ie, support of the aircraft above the ground
  2. the ground tangential reaction, ie, friction of the aircraft along the ground

JSBSim computes the ground normal reaction by a spring/damper model. The normal reaction force is therefore obtained by the formula

  Fn = k*u + b*v (linear damping) 

Or

  Fn = k*u + b*v^2 (square damping)

where k is the spring stiffness, b is the spring damping, u is the displacement due to compression, and v is the rate of compression. Spring damping, b, is

Parameters u and v are computed by JSBSim and k and b are given respectively by the <spring_coeff>, <damping_coeff> and <damping_coeff_rebound> properties in the <contact> element definition. If v is positive then <damping_coeff> is used; if v is negative then <damping_coeff_rebound> is used.

If the strut_force element is included, then your calculation of the strut force is substituted in placed of this formula, and parameters <spring_coeff>, <damping_coeff> and <damping_coeff_rebound> are ignored.

Note that there is no upper limit to amount of compression of a contact element allowed--and thus the amount of force generated under, for example, extreme ground collisions. This is one reason for the extremely elastic ground collisions sometimes observed when JSBSim aircraft strike the ground at high speed.

(See the actual code that implements this under function ComputeVerticalStrutForce here

Other resources

JSBSim documentation at sourceforge.net

FGLGear class documentation at sourceforge.net, which documents the code that interprets the GroundReactions section of the XML file.

A Journal for the Creation and Refinement of a JSBSim Aircraft Flight Model, which takes a step-by-step approach to development of a JSBSim flight dynamics model. Note that this is based on an earlier version of JSBSim, so many of the parameters outlined above where not yet available. See the Ground Reactions section starting on page 5.