Discussion Setting Touchdown Points for Vessels on Solid Planet Surfaces I: The Mass Spring Damper Model

The business of vessels sliding down slopes is a different issue with the touchdown points not related to the springs. Currently the touchdown points are only very crude skids where only dynamic friction coefficients can be defined. If static friction coefficients could be applied that would allow vessels to sit at rest on slopes. Since it is only dynamic friction, all vessels will slide down hill. It's probably fine for general collision points but it can't model a skid properly, and so there is no hope of it modeling wheel motion. I personally think trying to merge the landing gear and collision models in the current touchdown points was a really bad idea. Currently I just set the friction coefficients to zero for the wheel contacts and try to make my own functions.
 
@Thunder Chicken , just wanted to say thanks for your detailed explanations on all things "TD". Has been very helpful including helping me understand that when a vessel makes contact with the ground it's not only the settings but how many points are making contact at a given moment that affects how the vessel behaves, landing on 1 point makes a big difference to landing on 4, so I've compensated for the pointy bits!
 
Hi.
Continuing the topic I attach an archive with simple Lua code, mesh (just an ellipsoid and two racks) and scenario. My TD points aren't stable enough, especially I don't like slow damping of the vessel oscillations after landing. Use the hover engine controls ("0" and "." on Numpad) and forward/back linear RCS ("6" and "9" on Numpad) for moving up/down/forward/back, respectively (by default). I'm trying to reach the following for the TD points:

  • stable and hard taxiing/landing
  • stable behavior during x10 time acceleration when the vessel is moving (at least at low speed)
  • stable bahavior during opening the Scenario Editor when the vessel is moving (at least at low speed)

The DG on Lua demonstrates all these three features, so I'd be happy to make the TD behavior of my vessel the same as for the DG on Lua.

I admit the addition of more TD points if necessary for better implementation, but I'd like to keep the y-coordinates (y=-12 m) for all the TD points, and I'd like to keep the size (50 m) of the vessel.

I'm not sure if its possible, so maybe I should to change the vessel mass (and therefore thruster parameters) or/and shift the center of mass (namely put down the mesh origin), or something else (better). Anyway I'll be glad to all suggestions and I'm ready to experiment with different values of parameters.
 

Attachments

@misha.physics I opened your airship and see this:

Screenshot at 2024-11-07 16-39-10.png

From your configuration file, the total vessel mass seems to be 1250 kg, for a total weight of 12262.5 N.

You have three touchdown points specified, one at z = +100 m and two at z = -50 m. From the rules of statics each of these contact points should be supporting an equal amount of the weight (12262.5 N / 3 = 4087.5 N).

The stiffness you prescribe of 1e4 (N/m) would require a spring displacement of 4087.5 N / 1e4 N/m = 0.409 m to support the weight of the vessel.

If the damping is set too high or too low it can cause instabilities. A good start would be trying to get something close to critical damping (no bounce or overshoot). For a spring-mass system that is determined by sqrt(4*mass*k) where k is the stiffness. For a single gear strut, assuming the mass supported is 1/3rd of the vessel mass would be fine. That gives a damping value of sqrt(4*417 kg*1e4 N/m) = 4082 kg/s or N-s/m. In your cfg file you have it set to 200 N-s/m, which means it is underdamped and the springs can bounce around for a while.

I set the damping values to 4000 N-s/m and it seems stable under 1000x time acceleration, but it is extremely sensitive to thruster inputs so I don't know how it will behave when it leaves the Landed state. I tried reducing the maximum thrust of the thrusters to something smaller but the mesh seems to flip and roll rather crazily even then.

I don't think your stability problems are due to the touchdown points, but rather the thrusters and the relatively low mass of the vessel.
 
Thanks so much. I'll do some tests (and maybe change thrusters & mass). I'm going to read this thread (I hope the problems with LaTeX will be repair).
From the rules of statics each of these contact points should be supporting an equal amount of the weight (12262.5 N / 3 = 4087.5 N).
Won't this be only right in the case of a symmetrical placement of the TD points relative to the center of mass of the body (we must use the equilibrium condition for the moments of forces if I understand correctly)? Namely when the center of mass is located at the center of an equilateral triangle, and the TD points are located at the vertices of the triangle.
 
