# How are my calculations wrong?

## Recommended Posts

Hey there fellow Kerbonauts!

Recently I have been attempting to find an elegent formula with which I can calculate the apogee of a vertically flying rocket in a simplified system (no aerodynamic resistance and earth acceleration remains constant). I started off by defining the overall force F as the sum of all forces acting upon a vertically flying rocket. FT is the Force exerted by the engine and FG is the gravitational force pulling the rocket downwards (hence the negative sign):

F = FT - FG

Spoiler

Since the mass of a rocket is changing over the time I described the mass at a given time t with the following formula, whereas M is the initial mass and m' is the fuel mass flow rate in kg/s:

m(t) = M - m' * t

Dividing the sum of all forces by the current mass gives us the acceleration of the rocket at the time t (FG/m(t) = g, because FG = m(t) * g).

a(t) = F/m(t)

a(t) = FT/(M - m' * t) - g

Spoiler

By integrating this formula in the interval [0;t] I get the following formula:

v(t) = (FT/m') * ln[M/(M-m' * t)] - g * t

FT/m' = ISP

Intergrating the formula for the velocity at the time t should give us the track covered by the rocket after the time t:

s(t) = ISP * {t * ln(M2 - M * m' * t) + (M/m') * ln[M/(M - m' * t)] - t} - g * t2/2

Spoiler

If I want to calculate the altitude at which the main engine cuts off (MECO), I first need to calculate the burn time:

tMECO = (M - m0)/m' = mT/m'

M ... total mass of the rocket

m0 ... mass of the rocket without any fuel

mT ... fuel mass

Spoiler

Having found the MECO time and thus the altitude and velocity at this given moment, I have to create a parabolic function using the following inputs:

s(tMECO), v(tMECO), a = - g

h(t) = - g * t2/2 + v(tMECO) * t + s(tMECO)

To test my formula I built a small rocket and calculated that its Apogee should be at around 1017.391km. Because I was ignoring atmospheric drag in my formulas I assumed that the real apogee was going to be lower than the one I calculated. However, the opposite was true: In the demonstration my rocket reached an apogee of roughly 1500km. So I started thinking what could have caused such a miscalculation and I could not find an answer.

I would love to hear your answers. Thank you very much for taking your time thinking about this issue and I apologize for my possible grammar and math mistakes.

Fly safe!

##### Share on other sites

53 minutes ago, Karol van Kermin said:

Having found the MECO time and thus the altitude and velocity at this given moment, I have to create a parabolic function using the following inputs:

s(tMECO), v(tMECO), a = - g

h(t) = - g * t2/2 + v(tMECO) * t + s(tMECO)

To test my formula I built a small rocket and calculated that its Apogee should be at around 1017.391km. Because I was ignoring atmospheric drag in my formulas I assumed that the real apogee was going to be lower than the one I calculated. However, the opposite was true: In the demonstration my rocket reached an apogee of roughly 1500km. So I started thinking what could have caused such a miscalculation and I could not find an answer.

I would love to hear your answers. Thank you very much for taking your time thinking about this issue and I apologize for my possible grammar and math mistakes.﻿﻿

If you're using KSP or RSS, keep in mind that gravity does not remain constant.

##### Share on other sites

7 minutes ago, Ultimate Steve said:

If you're using KSP or RSS, keep in mind that gravity does not remain constant.

i usually call the saved delta-v 'gravy'

##### Share on other sites

9 minutes ago, Ultimate Steve said:

If you're using KSP or RSS, keep in mind that gravity does not remain constant. ﻿

So in short: my formulas aren't useful if I do not take the change of gravity into account?

Edit: Also, does gravity really change that significantly, so that I can miscalculate by about 500km?

Edited by Karol van Kermin
##### Share on other sites

10 minutes ago, Karol van Kermin said:

So in short: my formulas aren't useful if I do not take the change of gravity into account?

Edit: Also, does gravity really change that significantly, so that I can miscalculate by about 500km?

Correct, and correct.

##### Share on other sites

13 minutes ago, Karol van Kermin said:

So in short: my formulas aren't useful if I do not take the change of gravity into account?

Edit: Also, does gravity really change that significantly, so that I can miscalculate by about 500km?

If you're using stock KSP for simulations, Kerbin's radius is 600km. If you flew upwards to 1500km you are almost quadrupling the distance from the core. By my calculations, acceleration due to gravity is 0.8m/s2 at that altitude, 10x less than at the surface.

##### Share on other sites

I can confirm @Ultimate Steve‘S calc. Furthermore, your original intuition would be correct on earth, gravity would only be 75% of the surface value at 1500 km.

Edited by Nightside
##### Share on other sites

9 hours ago, Karol van Kermin said:

... calcula﻿te﻿﻿ the apogee of a vertically flying rocket in a simplified ﻿system (no aerodynamic resistance and eart﻿h accelerat﻿ion remains constant﻿)﻿﻿﻿﻿﻿﻿﻿﻿﻿. ...

...

... To﻿﻿﻿ test ﻿my formula I built a small rocket﻿ and calculated that its Apogee should be at ﻿around﻿ 1017.391km﻿﻿. ...

1. Kerbin is not Earth.

2. You should get more than your calculation if it's on an airless body - the lesser gravity makes for a bigger boost because your rocket has to fight less of it.

##### Share on other sites

You can use the geopotential energy formula to solve for height once you get velocity. It takes into account changing gravity. You’d have to add in the height of MECO though, or take into account somehow.

This equation also accounts for Kerbin not being Earth, since one of the terms is the gravitational constant times mass, and Kerbin has a lower mass than Earth.

Edited by Bill Phil
##### Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

• #### Community

• Release Notes

• #### Social Media

• Store
×
• Create New...