- #1

- 2

- 0

## Main Question or Discussion Point

Hi, I'm trying to build a physics simulator right now its just doing launching an object a a certain velocity and angle and see when it lands or if it escapes earths gravity. It appears like the simulator is working but then to test it I tried getting an object to orbit and it can't so it leads me to think my formulas are messed up. objects either fly away or never escape...

first im ignoring air-resistence right now, but i am taking into account the change in gravity as you get higher up:

A = 398658366000000.0;

B = 6367443;

calcGravity = A / ((B + height of object)^2)

^^ I feel good about this one, B is the radius of the earth averaged between the equator and the poles, A is the universal gravity constant times the mass of earth, with calcGravity being equal to the accleration due to gravity (9.8 m/s^2 near the surface of the earth)

height = ( upwards velocity * time in seconds) - (1/2 of calcGravity) * (time^2)

basically height = v*t - 0.5*a*(t^2)

is there something wrong with these equations or do they not apply at extreme altitudes, I'm not that great at physics so maybe im missing something, i do have a feeling that it has to do with the fact that the vertical velocity is constant and somehow needs to be curtailed at some point, but at what point or how is beyond me...

first im ignoring air-resistence right now, but i am taking into account the change in gravity as you get higher up:

A = 398658366000000.0;

B = 6367443;

calcGravity = A / ((B + height of object)^2)

^^ I feel good about this one, B is the radius of the earth averaged between the equator and the poles, A is the universal gravity constant times the mass of earth, with calcGravity being equal to the accleration due to gravity (9.8 m/s^2 near the surface of the earth)

height = ( upwards velocity * time in seconds) - (1/2 of calcGravity) * (time^2)

basically height = v*t - 0.5*a*(t^2)

is there something wrong with these equations or do they not apply at extreme altitudes, I'm not that great at physics so maybe im missing something, i do have a feeling that it has to do with the fact that the vertical velocity is constant and somehow needs to be curtailed at some point, but at what point or how is beyond me...