As promised, this note outlines an algorithm for finding the time when a retrograde burn must be started (and stopped) so as to insert into spacecraft into a circular orbit around a central gravitating body such as a planet or moon assuming constant engine thrust during the manoeuvre and while the thrust is directed along the retrograde direction. In addition, the algorithm permits ancillary quantities including, *inter alia*, the amount of fuel used, the Delta-V required to execute the burn, and the radius of the final circular orbit around the gravitating body.

**The basics conceptual model upon which the algorithm is built**

Although the mathematical framework described herein is general, and is applicable to craft with widely varying thrust capabilities, the basic scheme imagined here is that of a spacecraft approaching a gravitating body (planet or moon) in a hyperbolic orbit - or, possibly, a high eccentricity elliptical orbit - executing a single, retrograde burn to insert it into a circular orbit around the central gravitating body. To keep things simple, we make the assumption that the ballistic trajectory of the incoming spacecraft is Keplerian, which is to say that non-spherical gravity sources and other gravitational perturbations are not considered.

**Outline of the algorithm**

At the core of the algorithm is a mathematical function that will be described fully in the next section.

The core function has two inputs. Together, albeit indirectly, these inputs allow one to calculate the start and stop times for the retrograde burn given the thrust characteristics of the spacecraft. The two inputs are:

1. [MATH]R[/MATH], the orbital radius of the spacecraft at the start of the orbit insertion burn; and

2. [MATH]\delta t[/MATH], the duration of the circular orbit insertion burn once it has started.

Given these two inputs, the core function returns two numbers. These are the two (planar) components of the final orbital eccentricity vector, [MATH]e_r[/MATH] and [MATH]e_\theta[/MATH]. The orbital eccentricity vector is a vector that, from the centre of the gravitating body, points towards periapsis; and the length of which is the usual Keplerian orbital eccentricity, [MATH]e[/MATH]. The vector component [MATH]e_r[/MATH] is the magnitude of the eccentricity vector in the radial direction (i.e., from the centre of the planet to the position of the spacecraft); and the other vector component [MATH]e_\theta[/MATH] is the magnitude of the eccentricity perpendicular to the radial direction. Together, these two components yields information about the shape and orientation of the final orbit.

The conditions for achieving a circular orbit are to find input variables [MATH]R[/MATH] and [MATH]\delta t[/MATH] such that the orbital eccentricity output quantities are zero as the end of the orbit insertion burn. This search for input variables is a root-finding exercise in two variables and may be aided if a robust root-finding algorithm - e.g., perhaps, Brent's method - is available.

Having found the roots of the core function, one may then calculate the following quantities of interest:

1. [MATH]T^*[/MATH], the time when the orbital insertion burn should commence. [MATH]T^*[/MATH] may be earlier than or later than the current time. If it is earlier than the current time, then the opportunity to insert into a circular orbit is already passed;

2. [MATH]\delta t[/MATH], the duration of the burn;

2. [MATH]r_c[/MATH], the radius of the final circular orbit;

3. [MATH]\delta m[/MATH], the mass of the fuel consumed; and

4. [MATH]\Delta V[/MATH] the Delta-V required for orbital insertion (as calculated using the standard Ideal Rocket Equation)

**The core numerical integration function in detail**

As mentioned above, at the core function performs a numerical integration of a specific dynamical system. This numerical integration requires that a suitable numerical integrator, such as RK4, be available.

The specific dynamical system is as follows:

[MATH]h'(t) = -\frac{1}{\mu}\,\frac{\gamma\,v_{e}}{m_{0}-\gamma\,t}\,\frac{h(t)^{2}}{\sqrt{(1+e_{r}(t))^{2}+e_{\theta}(t)^{2}}}[/MATH]

[MATH]e_r'(t)-\theta'(t)\,e_{\theta}(t) = -\frac{2}{\mu}\,\frac{\gamma\,v_{e}}{m_{0}-\gamma\,t}\,\frac{1+e_{r}(t)}{\sqrt{(1+e_{r}(t))^{2}+e_{\theta}(t)^{2}}}\,h(t)[/MATH]

[MATH]e_\theta'(t)+\theta'(t)\,e_{r}(t) = -\frac{2}{\mu}\,\frac{\gamma\,v_{e}}{m_{0}-\gamma\,t}\,\frac{e_{\theta}(t)}{\sqrt{(1+e_{r}(t))^{2}+e_{\theta}(t)^{2}}}\,h(t)[/MATH]

[MATH] \theta'(t) =\frac{\mu ^2 \left(1+e_r(t)\right){}^2}{h(t)^3} [/MATH]

This system of equations is integrated from [MATH]0[/MATH] to [MATH]\delta t[/MATH] (one of the two input parameters) subject to the following initial conditions:

[MATH] h(0) = \sqrt{\mu\,a\,(1-e^{2})} [/MATH]

[MATH] e_r(0) = \frac{a\,(1-e^{2})}{R}-1 [/MATH]

[MATH] e_\theta(0) = \frac{1}{R}\,\sqrt{(1-e^{2})\,(a\,(1+e)-R)\,(R-a\,(1-e))} [/MATH]

[MATH] \theta(0) = 0 [/MATH]

Here, [MATH]R[/MATH] is the second of the two input parameters, the orbital radius of the spacecraft at the start of the orbit insertion burnThis dynamical system also contains a number of other parameters. These are:

