Request Artemis landers

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,089
Reaction score
908
Points
128
Website
francisdrakex.deviantart.com
I am trying to get the Ascent stage to separate. But I get this.
I think, the ascent stage needs the same touchdown points as the original vessel.

If this still does not help, make the new touchdown points a little higher than the old ones (like 0.05m).
Then, after being created, the new vessel falls down a little, and lands again on the new touchdown points.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
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 } };
 

Attachments

  • hudissue.jpg
    hudissue.jpg
    28.6 KB · Views: 13
  • lmlandersep1.jpg
    lmlandersep1.jpg
    54.2 KB · Views: 14
  • lmlandersep2.jpg
    lmlandersep2.jpg
    17.2 KB · Views: 13

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
I think this is correct? The whole vessel is a tail sitter so forward is along the Y axis not z axis. So Technically the ascent engine should be hover? But firing along the y axis UP THRUSTER_HANDLE th_att_lin[1]; th_att_lin[0] = CreateThruster(_V(0, 8.9, 0), _V(0, 1, 0), MAIN_THRUST, ph_RM, MAIN_ISP);
 

Attachments

  • lmlanderrcs.jpg
    lmlanderrcs.jpg
    16.7 KB · Views: 11

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
Thanks. But I wonder about Rcs directions. I guess forward rcs would follow the main thrust y+
 

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,089
Reaction score
908
Points
128
Website
francisdrakex.deviantart.com
Actually no, the RCS modes better follow the line of sight. This is usually +Z.

As Orbiter uses a left-handed axis system, I always look on my left hand when programming the thrusters. With the first 3 fingers spread at 90° each, the thumb points to +X, the index finger is +Y, the middle finger is +Z.

As the pilot looks in +Z direction, forward should also be in this direction.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
Thanks. So I think this may be correct? I think I need to rotate the SM 90 degrees?
 

Attachments

  • lmrcsarrangement.jpg
    lmrcsarrangement.jpg
    116.3 KB · Views: 7

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
I think this is correct. A couple of issues. The Ascent was docking to the descent so for now I just removed the dock

But I get a CTD. When running in debug I have a break in the key 6 and I get symbol not loaded?

I need to adjust TD point? on the ascent so when focus you are on the center and not below?
 

Attachments

  • symbolfile.jpg
    symbolfile.jpg
    43.2 KB · Views: 9
  • break.jpg
    break.jpg
    64 KB · Views: 9
  • lmlandersetup3.jpg
    lmlandersetup3.jpg
    40.9 KB · Views: 10

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,089
Reaction score
908
Points
128
Website
francisdrakex.deviantart.com
I think, both orientations are correct, for their respective vessel types.

The left picture shows a hover vessel. I think the mesh needs to be rotated by 180° around it long axis, so the windows are facing forward when landing.

The right picture shows a classical tailsitter. It depends, what type of vessel you want to make.
Each mode has its advantages. The hover vessel is good for a propulsive landing, as you can see the landing area in front of you.
The tailsitter is handy for orbit and docking operations.
_______

This contradiction made me once build a vessel, which can switch between hover and tailsitter, using code from BrianJ to transform the vessel vector by 90° - thanks Brian!

In case you are interested, I have included the Lunar Excursion Vehicle (LEV) here, with the cpp-code.
In the cpp-file look for "case OAPI_KEY_M" to see the magic transformation code.
---
Edit: Use the attached LEV-02b version. This removes a bug using an outdated FalconHeavy version on launch.
 

Attachments

  • LEV-02b.zip
    666 KB · Views: 3
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
I am confused. I am trying to get the thruster orientation to work. I think the whole vessel (descent and Ascent) are hover vessels. where Y axis is up/down.
But the Ascent I think needs to a vessel where Z is forward.
 

Attachments

  • lmlanderorientation.jpg
    lmlanderorientation.jpg
    30.8 KB · Views: 6
  • lmlanderrcs (1).jpg
    lmlanderrcs (1).jpg
    33.8 KB · Views: 6

barrygolden

Well-known member
Joined
Nov 3, 2009
Messages
949
Reaction score
298
Points
78
Location
North of Houston
New Images from the Moon ship Might need some updating
New leg and pad design
deployable Solar panels that can be retracted
Black color on the engine bay and cabin
new elevator door door design

might think about gattis's EVA guys on the elevator and deploy from there as well as he's Flex rover
 

