The Student Room Group

Acceleration on Rocket

HELP! I'm trying to write a computer program (C) to plot the trajectory of the rocket as it flies from Earth to Moon. In the information sheet it says:

ax = -GMe*(1/rr^2)*(xr/|rr|) - GMm*(1/[rr-rm]^2)*([xr - xm]/[|rr - rm|])

Where:
ax = acceleration in x-direction (we're working in xy coords)
rr = a vector from the Earth to the Rocket
rm = a vectore from the Earth to the Rocket
xr = Rocket's x coordinate
xm = Moon's x coordinate
Me = Earth's Mass
Mm = Moon's Mass

Now, in order to input this acceleration in the x direction into my program I have to resolve the vector's into their x-direction BUT also be aware that their y co-ords will have an effect on the gravitational force felt in the x direction.

Could some-one explain to me what I actually have to compute then (not how to write the program, but help with the Physics!!!)? Also, when it says "rr^2" does this mean the modulus squared?!

Please help, I'm really stuck!!! Thanks
Chloé
xxx
Reply 1
Hoofbeat
HELP! I'm trying to write a computer program (C) to plot the trajectory of the rocket as it flies from Earth to Moon. In the information sheet it says:

ax = -GMe*(1/rr^2)*(xr/|rr|) - GMm*(1/[rr-rm]^2)*([xr - xm]/[|rr - rm|])

Where:
ax = acceleration in x-direction (we're working in xy coords)
rr = a vector from the Earth to the Rocket
rm = a vectore from the Earth to the Rocket
xr = Rocket's x coordinate
xm = Moon's x coordinate
Me = Earth's Mass
Mm = Moon's Mass

Now, in order to input this acceleration in the x direction into my program I have to resolve the vector's into their x-direction BUT also be aware that their y co-ords will have an effect on the gravitational force felt in the x direction.

Could some-one explain to me what I actually have to compute then (not how to write the program, but help with the Physics!!!)? Also, when it says "rr^2" does this mean the modulus squared?!

Please help, I'm really stuck!!! Thanks
Chloé
xxx

Is rm vector from the Earth to the Moon, not to the rocket?
Reply 2
Mathemactically, rr^2 = |rr|^2.cos(rr,rr) = |rr|^2.cos0 = |rr|^2. So you're right, it means modulus squared.

xr/|rr| = cos(rr, Ox) where (rr, Ox) is the angle between rr and x positive coordinate.

Therefore, if we consider the force acts on the Rocket by the Earth due to x axis
Fe = [GMem/rr^2] .cos(rr, Ox) = [GMem/rr^2].xr/|rr|
where m is mass of the Rocket

I think the remain is the same.
:smile:
Reply 3
BCHL85
Is rm vector from the Earth to the Moon, not to the rocket?


Yes sorry! Was in a mad rush trying to type it out before my tute!
Reply 4
BCHL85
Therefore, if we consider the force acts on the Rocket by the Earth due to x axis
Fe = [GMem/rr^2] .cos(rr, Ox) = [GMem/rr^2].xr/|rr|
where m is mass of the Rocket

I think the remain is the same.
:smile:


Thanks a lot. Surely however, we don't need to resolve the components (I'm assuming that's what you're doing with the cosine) as the vector has already split the distance into its respective x and y coords. :frown: I think tomorrow is going to be one longggggggg day of pestering the demonstrators in the computer lab. I've spent the whole day trying to get this program to work and I don't want to waste another whole day tomorrow!
Reply 5
Hoofbeat
Yes sorry! Was in a mad rush trying to type it out before my tute!

It's ok .. check my work ... if there's a mistake :smile:

Latest

Trending

Trending