temporary point on the inner loop wrapper

This commit is contained in:
Connor
2021-09-02 21:40:19 -06:00
parent 4d180f577a
commit 9298a7a6f3
19 changed files with 96 additions and 23 deletions

View File

@@ -0,0 +1,25 @@
using Dates
export inner_loop
"""
This is it. The outer function call for the inner loop. After this is done,
there's only the outer loop left to do. And that's pretty easy.
"""
function inner_loop(launch_date::DateTime,
RLA::Float64,
DLA::Float64,
phases::Vector{Phase})
# First we need to do some quick checks that the mission is well formed
for i in 1:length(phases)
if i == 1
@assert phases[i].from_planet == "Earth"
else
@assert phases[i].from_planet == phases[i-1].to_planet
@assert phases[i].v∞_outgoing == phases[i-1].v∞_incoming
end
end
return RLA + DLA + phases[1].v∞_incoming
end