Attachments

  • HLS engine Black.png
    HLS engine Black.png
    410.8 KB · Views: 14
  • HLS Cabin black.png
    HLS Cabin black.png
    529.5 KB · Views: 16
  • HLS.png
    HLS.png
    278.1 KB · Views: 18
  • HLS_11-02-23_1.jpeg
    HLS_11-02-23_1.jpeg
    32.1 KB · Views: 19
  • HLS legs.png
    HLS legs.png
    135.6 KB · Views: 17
  • HLS orbit.png
    HLS orbit.png
    526.2 KB · Views: 14

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
I need some code help.

Working on the LAnder/separation

This code rotates the ascent stage. This works. but on reload I get a CTD
// ============= Righten up the ascent stage ============== VESSELSTATUS2 vs2; char name[256] = { "" }; memset(&vs2, 0, sizeof(VESSELSTATUS2)); vs2.version = 2; VESSEL* v = oapiGetVesselInterface(oapiGetFocusObject()); v->GetStatusEx(&vs2); vs2.status = 0; // 0 VECTOR3 yup; GlobalRot(_V(0, 0, -1), yup); VECTOR3 zforward; GlobalRot(_V(0, 1, 0), zforward); VECTOR3 xright; GlobalRot(_V(1, 0, 0), xright); double gamma = atan2(xright.x, yup.x); double beta = -1 * (asin(zforward.x)); double alpha = atan2(zforward.y, zforward.z); vs2.arot = _V(alpha, beta, (PI / 2) - gamma); v->DefSetStateEx(&vs2);

If i comment it reloads fine but the vessel is not rotated.

When I ran a debug it breaks here:VESSEL* v = oapiGetVesselInterface(oapiGetFocusObject()); Access voilation
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
Just a quick guess: oapiGetFocusObject() does not return a valid value?
You should never assume things to go right, better assume things to go wrong and act accordingly.
Even if the code looks more bloated!
So:
C++:
auto vessel = oapiGetFocusObject();
if (vessel) {
  // ...
}
...what to do if vessel is invalid? I don't know ;)
 

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,089
Reaction score
908
Points
128
Website
francisdrakex.deviantart.com
I think oapiGetFocusObject() should always return a value.
If not, there would be no focus object in the simulation.

You can check in the PreStep-loop if any value was returned :
void MyVessel::clbkPreStep (double simt, double simdt, double mjd) { ... sprintf(oapiDebugString(), "Vessel = %d", vessel); ... }
___
B.t.w., maybe a silly question, but what is auto vessel?
Shouldn't that be OBJHANDLE* vessel (if you split the inquiry of the focus object)?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
Thanks. So it seems to be working now.

Not sure why the offset of the ascent stage though? All meshes are centered.
void CEV::blowAsc() { // Create the spent ascent stage as an individual object VESSELSTATUS vs; GetStatus(vs); vs.flag[0] = 3; VECTOR3 ofs = { 0,0,0 }; Local2Rel(ofs, vs.rpos); VECTOR3 vel = _V(0, 0, -0.1); VECTOR3 rofs, rvel = { vs.rvel.x, vs.rvel.y, vs.rvel.z }; Local2Rel(ofs, vs.rpos); GlobalRot(vel, rofs); vs.rvel.x = rvel.x + rofs.x; vs.rvel.y = rvel.y + rofs.y; vs.rvel.z = rvel.z + rofs.z; char name[256] = { "" }; strcpy(name, GetName()); strcpy(name, "-asc"); oapiCreateVessel(name, "MAV\\MAVasc", vs); if (oapiGetTimeAcceleration() > 10) oapiSetTimeAcceleration(10); }

and then it shows this mesh: ofs is 0,0,0
case 4: // Asc ready for launch AddMesh(MAVmeshup, &ofs); // AddMesh(MAVascMeshup, &ofs); break;
 

Attachments

  • lmlandermesh.jpg
    lmlandermesh.jpg
    63.1 KB · Views: 10
  • lmlanderstart2.jpg
    lmlanderstart2.jpg
    31.7 KB · Views: 10
  • lmlanderstart1.jpg
    lmlanderstart1.jpg
    78 KB · Views: 10
Last edited:

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,089
Reaction score
908
Points
128
Website
francisdrakex.deviantart.com
I think, the offset may be caused by the descent and ascent stage model having the same point of origin in the model.
When the ascent stage is rotated, it rotates around the point of origin. The former vertical offset is now a horizontal offset.

Solution: In the modelling program, move the whole model down until the point of origin is in the center of the ascent module.
Re-export both models, correct the touchdown points and docking points in the code.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,734
Reaction score
2,702
Points
203
Location
Dallas, TX
Not sure what you mean. Here are the 2 meshes
 

Attachments

  • lmlandermeshorigin.jpg
    lmlandermeshorigin.jpg
    121.5 KB · Views: 4
Top