Project Updated SLS for Orbiter 2016 (and 2010)

Longjap

Active member
Joined
Jun 8, 2011
Messages
191
Reaction score
41
Points
28
That sounds awesome. So you've managed to get the tower and crawler to work in 2016? Cool! Let's compile an update. If you want you could send me the files so I can compile a package and put it on the front page?

I have a US adapter almost done. So block 1b Orion is also almost ready for use. It uses spacecraft4 though. Not a programmed module. And people could add their own hab module. BTW, now I remember a problem, docking to a attached payload of EUS. Got to find a solution for that.

I'm looking now to see if there is any info on what hab module they will use to no avail as of yet. If I have I might consider to make a mesh.

Do you have some info on Talon?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Yes. I can move a rocket from HAB to launch pad and launch.

From images of Talon:
SSS8ruU.jpg

GHGM4LA.jpg
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
I think On the Talon some parts might be dead in the water.

I got the CM to separate from the SM. BUT the issue is to get the animation state from the Talon to then tell the Sm vessel what the state is
crcf8NR.jpg

8AaiUYt.jpg


So the Talon is like Orion where depending on the mode different meshes appear/disappear. So in general the CM and Sm are seen. But when you separate the Sm is not seen and a new vessel SM is created. BUt the animation state isn't transferred. This part of the code I haven't figured out yet.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Possible simple solution is to solve it visually:

Only allow the separation if animations are at a specific point (ex: solar panels extended).
That way the mesh(es) will look the same.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Thanks. I can code that in.

s8TG7qE.jpg


Placed on the Moon. The Upper stage is docked with the lander. But trying to launch isn't working.

So in the Upper stage I applied some main thrust which is the Z direction.
Code:
th_att_lin[0] = CreateThruster(_V(0, 0, -3.5), _V(0, 0, 1), MAIN_THRUST, ph_RM, MAIN_ISP);
		CreateThrusterGroup(th_att_lin, 1, THGROUP_MAIN);
		AddExhaust(th_att_lin[0], MAIN_ENGSIZE, tex_main);

But When I undock I sink thru and flip and under the surface. So Increased the main thrust 3 x and I don't sink but it rotates to the surface
wZKiexu.jpg
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
EVA: The vessel will carry 1 MMU unit.

66mAMsO.jpg


Then when you do an eva The mmu is manned.
0xr92sY.jpg


Looking at Atlantis code. Haven't seen how the MMu get back int the Atlantis, though
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Ok a code issue.

I have 2 docks. one is the nose cone and the other is the mmu.
Code:
SetDockParams(_V(0, 0, 4.375), _V(0, 0, 1), _V(0, 1, 0));//NOSE DOCK0
SetDockParams(_V(0, 1.9, -1), _V(0, -1, 0), _V(0, 0, 1)); //eva DOCK1

So then if dock#1 is empty do an eva.
Code:
void TALON::SeparateMMU(void)
{
	if (HATCH_proc > .8){
	
	// Create MMU at docking port
	DOCKHANDLE hDock = GetDockHandle(1);
	if (GetDockStatus(hDock)) return; // something is already attached to this docking port

	int i;
	char name[256];
	OBJHANDLE hVessel;
	for (i = 0;; i++) {
		sprintf(name, "%s-MMU-%d", GetName(), i + 1);
		hVessel = oapiGetVesselByName(name);
		if (!hVessel) break;
	}

	VESSELSTATUS vs;
	EVA = 1;
	GetStatus(vs);
	hMMU = oapiCreateVessel(name, "Nasa_MMU", vs);
	Dock(hMMU, 0, 0, 1);
	SetMeshVisibilityMode(MMUMeshUINT, MESHVIS_NEVER);

	oapiSetFocusObject(hMMU);
	}
}
void TALON::ENTER_MMU(void)
{
	if ((HATCH_proc > .8)&&(EVA=1)){

		// Create MMU at docking port
		DOCKHANDLE hDock = GetDockHandle(1);
		if (GetDockStatus(hDock)) return; // something is already attached to this docking port

		for (DWORD i = 0; i < oapiGetVesselCount(); i++) {
			OBJHANDLE hV = oapiGetVesselByIndex(i);    //get handle for ship
			// if (strncmp (hV->GetVesselByName(), "OBLIVIONBIKE1", 12)!=0  ){
			OBJHANDLE Focusvessel = oapiGetVesselByName("TALON-MMU-1");


			oapiDeleteVessel(Focusvessel);
			SetMeshVisibilityMode(MMUMeshUINT, MESHVIS_EXTERNAL);
			EVA = 0;
			//oapiSetFocusObject(hMMU);
		}
	}
}

