static TOUCHDOWNVTX tdvtx[ntdvtx] = {
{ _V(0, .001, 1.5), 5883, 4142, 3.2, 0.8 },
{ _V(-2, .001, -2.6), 5883, 4142, 3.2, 0.4 },
{ _V(2, .001, -2.6), 5883, 4142, 3.2, 0.4 }
But it seems to pitch down on the pad.
And if I raise the touchdown y values it lowers the vessel.
gattispilot, when you finally solve your touchdown pioints issues, I'll open one of the good bottles I keep for those special occasions!
Oh!!Of course. You're essentially raising the wheels when you do that.
static TOUCHDOWNVTX tdvtx[ntdvtx] = {
{ _V(0, .001, 1.5), 13883, 12142, 3.2, 0.8 },
{ _V(-2, .001, -2.6), 5883, 4142, 3.2, 0.4 },
{ _V(2, .001, -2.6), 5883, 4142, 3.2, 0.4 }
So you are not raising the bottom of the mesh?
So you are not raising the bottom of the mesh?
static const DWORD ntdvtx_geardown = 3;
static TOUCHDOWNVTX tdvtx_geardown[ntdvtx_geardown] = {
{ _V(0, 9.4, 22), 26150800, 18409627, 1.6, 0.1 },
{ _V(-20, 9.4, -22), 26150800, 18409627, 3.0, 0.2 },
{ _V(20, 9.4, -22), 26150800, 18409627, 3.0, 0.2 }
};
void SLSTOWER2::clbkSetClassCaps(FILEHANDLE cfg)
//void SLSTOWER2::SetTransporter()
{
// physical specs
SetSize(60);
//SetEmptyMass(1170000000000000000);3,730,000
SetEmptyMass(4000000);
SetCW(0.3, 0.3, 0.6, 0.9);
SetWingAspect(0.1);
SetWingEffectiveness(0.1);
SetCrossSections(_V(950,838.24,1080));
SetRotDrag(_V(0.1, 0.1, 0.1));
if (GetFlightModel() >= 1) {
SetPitchMomentScale(1e-4);
SetBankMomentScale(1e-4);
}
SetPMI(_V(.88, .99, .84));
SetTrimScale(0.05);
SetCameraOffset(_V(0, 1.2, 0));
SetTouchdownPoints(tdvtx_geardown, ntdvtx_geardown);
Thanks I will adjust. Of course the tower doesn't have springs,....
But I haven't tried releasing ucgo cargo and seeing what it does.
/**
* \brief Creates the default triangle of attachment points for this vessels landing gear.
* If there is no hullshape, the points created by orbiter will be used.
* \note There must be at least 3 landing gears on the vessel for this method to work!
* \returns A vector with size 3.
* \note Assumes that the ground-contact plane is perpendicular to the y-axis, does not work for other arrangements!
*/
void setDefaultTdStiffness(TOUCHDOWNVTX *IN_OUT_tdarray, double displacement)
{
vector<double> proportional_loads(3);
double proportional_sum = 0.0;
//calculate proportional loads
for (UINT i = 0; i < 3; ++i)
{
double propdist_from_cog = (abs(IN_OUT_tdarray[i].pos.x) + abs(IN_OUT_tdarray[i].pos.z));
//guard against division by zero
if (propdist_from_cog == 0)
{
proportional_loads[i] = 1;
}
else
{
proportional_loads[i] = 1 / propdist_from_cog;
}
proportional_sum += proportional_loads[i];
}
//normalise the proportional loads so the total sum is 1, calculate the effective load and the required stiffness.
//we'll take a default damping value for now.
double mass = vessel->GetMass() * 2;
double normaliser = 1 / proportional_sum;
for (UINT i = 0; i < 3; ++i)
{
double effective_load = (proportional_loads[i] * normaliser) * mass;
double stiffness = effective_load / displacement;
IN_OUT_tdarray[i].stiffness = stiffness;
IN_OUT_tdarray[i].damping = TD_DAMPING;
}
}
Code:double propdist_from_cog = (abs(IN_OUT_tdarray[i].pos.x) + abs(IN_OUT_tdarray[i].pos.z));
double propdist_from_cog = hypot(IN_OUT_tdarray[i].pos.x, IN_OUT_tdarray[i].pos.z));
I haven't looked at the code closely enough yet to fully understand it, but the above line stuck me as odd. I would have expected
Since I only need the proportional distances, that struck me as a waste of cycles...
You mean you are only interested in approximate results? However, since the difference can run up to a factor of 2^0.5 when |x|=|z|, the loss of accuracy could be quite significant.
Another thing: Your code seems to assume that the load is a function of distance from the projected CoG _only_, but that isn't true. If you have three points with the same proportional distances, but two of them close together, then their loads will be lower than that of the third point.