/Iridium-Burn-Prediction

Trajectory approximation for low-thrust coplanar spiral transfer.

Iridium-Burn-Prediction

OVERVIEW: This is an ensemble of MATLAB-compatible OCTAVE scripts. The objective is to approximate the trajectory of an Iridium-NEXT satellite as it performs a constant-thrust maneuver to spiral up from one circular orbit to another. The orbits are assumed to be coplanar (inclination does not change). A set of differential equations describing the acceleration and mass change rate of the vehicle were derived by hand, then written as functions and integrated using the numeric solver ode45 to yield position and velocity solutions. More detailed supporting documentation for this process and the mathematics involved will be added later.

NAMING CONVENTION: Algorithms (in CAPS) are the main working codes. Functions (in lowercase) are subroutines used for repetitive or specialized tasks, and keep the main working codes from being too cluttered.

I. Algorithms

  1. BUDGET Author: Ray Patrick, 2017 This is the initialization algorithm. Given the physical specs and operational capabilities of the spacecraft, as well as the initial and final orbit radii, it computes the Delta-V, propellant usage, and burn time required for the spiral maneuver. It then saves the relevant results to variables in a MATLAB I/O file called vars.mat. (Note: for cross-compatibility reasons it may be necessary to switch to a .CSV format or similar.)

  2. ORBIT Author: Ray Patrick, 2017 This is the trajectory approximation algorithm. It loads the variables generated by BUDGET from vars.mat, then calculates and plots the vehicle's trajectory during the burn. After the burn is complete, ORBIT calculates the COEs for the new orbit and propagates it forward in time by two orbital period. Plots of orbital altitude, orbital velocity, and vehicle mass are generated, as well as a three-dimensional plot of the trajectory. The burn phase is plotted in red and the coast phase is plotted in blue. NOTE: Due to the nature of the numerical integration method used by ode45, the solution experiences "energy drift" as the simulation time increases. (ode45 is a non-symplectic integrator, meaning it does not strictly obey energy/momentum conservation laws.) Since a thrusting satellite is a non-conservative system, using a symplectic integration scheme for the burn phase is out of the question. However, in the future it may be necessary to perform the coast phase computations with a symplectic solver such as MATLAB's ode23t. The only issue is that ode23t is not supported by OCTAVE. For additional information, consult the literature on numerical integration methods, as well as symplectic integration in particular.

  3. SITE Author: Ray Patrick, 2017 This algorithm computes a position vector for a ground-based observation site in the Earth-Centered, Earth-Fixed (ECEF) coordinate frame, which is non-inertial. TO DO: Accomplish conversion between ECEF and ECI, compute look angles (azimuth, elevation) from the ground-based site to the Iridium satellite over the course of its trajectory.

II. Functions

  1. burneqn Author: Ray Patrick, 2017 This function provides the vector to be integrated by the ode45 numerical integration solver. It is equivalent to the time derivative of the satellite state vector. This version of the vector includes gravitation and thrust terms (used for burn phase.)

  2. burnfcn Author: Ray Patrick, 2017 This function accepts a set of initial conditions and numerically integrates burneqn.

  3. coeprep Author: Ray Patrick, 2017 This function accepts orbit altitude, eccentricity (zero), inclination, RAAN, argument of perigee, and mean anomaly, then performs the appropriate calculations to generate the alternate COEs required by the orb2rv function. It then automatically passes these variables to orb2rv. This function serves to avoid cluttering up the main code with COE conversions not relevant to the main problem.

  4. emag Author: Ray Patrick, 2017 This function calculates the element-wise magnitude of three column vectors. It accepts three column vectors X, Y, and Z, and returns a single column vector R, where R(i) = sqrt(X(i)^2 + Y(i)^2 + Z(i)^2).

  5. orb2rv Author: Darrin Koblick, 2012 This function converts a set of Keplerian orbital elements into position and velocity vectors in the Earth-centered Inertial (ECI) coordinate frame.

  6. orbiteqn Author: Ray Patrick, 2017 This function provides the vector to be integrated by the ode45 numerical integration solver. It is equivalent to the time derivative of the satellite state vector. This version of the vector includes only gravitation terms (used for coast phase.)

  7. orbitfcn Author: Ray Patrick, 2017 This function accepts a set of initial conditions and numerically integrates orbiteqn.

  8. prop4dv Author: Ray Patrick, 2017 This function solves an algebraically rearranged version of the ideal rocket equation in order to determine the amount of propellant required to impart a given Delta-V.

  9. saytime Author: Ray Patrick, 2017 This function accepts a time (in seconds), converts it to YY/DD/HR/MIN/SEC.MS for readability, and prints it to the output window along with a text string passed as an argument. An example: INPUT: saytime(225, 'Time') OUTPUT: Time: 3 min 45.00 sec

  10. sv2coe Author: Ray Patrick, 2017 This function accepts an ECI position vector R and an ECI velocity vector V (km, km/s, respectively) and determines the following: T, period (s) a, semimajor axis (km) e, eccentricity i, inclination (deg) O, RAAN (deg) o, argument of perigee (deg) nu, true anomaly (deg) If the function is called with two arguments, but no assignment matrix, it will simply return the period. EXAMPLE 1: [T, a, e, i, O, o, nu] = sv2coe(R,V) will create variables T, a, e, i, O, o, nu and populate them with the appropriate value. EXAMPLE 2: T = sv2coe(R,V) will return the period of the orbit specified by R,V. This only works for the first variable returned by a function.