it all works. But when I do an eva. it shows the guy at dock 1 not dock 2.

pUTrq8p.jpg



Code:
TALON:TALON
  JOINT1 0.0000
  JOINT2 0.5000
  JOINT7 1.0000
  MODE 0
  HGA 1 1.0000
  HATCH 1 1.0000
  BEACON 0
  EVA 1
  STATUS Orbiting Earth
  RPOS 5380150.927 -0.022 4490841.213
  RVEL -4832.7491 -0.0000 5789.7766
  AROT -180.000 0.000 180.000
  AFCMODE 7
  PRPLEVEL 0:1.000000
  DOCKINFO 0:0,TALON-MMU-1
  NAVFREQ 0 0
  XPDR 0
END
TALON-MMU-1:Nasa_MMU
  STATUS Orbiting Earth
  RPOS 5380150.927 1.378 4490842.213
  RVEL -4832.7491 -0.0000 5789.7766
  AROT 90.000 -0.000 -0.000
  AFCMODE 7
  PRPLEVEL 0:1.000000
  DOCKINFO 0:0,TALON
  NAVFREQ 0 0
END
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Well I think I finally got her off the Moon:
y3NI3MS.jpg


I think I saw something about a bug in KIll_rot though

Basically The eagle is orientated along the Z while the lander is along the y. But One fires the eagle sets kill-rot and switches to lander and detaches. But the kill_rot gets shut off. I may need to hard wire in?

We have gotten her launch on a Delta4 HVY and SLS.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
So I think a new zip needs to be made for the the SLS 2016. I would say to move all the SLS-2016 in a new folder.
I get no ctds but others are. The one thing I get in the log is a missing texture but no ctd. But the texture is in the correct folder.

--------------------------- WARNING: --------------------------
>>> Texture not found: SLS_2016\Tank_Cover.dds
Skipping.
>>> [TextureManager::AcquireTexture | .\Texture.cpp | 1040]
---------------------------------------------------------------

Some get this error but no idea which mesh uses SLS/bldwhite?




--------------------------- WARNING: --------------------------
>>> Texture not found: SLS/bldwhite.dds
Skipping.
>>> [TextureManager::AcquireTexture | .\Texture.cpp | 1040]
---------------------------------------------------------------


Is there a program that checks for things like that?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Been redoing the SLS textures as now it will have checkerboard design on the srb and core,.....
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
wf5ymKg.jpg


Trying to get the separation exhaust to show.
Code:
[BOOSTER_1]
N=1
MeshName=SLS_2016\SLSSRB
Height=53.900
Diameter=3.710
EmptyMass=86363.600
FuelMass=622727.300
Thrust=16363630.640
angle=0.000
off=(6.300,0.000,-0.300)
BurnTime=124.000
eng_1=(0.000,0.000,-28.000)
eng_diameter=0.010
ENG_PSTREAM1=srb_exhaust
Speed=(15.000,-4.000,0.000)
Rot_speed=(-0.200,-0.400,0.000)
Eng_tex=
Eng_pstream1=SRB_exhaust
Eng_pstream2=srb_exhaust_2
BurnDelay=0.000
Expbolts_pos=(6.450,0.000,19.000)
Expbolts_pstream=exbolt
Expbolts_anticipation=1.000

