Code covered by the BSD License
- [fid, mu, req, oev1, oev2...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
- eci2lvlh (r, v, upeci)
convert eci unit pointing vector to local
- eci2orb1 (mu, r, v)
convert eci state vector to six classical orbital
- make_textfile(soln)
create disk text files of solutions
- oeprint1(mu, oev)
print six classical orbital elements
- oeprint2(fid, mu, oev)
print six classical orbital elements
- om_constants
astrodynamic and utility constants
- oota_iniz
initialization routine
- ootafun1 (x)
delta-v objective function
- ootafun2 (x)
transfer orbit semiparameter objective function
- orb2eci(mu, oev)
convert classical orbital elements to eci state vector
- pgraphics(soln, x1, y1, y2)
create disk file of primer graphics
- primer(dtof, rt1eci, vt1e...examine primer vector and its derivative for optimality
- pvdot(x)
primer derivative
- pvector (ri, vi, x)
primer vector and derivative magnitudes
- pviniz (tof, r1, v1, dv1,...primer vector initialization
- stm2 (mu, tau, ri, vi)
two body state transition matrix
- svprint(r, v)
print position and velocity vectors and magnitudes
- svprint1(fid, r, v)
print position and velocity vectors and magnitudes to file
- tgraphics(soln, dtof)
create disk file of trajectory graphics
- tof1(mu, sma, ecc, tanom1...time of flight between two true anomalies
- twobody2 (mu, tau, ri, vi)solve the two body initial value problem
- uvector(x)
unit vector
- oota_matlab.m
-
View all files
from
Optimal Impulsive Orbital Transfer
by David Eagle
MATLAB script for the solution of the one and two impulse orbit transfer between two Earth orbits.
|
| [fid, mu, req, oev1, oev2, phi01, phi02, ...
|
function [fid, mu, req, oev1, oev2, phi01, phi02, ...
dphi1, dphi2, nphi1, nphi2] = read_oota(filename)
% read orbital elements and simulation
% control data file
% required by oota_matlab.m
% input
% filename = name of oota data file
% output
% fid = file id
% mu = Earth gravitational constant (km^3/sec^2)
% req = Earth equatorial radius (kilometers)
% phi01 = initial orbit true anomaly at which to begin search (degrees)
% phi02 = final orbit true anomaly at which to begin search (degrees)
% dphi1 = initial orbit true anomaly search increment (degrees)
% dphi2 = final orbit true anomaly search increment (degrees)
% nphi1 = number of initial orbit true anomaly search intervals
% nphi2 = number of final orbit true anomaly search intervals
% oev1 = initial orbit orbital elements array
% oev2 = final orbit orbital elements array
% Orbital Mechanics with MATLAB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% open data file
fid = fopen(filename, 'r');
% check for file open error
if (fid == -1)
clc; home;
fprintf('\n\n error: cannot find this file!!');
keycheck;
return;
end
% read 81 lines of data
for i = 1:1:81
cline = fgetl(fid);
switch i
case 8
mu = str2double(cline);
case 11
req = str2double(cline);
case 19
oev1(1) = str2double(cline);
case 23
oev1(2) = str2double(cline);
case 27
oev1(3) = str2double(cline);
case 31
oev1(4) = str2double(cline);
case 35
oev1(5) = str2double(cline);
case 43
oev2(1) = str2double(cline);
case 47
oev2(2) = str2double(cline);
case 51
oev2(3) = str2double(cline);
case 55
oev2(4) = str2double(cline);
case 59
oev2(5) = str2double(cline);
case 66
phi01 = str2double(cline);
case 69
phi02 = str2double(cline);
case 72
dphi1 = str2double(cline);
case 75
dphi2 = str2double(cline);
case 78
nphi1 = str2double(cline);
case 81
nphi2 = str2double(cline);
end
end
fclose(fid);
|
|
Contact us