Code covered by the BSD License
 [fid, alt1, alt2, inc1, i...read orbital elements and simulation
 atan3 (a, b)
four quadrant inverse tangent
 brent (f, x1, x2, rtol)
solve for a single real root of a nonlinear equation
 ceqm1 (t, y)
first order form of Cowell's equations of orbital motion
 eci2mee(mu, reci, veci)
convert eci state vector to
 eci2orb1 (mu, r, v)
convert eci state vector to six classical orbital
 gast1 (jdate)
Greenwich apparent sidereal time
 gdate (jdate)
convert Julian date to Gregorian (calendar) date
 gravity (t, y)
first order equations of orbital motion
 hohmfunc (x)
inclination objective function
 j2eqm (t, y)
first order equations of orbital motion
 j4eqm(t, y)
first order equations of orbital motion
 julian (month, day, year)
Julian date
 mee2eci(mu, mee)
convert modified equinoctial orbital
 nc_event(t, y)
nodal crossing event function
 oeprint1(mu, oev, ittype)
print six classical orbital elements
 om_constants
astrodynamic and utility constants
 orb2eci(mu, oev)
convert classical orbital elements to eci state vector
 readgm(fname)
read gravity model data file
 rkf78 (deq, neq, ti, tf, ...solve first order system of differential equations
 svprint(r, v)
print position and velocity vectors and magnitudes
 tpbvp(x)
two point boundary value objective function and
 twobody2 (mu, tau, ri, vi)solve the two body initial value problem
 ueci2angles(reci, veci, u...convect eci unit vector to rtn angles
 hohmann.m
 phohmann.m

View all files
The Gravity Perturbed Hohmann Transfer
by
David Eagle
28 Feb 2013
(Updated
22 Jul 2013)
MATLAB script for solving the Hohmann transfer problem perturbed by nonspherical Earth gravity.

ceqm1 (t, y)

function ydot = ceqm1 (t, y)
% first order form of Cowell's equations of orbital motion
% version for ode45
% input
% t = current simulation time
% y = current eci state vector
% output
% ydot = eci acceleration vector
% Orbital Mechanics with MATLAB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% compute nonspherical gravity perturbations
agrav = gravity(t, y);
% total acceleration vector
ydot = [ y(4)
y(5)
y(6)
agrav(1)
agrav(2)
agrav(3)];


Contact us