1. [MATH]a[/MATH], the semi-major axis of the initial spacecraft's Keplerian trajectory prior to commencement of the burn;

2. [MATH]e[/MATH], the eccentricity of the initial spacecraft trajectory;

3. [MATH]\mu[/MATH], the gravitational parameter 'GM' for the central gravitating body;

4. [MATH]\gamma[/MATH], the fuel flow rate (kg/s) for the engines that will execute the retrograde manoeuvre;

5. [MATH]v_e[/MATH], the effective velocity of the exhaust gases from the engines; and

6. [MATH]m_0[/MATH], the total mass of the spacecraft at the start of the retrograde burn.

So, what do these four equations describe? Well, there are four dynamical quantities that are being tracked by integrating this dynamical system:

1. the specific angular momentum, [MATH]h(t)[/MATH] of the spacecraft;

2. the two components of the eccentricity vector, [MATH]e_r(t)[/MATH] and [MATH]e_\theta(t)[/MATH]; and

3. the change in angular position of the spacecraft in an inertial reference frame, [MATH]\theta(t)[/MATH], as it executes the orbit insertion burn.

Although these equations appear different from those outlined in the original post of this thread, they are formally equivalent. However, they make better use of invariants of a 2-body Keplerian system - namely the angular momentum and the orbital eccentricity.

Note that there are bounds on permissible values of [MATH]R[/MATH]. For a hyperbolic approach orbit, we require that [MATH]a\,(1-e) \le R[/MATH]$. And for a (high eccentricity) elliptic approach orbit, we require that [MATH]a\,(1-e) \le R \le a\,(a+e)[/MATH].

**Calculating ancillary quantities**

Once one has solved the problem for [MATH]R^*[/MATH] and [MATH]\delta t^*[/MATH], we can calculate other quantities that may be of interest:

a. The radius of the final circular orbit, [MATH]r_c[/MATH]:

[MATH]r_c = \frac{1}{\mu}\,h(\delta t^*)^2[/MATH]

b. The total mass of fuel consumed, [MATH]\delta m[/MATH]:

[MATH] \delta m=\gamma\,\delta t^*[/MATH]

c. The Delta-V required to execute the orbit insertion manoeuvre, [MATH]\Delta V[/MATH]:

[MATH] \Delta V = v_e\,\log\frac{m_0}{m_0-\delta m}[/MATH]

d. The time to the start of the orbit insertion manoeuvre, [MATH]\Delta T[/MATH]. First, calculate the true anomaly corresponding to both the spacecraft's current position and its position at the start of the orbit insertion burn:

[MATH] \nu_0 = -\tan^{-1}\frac{\sqrt{(1-e^{2})\,(a\,(1+e)-R_{0})\,(R_{0}-a\,(1-e))}}{a\,(1-e^{2})-R_{0}}[/MATH]and

[MATH] \nu^* = -\tan^{-1}\frac{\sqrt{(1-e^{2})\,(a\,(1+e)-R^{*})\,(R^{*}-a\,(1-e))}}{a\,(1-e^{2})-R^{*}}[/MATH]Next, calculate the mean anomaly at these two locations using Kepler's equation. And then, finally, convert the change in mean anomaly to a time difference using standard Keplerian conversions.

e. And for completeness, from the integrated solution to the equations of motion, one can calculate the orbital radius and radial velocity of the spacecraft by applying the following transformations:

[MATH] r(t) = \frac{h(t)^2}{\mu \left(1+e_r(t)\right)} [/MATH]

[MATH] r'(t) = -\frac{\mu \, e_{\theta }(t)}{h(t)}[/MATH]

**A mathematical aside**

It is of some interest to quickly examining the form of these equations in the absence of a thrust from the engines. In this case, the equations of motion reduce to the relatively simple form:

[MATH]h(t) = H [/MATH]

[MATH] e_r'(t)-\theta'(t)\,e_{\theta}(t) = 0[/MATH]

[MATH] e_{\theta}'(t)+\theta'(t)\,e_{r}(t) = 0 [/MATH]

[MATH] \theta'(t) = \frac{\mu^2}{H^3}\,\left(1+e_r(t)\right)^2 [/MATH]

or, if one wishes to change the 'time' variable in the problem from clock time to the true anomalay, [MATH]\nu[/MATH], we get:

[MATH]h(\nu) = H [/MATH]

[MATH] \frac{\partial^2}{\partial\nu^2}e_r(\nu)+e_r(\nu) = 0[/MATH]

[MATH] t'(\nu) = \frac{H^3}{\mu^2}\,\left(1+e_r(t)\right)^{-2}[/MATH]

These equations describe a system for which:

1. the specific angular momentum is conserved;

2. the eccentricity vector is of constant length and executes a rotation around completing one revolution in one orbital period.

3. The last equation is a disguised form of Kepler's Equation enabling a conversion from the true anomaly, [MATH]\nu[/MATH], back to ordinary clock time.

In short, although the form of the equations may be unfamiliar, this system of equations describes a standard Keplerian system. Consequently, the terms involving thrust ([MATH]\gamma \,v_e[/MATH]) on the right-hand side in the first three equations of the full system above describe the impact of a retrograde burn on the evolution of the shape and orientation of the conic trajectory of the craft's orbit.

**Next steps**

Given that this note is now overly long, in a subsequent note I will go through the details of applying this algorithm to a specific, low thrust orbit insertion example.