Hello, :hello:
To keep a rocket realistic, the thrust has to build up at liftoff during a few seconds, except maybe for SRBs.
I'm trying to get this piece of code working. With success sometimes, but not always. There's certainly a way to improve it.
The idea is that the engines are pre-ignited at 20%, then their thrust build up until it reaches 100%.
I tried to write it as a function. The basic concept is "équation de droites", I didn't found a translation on Wikipedia :
The following is running in clbkPostStep(double simt, double simdt, double mjd)
So, what do you think about it ?
To keep a rocket realistic, the thrust has to build up at liftoff during a few seconds, except maybe for SRBs.
I'm trying to get this piece of code working. With success sometimes, but not always. There's certainly a way to improve it.
The idea is that the engines are pre-ignited at 20%, then their thrust build up until it reaches 100%.
I tried to write it as a function. The basic concept is "équation de droites", I didn't found a translation on Wikipedia :
The following is running in clbkPostStep(double simt, double simdt, double mjd)
if (GetThrusterLevel(th_main[0]) >= 0.02 && GetThrusterLevel(th_main[1]) >= 0.02 && ignition1 && SEP == 0)
{
if (ignitionA) // timer
{
Time = simt;
}
long double MainE;
MainE = 0.2*(simt-Time) + 0.2; // y = a . x + b ; y = thrust level, x = time, b = "starting offset"
SetThrusterLevel(th_main[0], MainE);
SetThrusterLevel(th_main[1], MainE);
if (MainE >= 1)
{
ignition1 = false; // close loop
}
ignitionA = false; // do only once
}
So, what do you think about it ?
Last edited: