Files
thesis/julia/test/inner_loop/propagator.jl
2021-10-11 21:53:23 -06:00

22 lines
610 B
Julia

@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 - bepi.mass_flow_rate*stepsize
end