[BOOSTER_2]
N=1
Angle=0.000
Meshname=SLS_2016\SLSSRB_1
Off=(-6.300,0.000,-0.300)
Height=53.900
Diameter=3.710
Thrust=16363630.640
EmptyMass=86363.600
FuelMass=622727.300
Burntime=124.000
Eng_diameter=0.010
Eng_tex=
Eng_pstream1=srb_exhaust
Eng_pstream2=srb_exhaust_2
Speed=(-15.000,-4.000,0.000)
Rot_speed=(-0.200,0.400,0.000)
Eng_1=(0.000,0.000,-28.000)
BurnDelay=0.000
Expbolts_pos=(-6.450,0.000,19.000)
Expbolts_pstream=exbolt
Expbolts_anticipation=1.000

Code:
[PARTICLESTREAM_14]
Name=exbolt
Srcsize=0.700
Srcrate=10.000
V0=50.4
Srcspread=0.000
Lifetime=0.015
Growthrate=0.000
Atmslowdown=0.100
Ltype=EMISSIVE
Levelmap=LVL_FLAT
Lmin=1
Lmax=1.000
Atmsmap=ATM_FLAT
Amin=1
Amax=1.000


---------- Post added 11-10-17 at 05:52 AM ---------- Previous post was 11-09-17 at 10:13 AM ----------

sgE8TnQ.jpg

v1hrOTe.jpg


But when the booster separate no pstream is seen.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Not sure. I think a mesh could be made. We are using MS2015. Maybe the Orion add on could not that?

But not sure about the rest.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Ok. By reading the doc for MS2015 we saw that only 13 P-Streams are allowed. expbolt was number 14

So I removed some. I now get exp-bolt P-stream but only one side:
ct08d1Y.jpg


Code:
[PARTICLESTREAM_9]
Name=Ice
Srcsize=0.150
Srcrate=0.500
V0=10.000
Srcspread=0.000
Lifetime=5.000
Growthrate=0.000
Atmslowdown=0.000
Ltype=EMISSIVE
Levelmap=LVL_PSQRT
Lmin=0
Lmax=1.000
Atmsmap=ATM_PLOG
Amin=1
Amax=1.000
Tex=SLS_2016/Ice_Part

[PARTICLESTREAM_10]
Name=exbolt
Srcsize=5.000
Srcrate=1.000
V0=100.000
Srcspread=0.000
Lifetime=0.0500
Growthrate=1.000
Atmslowdown=0.300
Ltype=EMISSIVE
Levelmap=LVL_PSQRT
Lmin=0
Lmax=1.000
Atmsmap=ATM_PLOG
Amin=1e-006
Amax=1.000
Tex=SLS_2016/SLS_SRB_exhaust

[PARTICLESTREAM_11]
Name=Exhdetail2
Srcsize=1.000
Srcrate=10.000
V0=0.001
Srcspread=0.000
Lifetime=0.050
Growthrate=0.000
Atmslowdown=0.100
Ltype=EMISSIVE
Levelmap=LVL_FLAT
Lmin=1
Lmax=1.000
Atmsmap=ATM_FLAT
Amin=1
Amax=1.000
Tex=SLS_2016\SSME_Exhaust_Detail

[PARTICLESTREAM_12]
Name=SRB_exhaust_2
Srcsize=5.000
Srcrate=200.000
V0=400.000
Srcspread=0.000
Lifetime=0.500
Growthrate=35.000
Atmslowdown=0.300
Ltype=EMISSIVE
Levelmap=LVL_PSQRT
Lmin=0
Lmax=1.000
Atmsmap=ATM_PLOG
Amin=1e-006
Amax=1.000
Tex=SLS_2016/SLS_SRB_exhaust
GrowFactor_size=1.400
GrowFactor_rate=4.000

[FX_LAUNCH]
N=2
Height=10.000
Angle=90.000
Distance=0.000
CutoffAltitude=800.000
Pstream1=launchfx
Pstream2=launchfx2     

[FX_VENT]
pstream=vent
off_1=(4.200,-1.000,30.000)
dir_1=(1.000,5.000,0.000)
time_fin_1=-5.000
off_2=(1.000,-4.200,15.000)
dir_2=(5.000,1.000,0.000)
time_fin_2=-5.000

