Write a C program to call finteg to study the motion of a spacecraft in the
Earth-Moon environment. Do the calculation in the inertial (centre-of-mass)
frame of reference. The problem to be solved is to find initial conditions
(position and velocity) for the spacecraft near the surface of Earth such that
it will fly to the Moon and be swung back by the Moon's gravity so that
it returns to the vicinity of Earth with no further rocket engine assistance
i.e. purely by gravitational forces. For convenience you could always start
at a point on the line joining Earth and Moon. For the actual Earth-Moon mass
ratio of 81 the required initial conditions are quite critical. For example a
solution can be found for an initial distance from the Earth centre of 6800km
and velocity
but the initial direction needs to be specified
to within about 1 degree and the velocity to 4 significant figures. It is easier to
solve the problem if the Earth-Moon mass ratio is made less. Why is this ?
Your program should generate a plot of the position of Earth, Moon and spacecraft
in the inertial frame of reference. It is easiest to plot in Cartesian coordinates.
If any object has polar coordinates
the corresponding Cartesian
coordinates are readily generated as
and
. But remember
to generate the Cartesian coordinates as variables of type float for plplot.
Because of the relatively great mass of the Earth vs the Moon you may find that the Earth has a surprisingly great effect on the orbit of a craft bound to the Moon. How close to the lunar surface does the spacecraft have to stay for its motion to be dominated by the Moon?