How to simulate multiple satellites
1. Overview
- S2E can simulate multiple satellites.
- This document describes how to simulate multiple satellites.
- For the sample codes, please see s2e-user-example/sample/how-to-simulate-multiple-satellites.
- The supported version of this document
- Please confirm that the version of the documents and s2e-core are compatible.
2. How to add a new satellite
-
Edit
inifiles- Add
inifiles for the new satellite.satellite.ini,disturbance.ini,local_environment.ini,structure.iniare needed.
- Register the
inifile for the new satellite insimulation_base.ini- The arguments of
satellite_fileare used as satellite ID in simulation.[SIMULATION_SETTINGS] number_of_simulated_spacecraft = 2 spacecraft_file(0) = INI_FILE_DIR_FROM_EXE/user_satellite.ini spacecraft_file(1) = INI_FILE_DIR_FROM_EXE/user_satellite2.ini
- The arguments of
- Add
-
Edit source code
-
Add new
UserSatelliteinstances toCasemembers inuser_case.hpp.UserSatellite *spacecraft0_; //!< Instance of spacecraft UserSatellite *spacecraft1_; //!< Instance of spacecraft -
Edit
user_case.cppto copy the spacecraft related codes as the sample code.- Please see the sample code for more details.
-
-
Build and execute the
s2e-user -
You can see the log
spacecraft_angular_velocity_b_x[rad/s]twice. The first one is the angular velocity ofsatellite 0, and the second one is the angular velocity ofsatellite 1in the log file.
3. Advanced usage
- In the sample, the
satellite0_and thesatellite1_are completely the same, but users can change the settings of these satellites with editing theinifiles.- Users can change the orbit, initial attitude, satellite structure and so on.
- Users also can set the different components for the
satellite0 and 1, when users define differentUserSatelliteandUserComponentsclasses. - The document to use
relative informationwill be written. - Users can also refer the S2E-FF repository.