Got a question. Since this is a double stage rocket. Both stages would be attached. To fly it switch to first stage and fire thrust. Then at a time press a key to dettach the first stage and switch to 2nd stage and fly away?
Got a question. Since this is a double stage rocket. Both stages would be attached. To fly it switch to first stage and fire thrust. Then at a time press a key to dettach the first stage and switch to 2nd stage and fly away?
If you are in the 2nd stage how would you fly it? Would you have rcs and main thrust from the 2nd stage just show up in the 1st stage if attached?You could also just switch directly to the second stage... or not attach the two stages, etc... Or not all receiving focus and make all automatic (what would be more realistic, since it is an unmanned vessel)
If you are in the 2nd stage how would you fly it? Would you have rcs and main thrust from the 2nd stage just show up in the 1st stage if attached?
oh. But then show the main thrust coming from 1st stage if attached? Flying from 2nd stage that is
You could make it a proper multistage vessel instead of using attachments. The only two attachment points would be child to ASE and parent to payload.oh. But then show the main thrust coming from 1st stage if attached? Flying from 2nd stage that is
void IUS1::clbkPostStep(double simt, double simdt, double mjd)
{
if (GetAttachmentStatus(RM1))//ATTACHED
{
newmass = 1134 + 1170;
SetEmptyMass (newmass);
attached = 1;
//SetISP(2898);
MAX_MAIN_THRUST = 184752.84;
MAX_MAIN_FUEL = 9631;
SetEXHAUST();
SetThrusterIsp(th_main[0], 2898);
}
if (!GetAttachmentStatus(RM1))//DEATACHED
{
SetEmptyMass(1170);
attached = 0;
//SetISP(2977.335);
MAX_MAIN_THRUST = 78272.76;
MAX_MAIN_FUEL = 2727.45;
SetEXHAUST();
SetThrusterIsp(th_main[0], 2977.335);
}
}
...
void IUS1::SetEXHAUST()
//
{
if (attached == 1)
{
//AddExhaust(th_main, 10.1,1, _V(0, 0, -1.5), _V(0, 0, -1));
if (stage != 2){
th_main[0] = CreateThruster(_V(0, 0, 0), _V(0, 0, -1.5), 184752, ph_main, 2898);
thg_main = CreateThrusterGroup(th_main, 1, THGROUP_MAIN);
AddExhaust(th_main[0], 10, 1, _V(0, 0, -1.5), _V(0, 0, -1));
stage = 2;
}
}
if (attached == 0)
{
if (stage != 1){
th_main[0] = CreateThruster(_V(0, 0, 0), _V(0, 0, -1.5), 78272.76, ph_main, 2977.335);
thg_main = CreateThrusterGroup(th_main, 1, THGROUP_MAIN);
AddExhaust(th_main[0], 10, 1, _V(0, 0, .841), _V(0, 0, -1));
stage = 1;
}
}
}
Sure you can veto. Well the code is not finish so comments have not been added.
void IUS1::clbkPostStep(double simt, double simdt, double mjd)
{
if (GetAttachmentStatus(RM1))//2ND STAGE IS ATTACHED TO 1ST STAGE
{
newmass = STAGE1MASS+STAGE2MASS; //MASS OF STAGE 1 AND STAGE 2 ARE ADDED
SetEmptyMass (newmass); //NEW MASS OF STAGE 2 AND STAGE 1
ATTACH_status=YES; //2ND STAGE IS ATTACHED TO 1ST STAGE
MAX_MAIN_THRUST = 184752.84; // THRUST OF STAGE 1
MAX_MAIN_FUEL = 9631; // FUEL OF STAGE1
SetThrusterIsp(th_main, 2898); //SETS ISP OF STAGE 1
SetThrusterMax0(th_main, 184752.84); //THRUST OF STAGE 1
AddExhaust(th_main, 10, 1, _V(0, 0, -1.5), _V(0, 0, -1)); //EXHAUST location OF 1ST STAGE
}
if (!GetAttachmentStatus(RM1))//2ND STAGE IS NOT ATTACHED TO 1ST STAGE
{
SetEmptyMass(1170); //EMPTY MASS OF STAGE 2 ALONE
ATTACH_status = NO; //2ND STAGE IS NOT ATTACHED TO 1ST STAGE
MAX_MAIN_THRUST = 78272.76; //THRUST OF STAGE 2 ALONE
MAX_MAIN_FUEL = 2727.45; //FUEL OF STAGE 2 ALONE
SetThrusterIsp(th_main, 2977.335); //SET ISP OF STAGE 2
SetThrusterMax0(th_main, 78272.76); //SET MAX THRUST OF STAGE 2 ALONE
AddExhaust(th_main, 1, 1, _V(0, 0, -1.5), _V(0, 0, -1)); //EXHAUST location OF 2ND STAGE
}
}
Thanks.
I guess I don't see what is wrong with if attach do something unless it is :
if (a) attach do something
else do something because not attached.
ok. Thanks. Never heard of doxygen. But looked it up.
One problem I see is if attach then set exhaust where it should be either at the nozzle of 1st or 2nd stage. I get that white circle.
So in summary:
If attached { get info from struct)
else (get info from struct}
But the set exhaust is the puzzle.
Well, what about simply creating two different thrusters, each with its own propellant resource... Oh wait, that's too easy.
Well yes. But you would need if attach then use thruster0 and if not attach use thruster1, right
The whole rcs is wierd. !2 nozzles and none facing forward/ up. Not sure how pitch would be achieved. Just by firing one side maybe?