From initial position and velocity An
orbit equation defines the path of an
orbiting body m_2\,\! around
central body m_1\,\! relative to m_1\,\!, without specifying position as a function of time. If the eccentricity is less than 1 then the equation of motion describes an elliptical orbit. Because
Kepler's equation M = E - e \sin E has no general
closed-form solution for the
Eccentric anomaly (E)
in terms of the Mean anomaly (M), equations of motion as a function of time also have no closed-form solution (although
numerical solutions exist for both). However, closed-form time-independent path equations of an elliptic orbit with respect to a central body can be determined from just an initial position (\mathbf{r}) and velocity (\mathbf{v}). For this case it is convenient to use the following assumptions which differ somewhat from the standard assumptions above: :# The central body's position is at the origin and is the primary focus (\mathbf{F1}) of the ellipse (alternatively, the center of mass may be used instead if the orbiting body has a significant mass) :# The central body's mass (m1) is known :# The orbiting body's initial position(\mathbf{r}) and velocity(\mathbf{v}) are known :# The ellipse lies within the XY-plane The fourth assumption can be made without loss of generality because any three points (or vectors) must lie within a common plane. Under these assumptions the second focus (sometimes called the "empty" focus) must also lie within the XY-plane: \mathbf{F2} = \left(f_x,f_y\right) .
Using vectors The general equation of an ellipse under these assumptions using vectors is: : |\mathbf{F2} - \mathbf{p}| + |\mathbf{p}| = 2a \qquad\mid z=0 where: • a\,\! is the length of the
semi-major axis. • \mathbf{F2} = \left(f_x,f_y\right) is the second ("empty") focus. • \mathbf{p} = \left(x,y\right) is any (x,y) value satisfying the equation. The semi-major axis length (a) can be calculated as: :a = \frac{\mu |\mathbf{r}|}{2\mu - |\mathbf{r}| \mathbf{v}^2} where \mu\ = Gm_1 is the
standard gravitational parameter. The empty focus (\mathbf{F2} = \left(f_x,f_y\right)) can be found by first determining the
Eccentricity vector: :\mathbf{e} = \frac{\mathbf{r}} - \frac{\mathbf{v}\times \mathbf{h}}{\mu} Where \mathbf{h} is the specific angular momentum of the orbiting body: :\mathbf{h} = \mathbf{r} \times \mathbf{v} Then :\mathbf{F2} = -2a\mathbf{e}
Using XY Coordinates This can be done in cartesian coordinates using the following procedure: The general equation of an ellipse under the assumptions above is: : \sqrt{ \left(f_x - x\right)^2 + \left(f_y - y\right)^2} + \sqrt{ x^2 + y^2 } = 2a \qquad\mid z=0 Given: :r_x, r_y \quad the initial position coordinates :v_x, v_y \quad the initial velocity coordinates and :\mu = Gm_1 \quad the gravitational parameter Then: :h = r_x v_y - r_y v_x \quad specific angular momentum :r = \sqrt{r_x^2 + r_y^2} \quad initial distance from F1 (at the origin) :a = \frac{\mu r}{2\mu - r \left(v_x^2 + v_y^2 \right)} \quad the semi-major axis length :e_x = \frac{r_x}{r} - \frac{h v_y}{\mu} \quad the
Eccentricity vector coordinates :e_y = \frac{r_y}{r} + \frac{h v_x}{\mu} \quad Finally, the empty focus coordinates :f_x = - 2 a e_x \quad :f_y = - 2 a e_y \quad Now the result values
fx, fy and
a can be applied to the general ellipse equation above. == Orbital parameters ==