Skip to content

Commit a2a13d5

Browse files
authored
Merge branch 'master' into QG-docs
2 parents 681e1a6 + 9e151ca commit a2a13d5

28 files changed

+968
-156
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ docs/build/
1010
docs/problems/
1111

1212
.DS_Store
13+
tests/octave-workspace

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ serve:
1919
--ignore $(PROBLEMSDIR)
2020

2121
lint:
22-
pycodestyle .. && codespell ..
22+
pycodestyle .. && codespell --skip="*.bib" ..
2323

2424
clean:
2525
rm -rf $(BUILDDIR) $(PROBLEMSDIR)

docs/references.bib

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,25 @@ @article{dSL98
232232
year={1998}
233233
}
234234

235+
@phdthesis{Spr21,
236+
title={Trajectory design and targeting for applications to the exploration program in cislunar space},
237+
author={Spreen, Emily M Zimovan},
238+
year={2021},
239+
school={Purdue University}
240+
}
241+
242+
@book{She20,
243+
title={A Preliminary Study of Leo to Geo Transfers for Inclination Changes Using Libration Point Orbits},
244+
author={Shepard, John Philip},
245+
year={2020},
246+
publisher={The University of North Dakota}
247+
}
248+
249+
@book{Are63,
250+
title={Periodic solutions of the restricted three body problem representing analytic continuations of Keplerian elliptic motions},
251+
author={Arenstorf, Richard F},
252+
year={1963},
253+
publisher={National Aeronautics and Space Administration}
254+
}
255+
256+

toolbox/+otp/+arenstorf/+presets/Canonical.m

Lines changed: 0 additions & 34 deletions
This file was deleted.

toolbox/+otp/+arenstorf/ArenstorfProblem.m

Lines changed: 0 additions & 67 deletions
This file was deleted.

toolbox/+otp/+arenstorf/f.m

Lines changed: 0 additions & 18 deletions
This file was deleted.

toolbox/+otp/+arenstorf/jacobian.m

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
orbittypes = {'L2', 'P2HO1', 'P2HO2', 'P4HO1', 'P4HO2'};
2+
nIndices = 20;
3+
4+
orbits = struct;
5+
6+
for oti = 1:numel(orbittypes)
7+
orbittype = orbittypes{oti};
8+
otable = zeros(20, 4);
9+
for ind = 1:nIndices
10+
11+
problem = otp.circularrestricted3body.presets.HaloOrbit('OrbitType', orbittype, 'Index', ind);
12+
13+
y0 = problem.Y0;
14+
y0 = [y0(1); y0(3); y0(5)];
15+
period = problem.TimeSpan(2);
16+
f = problem.RHS.F;
17+
18+
J = @(yc) cost(yc, y0);
19+
nonlc = @(yc) constr(yc, f, period);
20+
21+
opts = optimoptions("fmincon", "Algorithm","interior-point", ...
22+
"FunctionTolerance", 1e-8, "ConstraintTolerance", 1e-14, 'Display','off');
23+
[ynew, fev] = fmincon(J, y0, [], [], [], [], [], [], nonlc, opts);
24+
25+
otable(ind, :) = [period, ynew.'];
26+
27+
end
28+
orbits.(orbittype) = otable;
29+
end
30+
31+
function c = cost(yc, y0)
32+
33+
c = sum((yc - y0).^2);
34+
35+
end
36+
37+
function [c, ceq] = constr(yc, f, period)
38+
39+
yc = [yc(1); 0; yc(2); 0; yc(3); 0];
40+
41+
c = [];
42+
43+
sol = ode45(f, [0, period], yc, ...
44+
odeset('AbsTol', 1e-14, 'RelTol', 100*eps));
45+
46+
ceq = sum((yc - sol.y(:, end)).^2);
47+
48+
end
49+
50+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
classdef Arenstorf < otp.circularrestricted3body.CR3BPProblem
2+
% One period of a satellite moving in an Earth-Moon system on a planar
3+
% orbit. The original orbit was derived in :cite:p:`Are63` for the
4+
% planar circular restricted three body problem, and the setting from
5+
% which this preset is derived is taken form pages 129--130 of
6+
% :cite:p:`HNW93`.
7+
8+
methods
9+
function obj = Arenstorf(varargin)
10+
% Create the Arenstorf CR3BP problem object.
11+
12+
params = otp.circularrestricted3body.CR3BPParameters(...
13+
'Mu', 0.012277471, ...
14+
'SoftFactor', 0, ...
15+
varargin{:});
16+
cls = class(params.Mu);
17+
18+
% Decimals converted to rational to support multiple data types
19+
y0 = [cast(497, cls) / cast(500, cls); ...
20+
cast(0, cls); ...
21+
cast(0, cls); ...
22+
cast(-823970832321143, cls) / cast(411659154384760, cls)];
23+
tspan = [cast(0, cls); ...
24+
cast(4541277234950502, cls) / cast(266113073862361, cls)];
25+
26+
obj = [email protected](tspan, y0, params);
27+
end
28+
29+
end
30+
end
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
classdef Canonical < otp.circularrestricted3body.CR3BPProblem
2+
% A trivial preset with a stable oscillating orbit around a lagrange point.
3+
4+
methods
5+
function obj = Canonical(varargin)
6+
% Create the Canonical CR3BP problem object.
7+
8+
mu = 0.5;
9+
10+
y0 = [0; 0; 0; 0; 0; 1];
11+
tspan = [0, 10];
12+
params = otp.circularrestricted3body.CR3BPParameters(...
13+
'Mu', mu, ...
14+
'SoftFactor', 1e-3, ...
15+
varargin{:});
16+
obj = [email protected](tspan, y0, params);
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)