Slow but steady progress on the mbh

This commit is contained in:
Connor
2021-09-26 00:01:50 -06:00
parent 49eff02cd0
commit 26ddb43a5d
8 changed files with 420 additions and 191 deletions

61
julia/src/mission.jl Normal file
View File

@@ -0,0 +1,61 @@
using Dates
export Phase, Mission_Guess, Mission, Bad_Mission
export test_phase1, test_phase2
export test_mission_guess, test_mission_guess_simple
export test_mission, test_mission_simple
struct Phase
planet::Body
v∞_in::Vector{Float64}
δ::Float64
tof::Float64
thrust_profile::Matrix{Float64}
end
const test_phase1 = Phase(Venus, [10.4321, -6.3015, -0.01978], 0.2, 1.30464e7, zeros(20,3))
const test_phase2 = Phase(Jupiter, [0.3, 7.1, 0.2], 2π, 3.9year, zeros(20,3))
struct Mission_Guess
sc::Sc
start_mass::Float64
launch_date::DateTime
launch_v∞::Vector{Float64}
phases::Vector{Phase}
converged::Bool
end
Mission_Guess(args...) = Mission_Guess(args..., false)
const test_mission_guess = Mission_Guess( bepi,
12_000.,
DateTime(1992, 11, 19),
[-3.4, 1.2, 0.1],
[test_phase1, test_phase2] )
const test_mission_guess_simple = Mission_Guess(bepi,
12_000.,
DateTime(1992, 11, 19),
[-3.4, 1.2, 0.1],
[test_phase1])
struct Mission
sc::Sc
start_mass::Float64
launch_date::DateTime
launch_v∞::Vector{Float64}
phases::Vector{Phase}
converged::Bool
end
Mission(args...) = Mission(args..., true)
const test_mission = Mission(bepi,
12_000.,
DateTime(1992, 11, 19),
[-3.4, 1.2, 0.1],
[test_phase1, test_phase2])
const test_mission_simple = Mission(bepi,
12_000.,
DateTime(1992, 11, 19),
[4.2984, -4.3272668, 1.43752],
[test_phase1])
struct Bad_Mission
converged::Bool
end
Bad_Mission() = Bad_Mission(false)