temporary point on the inner loop wrapper
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
@testset "Find Closest" begin
|
||||
|
||||
println("Testing NLP solver")
|
||||
|
||||
using NLsolve, PlotlyJS
|
||||
|
||||
# Initial Setup
|
||||
sc = Sc("test")
|
||||
a = rand(15000:1.:40000)
|
||||
e = rand(0.01:0.01:0.5)
|
||||
a = rand(25000:1.:40000)
|
||||
e = rand(0.01:0.01:0.05)
|
||||
i = rand(0.01:0.01:π/6)
|
||||
T = 2π*√(a^3/μs["Earth"])
|
||||
prop_time = 2T
|
||||
n = 20
|
||||
prop_time = T
|
||||
n = 10
|
||||
|
||||
# A simple orbit raising
|
||||
start = oe_to_xyz([ a, e, i, 0., 0., 0. ], μs["Earth"])
|
||||
# T_craft = hcat(repeat([0.6], n), repeat([0.], n), repeat([0.], n))
|
||||
Tx, Ty, Tz = conv_T(repeat([0.6], n), repeat([0.], n), repeat([0.], n),
|
||||
start,
|
||||
sc.mass,
|
||||
@@ -23,7 +24,7 @@
|
||||
final = prop(hcat(Tx, Ty, Tz), start, sc, μs["Earth"], prop_time)[3]
|
||||
new_T = 2π*√(xyz_to_oe(final, μs["Earth"])[1]^3/μs["Earth"])
|
||||
|
||||
# This should be close enough to 0.6
|
||||
# This should be close enough to 0.6 for convergence
|
||||
Tx, Ty, Tz = conv_T(repeat([0.59], n), repeat([0.01], n), repeat([0.], n),
|
||||
start,
|
||||
sc.mass,
|
||||
13
julia/test/inner_loop/inner_loop.jl
Normal file
13
julia/test/inner_loop/inner_loop.jl
Normal file
@@ -0,0 +1,13 @@
|
||||
@testset "Inner Loop" begin
|
||||
|
||||
println("Testing Inner Loop")
|
||||
|
||||
using Dates
|
||||
|
||||
phase1 = Phase("Earth", "Mars", 3600*24*365*1.5, 5., 2.)
|
||||
phase2 = Phase("Mars", "Jupiter", 3600*24*365*3.5, 2., 0.1)
|
||||
inner_loop(DateTime(2024,3,5), 0.3, 0.4, [phase1, phase2])
|
||||
|
||||
@test true
|
||||
|
||||
end
|
||||
@@ -1,4 +1,7 @@
|
||||
@testset "Laguerre-Conway" begin
|
||||
|
||||
println("Testing LaGuerre-Conway")
|
||||
|
||||
using Thesis: laguerre_conway
|
||||
|
||||
# Test that the propagator produces good periodic orbits (forwards and backwards)
|
||||
@@ -1,6 +1,6 @@
|
||||
@testset "Monotonic Basin Hopping" begin
|
||||
|
||||
using Thesis: mbh
|
||||
println("Testing Monotonic Basin Hopper")
|
||||
|
||||
# Initial Setup
|
||||
sc = Sc("test")
|
||||
@@ -1,5 +1,7 @@
|
||||
@testset "Propagator" begin
|
||||
|
||||
println("Testing propagator")
|
||||
|
||||
using Thesis: prop_one
|
||||
|
||||
# Set up
|
||||
@@ -1,5 +1,7 @@
|
||||
@testset "Plotting" begin
|
||||
|
||||
println("Testing plotting features")
|
||||
|
||||
using PlotlyJS
|
||||
|
||||
# First some setup
|
||||
|
||||
@@ -7,11 +7,12 @@ using Thesis
|
||||
# Tests
|
||||
@testset "All Tests" begin
|
||||
include("spacecraft.jl")
|
||||
include("laguerre-conway.jl")
|
||||
include("propagator.jl")
|
||||
include("plotting.jl")
|
||||
include("find_closest.jl")
|
||||
include("monotonic_basin_hopping.jl")
|
||||
include("inner_loop/laguerre-conway.jl")
|
||||
include("inner_loop/propagator.jl")
|
||||
include("inner_loop/find_closest.jl")
|
||||
include("inner_loop/monotonic_basin_hopping.jl")
|
||||
include("inner_loop/inner_loop.jl")
|
||||
end
|
||||
|
||||
print()
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@testset "Spacecraft Construction" begin
|
||||
|
||||
println("Testing spacecraft")
|
||||
|
||||
# Test that the standard spacecraft can be created
|
||||
craft = Sc("test")
|
||||
@test craft.mass == 10000.
|
||||
|
||||
Reference in New Issue
Block a user