Simulation API
This section contains information about the API for the simulation system of FlexibleSpacecraft.jl
Our API mainly contains the following sub-modules:
ParameterSettingBase
: API for parameter setting for simulation core
The high-level API function for the simulation is runsimulation
. Basically you can run your simulation by passing all the necessary arguments into function runsimulation
.
Parameter setting API
FlexibleSpacecraft.ParameterSettingBase.SimulationConfig
— Typestruct SimulationConfig
struct that contains the information about the simulation configuration
fields
spacecraft::String
: name of the spacecraftnote::String
: note on the parameter settingssimulationtime::Real
: time length of the simulationsamplingtime::Real
: sampling time of the simulation
FlexibleSpacecraft.ParameterSettingBase._setkinematics
— Method_setkinematics(filepath::String)::InitKinematicsData
Define the initial value for simulation
FlexibleSpacecraft.ParameterSettingBase._setsimconfig
— Method_setsimconfig(filepath::String)::SimulationConfig
initialize the simulation configurations
Return value
simconfig::SimulationConfig
FlexibleSpacecraft.ParameterSettingBase.set_simulation_parameters
— Methodset_simulation_parameters
read the configuration of the spacecraft from the configuration file in YAML format.
Arguments
filepath::String
: Path to the configuration file
Usage
paramfilepath = "./test/spacecraft2.yml"
(simconfig, attitudemodel, distconfig, initvalue, orbitinfo, strparam, strmodel) = set_simulation_parameters(paramfilepath)