Documentation for the CLI
FlexibleSpacecraft.jl
offers a useful CLI tools to accelerate your development of the spacecraft. This documentation illustrates the basic settings and configurations of the CLI tool.
Pre-process of the simulation parameters
You need to prepare all of the parameters for simulation in the following manner.
You need to an YAML file that specifies the locaton of the parameter setting files for the each subsystem.
spacecraft.yml
: parameters for the spacecraft itself and its model formulationorbit.yml
: parameters for the orbital motiondisturbance.yml
: parameters for the disturbance inputsimconfig.yml
: configuration files for the simulationinitvalue.yml
: configuration of initial value for the simulation
The location of these files should be addressed in the YAML file like:
name: Test parameters # Name of the parameters setting
dates: "2022/04/20" # Date (Optional)
notes: "This YAML file is only for testing the CLI" # Notes (Optional)
# Specify the relative path of the parameter configuration files (Required)
# These file locations should be declared in this file, otherwise, the software gives an error
configfiles:
model: "spacecraft.yml"
orbit: "orbit2.yml"
disturbance: "disturbance.yml"
simconfig: "simconfig.yml"
initvalue: "initvalue.yml"
Save this file as YAML files like params.yml
. In the following documentation, we will use params.yml
.
Commands and basic usage
evalspacecraft
is the topmost basic CLI command for FlexibleSpacecraft.jl
. You need to type the subcommand to specify what you want to do with FlexibleSpacecraft.jl
.
$ evalspacecraft <command>
Subcommands are listed as follows:
update
: update and rebuild theFlexibleSpacecraft.jl
. Recommended to use this subcommand at the first time you useFlexibleSpacecraft.jl
run <configfilepath>
: run simulation based on the given parameter settings and configurationsclear
: remove packageFlexibleSpacecraft.jl
You can also use the following flags:
-h, --help
: show help-V, --version
: show version information
Example
$ evalspacecraft -V
Suppose you have the parameter setting file params.yml
in your current working directory. You can run simulation with the predefined parameters with following command.
$ evalspacecraft run params.yml --save
--save
is a flag that specifies wheather to save the simulation data or not. False by default.
To test the CLI system, please try the shellscript /test/main.sh
in the GitHub repository. This will help you to find out how to use our CLI system.