How to calculate the "altitude of death"?

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
671
Reaction score
32
Points
43
Hello,

lets say the G-force of the reference body is constant, and the acceleration of the engine also, how can i calculate the point on witch i have to activate my engine, to get my Velocity to 0 when the altitude is 0 too?

for better understanding:

r1.png



Given is:
Current Velocity (Vc)
Current altitude (sc)
Acceleration of reference body (ag)
Resulting acceleration when the engine is engaged (ar)

Wanted:
Altitude of death (sd) => (The last change to activate the engine)
 
Last edited:
I would think that this is fairly simple. If you know your current vertical speed and altitude, and you know the net acceleration you can provide, can you simply just calculate at what altitude you'd be at 0 vertical velocity provided those initial condition and iterate this calculation based on the results of the prior calculation to converge on the "altitude of death" you seek?

Let me know if any of this isn't clear, I'd be happy to try and explain it in a bit more depth.
 
Last edited:
[math]
a(t)=a_E-g=\mathrm{const}
[/math]
[math]
v(t) = \int_t a(t)dt
[/math]
[math]
x(t) = \int_t v(t)dt
[/math]
You can work it out from here.
 
I would think that this is fairly simple. If you know your current vertical speed and altitude, and you know the net acceleration you can provide, can you simply just calculate at what altitude you'd be at 0 vertical velocity provided those initial condition and iterate this calculation based on the results of the prior calculation to converge on the "altitude of death" you seek?

Let me know if any of this isn't clear, I'd be happy to try and explain it in a bit more depth.

Yes i know that it is possible, even by using numeric integration for example.

But i think there must be a "simple" formular (even without using integral calculations) !? (or maybe iam wrong)
 
No need for numerical integration or iterative solution. The integrals for this trivial case have a very simple analytic form.

Edit:

... which is given in the next post (I think RisingFury just spoiled the exercise for the student :lol:). Now you know the solution, all that is left to you is to post the derivation.
 
Are you assuming that the rocket engine is on immediately at the start of the simulation and you vary the start altitude, or that the starting altitude is the same but the rocket is allowed to fall until it reaches the "altitude of death"?
 
Are you assuming that the rocket engine is on immediately at the start of the simulation and you vary the start altitude, or that the starting altitude is the same but the rocket is allowed to fall until it reaches the "altitude of death"?
In the second case,
[math]
a(t)=\left\lbrace \begin{array}{ll}
a_1 = -g & (0 \leq t \leq t_d) \\
a_2 = a_E-g & (t_d < t \leq t_1)
\end{array}\right.
[/math]
so the integrals would be solved in two parts. A bit more tedious, but still with analytic solution.
 
[deleted]
 
Last edited:
Sorry i have deleted the last post, because my solution was wrong.


Are you assuming that the rocket engine is on immediately at the start of the simulation and you vary the start altitude, or that the starting altitude is the same but the rocket is allowed to fall until it reaches the "altitude of death"?
The roket will fall to the "Altitude of death", on this point, the engine has to start to get V to 0 when the roket will reach the ground.

By calculating this altitude, it will be possible to make a "security module" for orbiter, witch will automaticly start the engine on some conditions, so that you can't crash into ground ;-).
Or to show this altitude on a MFD, so the pilot would see this altitude.
 
Last edited:
How much, if any, do these formulas change from the fact that both the acceleration due to gravity varies with altitude and the acceleration from engines at full thrust increases over time?
 
How much, if any, do these formulas change from the fact that both the acceleration due to gravity varies with altitude and the acceleration from engines at full thrust increases over time?

Wouldn't you just substract the acceleration of the engines from the gravitational constant (or the other way around, I'm not sure)?
 
Well acceleration from gravity is increasing (probably negligably in most cases), and acceleration from thrust is increasing, but not at the same rate. So your total acceleration is changing somewhat throughout your fall.
 
Well acceleration from gravity is increasing (probably negligably in most cases), and acceleration from thrust is increasing, but not at the same rate. So your total acceleration is changing somewhat throughout your fall.

Presumably we're dealing with a system where the mass change is negligible (not really realistic for a rocket, but the math becomes more involved if you take it into account). In this case, so long as the engine's operation isn't changing any (neglect ambient air pressure and things like that), I can't see how the rocket engine's acceleration would change. And sure, acceleration due to gravity will change, but like you said, that's probably small over the range we're (presumably) dealing with.

I think the idea here was for a basic simulation that would give an approximate solution, and these simplifications will do that. But using them will produce different results from Orbiter and real life: the question is how much error is acceptable. I suppose only Topper would know that. :)
 
The one thing being overlooked here is the forward velocity... If the rocket is completely stationary horizontally relative to the surface, then yes these equations work out just like a launch in reverse to a given altitude with a given mass of propellant...

But to have a "safety net" module, in most instances you are going to have momentum relative to the planet, in which case it might take a lot less delta-v to increase to an orbital velocity than to go against gravity with brute force...

In this case, you need to compare the remaining delta-v of the ship in it's current configuration, the delta-v to reach velocity 0 at altitude 0, and the delta-v required to have a periapsis above altitude 0 if there is no atmosphere, and above or not too low in the atmosphere otherwise...
 
Presumably we're dealing with a system where the mass change is negligible (not really realistic for a rocket, but the math becomes more involved if you take it into account). In this case, so long as the engine's operation isn't changing any (neglect ambient air pressure and things like that), I can't see how the rocket engine's acceleration would change. And sure, acceleration due to gravity will change, but like you said, that's probably small over the range we're (presumably) dealing with.