[FX_MACH]
pstream=mach
mach_min=0.900
mach_max=1.300
off_1=(-1.000,0.000,18.000)
off_2=(1.000,0.000,18.000)
off_3=(-5.000,0.000,5.000)
dir=(0.000,0.000,-1.000)
Off_4=(5.000,0.000,5.000)
Off_5=(0.000,0.000,30.000)

[BOOSTER_1]
N=1
MeshName=SLS_2016\SLSSRB
Height=53.900
Diameter=3.710
EmptyMass=86363.600
FuelMass=622727.300
Thrust=16363630.640
angle=0.000
off=(6.300,0.000,-0.300)
BurnTime=124.000
eng_1=(0.000,0.000,-28.000)
eng_diameter=0.010
ENG_PSTREAM1=srb_exhaust
Speed=(15.000,-4.000,0.000)
Rot_speed=(-0.200,-0.400,0.000)
Eng_tex=
Eng_pstream1=SRB_exhaust
Eng_pstream2=srb_exhaust_2
BurnDelay=0.000
Expbolts_pos=(6.450,1.000,25.000)
Expbolts_pstream=exbolt
Expbolts_anticipation=1

[BOOSTER_2]
N=1
Angle=0.000
Meshname=SLS_2016\SLSSRB_1
Off=(-6.300,0.000,-0.300)
Height=53.900
Diameter=3.710
Thrust=16363630.640
EmptyMass=86363.600
FuelMass=622727.300
Burntime=124.000
Eng_diameter=0.010
Eng_tex=
Eng_pstream1=srb_exhaust
Eng_pstream2=srb_exhaust_2
Speed=(-15.000,-4.000,0.000)
Rot_speed=(-0.200,0.400,0.000)
Eng_1=(0.000,0.000,-28.000)
BurnDelay=0.000
Expbolts_pos=(-6.450,1.000,25.000)
Expbolts_pstream=exbolt
Expbolts_anticipation=1

I was able to get the Cubesat loaded . I think the real one may hold 13. but because of payload limit we may not get to load all on there.
D4fX6tU.jpg
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
So I reduced the number of P-streams. 13 is the max in MS2015. I made one in the center.

9MsPvMK.jpg


---------- Post added 11-15-17 at 05:04 AM ---------- Previous post was 11-14-17 at 06:00 AM ----------

So another issue. The easy solution is to increase the payloads in ms2015 or not have 13 Cubesats to launch.

Max payloads in MS2015 is 10. The SLS has the capability of carring 13 CUbesats.

I have tried just making a stage adapter then use attachments but that is not going to be easy because of the vectors of a tilted attachment.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Last obstacle maybe? The Orion Service adapter. It is the part that fits above the ICPS. It will be able to launch 13 Cube sats.
sls_msa.png


https://www.nasa.gov/launching-science-and-technology/multimedia/secondarypayloadinfographic.html
So we have a mesh. If we use MS2015 there is a limit of 10 payloads. 3 are used for the Orion. That leaves us with 6 for CUBE sats. so that is doable now

I see 2 options if we want all 13 CUBE sats

both require building a new vessel. Basically with the attachments and the code to detach. in the scn would be the way the Cube Sats get attached. That would not be too bad except the vectors of the attachments.

Another option is to just make a mesh of the Cubesat in the Orion service Adapter. And when you release it the mesh would goe away. The issue with that is if you load different Cube SAts they may not look like the Cubesat.

Another option is similar to how MS2015 does it. Read the ini and place the mesh at a certain position and angle.

Code:
void ORIONSERVICEA::ResetVehicle(VECTOR3 hangaranimsV = _V(1.3, -10, 57.75), bool Ramp = FALSE)
{


	

	ClearMeshes();
	ClearAttachments();

	


	initGlobalVars();
	


	char tempFile[MAXLEN];
	strcpy(tempFile, OrbiterRoot);
	strcat(tempFile, "\\");
	strcat(tempFile, fileini);
	sprintf(logbuff, "%s: Config File: %s", GetName(), tempFile);
	oapiWriteLog(logbuff);
	parseinifile(tempFile);

	
	currentPayload = loadedCurrentPayload;
	
	Configuration = loadedConfiguration;
	


	if (Configuration == 0){			//if only configuration is defined, reset everything
		
		currentPayload = 0;
		
	}

	
	//VehicleSetup();
	LoadMeshes();

	//vs2.arot=_V(0,0,0);
	vs2.rvel = _V(0, 0, 0);

	clbkSetStateEx(&vs2);

	hangaranims = hangaranimsV;

	clbkPostCreation();


	return;
}
h:
Code:
	bool parseinifile(char filename[MAXLEN]);
