Programming Question Touchdown and eva

How to do this?
I have a vessel of a box I can pick it up and move it. But drop it and it goes under the surface,

What I would really like is a cheat where if not attached then forced landed

Melissa_Lewis:2016SEVASOLIDRED
STATUS Landed Moon
POS -6.8116090 -80.3592728
HEADING 66.56
ALT 0.900
AROT 4.407 -29.882 168.943
AFCMODE 7
NAVFREQ 0 0
EVA_TIME 1675.757815
OXYGEN 97.090698
VISOR 0.000000
SVISOR 0.000000
FVISOR 0.025585
LIGHTS 0
TYPE 1
END
SAMPLEBAG:ARTEMISEVATOOLS\EVASAMPLEBAG
STATUS Orbiting Moon
RPOS -26235891686.015 126344123518.253 242077058073.022
RVEL -758728527.7309 3653840483.1522 7000674858.6288
AROT 5.371 5.087 -178.736
VROT -2212.7271 1210.3617 -17822.4258
AFCMODE 7
NAVFREQ 0 0
TYPE 9
END
 

Attachments

  • SAMPLEBAG2.jpg
    SAMPLEBAG2.jpg
    51.1 KB · Views: 1
  • SAMPLEBAG1.jpg
    SAMPLEBAG1.jpg
    39.2 KB · Views: 1
I see that UACS Cargo does what I want. You drop the package and it lands.
the UACS code is here: https://github.com/abdullah-radwan/UACS/tree/master
The best I can tell if ground contact??? then set the vs state to 1 landed.

if (!GetFlightStatus() && GroundContact())
{
VECTOR3 angAcc; GetAngularAcc(angAcc);

if (length(angAcc) < 0.5)
{
VESSELSTATUS2 status = GetVesselStatus(this);
status.status = 1;

SetGroundRotation(status, cargoInfo.frontPos, cargoInfo.rightPos, cargoInfo.leftPos);
DefSetStateEx(&status);
}
}

So I have this as I understand if on the ground then make it landed, right? It lands good but still moves
void LEVA::clbkPreStep(double simt, double simdt, double mjd)
{
{
VESSELSTATUS2 vs;
memset(&vs, 0, sizeof(vs));
vs.version = 2;
GetStatusEx(&vs);

if (GroundContact() == true)



vs.status = 1; // Landed


DefSetStateEx(&vs2);

}
}
 
Last edited:
cargoInfo.frontPos = { 0, -0.65, 0.65 };
cargoInfo.rightPos = { 0.65, -0.65, -0.65 };
cargoInfo.leftPos = { -0.65, -0.65, -0.65 };

double stiffness = 100 * GetMass();
double damping = 2 * sqrt(GetMass() * stiffness);

std::array<TOUCHDOWNVTX, 7> tdVtx
{ {
{{ 0, -0.65, 0.65 }, stiffness, damping, 3, 3},
{{ -0.65, -0.65, -0.65 }, stiffness, damping, 3, 3},
{{ 0.65, -0.65, -0.65 }, stiffness, damping, 3, 3},
{{ -0.65, 0.65, -0.65 }, stiffness, damping, 3, 3},
{{ 0.65, 0.65, -0.65 }, stiffness, damping, 3, 3},
{{ -0.65, -0.65, 0.65 }, stiffness, damping, 3, 3},
{{ 0.65, -0.65, 0.65 }, stiffness, damping, 3, 3}
} };

SetTouchdownPoints(tdVtx.data(), tdVtx.size());

// If the cargo was unpacked and it is landed
if (init && status.status)
{
SetGroundRotation(status, cargoInfo.frontPos, cargoInfo.rightPos, cargoInfo.leftPos);
DefSetStateEx(&status);
}
}

It is also based off the cfg. But if the cargo is on the surface it it landed. I can't find that function SetGroundRotation

I think what needs to happen if the vessel is on the ground then make it landed. I think I have that. But it is not landing
 
I used the UACS mass of 50. But if a guy picks up a cargo and drops it. The cargo is a landed vessel
 
Back
Top