Project Updated SLS for Orbiter 2016 (and 2010)

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
The way I envision the whole set up is this.
At the VAB stands a SLS pad. The feet are there always. The pad stands about 6.8 meters off the surface.

A crawler drives down picks it up and drives to the Launch pad.
The crawler climbs the ramp and then stops. The feet are there on the launchpad.
You press a key on the pad. Now the touchdown points places the pad at the level of the feet. The crawler then releases the pad. Then the crawler drives off

Sound right?

I got my crawler to climb the hill. Working on a new mesh for the launchpad. Then will adjust new touchdown points to the new hill.

Fred can you help me with the code to connect the multistage to the tower so when you fire the thrusters the tower goes to launch mode.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
105
Points
78
Fred can you help me with the code to connect the multistage to the tower so when you fire the thrusters the tower goes to launch mode.

not so easy, but let's try: try simply to name the vessel the pad vessel MS_Pad in the sim (not class name, just the vessel name)... I'm not sure but it could be enough

Anyway this could work if you're dropping the rocket from the Hangar I made, if you're using other VAB then I'll have to see how to do it
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
Ok Getting the vessel on the pad isn't an issue. I think what they want is when the vessels thruster fire then tell the tower to go to launch mode. So umbical cables, arms swing back. I think that is the case.

The other way to do it. Might need some code but look at the vessel on the pad and get thrust level . If thrust level is 100% then go into launch mode
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
105
Points
78
have you tried already? because i was reading again the code of MS2015 and it should be all a matter of pad vessel name. If the name is right (or at least the same name indicated in the ini of the vessel) then the multistage vessel will do all by its own: create attachment point on the pad, attach to it, detach at the right moment

a part from the hangar story, if you specify in the ini pad name and pad module it will use directly your pad. then you can move around the package with your crawler
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
No. I will try it later tonight. I think we might be confused. I think they want MS2015 to tell the SLs_pad to swing arms back because the vessel is launching.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
105
Points
78
let me make it clear so we are all on the same line:

MS2015 creates its own launchpad which by default is transparent. Instead of the default transparent launchpad any module can be used (even a deltaglider, I used that for testing :lol:).

So the code of the launchpad can do whatever it wants, moving the arms, creating smoke, or whatever it is, and to use that launchpad, it is enough to input in the ini file of MS2015 the correct pad_name and pad_module parameters (IIRC they are in the misc section at the beginning).

then Ms2015 will do everything by itself: attaching, detaching, deleting the pad after a while.

Then, how to sync swinging arms or other animations?
this is up to the pad coders, let's make an example for the swinging arms at the moment of launch:
2 ways come to my mind:
1) get engine level of the rocket and if engine level is higher than X trigger the animations
2) get MET from MS2015 and if MET si > than X (for example -3) trigger the animations

both can easily be done within the pad code, if help is needed with this, just let me know and I'll tell you how I would do it.

:cheers:
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
let me make it clear so we are all on the same line:

MS2015 creates its own launchpad which by default is transparent. Instead of the default transparent launchpad any module can be used (even a deltaglider, I used that for testing :lol:).

So the code of the launchpad can do whatever it wants, moving the arms, creating smoke, or whatever it is, and to use that launchpad, it is enough to input in the ini file of MS2015 the correct pad_name and pad_module parameters (IIRC they are in the misc section at the beginning).

then Ms2015 will do everything by itself: attaching, detaching, deleting the pad after a while.

Then, how to sync swinging arms or other animations?
this is up to the pad coders, let's make an example for the swinging arms at the moment of launch:
2 ways come to my mind:
1) get engine level of the rocket and if engine level is higher than X trigger the animations
2) get MET from MS2015 and if MET si > than X (for example -3) trigger the animations

both can easily be done within the pad code, if help is needed with this, just let me know and I'll tell you how I would do it.

