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 representation
  • TimeLine: 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.FrameType
struct Frame(x::Vector{Real}, y::Vector{Real}, z::Vector{Real})

Struct of immutable vectors that express the coordinate frame of a certain state

source
Base.:*Method
Base. :*(C::Union{SMatrix{3, 3, <:Real}, Matrix{<:Real}}, refframe::Frame)::Frame

Calculate the transformed frame with transformation matrix C with respect to refframe

source
Base.:-Method
Base.:-(a::Frame, b::Frame)::Frame

Subtraction operator for struct Frame.

source
FlexibleSpacecraft.Frames.ECI2BodyFrameMethod
ECI2BodyFrame(q)

Calculate the transformation matrix from ECI frame to spacecraft body-fixed frame.

Arguments

  • q: quaternion

Return

  • transformation_matrix: transformation matrix
source

TimeLine

Base.getindexMethod
Base.getindex(v::Vector{<:SVector}, r::Int, datarow::Int)

get an element of the v<:SVector, used for custom data container for FlexibleSpacecraft.jl

source
Base.getindexMethod
Base.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

source
FlexibleSpacecraft.TimeLine.getdataindexMethod
function 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}

source