Data container
Data container is the set of variables that contains all the necessary data of the simulation. We have two sub-modules for data container.
Frames
: data container for frame representationTimeLine
: data container for the time-variant physical quantities
Frames
Frames
is the module that handles data container for attitude frame representation. Please visit frames for notation and detailed explanation of the attitude frame representation
FlexibleSpacecraft.Frames.Frame
— Typestruct Frame(x::Vector{Real}, y::Vector{Real}, z::Vector{Real})
Struct of immutable vectors that express the coordinate frame of a certain state
Base.:*
— MethodBase. :*(C::Union{SMatrix{3, 3, <:Real}, Matrix{<:Real}}, refframe::Frame)::Frame
Calculate the transformed frame with transformation matrix C
with respect to refframe
Base.:-
— MethodBase.:-(a::Frame, b::Frame)::Frame
Subtraction operator for struct Frame
.
FlexibleSpacecraft.Frames.ECI2BodyFrame
— MethodECI2BodyFrame(q)
Calculate the transformation matrix from ECI frame to spacecraft body-fixed frame.
Arguments
q
: quaternion
Return
transformation_matrix
: transformation matrix
FlexibleSpacecraft.Frames.getframe
— Methodgetframe(time, sampling_period, coordinates::FrameArray)
get a sampledframe::Frame
matching with given time
FlexibleSpacecraft.Frames.initframes
— Methodinitframes(datanum, initial_coordinate::Frame)
initialize StructArray
of time-variant coordinate frame
TimeLine
FlexibleSpacecraft.TimeLine.InitData
— Typestruct InitData
Struct that consists of the initial state value of the time-variant physical amounts in simulation
Base.getindex
— MethodBase.getindex(v::Vector{<:SVector}, r::Int, datarow::Int)
get an element of the v<:SVector
, used for custom data container for FlexibleSpacecraft.jl
Base.getindex
— MethodBase.getindex(v::Vector{<:SVector}, r::AbstractRange, datarow::Int)
get a 1-D subset of the every datarow
-th row of v::Vector{<:SVector}
within r::AbstractRange
, used for custom data container for FlexibleSpacecraft.jl
FlexibleSpacecraft.TimeLine._initangularvelocity
— Methodfunction _initangularvelocity(simdata_num, initital_value::Vector)
Initialize array that contains time response of angular velocity
FlexibleSpacecraft.TimeLine._initquaternion
— Methodfunction _initquaternion(simdata_num, initial_value::Vector[4])
initialize array that contains time response of quaternion
FlexibleSpacecraft.TimeLine.getdataindex
— Methodfunction getdataindex(timerange::Tuple{<:Real, <:Real}, samplingtime::Real)::Union{UnitRange{Int64}, Colon}
returns an index::::Union{UnitRange{Int64}, Colon}
that corresponding to the given timerange::Tuple{<:Real, <:Real}
FlexibleSpacecraft.TimeLine.initsimulationdata
— Methodinitsimulationdata(datanum::Int, initialdata::InitData)
Initialize the data container for the attitude dynamics