Project Multistage2015 - Development Thread

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,644
Reaction score
51
Points
63
So I get this:
usvnbiM.jpg


Code:
-30.000 =orbit(585,615,28.45,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,104.5,1.00)
30.0 =engine(104.5,72.00,5.00)
55.0 =engine(72.0,104.5,5.00)
120.0 =jettison()

In the default shuttle picture you sent the orbit was something like 157x352 km. I don't know if the shuttle is capable of a direct 585x615 orbit insertion, and I think to have it working some values of the autopilot shall be adjusted (Gravity turn initial pitch, altitude steps etc)

Try to have a 200x615 orbit insertion and then circularize at the first apogee and see if it works. This should work with default values

And the engine cannot go 104.5!!! maximum is 100%!!!
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,374
Reaction score
756
Points
203
Location
Dallas, TX
Thanks. Now I get this:
EbFcrsM.jpg

It looks like Orbit was achieved at 8:19 MET so this should be Jettison?

-30.000 =orbit(200,615,28.45,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,100,1.00)
30.0 =engine(100,72.00,5.00)
55.0 =engine(72.0,100,5.00)
120.0 =jettison()

---------- Post added at 07:40 AM ---------- Previous post was at 06:29 AM ----------
https://www.jsc.nasa.gov/history/shuttle_pk/pk/Flight_035_STS-031R_Press_Kit.pdf
So the sts 31 info from the press kit:
Apogee, Perigee at MECO:
325 x 27 so does this mean the orbit should be set at:
563.27 x 43.45


-30.000 =orbit(563.27,43.45,28.45,-1)




Not sure about the -1
 
Last edited:

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,644
Reaction score
51
Points
63
https://www.jsc.nasa.gov/history/shuttle_pk/pk/Flight_035_STS-031R_Press_Kit.pdf
[/COLOR]So the sts 31 info from the press kit:
Apogee, Perigee at MECO:
325 x 27 so does this mean the orbit should be set at:
563.27 x 43.45

-30.000 =orbit(563.27,43.45,28.45,-1)

Not sure about the -1

well, for replicating this particular launch you should use this:

Code:
Orbit(PeA,ApA,Inc,Mode,GravTurnPitch,Abside)

You can get the GravTurnPitch from the log file (MS2015 calculates it and outputs it in the log) and put the Abside to 111000 meters (which is the cutoff altitude frome the doc you linked above).

I have to say that when there is such a big difference between apogee and perigee the abside parameter usually does not work perfectly...

I made some calculation frome the paper you sent me, here's what I would try:
Code:
Orbit(111,530,28.45,-1)

I noticed you were exchanging PeA and ApA.
The -1 is of course necessary, the shuttle launches head down
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,374
Reaction score
756
Points
203
Location
Dallas, TX
So I have this for the guidance:
-30.000 =orbit(111,530,28.45,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,100,1.00)
30.0 =engine(100,72.00,5.00)
55.0 =engine(72.0,100,5.00)
120.0 =jettison()

It launches but climbs to about 36KM then remain there.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,374
Reaction score
756
Points
203
Location
Dallas, TX
So trying to make shuttle guidance files.

This is what I have for sts 5
Code:
-30.000 =orbit(294,317,28.5,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,100,1.00)
30.0 =engine(100,72.00,5.00)
55.0 =engine(72.0,100,5.00)
120.0 =jettison()
121.0 =glimit(3.0)
200.0 =glimit(3.0)
300.0 =glimit(3.0)
400.0 =glimit(3.0)
500.0 =glimit(3.0)
I believe for sts 5 the Perigee 294 and Apogee 317

I know there needs to be inverse and Jettison.


xLU605Y.jpg
[/IMG]
from the sts 5 presskit
STS-5 will be launched into a 160 nautical mile (185 statute mile) circular orbit with an inclination to the equator of 28.5 degrees. STS-5 FLIGHT SEQUENCE OF EVENTS Event Mission Elapsed Time (d:h:m:s) Comments SRB ignition/liftoff 0/00:00:00 Pitchover 0/00:00:08 Max Q 0/00:01:07 675 lbs/ft2 SRB separation 0/00:02:07 158,077 ft alt, 28 nm downrange MECO 0/00:08:35 57 nm alt, 763 nm downrange ET separation 0/00:08:56 OMS-1 burn 0/00:10:38 241 fps, 51.5x160 nm orbit OMS-2 burn 0/00:44:48 194 fps, 160x160 nm orbit SBS separation burn 1/00:13:25 16 fps, 169x160 nm orbit Recircularization 1 1/00:47:00 1.8 fps, 167x160 nm orbit Recircularization 2 1/00:51:00 12.3 fps, 160x160 nm orbit Telesat separation burn 1/08:21:20 16 fps, 160x169 nm orbit RCS orbit adjust 2/20:58:00 32 fps, 145x164 nm orbit RCS orbit adjust (Five 30-second burns 30 minutes apart) 3/05:26:27 55 fps, 139x152 nm orbit Deorbit ignition 5/01:12:00 261 fps, -2x151 nm entry orbit Entry interface (400 K ft) 5/01:39:00 Landing 5/02:09:00
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,644
Reaction score
51
Points
63
So trying to make shuttle guidance files.

