Code covered by the BSD License
-
[fid, itarget, nsegments, xma...
read finite-burn hyperbolic injection data file
-
asympt (cbmu, rsc, vsc)
c3-scaled outgoing unit asymptote vector
-
atan3 (a, b)
four quadrant inverse tangent
-
eci2mee(mu, reci, veci)
convert eci state vector to modified equinoctial elements
-
eci2orb1 (mu, r, v)
convert eci state vector to six classical orbital
-
energy_event(t, y)
twice specific orbital energy event function
-
escape_shoot1 (x)
c3 targeting - objective function and equality constraints
-
escape_shoot2 (x)
c3 and dla targeting - objective function and equality constraints
-
escape_shoot3 (x)
c3, rla & dla targeting - objective function and equality constraints
-
mee2coe(mee)
convert modified equinoctial elements to classical orbit elements
-
mee2eci(mu, mee)
convert modified equinoctial orbital
-
mee2eci_escape(mu, mee)
convert modified equinoctial orbital elements to eci position
-
meeeqm_coast(t, y)
first-order modified equinoctial equations of "coasting" motion
-
meeeqm_escape(t, y)
first-order modified equinoctial equations of motion
-
meeeqm_ode45(t, y)
first-order modified equinoctial equations of motion
-
meeeqm_rkf78(t, y)
first-order modified equinoctial equations of motion
-
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
-
rkf78 (deq, neq, ti, tf, h, t...
solve first order system of differential equations
-
rv2hyper (mu, rsc, vsc)
convert position and velocity vectors to
-
escape.m
-
View all files
from
Optimal Finite-burn Interplanetary Injection from Earth Orbit
by David Eagle
A MATLAB script for optimizing finite-burn interplanetary injection trajectories.
|
| asympt (cbmu, rsc, vsc)
|
function [shat, iberr] = asympt (cbmu, rsc, vsc)
% c3-scaled outgoing unit asymptote vector
% input
% cbmu = central body gravitational constant (km**3/sec**2)
% rsc = spacecraft position vector (kilometers)
% vsc = spacecraft velocity vector (kilometers/second)
% iberr = error ==> orbit is not hyperbolic (c3 < 0)
% output
% shat = c3-scaled outgoing unit asymptote vector
% Orbital Mechanics with MATLAB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
zmu = 1.0d0 / cbmu;
iberr = 0;
% position magnitude (kilometers)
rmag = norm(rsc);
% velocity magnitude (kilometers/second)
vmag = norm(vsc);
% twice specific orbital energy (km/sec)**2
c33 = vmag * vmag - 2.0d0 * cbmu / rmag;
if (c33 < 0.0d0)
shat = 0.0;
iberr = 1;
return
end
% angular momentum vector
hv = cross(rsc, vsc);
hmag = norm(hv);
vxh = cross(vsc, hv);
% compute unit position and eccentricity vectors
for i = 1: 3
rhat(i) = rsc(i) / rmag;
ev(i) = zmu * vxh(i) - rhat(i);
end
fac1 = 1.0d0 / (1.0d0 + c33 * hmag * hmag / cbmu / cbmu);
fac2 = sqrt(c33) / cbmu;
hxe = cross(hv, ev);
% compute components of c3-scaled unit asymptote vector
shat(1) = fac1 * (fac2 * hxe(1) - ev(1));
shat(2) = fac1 * (fac2 * hxe(2) - ev(2));
shat(3) = fac1 * (fac2 * hxe(3) - ev(3));
|
|
Contact us