Won't this be only right in the case of a symmetrical placement of the TD points relative to the center of mass of the body (we must use the equilibrium condition for the moment of forces if I understand correctly)? Namely when the center of mass is located at the center of an equilateral triangle, and the TD points are located at the vertices of the triangle.
For the locations of your touchdown points, one at z=+100 m and two at z=-50 m, the statics happens to work out that the load is evenly distributed. Since the vessel is symmetric on the YZ plane, you can do sum of moments in the direction of the x-axis to verify this.

If the vessel weight is W and acts downwards at {0,0,0}, taking the sum of right handed moments about the line connecting the two rear points at -50 m gives:

(F1 x 150 m) - (W x 50 m) = 0

where F1 is the contact force of the front contact point. Solving for F1 gives W/3 (1/3rd of the total vessel weight).

The sum of moments around the front contact point yields the forces acting on the rear contact points F2 and F3:

(W x 100 m) - ((F2 + F3) x 150 m) = 0

from which you get:

F2 + F3 = 2W/3

Since F2 = F3 due to symmetry, that means F1 = F2 = F3 = W/3.
 
Oh, yes, I'm sorry. It's correct.
 
@misha.physics I was looking at your airship cfg file and noticed a couple of things.

One, your touchdown points seem to be in the wrong order. The first three touchdown points are assumed to be landing gear, and should be in the order of nose wheel contact, left wheel contact, right wheel contact. The left and right contacts seem to be reversed, so the mesh wants to flip upside down.

I removed all the thrusters except for a single lift thruster, and commented out the PMI, crosssections, and rotational drag, and it seems much more stable now. Bear in mind that the coefficients of friction, rotational drag, etc.. are all additional forces on the vessel. If the parameters are inappropriate you'll get large forces that will cause instabilities. You should add physical forces incrementally and test that they work appropriately before adding more.

Code:
--[[
ClassName = SimpleAirship
Module = ScriptVessel
Script = SimpleAirship.cfg
END_PARSE
--]]

-- Vessel parameters

vprm = {                           -- general Parameters
  emass = 500,                     -- empty mass [kg]
  fuelmass = 750,                  -- propellant mass [kg]
  size = 50,                       -- mean radius [m]
  pmi = {x=10,y=30,z=10},          -- principal moments of inertia [m^2]
  cs = {x=10,y=8,z=10},            -- cross sections [m^2]
  rd = {x=5,y=0.1,z=5},            -- rotation drag coefficients
  co = {x=0,y=0,z=0},              -- cockpit camera offset
}

gears =
{
     {pos = {x=0,y=-12,z=100}, stiffness = 1e4, damping = 4e3, mu = 0.0, mu_lng = 0.0},
     {pos = {x=-20,y=-12,z=-50}, stiffness = 1e4, damping = 4e3, mu = 0.0, mu_lng = 0.0},
     {pos = {x=20,y=-12,z=-50}, stiffness = 1e4, damping = 4e3, mu = 0.0, mu_lng = 0.0}
}

-- SetClassCaps implementation

function clbk_setclasscaps(cfg)

  -- physical vessel parameters
  vi:set_size(vprm.size)
  vi:set_emptymass(vprm.emass)
  --vi:set_pmi(vprm.pmi)
  --vi:set_crosssections(vprm.cs)
  --vi:set_rotdrag(vprm.rd)
  vi:set_touchdownpoints(gears)
 
  -- propellant resources
  hProp = vi:create_propellantresource(vprm.fuelmass)
 
  -- RCS engines
  thrcs0  = vi:create_thruster({pos={x=0,y=0,z=0},dir={x=0,y=1,z=0},maxth0=20000,isp0=math.huge,hprop=hProp})
  vi:create_thrustergroup({thrcs0},THGROUP.MAIN)

  -- camera parameters
  vi:set_cameraoffset(vprm.co)
 
  -- associate a mesh for the visual
  vi:add_mesh('SimpleAirship')
  vi:set_mesh_visibility_mode(0,MESHVIS.EXTERNAL)
