SDK Question third PropellantResource tank alway emty error

Woodylepic

New member
Joined
Dec 29, 2009
Messages
71
Reaction score
0
Points
0
screenshot172ul.jpg

screenshot174q.jpg

screenshot175.jpg

screenshot176b.jpg

Hi all
I have trouble whene i creat propelant tank
The probleme is
If I put more than 2 propelant resource in same stage, the third one was alway emty ?

Does somebody experience the same trouble ? and how to resolve that ?:idk:
Thank in advence for your reply.
Here my tank configuration and initialisation.
Code:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (!ph_rcs_tank)ph_rcs_tank = CreatePropellantResource (STAGE1_RCS_MASS_FUEL); [/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (!ph_algol_tank) ph_algol_tank = CreatePropellantResource(STAGE1_ALGOL_MASS_FUEL); [/SIZE]

[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (!ph_recrut_tank) ph_recrut_tank = CreatePropellantResource(STAGE1_RECRUIT_MASS_FUEL); //third one alway emty (that why I have to put algol_tank insted or RCS_tank in my ATTcontrolRCS) even if I interchange the order here so its not an error whit my tank  ???[/SIZE]

Code:
void A_002::SetAttControlsFirst (void)  
{
	THRUSTER_HANDLE th_att_rot[4];
	th_att_rot[0] = CreateThruster (_V(-2.234,0, -8.742-0.691620227), _V(0, -1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);// dn let
	th_att_rot[1] = CreateThruster (_V(2.234,0,-8.742-0.691620227), _V(0, -1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);//dn right	
	th_att_rot[2] = CreateThruster (_V(-2.234,0,-8.742-0.691620227), _V(0,1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);//pitch up left
	th_att_rot[3] = CreateThruster (_V(2.234,0, -8.742-0.691620227), _V(0,1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);//pitch up right
	CreateThrusterGroup (th_att_rot,   2, THGROUP_ATT_PITCHUP);
	CreateThrusterGroup (th_att_rot+2, 2, THGROUP_ATT_PITCHDOWN);
    AddExhaust (th_att_rot[0], 0.99, 0.103, _V(-2.234,0,-8.742-0.691620227), _V(0,-1,0));
	AddExhaust (th_att_rot[1], 0.99, 0.103, _V( 2.234,0,-8.742-0.691620227), _V(0,-1,0));
	AddExhaust (th_att_rot[2], 0.99, 0.103, _V(-2.234,0,-8.742-0.691620227), _V(0, 1,0));
	AddExhaust (th_att_rot[3], 0.99, 0.103, _V( 2.234,0,-8.742-0.691620227), _V(0, 1,0));
	th_att_rot[0] = CreateThruster (_V(0,2.234,-8.742-0.691620227), _V(1,0,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	th_att_rot[1] = CreateThruster (_V(0,-2.234,-8.742-0.691620227), _V(1,0,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	th_att_rot[2] = CreateThruster (_V( 0,-2.234,-8.742-0.691620227), _V(-1,0,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	th_att_rot[3] = CreateThruster (_V( 0,2.234,-8.742-0.691620227), _V(-1,0,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	CreateThrusterGroup (th_att_rot,   2, THGROUP_ATT_YAWLEFT);
	CreateThrusterGroup (th_att_rot+2, 2, THGROUP_ATT_YAWRIGHT);
	AddExhaust (th_att_rot[0], 0.99, 0.103, _V(0,2.234,-8.742-0.691620227), _V(-1,0,0));
	AddExhaust (th_att_rot[1], 0.99, 0.103, _V(0,-2.234,-8.742-0.691620227), _V(-1,0,0));
	AddExhaust (th_att_rot[2], 0.99, 0.103, _V(0,-2.234,-8.742-0.691620227), _V(1,0,0));
	AddExhaust (th_att_rot[3], 0.99, 0.103, _V(0,2.234,-8.742-0.691620227), _V(1,0,0));
	th_att_rot[0] = CreateThruster (_V( -2.234,0,-8.742-0.691620227), _V(0, -1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	th_att_rot[1] = CreateThruster (_V(2.234,0,-8.742-0.691620227), _V(0,1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	th_att_rot[2] = CreateThruster (_V(-2.234,0,-8.742-0.691620227), _V(0, 1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	th_att_rot[3] = CreateThruster (_V( 2.234,0,-8.742-0.691620227), _V(0,-1,0), MAX_RCS_THRUST, ph_algol_tank, ISP_FIRST_VAC);
	CreateThrusterGroup (th_att_rot, 2, THGROUP_ATT_BANKLEFT);
	CreateThrusterGroup (th_att_rot+2, 2, THGROUP_ATT_BANKRIGHT);
	AddExhaust (th_att_rot[0],  0.99, 0.103, _V(-2.234,0,-8.742-0.691620227), _V(0,1,0));
	AddExhaust (th_att_rot[1],  0.99, 0.103, _V( 2.234,0,-8.742-0.691620227), _V(0,-1,0));
	AddExhaust (th_att_rot[2],  0.99, 0.103, _V( -2.234,0,-8.742-0.691620227), _V(0,-1,0));
	AddExhaust (th_att_rot[3],  0.99, 0.103, _V(2.234,0,-8.742-0.691620227), _V(0,1,0));
}
 
Last edited by a moderator:
The code uses pre-existing values of ph_*_tank variables. How are they initialized?
 
Here the initialisation
If I interchange the Order of the tank the third one alway 0 or emty ? I realy dont enderstand why ?:idk:



Code:
PROPELLANT_HANDLE ph_rcs_tank,ph_algol_tank,ph_recrut_tank,ph_les_tank,ph_les_jettisson_tank,ph_pitch_control_tank;
    THRUSTER_HANDLE th_algol_engine[2],th_recruit_engine[4],th_les_engine[4],th_les_jettisson_engine[2],th_pitch_control_eng[1];                     
    THGROUP_HANDLE thg_algol,thg_recruit,thg_les_eng,thg_les_jettisson_eng,thg_pitch_control_eng;
 
Last edited by a moderator:
This is not initialisation. Try:
PROPELLANT_HANDLE ph_recrut_tank = NULL;
 
That is allready done in initialisation sorry have forget to send this

Code:
A_002::A_002 (OBJHANDLE hObj, int fmodel)
: VESSEL3 (hObj, fmodel)
{
	// propellant resources
	 ph_rcs_tank    = NULL;
	 ph_algol_tank  = NULL;
	 ph_recrut_tank = NULL;//disconnect the thruster from its current tank,
   
	// truster group resources
	thg_algol        = NULL;
    thg_recruit      = NULL;
	stage=0;
	LJdroguechute_proc = 1.0;
	LJdroguechute_status = OPEN;
	drogue_status = DROGUE_CLOSED;
	drogue_moving=false;
	drogue_endanim=false;
	drogue_proc=0;
	drogue_reefed=0;
	MET1=0;
	MET=0;
	POSTMET=0;
	 BP12 = MESH_UNDEFINED;
	LJ_A002_First_Stage = MESH_UNDEFINED;
	LJ_A002_LES = MESH_UNDEFINED;
	DefineAnimations();
	}


---------- Post added at 06:42 PM ---------- Previous post was at 06:37 PM ----------

If I put
PROPELLANT_HANDLE before ph_algol_tank = NULL; or any thank I got a CTD ??? why ?:idk:
 
Last edited by a moderator:
Back
Top