I think tests are passing again
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
@testset "Find Closest" begin
|
||||
|
||||
using NLsolve
|
||||
using Thesis: treat_inputs
|
||||
|
||||
# Initial Setup
|
||||
sc = Sc("test")
|
||||
a = rand(15000:1.:40000)
|
||||
@@ -20,16 +23,16 @@
|
||||
result = Thesis.single_shoot(start, final, sc, μs["Earth"], 0.0, prop_time, x0)
|
||||
|
||||
# Test and plot
|
||||
@test result[3] == :XTOL_REACHED
|
||||
@test converged(result)
|
||||
path1 = prop(zeros((100,3)), start, sc, μs["Earth"], T)[1]
|
||||
path2, mass = prop(treat_inputs(result[2]), start, sc, μs["Earth"], prop_time)
|
||||
path2, mass = prop(treat_inputs(result.zero), start, sc, μs["Earth"], prop_time)
|
||||
path3 = prop(zeros((100,3)), path2[end,:], sc, μs["Earth"], new_T)[1]
|
||||
path4 = prop(zeros((100,3)), final, sc, μs["Earth"], new_T)[1]
|
||||
savefig(plot_orbits([path1, path2, path3, path4],
|
||||
labels=["inital", "transit", "after transit", "final"],
|
||||
colors=["#FFFFFF","#FF4444","#44FF44","#4444FF"]),
|
||||
"plots/find_closest_test.html")
|
||||
if result[3] == :XTOL_REACHED
|
||||
"../plots/find_closest_test.html")
|
||||
if converged(result)
|
||||
@test norm(path2[end,:] - final) < 1e-6
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user