Update for ky

This commit is contained in:
Connor
2021-10-29 19:36:44 -06:00
parent bb78578d9a
commit 48535e732f
29 changed files with 228 additions and 325 deletions

21
julia/test/propagator.jl Normal file
View File

@@ -0,0 +1,21 @@
@testset "Propagator" begin
println("Testing propagator")
using Thesis: prop_one
# Set up
start_mass = 10_000.
start = gen_orbit(rand(.5year : hour : 2year), start_mass)
stepsize = rand(hour : second : 6hour)
# Test that Laguerre-Conway is the default propagator for spacecrafts
state = prop_one([0., 0., 0.], start, no_thrust, stepsize)
@test laguerre_conway(start, stepsize) state[1:6]
@test state[7] == start_mass
# Test that mass is reduced properly
state = prop_one([1., 0., 0.], start, bepi, stepsize)
@test state[7] == start_mass - mfr(bepi)*stepsize
end