22 lines
600 B
Julia
22 lines
600 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 - mfr(bepi)*stepsize
|
|
|
|
end
|