C++ Question Searching a way to simulate a thruster

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,295
Reaction score
3,264
Points
203
Location
Toulouse
Hello,

I'm searching a way to simulate the fuel consumption of a thruster.

I have a tank (oxygen) that I want to be depleted in function of time. I can't use thrusters because it causes the terrible "bouncing bug" once landed, even if the two thrusters are exact opposites. So I'm searching a way to simulate fuel (oxygen) consumption, but without using thrusters...

I tried this, but it seems frame-rate-dependant (in clbkPostStep) :

double CrewN = Crew.GetCrewTotalNumber();
double O2consumption = CrewN;
double O2lvl = GetPropellantMass(LOX);

if (GetPropellantMass(LOX) > 0) {

O2lvl = O2lvl-(O2consumption*(simt*0.001));

}

Any help welcome :tiphat:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,655
Reaction score
2,376
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Instead of simt, use simdt.
 
Top