- The
SampleCase
class is an example of making the user defined scenario with theSimulationCase
class.
src/simulation_sample/case/sample_case.cpp, .hpp
- The
SampleCase
class is defined here.
- The
src/simulation/case/simulation_case.cpp, .hpp
- The
SimulationCase
class is defined here.
- The
src/s2e.cpp
- The instance of the
SampleCase
class is made in this main function.
- The instance of the
-
sample_case.hpp
- Define user defined simulation case class. We use
SampleCase
class here. - Inherit the
SimulationCase
class.- Users need to define override functions for all pure virtual functions of the
SimulationCase
class.
- Users need to define override functions for all pure virtual functions of the
- Add spacecraft and/or ground station as users need into the member variables.
- If users simulate multiple spacecraft, users can add several spacecraft here.
- Multiple spacecraft case, you can refer the s2e-ff
- Define user defined simulation case class. We use
-
sample_case.cpp
- Write detailed process of the override functions
- Constructor
- Usually, users just need to initialize the constructor of
SimulationCase
.
- Usually, users just need to initialize the constructor of
- Destructor
- Users need to
delete
your defined membersspacecraft
andground_station
.
- Users need to
InitializeTargetObjects
function- You have to make instances of your
spacecraft
andground_station
class here.
- You have to make instances of your
- You also need to register log output by
LogSetup
function. UpdateTargetObjects
function- This function is called in the
SimulationCase::Main
function. - Users can update their spacecraft and ground station classes here.
GetLogHeader
andGetLogValue
functions- These functions are used in the Monte-Carlo simulation mode. For the normal mode, you don't need to care.
- The log definition written here is saved at the start and end timing of every simulation case of the Monte-Carlo simulation.
NA
NA