but I get an error:
Code:
Error	4	error LNK2019: unresolved external symbol "public: bool __thiscall ORIONSERVICEA::parseinifile(char * const)" (?parseinifile@ORIONSERVICEA@@QAE_NQAD@Z) referenced in function "public: void __thiscall ORIONSERVICEA::ResetVehicle(union VECTOR3,bool)" (?ResetVehicle@ORIONSERVICEA@@QAEXTVECTOR3@@_N@Z)	C:\Orbiter2016\Orbitersdk\samples\ORIONSERVICEADAPTERnew1\ORIONSERVICEA.obj	ORIONSERVICEADAPTER
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
On the crawler
I have this code:
Code:
OBJHANDLE pad_handle = oapiGetObjectByName("LP39_SLS");
	
	if (oapiIsVessel(pad_handle)) 
	{
		VECTOR3 rpos;
		GetRelativePos(pad_handle, rpos);
		distance = length(rpos);
		checkTouchdownPoints();
	}

basically to tell it to start the touchdownpoint procedure,...

Works BUT only if the LP39_SLS is present if not present then CTD.
any ideas. Fred suggested this:https://www.orbiter-forum.com/showthread.php?t=37569&highlight=pad_handle&page=19
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
I am stubbed. The crawler works in inline graphics but in D3D9 we get a ctd. nothing in the log.

000000.000: Module SLS_CRAWLER.dll ....... [Build 171121, API 160828]
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: D3D9: [Scene Initialized]

I know the mesh is good as I made a cfg with just the mesh and no issues.

I gutted the code and still ctd:
Code:
#define STRICT
#define ORBITER_MODULE

#include "orbitersdk.h"
#include "SLSCRAWLER.h"
#include "SLSCRAWLERMESH.h"


VISHANDLE MainExternalMeshVisual = 0;





SLSCRAWLER::SLSCRAWLER(OBJHANDLE hObj, int fmodel) : VESSEL3(hObj, fmodel) {

	DefineAnimations();
	
	
}

void SLSCRAWLER::clbkPreStep(double simt, double simdt, double mjd) {
}

void SLSCRAWLER::clbkSetClassCaps(FILEHANDLE cfg) {
	// physical specs
	SetSize(6.08);
	SetEmptyMass(20000);
	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(16.0, 5.2, 17.5));
	
	SetTouchdownPoints(_V(0, .00105, 20), _V(-15,.001, -20), _V(15, .001, -20));;
	SetMeshVisibilityMode(AddMesh(oapiLoadMeshGlobal("SLSCRAWLER3")), MESHVIS_ALWAYS);
	
	


	
}



void SLSCRAWLER::clbkPostStep(double simt, double simdt, double mjd) {
}

void SLSCRAWLER::DefineAnimations(void) {
}

DLLCLBK VESSEL *ovcInit(OBJHANDLE hvessel, int flightmodel) {
	return new SLSCRAWLER(hvessel, flightmodel);
}

DLLCLBK void ovcExit(VESSEL *vessel) {
	if (vessel) delete (SLSCRAWLER*)vessel;
}

// --------------------------------------------------------------
// Keyboard interface handSLSCRAWLER (buffered key events)
// --------------------------------------------------------------
int SLSCRAWLER::clbkConsumeBufferedKey(DWORD key, bool down, char *kstate) {
	// only process keydown events
	if (!down) return 0;


	return 0;
}



// ==================================================================== 
// clbkVisualCreated used to display UMMU initialisation message 
// because oapiDebugString () doesn't work in clbkSetClassCap
// ==================================================================== 




