Thanks. Yes I now set the TD of the ascent the same as the descent. When I separate. it is good. But when I apply hover the descent goes below the surface?
Not sure why the hover indicator is weird?
void SpiderLEM::SetConfig2_Reentry(void)
{
SetSize(6);
SetEmptyMass(CM_DRYMASS);
SetPMI(_V(1, 1, 1));
// SetCW (0.5, 0.5, 1, 1);
SetCrossSections(_V(24, 28, 19));
SetWingAspect(1);
SetWingEffectiveness(1);
SetPitchMomentScale(-1e-5);
SetBankMomentScale(-1e-5);
SetRotDrag(_V(0.01, 0.01, 0.005));
SetCameraOffset(_V(0, 0, -1.8));
SetTouchdownPoints(tdvtx_geardown, ntdvtx_geardown);
//SetTouchdownPoints(_V(0, -2, 0), _V(-2, 1, 0), _V(2, 1, 0));
SetSurfaceFrictionCoeff(0.2, 0.2);
SetMeshVisibilityMode(mesh_DS, MESHVIS_NEVER);//sm
//SetDockParams(_V(0, 0, 2.1), _V(0, 0, 1), _V(0, 1, 0));
//CreateAirfoil(LIFT_VERTICAL, _V(0, 0.01, 0.1), VLiftCoeff, 5.5, 0, 1.27);
//CreateAirfoil(LIFT_HORIZONTAL, _V(0, 0, 0.01), HLiftCoeff, 5.5, 0, 1.27);
//mode = 2;
//CHANGESTATE();
//SetThrusters2_Reentry();
//thrusters:
ClearThrusterDefinitions();
ClearPropellantResources();
ph_RM = CreatePropellantResource(SM_FUEL, SM_FUEL, 1);
SetDefaultPropellantResource(ph_RM);
THRUSTER_HANDLE th_att_lin[2];
th_att_lin[0] = CreateThruster(_V(0, 0, 9), _V(0, 1, 0), MAIN_THRUST, ph_RM, MAIN_ISP);
CreateThrusterGroup(th_att_lin, 1, THGROUP_MAIN);
AddExhaust(th_att_lin[0], MAIN_ENGSIZE, tex_main);
// main dummy for exhaust stream
th_att_lin[1] = CreateThruster(_V(0, 0, 9), _V(0, 1, 0), 0, ph_RM, MAIN_ISP);
CreateThrusterGroup(th_att_lin, 2, THGROUP_MAIN);
AddExhaustStream(th_att_lin[1], &main_stream);
//rcs
THRUSTER_HANDLE th_rcs[50], th_group[4];
td code:
const double pesototal=LEM_DescentMASS+LEM_DescentFUEL;
const double xtx_target=-0.1;
const double xtst=(-1)*(pesototal*9.80655)/(3*xtx_target);
const double xtda=0.9*(2*sqrt(pesototal*xtst));
static const DWORD ntdvtx_geardown = 4;
static TOUCHDOWNVTX tdvtx_geardown[ntdvtx_geardown] = {
{_V( -4,1.363,-4), xtst, xtda, 30.0,30},
{ _V(4, 1.363, -4), xtst, xtda, 30.0, 30 },
{ _V(4, 1.363, 4), xtst, xtda, 30.0, 30 },
{ _V(-4, 1.363, 4), xtst, xtda, 30.0 }
};