This is what I have for sts 5
Code:
-30.000 =orbit(294,317,28.5,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,100,1.00)
30.0 =engine(100,72.00,5.00)
55.0 =engine(72.0,100,5.00)
120.0 =jettison()
121.0 =glimit(3.0)
200.0 =glimit(3.0)
300.0 =glimit(3.0)
400.0 =glimit(3.0)
500.0 =glimit(3.0)
I believe for sts 5 the Perigee 294 and Apogee 317

As said I believe that the glimit is overriding the cutoff comand. Try without it and see if it works.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,374
Reaction score
756
Points
203
Location
Dallas, TX
So I have this:
-30.000 =orbit(294,317,28.5,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,100,1.00)
30.0 =engine(100,72.00,5.00)
55.0 =engine(72.0,100,5.00)
120.0 =jettison()

Orbit looks better:
OpoQrZ2.jpg


Still connected though?
log:
000000.000: Multistage Version: 170506
000000.000: Load State Started
000000.000: ET-5: Guidance File present: Config\Multistage2015\Guidance\guidance_shuttle_STS-5real.txt
000000.000: ET-5: Orbit Call Found! Targets: Apogee:317000.0 Perigee:294000.0 Inclination:28.5 Mode:-1.0 GT initial Pitch: 0.0 Abside:294000.0
000000.000: ET-5: Config File: C:\Orbiter2016\Config\Multistage2015\Space-Shuttle_STS-5new.ini
000000.000: ET-5: Number of stages in the ini file: 1
000000.000: ET-5: Number of boosters group in the ini file: 1
000000.000: ET-5: Number of Payloads in the ini file: 1
000000.000: ET-5: Thrust in Real Position
000000.000: ET-5: Texture n.1 Loaded Exhaust_atsme
000000.000: ET-5: Texture n.2 Loaded solidfuel_exhaust
000000.000: ET-5: Texture n.3 Loaded contrail4
000000.000: ET-5: Texture n.4 Loaded contrail
000000.000: ET-5: Texture n.5 Loaded contrailSRBA
000000.000: ET-5: booster n. 1 Tank Added: 1006974.000 kg
000000.000: ET-5: Stage n. 1 Tank Added: 728715.230 kg
000000.000: ET-5: Stage n. 1 Engines Exhaust Added--> number of engines: 3 , diameter: 2.000, position x: -1.600 y: 7.930 z: -26.880
000000.000: ET-5: Stage n. 1 Engines Exhaust Added--> number of engines: 3 , diameter: 2.000, position x: 1.600 y: 7.930 z: -26.880
000000.000: ET-5: Stage n. 1 Engines Exhaust Added--> number of engines: 3 , diameter: 2.000, position x: 0.000 y: 11.330 z: -26.030
000000.000: ET-5: Booster Group n.1 Engine Exhaust Stream Added: solidfuel_exhaust to engine n.1
000000.000: ET-5: Booster Group n.1 Engine Exhaust Stream Added: contrail4 to engine n.1
000000.000: ET-5: Booster Engines Exhaust Added--> Booster Group: 1 number of engines: 1 , diameter: 2.200, position x: 5.800 y: 0.000 z: -33.786
000000.000: ET-5: Booster Group n.1 Engine Exhaust Stream Added: solidfuel_exhaust to engine n.2
000000.000: ET-5: Booster Group n.1 Engine Exhaust Stream Added: contrail4 to engine n.2
000000.000: ET-5: Booster Engines Exhaust Added--> Booster Group: 1 number of engines: 1 , diameter: 2.200, position x: -5.800 y: 0.000 z: -33.786
000000.000: ET-5: Stage n.1 Mesh Preloaded: 2016spaceshuttle\tank\lwt
000000.000: ET-5: Stage n.1 Mesh Added Mesh: 2016spaceshuttle\tank\lwt @ x:-0.050 y:0.000 z:0.000
000000.000: ET-5: Booster Mesh Preloaded: 2016spaceshuttle\booster\srb_1
000000.000: ET-5: Booster Mesh Added Mesh: 2016spaceshuttle\booster\srb_1 @ x:6.000 y:0.000 z:-11.286
000000.000: ET-5: Booster Mesh Preloaded: 2016spaceshuttle\booster\srb_2
000000.000: ET-5: Booster Mesh Added Mesh: 2016spaceshuttle\booster\srb_2 @ x:-6.000 y:0.000 z:-11.286
000000.000: Load State Terminated
000000.000: Module EmptyModule.dll ....... [Build 170626, API 160828]
000000.000: Module MS_Camera.dll ......... [Build 170626, API 160828]
000000.000: MS_Camera: Target Vessel Loaded->ET-5
000000.000: Module SPACESHUTTLE2016D.dll . [Build 181215, API 160828]
000000.000: Module Spacecraft3.dll ....... [Build ******, API 050206]
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: Post Creation Started
000000.000: ET-5: Gravity Turn Initial Pitch by user: 0.000 Calculated:71.000
000000.000: RESET PEG
000000.000: ET-5: Planet Reference Pressure = 101325.0 Pa Atmosphere Altitude Limit:2500.0 km
000000.000: Post Creation Terminated
000000.000: Finished initialising panels
000000.000: Venting Effect Added @: 0.000,10.100,-28.000 dir: 0.000,0.000,-1.000
000000.000: Venting Effect Added @: -2.500,7.500,-28.000 dir: 0.000,0.000,-1.000
000000.000: Venting Effect Added @: 2.500,7.500,-28.000 dir: 0.000,0.000,-1.000
============================ ERROR: ===========================
Mesh not found: .\Meshes\.msh
[LoadMesh | .\Mesh.cpp | 1269]
===============================================================
============================ ERROR: ===========================
Mesh not found: .\Meshes\.msh
[LoadMesh | .\Mesh.cpp | 1269]
===============================================================
============================ ERROR: ===========================
Mesh not found: .\Meshes\.msh
[LoadMesh | .\Mesh.cpp | 1269]
===============================================================
============================ ERROR: ===========================
Mesh not found: .\Meshes\.msh
[LoadMesh | .\Mesh.cpp | 1269]
===============================================================
000049.028: ET-5 Booster n: 1 ignited @0.0
000049.059: Detached from Launchpad
000049.245: ET-5 Stage n: 1 ignited @0.2
000056.651: LaunchPad Deleted from Scenery
000140.442: RESET PEG
000169.064: ET-5: Booster n.1 jettisoned name: 2016spaceshuttle\booster\srb_1 @120.036
000169.064: ET-5: Booster n.1 jettisoned name: 2016spaceshuttle\booster\srb_2 @120.036
000351.181: **** Closing simulation session

