SDK Question Touchdown points definition 2016

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
Here is the dg, shuttle A and my crawler. All oriented the same.

meshview.jpg
It all comes down to the touchdown points. The ones you're using right now is aligned in such a way that what is considered the front in your 3D program is really the top in Orbiter.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
So confused
This is the dg:
Code:
	{_V( 0   ,-2.57,10   ), 1e6, 1e5, 1.6, 0.1},
	{_V(-3.5 ,-2.57,-1   ), 1e6, 1e5, 3.0, 0.2},
	{_V( 3.5 ,-2.57,-1   ), 1e6, 1e5, 3.0, 0.2},

this is the crawler
Code:
{ _V(0, .001, 20), 1e6, 1e5, 1.6, 0.1 },
	{ _V(-15, .001, -20), 1e6, 1e5, 3.0, 0.2 },
	{ _V(15, .001, -20), 1e6, 1e5, 3.0, 0.2 }
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,621
Reaction score
2,341
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Are you sure you are still understanding your own code?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
Not at this point:(

If I used the same code as the DG I get the same result 90 degrees out of sync.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,621
Reaction score
2,341
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Not at this point:(

If I used the same code as the DG I get the same result 90 degrees out of sync.

How would it look like, if you put it into space?
 

mike-c

Member
Joined
Jun 30, 2015
Messages
82
Reaction score
0
Points
6
this is the crawler
Code:

{ _V(0, .001, 20), 1e6, 1e5, 1.6, 0.1 },
{ _V(-15, .001, -20), 1e6, 1e5, 3.0, 0.2 },
{ _V(15, .001, -20), 1e6, 1e5, 3.0, 0.2 }

Try exchange TD[1] and TD[2] (2nd and 3rd) which essentially means x=-x
It helped for my rocket stage although i cannot yet explain why.
Have to work it out tonight.

(Surely you defined something like TD[3]={ _V(0, 2, 0), 1e6, 1e5, 3.0, 0.2 }?)
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
Well if you mean this: I added on and it put it in space. I added axes also.
crawlerspace.jpg


I exchanged the 2nd and 3rd and nothing. The axes are correct it is just 90 degrees out of sync
 
Last edited:

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,621
Reaction score
2,341
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Well if you mean this: I added on and it put it in space. I added axes also.
crawlerspace.jpg


I exchanged the 2nd and 3rd and nothing. The axes are correct it is just 90 degrees out of sync

Fine... then next place it simply a few meters overground and let it drop.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
How? I can placed it using scenario editor but the height is what I don't understand

---------- Post added at 01:19 PM ---------- Previous post was at 11:01 AM ----------

Well I placed it using an working vessel.
Code:
crawlertest:SLSCRAWLER
  STATUS Landed Earth
  POS -80.6041925 28.6031147
  HEADING 196.75
  ALT 20
  AROT -120.707 12.089 171.571
  AFCMODE 7
  PRPLEVEL 0:0.999674
  THLEVEL 0:0
  NAVFREQ 0 0
It was oriented correctly. I gave it some thrust and it dropped below the surface and just keeping spinning.

Code:
crawlertest:SLSCRAWLER
  STATUS Orbiting Earth
  RPOS 4837635.305 3852364.920 -1285298.641
  RVEL -592.0156 -777.3210 538.2555
  AROT -170.626 -25.743 -139.115
  VROT 65.6551 -1923.1208 -1526.7584
  AFCMODE 7
  PRPLEVEL 0:0.999646
  THLEVEL 0:0.026065
  NAVFREQ 0 0
END


---------- Post added 10-16-16 at 04:49 AM ---------- Previous post was 10-15-16 at 01:19 PM ----------

Ok. I copied the AROT of a good vessel and pasted it for the crawler and raised the alt.
crawlerorinet.jpg

You can see the axes are correct.
Code:
crawlertest:SLSCRAWLER
  STATUS Landed Earth
  POS -80.6745300 28.5207980
  HEADING 84.01
  ALT 10
  AROT 22.721 -76.579 39.166
  AFCMODE 7
  PRPLEVEL 0:0.999561
  THLEVEL 0:0
  NAVFREQ 0 0
END
ler:LER4
  UCGO @@0,1,0,0,
  STATUS Landed Earth
  POS -80.6745300 28.5207980
  HEADING 84.01
  ALT 2.148
  AROT 22.721 -76.579 39.166
  RCSMODE 0
  AFCMODE 7
  PRPLEVEL 0:1.000000
  NAVFREQ 0 0
  WHEELROT 0.000000
END




Then I apply hover and the crawler falls thru and just spins inside the earth.

Code:
#define STRICT
#define ORBITER_MODULE
#define ENG        1
#define START    2
#include "orbitersdk.h"
#include "SLSCRAWLER.h"
#include "SLSCRAWLERMESH.h"




static const int ntdvtx = 3;
static TOUCHDOWNVTX tdvtx[ntdvtx] = {
    { _V(0, .001, 1.5), 1e6, 1e5, 3.2, 0.8 },
    { _V(-2, .001, -2.6), 1e6, 1e5, 3.2, 0.4 },
    { _V(2, .001, -2.6), 1e6, 1e5, 3.2, 0.4 }//,
};
//LAND_PT1=(0,-2.866,17)
//LAND_PT2 = (-3.96, -2.866, -4.3)
//LAND_PT3 = (3.96, -2.866, -4.3)
VISHANDLE MainExternalMeshVisual = 0;





SLSCRAWLER::SLSCRAWLER(OBJHANDLE hObj, int fmodel) : VESSEL2(hObj, fmodel) {
    
    DefineAnimations();
    
}

void SLSCRAWLER::clbkSetClassCaps(FILEHANDLE cfg) {
    // physical specs
    SetSize(6.08);
    SetEmptyMass(MASS);
    SetCW(0.9, 0.9, 2, 1.4);
    SetWingAspect(0.1);
    SetWingEffectiveness(0.1);
    SetCrossSections(_V(232.84,1220.32,166.36));
    SetRotDrag(_V(0.1, 0.1, 0.1));
    if (GetFlightModel() >= 1) {
        SetPitchMomentScale(1e-4);
        SetBankMomentScale(1e-4);
    }
    SetPMI(_V(163.54, 208.04, 76.03));
    SetTrimScale(0.05);
    SetCameraOffset(_V(0, .7, 3.121));
    SetTouchdownPoints(tdvtx, ntdvtx);
    

    // visual specs
    iMeshMain = AddMesh("SLSCRAWLER");
    SetMeshVisibilityMode(iMeshMain, MESHVIS_ALWAYS);
    PROPELLANT_HANDLE TANK = CreatePropellantResource(FUELMASS);

    th_hover[0] = CreateThruster(_V(0, 0, 0), _V(0, 1, 0), MAXMAINTH, TANK, ISP);
    thg_hover = CreateThrusterGroup(th_hover, 1, THGROUP_HOVER);


}
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,621
Reaction score
2,341
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Normal behaviour when you apply a little thrust.

You have "STATUS Landed:Earth", would about you try orbiting Earth?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
Thanks.
Code:
crawlertest:SLSCRAWLER
  STATUS Orbiting Earth
  POS -80.6745300 28.5207980
  HEADING 84.01
  ALT 10
  AROT 22.721 -76.579 39.166
  AFCMODE 7
  PRPLEVEL 0:0.999556
  THLEVEL 0:0.008021
  NAVFREQ 0 0
END
like this?
The crawler is spinning when I start
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
Well I place it on a pad and it just sinks down into the earth.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,621
Reaction score
2,341
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Well I place it on a pad and it just sinks down into the earth.

Not on a pad - above it. High enough above it to let it drop. If you don't want to try it with a 2000 ton Crawler, use a lighter vehicle to test it.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
Ok. Put not sure how you put the vessel above the pad?

---------- Post added at 07:00 AM ---------- Previous post was at 06:33 AM ----------

Ok. If I go with the old way of touchdown points.
Code:
SetTouchdownPoints(_V(0, .001, 1), _V(-1.6, .001, -1), _V(1.6, .001, -1));;

It works good.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,621
Reaction score
2,341
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
It works good.

Yes, because those touch down points have no dampers. If I understand martins correctly, the ALT and AROT lines represent the assumed stable state when the spacecraft came to rest. Leave rest when ALT and AROT are nonsense, and the simulation goes wild.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,724
Reaction score
2,689
Points
203
Location
Dallas, TX
oK. So something must be wrong with those values? I got them from the DG.
Code:
static TOUCHDOWNVTX tdvtx_geardown[ntdvtx_geardown] = {
	{_V( 0   ,-2.57,10   ), 1e6, 1e5, 1.6, 0.1},
	{_V(-3.5 ,-2.57,-1   ), 1e6, 1e5, 3.0, 0.2},
	{_V( 3.5 ,-2.57,-1   ), 1e6, 1e5, 3.0, 0.2},


Whats odd is with this vessel it seems where ever I place it I am about 3-4 degrees below horizon
 
Last edited:

mike-c

Member
Joined
Jun 30, 2015
Messages
82
Reaction score
0
Points
6
static TOUCHDOWNVTX tdvtx_geardown[ntdvtx_geardown] = {
{_V( 0 ,-2.57,10 ), 1e6, 1e5, 1.6, 0.1},
{_V(-3.5 ,-2.57,-1 ), 1e6, 1e5, 3.0, 0.2},
{_V( 3.5 ,-2.57,-1 ), 1e6, 1e5, 3.0, 0.2},

again...
try xchange tdvtx_geardown[1].pos.x
and tdvtx_geardown[2].pos.x

this would be wrong with the legacy-touchdown model, but solved it, when i had the same type of misalignment.
 
Top