User:JustinTime55/sandbox/Flight dynamics (spacecraft)

Spacecraft flight dynamics is the science of space vehicle performance, stability, and control. It requires analysis of the six degrees of freedom of the vehicle's flight, which are similar to those of aircraft: translation in three dimensional axes; and its orientation about the vehicle's center of mass in these axes, known as pitch, roll and yaw, with respect to a defined frame of reference.

Dynamics is the modeling of the changing position and orientation of a vehicle, in response to external forces acting on the body. For a spacecraft, these forces are of three types: propulsive force (usually provided by the vehicle's engine thrust); gravitational force exerted by the Earth or other celestial bodies; and aerodynamic lift and drag (when flying in the atmosphere of the Earth or other body, such as Mars or Venus). The vehicle's attitude must be taken into account because of its effect on the aerodynamic and propulsive forces. There are other reasons, unrelated to flight dynamics, for controlling the vehicle's attitude in non-powered flight (e.g., thermal control, solar power generation, communications, or astronomical observation).

The principles of flight dynamics are normally used to control a spacecraft by means of an inertial navigation system in conjunction with an attitude control system. Together, they create a subsystem of the spacecraft bus often called ADCS.

Basic principles
A spacecraft's flight is determined by application of Newton's second law of motion:


 * $$\mathbf{F} = m\mathbf{a},$$

where F is the vector sum of all forces exerted on the vehicle, m is its current mass, and a is the acceleration vector, the instantaneous rate of change of velocity (v), which in turn is the instantaneous rate of change of displacement. Solving for a, acceleration equals the force sum divided by mass. Acceleration is integrated over time to get velocity, and velocity is in turn integrated to get position.

Aerodynamic forces, present near a body with significant atmosphere such as Earth, Mars or Venus, are analyzed as: lift, defined as the force component perpendicular to the direction of flight (not necessarily upward to balance gravity, as for an airplane); and drag, the component parallel to, and in the opposite direction of flight. Lift and drag are modeled as the products of a coefficient times dynamic pressure acting on a reference area:


 * $$\mathbf{L} = C_L q A_{ref}$$
 * $$\mathbf{D} = C_D q A_{ref}$$

where:
 * CL is roughly linear with α, the angle of attack between the vehicle axis and the direction of flight (up to a limiting value), and is 0 at α = 0 for an axisymmetric body;
 * CD varies with α2;
 * CL and CD vary with Reynolds number and Mach number;
 * q, the dynamic pressure, is equal to 1/2 ρ v2, where ρ is atmospheric density, modeled for Earth as a function of altitude in the International Standard Atmosphere (using an assumed temperature distribution, hydrostatic pressure variation, and the ideal gas law); and
 * Aref is a characteristic area of the vehicle, such as cross-sectional area at the maximum diameter.

Powered flight
Flight calculations are made quite precisely for space missions, taking into account such factors as the Earth's oblateness and non-uniform mass distribution; gravitational forces of all nearby bodies, including the Moon, Sun, and other planets; and three-dimensional flight path. For preliminary studies, some simplifying assumptions can be made (spherical, uniform planet; two-body patched conic approximation; and co-planar local flight path) with reasonably small loss of accuracy.

The general case of a launch from Earth must take engine thrust, aerodynamic forces, and gravity into account. The acceleration equation can be reduced from vector to scalar form by resolving it into its tangential (speed $$v$$) and angular (flight path angle $$\theta$$ relative to local vertical) time rate-of-change components relative to the launch pad. The two equations thus become:


 * $$\dot{v} = (F\cos\alpha)/m - D/m - g\cos\theta\,$$


 * $$\dot{\theta} = (F\sin\alpha)/mv + L/mv + (g/v - v/r)\sin\theta,\,$$

where:
 * F is the engine thrust;
 * α is the angle of attack;
 * m is the vehicle's mass;
 * D is the vehicle's aerodynamic drag;
 * L is its aerodynamic lift;
 * r is the radial distance to the planet's center; and
 * g is the gravitational acceleration, which varies with the inverse square of the radial distance:
 * $$g = g_0(r_0/r)^2\,$$

Mass decreases as propellant is consumed and rocket stages, engines or tanks are shed (if applicable).

Integrating the two rate equations from time zero (when both v and θ are 0) gives planet-fixed values of v and θ at any time in the flight:
 * $$v = \int_{t_0}^{t} \dot{v}\, dt$$


 * $$\theta = \int_{t_0}^{t} \dot{\theta}\, dt$$

Finite element analysis can be used to integrate the equations, by breaking the flight into small time increments.

For most launch vehicles, relatively small levels of lift are generated, and a gravity turn is employed, depending mostly on the third term of the angle rate equation. At the moment of liftoff, when angle and velocity are both zero, the theta-dot equation is mathematically indeterminate and cannot be evaluated until velocity becomes non-zero shortly after liftoff. But notice at this condition, the only force which can cause the vehicle to pitch over is the engine thrust acting at a non-zero angle of attack (first term) and perhaps a slight amount of lift (second term), until a non-zero pitch angle is attained. In the gravity turn, pitch-over is initiated by applying an increasing angle of attack (by means of gimbaled engine thrust), followed by a gradual decrease in angle of attack through the remainder of the flight.

Once velocity and flight path angle are known, altitude $$h$$ and downrange distance $$s$$ are computed as:


 * $$h = \int_{t_0}^{t} v \cos \theta\, dt$$


 * $$r = r_0+h\,$$


 * $$s = r_0 \int_{t_0}^{t} v/r \sin \theta\, dt$$

The planet-fixed values of v and θ are converted to space-fixed (inertial) values with the following conversions:


 * $$v_s = \sqrt{v^2 + 2\omega r v \cos\phi \sin\theta \sin A_z + (\omega r \cos\theta)^2},$$

where ω is the planet's rotational rate in radians per second, φ is the launch site latitude, and Az is the launch azimuth angle.
 * $$\theta_s = \arccos(v \cos\theta/v_s)\,$$

Final vs, θs and r must match the requirements of the target orbit as determined by orbital mechanics (see Orbital flight, below), where final vs is usually the required periapsis (or circular) velocity, and final θs is 90 degrees. A powered descent analysis would use the same procedure, with reverse boundary conditions.

Attitude control
Attitude control is the exercise of control over the orientation of an object with respect to an inertial frame of reference or another entity (the celestial sphere, certain fields, nearby objects, etc.). The attitude of a craft can be described using three mutually perpendicular axes of rotation, generally referred to as roll, pitch, and yaw angles respectively (with the roll axis in line with the primary engine direction of thrust). Orientation can be determined by calibration using an external guidance system, such as determining the angles to a reference star or the Sun, then internally monitored using an inertial system of mechanical or optical gyroscopes. Orientation is a vector quantity described by three angles for the instantaneous direction, and the instantaneous rates of roll in all three axes of rotation. The aspect of control implies both awareness of the instantaneous orientation and rates of roll and the ability to change the roll rates to assume a new orientation using either a reaction control system or other means. Newton's second law, applied to rotational rather than linear motion, becomes:
 * $$\mathbf{\tau} = I_x\mathbf{\alpha},$$

where τ is the net torque (or moment) exerted on the vehicle, Ix is its moment of inertia about the axis of rotation, and α is the angular acceleration vector in radians per second per second. Therefore, the rotational rate in degrees per second per second is
 * $$\mathbf{\alpha} = (180/\pi)\mathbf{T}/I_x,$$

and the angular rotation rate ω (degrees per second) is obtained by integrating α over time, and the angular rotation θ is the time integral of the rate, analogous to linear motion. The three principal moments of inertia Ix, Iy, and Iz about the roll, pitch and yaw axes, are determined through the spacecraft's center of mass.

Attitude control torque, absent aerodynamic forces, is frequently applied by a reaction control system, a set of thrusters located about the vehicle. The thrusters are fired, either manually or under automatic guidance control, in short bursts to achieve the desired rate of rotation, and then fired in the opposite direction to halt rotation at the desired position. The torque about a specific axis is:
 * $$\mathbf{\tau} = \sum_{i=1}^N(r_i \times \mathbf{F_i} ), $$

where r is its distance from the center of mass, and F is the thrust of an individual thruster (only the component of F perpendicular to r is included.)

For situations where propellant consumption may be a problem (such as long-duration satellites or space stations), alternative means may be used to provide the control torque, such as reaction wheels or control moment gyroscopes.

Orbital flight
Orbital mechanics are used to calculate flight in orbit about a central body. For sufficiently high orbits (generally at least 100 nmi in the case of Earth), aerodynamic force may be assumed to be negligible for relatively short term missions (though a small amount of drag may be present which results in decay of orbital energy over longer periods of time.) When the central body's mass is much larger than the spacecraft, and other bodies are sufficiently far away, the solution of orbital trajectories can be treated as a two-body problem.

This can be shown to result in the trajectory being ideally a conic section (circle, ellipse, parabola or hyperbola) with the central body located at one focus. Orbital trajectories are either circles or ellipses; the parabolic trajectory represents first escape of the vehicle from the central body's gravitational field. Hyperbolic trajectories are escape trajectories with excess velocity, and will be covered under Interplanetary flight below.

Elliptical orbits are characterized by three elements. The semi-major axis a is the average of the radius at apoapsis and periapsis:
 * $$a = (r_a + r_p)/2\,$$

The eccentricity e can then be calculated for an ellipse, knowing the apses:
 * $$e = r_a/a - 1\,$$

The time period for a complete orbit is dependent only on the semi-major axis, and is independent of eccentricity:
 * $$TP = 2 \pi \sqrt{a^3/\mu}\,$$

where $$\mu$$ is the standard gravitational parameter of the central body.

The orientation of the orbit in space is specified by three angles:
 * The inclination i, of the orbital plane with the fundamental plane (this is usually a planet or moon's equatorial plane, or in the case of a solar orbit, the Earth's orbital plane around the Sun, known as the ecliptic.) Positive inclination is northward, while negative inclination is southward.
 * The longitude of the ascending node Ω, measured in the fundamental plane counter-clockwise looking southward, from a reference direction (usually the vernal equinox) to the line where the spacecraft crosses this plane from south to north. (If inclination is zero, this angle is undefined and taken as 0.)
 * The argument of periapsis ω, measured in the orbital plane counter-clockwise looking southward, from the ascending node to the periapsis. If the inclination is 0, there is no ascending node, so ω is measured from the reference direction. For a circular orbit, there is no periapsis, so ω is taken as 0.

The orbital plane is ideally constant, but is usually subject to small perturbations caused by planetary oblateness and the presence of other bodies.

The spacecraft's position in orbit is specified by the true anomaly, $$\nu$$, an angle measured from the periapsis, or for a circular orbit, from the ascending node or reference direction. The semi-latus rectum, or radius at 90 degrees from periapsis, is:
 * $$p = a(1-e^2)\,$$

The radius at any position in flight is:
 * $$r = \frac{p}{(1+e\cos\nu)}\,$$

and the velocity at that position is:
 * $$v = \sqrt{\mu(2/r-1/a)}\,$$

Circular
For a circular orbit, ra = rp = a, and eccentricity is 0. Circular velocity at a given radius is:
 * $$v_c = \sqrt{\mu/r}\,$$

Elliptical orbit
For an elliptical orbit, e is greater than 0 but less than 1. The periapsis velocity is:
 * $$v_p = \sqrt{\frac{\mu(1+e)}{a(1-e)}}\,$$

and the apoapsis velocity is:
 * $$v_a = \sqrt{\frac{\mu(1-e)}{a(1+e)}}\,$$

The limiting condition is a parabolic escape orbit, when e = 1 and ra becomes infinite. Escape velocity at periapsis is then
 * $$v_e = \sqrt{2\mu/r_p}\,$$

Flight path angle
The specific angular momentum of any conic orbit, h, is constant, and is equal to the product of radius and velocity at periapsis. At any other point in the orbit, it is equal to:
 * $$h = r v\cos{\phi},\,$$

where φ is the flight path angle measured from the local horizontal (perpendicular to r.) This allows the calculation of φ at any point in the orbit, knowing radius and velocity:
 * $$\phi = \arccos{(\frac{r_p v_p}{r v})}\,$$

Note that flight path angle is a constant 0 degrees (90 degrees from local vertical) for a circular orbit.

True anomaly as a function of time
It can be shown that the angular momentum equation given above also relates the rate of change in true anomaly to r, v and φ, thus the true anomaly can be found as a function of time since periapsis passage by integration:
 * $$\nu = r_p v_p \int_{t_p}^{t} \frac{1}{r^2} dt$$

Conversely, the time required to reach a given anomaly is:
 * $$t = \frac{1}{r_p v_p} \int_{0}^{\nu} r^2 d\nu$$

Orbital maneuvers
Once in orbit, a spacecraft may fire rocket engines to make in-plane changes to a different altitude or type of orbit, or to change its orbital plane. These maneuvers require changes in the craft's velocity, and the classical rocket equation is used to calculate the propellant requirements for a given delta-v. A delta-v budget will add up all the propellant requirements, or determine the total delta-v available from a given amount of propellant, for the mission.

Change of plane
Plane change maneuvers can be performed alone or in conjunction with other orbit adjustments. For a pure rotation plane change maneuver, consisting only of a change in the inclination of the orbit, the specific angular momentum, h, of the initial and final orbits are equal in magnitude but not in direction. Therefore the change in specific angular momentum can be written as:

$$\Delta h = 2h\sin\biggl(\frac {|\Delta i|}{2}\biggr)$$

where h is the specific angular momentum before the plane change, and Δi is the desired change in the inclination angle. From this it can be shown that the required delta-v is:

$$\Delta v = \frac {2h\sin\frac {\mid\Delta i\mid}{2}}{r}$$

From the definition of h, this can also be written as:

$$\Delta v = 2v\cos \phi\sin\biggl(\frac {\mid\Delta i\mid}{2}\biggl)$$

where v is the magnitude of velocity before plane change and φ is the flight path angle. Using the small-angle approximation, this becomes:

$$\Delta v = v \cos(\phi)\mid\Delta i\mid$$

The total delta-v for a combined maneuver can be calculated by a vector addition of the pure rotation delta-v and the delta-v for the other planned orbital change.

Translunar flight
Vehicles sent on lunar or planetary missions are generally not launched by direct injection to departure trajectory, but first put into a low Earth parking orbit; this allows the flexibility of a bigger launch window and more time for checking that the vehicle is in proper condition for the flight. A popular misconception is that escape velocity is required for flight to the Moon; it is not. Rather, the vehicle's apogee is raised high enough to take it to a point (before it reaches apogee) where it enters the Moon's gravitational sphere of influence (though the required velocity is close to that of escape.) This is defined as the distance from a satellite at which its gravitational pull on a spacecraft equals that of its central body, which is:
 * $$r_{SOI} = D\left(\frac{m_s}{m_c}\right)^{2/5},$$

where D is the mean distance from the satellite to the central body, and mc and ms are the masses of the central body and satellite, respectively. This value is approximately 66300 km from Earth's Moon.

A significant portion of the vehicle's flight (other than immediate proximity to the Earth or Moon) requires accurate solution as a three-body problem, but may be preliminarily modeled as a patched conic approximation.

Translunar injection
This must be timed so that the Moon will be in position to capture the vehicle, and might be modeled to a first approximation as a Hohmann transfer. However, the rocket burn duration is usually long enough, and occurs during a sufficient change in flight path angle, that this is not very accurate, requiring instead integration of a simplified version of the velocity and angle rate equations given above in Powered flight:


 * $$\dot{v} = (F\cos\alpha)/m - g\cos\theta\,$$


 * $$\dot{\theta} = (F\sin\alpha)/mv + (g/v - v/r)\sin\theta,\,$$

Mid-course corrections
A simple lunar trajectory stays in one plane, resulting in lunar flyby or orbit within a small range of inclination to the Moon's equator. This also permits a "free return", in which the spacecraft would return to the appropriate position for reentry into the Earth's atmosphere if it were not injected into lunar orbit. Relatively small velocity changes are usually required to correct for trajectory errors. Such a trajectory was used for the Apollo 8, Apollo 10, Apollo 11, and Apollo 12 manned lunar missions.

Greater flexibility in lunar orbital or landing site coverage (at greater angles of lunar inclination) can be obtained by performing a plane change maneuver mid-flight; however, this takes away the free-return option, as the new plane would take the spacecraft's emergency return trajectory away from the Earth's atmospheric re-entry point, and leave the spacecraft in a high Earth orbit. This type of trajectory was used for the last five Apollo missions (13 through 17).

Interplanetary flight
In order to completely leave one planet's gravitational field to reach another, a hyperbolic trajectory relative to the departure planet is necessary, with excess velocity added to (or subtracted from) the departure planet's orbital velocity around the Sun. The desired heliocentric transfer orbit to a superior planet will have its perihelion at the departure planet, requiring the hyperbolic excess velocity to be applied in the posigrade direction, when the spacecraft is away from the Sun. To an inferior planet destination, aphelion will be at the departure planet, and the excess velocity is applied in the retrograde direction when the spacecraft is toward the Sun. For accurate mission calculations, the orbital elements of the planets must be obtained from an ephemeris, such as that published by NASA's Jet Propulsion Laboratory.

Simplifying assumptions
For the purpose of preliminary mission analysis and feasibility studies, certain simplified assumptions may be made to enable delta-v calculation with very small error:
 * All the planets' orbits except Mercury have very small eccentricity, and therefore may be assumed to be circular at a mean distance from the Sun.
 * All the planets' orbits (except Mercury) are nearly coplanar, with very small inclination to the ecliptic (3.39 degrees or less). Mercury's inclination is 7.00 degrees).
 * The perturbating effects of the other planets' gravity is negligible.
 * The spacecraft will spend most of its flight time under only the gravitational influence of the Sun, except for brief periods when it is in the sphere of influence of the departure and destination planets.

