Currently working on refactor, much work to do

This commit is contained in:
Connor
2021-09-25 16:10:02 -06:00
parent 7d0037f38d
commit af545ba1a7
23 changed files with 286 additions and 353 deletions

View File

@@ -5,26 +5,29 @@
using Thesis: laguerre_conway
# Test that the propagator produces good periodic orbits (forwards and backwards)
for T in rand(3600*1.5:3600*4, (5))
start = oe_to_xyz([ (μs["Earth"]*(T/(2π))^2)^(1/3), rand(0.01:0.01:0.5), rand(0.01:0.01:0.45π), 0., 0., 1. ], μs["Earth"])
μ = Earth.μ
for T in rand(3600*1.5:3600*4, 5)
e = rand(0.0:0.01:0.75)
i = rand(0.0:0.01:0.499π)
start = [ oe_to_xyz([ (μ*(T/(2π))^2)^(1/3), e, i, 0., 0., 1. ], μ); 12_000. ]
orbit = start
for _ in 1:5
i = 0.
while i < T
orbit = laguerre_conway(orbit, μs["Earth"], 1.)
orbit = laguerre_conway(orbit, 1., Earth)
i += 1
end
@test i T
@test norm(orbit - start) < 1e-2
@test norm(orbit[1:6] - start[1:6]) < 1e-2
end
for _ in 1:5
i = 0.
while i > -T
orbit = laguerre_conway(orbit, μs["Earth"], -1.)
orbit = laguerre_conway(orbit, -1., Earth)
i -= 1
end
@test i -T
@test norm(orbit - start) < 1e-2
@test norm(orbit[1:6] - start[1:6]) < 1e-2
end
end