Should be fixed now

This commit is contained in:
Connor
2021-09-25 18:03:20 -06:00
parent 955cf8ac05
commit 49eff02cd0
3 changed files with 7 additions and 10 deletions

View File

@@ -15,7 +15,6 @@ module Thesis
using PlotlyJS using PlotlyJS
using Distributed using Distributed
include("./errors.jl") include("./errors.jl")
include("./constants.jl") include("./constants.jl")
include("./spacecraft.jl") include("./spacecraft.jl")

View File

@@ -7,7 +7,7 @@
# First we'll test an Earth case # First we'll test an Earth case
# Initial Setup # Initial Setup
T = rand( 8hour : second : day ) T = rand( 8hour : second : day )
revs = 3 revs = 8
n = 10 * revs n = 10 * revs
start_mass = 10_000. start_mass = 10_000.
@@ -39,19 +39,20 @@
# Now the sun case # Now the sun case
T = rand( 0.5year : hour : 1.5year ) T = rand( 0.5year : hour : 1.5year )
tof = 0.7T
n = 20 n = 20
start_mass = 12_000. start_mass = 12_000.
# A simple orbit raising again, to keep things simple # A simple orbit raising again, to keep things simple
start = gen_orbit(T, start_mass) start = gen_orbit(T, start_mass)
thrust = spiral(0.6, n, start, bepi, revs*T) thrust = spiral(0.6, n, start, bepi, tof)
final = prop(thrust, start, bepi, revs*T)[2] final = prop(thrust, start, bepi, tof)[2]
new_T = 2π * ( xyz_to_oe(final, Sun.μ)[1]^3 / Sun.μ ) new_T = 2π * ( xyz_to_oe(final, Sun.μ)[1]^3 / Sun.μ )
# This should be close enough to converge # This should be close enough to converge
thrust_guess = spiral(0.55, n, start, bepi, revs*T) thrust_guess = spiral(0.55, n, start, bepi, tof)
result = solve_phase(start, final, bepi, revs*T, thrust_guess) result = solve_phase(start, final, bepi, tof, thrust_guess)
calc_path, calc_final = prop(result.zero, start, bepi, revs*T, interpolate=true) calc_path, calc_final = prop(result.zero, start, bepi, tof, interpolate=true)
# Test # Test
@test converged(result) @test converged(result)

View File

@@ -4,7 +4,6 @@ using LinearAlgebra
using SPICE using SPICE
using Thesis using Thesis
# Tests
@testset "All Tests" begin @testset "All Tests" begin
include("plotting.jl") include("plotting.jl")
include("inner_loop/laguerre-conway.jl") include("inner_loop/laguerre-conway.jl")
@@ -12,5 +11,3 @@ using Thesis
include("inner_loop/phase.jl") include("inner_loop/phase.jl")
# include("inner_loop/monotonic_basin_hopping.jl") # include("inner_loop/monotonic_basin_hopping.jl")
end end
print()