:cheers:
Thanks. Yes Help is needed:(. I think the get the thrust level and then if thrust level is higher than 90%? then do animation
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
105
Points
78
code is quite easy here, no worries, I would do something like:
Code:
char rocketname[128];
sprintf(rocketname,"SLS");  // IF SLS IS THE NAME OF THE ROCKET OF COURSE!
OBJHANDLE rocket=oapiGetObjectByName(rocketname);
if(oapiIsVessel(rocket))      // to be sure that if there's a mistake somewhere we don't get a CTD
{
VESSEL *v;
v=oapiGetVesselInterface(rocket);
double thruster_level=v->GetThrusterGroupLevel(THGROUP_MAIN);
if(thruster_level>0.9)
   {
   ///TRIGGER THE ANIMATION!
   }

}
 

Interceptor

Well-known member
Joined
Mar 28, 2008
Messages
2,718
Reaction score
76
Points
63
Location
Michigan,Florida
I would use MET option instead of thrust level it looks kind of of silly when your crew access arm starts moving back when the rocket is already starting to launch,for realisms sake anyways,just my 2 cents.
 

Interceptor

Well-known member
Joined
Mar 28, 2008
Messages
2,718
Reaction score
76
Points
63
Location
Michigan,Florida
Ask fred18,he said he will steer you in the right direction.

---------- Post added at 03:11 PM ---------- Previous post was at 02:47 PM ----------

What would be cool would be to have all the seperate arms on a settable MET timer,that way you could have the individual tower arms move at different times,if that's even possible?
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
I am sure that it is possible. Just adjust the launch animation. But not sure
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
105
Points
78
Ask fred18,he said he will steer you in the right direction.

---------- Post added at 03:11 PM ---------- Previous post was at 02:47 PM ----------

What would be cool would be to have all the seperate arms on a settable MET timer,that way you could have the individual tower arms move at different times,if that's even possible?

I am sure that it is possible. Just adjust the launch animation. But not sure

if you check the Jarvis dll it was exactly like that, it's just a matter of making each animation separate and then trigger it at the proper time.

to get the met from a a multistage Vessel:

Code:
double MET;  ///this shall be a class variable, so put it in the class and initialize it in the constructor..

char RocketName[256];
sprintf(RocketName,"SLS"); // of course if the rocket is called sls...
OBJHANDLE hrocket=oapiGetObjectByName(RocketName);
if(oapiIsVessel(hrocket))
{
VESSEL *v;
v=oapiGetVesselInterface(hrocket);
  if(v->Version()>2)
  {
 ((VESSEL3*)v)->clbkGeneric(VMSG_USER,1,&MET);
  }
}
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
if you check the Jarvis dll it was exactly like that, it's just a matter of making each animation separate and then trigger it at the proper time.

to get the met from a a multistage Vessel:

Code:
double MET;  ///this shall be a class variable, so put it in the class and initialize it in the constructor..

char RocketName[256];
sprintf(RocketName,"SLS"); // of course if the rocket is called sls...
OBJHANDLE hrocket=oapiGetObjectByName(RocketName);
if(oapiIsVessel(hrocket))
{
VESSEL *v;
v=oapiGetVesselInterface(hrocket);
  if(v->Version()>2)
  {
 ((VESSEL3*)v)->clbkGeneric(VMSG_USER,1,&MET);
  }
}
And then if MET >? start launch animations?

Ok slowly getting a new launchpad/hill going.

You can see my crawler climbing it.
NEWLAUNCHPAD_zpsq9qjmeym.jpg


Then the tower on the hill.
NEWLAUNCHPAD1_zpsqdn58v8y.jpg

I will adjust the edges of the hill to match the scenery. And add more structures.
NEWLAUNCHPAD2_zpsgnl2qcab.jpg
 
Last edited:

Longjap

Active member
Joined
Jun 8, 2011
Messages
191
Reaction score
41
Points
28
It looks bloody awesome gattispilot, nice coding! If you need help with the meshes let me know.

I can imagine it would be some nail biting moments when the whole stack climbs up the hill IRL while tilted. How many degrees tilt will that be? Or has the real crawler a way to adjust the pad to keep it level with the horizon?

Hahaha, not to give you any more work. :p It's perfect the way it is already.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
Thanks
Well the slope is 20 degrees. Well basically how the ssu and mine work is the Y touchdown point is adjusted. Then the tracks rotate to match the hill and the rear are lowered. So the crawler are tower are level. The trucks adjust the maintain that.


I wouldn't look too hard at the animations though.:)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,662
Reaction score
2,382
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
20 degrees? That is very steep. :blink: 20 degrees is about 37% grade, which is the record for the steepest road in the world....
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
Not sure where I got that 20. :rolleyes: I know the trucks rotate 10 degrees. But the grade is 5%

---------- Post added 11-09-16 at 06:01 AM ---------- Previous post was 11-08-16 at 09:27 AM ----------

Ok I have a push button for right now for forward, rev and neutral. In mine the target speed is current speed. Not sure about that, though.

But what happens is press 1 for forward and the speed increases. But what I want is only increase speed when button is pressed. Same for reverse.

Code:
    if (ENGINE_DIRECTION == FWD){
        if (increaseTgtSpeed) {
            double dv = simdt*0.1;
            targetSpeed = range(0, targetSpeed + dv, maxSpeed);
        }
        else if (decreaseTgtSpeed) {
            double dv = simdt*-0.1;
            targetSpeed = range(0, targetSpeed + dv, maxSpeed);
        }
        sprintf(oapiDebugString(), "FWDdf %2.2f", targetSpeed);
        //if (targetSpeed <0) targetSpeed = 0;
}
    if (ENGINE_DIRECTION == REV){
        if (increaseTgtSpeed) {
            double dv = simdt*-0.1;
            targetSpeed = range(-1.4, targetSpeed + dv, 0);
        }
        else if (decreaseTgtSpeed) {
            double dv = simdt*0.1;
            targetSpeed = range(-1.4, targetSpeed + dv, 0);
        }
        sprintf(oapiDebugString(), "REVdf %2.2f", targetSpeed);
        //if (targetSpeed <0) targetSpeed = 0;
    }

    if (ENGINE_DIRECTION == NEUT)targetSpeed = 0;
    //increaseTgtSpeed = false;
    //decreaseTgtSpeed = false;
    // update speed
    currentSpeed = targetSpeed;

Code:
if (key == OAPI_KEY_ADD) {
        //pEngine->IncreaseTgtSpeed(down);
        increaseTgtSpeed = down;
        decreaseTgtSpeed = false;
        return 1;
    }
    else if (key == OAPI_KEY_SUBTRACT) {
        //pEngine->DecreaseTgtSpeed(down);
        decreaseTgtSpeed = down;
        increaseTgtSpeed = false;
        return 1;
    }

    if (key == OAPI_KEY_1)
    {

        ENGINE_DIRECTION = FWD;
        return 1;
    }
    if (key == OAPI_KEY_2)
    {

        ENGINE_DIRECTION = NEUT;
        return 1;
    }
    if (key == OAPI_KEY_3)
    {

        ENGINE_DIRECTION = REV;
        return 1;
    }

New pad:
4c3jgJl.jpg


I will take or lower the rails around the opening as they hit the crawler suspension.
 
Last edited:

Longjap

Active member
Joined
Jun 8, 2011
Messages
191
Reaction score
41
Points
28
Discovering normal mapping in d3d9. Great tool for more detail. :)