Since interplanetary spacecraft spend a large period of time in heliocentric orbit between the planets, which are at relatively large distances away from each other, the patched-conic approximation is much more accurate for interplanetary trajectories than for translunar trajectories. The patch point between the hyperbolic trajectory relative to the departure planet and the heliocentric transfer orbit occurs at the planet's sphere of influence radius relative to the Sun, as defined above in Orbital flight. Given the Sun's mass ratio of 333,432 times that of Earth and distance of 149,500,000 km, the Earth's sphere of influence radius is 924,000 km (roughly 1,000,000 kilometers).

Heliocentric transfer orbit
The transfer orbit required to carry the spacecraft from the departure planet's orbit to the destination planet is chosen among several options:
 * A Hohmann transfer orbit requires the least possible propellant and delta-v; this is an elliptical orbit with aphelion and perihelion tangential to both planets' orbits. This is known as an opposition mission, and requires the longest outbound flight time, equal to half the period of the ellipse. There is no "free return" option, because if the spacecraft does not enter orbit around the destination planet and completes the transfer orbit, the departure planet will not be in its original position. Using another Hohmann transfer to return requires a significant loiter time at the destination planet, resulting in a very long round-trip mission time. Science fiction writer Arthur C. Clarke wrote in his 1951 book The Exploration of Space that an Earth-to-Mars round trip would require 259 days outbound and another 259 days inbound, with a 425 day stay at Mars.
 * A gravity assist maneuver, sometimes known as a "slingshot maneuver" or Crocco mission after its 1956 proposer Gaetano Crocco, can cut required flight time and energy by swinging past another planet, using its gravity to alter the orbit. A round trip to Mars, for example, can be significantly shortened from the 943 days required for the opposition mission, to under a year, by swinging past Venus on return to the Earth.
 * Increasing the perihelion speed (and thus the transfer orbit's semi-major axis) will cut the outbound time and reach a superior planet before aphelion.

Hyperbolic departure
The required hyperbolic excess velocity v∞ (sometimes called characteristic velocity) is the difference between the transfer orbit's departure speed and the departure planet's heliocentric orbital speed. Once this is determined, the injection velocity relative to the departure planet at periapsis is:
 * $$v_p = \sqrt{2\mu/r_p + v_\infty^2}\,$$

The excess velocity vector for a hyperbola is displaced from the periapsis tangent by a characteristic angle, therefore the periapsis injection burn must lead the planetary departure point by the same angle:
 * $$\delta = \arcsin(1/e)\,$$

The geometric equation for eccentricity of an ellipse cannot be used for a hyperbola. But the eccentricity can be calculated from dynamics formulations as:
 * $$e = \sqrt{1+\frac{2\epsilon h^2}{\mu^2}},$$

where h is the specific angular momentum as given above in the Orbital flight section, calculated at the periapsis:
 * $$h = r_p v_p,\,$$

and ε is the specific energy:
 * $$\epsilon = v^2/2 - \mu/r\,$$

Also, the equations for r and v given in Orbital flight depend on the semi-major axis, and thus are unusable for an escape trajectory. But setting radius at periapsis equal to the r equation at zero anomaly gives an alternate expression for the semi-latus rectum:
 * $$p = r_p(1 + e),\,$$

which gives a more general equation for radius versus anomaly which is usable at any eccentricity:
 * $$r = \frac{r_p(1 + e)}{(1+e\cos\nu)}\,$$

Substituting the alternate expression for p also gives an alternate expression for a (which is defined for a hyperbola, but no longer represents the semi-major axis). This gives an equation for velocity versus radius which is likewise usable at any eccentricity:
 * $$v = \sqrt{\mu\left (\frac{2}{r}-\frac{(1-e^2)}{r_p(1+e)}\right)}\,$$

The equations for flight path angle and anomaly versus time given in Orbital flight are also usable for hyperbolic trajectories.

Launch windows
There is a great deal of variation with time of the velocity change required for a mission, because of the constantly varying relative positions of the planets. Therefore, optimum launch windows are often chosen from the results of porkchop plots that show contours of characteristic energy (v∞2) plotted versus departure and arrival time.

Atmospheric entry
Atmospheric entry is the movement of human-made or natural objects as they enter the atmosphere of a celestial body from outer space—in the case of Earth from an altitude above the Kármán Line, (100 km). This topic is heavily concerned with the process of controlled reentry of vehicles which are intended to reach the planetary surface intact, but the topic also includes uncontrolled (or minimally controlled) cases, such as the intentionally or circumstantially occurring, destructive deorbiting of satellites and the falling back to the planet of "space junk" due to orbital decay.