General Question Multiple thrusters

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,736
Reaction score
2,707
Points
203
Location
Dallas, TX
I am working on a vessel that has 1 Main thruster along the centerline. It has 2 "fake" thrusters for effects that rotate.

In the atmosphere I want to see the exhaust. But it no atmosphere I want no exhaust. So they get shut down.

The problem is that effects the thruster control. I understand why.

Is there a fix? When ion drive is on it just shows a mesh

thrusters and exhaust created
Code:
th_main[0] = CreateThruster (_V(0,0,0), _V(0,0,1), MAX_MAIN_THRUST, ph_main, ISP_GAL);
th_main[1]  = CreateThruster (_V(1.524,.5724375,.8676109), _V(0,0,1), SYSTEMS_THRUST, ph_main, 0);//fake thruster
th_main[2]  = CreateThruster (_V(-1.524,.5724375,.8676109), _V(0,0,1), SYSTEMS_THRUST, ph_main, 0);//fake thruster
        thg_main = CreateThrusterGroup (th_main, 3, THGROUP_MAIN);

    AddExhaust (th_main[1], 2, .3,.3);
    AddExhaust (th_main[2], 2, .3,.3);
in the poststep
Code:
ATMD1= GetAtmDensity () ;

//if ion drive on and in low atmosphere cut  fake engines off        
}
if ((ATMD1<.09)|| (iondrive==1)){SetAnimation (anim_EXHAUSTfins, thrusterlevel);
    SetThrusterLevel(th_main[1],0);
        SetThrusterLevel(th_main[2],0);
    SetAnimation (anim_EXHAUSTfins, 0);
}
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
Just give your non-functional thrusters a thrust of 0. and define their exhausts appropriately. Bot the DG and ShuttleA have exhausts that are only visible in atmosphere (contrails) adapt their specs to your purpose.
 

Izack

Non sequitur
Addon Developer
Joined
Feb 4, 2010
Messages
6,665
Reaction score
13
Points
113
Location
The Wilderness, N.B.
Put the fake thrusters into a separate group, and set that group's level to the main thruster group's level if inside atmosphere.

Thruster Definition:
Code:
th_main = CreateThruster (_V(0,0,0), _V(0,0,1), MAX_MAIN_THRUST, ph_main, ISP_GAL);

th_ion[0]  = CreateThruster (_V(1.524,.5724375,.8676109), _V(0,0,1), SYSTEMS_THRUST, ph_main, 0);//fake thruster
th_ion[1]  = CreateThruster (_V(-1.524,.5724375,.8676109), _V(0,0,1), SYSTEMS_THRUST, ph_main, 0);//fake thruster

thg_main = CreateThrusterGroup (th_main, 1, THGROUP_MAIN);
th_main no longer needs to be an array; instead have an array called th_ion.

In PostStep:
Code:
if (GetAtmDensity() < 0.09)
{
	for (int i = 0; i < 2; i++)
		SetThrusterLevel(th_ion[i], GetThrusterLevel(th_main));
	SetAnimation(anim_EXHAUSTfins, GetThrusterLevel(th_main));
}
else
{
	for (int i = 0; i < 2; i++)
		SetThrusterLevel(th_ion[i], 0);
	SetAnimation(anim_EXHAUSTfins, 0);
}

As Hlynkacg said, the 'SYSTEMS_THRUST' should be zero, or else very, very small.
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,736
Reaction score
2,707
Points
203
Location
Dallas, TX
Thanks. :salute:That did it.
Code:
th_main[1]  = CreateThruster (_V(1.524,.5724375,.8676109), _V(0,0,1), 0, ph_main, 0);//fake thruster
th_main[2]  = CreateThruster (_V(-1.524,.5724375,.8676109), _V(0,0,1), 0, ph_main, 0);//fake thruster


---------- Post added at 07:25 PM ---------- Previous post was at 11:37 AM ----------

Ok I followed this:
Code:
th_main = CreateThruster (_V(0,0,0), _V(0,0,1), MAX_MAIN_THRUST, ph_main, ISP_GAL);

th_ion[0]  = CreateThruster (_V(1.524,.5724375,.8676109), _V(0,0,1), 0, ph_main, 0);//fake thruster
th_ion[1]  = CreateThruster (_V(-1.524,.5724375,.8676109), _V(0,0,1), 0, ph_main, 0);//fake thruster

thg_main = CreateThrusterGroup (th_main, 1, THGROUP_MAIN);


	AddExhaust (th_ion[1], 2, .3,.3);
	AddExhaust (th_ion[2], 2, .3,.3 );



but get this error:

error C2664: 'VESSEL::CreateThrusterGroup' : cannot convert parameter 1 from 'THRUSTER_HANDLE' to 'THRUSTER_HANDLE *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
 

Izack

Non sequitur
Addon Developer
Joined
Feb 4, 2010
Messages
6,665
Reaction score
13
Points
113
Location
The Wilderness, N.B.
Ah, my mistake. It should read:
Code:
thg_main = CreateThrusterGroup ([COLOR="Red"]&[/COLOR]th_main, 1, THGROUP_MAIN);
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,736
Reaction score
2,707
Points
203
Location
Dallas, TX
Thanks. But now I don't see any exhaust.

Code:
//THRUSTER_HANDLE th_att_rot[4], th_att_lin[4];		
th_main = CreateThruster (_V(0,0,0), _V(0,0,1), MAX_MAIN_THRUST, ph_main, ISP_GAL);

th_ion[0]  = CreateThruster (_V(1.524,.5724375,.8676109), _V(0,0,1), 0, ph_main, 0);//fake thruster
th_ion[1]  = CreateThruster (_V(-1.524,.5724375,.8676109), _V(0,0,1), 0, ph_main, 0);//fake thruster

thg_main = CreateThrusterGroup (&th_main, 1, THGROUP_MAIN);

	AddExhaust (th_ion[0], 2, .3,.3);
	AddExhaust (th_ion[1], 2, .3,.3 );

I think the thrust level of the ion enignes isn't being increased with the main
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,290
Reaction score
3,258
Points
203
Location
Toulouse
Mmh did you try that ? Not 100% sure but worth a try :

Code:
if (GetAtmDensity() < 0.09)
{
	for (int i = 0; i < 2; i++)
		SetThrusterLevel(th_ion[i], GetThrusterLevel([B]&[/B]th_main));
	SetAnimation(anim_EXHAUSTfins, GetThrusterLevel([B]&[/B]th_main));
}
else
{
	for (int i = 0; i < 2; i++)
		SetThrusterLevel(th_ion[i], 0);
	SetAnimation(anim_EXHAUSTfins, 0);
}
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,736
Reaction score
2,707
Points
203
Location
Dallas, TX
Thanks
This works for now:
So if ion drive is off and Atmosphere density is greater than .1 then set the thruster level to the main thruster.
Code:
COLL=(GetThrusterLevel (th_main));


if ((ATMD1>.1)&& (iondrive==0)){
	SetThrusterLevel(th_ion[0],COLL);
	SetThrusterLevel(th_ion[1],COLL);
}
 
Top