18 lines
340 B
Julia
18 lines
340 B
Julia
struct Sc{T <: Real}
|
|
mass::T
|
|
mass_flow_rate::Float64
|
|
max_thrust::Float64
|
|
num_thrusters::Int
|
|
duty_cycle::Float64
|
|
end
|
|
|
|
function Sc(name::String)
|
|
if name == "test"
|
|
return Sc(10000., 0.01, 0.05, 2, 1.)
|
|
elseif name == "no_thrust"
|
|
return Sc(10000., 0.01, 0., 0, 0.)
|
|
else
|
|
throw(ErrorException("Bad sc name"))
|
|
end
|
|
end
|