I think the idea here was for a basic simulation that would give an approximate solution, and these simplifications will do that. But using them will produce different results from Orbiter and real life: the question is how much error is acceptable. I suppose only Topper would know that. :)

Hi,

yes youre right, an approximate solution wille be enogh, because i can improve this solution later.

So a first approach is to calculate the impact speed:
v_impact = sqrt((Yspd*Yspd)+2*g*s_to_ground)

The maximum resulting acceleration of the engine can be calculated by:
a_resulting = -g + a_engine_max (if g is negativ)

the stopping distance for v_impact can be calculate by
s_stop = (v_impact*v_impact)/(2 * a_resulting)

But now my problem starts:
I will not get the speed "v_impact" to zero.
I will get the speed to 0 i have by starting the burn. (it's much less than v_impact, because v will increase by falling down when i not burn)

But i can't calculate these speed because i have not the altitude (remember, the altitude is what i want).

So i've tried to use v_impact as an approximation.
Then i can take these altitude for calculating v_burnstart and so on (sucsessive approximation).
This works well on the moon and mars, but on earth i have a "1.#IND00" in my Alt_Burn - Var in after some steps (i know it's when AltBurn>Alt, but how that is possible?).

I don't now why !? (And yes, i have reduced the fuel so i can hover in my DG :) )

I also think there must be a better way!


Here is my current code for calculating these "savety altitude" (sounds better then "alt of death" :) )

Code:
double SurfaceSpeedMFD::GetSaveAlt()
{
    double Alt = GetGearAlt();  //returns the Altitude under the Gear
    VESSEL *V=oapiGetFocusInterface();
    VECTOR3 vG; 

    OBJHANDLE RefGBody= V->GetGravityRef();
    double rMass = oapiGetMass (RefGBody);
    double r = oapiGetSize (RefGBody);
    double a0 = (G * rMass) / (r*r);
    double aDown = (G * rMass) / ((r+Alt)*(r+Alt));  //G-body acceleration

    //Getting the required hover engine parameter
    int nthr=V->GetGroupThrusterCount(THGROUP_HOVER);
    double FupMax=0;
    for(int i=0; i<nthr; i++) 
    {
        THRUSTER_HANDLE th=V->GetGroupThruster(THGROUP_HOVER,i);
        FupMax = FupMax + V->GetThrusterMax0(th);
    }
    
    double aUpMax = FupMax / V->GetMass();  //Maximum acceleration using the hover-engine
    double aTot = aUpMax - aDown;  //resilting (positive) acceleration when the engine is engaged

    // now we have:       ar = aTot               
    //Getting of the current Values (Altitude and verticle speed)... 
    VECTOR3 Vspd;
    V->GetHorizonAirspeedVector(Vspd);
    double Yspd = Vspd.y;   //Verticle speed

    //now we can calculate the altitute where whe have to 
    //start our hover engine (s_ignition)
    double Vimpact = sqrt((Yspd*Yspd)+2.0f*aDown*Alt);   //Impact speed on ground contact if we do NOT burn

    double AltBurn = ((Vimpact*Vimpact)/(2.0f * aTot)); //aproximated alt to start the engine
    double VOnAltburn = sqrt((Vimpact*Vimpact)+2.0f*aDown*(Alt-AltBurn)); //aproximated

    //sucsessive approximation...
    for (int lauf=0; lauf<100; lauf++)
    {       
       aDown =  ((G * rMass) / ((AltBurn + r)*(AltBurn + r)) + a0) / 2.0f;  //acceleration, mean value beetween altitude of ground and altitute where we have to start the burn
       aTot = aUpMax - aDown;  //calculating of the new value for the resulting (positiv) acceleration
       AltBurn = ((VOnAltburn*VOnAltburn)/(2.0f * aTot));  
       VOnAltburn = sqrt((Yspd*Yspd)+2.0f*aDown*(Alt-AltBurn));      
    } 
    return AltBurn;
}
 
Last edited:
Presumably we're dealing with a system where the mass change is negligible (not really realistic for a rocket, but the math becomes more involved if you take it into account). In this case, so long as the engine's operation isn't changing any (neglect ambient air pressure and things like that), I can't see how the rocket engine's acceleration would change. And sure, acceleration due to gravity will change, but like you said, that's probably small over the range we're (presumably) dealing with.
Assuming you're putting the engine on full thrust through the whole 'burn', as you lose propellant mass, the acceleration increases. (which is one good reason that programs like BurnTimeMFD are needed for burns) I'm thinking that you'll need to figure out the average acceleration throughout the time of the burn. (though finding the length of time the burn will take is a whole different problem (?))
Maybe I'm making this too complicated. But I'm trying to find a precise (rather than approximate) solution that will work in Orbiter.
 
Assuming you're putting the engine on full thrust through the whole 'burn', as you lose propellant mass, the acceleration increases. (which is one good reason that programs like BurnTimeMFD are needed for burns) I'm thinking that you'll need to figure out the average acceleration throughout the time of the burn. (though finding the length of time the burn will take is a whole different problem (?))
Maybe I'm making this too complicated.

Do you talking about this one: [ame="http://www.orbithangar.com/searchid.php?ID=4530"]Burn Time Calculator 2.0[/ame] ??
I know how it works because i've coded a part of it :) (including the last upddate)

Yes of course you are right, but i will consider the Fuel consumption in the next step, the program isn't finished.


But I'm trying to find a precise (rather than approximate) solution that will work in Orbiter.

That would be great! Please let me know your solution!
 
Back
Top