9Murjr4.jpg
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,757
Reaction score
2,740
Points
203
Location
Dallas, TX
oK I am trying to get the SLS crawler to move. I tried the MS2015 code but couldn't get it to move and it was messing with the touchdown points

So back to the SSu crawler. I can adjust Target Speed. But I think I need Current speed.

Code:
// update speed
	double acceleration = GetAcceleration();
	if (!Eq(currentSpeed, 0.0, 0.01) || !Eq(acceleration, 0.0)) {
		// simulate friction and brakes
		if (!Eq(currentSpeed, 0.0)) {
			double friction = 0.0025;
			//if (port_BrakeSet) friction += 0.005; // brakes
			//if (port_ParkingBrakeSet) friction += 0.01;

			if (currentSpeed >= 0.0) acceleration = acceleration - friction;
			else acceleration = acceleration + friction;
		}
		// calculate new speed
		currentSpeed += acceleration*simdt;
	}
	else currentSpeed = 0.0;

It is the GetAcceleration(); that is undefined. I found it in the Crawlerengine code. But not sure how to define it in mine.
in my h.
Code:
double GetAcceleration() const;

ssu
Code:
CrawlerEngine::~CrawlerEngine()
{
}

double CrawlerEngine::GetAcceleration() const
{
	return currentAcceleration;
}

I got it to work. Press which gear and then press + for more speed. Press * to stop speed. - for less speed. Similar to thrust.
 
Last edited:
Top