void SLSCRAWLER::clbkVisualCreated(VISHANDLE vis, int refcount) {
	MainExternalMeshVisual = GetMesh(vis, 0);

}

// ============================================================== 
// Visual destroyed
// ============================================================== 
void SLSCRAWLER::clbkVisualDestroyed(VISHANDLE vis, int refcount) {
	MainExternalMeshVisual = 0;
}









// ======================================================================== 
// clbkLoadState function of Orbiter - Save scenario when user exit Orbiter 
// ======================================================================== 
void SLSCRAWLER::clbkSaveState(FILEHANDLE scn)
{
	// ORBITER, default vessel parameters
	char cbuf[256];

	SaveDefaultState(scn);
	


}

// ======================================================================== 
// clbkLoadStateEx function of Orbiter - Load Orbiter scenario 
// ======================================================================== 
void SLSCRAWLER::clbkLoadStateEx(FILEHANDLE scn, void *status) {
	float wheelrot = 0.0;
	char *line;
	while (oapiReadScenario_nextline(scn, line)) {

		
		}

		{
			ParseScenarioLineEx(line, status);
			// unrecognised option - pass to Orbiter's generic parser
		}
	
	}

Code:
// ==============================================================
//                 ORBITER MODULE: LER2
//                  Part of the ORBITER SDK
//          Copyright (C) 2002-2004 Martin Schweiger
//                   All rights reserved
//
// LER2.cpp
// Control module for SLSCRAWLERvessel class
//
// Notes:
// This is an example for a "minimal" vessel implementation which
// only overloads the clbkSetClassCaps method to define vessel
// capabilities and otherwise uses the default VESSEL class
// behaviour.
// ==============================================================



#include <UltraMath.h>
#include "orbitersdk.h"

// ==============================================================
// Some vessel parameters
// ==============================================================




// ==========================================================

class SLSCRAWLER : public VESSEL3 {
public:
	SLSCRAWLER(OBJHANDLE hObj, int fmodel);
	void clbkSaveState(FILEHANDLE scn);
	void clbkSetClassCaps(FILEHANDLE cfg);
	void clbkLoadStateEx(FILEHANDLE scn, void *status);
	int clbkConsumeBufferedKey(DWORD key, bool down, char *kstate);
	void clbkVisualCreated(VISHANDLE vis, int refcount);
	void DefineAnimations(void);
	void clbkVisualDestroyed(VISHANDLE vis, int refcount);
	void clbkPostStep(double simtt, double simdt, double mjd);
	void clbkPreStep(double simt, double simdt, double mjd);



	
	

};
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Crawler back working. Redoing the Interior of the VAB using the SSU one as a guide.

https://bitbucket.org/Gattispilot/orionserviceadapter

The one vessel that I haven't got to work as yet is the new Orion adapter. I am using parts from MS2015 with credit of course. But the vessel loads and I place it where i want. Exit and then it is orbiting the sun.

Code:
void ORIONSERVICEA::clbkSaveState(FILEHANDLE scn)
{

	char cbuf[256];
	
	



	SaveDefaultState(scn);

}
void ORIONSERVICEA::clbkLoadStateEx(FILEHANDLE scn, void *status)
{
	char *line;
	while (oapiReadScenario_nextline(scn, line))
	{

	

	}

	char tempFile[MAXLEN];
	strcpy(tempFile, OrbiterRoot);
	strcat(tempFile, "\\");
	strcat(tempFile, fileini);
	sprintf(logbuff, "%s: Config File: %s", GetName(), tempFile);
	oapiWriteLog(logbuff);
	parseinifile(tempFile);
}
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,704
Reaction score
2,681
Points
203
Location
Dallas, TX
Trying to get the Orion Service Adapter to work.

Using MS2015 code to add the payloads. The Orion Service adapter will need to hold 13 cubesats. Sls can only load 7 so a new vessel needs to be made.

https://bitbucket.org/Gattispilot/orionserviceadapter

Not sure why it is not reading the ini and setting the sat somewhere.

000000.000: orionservice: Config File: \
000000.000: orionservice: Number of Payloads in the ini file: 0
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: Finished initialising panels
000006.195: **** Closing simulation session

