# SDK QuestionTouchdown points for a cube

Hello,

I want to update UCSO touchdown points to Orbiter 2016, as it currently uses Orbiter 2010 touchdown points copied from UCGO. The cargo is basically a cube, whose size is 1.3M as UCGO.

I've tried to use this code below, but it didn't work (the cargo sank into the ground):

Code:
	double x_target = -0.5;
double stiffness = (-1) * (GetMass() * 9.80655) / (3 * x_target);
double damping = 0.9 * (2 * sqrt(GetMass() * stiffness));

static TOUCHDOWNVTX tdvtx[8] = {
{{ 0.65, -0.65, -0.65 }, stiffness, damping, 0.5, 0.005},
{{ 0.65, -0.65, 0.65 }, stiffness, damping, 0.5, 0.005},
{{ -0.65, -0.65, 0.65 }, stiffness, damping, 0.5, 0.005},
{{ -0.65, -0.65, -0.65 }, stiffness, damping, 0.5, 0.005},

{{ 0.65, 0.65, -0.65 }, stiffness, damping, 0.5, 0.005},
{{ 0.65, 0.65, 0.65 }, stiffness, damping, 0.5, 0.005},
{{ -0.65, 0.65, 0.65 }, stiffness, damping, 0.5, 0.005},
{{ -0.65, 0.65, -0.65 }, stiffness, damping, 0.5, 0.005}
};
SetTouchdownPoints(tdvtx, 8);

The coordinates are taken from Blender and converted to Orbiter coordinates. They are the 4 edges coordinates of the top face and bottom face. Why this doesn't make a cube?

Also, what stiffness and damping values should I use?

Top:

Bottom:

Last edited:

#### gattispilot

I assume that the -.65 is at the bottom?
how far does it sink?

I assume that the -.65 is at the bottom?
how far does it sink?

Yes, it's:

It keeps sinking under the ground.

I think I made a big mistake, but I didn't find it yet.

#### 4throck

##### Enthusiast !
Unfortunately you have discovered O2016 problem with surface.
From my tests landing only works well if you vessel has a similar mass to the Deltaglider.
Too light or too heavy vessels don't behave well and skip, sink, etc.
I guess your cube is relatively light.

The point coordinates are correct, and you already have some calculations to get stiffness and damping based on mass.
But you can use fred's Vessel Builder to check them and try new values in real time.
As I said, for low masses I never got it to work, but perhaps you can find a solution

I've used Fred18 calculations to calculate the touchdown points and that worked:

Code:
          double ro = 1.3; // Your vessel size.
TOUCHDOWNVTX td[4];

double x_target = -0.5; // How many meters you want your vessel to sink 'under pressure'.
double stiffness = (-1)*(GetMass()*9.80655) / (3 * x_target);
double damping = 0.9*(2 * sqrt(GetMass()*stiffness));
for (int i = 0; i<4; i++)
{

td[i].damping = damping;
td[i].mu = 3;
td[i].mu_lng = 3;
td[i].stiffness = stiffness;
}
td[0].pos.y = -Height_From_Ground;
td[1].pos.x = 0;
td[1].pos.y = -Height_From_Ground;
td[1].pos.z = 1*ro;
td[2].pos.y = -Height_From_Ground;
td[3].pos.x = 0;
td[3].pos.y = 15 * ro;
td[3].pos.z = 0;

SetTouchdownPoints(td, 4);

I've extracted the values, as they always the same for UCSO:

Code:
	double stiffness = -(GetMass() * 9.80655) / (3 * -0.001);
double damping = 0.9 * (2 * sqrt(GetMass() * stiffness));

static TOUCHDOWNVTX tdvtx[4] = {
{{ 1.125833, -0.65, -0.65 }, stiffness, damping, 3, 3},
{{ 0, -0.65, 1.3 }, stiffness, damping, 3, 3},
{{ -1.125833, -0.65, -0.65 }, stiffness, damping, 3, 3},
{{ 0, 19.5, 0 }, stiffness, damping, 3, 3}
};

Many thanks, Fred18! Your calculations are awesome!