---------- Post added 12-16-18 at 06:52 AM ---------- Previous post was 12-15-18 at 05:34 PM ----------

So I redid the guidance.
Code:
-30.000 =orbit(294,317,28.5,-1)
-6.0 =engine(0,100,6)
3.0 =engine(100,100,1.00)
30.0 =engine(100,72.00,5.00)
55.0 =engine(72.0,100,5.00)
500.0 =jettison()

I had the jettison set too low.
on sts 5 it was at MECO 0/00:08:35
it should be 515=Jettison.

I guess the other values are correct?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,374
Reaction score
756
Points
203
Location
Dallas, TX
So I have this code that if the Queststarlaunch is present then at a certain time do something.

Works. BUT if the Queststar is not there then at CTD.

Code:
void VSBASE::clbkPreStep(double SimT, double SimDT, double MJD) {
	//get MET and if more than ) animate
OBJHANDLE hvessel = oapiGetVesselByName("QueststarLaunch"); //or whatever it is
	VESSEL3 *v;
	v = (VESSEL3*)oapiGetVesselInterface(hvessel);
	double Met;
	v->clbkGeneric(VMSG_USER, 1, &Met);
	if ((Met > -15)  && (VSTAR1_proc==0))
	{

		RevertVS1();
	}


	
}

So I need to code to read if OBJhandle is Queststar, MorningStar or Venturestar do this/that
 

Marg

Active member
Joined
Mar 20, 2008
Messages
412
Reaction score
37
Points
28
Hello, after some usage of multistage, I noticed in Orbiter beta (~Oct 2017), I get a CTD when trying to activate Multistage MFD. But it multistage2015 works in outside view, for example, pressing P... somehow I am not worried.

But actually I wanted to ask -

1) would it be possible to turn off venting effects, for example, launch is "scrubbed", I do not press "P", just to make something on the pad...
2) what about "burnt" texture swap on ET, after separation of SRB's?
 

Majid

New member
Joined
Oct 31, 2014
Messages
114
Reaction score
4
Points
0
So I have this code that if the Queststarlaunch is present then at a certain time do something.

Works. BUT if the Queststar is not there then at CTD.
So I need to code to read if OBJhandle is Queststar, MorningStar or Venturestar do this/that

Use oapiIsVessel to check if the OBJHANDLE is valid before you call oapiGetVesselInterface on it. If oapiIsVessel returns true, then you can proceed.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,374
Reaction score
756
Points
203
Location
Dallas, TX
Makes sense/ I am not sure how to use it.