end
 
Last edited:
One, your touchdown points seem to be in the wrong order. The first three touchdown points are assumed to be landing gear, and should be in the order of nose wheel contact, left wheel contact, right wheel contact. The left and right contacts seem to be reversed, so the mesh wants to flip upside down.
My original file contains:
Code:
gears =
{
         {pos = {x=0,y=-12,z=100}, stiffness = 1e4, damping = 2e2, mu = 1.6, mu_lng = 0.1},
         {pos = {x=-20,y=-12,z=-50}, stiffness = 1e4, damping = 2e2, mu = 3.0, mu_lng = 0.2},
         {pos = {x=20,y=-12,z=-50}, stiffness = 1e4, damping = 2e2, mu = 3.0, mu_lng = 0.2}
}
It looks like the order is correct. The 2nd point has a negative x-coordinate, so it corresponds to the left wheel (that's the same like for the DG and ScriptPB).
 
What does this command do?:
Code:
isp0=math.huge
 
I changed the mass, thrusters, added one more TD point, changed TD points parameters, and increases the PMI. I noticed that the last expecially increases stability. Now I can taxiing on the ground with x10 time acceleration and it's very stable. Opening the Scenario Editor during moving is stable too.

It's still unstable with x10 time acceleration during takeoff (with hover engines) and expecially when HORZ LVL autopilot is enabled, but that's another thing (it might be caused by my rotation drag coefficients, zero values of cross sections, too powerful RCS). Currently I'm satishfied with results. Of course it's better to understand the meaning of all these parameters and calculate them, but I'm not there yet. Here's my updated script:
Code:
--[[
ClassName = SimpleAirship
Module = ScriptVessel
Script = SimpleAirship.cfg
END_PARSE
--]]

-- Vessel parameters

vprm = {                           -- general Parameters
  emass = 10000,                   -- empty mass [kg]
  fuelmass = 10000,                -- propellant mass [kg]
  size = 50,                       -- mean radius [m]
  pmi = {x=100,y=300,z=100},       -- principal moments of inertia [m^2]
  cs = {x=0,y=0,z=0},              -- cross sections [m^2]
  rd = {x=30,y=0,z=10},            -- rotation drag coefficients
  co = {x=0,y=-8.4,z=0},           -- cockpit camera offset
}

gears =
{
         {pos = {x=0,y=-11.56,z=20}, stiffness = 1e6, damping = 1e5, mu = 1.6, mu_lng = 0.1},
         {pos = {x=-17.32,y=-11.56,z=-10}, stiffness = 1e6, damping = 1e5, mu = 3.0, mu_lng = 0.2},
         {pos = {x=17.32,y=-11.56,z=-10}, stiffness = 1e6, damping = 1e5, mu = 3.0, mu_lng = 0.2},
         {pos = {x=0,y=-11.56,z=-20}, stiffness = 1e6, damping = 1e5, mu = 0, mu_lng = 0}
}

thmain_prm = {                 
  pos = {x=0,y=0,z=-5},         
  dir = {x=0,y=0,z=1},       
  maxth0 = 1e5,               
  isp0 = 1e5                   
}

thretro_prm = {                   
  pos = {x=0,y=0,z=10},             
  dir = {x=0,y=0,z=-1},           
  maxth0 = 5e4,               
  isp0 = 1e5                       
}

thhovr_prm = {                   
  pos = {x=0,y=0,z=0},             
  dir = {x=0,y=1,z=0},           
  maxth0 = 2.2e5,               
  isp0 = 5e5                       
}
thrcs_prm = {               
  maxth0 = 2e5,             
  isp0 = 5e4                   
}

function clbk_setclasscaps(cfg)

  vi:set_size(vprm.size)
  vi:set_emptymass(vprm.emass)
  vi:set_pmi(vprm.pmi)
  vi:set_crosssections(vprm.cs)
  vi:set_rotdrag(vprm.rd)
  vi:set_touchdownpoints(gears)
 
  hProp = vi:create_propellantresource(vprm.fuelmass)

  thmain_prm.hprop = hProp
  thmain = vi:create_thruster(thmain_prm)
  vi:create_thrustergroup({thmain},THGROUP.MAIN)

  thretro_prm.hprop = hProp
  thretro = vi:create_thruster(thretro_prm)
  vi:create_thrustergroup({thretro},THGROUP.RETRO)

  thhovr_prm.hprop = hProp
  thhovr = vi:create_thruster(thhovr_prm)
  vi:create_thrustergroup({thhovr},THGROUP.HOVER)
 
  th = thrcs_prm.maxth0
  isp = thrcs_prm.isp0
  thrcs0  = vi:create_thruster({pos={x=1,y=0,z=3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs1  = vi:create_thruster({pos={x=1,y=0,z=3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs2  = vi:create_thruster({pos={x=-1,y=0,z=3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs3  = vi:create_thruster({pos={x=-1,y=0,z=3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs4  = vi:create_thruster({pos={x=1,y=0,z=-3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs5  = vi:create_thruster({pos={x=1,y=0,z=-3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs6  = vi:create_thruster({pos={x=-1,y=0,z=-3},dir={x=0,y=1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs7  = vi:create_thruster({pos={x=-1,y=0,z=-3},dir={x=0,y=-1,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs8  = vi:create_thruster({pos={x=1,y=0,z=3},dir={x=-1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs9  = vi:create_thruster({pos={x=-1,y=0,z=3},dir={x=1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs10 = vi:create_thruster({pos={x=1,y=0,z=-3},dir={x=-1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs11 = vi:create_thruster({pos={x=-1,y=0,z=-3},dir={x=1,y=0,z=0},maxth0=th,isp0=isp,hprop=hProp})
  thrcs12 = vi:create_thruster({pos={x=0,y=0,z=-3},dir={x=0,y=0,z=1},maxth0=th,isp0=isp,hprop=hProp})
  thrcs13 = vi:create_thruster({pos={x=0,y=0,z=3},dir={x=0,y=0,z=-1},maxth0=th,isp0=isp,hprop=hProp})
  vi:create_thrustergroup({thrcs0,thrcs2,thrcs5,thrcs7},THGROUP.ATT_PITCHUP)
  vi:create_thrustergroup({thrcs1,thrcs3,thrcs4,thrcs6},THGROUP.ATT_PITCHDOWN)
  vi:create_thrustergroup({thrcs0,thrcs4,thrcs3,thrcs7},THGROUP.ATT_BANKLEFT)
  vi:create_thrustergroup({thrcs1,thrcs5,thrcs2,thrcs6},THGROUP.ATT_BANKRIGHT)
  vi:create_thrustergroup({thrcs8,thrcs11},THGROUP.ATT_YAWLEFT)
  vi:create_thrustergroup({thrcs9,thrcs10},THGROUP.ATT_YAWRIGHT)
  vi:create_thrustergroup({thrcs8,thrcs10},THGROUP.ATT_LEFT)
  vi:create_thrustergroup({thrcs9,thrcs11},THGROUP.ATT_RIGHT)
  vi:create_thrustergroup({thrcs12},THGROUP.ATT_FORWARD)
  vi:create_thrustergroup({thrcs13},THGROUP.ATT_BACK)

  vi:set_cameraoffset(vprm.co)
 
  vi:add_mesh('SimpleAirship')
  vi:set_mesh_visibility_mode(0,MESHVIS.EXTERNAL)
end
 
I changed the mass, thrusters, added one more TD point, changed TD points parameters, and increases the PMI. I noticed that the last expecially increases stability. Now I can taxiing on the ground with x10 time acceleration and it's very stable. Opening the Scenario Editor during moving is stable too.

It's still unstable with x10 time acceleration during takeoff (with hover engines) and expecially when HORZ LVL autopilot is enabled, but that's another thing (it might be caused by my rotation drag coefficients, zero values of cross sections, too powerful RCS). Currently I'm satishfied with results. Of course it's better to understand the meaning of all these parameters and calculate them, but I'm not there yet. Here's my updated script:
You're arbitrarily changing the vessel mass and stiffness/damping parameters. They affect the stability of the touchdown points. If you carefully follow the procedure that I outlined at the start of this thread that will give you a stable touchdown point system.
 
Yes, I agree. I'd return to parameter calculation, hope LaTeX will return to the forum (although it can be read even now). I think I'll be able to update my add-on someday.
 
I've been doing quite a lot of tinkering with the touchdown points ...
@Thunder Chicken, thank you for giving the touchdown points a scientific approach! (y)

When checking the spaceplanes compatibility with Orbiter 2024, I found that after touchdown they were either catapulted from the runway or went into a wild ground spin. It seems like the ground contact evaluation is more stringent than in Orbiter 2016.

When using your formula, I found the resulting stiffness a little softer, but the damping much softer, by 2 orders of magnitude!
I applied these values and ... everything was fine!

I put the formulas into a spreadsheet (attached), to help other Orbinauts who may face the same problem.
Only addition is to multiply the weight with an 'Impact factor'. This is to simulate the touchdown bump.
If only the static weight is applied, the springs are very soft, and the plane 'bottoms-out' at landing.
With an increased touchdown factor, you can tune the springs a bit harder.
If the impact factor is set to 1, you end up with the original equilibrium formula.

1736963669832.png 0022a.jpg
 

Attachments

@Thunder Chicken, thank you for giving the touchdown points a scientific approach! (y)

When checking the spaceplanes compatibility with Orbiter 2024, I found that after touchdown they were either catapulted from the runway or went into a wild ground spin. It seems like the ground contact evaluation is more stringent than in Orbiter 2016.

When using your formula, I found the resulting stiffness a little softer, but the damping much softer, by 2 orders of magnitude!
I applied these values and ... everything was fine!

I put the formulas into a spreadsheet (attached), to help other Orbinauts who may face the same problem.
Only addition is to multiply the weight with an 'Impact factor'. This is to simulate the touchdown bump.
If only the static weight is applied, the springs are very soft, and the plane 'bottoms-out' at landing.
With an increased touchdown factor, you can tune the springs a bit harder.
If the impact factor is set to 1, you end up with the original equilibrium formula.

View attachment 41720 View attachment 41730
I'm glad to help. Another way of thinking of the "impact factor" is that it represents the worst vertical acceleration anticipated on the wheels at touchdown in terms of the local acceleration of gravity g. As you say, a vessel that only rolls around the surface at 1 g can set this to 1.0. A vessel like the X-37B that is expected to land smoothly on a runway might experience 1.2 g. A navy aircraft landing controlled crashing onto an aircraft carrier deck might benefit from setting it to 2 or so.

I find that the dampening value is often the biggest reason for instability, as that dampening value is multiplied by the y-component of velocity. If it is set too high and you hit the ground too fast, Orbiter extrapolates that force over the entire timestep and overestimates the applied impulse, which can punt your vessel into space easily. If the dampening value is set to more appropriate values, that is much less likely to occur.

The critical value of damping is the minimum amount of damping that would eliminate overshoot (the springs will displace, then slowly move back to equilibrium). You can lower the damping even further if you want some bounciness in your springs. You can set the damping to 0, but then you are riding pure springs and will bounce and bounce and bounce...

Taking a little time to estimate and compute appropriate stiffness and dampening values would probably fix stability problems with a lot of add-ons and give a more realistic experience.
 
Last edited:
I made my original post into a PDF to restore the LaTex equations since they don't render properly anymore. I've attached it here and to the original post.
 

Attachments

Back
Top