temporary point on the inner loop wrapper

This commit is contained in:
Connor
2021-09-02 21:40:19 -06:00
parent 4d180f577a
commit 9298a7a6f3
19 changed files with 96 additions and 23 deletions

View File

@@ -0,0 +1,31 @@
@testset "Laguerre-Conway" begin
println("Testing LaGuerre-Conway")
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"])
orbit = start
for _ in 1:5
i = 0.
while i < T
orbit = laguerre_conway(orbit, μs["Earth"], 1.)
i += 1
end
@test i T
@test norm(orbit - start) < 1e-2
end
for _ in 1:5
i = 0.
while i > -T
orbit = laguerre_conway(orbit, μs["Earth"], -1.)
i -= 1
end
@test i -T
@test norm(orbit - start) < 1e-2
end
end
end