Currently working on refactor, much work to do

This commit is contained in:
Connor
2021-09-25 16:10:02 -06:00
parent 7d0037f38d
commit af545ba1a7
23 changed files with 286 additions and 353 deletions

View File

@@ -1,4 +1,5 @@
export Sc
export Sc, test_sc, bepi, no_thrust
mutable struct Sc
dry_mass::Float64
mass_flow_rate::Float64
@@ -7,18 +8,6 @@ mutable struct Sc
duty_cycle::Float64
end
function Sc(name::String)
# This has extra thrusters to make plots more visible (and most don't use fuel)
if name == "test"
return Sc(9000., 0.00025/(2000*0.00981), 0.00025, 50, 0.9)
# This is the normal one
elseif name == "bepi"
return Sc(9000., 2*0.00025/(2000*0.00981), 0.00025, 2, 0.9)
elseif name == "no_thrust"
return Sc(9000., 0.01, 0., 0, 0.)
else
throw(ErrorException("Bad sc name"))
end
end
Base.copy(s::Sc) = Sc(s.dry_mass, s.mass_flow_rate, s.max_thrust, s.num_thrusters, s.duty_cycle)
const test_sc = Sc(8000., 0.00025/(2000*0.00981), 0.00025, 50, 0.9)
const bepi = Sc(8000., 2*0.00025/(2000*0.00981), 0.00025, 2, 0.9)
const no_thrust = Sc(8000., 0.01, 0., 0, 0.)