config:
; === Configuration file for vessel class Atlantis ===
ClassName = ORIONSTAGEADAPTER1
Module = ORIONSTAGEADAPTER1
[PAYLOAD_1]
Meshname=SLS_2016\Cubesat6U_ICECUBE
Off=(0.000,2.05,49.2175)
Rotation=(90,-43,90)
Height=0.130
Diameter=0.100
Mass=13.000
Module=spacecraft\spacecraft4
Name=Cubesat6U_ICECUBE
Speed=(0.000,1.500,3.000)
Rot_speed=(0.000,0.000,0.000)
Render=1
Live=1

[PAYLOAD_2]
Meshname=SLS_2016\Cubesat6U_NEA
Off=(.88,-1.88.,49.230)
Rotation=(90,43,115)
Height=0.130
Diameter=0.100
Mass=13.000
Module=spacecraft\spacecraft4
Name=Cubesat6U_NEA
Speed=(0.000,-1.500,3.000)
Rot_speed=(0.000,0.000,0.000)
Render=1
Live=1

---------- Post added 12-11-17 at 05:30 AM ---------- Previous post was 12-10-17 at 02:34 PM ----------

https://drive.google.com/open?id=167nWAdqBzg9x9CtGkNCMReXlR1YBFwEC

So as I understand it. I am trying to read the config file and in that file tells what payload and where.

Code:
void ORIONSERVICEA::ResetVehicle()
{
	ClearMeshes();
	ClearAttachments();
	initGlobalVars();

	char tempFile[MAXLEN];
	strcpy(tempFile, OrbiterRoot);
	strcat(tempFile, "\\");
	strcat(tempFile, fileini);
	sprintf(logbuff, "%s: Config File: %s", GetName(), tempFile);
	oapiWriteLog(logbuff);
	parseinifile(tempFile);

	
	currentPayload = loadedCurrentPayload;
	
	Configuration = loadedConfiguration;
	


	if (Configuration == 0){			//if only configuration is defined, reset everything
		
		currentPayload = 0;
		
	}

	
	//VehicleSetup();
	LoadMeshes();

	//vs2.arot=_V(0,0,0);
	vs2.rvel = _V(0, 0, 0);

	clbkSetStateEx(&vs2);

	

	clbkPostCreation();


	return;
}


So in the scn:
Code:
orionservice:ORIONSERVICEADAPTER
   CONFIG_FILE Config\ORIONSERVICEADAPTERtest1.ini
  CURRENT_PAYLOAD 1
  STATUS Orbiting Sun
  RPOS 231434203.705 -80116629716.842 115351172853.769
  RVEL 17286267.3848 -5984065713.2133 8615801749.2343
  AROT -1.701 -69.030 -0.215
  VROT -5882.0420 -16525.8299 4014.4593
  AFCMODE 7
  NAVFREQ 0 0
  XPDR 0
END

and in the config folder is this file :
ORIONSERVICEADAPTERtest1.ini
which is:
Code:
[PAYLOAD_1]
Meshname=SLS_2016\Cubesat6U_ICECUBE
Off=(0.000,52.05,49.2175)
Rotation=(90,-43,90)
Height=0.130
Diameter=0.100
Mass=13.000
Module=spacecraft\spacecraft4
Name=Cubesat6U_ICECUBE
Speed=(0.000,1.500,3.000)
Rot_speed=(0.000,0.000,0.000)
Render=1
Live=1
[PAYLOAD_2]
Meshname=SLS_2016\Cubesat6U_NEA
Off=(.88,-1.88,-49.230)
Rotation=(90,43,115)
Height=0.130
Diameter=0.100
Mass=13.000
Module=spacecraft\spacecraft4
Name=Cubesat6U_NEA
Speed=(0.000,-1.500,3.000)
Rot_speed=(0.000,0.000,0.000)
Render=1
Live=1

But when I run it I get this in the log:
Code:
000000.000: orionservice: Config File: \
000000.000: orionservice: Number of Payloads in the ini file: 0
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: D3D9: [Scene Initialized]
000000.000: Finished initialising panels
 
Top