temporary point on the inner loop wrapper
This commit is contained in:
25
julia/src/inner_loop/inner_loop.jl
Normal file
25
julia/src/inner_loop/inner_loop.jl
Normal 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
|
||||
Reference in New Issue
Block a user