I'm working out of a book called "Analytical Mechanics of Space Systems," by Junkins and Schaub.(adsbygoogle = window.adsbygoogle || []).push({});

In that book, they give a modified shooting method method for solving Lambert's two-point boundary value problem (connecting two points in space with a closed orbit). One of the problems that I face is that I am getting the right initial velocity that connects the two points, but AFTER I have that I am not getting the correct transfer time. Essentially, I have eccentricity e, true anomaly f1 (corresponding to the first point), and f2 (true anomaly of the second point), length of the semi-major axis a, and the gravitational parameter mu.

I convert the true anomaly f1, f2 to eccentric anomaly E1, E2 using the following code:

// Find Eccentric Anomaly given eccentricity and true anomaly

double convertftoE( double e, double f){

double E = 0.0;

E = 2*atan(sqrt((1-e)/(1+e))*tan(f/2));

return E;

}

Then I convert eccentric anomalies E1, E2 to mean anomalies M1, M2 using:

// Calculates the mean anomaly given e (eccentricity)

// and E (eccentric anomaly)

double calcMeanAnomaly(double e, double E) {

double M = 0.0;

M = E - e*sin(E);

return M;

}

Then I calculate the transfer time dt_hat using Kepler's equation:

dt_hat = sqrt( (a*a*a) / mu ) * ( M2 - M1 );

I integrate using the initial time over dt_hat with a 4th order Runge Kutta method, but it always ends up short. If I let it go longer, the orbit goes right overtop of the point that I am trying to reach.

I need to have a "nice" equation or method for finding the proper transfer time, because I use that dt_hat to move through a number of neighboring solutions to the sought after transfer time Ts through a linear parameter 0 <= alpha <=1: dt_hat*(1 - alpha) + alpha*Ts, where alpha slowly increments from 0 to 1 changing the velocity and orbit each time via a numerically calculated Jacobian acting as a sensitivity matrix to get the satellite from point A to point B in the required amount of time Ts.

The way I have it set now, I using the results from the RK4 method as a starting dt. But this should be something I can calculate prior to using a numerical method such as RK4.

Can anyone spot a mistake in what I'm doing in calculating the transfer time??? Am I misinterpreting the proper use of these equations? Thanks very much.

-Nelson

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Kepler's Equation to calculate transfer time

**Physics Forums | Science Articles, Homework Help, Discussion**