I THINK that the single shooter is ok. I can always improve it later

This commit is contained in:
rconnorjohnstone
2021-06-17 23:36:50 -06:00
parent 2c39c34f01
commit 966f954528
13 changed files with 170 additions and 61 deletions

View File

@@ -15,19 +15,23 @@
# Test that Laguerre-Conway is the default propagator for spacecrafts
craft = Sc("no_thrust")
start_mass = craft.mass
state, craft = prop_one([0., 0., 0.], start, craft, μs["Earth"], stepsize)
@test laguerre_conway(start, μs["Earth"], stepsize) state
@test craft.mass == 1000.
@test craft.mass == start_mass
# Test that mass is reduced properly
craft = Sc("test")
start_mass = craft.mass
state, craft = prop_one([1., 1., 1.]/(3), start, craft, μs["Earth"], stepsize)
state, craft = prop_one([1., 0., 0.], start, craft, μs["Earth"], stepsize)
@test craft.mass == start_mass - craft.mass_flow_rate*stepsize
# Test that a bad ΔV throws an error
craft = Sc("test")
start_mass = craft.mass
@test_throws ErrorException prop_one([1., 1., -1.], start, craft, μs["Earth"], stepsize)
@test_throws ErrorException prop_one([1.5, 0., 0.], start, craft, μs["Earth"], stepsize)
# Test that a full propagation doesn't take too long
end