I think it should be get the handle of the attached vessel and if the handle is Queststar,VentureStar,.... then do something. If not or nothing attached then do nothing?
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,644
Reaction score
51
Points
63
Hello, after some usage of multistage, I noticed in Orbiter beta (~Oct 2017), I get a CTD when trying to activate Multistage MFD. But it multistage2015 works in outside view, for example, pressing P... somehow I am not worried.

But actually I wanted to ask -

1) would it be possible to turn off venting effects, for example, launch is "scrubbed", I do not press "P", just to make something on the pad...
2) what about "burnt" texture swap on ET, after separation of SRB's?

Ms2015 is compiled against orbiter2016 official version. I will plan to compile it also for the beta now.

1) from a realistic point of view I think it should be the opposite: do not stop the venting if the launch is scrubbed. But at the moment I can't think on how to do it with the current version of Multistage. If you want to have something like this using just multistage you should create some ghost boosters group with zero thrust and just particle stream that will shut down when jettisoned, so if the launch occours they will be jettisoned immediately, otherwise you will have to press J to shut them off
2) can't remember if there is an option built in for this, but I think no

for both this points if you know how to code it should be easy enough to build a small plugin that will take care of everything, I'd recommend to create a launchpad module so you will also have the attachment handle check that you can use, I have ideas for coding this things if you need.

Makes sense/ I am not sure how to use it.

I think it should be get the handle of the attached vessel and if the handle is Queststar,VentureStar,.... then do something. If not or nothing attached then do nothing?

There are many ways to do this, it depends on what you precisely need.
You can check if an object is a valid vessel in general with oapiIsVessel like this:
Code:
OBJHANDLE h_my_vessel = oapiGetObjectByName("MyVessel");
if(oapiIsVessel(h_my_vessel)){
//do something
}
but that would be just if it is a vessel, not a specific venture star

if you want to check if the vessel is a venture star you can use oapiGetClassName and check it, even though my favourite solution if you have access to the code would be to implement in the venture star a clbkgeneric answer so if you call cbkgeneric with a specific parameter and it replies a specific code you will know it's a venture star.

That would be for all the venture stars, so if you have more than one in a scenario it could be not enough. If you want to get the handle of a specific vessel and you know that there can be others of that class in the scenario, the only way I know is to get the object handle through the name with oapiGetObjectByName
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
6,374
Reaction score
756
Points
203
Location
Dallas, TX
Thanks.
Yes I have access to the code as I wrote it.
So I can make all the class a Venture Star.

Can you give a example of using the getclass name
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,644
Reaction score
51
Points
63
Can you give a example of using the getclass name

Code:
OBJHANDLE h_vessel = NULL;

for(int i=0;i<oapiGetVesselCount();i++){
 h_vessel = oapiGetVesselByIndex(i);
 if(strcmp (oapiGetVesselInterface(h_vessel)->GetClassName(),"VentureStar")==0){
  //do something
  }else{
 //go away
  }
}
 

1987VCRProductions

Well-known member
Joined
Dec 19, 2011
Messages
371
Reaction score
175
Points
58
Location
Champaign-Urbana
Hey, I was just seeing if there were any updates regarding the issues between TransX and Multistage2015. I'm willing to do play testing on my end if that would help things any, I want to do whatever I can to help.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,644
Reaction score
51
Points
63
Hey, I was just seeing if there were any updates regarding the issues between TransX and Multistage2015. I'm willing to do play testing on my end if that would help things any, I want to do whatever I can to help.

Hi 1978VCRProductions, I have spent some hours checking and checking again but I can't find any clues of why this is happening actually... I also asked to the transX team but at the moment I still haven't got a reply on how to solve this quite misterious issue...

As far as MS2015 I can tell that it is a unique vessel, and that burnMFD gets exactly the same dV of MS2... so I can't understand why transX is performing differently... I will keep on investigating to see if I can get my head around this...
 

Marg

Active member
Joined
Mar 20, 2008
Messages
412
Reaction score
37
Points
28
I have a question about exp_bolts feature of multistage2015. Shouldn't there be 2 positions for pstreams? Because of 2 boosters, currently I get only 1.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,644
Reaction score
51
Points
63
I have a question about exp_bolts feature of multistage2015. Shouldn't there be 2 positions for pstreams? Because of 2 boosters, currently I get only 1.

I am not sure if I completely understood the question: if you mean why for explosive bolts there is only one particle stream definition option is just because when I added it I thought 1 was enough...

I have to update Multistage soon (when I find some time, with two daughters now is not so easy...), so if it is a request for 2 definitions I will add this. Talking about c++ I have in mind to switch to vectors for all the definitions since now I know how to use them quite well, so it means that there will be no number limitiation for anything anymore: no limitiation to stages, boosters, engines and I can put also particles in the list.
 
Top