Help Chloé Plot Rocket Trajectory from Earth to Moon

In summary, the equation given in the information sheet for calculating the acceleration in the x-direction of a rocket flying from Earth to Moon takes into account both the Earth's and Moon's masses, as well as the position vectors of the rocket and moon. The use of angles and cosines in the equation is not necessary as the vector equations already give the directions.
  • #1
Hoofbeat
48
0
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? Also, when it says "rr^2" does this mean the modulus squared?!

Please help, I'm really stuck! Thanks
Chloé
xxx
 
Physics news on Phys.org
  • #2
Hoofbeat said:
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
I'm guessing you meant to write "a vector from the Earth to the Moon" here, right?
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? Also, when it says "rr^2" does this mean the modulus squared?!

Please help, I'm really stuck! Thanks
Chloé
xxx
The rocket's position vector rr just has two components, the rocket's x-coordinate and its y-coordinate, or (xr, yr). So if you figure out rr^2 and |rr| as a function of the vector's components, you can see that they will depend on both the x-coordinate and the y-coordinate--that's all they mean when they say "be aware that their y co-ords will have an effect on the gravitational force felt in the x direction".
 
  • #3
Thanks, yes I did mean that sorry! Was very stressed and panicky as had been trying to write the program all day and was in desperate need to write the msg before I had a Physics tutorial and then a training session straight after.

One more question...I asked someone else for advice on the same problem and they quoted the following:

"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"

So obviously, they agree with you (and me!) that rr^2 is the same as the modulus squared. However, they suggest using angles and cosines when considering the force/acceleration! I didn't think this would really be necessay as the vector equations give the directions so surely I don't have to resolve them as well? :uhh:
 
  • #4
Hoofbeat said:
Thanks, yes I did mean that sorry! Was very stressed and panicky as had been trying to write the program all day and was in desperate need to write the msg before I had a Physics tutorial and then a training session straight after.

One more question...I asked someone else for advice on the same problem and they quoted the following:

"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"

So obviously, they agree with you (and me!) that rr^2 is the same as the modulus squared. However, they suggest using angles and cosines when considering the force/acceleration! I didn't think this would really be necessay as the vector equations give the directions so surely I don't have to resolve them as well? :uhh:
Right, the equation already takes care of resolving the force into components. The idea of the equation is that the ratio (component of total force from Earth along x-axis)/(total force from earth) will be equal to the ratio (distance from Earth along the x-axis)/(total distance from earth)...so, just multiply both sides by the total force from earth, and you get (component of total force from Earth along x-axis) = (total force from earth)*[(distance from Earth along x-axis)/(total distance from earth)], or Fe*(xr/|rr|). You can see that those two ratios must be equal, because the total force vector and the total distance vector are parallel to each other, so if you make a right triange with the total force as the hypotenuse and the x-component and y-component of the force as the other two sides, it will look just like a right triangle with the total distance vector as the hypotenuse and the x-component and y-component of the distance as the other two sides...if two right triangles are similar, the ratio of the hypotenuse and the side along the x-axis will be the same for both. For a right triangle you could also find the length of the side along the x-axis by multiplying the length of the hypotenuse by the cosine of the angle the hypotenuse makes with the x-axis, but if you already know the ratio between xr and |rr| then you can just use the equal-ratio assumption to find the force along the x-axis.
 

1. How do I calculate the initial velocity of the rocket?

The initial velocity of the rocket can be calculated using the formula v = √(GM/R), where G is the gravitational constant, M is the mass of the Earth, and R is the distance between the Earth and the rocket's starting point.

2. What factors affect the trajectory of the rocket?

The trajectory of the rocket is affected by several factors, including the initial velocity, the gravitational pull of the Earth and the Moon, air resistance, and the angle at which the rocket is launched.

3. How do I determine the ideal angle for the rocket's launch?

The ideal angle for the rocket's launch can be determined using the formula θ = tan-1(vy0/vx0), where vy0 is the initial vertical velocity and vx0 is the initial horizontal velocity. The ideal angle is the angle at which the rocket's vertical and horizontal velocities are equal.

4. What is the role of gravity in the rocket's trajectory?

Gravity plays a significant role in the rocket's trajectory as it determines the path of the rocket as it travels from Earth to the Moon. The gravitational pull of the Earth affects the initial velocity and the angle of the rocket, while the gravitational pull of the Moon influences the final destination of the rocket.

5. Can I use the same trajectory calculation for different planets?

No, the trajectory calculation for the rocket's journey from Earth to the Moon cannot be used for other planets. Each planet has a different mass, radius, and gravitational constant, which would require different calculations to determine the rocket's trajectory.

Similar threads

  • Introductory Physics Homework Help
Replies
4
Views
1K
Replies
5
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Mechanics
Replies
4
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Special and General Relativity
Replies
18
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
950
Replies
18
Views
3K
  • Introductory Physics Homework Help
Replies
1
Views
1K
Replies
6
Views
2K
Back
Top