├── .github ├── ISSUE_TEMPLATE │ ├── action_item.md │ └── bug_report.md ├── PULL_REQUEST_TEMPLATE.md ├── labels.yml └── workflows │ ├── actionlint.yml │ ├── labeler.yml │ └── mdbook.yml ├── .gitignore ├── General ├── CodingConvention.md ├── DocumentFormat.md ├── HowToCompileWithUbuntuInDocker.md ├── HowToCompileWithVisualStudio.md ├── HowToDownloadNRLMSISE00library.md ├── HowToDwnloadCSPCElibrary.md ├── HowToVisualizeSimulationResults.md ├── NamingRuleForUserInterface.md ├── Troubleshooting.md └── figs │ ├── CMake_build.jpg │ ├── CMake_run.png │ ├── Docker_container.png │ ├── VSC_SSH_connect.png │ ├── plot_body_frame_info.JPG │ └── plot_gs_visibility.JPG ├── README.md ├── SUMMARY.md ├── Specifications ├── Component │ ├── AOCS │ │ ├── .gitkeep │ │ ├── Spec_RWJitter.md │ │ ├── Spec_STT.md │ │ ├── figs │ │ │ ├── angular_velocity_observer_output.png │ │ │ ├── attitude_observer_output.png │ │ │ ├── force_generator_output.png │ │ │ ├── gyro_sensor_output.png │ │ │ ├── magnetometer_output.png │ │ │ ├── magnetorquer_output.png │ │ │ ├── reaction_wheel_output_case1.png │ │ │ ├── reaction_wheel_output_case2.png │ │ │ ├── result_mtq_magnetometer_interference.png │ │ │ ├── rw_jitter_torque_time_domain_experiment.JPG │ │ │ ├── rw_jitter_torque_time_domain_sim.jpg │ │ │ ├── rw_waterfall_experiment.JPG │ │ │ ├── rw_waterfall_sim.jpg │ │ │ ├── star_sensor_output.png │ │ │ ├── stt_earth_judgement.png │ │ │ ├── stt_flag_15.png │ │ │ ├── stt_flag_20.png │ │ │ ├── stt_flag_30.png │ │ │ ├── sun_sensor_output.png │ │ │ └── torque_generator_output.png │ │ ├── spec_angular_velocity_observer.md │ │ ├── spec_attitude_observer.md │ │ ├── spec_force_generator.md │ │ ├── spec_gyro_sensor.md │ │ ├── spec_magnetometer.md │ │ ├── spec_magnetorquer.md │ │ ├── spec_mtq_magnetometer_interference.md │ │ ├── spec_reaction_wheel.md │ │ ├── spec_sun_sensor.md │ │ └── spec_torque_generator.md │ ├── Abstract │ │ ├── .gitkeep │ │ ├── Spec_ComponentBase.md │ │ ├── Spec_ObcCommunicationBase.md │ │ ├── Spec_SensorBase.md │ │ └── figs │ │ │ ├── bias_1.png │ │ │ ├── normal_random_noise_1.png │ │ │ └── random_walk_03_005.png │ ├── CDH │ │ └── .gitkeep │ ├── Logic │ │ └── .gitkeep │ ├── Mission │ │ ├── Spec_Telescope_en.md │ │ ├── Spec_Telescope_ja.md │ │ └── figs │ │ │ ├── angle_celes1.jpg │ │ │ ├── angle_celes2.jpg │ │ │ ├── coordinate.JPG │ │ │ ├── earth_pos_b1.jpg │ │ │ ├── earth_pos_b2.jpg │ │ │ ├── forbidden_angle1.jpg │ │ │ ├── forbidden_angle2.jpg │ │ │ ├── moon_pos_b1.jpg │ │ │ ├── observe_stars1.jpg │ │ │ ├── observe_stars2.jpg │ │ │ ├── track_earth1.jpg │ │ │ ├── track_earth2.jpg │ │ │ └── track_moon1.jpg │ ├── Power │ │ ├── .gitkeep │ │ └── Spec_PCU.md │ ├── Propulsion │ │ ├── .gitkeep │ │ ├── Spec_SimpleThruster.md │ │ └── figs │ │ │ ├── thrust_force1.png │ │ │ ├── thrust_force2.png │ │ │ ├── thrust_force3.png │ │ │ ├── thrust_force4.png │ │ │ ├── thrust_torque1.png │ │ │ ├── thrust_torque2.png │ │ │ ├── thrust_torque3.png │ │ │ └── thrust_torque4.png │ └── Thermal │ │ └── .gitkeep ├── Disturbance │ ├── .gitkeep │ ├── Spec_Disturbance.md │ ├── Spec_Disturbances.md │ ├── Spec_GeoPotential.md │ ├── Spec_GravityGradient.md │ ├── Spec_MagneticDisturbance.md │ ├── Spec_SurfaceForce.md │ ├── Spec_SurfaceForce_AirDrag.md │ ├── Spec_SurfaceForce_SolarRadiation.md │ ├── Spec_ThirdBodyGravity.md │ └── figs │ │ ├── AccelerationDiffECEF_S2E_deg0.jpg │ │ ├── AccelerationDiffECEF_S2E_deg360.jpg │ │ ├── AccelerationECEF_Matlab.jpg │ │ ├── AirDrag_result_1.jpg │ │ ├── PositionInECEF.jpg │ │ ├── SRP_result_1.jpg │ │ ├── SummaryAccuracy.jpg │ │ ├── SummaryCalculationTime.jpg │ │ ├── SurfaceForce_overview.JPG │ │ ├── ThirdBodyGravity_acc_moon.jpg │ │ ├── ThirdBodyGravity_acc_sun.jpg │ │ ├── ThirdBodyGravity_acc_sun_moon.jpg │ │ ├── ThirdBodyGravity_general.jpg │ │ ├── ThirdBodyGravity_result1.jpg │ │ ├── ThirdBodyGravity_s2e_stk_moon.jpg │ │ ├── ThirdBodyGravity_s2e_stk_sun.jpg │ │ ├── ThirdBodyGravity_s2e_stk_sun_moon.jpg │ │ ├── test_ggtorque.png │ │ ├── test_rmm_magneticfield.png │ │ ├── test_rmm_px.png │ │ ├── test_rmm_pxyz.png │ │ ├── test_rmm_randomwalk.png │ │ ├── test_rmm_randomwalk_2.png │ │ └── test_rmm_whitenoise.png ├── Dynamics │ ├── .gitkeep │ ├── Spec_Attitude.md │ ├── Spec_ControlledAttitude.md │ ├── Spec_EnckeMethod.md │ ├── Spec_KeplerOrbit.md │ ├── Spec_Orbit.md │ ├── Spec_RelativeOrbit.md │ ├── Spec_Rk4Attitude.md │ ├── Spec_Rk4Orbit.md │ ├── Spec_Sgp4.md │ ├── Spec_TimeSeriesFileOrbit.md │ └── figs │ │ ├── CtrlAtt_InertialStabilize.jpg │ │ ├── CtrlAtt_case1.jpg │ │ ├── CtrlAtt_case2.jpg │ │ ├── CtrlAtt_case3.jpg │ │ ├── CtrlAtt_case4.jpg │ │ ├── RelativeOrbit_LVLHdefinition.JPG │ │ ├── RelativeOrbit_verification_i_x.jpg │ │ ├── RelativeOrbit_verification_i_y.jpg │ │ ├── Verification_Hodoyoshi_s2e.png │ │ ├── Verification_Hodoyoshi_stk.png │ │ ├── Verification_ISS_s2e.png │ │ ├── Verification_ISS_stk.png │ │ ├── orbit_STKresult.JPG │ │ ├── orbit_STKsettings.JPG │ │ ├── orbit_encke_nodist_vs_kepler_oe.jpg │ │ ├── orbit_encke_vs_rk4_dist.jpg │ │ ├── orbit_kepler_oe.jpg │ │ ├── orbit_kepler_oe_vs_posvel.jpg │ │ ├── orbit_kepler_oe_vs_rk4.jpg │ │ ├── orbit_steptimesec_01.jpg │ │ ├── orbit_steptimesec_1.jpg │ │ ├── orbit_steptimesec_10.jpg │ │ ├── orbit_steptimesec_1_longterm.jpg │ │ ├── test_dynamics_0_b.png │ │ ├── test_dynamics_0_i.png │ │ ├── test_dynamics_px_b.png │ │ ├── test_dynamics_px_i.png │ │ ├── test_dynamics_py_b.png │ │ ├── test_dynamics_py_i.png │ │ ├── test_dynamics_pz_b.png │ │ ├── test_dynamics_pz_i.png │ │ ├── test_kinematics_0.png │ │ ├── test_kinematics_mz.png │ │ ├── test_kinematics_px.png │ │ ├── test_kinematics_py.png │ │ ├── test_kinematics_pz.png │ │ ├── time_series_file_position.png │ │ ├── time_series_file_position_enlarged.png │ │ ├── time_series_file_velocity.png │ │ └── time_series_file_velocity_enlarged.png ├── Environment │ ├── .gitkeep │ ├── Spec_Atmosphere.md │ ├── Spec_CelestialInformation.md │ ├── Spec_CelestialRotation.md │ ├── Spec_ClockGenerator.md │ ├── Spec_GeomagneticField.md │ ├── Spec_GlobalEnvironment.md │ ├── Spec_GnssSatellites_en.md │ ├── Spec_GnssSatellites_ja.md │ ├── Spec_HipparcosCatalogue_en.md │ ├── Spec_HipparcosCatalogue_ja.md │ ├── Spec_LocalCelestialInformation.md │ ├── Spec_LocalEnvironment.md │ ├── Spec_PhysicalConstants.md │ ├── Spec_SRPEnvironment.md │ ├── Spec_SimulationTime.md │ └── figs │ │ ├── Error_IGRF_S2E_MATLAB.png │ │ ├── Result_ECIECEF_Matlab.png │ │ ├── Result_ECIECEF_S2E_Full.png │ │ ├── Result_ECIECEF_S2E_Simple.png │ │ ├── Result_ECIECEF_S2E_time.png │ │ ├── Result_IGRF_S2E.png │ │ ├── Result_NRLMSISE00_Web_2015.png │ │ ├── Result_NRLMSISE00_Web_2020.png │ │ ├── Result_SRPEnvironment_shadowfunction.jpg │ │ ├── Result_SRP_calculation.JPG │ │ ├── Result_eclipse_calculation.JPG │ │ └── result_gnss.png ├── Interface │ ├── .gitkeep │ └── Spec_PowerPort.md ├── Library │ └── .gitkeep ├── OverallStructure │ ├── OverallStructure.md │ └── figs │ │ ├── Component_structure.png │ │ └── S2E_structure.png └── Simulation │ ├── .gitkeep │ ├── Spec_GroundStation.md │ ├── Spec_InstalledComponents.md │ ├── Spec_MonteCarloSimulation.md │ ├── Spec_SampleCase.md │ ├── Spec_SampleGroundStation.md │ ├── Spec_SampleGroundStationComponents.md │ ├── Spec_SampleSpacecraft.md │ ├── Spec_SampleSpacecraftComponents.md │ ├── Spec_SimulationCase.md │ ├── Spec_SimulationConfiguration.md │ ├── Spec_Spacecraft.md │ └── Spec_Structure.md ├── Tutorials ├── GettingStarted.md ├── HowToAddComponents.md ├── HowToAddControlAlgorithms.md ├── HowToIntegrateC2A.md ├── HowToMakeNewComponents.md ├── HowToMakeNewSimulationScenario.md ├── HowToPerformI2cHilsTest.md ├── HowToPerformUartHilsTest.md ├── HowToSimulateMultipleSatellites.md ├── HowToUseMonteCarloSimulation.md ├── SampleCodes │ └── c2a_integration │ │ └── c2a_src_user │ │ ├── Applications │ │ ├── CMakeLists.txt │ │ ├── DriverInstances │ │ │ ├── di_s2e_uart_test.c │ │ │ └── di_s2e_uart_test.h │ │ ├── app_headers.h │ │ ├── app_registry.c │ │ └── app_registry.h │ │ └── Settings │ │ └── Modes │ │ └── TaskLists │ │ └── Elements │ │ ├── tl_elem_debug_display.c │ │ └── tl_elem_drivers_update.c └── figs │ ├── AngularVelocityTrueVsGyro.png │ ├── C2aBuild.JPG │ ├── C2aCommunicationConfirmation.png │ ├── ControlAlgorithm_ComponentControl_result1.png │ ├── ControlAlgorithm_ComponentControl_result2.png │ ├── ControlAlgorithm_ComponentControl_result3.png │ ├── ControlAlgorithm_ComponentControl_result4.png │ ├── ControlAlgorithm_ComponentControl_result5.png │ ├── ControlAlgorithm_DirectControl_result1.png │ ├── ControlAlgorithm_DirectControl_result2.png │ ├── ControlAlgorithm_DirectControl_result3.png │ ├── GettingStarted_PlotIssOrbit3d.JPG │ ├── GettingStarted_PlotIssOrbitInMiller.JPG │ ├── GettingStarted_PlotPrismOrbit3d.JPG │ ├── GettingStarted_PlotPrismOrbitInMiller.JPG │ ├── SerialPortCommunicationConfirmation.png │ ├── SerialPortCommunication_Confirmation2.png │ └── SerialPortCommunication_I2CLoopback.png ├── book.toml ├── prepro.sh └── renovate.json /.github/ISSUE_TEMPLATE/action_item.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Action Item 3 | about: For Action Item management 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Overview 11 | Write briefly. 12 | 13 | ## Details 14 | Write in detail. 15 | 16 | ## Conditions for close 17 | When xxx is complete. 18 | 19 | ## Supplement 20 | Write additional comments if you need. 21 | 22 | ## Note 23 | - If there are related Projects, tie them together. 24 | - Set `priority` label if possible. 25 | - Assignees should be set if possible. 26 | - Write a conclusion when closing the issue. 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Overview 11 | Write briefly. 12 | 13 | ## Details 14 | ### Description 15 | What kind of bug? 16 | 17 | ### Conditions of occurrence 18 | The environment in which the bug occurs, the condition, parameters, etc. 19 | 20 | ### Additional information 21 | files, link, etc, if any. 22 | 23 | ## Task 24 | - [ ] Fix xxx 25 | - [ ] Do yyy 26 | 27 | ## Scope of influence 28 | eg. All tools are not working. 29 | 30 | ## Supplement 31 | Write additional comments if you need. 32 | 33 | ## Note 34 | - If there are related Projects, tie them together. 35 | - Set `priority` label if possible. 36 | - Assignees should be set if possible. 37 | - Write a conclusion when closing the issue. 38 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | Write briefly. 3 | 4 | ## Issue 5 | - Related issues 6 | 7 | ## Details 8 | Write in detail. 9 | 10 | ## Validation results 11 | Link to tests or validation results. 12 | 13 | ## Scope of influence 14 | eg. The behavior of XX will be change. 15 | 16 | ## Supplement 17 | Write additional comments if you need. 18 | 19 | ## Note 20 | - If there are related Projects, tie them together. 21 | - Assignees should be set if possible. 22 | - Reviewers should be set if possible. 23 | - Set `priority` label if possible. 24 | -------------------------------------------------------------------------------- /.github/labels.yml: -------------------------------------------------------------------------------- 1 | - name: "bug" 2 | color: "d73a4a" 3 | description: "Something isn't working" 4 | 5 | - name: "documentation" 6 | color: "0075ca" 7 | description: "Improvements or additions to documentation" 8 | 9 | - name: "duplicate" 10 | color: "cfd8d7" 11 | description: "This issue or pull request already exists" 12 | 13 | - name: "enhancement" 14 | description: "New feature or request" 15 | color: "a2eeef" 16 | 17 | - name: "good first issue" 18 | description: "Good for newcomers" 19 | color: "7057ff" 20 | 21 | - name: "help wanted" 22 | description: "Extra attention is needed" 23 | color: "008672" 24 | 25 | - name: "invalid" 26 | description: "This doesn't seem right" 27 | color: "e4e669" 28 | 29 | - name: "question" 30 | description: "Further information is requested" 31 | color: "d876e3" 32 | 33 | - name: "wontfix" 34 | description: "This will not be worked on" 35 | color: "ffffff" 36 | 37 | - name: "icebox" 38 | description: "icebox or pending" 39 | color: "c5def5" 40 | 41 | - name: "priority::high" 42 | description: "priorityg high" 43 | color: "d93f0b" 44 | 45 | - name: "priority::low" 46 | description: "priority low" 47 | color: "9dcce0" 48 | 49 | - name: "priority::medium" 50 | description: "priority medium" 51 | color: "fbca04" 52 | 53 | - name: "tools" 54 | description: "" 55 | color: "510f70" 56 | 57 | - name: "C2A" 58 | description: "" 59 | color: "2a9637" 60 | 61 | - name: "WINGS" 62 | description: "" 63 | color: "1503bb" 64 | -------------------------------------------------------------------------------- /.github/workflows/actionlint.yml: -------------------------------------------------------------------------------- 1 | name: reviewdog / actionlint 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/workflows/**' 7 | 8 | jobs: 9 | actionlint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 13 | - uses: reviewdog/action-actionlint@v1 14 | with: 15 | github_token: ${{ secrets.GITHUB_TOKEN }} 16 | reporter: github-pr-review 17 | fail_on_error: true 18 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: labeler 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | paths: 9 | - .github/workflows/labeler.yml 10 | - .github/labels.yml 11 | 12 | jobs: 13 | labeler: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 18 | 19 | - name: Run Labeler 20 | uses: crazy-max/ghaction-github-labeler@v5 21 | with: 22 | github-token: ${{ secrets.GITHUB_TOKEN }} 23 | yaml-file: .github/labels.yml 24 | skip-delete: false 25 | dry-run: ${{ github.ref != 'refs/heads/main' }} 26 | -------------------------------------------------------------------------------- /.github/workflows/mdbook.yml: -------------------------------------------------------------------------------- 1 | name: mdbook 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | jobs: 10 | mdbook: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 15 | with: 16 | fetch-depth: 0 17 | 18 | - name: setup mdbook 19 | uses: peaceiris/actions-mdbook@v2.0.0 20 | with: 21 | mdbook-version: 'latest' 22 | 23 | - name: preprocess 24 | shell: bash 25 | run: ./prepro.sh 26 | 27 | - name: build 28 | run: mdbook build 29 | 30 | - name: prepare deploy 31 | run: | 32 | git config --local user.name "github-actions[bot]" 33 | git config --local user.email "github-actions[bot]@users.noreply.github.com" 34 | git worktree add gh-pages gh-pages 35 | cd gh-pages 36 | # Delete the ref to avoid keeping history. 37 | git update-ref -d refs/heads/gh-pages 38 | rm -rf ./* 39 | mv ../book/* . 40 | git add . 41 | git commit -m "Deploy $GITHUB_SHA to gh-pages" 42 | 43 | - name: deploy 44 | if: ${{ github.ref == 'refs/heads/main' }} 45 | working-directory: ./gh-pages 46 | run: | 47 | git push -f origin gh-pages 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # mdbook 2 | src/ 3 | book/ 4 | 5 | # OSX 6 | .DS_Store 7 | .AppleDouble 8 | .LSOverride 9 | Icon 10 | 11 | # Thumbnails 12 | ._* 13 | 14 | # Files that might appear on external disk 15 | .Spotlight-V100 16 | .Trashes 17 | -------------------------------------------------------------------------------- /General/CodingConvention.md: -------------------------------------------------------------------------------- 1 | # Coding Convention of S2E 2 | 3 | ## Formatter 4 | - We use [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) for S2E. 5 | - We selected `Google` base style with small modifications. 6 | - Details are written in [.clang-format](https://github.com/ut-issl/s2e-core/blob/develop/.clang-format). 7 | 8 | 9 | ## Naming Rules 10 | - Now discussing 11 | - The following rules are follows until the new naming rule is decided. 12 | - Several old files do not follow the rules. 13 | - We are discussing follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) with small modifications. 14 | 15 | - File and directory Name 16 | - `snake_case` 17 | - C++ files should end in `.cpp`, and header files should end in `.hpp`. 18 | 19 | - Macro (define) 20 | - Snake case with capital case 21 | - `SNAKE_CASE` 22 | 23 | - Name of the class 24 | - `CamelCase` 25 | 26 | - Variable name 27 | - Snake case with lower case 28 | - `snake_case` 29 | 30 | - Constant name (not a define but a constant) 31 | - Add k at the beginning and the rest is CamelCase 32 | - `kCamelCase` 33 | 34 | - Member variables in the class 35 | - Snake case with lower case end with `_` 36 | - `snake_case_` 37 | 38 | - Methods (functions) in the class 39 | - `CamelCase` 40 | 41 | - The #define Guard 42 | - Apply [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). 43 | - `#pragma once` is prohibited 44 | 45 | ## Documentation 46 | - Use Doxygen 47 | - Use Markdown for Doxygen 48 | - Examples: 49 | - https://developer.lsst.io/cpp/api-docs.html 50 | 51 | 52 | ## Initialization files (`.ini` files) 53 | - Comments 54 | - Use // 55 | 56 | ## Abbreviations 57 | - Basically, we follows the [Naming Rules in the Google Style Guide](https://google.github.io/styleguide/cppguide.html#General_Naming_Rules) 58 | - Single character abbreviations are prohibited. 59 | - Examples: `q = quaternion`, `v = velocity` are prohibited. 60 | - We do not recommend to use abbreviations for one word cutting the word. 61 | - Examples: `pos = position`, `quat = quaternion` are not recommended. 62 | - The following abbreviations are available as exceptions since they are widely used in the math, science, and technology field. 63 | - `max`: maximum 64 | - `min`: minimum 65 | - `init`: initial, initialize 66 | - `calc`: calculate, calculation 67 | - Abbreviation only file name is not recommended. 68 | - Examples 69 | - `ode.hpp` should be written as `ordinary_differential_equation.hpp` 70 | - `gnssr.hpp` is not recommended, but `gnss_receiver.hpp` is available since we can guess the abbreviation meaning from the context. 71 | - Write the full words in the comment when you use abbreviations. 72 | - Available abbreviations are decided during review processes. 73 | - Examples of available abbreviations with comments 74 | - `EKF`: Extended Kalman Filter 75 | - `GNSS`: Global Navigation Satellite System 76 | - Abbreviations to show the frame and the unit are available. 77 | - Examples of frame 78 | - `i`: Inertial frame 79 | - `b`: Body fixed frame 80 | - `c`: Component fixed frame 81 | - `ecef`: Earth Centered Earth Fixed frame 82 | - `lvlh`: Local Vertical Local Horizontal 83 | - `rtn`: Radial-Transverse-Normal 84 | - Examples of unit: `Nm`, `rad/s`, `m/s2`, `degC` 85 | - Available abbreviations 86 | - `S2E`: Spacecraft Simulation Environment 87 | - `AOCS`: Attitude and Orbit Control System 88 | - `CDH`: Command and Data Handling 89 | -------------------------------------------------------------------------------- /General/DocumentFormat.md: -------------------------------------------------------------------------------- 1 | # Format to write specification documents 2 | 3 | ## 0. General rule 4 | - The file name should be `Spec_CamelCase.md` in the Specifications directory. 5 | - Please use the markdown format. 6 | - Because GitHub started to support math description ([link](https://github.blog/2022-05-19-math-support-in-markdown/)), we need to describe equations suit with the rule of GitHub and [MathJax](https://www.mathjax.org/). 7 | 8 | ## 1. Overview 9 | ### 1. Features 10 | - Write an overview of features to be realized using the class or library here clearly. 11 | 12 | ### 2. Related files 13 | - Enumerate all related codes and input files here 14 | 15 | ### 3. How to use 16 | - Write how to use the class or functions 17 | 18 | 19 | ## 2. Explanation of Algorithm 20 | Write important algorithms for the class, the library, or each function. Please use equations, figures, reference papers for easy understanding. 21 | 22 | ### 1. Name of class, structure, and function 23 | #### 1. Overview 24 | - Please summarize the 25 | 26 | #### 2. Inputs and Outputs 27 | - Please list up inputs and outputs 28 | 29 | #### 3. Algorithm 30 | - Please use math description when you need as follows 31 | $$\dot{\boldsymbol{x}}=f(\boldsymbol{x},t)$$ 32 | 33 | ```math 34 | \dot{\boldsymbol{x}}=f(\boldsymbol{x},t) 35 | ``` 36 | - you can also use inline equation as $x=y$ 37 | 38 | #### 4. Note 39 | 40 | ### 2. Name of function 41 | #### 1. Overview 42 | #### 2. Inputs and Outputs 43 | #### 3. Algorithm 44 | #### 4. Note 45 | 46 | ### 3. Name of function 47 | #### 1. Overview 48 | 49 | 50 | ## 3. Results of verifications 51 | ### 1. Name of verification case 52 | #### 1. Overview 53 | - please write a reason why the author does the verification 54 | 55 | #### 2. conditions for the verification 56 | - input files 57 | - initial values 58 | 59 | #### 3. result 60 | - please use figures to show the results clearly 61 | - Upload the figure files in `figs` directory 62 | - **Note:** the figure size should be smaller than several hundred K Bytes 63 | - Smaller is better 64 | - Link the figure file with **relative path** 65 | 66 | 67 | ## 4. References 68 | 69 | 1. 70 | -------------------------------------------------------------------------------- /General/HowToCompileWithVisualStudio.md: -------------------------------------------------------------------------------- 1 | # How to build and execute with Visual Studio 2 | 3 | ## 1. Overview 4 | This document explains how to build and execute the Visual Studio environment with CMake. Currently, we recommend using `VS2022`, but users can use `VS2019` and `VS2017` with minor modifications. 5 | 6 | - Related files 7 | - ./CmakeLists.txt 8 | - Base file for CMake 9 | - ./CMakeSettings.json 10 | - Setting file for VS to use CMake 11 | - Other CMakeLists.txt in subdirectories 12 | 13 | ## 2. Environment Construction of Visual Studio 14 | - Install [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) 15 | - Select the following `Workloads` when installing the VS2022 16 | - `Desktop development with C++` 17 | - Clone [s2e-core](https://github.com/ut-issl/s2e-core) 18 | - Please use `the latest release version`. 19 | - The following procedure possible does not work for `The latest develop branch`. 20 | - Check that the `ExtLibraries` directory is in **the same directory** as the `s2e-core` like below. 21 |
22 |   ├─ExtLibraries
23 |   └─s2e-core
24 |   
25 | - If not, please follow the procedure below to make `ExtLibraries` 26 | - Launch VS 2022 27 | - Open the CMake file for the `ExtLibraries` 28 | - Click `Files/Open/CMake`. 29 | - Select the following `s2e-core/ExtLibraries/CMakeLists.txt`. 30 |
31 |         └─s2e-core
32 |            └─ExtLibraries
33 |               └─CMakeLists.txt
34 |         
35 | - Wait a moment until the `CMake generation` is finished. 36 | - Install the `ExtLibraries` 37 | - Select `CMakeLists.txt` by right-clicking in the VS's `Solution Explorer`. 38 | - Click the `Install` command. 39 | - Wait a moment until the installation is successfully finished. 40 | - Check that the `ExtLibraries` directory is in **the same directory** as the `s2e-core` 41 | - Check there are `cspice` and `nrlmsise00` directories in the `ExtLibraries` like below. 42 |
43 |       ├─ExtLibraries
44 |       │  └─cspice
45 |       │  └─GeoPotential
46 |       |  └─nrlmsise00
47 |       └─s2e-core
48 |       
49 | 50 | ## 3. The flow of building and execution in Visual Studio 2022 51 | 1. Launch VS 2022 52 | 53 | 2. Open the S2E project 54 | - Click `File/Open/CMake`. 55 | - Select `s2e-core/CMakeLists.txt` at the top directory of the cloned S2E. 56 | - Wait a moment until the `CMake generation` is finished. 57 | 58 | 3. Build the S2E 59 | - Select `CMakeLists.txt` by right-clicking in the VS's `Solution Explorer`. 60 | - Click the `Build` command. 61 | - Wait a moment until the build is successfully finished. 62 | 63 | 4. Check errors 64 | - When users edit the codes, please check the error and fix them. 65 | 66 | 5. Run the program 67 | - Select `S2E.exe` as the red circle of the following figure. 68 | ![](./figs/CMake_run.png) 69 | - Click the `green play button` in the red circle to run the S2E. 70 | - A console window is opened, and users can see the S2E's running status. 71 | 72 | 6. Check log files 73 | - Open the `./data/***/logs/logs_***` directory. 74 | - Open the CSV file to check the log output of the S2E. 75 | 76 | ## 4. Note 77 | - For VS2019 users 78 | - Please edit the compiler setting in `CMakeSetting.json` as 79 | ``` 80 | "generator": "Visual Studio 16 2019". 81 | ``` 82 | - For VS2017 users 83 | - Please edit the compiler setting in `CMakeSetting.json` as 84 | ``` 85 | "generator": "Visual Studio 15 2017". 86 | ``` 87 | - Users also need to edit the `cmake_minimum_required` version from 3.13 to 3.10 in all CMakeList, including the files in subdirectories. The VS 2017 does not support version 3.13, and you may see many `warnings` when you use CMake Version 3.10. 88 | -------------------------------------------------------------------------------- /General/HowToDownloadNRLMSISE00library.md: -------------------------------------------------------------------------------- 1 | # How to download and make NRLMSISE00 Library 2 | 3 | ## 1. Overview 4 | - [NRLMSISE00](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2002JA009430) is an atmosphere model to calculate an air density, considering the solar activity. 5 | - [C language version of NRLMSISE00](https://git.linta.de/?p=~brodo/nrlmsise-00.git;a=summary) is a mandatory library for S2E to calculate the atmosphere density around the Earth. 6 | - How to use NRLMSISE00 is written in the [Specification of Atmosphere model](../Specifications/Environment/Spec_Atmosphere.md). 7 | - **Note** From the [s2e-core v5.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v5.0.0) we provide the CMake file to download and install the external libraries and recommend to use it since it is simpler. So users do not need to execute the following process. 8 | 9 | 10 | ## 2. How to set up NRLMSISE00 for S2E [OLD Descriptions] 11 | 1. In any environment, run `s2e-core/scripts/Common/download_nrlmsise00_src_and_table.sh` 12 | + Source codes of NRLMSISE00 and `SpaceWeather.txt` will be downloaded, and `libnrlmsise00.a` will be made for Linux and OSX. 13 | + Users have to compile the codes using the same compiler with S2E. After these codes are downloaded, you can directly compile them by using makefile in the `ExtLibraries\nrlmsise00\src`. 14 | + If you use Windows, a bash terminal for Windows (e.g. Git bash, WSL, MSYS) is needed to run this script, and you need to run an additional script. Proceed to Step 2. 15 | 16 | 17 | 2. For Windows Visual Studio users, run `s2e-core/scripts/VisualStudio/make_nrlmsise00_VS32bit.bat` after the process 1. 18 | + VS command prompt will be launched, then run `scripts/VisualStudio/make_libnrlmsise.bat` in VS command prompt. 19 | + `libnrlmsise.lib`, which is the library for Windows Visual Studio will be made. 20 | + At the end of the procedure, you may see "指定されたバッチ ラベルが見つかりません - END". If there is `libnrlmsise00.lib` in the right place and all the files are in the right place, you may ignore this message. 21 | 22 | 3. Check your directories are as follows. 23 |
   
24 |   ├─ExtLibraries  
25 |   │  └─nrlmsise00
26 |   │      ├─table 
27 |   |      |  └─SpaceWeather.txt
28 |   │      ├─lib
29 |   |      |  |─libnrlmsise00.a
30 |   |      |  └─libnrlmsise00.lib
31 |   │      └─src
32 |   |         └─nrlmsise-00.h
33 |   └─s2e-core  
34 | 
35 | -------------------------------------------------------------------------------- /General/HowToDwnloadCSPCElibrary.md: -------------------------------------------------------------------------------- 1 | # How to download CSPICE Library 2 | 3 | ## 1. Overview 4 | - [SPICE](https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/info/intrdctn.html) is a system to combine the most accurate space geometry and event data with space mission analysis, observation planning, or science data processing software developed by NASA. 5 | - [CSPICE](https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/index.html) is the C language version of SPICE and mandatory library for S2E to get planet information. 6 | - **Note** From the [s2e-core v5.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v5.0.0), we provide the CMake file to download and install the external libraries and recommend to use it since it is simpler. So users do not need to execute the following process. 7 | 8 | 9 | ## 2. How to set up CSPICE Library for S2E [OLD Descriptions] 10 | **Note**: Users can use the script file to automatically set up the following process in the `s2e-core/script` directory. If the script does not work, please see the following process. 11 | 12 | - Make directories as follow 13 |
   
14 |   ├─ExtLibraries  
15 |   │  └─cspice  
16 |   │      ├─cspice_xxx  
17 |   │      │  └─lib  
18 |   │      ├─generic_kernels  
19 |   │      └─include  
20 |   └─s2e-core  
21 | 
22 | - xxx is depends on your compile environment 23 | - `xxx = msvs` for Microsoft Visual Studio 24 | - `xxx = cygwin` for Cygwin gCC 25 | - `xxx = unix` for Linux gCC 26 | 27 | - Download library and compile 28 | - Download `cspice.zip` from [NAIF Toolkit](https://naif.jpl.nasa.gov/naif/toolkit_C.html), and unzip. 29 | - You need to choose a link suit with your compile environment 30 | - Copy `include` directory into `cspice` directory 31 | - Copy `lib` or `lib64` directory into `cspice_***` directory 32 | - VS 2019 users need to compile the library before copying the `lib` 33 | - launch following command prompt for VS2019 compile from the start menu of Windows 34 | - 32bit: `x86 Native tools command prompt for VS2019` 35 | - 64bit: `x64 Native tools command prompt for VS2019` 36 | - Move to the unzipped directory and execute `makeall.bat` 37 | 38 | - Download kernel files 39 | - Download the following kernel files from [NAIF Generic Kernels](https://naif.jpl.nasa.gov/pub/naif/generic_kernels/), and copy them to the directories 40 | - Each kernel file can be updated for the latest one, but we have not confirmed it yet. 41 |
         
42 |         ├─generic_kernels  
43 |         │  ├─lsk  
44 |         │      └─naif0010.tls  
45 |         │  ├─pck  
46 |         │      └─de-403-masses.tpc  
47 |         │      └─gm_de431.tpc  
48 |         │      └─pck00010.tpc  
49 |         │  └─spk  
50 |         │      └─planets  
51 |         │  │      └─de430.bsp  
52 |   
53 | **Note:** When you change the directory or file name, you should modify `s2e-core/CMakeLists` and `PlanetSelect.ini` 54 | 55 | -------------------------------------------------------------------------------- /General/HowToVisualizeSimulationResults.md: -------------------------------------------------------------------------------- 1 | # How to Visualize Simulation Results 2 | 3 | ## 1. Overview 4 | The S2E generates the CSV format log file as the simulation results at the `data/log` directory. Users can use them to check the result of their simulation with the following methods. 5 | - Open the CSV file with a spreadsheet application like Excel, and make charts to analyze and/or visualize the results. 6 | - Open the CSV file with user's handmade programs to analyze and/or visualize the results. 7 | - Use the `Plot Scripts` provided by the `S2E-CORE` to visualize the results. 8 | 9 | We are trying to increase the `Plot Scripts` to share the analysis method with many users and to improve the usability of S2E. We are welcome to add new `Plot Scripts` by users. 10 | 11 | 12 | ## 2. How to use `Plot Scripts` 13 | - Overview 14 | - Users can find the scripts at the `s2e-core/scripts/Plot` directory. 15 | - They are written in [Python](https://www.python.org/). 16 | - Environment to execute Python 17 | - We use [Pipenv](https://pypi.org/project/pipenv/) to manage the environment. 18 | - In the `s2e-core/scripts/Plot` directory, you can also find the `Pipfile` which defines the version of Python and other libraries used in the scripts. 19 | - By using the `Pipenv`, users can easily construct the virtual environment to execute the scripts provided by the S2E 20 | - Users can create a virtual environment by running following commands after changing directory to ```scripts/Plot``` 21 | ``` 22 | # Windows 23 | pip install pipenv 24 | pipenv sync 25 | ``` 26 | - Then users can run scripts by following commands. 27 | ``` 28 | # Windows 29 | pipenv run python --file-tag 30 | ``` 31 | Example 32 | ``` 33 | pipenv run python .\plot_orbit_eci.py --file-tag 230213_003054 34 | ``` 35 | - Example of the Visualization 36 | - Satellite trajectory on the earth map and ground station visibility analysis 37 | - The red star means the ground station. 38 | - The blue line shows the satellite trajectory and it turns red when the satellite is visible from the ground station. 39 |
40 | plot_gs_visibility 41 |
42 | - Direction information at the satellite body fixed frame 43 | - Users can see the direction vector of the sun, earth, moon, and the velocity of the satellite at the body fixed frame to check the attitude control works well. 44 |
45 | plot_gs_visibility 46 |
47 | 48 | ## 4. References 49 | - NA 50 | -------------------------------------------------------------------------------- /General/NamingRuleForUserInterface.md: -------------------------------------------------------------------------------- 1 | # Naming Rule for User Interface 2 | 3 | ## Overview 4 | This document describes the naming rule for user interface layer which includes `parameters in initialize files` and `variable names in CSV log files`. Since users directly access to the values, we need to care the readability more than the name of variables in codes. 5 | 6 | ### Common rules 7 | - The names has following structure 8 | - Scalar values: `[name]_[unit]` 9 | - Vector or matrix values: `[name]_[frame]_[unit]` 10 | - If the value has no unit, we can remove the `[unit]` information. 11 | - Variable name field: `[name]` 12 | - It should be written as `snake_case`. 13 | - Single character abbreviations are prohibited. 14 | - Examples: `q = quaternion`, `v = velocity` are prohibited. 15 | - We do not recommend to use unfamiliar abbreviations. 16 | - Examples: `pos = position`, `quat = quaternion` are not recommended. 17 | - Available abbreviations are decided during review processes. 18 | - Unit field: `[unit]` 19 | - For readability, we recommend to use general unit description in the SI unit system, and we do not need to follow the `snake_case` description in the unit field. 20 | - Examples: `Nm`, `rad/s`, `m/s2`, `degC` 21 | - Frames 22 | - For readability, we recommend to use the following abbreviation in the unit field. When new abbreviation is needed for the frame description, please add it into the following list. 23 | - `i`: Inertial frame 24 | - `b`: Body fixed frame 25 | - `c`: Component fixed frame 26 | - `ecef`: Earth Centered Earth Fixed frame 27 | - `lvlh`: Local Vertical Local Horizontal 28 | - `rtn`: Radial-Transverse-Normal 29 | - To express the frame conversion, we can use `i2b` as `frame conversion from the inertial frame to the body-fixed frame`. 30 | - Note: The definition of origin of inertial frame is defined by the user settings. So sometimes we cannot use `eci = Earth Centered Inertial`. 31 | - The axis of the frame is described as `i_x, i_y, i_z`. 32 | 33 | ## Initialize files 34 | - S2E uses `INI` format initialize files. 35 | - `INI` has `Section` and `key` fields as follows 36 | ``` 37 | [SECTION] 38 | key = value 39 | ``` 40 | - The `SECTION` field should be written as `SNAKE_CASE` 41 | - The `key` fields should be written to follow the above `Common rules`. 42 | - The axis of the frame is described as `(0), (1), (2)`, and they mean `X, Y, Z` 43 | - For quaternion `(0), (1), (2), (3)` is used as `X, Y, Z, W`. 44 | - TODO: Modify to use `X, Y, Z` directory? 45 | 46 | ## CSV log files 47 | - S2E generates `CSV` format log files. 48 | - The output file has the `variable names` in the first rows. 49 | - The `variable names` should be written to follow the above `Common rules`. 50 | - The unit is written in the brackets `[ ]` as `[N]` 51 | -------------------------------------------------------------------------------- /General/Troubleshooting.md: -------------------------------------------------------------------------------- 1 | # Troubleshooting 2 | 3 | ## 1. Overview 4 | - TBW -------------------------------------------------------------------------------- /General/figs/CMake_build.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/General/figs/CMake_build.jpg -------------------------------------------------------------------------------- /General/figs/CMake_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/General/figs/CMake_run.png -------------------------------------------------------------------------------- /General/figs/Docker_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/General/figs/Docker_container.png -------------------------------------------------------------------------------- /General/figs/VSC_SSH_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/General/figs/VSC_SSH_connect.png -------------------------------------------------------------------------------- /General/figs/plot_body_frame_info.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/General/figs/plot_body_frame_info.JPG -------------------------------------------------------------------------------- /General/figs/plot_gs_visibility.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/General/figs/plot_gs_visibility.JPG -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | [Overview](./Overview.md) 4 | 5 | # General Information 6 | 7 | - [Coding Convention](./General/CodingConvention.md) 8 | - [Format of Documents](./General/DocumentFormat.md) 9 | - [Setup Environment]() 10 | - [How to compile with Visual Studio](./General/HowToCompileWithVisualStudio.md) 11 | - [How to compile with Ubuntu in Docker](./General/HowToCompileWithUbuntuInDocker.md) 12 | - [How to compile with OSX Environment](./General/HowToCompileWith_OSX.md) 13 | - [How to download and make NRLMSISE00 Library](./General/HowToDownloadNRLMSISE00library.md) 14 | - [How to download CSPICE Library](./General/HowToDwnloadCSPCElibrary.md) 15 | 16 | # Tutorials 17 | 18 | - [Getting Started](./Tutorials/GettingStarted.md) 19 | - [How To Make New Simulation Scenario](./Tutorials/HowToMakeNewSimulationScenario.md) 20 | - [How To Add Components](./Tutorials/HowToAddComponents.md) 21 | - [How To Make New Components](./Tutorials/HowToMakeNewComponents.md) 22 | - [How To Use Monte Carlo Simulation](./Tutorials/HowToUseMonteCarloSimulation.md) 23 | - [How To Add Control Algorithms](./Tutorials/HowToAddControlAlgorithms.md) 24 | - [How To Integrate C2A](./Tutorials/HowToIntegrateC2A.md) 25 | - [How To Perform UART HILS Test](./Tutorials/HowToPerformUartHilsTest.md) 26 | - [How To Perform I2C HILS Test](./Tutorials/HowToPerformI2cHilsTest.md) 27 | - [How to simulate multiple satellites](./Tutorials/HowToSimulateMultipleSatellites.md) 28 | 29 | # Specifications 30 | 31 | - [Overall Structure](./Specifications/OverallStructure/OverallStructure.md) 32 | - [Component]() 33 | - [Abstract]() 34 | - [Component Base](./Specifications/Component/Abstract/Spec_ComponentBase.md) 35 | - [OBC Communication Base](./Specifications/Component/Abstract/Spec_ObcCommunicationBase.md) 36 | - [Sensor Base](./Specifications/Component/Abstract/Spec_SensorBase.md) 37 | - [AOCS]() 38 | - [STT](./Specifications/Component/AOCS/Spec_STT.md) 39 | - [RW Jitter](./Specifications/Component/AOCS/Spec_RWJitter.md) 40 | - [CDH]() 41 | - [Logic]() 42 | - [Mission]() 43 | - [Telescope](./Specifications/Component/Mission/Spec_Telescope_en.md) 44 | - [Power]() 45 | - [PCU](./Specifications/Component/Power/Spec_PCU.md) 46 | - [Propulsion]() 47 | - [SimpleThruster](./Specifications/Component/Propulsion/Spec_SimpleThruster.md) 48 | - [Thermal]() 49 | - [Disturbance]() 50 | - [GeoPotential](./Specifications/Disturbance/Spec_GeoPotential.md) 51 | - [Gravity Gradient Torque](./Specifications/Disturbance/Spec_GGTorque.md) 52 | - [Magnetic Disturbance Torque](./Specifications/Disturbance/Spec_MagDisturbance.md) 53 | - [Surface force](./Specifications/Disturbance/Spec_SurfaceForce.md) 54 | - [Air Drag](./Specifications/Disturbance/Spec_SurfaceForce_AirDrag.md) 55 | - [Solar Radiation Pressure](./Specifications/Disturbance/Spec_SurfaceForce_SolarRadiation.md) 56 | - [Third Body Gravity](./Specifications/Disturbance/Spec_ThirdBodyGravity.md) 57 | - [Dynamics]() 58 | - [Attitute]() 59 | - [Attitude Dynamics](./Specifications/Dynamics/Spec_AttitudeDynamics.md) 60 | - [Controlled Attitude](./Specifications/Dynamics/Spec_ControlledAttitude.md) 61 | - [Orbit](./Specifications/Dynamics/Spec_Orbit.md) 62 | - [Kepler Orbit Propagation](./Specifications/Dynamics/Spec_KeplerOrbit.md) 63 | - [SGP4 Orbit Propagation](./Specifications/Dynamics/Spec_Sgp4.md) 64 | - [RK4 Orbit Propagation](./Specifications/Dynamics/Spec_Rk4Orbit.md) 65 | - [Orbit Propagation with Encke's Method](./Specifications/Dynamics/Spec_EnckeMethod.md) 66 | - [Relative Orbit](./Specifications/Dynamics/Spec_RelativeOrbit.md) 67 | - [Thermal]() 68 | - [Environment]() 69 | - [SRP Environment](./Specifications/Environment/Spec_SRPEnvironment.md) 70 | - [Atmosphere](./Specifications/Environment/Spec_Atmosphere.md) 71 | - [Magnetic Environment](./Specifications/Environment/Spec_MagEnvironment.md) 72 | - [Hipparcos Catalogue](./Specifications/Environment/Spec_HipparcosCatalogue_en.md) [(Japanese)](./Specifications/Environment/Spec_HipparcosCatalogue_ja.md) 73 | - [GNSS Satellites](./Specifications/Environment/Spec_GnssSatellites_en.md) [(Japanese)](./Specifications/Environment/Spec_GnssSatellites_ja.md) 74 | - [Celestial Rotation](./Specifications/Environment/Spec_CelestialRotation.md) 75 | - [Interface]() 76 | - [Power Port](./Specifications/Interface/Spec_PowerPort.md) 77 | - [Library]() 78 | - [Simulation]() 79 | - [Monte Carlo Simulation](./Specifications/Simulation/Spec_MonteCarloSimulation.md) 80 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/.gitkeep -------------------------------------------------------------------------------- /Specifications/Component/AOCS/Spec_STT.md: -------------------------------------------------------------------------------- 1 | # Specification for StarSensor class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - `StarSensor` class simulates a star sensor. 6 | - The `StarSensor` class calculates and returns the observed quaternions and error flags. 7 | 8 | ### 2. files 9 | - `star_sensor.cpp, star_sensor.hpp` : Definitions and declarations of the class 10 | - `star_sensor.ini` : Initialization file 11 | - `plot_star_sensor.py`: An example of a Python script to plot star sensor output 12 | 13 | ### 3. how to use 14 | - Set the parameters in `star_sensor.ini`. 15 | - Create an instance by using the initialization function `InitStarSensor` 16 | - Use `Get*` function to get quaternion information. 17 | 18 | 19 | ## 2. Explanation of Algorithm 20 | ### 1. `Update` 21 | - TBW 22 | 23 | ### 2. `Judgement` 24 | #### 1. `EarthJudgement` 25 | - Calculate the angle $\theta_{ce}$ between the earth's center direction $\boldsymbol{r_{sc}}$ and the earth's edge direction $\boldsymbol{r_{se}}$. $R_e$ is the earth's radius. 26 | - Calculate the angle $\theta_{es}$ between the sight direction $\boldsymbol{r_{sight}}$ and the earth's edge direction $\boldsymbol{r_{se}}$. 27 | - Judge the STT error flag by comparing $\theta_{es}$ with the earth forbidden angle $\theta_{efa}$. If $\theta_{es} > \theta_{efa}$, the earth is completely outside the earth forbidden angle. 28 | 29 | 30 | ```math 31 | \begin{align} 32 | \theta_{ce} = \arctan{\left(\frac{|\boldsymbol{r_{se}}|}{R_e}\right)}\\ 33 | \theta_{cs} = \arccos{(\boldsymbol{r_{se}}*\boldsymbol{r_{sight}})}\\ 34 | \theta_{es} = \theta_{ce} - \theta_{cs} 35 | \tag{1} 36 | \end{align} 37 | ``` 38 | 39 | ![](./figs/stt_earth_judgement.png) 40 | 41 | 42 | ## 3. Results of verifications 43 | ### 1. verification of Earth judgement 44 | #### 1. overview 45 | - Check that Earth judgement is performed correctly 46 | 47 | #### 2. conditions for the verification 48 | - PropStepSec: 0.001 49 | - StepTimeSec: 0.1 50 | - EndTimeSec: 200 51 | - Initial position [m] : [4.2164140100E+07,0,0] 52 | - Initial velocity [m/s] : [0,3.074661E+03,0] 53 | - ControlledAttitude 54 | - main mode = EARTH_CENTER_POINTING: the pointing direction is determined by each case 55 | - sub mode = SUN_POINTING: [0,0,1] 56 | - STT quaternion from body frame to component frame: [0,0,0,1] 57 | - Earth forbidden half-angle: 10deg 58 | - The angle between the earth's center and edge direction: 8.6deg 59 | 60 | #### 3. results 61 | - The angle between pointing direction and earth center = 15deg 62 | - STT flag is always 1, since the angle $\theta_{es}$ between the sight direction and the earth's edge direction is 15 - 8.6 = 6.4deg < 10deg. 63 | 64 | ![](./figs/stt_flag_15.png) 65 | 66 | - The angle between pointing direction and earth center = 20deg 67 | - STT flag is always 0, since the angle $\theta_{es}$ between the sight direction and the earth's edge direction is 20 - 8.6 = 11.4deg > 10deg. 68 | 69 | ![](./figs/stt_flag_20.png) 70 | 71 | - The angle between pointing direction and earth center = 30deg 72 | - STT flag is always 0, since the angle $\theta_{es}$ between the sight direction and the earth's edge direction is 30 - 8.6 = 21.4deg > 10deg. 73 | 74 | ![](./figs/stt_flag_30.png) 75 | 76 | - The output result obtained by the default initial settings. 77 | - The figure is generated by the Python script. 78 | 79 | ![](./figs/star_sensor_output.png) 80 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/angular_velocity_observer_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/angular_velocity_observer_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/attitude_observer_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/attitude_observer_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/force_generator_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/force_generator_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/gyro_sensor_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/gyro_sensor_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/magnetometer_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/magnetometer_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/magnetorquer_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/magnetorquer_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/reaction_wheel_output_case1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/reaction_wheel_output_case1.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/reaction_wheel_output_case2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/reaction_wheel_output_case2.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/result_mtq_magnetometer_interference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/result_mtq_magnetometer_interference.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/rw_jitter_torque_time_domain_experiment.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/rw_jitter_torque_time_domain_experiment.JPG -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/rw_jitter_torque_time_domain_sim.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/rw_jitter_torque_time_domain_sim.jpg -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/rw_waterfall_experiment.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/rw_waterfall_experiment.JPG -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/rw_waterfall_sim.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/rw_waterfall_sim.jpg -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/star_sensor_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/star_sensor_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/stt_earth_judgement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/stt_earth_judgement.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/stt_flag_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/stt_flag_15.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/stt_flag_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/stt_flag_20.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/stt_flag_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/stt_flag_30.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/sun_sensor_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/sun_sensor_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/figs/torque_generator_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/AOCS/figs/torque_generator_output.png -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_angular_velocity_observer.md: -------------------------------------------------------------------------------- 1 | # Specification for AngularVelocityObserver class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `AngularVelocityObserver` class simulates an ideal angular velocity observer. 6 | - The `AngularVelocityObserver` class observes angular velocity with noise. 7 | 8 | ### 2. files 9 | - `angular_velocity_observer.cpp, angular_velocity_observer.hpp`: Definitions and declarations of the class 10 | - `angular_velocity_observer.ini`: Initialization file 11 | - `plot_angular_velocity_observer.py`: An example of a Python script to plot angular velocity observer output 12 | 13 | ### 3. how to use 14 | - Set the parameters in `angular_velocity_observer.ini`. 15 | - Other parameters 16 | - Parameters for the `Component` class 17 | - Parameters for the `Sensor` class 18 | - Create an instance by using the initialization function `InitializeAngularVelocityObserver` 19 | - Use the `GetAngularVelocity_b_rad_s` function to get magnetic field information. 20 | 21 | 22 | ## 2. Explanation of Algorithm 23 | 24 | ### 1. MainRoutine 25 | #### 1. Overview 26 | - The `MainRoutine` function adds the noise to the true angular velocity. 27 | 28 | #### 2. Inputs and Outputs 29 | - NA 30 | 31 | #### 3. Algorithm 32 | - NA 33 | 34 | 35 | ## 3. Results of verifications 36 | - The output result obtained by the default initial settings. 37 | - The figure is generated by the Python script. 38 | 39 | ![](./figs/angular_velocity_observer_output.png) 40 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_attitude_observer.md: -------------------------------------------------------------------------------- 1 | # Specification for AttitudeObserver class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `AttitudeObserver` class simulates an ideal attitude observer. 6 | - The `AttitudeObserver` class observes attitude quaternion with noise. 7 | 8 | ### 2. files 9 | - `attitude_observer.cpp, attitude_observer.hpp`: Definitions and declarations of the class 10 | - `attitude_observer.ini`: Initialization file 11 | - `plot_attitude_observer.py`: An example of a Python script to plot attitude observer output 12 | 13 | ### 3. how to use 14 | - Set the parameters in `attitude_observer.ini`. 15 | - `error_angle_standard_deviation_deg`: Standard deviation of error angle 16 | - Other parameters 17 | - Parameters for the `Component` class 18 | - Create an instance by using the initialization function `InitializeAttitudeObserver` 19 | - Use the `GetQuaternion_i2b` function to get magnetic field information. 20 | 21 | 22 | ## 2. Explanation of Algorithm 23 | 24 | ### 1. MainRoutine 25 | #### 1. Overview 26 | - The `MainRoutine` function adds the noise to the true attitude quaternion. 27 | 28 | #### 2. Inputs and Outputs 29 | - NA 30 | 31 | #### 3. Algorithm 32 | - NA 33 | 34 | 35 | ## 3. Results of verifications 36 | - The output result obtained by the default initial settings. 37 | - The figure is generated by the Python script. 38 | 39 | ![](./figs/attitude_observer_output.png) 40 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_force_generator.md: -------------------------------------------------------------------------------- 1 | # Specification for ForceGenerator class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `ForceGenerator` class simulates an ideal force generator. 6 | 7 | ### 2. files 8 | - `force_generator.cpp, force_generator.hpp`: Definitions and declarations of the class 9 | - `force_generator.ini`: Initialization file 10 | - `plot_force_generator.py`: An example of a Python script to plot force_generator output 11 | 12 | ### 3. how to use 13 | - Set the parameters in `force_generator.ini`. 14 | - `force_magnitude_standard_deviation_N`: Standard deviation of force magnitude 15 | - `force_direction_standard_deviation_deg`: Standard deviation of force direction 16 | - Other parameters 17 | - Parameters for the `Component` class 18 | - Create an instance by using the initialization function `InitForceGenerator` 19 | - Use the `SetForce*` function to set the ordered force. 20 | - Users can select the coordinate of the ordered force. 21 | 22 | 23 | ## 2. Explanation of Algorithm 24 | 25 | ### 1. MainRoutine 26 | #### 1. Overview 27 | - The `MainRoutine` function adds output noise to the ordered force and calculates generated force. 28 | 29 | #### 2. Inputs and Outputs 30 | - NA 31 | 32 | #### 3. Algorithm 33 | - NA 34 | 35 | 36 | ## 3. Results of verifications 37 | - The output result obtained by the default initial settings. 38 | - The figure is generated by the Python script. 39 | 40 | ![](./figs/force_generator_output.png) 41 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_gyro_sensor.md: -------------------------------------------------------------------------------- 1 | # Specification for GyroSensor class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `GyroSensor` class simulates a gyro sensor. 6 | - The `GyroSensor` class calculates and returns the observed angular velocity with noise. 7 | 8 | ### 2. files 9 | - `gyro_sensor.cpp, gyro_sensor.hpp`: Definitions and declarations of the class 10 | - `gyro_sensor.ini`: Initialization file 11 | - `plot_gyro_sensor.py`: An example of a Python script to plot gyro sensor output 12 | 13 | ### 3. how to use 14 | - Set the parameters in `gyro_sensor.ini`. 15 | - `quaternion_b2c`: Frame conversion quaternion from body to component frame. 16 | - Other parameters 17 | - Parameters for the `Component` class 18 | - Parameters for the `Sensor` class 19 | - Parameters for the `PowerPort` class 20 | - Create an instance by using the initialization function `InitGyroSensor` 21 | - Use the `Get*` function to get angular velocity information. 22 | 23 | 24 | ## 2. Explanation of Algorithm 25 | 26 | ### 1. MainRoutine 27 | #### 1. Overview 28 | - The `MainRoutine` function converts the angular velocity coordinate from the body to the component and adds noises using the feature of the `Sensor` class. 29 | 30 | #### 2. Inputs and Outputs 31 | - NA 32 | 33 | #### 3. Algorithm 34 | - NA 35 | 36 | 37 | ## 3. Results of verifications 38 | - The output result obtained by the default initial settings. 39 | - The figure is generated by the Python script. 40 | 41 | ![](./figs/gyro_sensor_output.png) 42 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_magnetometer.md: -------------------------------------------------------------------------------- 1 | # Specification for Magnetometer class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `Magnetometer` class simulates a magnetometer. 6 | - The `Magnetometer` class calculates and returns the observed magnetic field with noise. 7 | 8 | ### 2. files 9 | - `magnetometer.cpp, magnetometer.hpp`: Definitions and declarations of the class 10 | - `magnetometer.ini`: Initialization file 11 | - `plot_magnetometer.py`: An example of a Python script to plot magnetometer output 12 | 13 | ### 3. how to use 14 | - Set the parameters in `magnetometer.ini`. 15 | - `quaternion_b2c`: Frame conversion quaternion from body to component frame. 16 | - Other parameters 17 | - Parameters for the `Component` class 18 | - Parameters for the `Sensor` class 19 | - Parameters for the `PowerPort` class 20 | - Create an instance by using the initialization function `InitMagnetometer` 21 | - Use the `Get*` function to get magnetic field information. 22 | 23 | 24 | ## 2. Explanation of Algorithm 25 | 26 | ### 1. MainRoutine 27 | #### 1. Overview 28 | - The `MainRoutine` function converts the magnetic field coordinate from the body to the component and adds noises using the feature of the `Sensor` class. 29 | 30 | #### 2. Inputs and Outputs 31 | - NA 32 | 33 | #### 3. Algorithm 34 | - NA 35 | 36 | 37 | ## 3. Results of verifications 38 | - The output result obtained by the default initial settings. 39 | - The figure is generated by the Python script. 40 | 41 | ![](./figs/magnetometer_output.png) 42 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_magnetorquer.md: -------------------------------------------------------------------------------- 1 | # Specification for Magnetorquer class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `Magnetorquer` class simulates a magnetorquer. 6 | - The `Magnetorquer` class generates torque caused by the magnetorquer. 7 | 8 | ### 2. files 9 | - `magnetorquer.cpp, magnetorquer.hpp`: Definitions and declarations of the class 10 | - `magnetorquer.ini`: Initialization file 11 | - `plot_magnetorquer.py`: An example of a Python script to plot magnetorquer output 12 | 13 | ### 3. how to use 14 | - Set the parameters in `magnetorquer.ini`. 15 | - `quaternion_b2c`: Frame conversion quaternion from body to component frame. 16 | - `scale_factor_c`: Scale factor from ordered value to generated value 17 | - `max_output_magnetic_moment_c_Am2`: Maximum output of magnetorquer 18 | - `min_output_magnetic_moment_c_Am2`: Minimum output of magnetorquer 19 | - `constant_bias_noise_c_Am2`: Constant bias noise 20 | - `random_walk_standard_deviation_c_Am2`: Standard deviation of random walk noise for MTQ output 21 | - `random_walk_limit_c_Am2`: Limit of random walk noise for MTQ output 22 | - `white_noise_standard_deviation_c_Am2`: Standard deviation of white noise for MTQ output 23 | - Other parameters 24 | - Parameters for the `Component` class 25 | - Parameters for the `PowerPort` class 26 | - Create an instance by using the initialization function `InitMagnetorquer` 27 | - Use the `SetOutputMagneticMoment*` function to set the ordered magnetic moment. 28 | 29 | 30 | ## 2. Explanation of Algorithm 31 | 32 | ### 1. MainRoutine 33 | #### 1. Overview 34 | - The `MainRoutine` function adds output noise to the ordered magnetic moment and calculates generated torque by the interaction between the output magnetic moment and the magnetic field. 35 | 36 | #### 2. Inputs and Outputs 37 | - NA 38 | 39 | #### 3. Algorithm 40 | - NA 41 | 42 | 43 | ## 3. Results of verifications 44 | - The output result obtained by the default initial settings. 45 | - The figure is generated by the Python script. 46 | 47 | ![](./figs/magnetorquer_output.png) 48 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_mtq_magnetometer_interference.md: -------------------------------------------------------------------------------- 1 | # Specification for MtqMagnetometerInterference class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `MtqMagnetometerInterference` class simulates an interference phenomenon between magnetorquers (MTQs) and magnetometers. 6 | - The `MtqMagnetometerInterference` class adds bias noise to magnetometers when MTQs are turned on. 7 | 8 | ### 2. files 9 | - `mtq_magnetometer_interference.cpp, mtq_magnetometer_interference.hpp`: Definitions and declarations of the class 10 | - `component_interference.ini`: Initialization file 11 | 12 | ### 3. how to use 13 | - Set the parameters in `magnetometer.ini`. 14 | - `polynomial_degree`: Degree of polynomial 15 | - `additional_bias_by_mtq_coefficients_*`: Coefficients of the polynomial 16 | - Create an instance of the `MtqMagnetometerInterference` class. 17 | - Execute the `UpdateInterference` function in the `ComponentInterference` function of the `InstalledComponents` class. 18 | 19 | 20 | ## 2. Explanation of Algorithm 21 | 22 | ### 1. MainRoutine 23 | #### 1. Overview 24 | - TBW 25 | 26 | #### 2. Inputs and Outputs 27 | - TBW 28 | 29 | #### 3. Algorithm 30 | - TBW 31 | 32 | 33 | ## 3. Results of verifications 34 | - A result of the interference between MTQ and magnetometer. 35 | 36 | ![](./figs/result_mtq_magnetometer_interference.png) 37 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_reaction_wheel.md: -------------------------------------------------------------------------------- 1 | # Specification for ReactionWheel class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `ReactionWheel` class simulates a reaction wheel. 6 | - The `ReactionWheel` class generates torque caused by the reaction wheel. 7 | 8 | ### 2. files 9 | - `reaction_wheel.cpp, reaction_wheel.hpp`: Definitions and declarations of the class 10 | - `reaction_wheel_ode.cpp, reaction_wheel_ode.hpp`: Ordinary differential equation for RW emulation 11 | - `reaction_wheel.ini`: Initialization file 12 | - `plot_reaction_wheel.py`: An example of a Python script to plot reaction_wheel output 13 | 14 | ### 3. how to use 15 | - Set the parameters in `reaction_wheel.ini`. 16 | - `moment_of_inertia_kgm2`: Moment of inertia of the rotor 17 | - `max_output_torque_Nm`: Maximum output torque 18 | - `max_angular_velocity_rpm`: Maximum angular velocity 19 | - Direction parameters 20 | - `direction_determination_mode`: Mode of direction definition 21 | - `quaternion_b2c`: Quaternion body to component (used in RW jitter) 22 | - `direction_b`: Rotation direction 23 | - `position_b_m`: Position of the wheel 24 | - `dead_time_s`: Dead time 25 | - `time_constant_s`: Time constant of the first-order control lag 26 | - Friction parameters 27 | - `friction_order`: Order of friction acceleration 28 | - `friction_coefficients`: Coefficients of friction acceleration 29 | - `stop_limit_angular_velocity_rad_s`: Stop limit angular velocity 30 | - `initial_motor_drive_flag`: Initial motor drive flag 31 | - `initial_angular_velocity_rad_s`: Initial angular velocity 32 | - Other parameters 33 | - Parameters for the `Component` class 34 | - Parameters for the `PowerPort` class 35 | - Parameters for the `RwJitter` class 36 | - Create an instance by using the initialization function `InitReactionWheel` 37 | - Use the `SetDriveFlag`, `SetVelocityLimit_rpm`, and `SetTargetTorque_*` to drive the reaction wheel. 38 | - Use the `GetAngularVelocity_*` to get angular velocity information. 39 | 40 | 41 | ## 2. Explanation of Algorithm 42 | 43 | ### 1. MainRoutine 44 | #### 1. Overview 45 | - The `MainRoutine` function calculates the generating torque including control lag and friction. 46 | 47 | #### 2. Inputs and Outputs 48 | - TBW 49 | 50 | #### 3. Algorithm 51 | - TBW 52 | 53 | 54 | ## 3. Results of verifications 55 | - Case 1 56 | - Parameters: Default 57 | - Command: +20 rad/s2 -> -20 rad/s2 -> drive_flag = false. 58 | 59 | ![](./figs/reaction_wheel_output_case1.png) 60 | 61 | - Case 2 62 | - Parameters: time_constant = 0, friction_coefficients = 1.0 63 | - Command: +20 rad/s2 -> -20 rad/s2 -> drive_flag = false. 64 | 65 | ![](./figs/reaction_wheel_output_case2.png) 66 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_sun_sensor.md: -------------------------------------------------------------------------------- 1 | # Specification for SunSensor class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `SunSensor` class simulates a sun sensor. 6 | - The `SunSensor` class calculates and returns the observed sun vector with noise. 7 | 8 | ### 2. files 9 | - `sun_sensor.cpp, sun_sensor.hpp`: Definitions and declarations of the class 10 | - `sun_sensor.ini`: Initialization file 11 | - `plot_sun_sensor.py`: An example of a Python script to plot sun sensor output 12 | 13 | ### 3. how to use 14 | - Set the parameters in `sun_sensor.ini`. 15 | - `quaternion_b2c`: Frame conversion quaternion from body to component frame. 16 | - `field_of_view_deg`: Field of view of the sun sensor 17 | - `white_noise_standard_deviation_deg`: White noise standard deviation 18 | - `bias_standard_deviation_deg`: Bias noise standard deviation 19 | - `intensity_lower_threshold_percent`: Lower threshold of intensity to generate observation result 20 | 21 | - Other parameters 22 | - Parameters for the `Component` class 23 | - Parameters for the `PowerPort` class 24 | - Create an instance by using the initialization function `InitSunSensor` 25 | - Use the `Get*` function to get angular velocity information. 26 | 27 | 28 | ## 2. Explanation of Algorithm 29 | 30 | ### 1. MainRoutine 31 | #### 1. Overview 32 | - The sun direction vector is converted to the component frame. 33 | - Judge the sun is inside the field of view of the sun sensor. 34 | - Add observation noises. 35 | 36 | #### 2. Inputs and Outputs 37 | - NA 38 | 39 | #### 3. Algorithm 40 | - NA 41 | 42 | 43 | ## 3. Results of verifications 44 | - The output result obtained by the default initial settings. 45 | - The figure is generated by the Python script. 46 | 47 | ![](./figs/sun_sensor_output.png) 48 | -------------------------------------------------------------------------------- /Specifications/Component/AOCS/spec_torque_generator.md: -------------------------------------------------------------------------------- 1 | # Specification for TorqueGenerator class 2 | 3 | ## 1. Overview 4 | ### 1. functions 5 | - The `TorqueGenerator` class simulates an ideal torque generator. 6 | 7 | ### 2. files 8 | - `torque_generator.cpp, torque_generator.hpp`: Definitions and declarations of the class 9 | - `torque_generator.ini`: Initialization file 10 | - `plot_torque_generator.py`: An example of a Python script to plot torque_generator output 11 | 12 | ### 3. how to use 13 | - Set the parameters in `torque_generator.ini`. 14 | - `torque_magnitude_standard_deviation_Nm`: Standard deviation of torque magnitude 15 | - `torque_direction_standard_deviation_deg`: Standard deviation of torque direction 16 | - Other parameters 17 | - Parameters for the `Component` class 18 | - Create an instance by using the initialization function `InitTorqueGenerator` 19 | - Use the `SetTorque*` function to set the ordered torque. 20 | 21 | 22 | ## 2. Explanation of Algorithm 23 | 24 | ### 1. MainRoutine 25 | #### 1. Overview 26 | - The `MainRoutine` function adds output noise to the ordered torque and calculates generated torque. 27 | 28 | #### 2. Inputs and Outputs 29 | - NA 30 | 31 | #### 3. Algorithm 32 | - NA 33 | 34 | 35 | ## 3. Results of verifications 36 | - The output result obtained by the default initial settings. 37 | - The figure is generated by the Python script. 38 | 39 | ![](./figs/torque_generator_output.png) 40 | -------------------------------------------------------------------------------- /Specifications/Component/Abstract/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Abstract/.gitkeep -------------------------------------------------------------------------------- /Specifications/Component/Abstract/Spec_ComponentBase.md: -------------------------------------------------------------------------------- 1 | # Specification of Component class 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - The `Component` class is an abstract class to handle the electrical power and the update timing of components. 6 | - This class has two virtual functions: `MainRoutine` and `FastUpdate`. Both are called periodically. Users can select the functions according to the required calling period. 7 | + The `MainRoutine` function is the components' main function. Most of the processing is handled in this function. 8 | + The `FastUpdate` function handles the processes that need to be computed in a high-speed cycle. So, users will use this function only when high-frequency disturbances need to be calculated (e.g., RW jitter). 9 | 10 | ### 2. Related Files 11 | - Main file: `component.hpp`, `component.cpp` 12 | 13 | ### 3. How to use 14 | - Inherit this class by the user's component class. 15 | - The `ReactionWheel` in `S2E_CORE` is useful as a usage example of the `FastUpdate`. 16 | 17 | ## 2. Explanation of Algorithm 18 | ### 1. Constructor 19 | #### 1. overview 20 | - Users can set component update `prescaler` and power port. 21 | 22 | #### 2. inputs 23 | - `prescaler` 24 | + `prescaler` determines the execution cycle of the `MainRoutine` function. 25 | + The period of `MainRoutine` equals to `SimTime::compo_update_interval_sec` $\times$ `prescaler`. 26 | - `clock_gen` 27 | + `clock_gen` is an instance that simulates the clock of a component. 28 | + Users do not need to care about this. 29 | - `power_port` 30 | + `power_port` is an instance that simulates the power supply 31 | - `fast_prescaler` 32 | + `fast_prescaler` determines the execution cycle of the `FastUpdate` function. 33 | + The period of `FastUpdate` equals to `SimTime::compo_update_interval_sec` $\times$ `fast_prescaler`. 34 | + If you don't need to use `FastUpdate`, you don't need to specify this (it is set to 1 by default). 35 | 36 | #### 3. algorithm 37 | - N/A 38 | 39 | #### 4. note 40 | - N/A 41 | 42 | ### 2. `MainRoutine` 43 | #### 1. overview 44 | - Components' main function 45 | 46 | #### 2. inputs 47 | - `time_count` 48 | + `time_count` is incremented each time the `Tick` function is called. 49 | + Users can use this timing information when they need for their components. 50 | 51 | #### 3. algorithm 52 | - N/A 53 | 54 | #### 4. note 55 | - All the components have to override the `MainRoutine` function. 56 | 57 | ### 3. `FastUpdate` 58 | #### 1. overview 59 | - This function handles the processes that need to be computed in a high-speed cycle. 60 | 61 | #### 2. inputs 62 | - N/A 63 | 64 | #### 3. algorithm 65 | - N/A 66 | 67 | #### 4. note 68 | - `FastUpdate` function is not a pure virtual function, so components without fast calculation do not need to override this function. 69 | - As explained in the `FastTick` section, `ITickable::needs_fast_update_` flag must be true to call `FastUpdate`. So, if users want to use `FastUpdate`, call `ITickable::SetNeedsFastUpdate(true)` in the constructor of each component. 70 | 71 | ### 4. `Tick` 72 | #### 1. overview 73 | - This function executes `MainRoutine`. 74 | - `ClockGenerator` class calls this function. 75 | 76 | #### 2. inputs 77 | - `count` 78 | + `count` is incremented each time the `Tick` function is called. 79 | 80 | #### 3. algorithm 81 | - Execute `MainRoutine` when the `count` is divisible by the `prescaler`. By this mechanism, the execution period of `MainRoutine` is divided. 82 | 83 | #### 4. note 84 | - N/A 85 | 86 | ### 5. `FastTick` 87 | #### 1. overview 88 | - This function executes `FastUpdate`. 89 | - `ClockGenerator` class calls this function. 90 | 91 | #### 2. inputs 92 | - `count` 93 | + `count` is incremented each time the `FastTick` function is called. 94 | 95 | #### 3. algorithm 96 | - Execute `FastUpdate` when the `count` is divisible by the `fast_prescaler`. By this mechanism, the execution period of `FastUpdate` is divided. 97 | 98 | #### 4. note 99 | - `ITickable::needs_fast_update_` flag must be true to call `FastUpdate`. So, if you want to use `FastUpdate`, call `ITickable::SetNeedsFastUpdate(true)` in the constructor of each component. 100 | 101 | ## 3. Results of verifications 102 | - N/A 103 | 104 | ## 4. References 105 | - N/A 106 | -------------------------------------------------------------------------------- /Specifications/Component/Abstract/Spec_ObcCommunicationBase.md: -------------------------------------------------------------------------------- 1 | # Specification of UartCommunicationWithObc class 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - The `UartCommunicationWithObc` class is an abstract class to communicate with `OnBoardComputer`. 6 | - Component classes can use this abstract class to emulate telemetry/command communication with an `OnBoardComputer`. 7 | - This class also supports communication with `C2A` in the `ObcWithC2a` class. 8 | 9 | ### 2. Related files 10 | - on_board_computer.cpp, hpp 11 | - example_serial_communication_with_obc.cpp, hpp 12 | - Users can find an example of using this class. 13 | 14 | ### 3. How to use 15 | - Inherit this class by component class. 16 | - Users need to set `sils_port_id` and target `OnBoardComputer` for the communication. 17 | - This class has the following protected functions for telemetry/command communication. Users can call these functions in the `MainRoutine` of the component. 18 | ```cpp 19 | int ReceiveCommand(const int offset, const int rec_size); 20 | int SendTelemetry(const int offset); 21 | ``` 22 | - In the protected functions, the following pure virtual functions are called. Users need to define the functions in the subclass. 23 | ```cpp 24 | virtual int ParseCommand(const int cmd_size)=0; 25 | virtual int GenerateTelemetry()=0; 26 | ``` 27 | 28 | ## 2. Explanation of Algorithm 29 | ### 1. Constructors 30 | #### 1. overview 31 | - In the constructors, the communication port for the `OnBoardComputer` is connected. 32 | - If another component already connects the port, the connection function returns an error, and the constructors output a message. 33 | 34 | #### 2. inputs and outputs 35 | - Both constructors require `sils_port_id` and target `OnBoardComputer`. 36 | - Users can set the communication data buffer size. When users do not put the size, the value is automatically set as the maximum value. 37 | - The maximum value is 1024, and it is defined in `uart_port.hpp` 38 | 39 | #### 3. algorithm 40 | - N/A 41 | 42 | #### 4. note 43 | - N/A 44 | 45 | ### 2. Destructor 46 | #### 1. overview 47 | - In the destructor, the communication port is closed. 48 | - If another component has closed the port, the close function returns an error, and the constructors output a message. 49 | 50 | #### 2. inputs and outputs 51 | - N/A 52 | 53 | #### 3. algorithm 54 | - N/A 55 | 56 | #### 4. note 57 | - N/A 58 | 59 | ### 3. ReceiveCommand 60 | #### 1. overview 61 | - Receive command data sent from the OBC. 62 | 63 | #### 2. inputs and outputs 64 | - input 65 | - offset: offset value of the rx_buffer [Byte] 66 | - rec_size: receiving data size = length of the command [Byte] 67 | - output 68 | - return: Error code. (<=0: Error was happened) 69 | 70 | #### 3. algorithm 71 | - N/A 72 | 73 | #### 4. note 74 | - N/A 75 | 76 | ### 4. SendTelemetry 77 | #### 1. overview 78 | - Send telemetry data to the OBC. 79 | 80 | #### 2. inputs and outputs 81 | - input 82 | - offset: offset value of the tx_buffer [Byte] 83 | - output 84 | - return: Error code. 0: fine, <0: Error. 85 | 86 | #### 3. algorithm 87 | - N/A 88 | 89 | #### 4. note 90 | - N/A 91 | 92 | ### 5. ParseCommand 93 | #### 1. overview 94 | - Users need to define this function to analyze the command. 95 | 96 | #### 2. inputs and outputs 97 | - input 98 | - cmd_size: command side [Byte] 99 | - output 100 | - return: Error code. (<=0: Error was happened) 101 | 102 | #### 3. algorithm 103 | - N/A 104 | #### 4. note 105 | - N/A 106 | 107 | ### 6. GenerateTelemetry 108 | #### 1. overview 109 | - Users need to define this function to make telemetry. 110 | 111 | #### 2. inputs and outputs 112 | - input: N/A 113 | - output 114 | - return: send data size [Byte] 115 | 116 | #### 3. algorithm 117 | - N/A 118 | 119 | #### 4. note 120 | - N/A 121 | 122 | ## 3. Results of verifications 123 | - N/A 124 | 125 | ## 4. References 126 | - N/A 127 | -------------------------------------------------------------------------------- /Specifications/Component/Abstract/Spec_SensorBase.md: -------------------------------------------------------------------------------- 1 | # Specification of Sensor class 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - The `Sensor` class is a base class to provide common features for sensors. 6 | - This class adds the following noises and output limits. 7 | - Constant offset noise 8 | - Normal random noise 9 | - Random Walk noise 10 | - Scale factor noise and cross-talk between axes 11 | 12 | ### 2. Related files 13 | - Main file: `sensor_base.cpp, .hpp` 14 | - Used Libraries: `vector.hpp`, `matrix.hpp`, `normal_randomization.hpp`, `random_walk.hpp` 15 | 16 | ### 3. How to use 17 | - Inherit this class by your sensor class. 18 | - The `GyroSensor` and `Magnetometer` in `S2E_CORE` are useful as usage examples. 19 | 20 | ## 2. Explanation of Algorithm 21 | ### 1. Constructor 22 | #### 1. overview 23 | - Users can set sensor noise parameters by using the Constructor. 24 | 25 | #### 2. inputs 26 | - `scale_factor`: Scale factor matrix to express scale factor noise and cross-talk 27 | - Range related parameters 28 | - `range_to_const_c`: The output value cannot over this value 29 | - `range_to_zero_c`: The output is set as zero when the true value is larger than this value. 30 | - This feature is optional. If you don't want to use the value, please set this huge value. 31 | - `range_to_zero_c` should be larger than `range_to_const_c`. 32 | - `bias_noise_c`: Constant offset noise 33 | - `normal_random_standard_deviation_c`: Standard deviation for normal random noise 34 | - Random Walk noise parameters 35 | - `random_walk_step_width_s`: Step width for Random Walk propagation (unit: sec) 36 | - It should be the same as the update frequency of the sensor. 37 | - `random_walk_standard_deviation_c`: Standard deviation for Random Walk 38 | - `random_walk_limit_c`: Soft limit of Random Walk 39 | - **Note**: The number of elements for all parameters can be set by using the `template` feature. 40 | - **Note**: All parameters are defined in the component frame. 41 | - **Note**: Normally, the unit of the parameters is the same as the unit of true value. Users also can change the unit by using the scale factor matrix. 42 | 43 | #### 3. algorithm 44 | - The values of the `range_to_const_c` and `range_to_zero_c` are checked here with the `RangeCheck` function. 45 | 46 | #### 4. note 47 | - N/A 48 | 49 | ### 2. Measure 50 | #### 1. overview 51 | - This function adds all noises, and the output is clipped by the `Clip` function not to over the ranges. 52 | 53 | #### 2. inputs and outputs 54 | - input: True value on the component frame 55 | - output: Measured value on the component frame 56 | 57 | #### 3. algorithm 58 | - N/A 59 | 60 | #### 4. note 61 | - N/A 62 | 63 | ## 3. Results of verifications 64 | - We verified the `Sensor` class with the following parameters. 65 | - Default parameters 66 | - `scale_factor` = Unit matrix 67 | - `range_to_const_c` = 5 68 | - `range_to_zero_c` = 10 69 | - `bias_noise_c` = 0.0 70 | - `normal_random_standard_deviation_c` = 0.0 71 | - `random_walk_step_width_s`= 0.1 sec 72 | - `random_walk_standard_deviation_c` = 0.0 73 | - `random_walk_limit_c` = 0.0 74 | - input value: 0.0 75 | - Case 1: `bias_noise_c` = 1.0, others = default 76 | - The bottom figure shows the result of the output data. 77 | - We verified the constant offset noise calculation is correct according to the data. 78 |
79 |
80 | 81 |
Result of constant offset noise (bias_noise_c = 1.0).
82 |
83 |
84 | 85 | - Case 2: `normal_random_standard_deviation_c` = 1.0, others = default 86 | - The simulation time is 1000sec, and the log output period is 0.1sec. 87 | - The bottom figure shows the result of the output data. 88 | - The calculated average and standard deviation from the output data are shown as follows. 89 | - `Average = 0.012` 90 | - `Standard Deviation = 1.000` 91 | - We verified the normal random noise calculation is correct according to the data. 92 |
93 |
94 | 95 |
Result of normal random noise (normal_random_standard_deviation_c = 1.0).
96 |
97 |
98 | 99 | - Case 3: `random_walk_standard_deviation_c` = 0.3, `random_walk_limit_c` = 0.05, others = default 100 | - The simulation time is 200sec, and the log output period is 0.5sec. 101 | - The bottom figure shows the result of the output data. 102 | - The output data randomly varies inside the limit value. 103 | - **Note**: The limit is not hard. 104 | - We verified the normal random noise calculation is correct according to the data. 105 |
106 |
107 | 108 |
Result of Random Walk noise (random_walk_standard_deviation_c = 0.3, random_walk_limit_c = 0.05).
109 |
110 |
111 | 112 | ## 4. References 113 | - N/A 114 | -------------------------------------------------------------------------------- /Specifications/Component/Abstract/figs/bias_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Abstract/figs/bias_1.png -------------------------------------------------------------------------------- /Specifications/Component/Abstract/figs/normal_random_noise_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Abstract/figs/normal_random_noise_1.png -------------------------------------------------------------------------------- /Specifications/Component/Abstract/figs/random_walk_03_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Abstract/figs/random_walk_03_005.png -------------------------------------------------------------------------------- /Specifications/Component/CDH/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/CDH/.gitkeep -------------------------------------------------------------------------------- /Specifications/Component/Logic/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Logic/.gitkeep -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/angle_celes1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/angle_celes1.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/angle_celes2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/angle_celes2.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/coordinate.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/coordinate.JPG -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/earth_pos_b1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/earth_pos_b1.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/earth_pos_b2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/earth_pos_b2.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/forbidden_angle1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/forbidden_angle1.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/forbidden_angle2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/forbidden_angle2.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/moon_pos_b1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/moon_pos_b1.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/observe_stars1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/observe_stars1.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/observe_stars2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/observe_stars2.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/track_earth1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/track_earth1.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/track_earth2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/track_earth2.jpg -------------------------------------------------------------------------------- /Specifications/Component/Mission/figs/track_moon1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Mission/figs/track_moon1.jpg -------------------------------------------------------------------------------- /Specifications/Component/Power/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Power/.gitkeep -------------------------------------------------------------------------------- /Specifications/Component/Power/Spec_PCU.md: -------------------------------------------------------------------------------- 1 | # Specification of PowerControlUnit class 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - `PowerControlUnit` class is a base class of power control units and manages multiple `PowerPorts`. 6 | 7 | ### 2. Related files 8 | - Main file: `power_control_unit.cpp, .hpp` 9 | - Related file: `power_port.cpp, .hpp` 10 | 11 | ### 3. How to use 12 | - **Example**: The `sample_components` in the `s2e-core/simulation_sample/spacecraft` is useful to know how to use this class. 13 | - Users can make their original `PowerControlUnit` class by inheriting this base class. 14 | - Users need to override the `MainRoutine`, `GetLogHeader`, and `GetLogValue` functions to define the behavior of their PCUs. 15 | 16 | ## 2. Explanation of Algorithm 17 | ### 1. ConnectPort 18 | #### 1. overview 19 | - This function makes a new `PowerPort`. 20 | 21 | #### 2. inputs and outputs 22 | - Inputs: the port ID and the arguments for `PowerPort` 23 | - Outputs: the error code (0 is a success, -1 is an error) 24 | 25 | #### 3. algorithm 26 | - Make a new `PowerPort` when the port ID is not used. 27 | 28 | #### 4. note: N/A 29 | 30 | ### 2. ClosePort 31 | #### 1. overview 32 | - This function deletes the designated `PowerPort`. 33 | 34 | #### 2. inputs and outputs 35 | - Inputs: the port ID. 36 | - Outputs: the error code (0 is a success, -1 is an error). 37 | 38 | #### 3. algorithm 39 | - Delete the designated `PowerPort` when the port still exists. 40 | 41 | #### 4. note: N/A 42 | 43 | ## 3. Results of verifications 44 | N/A 45 | 46 | ## 4. References 47 | N/A 48 | -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/.gitkeep -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_force1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_force1.png -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_force2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_force2.png -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_force3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_force3.png -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_force4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_force4.png -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_torque1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_torque1.png -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_torque2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_torque2.png -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_torque3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_torque3.png -------------------------------------------------------------------------------- /Specifications/Component/Propulsion/figs/thrust_torque4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Propulsion/figs/thrust_torque4.png -------------------------------------------------------------------------------- /Specifications/Component/Thermal/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Component/Thermal/.gitkeep -------------------------------------------------------------------------------- /Specifications/Disturbance/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/.gitkeep -------------------------------------------------------------------------------- /Specifications/Disturbance/Spec_Disturbance.md: -------------------------------------------------------------------------------- 1 | # Specification of Disturbance class 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - `Disturbance` is a base class for all disturbance classes. 7 | 8 | ### 2. Related files 9 | - `src/disturbances/disturbance.hpp` 10 | 11 | ### 3. How to use 12 | - When you want to make a new disturbance class, you need to inherit this. 13 | - Users need to define the `Update` function according to the target disturbance calculation. And update the members `force_b_N_`, `torque_b_Nm_`, `acceleration_b_m_s2_`, and/or `acceleration_i_m_s2_` in the function. 14 | - If the disturbance does not depend on the spacecraft attitude, please set `is_attitude_dependent_ = false` to avoid unnecessary disturbance update. 15 | 16 | 17 | ## 2. Explanation of Algorithm 18 | 19 | No algorithm. 20 | 21 | ## 4. References 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Specifications/Disturbance/Spec_Disturbances.md: -------------------------------------------------------------------------------- 1 | # Specification of Disturbances class 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - This class integrates all disturbances calculation. 7 | - All disturbances are initialized in this class. 8 | - Their update calculations are called in this class. 9 | 10 | ### 2. Related files 11 | - `src/disturbances/disturbances.hpp` 12 | - `src/disturbances/disturbances.cpp` 13 | 14 | ### 3. How to use 15 | - When you make a new disturbance class, you need to register the new disturbance class in the `InitializeInstances` function. 16 | - If you register your disturbance class correctly, the update function is automatically updated in the `Disturbances::Update` class, and the disturbance force and/or torque is added for dynamics propagation. 17 | 18 | 19 | ## 2. Explanation of Algorithm 20 | ### 1. `Update` function 21 | #### 1. overview 22 | - This function calls the `Disturbance::Update` functions defined by each disturbance class. 23 | - Generally, orbital disturbances depend on spacecraft position. Some disturbances depend on spacecraft attitude with respect to the disturbance sources. Therefore, there are two update timing in this function. 24 | - When the spacecraft position is updated, all disturbances are updated. 25 | - When the spacecraft attitude is updated, disturbances which depend on attitude are updated. 26 | 27 | ### 1. `InitializeInstances` function 28 | #### 1. overview 29 | - The instances of all disturbance classes are made and registered to the disturbance list in this function. 30 | - The Earth only disturbances are registered when the selected center object is the Earth. 31 | 32 | ## 4. References 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Specifications/Disturbance/Spec_GravityGradient.md: -------------------------------------------------------------------------------- 1 | # Specification for Gravity Gradient Torque 2 | 3 | ## 1. Overview 4 | 5 | ### 1. functions 6 | - This class calculates the gravity gradient torque in the `Disturbances` class. 7 | 8 | ### 2. related files 9 | - `gravity_gradient.cpp`, `gravity_gradient.hpp` : Definitions and declarations of the class 10 | - `disturbance.ini` : Initialization file 11 | 12 | ### 3. how to use 13 | - Make an instance of the `GravityGradient` class in `InitializeInstances` function in `disturbances.cpp` 14 | - Create an instance by using the initialization function `InitGravityGradient` 15 | - Set the parameters in the `disturbance.ini` 16 | - Select `ENABLE` for `calculation` and `logging` 17 | 18 | 19 | ## 2. Explanation of Algorithm 20 | ### 1. ` CalcTorque_b_Nm` function 21 | #### 1. overview 22 | This function performs disturbance calculation and torque output simultaneously. 23 | 24 | #### 2. algorithm 25 | Gravity gradient torque is calculated by the following equations (1). 26 | ```math 27 | \boldsymbol{T}_{GG} = \cfrac{3 \mu}{R_0^5} \boldsymbol{R}_0 \times (\boldsymbol{I}\cdot \boldsymbol{R}_o) 28 | ``` 29 | 30 | where $\mu$ is the gravitational constant of the Earth in normal case, $R_0$ is the distance between the Earth center and the satellite, $\boldsymbol{R_0}$ is the vector from Earth center to the satellite, $\boldsymbol{I}$ is the inertia tensor of the satellite. 31 | Users can change the $\mu$ for other planet with the constructor. 32 | 33 | ## 3. Results of verifications 34 | 35 | ### 1. verification of gravity gradient torque 36 | #### 1. overview 37 | - Check that the gravity gradient torque equation is performed correctly 38 | 39 | #### 2. conditions for the verification 40 | - PropStepSec: 0.001 41 | - StepTimeSec: 0.1 42 | - EndTimeSec: 300 43 | - Inertia tensor: diag [0.17, 0.1, 0.25] 44 | - Initial Quaternion_i2b: [0,0,0,1] 45 | - Initial torque: [0,0,0] 46 | - Initial angular velocity: [0,0,0] 47 | - Disturbance torque: All Disable except gravity gradient torque 48 | 49 | #### 3. results 50 | - The order of the gg torque is $10^7$, which seems a proper value. 51 | 52 | ![](./figs/test_ggtorque.png) 53 | 54 | ## 4. References 55 | 56 | 1. 姿勢制御研究委員会, 人工衛星の力学と姿勢ハンドブック, 培風館, 2007. (written in Japanese) 57 | -------------------------------------------------------------------------------- /Specifications/Disturbance/Spec_MagneticDisturbance.md: -------------------------------------------------------------------------------- 1 | # Specification for Magnetic Disturbance Torque 2 | 3 | ## 1. Overview 4 | 5 | ### 1. functions 6 | - This class calculates the magnetic disturbance torque in the `Disturbances` class 7 | - This function receives the geomagnetic vector in the body-fixed coordinate system, calculates the cross product with the residual magnetic moment, and returns the residual magnetic torque in the body coordinate system. 8 | 9 | ### 2. related files 10 | - `magnetic_disturbance.cpp`, `magnetic_disturbance.hpp` : Definitions and declarations of the class 11 | - `disturbance.ini` : Initialization file 12 | 13 | ### 3. how to use 14 | - Make an instance of the `MagneticDisturbance` class in `InitializeInstances` function in `disturbances.cpp` 15 | - Create an instance by using the initialization function `InitMagneticDisturbance` 16 | - Set the parameters in the `disturbance.ini` 17 | - Select `ENABLE` for `calculation` and `logging` 18 | 19 | 20 | ## 2. Explanation of Algorithm 21 | 22 | ### 1. `CalcTorque_b_Nm` function 23 | #### 1. overview 24 | This function performs disturbance calculation and torque output simultaneously. 25 | 26 | #### 2. algorithm 27 | Magnetic disturbance torque is calculated by the following equation. 28 | ```math 29 | \boldsymbol{T}_{mag} = \boldsymbol{M} \times \boldsymbol{B} 30 | ``` 31 | 32 | where $\boldsymbol{M}$ is the residual magnetic moment [Am2] in the body-fixed frame, $\boldsymbol{B}$ is the magnetic field [nT] in the body-fixed frame. 33 | 34 | ### 2. `CalcRMM` function 35 | #### 1. overview 36 | This function calculates the residual magnetic moment(RMM) of the spacecraft. Usually, the RMM is varied by the power state of the components installed in the spacecraft, but this function emulates the variation of the RMM by a random walk process and normal random value. 37 | 38 | #### 2. inputs and outputs 39 | - implicit inputs 40 | - `ResidualMagneticMoment` which is the class to manage the following RMM parameters 41 | - Standard deviation of the random walk 42 | - Limit of the one-step of the random walk 43 | - Standard deviation of the white noise 44 | - outputs 45 | - (Vector<3>) RMM: the residual magnetic moment in the body-fixed frame [Am2] 46 | 47 | #### 3. algorithm 48 | The residual magnetic moment is calculated by the following equations. 49 | ```math 50 | \begin{align} 51 | \boldsymbol{M}(t_{k+1}) &= \boldsymbol{M}_0 + \boldsymbol{r}(t_{k+1}) + \boldsymbol{w}_1(t_{k+1}) \\ 52 | \boldsymbol{r}(t_{k+1}) &= \boldsymbol{r}(t_{k}) +\boldsymbol{w_2}(t_{k+1}) 53 | \end{align} 54 | ``` 55 | where $\boldsymbol{M}_0$ is the average residual magnetic moment in the body-fixed frame, $\boldsymbol{r}$ is the random walk of RMM, and $\boldsymbol{w}_i \sim N([0,0,0],\Sigma_i)$ is the white noise. 56 | 57 | ## 3. Results of verifications 58 | 59 | ### 1. verification of magnetic disturbance torque 60 | #### 1. overview 61 | - Check that the magnetic disturbance torque equation is performed correctly. 62 | 63 | #### 2. conditions for the verification 64 | - PropStepSec: 0.001 65 | - StepTimeSec: 0.1 66 | - EndTimeSec: 300 67 | - Inertia tensor: diag [0.17, 0.1, 0.25] 68 | - Initial Quaternion_i2b: [0,0,0,1] 69 | - Initial torque: [0,0,0] 70 | - Initial angular velocity: [0,0,0] 71 | - Disturbance torque: All Disable except magnetic disturbance torque. 72 | 73 | #### 3. results 74 | - RMM = [0.1,0,0]Am2 75 | - T = residual magnetic moment × magnetic field 76 | - The Y component of the earth's magnetic field corresponds to the Z component of the disturbance torque, and the Z component of the earth's magnetic field corresponds to the -Y component of the disturbance torque 77 | ![](./figs/test_rmm_magneticfield.png) 78 | ![](./figs/test_rmm_px.png) 79 | 80 | - RMM = [0.05,0.05,0.05]Am2 81 | - The order becomes $10^6$, which is a proper value. 82 | ![](./figs/test_rmm_pxyz.png) 83 | 84 | ### 2. verification of RMM 85 | #### 1. overview 86 | - Check that the RMM equation is performed correctly. 87 | 88 | #### 2. conditions for the verification 89 | - PropStepSec: 0.001 90 | - StepTimeSec: 0.1 91 | - EndTimeSec: 300 92 | - Inertia tensor: diag [0.17, 0.1, 0.25] 93 | - Initial Quaternion_i2b: [0,0,0,1] 94 | - Initial torque: [0,0,0] 95 | - Initial angular velocity: [0,0,0] 96 | - Disturbance torque: All Disable 97 | 98 | #### 3. results 99 | - [rmm_random_walk_speed_Am2, rmm_random_walk_limit_Am2, rmm_white_noise_standard_deviation_Am2] = [1E-5,0,0] 100 | - RMM random walk value is much smaller than 1E-5, because random walk limit is 0. 101 | 102 | ![](./figs/test_rmm_randomwalk.png) 103 | 104 | - [rmm_random_walk_speed_Am2, rmm_random_walk_limit_Am2, rmm_white_noise_standard_deviation_Am2] = [1E-5,1E-4,0] 105 | 106 | ![](./figs/test_rmm_randomwalk_2.png) 107 | 108 | - [rmm_random_walk_speed_Am2, rmm_random_walk_limit_Am2, rmm_white_noise_standard_deviation_Am2] = [0,0,1E-5] 109 | 110 | ![](./figs/test_rmm_whitenoise.png) 111 | 112 | ## 4. References 113 | 1. 姿勢制御研究委員会, 人工衛星の力学と姿勢ハンドブック, 培風館, 2007. (written in Japanese) 114 | -------------------------------------------------------------------------------- /Specifications/Disturbance/Spec_SurfaceForce.md: -------------------------------------------------------------------------------- 1 | # Surface Force 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - S2E handles air drag and Solar Radiation Pressure(SRP) as surface force disturbances since both disturbances affect spacecraft surfaces. The structure of both equations is identical, but they have different coefficients. 6 | - Thus, the `SurfaceForce` base class provides the structure of the equation, and `AirDrag` and `SolarRadiationPressureDisturbance` subclasses provide specific calculations with appropriate coefficients. 7 | - Currently, the `SurfaceForce` class supports multi-surface spacecraft without a self-shadowing effect. Users can select the number of surfaces. 8 | - For the detailed description of `AirDrag` and `SolarRadiationPressureDisturbance`, please refer [Air Drag](./Spec_SurfaceForce_AirDrag.md) and [Solar Radiation Pressure](./Spec_SurfaceForce_SolarRadiation.md). 9 | 10 | ### 2. Related files 11 | - `surface_force.cpp`, `surface_force.hpp` : The base class `SurfaceForce` is defined. 12 | 13 | ### 3. How to use 14 | - Make a subclass that inherits the `SurfaceForce` class. 15 | - Define the `CalcCoefficients` function in the subclass. 16 | - Execute `CalcTorqueForce` in the update function of the subclass. 17 | 18 | ## 2. Explanation of Algorithm 19 | ### 1. Constructor 20 | #### 1. overview 21 | - Initialize structure parameters 22 | 23 | #### 2. inputs and outputs 24 | - input 25 | - List of `Surface` class which manages surface area, position, and normal direction. 26 | - Position vector of the center of gravity in the body fixed frame [m]. 27 | - output 28 | - The instance of the class 29 | 30 | #### 3. algorithm: NA 31 | 32 | #### 4. note 33 | - The origin of all vectors defined here is the body-fixed frame. Users can define the origin of the body-fixed frame by themselves. If users want to define the origin as the center of gravity, they need to set `center_of_gravity_b_m = zero vector` in the `Structure.ini`. If users want to define the origin as a specific point, they need to carefully set all vectors to suit their definition. 34 | 35 | ### 2. `CalcTorqueForce` function 36 | #### 1. overview 37 | - This is the main function to calculate the force and torque generated by the surface force disturbances. 38 | 39 | #### 2. inputs and outputs 40 | - input 41 | - `input_direction_b`: direction of disturbance source at the body frame 42 | - `item`: parameter which decides the magnitude of the disturbances (Solar flux, air density) 43 | - Surface information defined in the constructor 44 | - output 45 | - `force_b_N_`: Force at the body frame (unit: N) 46 | - `torque_b_Nm_` : Torque at the body frame (unit: Nm) 47 | - Both variables are defined in the `SimpleDisturbance` base class 48 | 49 | #### 3. algorithm 50 | - Let us consider the following coordinate on a surface for surface force calculation 51 | - $\boldsymbol{n}$ is the normal vector of the surface 52 | - $\boldsymbol{v}$ is the direction vector of the disturbance source (e.g., sun direction vector or velocity vector) 53 | 54 | SummaryCalculationTime 55 | 56 | - $\boldsymbol{t}$ is the direction of in-plane force. 57 | 58 | ```math 59 | \boldsymbol{t}=\frac{\boldsymbol{v}\times\boldsymbol{n}}{|\boldsymbol{v}\times\boldsymbol{n}|}\times\boldsymbol{n} 60 | ``` 61 | 62 | - Surface force and torque acting on the surface is expressed as following equation 63 | - $\boldsymbol{r}_{s}$ is the position vector of the surface 64 | - $\boldsymbol{r}_{cg}$ is the position vector of the center of mass 65 | 66 | ```math 67 | \begin{align} 68 | \boldsymbol{F} &= -C_{n}\boldsymbol{n}+C_{t}\boldsymbol{t}\\ 69 | \boldsymbol{T} &= (\boldsymbol{r}_{s}-\boldsymbol{r}_{cg})\times\boldsymbol{F} 70 | \end{align} 71 | ``` 72 | 73 | - Detail of the $C_{n}$ and $C_{t}$ are defined by subclasses by using `CalcCoefficients` function 74 | 75 | #### 4. note 76 | - NA 77 | 78 | ## 3. Results of verifications 79 | - Verifications will be done by the subclasses. 80 | 81 | ## 4. References 82 | 1. NA 83 | -------------------------------------------------------------------------------- /Specifications/Disturbance/Spec_SurfaceForce_SolarRadiation.md: -------------------------------------------------------------------------------- 1 | # Surface Force: Solar Radiation Pressure disturbance 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - `SolarRadiationPressureDisturbance` class inherits `SurfaceForce` base class and calculates air drag disturbance force and torque. 7 | 8 | ### 2. Related files 9 | - `solar_radiation_pressure_disturbance.cpp`, `solar_radiation_pressure_disturbance.hpp` : The `SolarRadiationPressureDisturbance` class is defined. 10 | - `surface_force.cpp`, `surface_force.hpp` : The base class `SurfaceForce` is defined. 11 | - **Note**: `SurfaceForce` class inherits `SimpleDisturbance` class, and `SimpleDisturbance` class inherits `Disturbance` class. So, please refer them if users want to understand the structure deeply. 12 | - `disturbance.ini` : Initialization file 13 | 14 | ### 3. How to use 15 | - Make an instance of the `SolarRadiationPressureDisturbance` class in `InitializeInstances` function in `disturbances.cpp` 16 | - Create an instance by using the initialization function `InitSolarRadiationPressureDisturbance` 17 | - Set the parameters in the `disturbance.ini` 18 | - Select `ENABLE` for `calculation` and `logging` 19 | 20 | 21 | ## 2. Explanation of Algorithm 22 | 23 | ### 1. `CalcCoefficients` function 24 | #### 1. overview 25 | - `CalcCoefficients` calculates the normal and in-plane coefficients for `SurfaceForce` calculation. 26 | 27 | #### 2. inputs and outputs 28 | - inputs 29 | - $v_{s}$:Direction vector of the sun (spacecraft to the sun) at the body frame 30 | - $P$ Solar pressure at the position of the spacecraft [N/m^2] 31 | - setting parameters 32 | - $\nu$ : Total reflectance 33 | - $\nu = 1-\alpha$, where $\alpha$ is the absorption of the sun spectrum. 34 | - $\mu$ : Specularity. Ratio of specular reflection inside the total reflected light. 35 | - $A$ : Area of the surface 36 | - outputs 37 | - $C_{n}$ and $C_{t}$ 38 | 39 | #### 3. algorithm 40 | - $C_{n}$ and $C_{t}$ are calculated as follows: 41 | - $\theta$ is the angle between the normal vector and the sun vector. 42 | 43 | ```math 44 | \begin{align} 45 | C_{n} &= AP \left((1+\nu\mu)\cos^{2}{\theta}+\frac{2}{3}\nu(1-\mu)\cos{\theta} \right)\\ 46 | C_{t} &= AP(1-\nu\mu)\cos{\theta}\sin{\theta} 47 | \end{align} 48 | ``` 49 | 50 | #### 4. note 51 | - NA 52 | 53 | ## 3. Results of verifications 54 | 55 | ### 1. Verification of perfect reflection case 56 | #### 1. overview 57 | - In the perfect reflection case, the direction of the SRP force will be opposite from the direction of the sun. 58 | 59 | #### 2. conditions for the verification 60 | - We assumed that the structure of the spacecraft is a 50-cm cube whose optical property is the perfect specular reflection($\nu=\mu=1$). 61 | 62 | #### 3. results 63 | - We confirmed that the direction of the SRP force is opposite from the direction of the sun at the body frame. 64 | 65 | SummaryCalculationTime 66 | 67 | ## 4. References 68 | 69 | 1. NA -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/AccelerationDiffECEF_S2E_deg0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/AccelerationDiffECEF_S2E_deg0.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/AccelerationDiffECEF_S2E_deg360.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/AccelerationDiffECEF_S2E_deg360.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/AccelerationECEF_Matlab.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/AccelerationECEF_Matlab.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/AirDrag_result_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/AirDrag_result_1.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/PositionInECEF.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/PositionInECEF.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/SRP_result_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/SRP_result_1.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/SummaryAccuracy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/SummaryAccuracy.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/SummaryCalculationTime.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/SummaryCalculationTime.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/SurfaceForce_overview.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/SurfaceForce_overview.JPG -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_acc_moon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_acc_moon.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_acc_sun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_acc_sun.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_acc_sun_moon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_acc_sun_moon.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_general.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_general.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_result1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_result1.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_s2e_stk_moon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_s2e_stk_moon.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_s2e_stk_sun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_s2e_stk_sun.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/ThirdBodyGravity_s2e_stk_sun_moon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/ThirdBodyGravity_s2e_stk_sun_moon.jpg -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/test_ggtorque.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/test_ggtorque.png -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/test_rmm_magneticfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/test_rmm_magneticfield.png -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/test_rmm_px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/test_rmm_px.png -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/test_rmm_pxyz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/test_rmm_pxyz.png -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/test_rmm_randomwalk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/test_rmm_randomwalk.png -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/test_rmm_randomwalk_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/test_rmm_randomwalk_2.png -------------------------------------------------------------------------------- /Specifications/Disturbance/figs/test_rmm_whitenoise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Disturbance/figs/test_rmm_whitenoise.png -------------------------------------------------------------------------------- /Specifications/Dynamics/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/.gitkeep -------------------------------------------------------------------------------- /Specifications/Dynamics/Spec_Attitude.md: -------------------------------------------------------------------------------- 1 | # Specification for Attitude 2 | 3 | ## 1. Overview 4 | 5 | ### 1. functions 6 | - The `Attitude` class calculates the attitude and angular velocity of a satellite with the following propagation modes. 7 | - `RK4` : 4th order Runge-Kutta propagation with disturbances and actuators output torque. Users use this mode to consider attitude control algorithm. 8 | - `CONTROLLED` : Satellite attitude is perfectly controlled to the setting direction. This mode doesn't consider the disturbances and actuators output torque. Users use this mode when they focus on orbit dynamics or mission analysis. 9 | 10 | ### 2. files 11 | - `src/dynamics/attitude/attitude.hpp, .cpp` 12 | - Definition of `Attitude` base class 13 | - `src/dynamics/attitude/initialize_attitude.hpp, .cpp` 14 | - Make an instance of `Attitude` class. 15 | 16 | ### 3. How to use 17 | - Make an instance of the attitude class in `Initialize` function in `dynamics.cpp` 18 | - Usually, users don't care this process. 19 | - Select `propagate_mode` in the spacecraft's `ini` file. 20 | - `RK4` or `CONTROLLED` described above. 21 | - Select `initialize_mode` in the spacecraft's `ini` file. 22 | - When users select `propagate_mode = CONTROLLED`, `initialize_mode` is not used, and the attitude is initialized with `[CONTROLLED_ATTITUDE]` settings. 23 | - When users select `propagate_mode = RK4`, `initialize_mode` is used. 24 | - `initialize_mode = MANUAL` 25 | - Initial attitude is defined by `initial_quaternion_i2b` and `initial_angular_velocity_b_rad_s`. 26 | - `initialize_mode = CONTROLLED` 27 | - Initial attitude is defined by `[CONTROLLED_ATTITUDE]` settings. By using this mode, users can easily choose the required initial quaternion without complicated calculation. 28 | 29 | ## 2. Explanation of Algorithm 30 | In the `Attitude` base class provides the following common functions for every propagator. 31 | 32 | - Getter functions 33 | - The base class has several getter functions for the member variables. 34 | 35 | - `CalcAngularMomentum` 36 | - This function calculates angular momentum of spacecraft including internal actuators such as reaction wheels. 37 | 38 | ## 3. Results of verifications 39 | - The verification results are described in the document of each propagation method. 40 | 41 | ## 4. References 42 | NA 43 | 44 | -------------------------------------------------------------------------------- /Specifications/Dynamics/Spec_Orbit.md: -------------------------------------------------------------------------------- 1 | # Specification for Orbit 2 | 3 | ## 1. Overview 4 | 5 | ### 1. functions 6 | - The `Orbit` class calculates the position and velocity of satellites with the following propagation mode. 7 | - `KEPLER` : Kepler orbit propagation without disturbances and thruster maneuver 8 | - `SGP4` : SGP4 propagation using TLE without thruster maneuver 9 | - `RK4` : RK4 propagation with disturbances and thruster maneuver 10 | - `ENCKE` : Encke's orbit propagation with disturbances and thruster maneuver 11 | - `RELATIVE` : Relative dynamics (for formation flying simulation) 12 | - The `KEPLER` mode is the simplest and general for all users. 13 | - The `SGP4` mode is useful for LEO satellites users without orbit control. 14 | - When users need to analyze the orbit disturbance force effect or the orbit control algorithm, the users should choose `RK4` or `ENCKE` mode. 15 | - For multiple satellite operation, `RELATIVE` mode is useful.` 16 | 17 | ### 2. files 18 | - `src/dynamics/orbit/orbit.hpp, cpp` 19 | - Definition of `Orbit` base class 20 | - `src/dynamics/orbit/initialize_orbit.hpp, .cpp` 21 | - Make an instance of orbit class. 22 | 23 | ### 3. How to use 24 | - Make an instance of the orbit class in `Initialize` function in `dynamics.cpp` 25 | - Select `propagate_mode` in the spacecraft's ini file(eg. `sample_spacecraft.ini`). 26 | - Select `initialize_mode` in the spacecraft's ini file(eg. `sample_spacecraft.ini`). 27 | - This setting works only for `RK4`, `KEPLER`, and `ENCKE` mode. 28 | - Set the orbit information in the ini file 29 | - You can see the details in the documents for each orbit propagation mode. 30 | - The definition of the coordinate system is decided at `[CELESTIAL_INFORMATION]` section in `sample_simulation_base.ini`. 31 | 32 | ## 2. Explanation of Algorithm 33 | In the Orbit base class provides the following common functions for every propagator. 34 | 35 | ### 1. `UpdateByAttitude` function 36 | - The `UpdateByAttitude` function simply converts the velocity vector of the spacecraft (in ECI coordinate system) to body coordinate system notation using the argument: `quaternion_i2b`. 37 | 38 | ### 2. `SetAcceleration_i_m_s2`, `AddAcceleration_i_m_s2`, `AddForce_i_N`, `AddForce_b_N` function 39 | - These functions provides the interface to include orbital disturbance or control forces. 40 | 41 | ### 2. `TransformEcefToGeodetic` function 42 | - The `TransformEcefToGeodetic` function calculates latitude[rad], longitude[rad], and altitude[m]. Currently, we use the `Geodetic` class to calculate the information. 43 | 44 | ### 3. `TransformEciToEcef` function 45 | - The `TransformEciToEcef` function can convert the position and the velocity of the satellite from the ECI frame to the ECEF frame, which considers the earth's rotation. 46 | 47 | ## 3. Results of verifications 48 | - The verification results are described in the document of each propagation method. 49 | 50 | ## 4. References 51 | NA 52 | -------------------------------------------------------------------------------- /Specifications/Dynamics/Spec_Rk4Orbit.md: -------------------------------------------------------------------------------- 1 | # Specification for Orbit dynamics with RK4 propagation 2 | 3 | ## 1. Overview 4 | 5 | ### 1. functions 6 | - The `Rk4OrbitPropagation` class calculates the position and velocity of satellites with 4th Order Runge-Kutta method(RK4). 7 | 8 | ### 2. files 9 | - `src/dynamics/orbit/orbit.hpp, cpp` 10 | - Definition of `Orbit` base class 11 | - `src/dynamics/orbit/initialize_orbit.hpp, .cpp` 12 | - Make an instance of orbit class. 13 | - `src/dynamics/orbit/rk4_orbit_propagation.hpp, .cpp` 14 | 15 | ### 3. How to use 16 | - Select `propagate_mode = RK4` in the spacecraft's ini file. 17 | - Select `initialize_mode` as you want. 18 | - `DEFAULT` : Use default initialize method (`RK4` and `ENCKE` use position and velocity, `KEPLER` uses init_mode_kepler) 19 | - `POSITION_VELOCITY_I` : Initialize with position and velocity in the inertial frame 20 | - `ORBITAL_ELEMENTS` : Initialize with orbital elements 21 | 22 | ## 2. Explanation of Algorithm 23 | 24 | ### 1. `Propagate` function 25 | - The position and velocity of the satellite are updated by using RK4. As the input of RK4, the six-state variables are set. These state variables are the three-dimensional position [$x$, $y$ ,$z$] and three-dimensional velocity [$v_x$, $v_y$, $v_z$] at the inertial coordinate. Here, the inertial coordinate is decided by the `PlanetSelect.ini` 26 | - As the force which works to the satellite motion is the external acceleration [$a_x$,$a_y$,$a_z$] calculated from the disturbance class or thruster class and the gravity force from the center planet, which is defined in `PlanetSelect.ini`. As a summary, the orbit is calculated as the following equation. 27 | ```math 28 | \begin{align} 29 | \dot{x} &= v_x\\ 30 | \dot{y} &= v_y\\ 31 | \dot{z} &= v_z\\ 32 | \dot{v}_x &= a_x-\mu\frac{x}{r^3}\\ 33 | \dot{v}_y &= a_y-\mu\frac{y}{r^3}\\ 34 | \dot{v}_z &= a_z-\mu\frac{z}{r^3}\\ 35 | r &= \sqrt{x^2+y^2+z^2} 36 | \end{align} 37 | ``` 38 | 39 | ## 3. Results of verifications 40 | 41 | ### 1. Verification of the error of Fourth Order Runge-Kutta method (RK4) 42 | #### 1. Overview 43 | - Verify the numerical integration error of the RK4 method. 44 | - The output of the simulation was compared with the analytical solution. 45 | 46 | #### 2. conditions for the verification 47 | - The Verifications were conducted in the case of `simulation_step_s` and `orbit_update_period_s` were 0.1(sec), 1(sec), and 10(sec). 48 | - The initial values of the propagation are as follows: 49 | ``` 50 | initial_position_i_m(0) = 1.5944017672e7 51 | initial_position_i_m(1) = 0.0 52 | initial_position_i_m(2) = 0.0 53 | 54 | initial_velocity_i_m_s(0) = 0.0 55 | initial_velocity_i_m_s(1) = 5000.0 56 | initial_velocity_i_m_s(2) = 0.0 57 | ``` 58 | - This is a circular orbit, which period is about 20040(sec). The center of the orbit is Earth. 59 | - As a reference, the analytical solution was used. The solution is as follows: 60 | ```math 61 | x=R\cos(\omega t),y=R\sin(\omega t)\quad when~R=1.5944017672\times10^7, \omega=0.000313597243985794 62 | ``` 63 | - All of the effects of disturbance and environment were disabled. 64 | - The simulation time is 60120(sec), which is approximately three-period. In addition, for a long-term test, the case in which simulation time is 200400(about 10 periods) was tested. The `orbit_update_period_s` of this case is 1(sec). 65 | 66 | #### 3. results 67 |
68 | orbit_steptimesec_01 69 | orbit_steptimesec_1 70 | orbit_steptimesec_10 71 | 72 |
73 | 74 | - In the cases of `orbit_update_period_s=0.1` and `orbit_update_period_s=1`, the error is kept within $10^{-6}$ order. However, once the error grows, it will get bigger and bigger. 75 | - In the case of `orbit_update_period_s=10`, the error quickly grows up to $10^{-4}$ order. 76 | 77 |
78 | orbit_steptimesec_1_longterm 79 | 80 |
81 | 82 | - In the long-term test result, it is clear that the error magnitude grows proportionally to the time. 83 | 84 | #### 4. Others 85 | - At first, the output of STK would be used for reference. However, it did not work well. Data were input as follows: 86 |
87 | orbit_STKsettings 88 | 89 |
90 | 91 | - However, the result is as follows: 92 |
93 | orbit_STKresult 94 | 95 |
96 | 97 | - As this figure shows, the initial values in the result are slightly different from the input. 98 | + In the .sa files, the initial values of $x, y, z, v_x, v_y, v_z$ are converted into elements of orbit and stored. The error might occur in the process of this conversion. 99 | 100 | 101 | ## 4. References 102 | NA 103 | 104 | -------------------------------------------------------------------------------- /Specifications/Dynamics/Spec_Sgp4.md: -------------------------------------------------------------------------------- 1 | # Specification for SGP4 Orbit Propagation 2 | 3 | ## 1. Overview 4 | 5 | ### 1. functions 6 | - The `Sgp4OrbitPropagation` class calculates the position and velocity of satellites by using SGP4 method with TLE. 7 | 8 | ### 2. files 9 | - `src/dynamics/orbit/orbit.hpp, cpp` 10 | - Definition of `Orbit` base class 11 | - `src/dynamics/orbit/initialize_orbit.hpp, .cpp` 12 | - Make an instance of orbit class. 13 | - `src/dynamics/orbit/sgp4_orbit_propagation.hpp, .cpp` 14 | - Library of SGP4 15 | - `/src/library/external/sgp4` 16 | 17 | ### 3. How to use 18 | - Select `propagate_mode = SGP4` in the spacecraft's ini file. 19 | - Set the TLE you need like the following example 20 | ``` 21 | tle1=1 25544U 98067A 20076.51604214 .00016717 00000-0 10270-3 0 9005 22 | tle2=2 25544 51.6412 86.9962 0006063 30.9353 329.2153 15.49228202 17647 23 | ``` 24 | 25 | ## 2. Explanation of Algorithm 26 | 27 | ### 1. Propagate function 28 | - The difference between the `current Julian day` and the original period in TLE in units of [minutes] (elapse_time_min) is calculated, and it is used in the argument of the sgp4 function of the SGP4 calculation execution function. At the same time, the geodetic system definition (`whichconst`) and the trajectory information structure (`satrec`) are also required, which are defined at the call of the constructor. The position [m] and velocity [m/s] of the spacecraft are assigned to the member variables sat_position_i_ and sat_velocity_i_ as the output of the sgp4 function. Note that the values, in this case are the values from the ECI coordinate system. 29 | 30 | ## 3. Results of verifications 31 | 32 | ### 1. Verification of SGP4 33 | 34 | #### 1. Overview 35 | - Verify whether the propagation of SGP4 is correctly installed or not. 36 | - By comparing the propagation result of SGP4 in STK simulator and S2E 37 | 38 | #### 2. Conditions for the verification 39 | - Conduct verification using the two different initial TLE cases with different time spans. 40 | 1. Hodoyoshi orbit : (span:10000 second) 41 | - TLE 42 | ``` 43 | 40299U 14070B 20001.00000000 -.00003285 00000-0 -13738-3 0 00007 44 | 40299 097.3451 081.6192 0014521 069.5674 178.3972 15.23569636286180 45 | ``` 46 | 47 | 2. ISS Release orbit (span:10 days) 48 | - TLE 49 | ``` 50 | 99999U 20001.00000000 .00000007 00000-0 93906-7 0 00002 51 | 99999 053.4260 297.1689 0008542 245.4975 274.8981 15.55688139000015 52 | ``` 53 | 54 | #### 3. Results 55 | 1. Hodoyoshi orbit : (span:10000 second) 56 | - Left: STK, Right: S2E 57 |
58 | orbit_steptimesec_01 59 | orbit_steptimesec_01 60 | 61 |
62 | The outputs of the satellite position are almost the same between the two simulators. 63 | 64 | 2. ISS Release orbit : (span:10000 second) 65 | - Left: STK, Right: S2E 66 |
67 | orbit_steptimesec_01 68 | orbit_steptimesec_01 69 | 70 |
71 | The outputs of the satellite position are almost the same between the two simulators. 72 | 73 | ## 4. References 74 | NA 75 | 76 | -------------------------------------------------------------------------------- /Specifications/Dynamics/Spec_TimeSeriesFileOrbit.md: -------------------------------------------------------------------------------- 1 | # Specification for Orbit Propagation with Time Series File 2 | 3 | ## 1. Overview 4 | 5 | ### 1. functions 6 | - The `TimeSeriesFileOrbitPropagation` class calculates the position and velocity of satellites with time series file. 7 | 8 | ### 2. files 9 | - `src/dynamics/orbit/orbit.hpp, cpp` 10 | - Definition of `Orbit` base class 11 | - `src/dynamics/orbit/initialize_orbit.hpp, .cpp` 12 | - Make an instance of orbit class. 13 | - `src/dynamics/orbit/time_series_file_orbit_propagation.hpp, .cpp` 14 | - `/settings/sample_satellite/orbit_files/time_series_orbit.csv` 15 | - Time series file for orbit propagation 16 | 17 | ### 3. How to use 18 | - Prepare a time series file for orbit propagation in CSV file format. The order of the headers is Ephemeris time, position in the ECI frame, and velocity, as shown in the following format. Headers are required, but the names are optional. The units are [m]. 19 | ``` 20 | ephemeris_time[s],position_i_x[m],position_i_y[m],position_i_z[m],velocity_i_x[m/s],velocity_i_y[m/s],velocity_i_z[m/s] 21 | 715564027.4963,156763245.9386,-190393643.02541184,95564270.4990822,731.5280577804,-634.4221281717596,132.98336504802236 22 | 715571341.8627,162023931.9353,-194926426.171367,96482978.8459601,707.0923875188,-605.2501479322574,118.38289214154844 23 | ... 24 | ``` 25 | - Select `propagate_mode = TIME_SERIES_FILE` in the spacecraft's ini file. 26 | - Set `time_series_file_path` as the path of the time series file. 27 | - Set `number_of_interpolation` as the number of interpolation points. 28 | - Select `Interpolation method` as you want. 29 | - `POLYNOMIAL` : Polynomial interpolation. 30 | - `TRIGONOMETRIC` : Trigonometric interpolation. This method is not recommended for aperiodic orbits. 31 | - Set `orbital_period_correction_s` as the correction value of the orbital period. This is only used for trigonometric method. 32 | 33 | ## 2. Explanation of Algorithm 34 | 35 | ### 1. Initialization 36 | - Receives the file path and settings for interpolation (number of interpolation points, method). 37 | - Reads the time series data file using the `IniAccess` class (`ReadCsvDoubleWithHeader`). 38 | - Searches for the nearest ephemeris time (the time corresponding to the satellite data) based on the current Julian date (JD) using `SearchNearestEphemerisTimeId`. 39 | - Determines the data to be used for interpolation and calculates the initial position and velocity. 40 | 41 | ### 4. `Propagate` function 42 | - Based on the specified end time and current Julian date, calculates the difference from the current ephemeris time. 43 | - Uses this time difference to check whether interpolation information needs to be updated by calling `UpdateInterpolationInformation`. This function retrieves the spacecraft's position and velocity from the time series data based on the current reference interpolation index and updates the internal state with new data. 44 | - After updating, it interpolates the current satellite position and velocity using either polynomial or trigonometric methods based on the specified interpolation method. 45 | 46 | ## 3. Results of verifications 47 | 48 | ### 1. Verification of the orbit propagation with a time series file 49 | #### 1. Overview 50 | - We calculated the orbit using a sample time series file (`/settings/sample_satellite/orbit_files/time_series_orbit.csv`). 51 | - The output of the simulation was compared with the sample time series data. 52 | 53 | #### 2. conditions for the verification 54 | - We set the following values in `settings/sample_simulation_base.ini`. 55 | ``` 56 | simulation_start_time_utc = 2022/09/04 11:45:00.0 57 | simulation_duration_s = 1000000 58 | simulation_step_s = 10 59 | ``` 60 | - `number_of_interpolation` was set to 5. 61 | - The interpolation method was set to the polynominal method. 62 | 63 | #### 3. results 64 | The enlarged views confirm that the interpolation is properly performed in both the position and velocity diagrams. 65 |
66 | time_series_file_position 67 | time_series_file_position_enlarged 68 | time_series_file_velocity 69 | time_series_file_velocity_enlarged 70 | 71 |
72 | 73 | ## 4. References 74 | NA 75 | 76 | -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/CtrlAtt_InertialStabilize.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/CtrlAtt_InertialStabilize.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/CtrlAtt_case1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/CtrlAtt_case1.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/CtrlAtt_case2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/CtrlAtt_case2.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/CtrlAtt_case3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/CtrlAtt_case3.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/CtrlAtt_case4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/CtrlAtt_case4.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/RelativeOrbit_LVLHdefinition.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/RelativeOrbit_LVLHdefinition.JPG -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/RelativeOrbit_verification_i_x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/RelativeOrbit_verification_i_x.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/RelativeOrbit_verification_i_y.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/RelativeOrbit_verification_i_y.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/Verification_Hodoyoshi_s2e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/Verification_Hodoyoshi_s2e.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/Verification_Hodoyoshi_stk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/Verification_Hodoyoshi_stk.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/Verification_ISS_s2e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/Verification_ISS_s2e.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/Verification_ISS_stk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/Verification_ISS_stk.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_STKresult.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_STKresult.JPG -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_STKsettings.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_STKsettings.JPG -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_encke_nodist_vs_kepler_oe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_encke_nodist_vs_kepler_oe.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_encke_vs_rk4_dist.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_encke_vs_rk4_dist.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_kepler_oe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_kepler_oe.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_kepler_oe_vs_posvel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_kepler_oe_vs_posvel.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_kepler_oe_vs_rk4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_kepler_oe_vs_rk4.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_steptimesec_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_steptimesec_01.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_steptimesec_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_steptimesec_1.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_steptimesec_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_steptimesec_10.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/orbit_steptimesec_1_longterm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/orbit_steptimesec_1_longterm.jpg -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_0_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_0_b.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_0_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_0_i.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_px_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_px_b.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_px_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_px_i.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_py_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_py_b.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_py_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_py_i.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_pz_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_pz_b.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_dynamics_pz_i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_dynamics_pz_i.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_kinematics_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_kinematics_0.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_kinematics_mz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_kinematics_mz.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_kinematics_px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_kinematics_px.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_kinematics_py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_kinematics_py.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/test_kinematics_pz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/test_kinematics_pz.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/time_series_file_position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/time_series_file_position.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/time_series_file_position_enlarged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/time_series_file_position_enlarged.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/time_series_file_velocity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/time_series_file_velocity.png -------------------------------------------------------------------------------- /Specifications/Dynamics/figs/time_series_file_velocity_enlarged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Dynamics/figs/time_series_file_velocity_enlarged.png -------------------------------------------------------------------------------- /Specifications/Environment/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/.gitkeep -------------------------------------------------------------------------------- /Specifications/Environment/Spec_CelestialInformation.md: -------------------------------------------------------------------------------- 1 | # Specification for Celestial Information 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - `CelestialInformation` manages the celestial bodies position and velocity on the inertial frame. 6 | - This class also manages the celestial body information like the gravity constant, the radius, and the rotation. 7 | - The actual calculations are executed by CSPICE or `EarthRotation`, and this class just calls their functions. 8 | 9 | ### 2. Related files 10 | - `src/environment/global/celestial_information.cpp, .hpp` 11 | - `CelestialInformation` class is defined. 12 | - `src/environment/global/global_environment.cpp, .hpp` 13 | - `CelestialInformation` class is used here as a member variable of `GlobalEnvironment` class. 14 | 15 | ### 3. How to use 16 | - Call ` UpdateAllObjectsInformation` function to calculates the celestial bodies position and velocity. 17 | - Users can get calculated values by using the following functions: 18 | - `GetPositionFromCenter_i_m` 19 | - You can select celestial ID or name for the arguments 20 | - `GetVelocityFromCenter_i_m_s` 21 | - You can select celestial ID or name for the arguments 22 | - `GetGravityConstant_m3_s2` 23 | - argument is celestial body name 24 | - `GetCenterBodyGravityConstant_m3_s2` 25 | - `GetRadii_m` or `GetRadiiFromName_m` 26 | - You can select celestial ID or name for the arguments 27 | - `GetMeanRadiusFromName_m` 28 | - argument is celestial body name 29 | 30 | ## 3. Explanation of Algorithm 31 | ### 1. `UpdateAllObjectsInformation` function 32 | #### 1. overview 33 | - Actual calculation is executed by the CSPICE library. This function just calls the CSPICE functions. 34 | 35 | ## 4. Verification 36 | - NA 37 | 38 | ## 5. References 39 | - NA 40 | 41 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_ClockGenerator.md: -------------------------------------------------------------------------------- 1 | # Specification for Clock Generator 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | + The `ClockGenerator` generates clock for classes which inherit `ITickable`. 6 | + It is mainly used to manage update the component states since the `Component` class inherits `ITickable` 7 | + This class is not managed by `GlobalEnvironment` class. The `Spacecraft` class directly has the instance of this class and execute the update function. 8 | 9 | ### 2. Related files 10 | + `src/environment/global/clock_generator.cpp, .hpp` 11 | + `src/components/base/interface_tickable.hpp` 12 | 13 | ### 3. How to use 14 | + Make an instance of a class which inherit `ITickable`. Then, the instance is automatically registered to the component list `ClockGenerator::components_`. 15 | + The `Spacecraft` class calls the `UpdateComponents` function to update the states of the registered components. 16 | 17 | ## 3. Explanation of Algorithm 18 | ### 1. `UpdateComponents` function 19 | #### 1. overview 20 | - Call `TickToComponents` when the component update timing flag is `true`. 21 | 22 | ### 1. `TickToComponents` function 23 | #### 1. overview 24 | - Increment count and execute the `ITickable::Tick` or `ITickable::FastTick` function. 25 | - They call the `component::MainRoutine` and `component::FastUpdate` functions, respectively. 26 | 27 | ## 4. Verification 28 | - NA 29 | 30 | ## 5. References 31 | - NA 32 | 33 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_GeomagneticField.md: -------------------------------------------------------------------------------- 1 | # Specification for Geomagnetic field model 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | + `GeomagneticField` class calculates the geomagnetic field at the spacecraft's position from the IGRF model 6 | + This class also adds noise to emulate the difference between the IGRF model and the real world. 7 | 8 | ### 2. Related files 9 | + `src/environment/local/geomagnetic_field.cpp, .hpp` 10 | + `GeomagneticField` class is defined. 11 | + `src/environment/local/local_environment.cpp, .hpp` 12 | + `GeomagneticField` class is used here as a member variable of `LocalEnvironment` class. 13 | + `src/library/external/igrf/igrf.cpp, h` 14 | + A magnetic field in the ECI frame is calculated by the IGRF model. 15 | 16 | ### 3. How to use 17 | + Set a coefficient file path for the IGRF and random walk / white noise in .ini file 18 | - `coefficient_file`: File path to the IGRF coefficients table. 19 | - `magnetic_field_random_walk_standard_deviation_nT`: Standard deviation of the random walk noise 20 | - `magnetic_field_random_walk_limit_nT`: Limit of the random walk noise 21 | - `magnetic_field_white_noise_standard_deviation_nT`: Standard deviation of the normal random noise 22 | + Public functions 23 | + `CalcMagneticField` : Update the magnetic field 24 | + `GetGeomagneticField_i_nT` : Return the magnetic field (nT) in the ECI 25 | + `GetGeomagneticField_b_nT` : Return the magnetic field (nT) in the body-fixed coordinate 26 | 27 | 28 | ## 2. Explanation of Algorithm 29 | + IGRF calculates the magnetic field based on a spherical harmonic expansion of magnetic scalar potential $V$. 30 | + The coefficients of the spherical harmonic expansion of $V$ is updated by [IAGA](https://www.ngdc.noaa.gov/IAGA/vmod/index.html). The latest version is the 13th generation, and S2E uses this version. 31 | + Please refer [here](https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html#:~:text=The%20International%20Association%20of%20Geomagnetism,interior%2C%20its%20crust%20and%20its) for the details of IGRF. 32 | 33 | ## 3. Verification 34 | ### Overview 35 | + The calculated magnetic field is compared with [Matlab's IGRF function](https://jp.mathworks.com/help/aerotbx/ug/igrfmagm.html) calculation in the ECI frame. 36 | 37 | ### 2. Conditions for the verification 38 | 1. input files 39 | - Default initialize files 40 | 41 | 2. initial values 42 | - To check the result in an example orbit, the EndTime was changed to 9000 s. 43 | ``` 44 | simulation_start_time_utc = 2020/01/01 11:00:00.0 45 | simulation_duration_s = 9000 46 | simulation_step_s = 5 47 | orbit_update_period_s = 0.1 48 | log_output_period_s = 5 49 | simulation_speed_setting = 0 50 | ``` 51 | - Especially, we chose the following TLE for orbit calculation (ISS orbit). 52 | ``` 53 | tle1=1 25544U 98067A 20076.51604214 .00016717 00000-0 10270-3 0 9005 54 | tle2=2 25544 51.6412 86.9962 0006063 30.9353 329.2153 15.49228202 17647 55 | ``` 56 | 57 | ### 3. Results 58 | + Results of S2E 59 | 60 | 61 | + Error between S2E and MATLAB 62 | + The error is approximately 200―500 nT. This may be because the coefficients of S2E are 13th, but on the other hand, those of MATLAB are 12th. 63 | 64 | 65 | ## 4. References 66 | 1. International Geomagnetic Reference Field, https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html#:~:text=The%20International%20Association%20of%20Geomagnetism,interior%2C%20its%20crust%20and%20its 67 | 2. IAGA web page, https://www.ngdc.noaa.gov/IAGA/vmod/index.html 68 | 3. MATLAB `igrfmagm`, https://jp.mathworks.com/help/aerotbx/ug/igrfmagm.html 69 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_GlobalEnvironment.md: -------------------------------------------------------------------------------- 1 | # Specification for Global Environment 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | + The `GlobalEnvironment` class integrates all global environments. 6 | 7 | ### 2. Related files 8 | + `src/environment/global/global_environment.cpp, .hpp` 9 | + All global environment classes are initialized and updated here as a member variable. 10 | 11 | ### 3. How to use 12 | + When users make a new global environment class, users need to add the class as a member variable. 13 | 14 | ## 3. Explanation of Algorithm 15 | ### 1. `Update` function 16 | #### 1. overview 17 | - Update all global environments. 18 | 19 | ## 4. Verification 20 | - NA 21 | 22 | ## 5. References 23 | - NA 24 | 25 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_GnssSatellites_en.md: -------------------------------------------------------------------------------- 1 | # Specification for GNSS 2 | 3 | ## 1. Overview 4 | ### 1. function 5 | - A class to read data about orbit and clock bias of GNSS satellites such as .sp3 and .clk_30s and use them in other classes. 6 | - Determine the file name of GNSS satellites' data and time from `[GNSS_SATELLITES]` in `sample_gnss.ini`. 7 | 8 | ### 2. Related files 9 | - `src/environment/global/globalEnvironment.cpp, .hpp` 10 | - GnssSatellites class is defined. Various GET functions are also implemented. 11 | - `src/environment/global/initialize_gnss_satellites.cpp, .hpp` 12 | - This makes the instance of the GnssSatellites class. The initialization is described in the `sample_gnss.ini` file. 13 | - `ExtLibraries/sp3` 14 | - It contains a set of files (.sp3, .clk_30s) necessary for generating orbits and clock biases. 15 | 16 | ### 3. About downloading .sp3 files, etc. 17 | - The author has not yet written script files to download .sp3 or .clk. Users can download them from `ftp://igs.ensg.ign.fr/pub/igs/products/`, `http://mgmds01.tksc.jaxa.jp/`, etc., referring to the directory classification. The directories are assumed to be as follows. 18 | ``` 19 | ExtLibraries 20 | | 21 | sp3 22 | ├── CODE 23 | │   └── final 24 | ├── IGS 25 | │   ├── igl 26 | │   ├── igr 27 | │   │   └── clk 28 | │   ├── igs 29 | │   │   └── clk_30s 30 | │   └── igu 31 | ├── JAXA 32 | │   ├── final 33 | │   ├── madoca 34 | │   ├── rapid 35 | │   └── ultra_rapid 36 | └── QZSS 37 |    ├── final 38 | ├── rapid 39 |    └── ultra_rapid 40 | ``` 41 | 42 | ## 2. How to use 43 | - Parameters, which file to use or else are set in `sample_gnss.ini` 44 | - `directory_path`: fixed 45 | - `calculation`: whether to use this GNSS class 46 | - `true_position_file_sort`: Select the type of file to generate the true value of the GNSS satellite coordinates. 47 | - `true_position_first`: The first file to read 48 | - `true_position_last`: The last file to read 49 | - `true_position_interpolation_method`: Select the interpolation method 50 | - `true_position_interpolation_number`: Select the number of points to be interpolated, so the order of the function will be `true_position_interpolation_number` -1. 51 | - `true_clock_file_extension`: Whether to use .sp3 or clock-only files such as .clk_30s 52 | 53 | `estimation` parameters are the same as above. 54 | 55 | - Users can retrieve the coordinates and clock bias of each GNSS satellite with the provided `Get` functions. 56 | 57 | ## 3. Algorithm 58 | Basically, the trajectory is generated by interpolation, but some data are often missing, so we have dealt with it. For the coordinates, the trajectory is generated by interpolation from the available coordinates, and for the clock bias is generated by extracting only the strictly surrounding values. 59 | 60 | 1. Extract the contents of the file with `initialize_gnss_satellites.cpp`. 61 | 2. Create a table for generating coordinates and clock bias with `Init()`. 62 | - `time_table_`: The Unix Time of all times are listed. 63 | - `gnss_*_table_*`: Contains the coordinates or clock bias values at all times. 64 | - `available_table_`: Whether available of the data of all satellites at all times 65 | - `time_and_index_list_`: Contains the pair of available time and the index in the table. 66 | 3. `SetUp()`: Set the first interpolation reference location from `time_table_` and `time_and_index_list_`, set the index of the reference to `nearest_index_` (used later in Update). `time_vector_`, `ecef_`, `eci_`, `clock_` are `std::vector` used for interpolation calculation. 67 | 4. `Update()`: Coordinates and clock bias are calculated based on the time. The `time_vector_`, `ecef_`, `eci_`, and `clock_`, which are used as the basis of interpolation, are updated according to the nearest time. 68 | 69 | ## 4. Result and Specification 70 | Some of the calculated ECI coordinates are shown below. 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_GnssSatellites_ja.md: -------------------------------------------------------------------------------- 1 | # 姿勢シミュレータ仕様書 - GNSS - 2 | 3 | ## 1. 概要 4 | ### 1. 機能 5 | - .sp3や.clk_30sなどのGNSS衛星の軌道, クロックバイアスに関するデータを読み取り, 他クラスで使用できるためのクラス. 6 | - `sample_gnss.ini` により読みだすファイル名と範囲を決定します 7 | 8 | ### 2. 関連ファイル 9 | - `src/environment/global/globalEnvironment.cpp, .hpp` 10 | - GnssSatellites クラスが定義されています. また, 各種GET関数も実装されています. 11 | - `src/environment/global/initialize_gnss_satellites.cpp, .hpp` 12 | - GnssSatellites クラスのための初期化ファイルとなっています. 初期化の内容については `sample_gnss.ini` ファイル内に記述されています. 13 | - `ExtLibraries/sp3` 14 | - 軌道やクロックバイアスの生成に必要なファイル群(.sp3, .clk_30s)などが入っています. 15 | 16 | ### 3. .sp3ファイルなどのダウンロードに関して 17 | - まだダウンロードをする際に使用するスクリプトを書いていません. ディレクトリ分けなどを参考に`ftp://igs.ensg.ign.fr/pub/igs/products/`や`http://mgmds01.tksc.jaxa.jp/`等のサイトから各自ダウンロードしてください. ディレクトリ分けは以下の様になっていることを想定しています. 18 | ``` 19 | ExtLibraries 20 | | 21 | sp3 22 | ├── CODE 23 | │   └── final 24 | ├── IGS 25 | │   ├── igl 26 | │   ├── igr 27 | │   │   └── clk 28 | │   ├── igs 29 | │   │   └── clk_30s 30 | │   └── igu 31 | ├── JAXA 32 | │   ├── final 33 | │   ├── madoca 34 | │   ├── rapid 35 | │   └── ultra_rapid 36 | └── QZSS 37 |    ├── final 38 | ├── rapid 39 |    └── ultra_rapid 40 | ``` 41 | 42 | 43 | ## 2. 使い方 44 | - `sample_gnss.ini` 内で読みだす方法やパラメーター設定等を行う 45 | - `directory_path`: 固定 46 | - `calculation`: 使用するかどうか 47 | - `true_position_file_sort`: GNSS衛星の座標の真値を生成するファイルの種類を選択 48 | - `true_position_first`: 読み出す最初のファイル 49 | - `true_position_last`: 読み出す最後のファイル 50 | - `true_position_interpolation_method`: 補間方法の選択 51 | - `true_position_interpolation_number`: 補間で行う点数の選択, なので関数の次数はこれ-1になる. 52 | - `true_clock_file_extension`: .sp3を使用するかそれとも.clk_30sなどのクロック限定のファイルから選択するか 53 | 54 | 以下同様です 55 | 56 | - 用意されている各`Get`関数でGNSS衛星の各座標やクロックバイアスなどを取り出すことが出来ます. 57 | 58 | ## 3. アルゴリズム 59 | 基本的に内挿で軌道を生成していますが, 一部データが欠けていることがよくあるのでそれに対応しています. 座標に関しては利用可能な座標から抽出して内挿で軌道を生成し, クロックバイアスに関しては厳密に周辺の値のみを取り出して生成しています. 60 | 61 | 1. `initialize_gnss_satellites.cpp` でファイルの中身を取り出します. 62 | 2. `Init()`で座標, クロックバイアスの生成元となるtableを作成します. 63 | - `time_table_`内に全時刻のUnix Timeが並べられている. 64 | - `gnss_*_table_*`で全時刻での座標又はクロックバイアスの値が入っている. 65 | - `available_table_`に全時刻の全衛星がその時のデータが使用可能かどうか入っている. 66 | - `time_and_index_list_`: 使用可能なデータの時刻とtable内でのindexのpairが収められている. 67 | 3. `SetUp()`: `time_table_`と`time_and_index_list_`から一番最初の内挿の基準の場所をセット, 基準のindexを`nearest_index_`にセット(後ほどUpdateで使用), `time_vector_`, `ecef_`, `eci_`, `clock_`は内挿の計算に用いる`vector` 68 | 4. `Update()`: 時刻を元に座標やクロックバイアスが計算される. 最寄りの時刻が進む先に内挿の計算の元に使われる `time_vector_`, `ecef_`, `eci_`, `clock_` がその基準に合わせて更新される. 69 | 70 | ## 4. 結果と検証 71 | 計算したECI座標の一部を以下に示す. 72 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_HipparcosCatalogue_en.md: -------------------------------------------------------------------------------- 1 | # Specification for Hipparcos catalogue 2 | 3 | ## 1. Overview 4 | - This class read the csv file of Hipparcos catalogue and to enable other classes to use the data. 5 | - Specify the max visual magnitude to read in `sample_simulation_base.ini` 6 | ### 1. functions 7 | + `ReadContents` 8 | * Function to read `hip_main.csv` 9 | + `Get` functions 10 | * Functions to access the data of `HipparcosCatalogue` from outside of this class 11 | 12 | ### 2. files 13 | + `HipparcosCatalogue.cpp` ,`HipparcosCatalogue.hpp` 14 | * Definitions and declarations of the class 15 | + `sample_simulation_base.ini` 16 | * Parameters for initialization 17 | + `hip_main.csv` 18 | * This is the original data of the Hipparcos catalogue. It is in the `ExtLibraries` directory. This data is sorted in of the visual magnitude, not in the order of HIP ID. 19 | 20 | ### 3. How to download `hip_main.csv` 21 | + `s2e-core/scripts/download_HIPcatalogue.sh` is the script to download it. Run the following code using Git bash in `s2e-core/scripts/`. 22 | * **NOTE for Mac OS users: Run the following script not from the Mac terminal but the Ubuntu terminal in Docker.** (Because the specification of `sed` is different between Mac and Linux, the file cannot be generated correctly. Reference: ) 23 | ``` 24 | bash download_HIPcatalogue.sh 25 | ``` 26 | 27 | ### 4. How to use 28 | + Set the parameters in `sample_simulation_base.ini` 29 | + Create an instance by using initialization function `InitHipparcosCatalogue` 30 | + Run `GetContents` to read the csv file 31 | + Get the data from outside this class using `Get` functions. 32 | + The `HipparcosData` structure has four elements, hipparcos_id, visible_magnitude, right_ascension_deg, declination_deg. `HipparcosCatalogue` stores the data as a vector of `HipparcosData`. 33 | 34 | ## 2. Explanation of Algorithm 35 | TBW 36 | 37 | ## 3. Result of verification 38 | The verification using this class is conducted in `Spec_Telescope.md`. 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_HipparcosCatalogue_ja.md: -------------------------------------------------------------------------------- 1 | # 姿勢シミュレータ仕様書~ヒッパルコス星表~ 2 | 3 | ## 1. 概要 4 | - csv形式のヒッパルコス星表のデータを読み取り,他クラスで使用できるようにするためのクラス. 5 | - `sample_simulation_base.ini` によりあらかじめ読み出す視等級の上限を決める. 6 | ### 1. 関数 7 | + `ReadContents` 8 | * `hip_main.csv`を読み出してデータに格納する関数. 9 | + 各種 `Get` 関数 10 | * クラス外から `HipparcosCatalogue` のデータにアクセスする場合に用いる関数. 11 | 12 | ### 2. 関連ソースコード,ファイル 13 | + `HipparcosCatalogue.cpp` ,`HipparcosCatalogue.hpp` 14 | * クラスの定義が行われている. 15 | + `initialize_global_environment.cpp` 16 | * 初期化関数が記述されている 17 | + `sample_simulation_base.ini` 18 | * 初期化ファイル 19 | + `hip_main.csv` 20 | * ヒッパルコス星表の元データ. `s2e-core` 外の `ExtLibraries` に保存される.使用しやすいように,HIP ID順ではなく,視等級の小さい順にソートされている. 21 | 22 | ### 3. 外部ライブラリのダウンロードに関して 23 | + まずは`hip_main.csv` のダウンロードを済ませる必要がある.このためのスクリプトとして `s2e-core/scripts/download_HIPcatalogue.sh`を用意した.Git Bashなどを利用して,このスクリプトがあるディレクトリで以下を実行することで,必要なcsvファイルをダウンロードすることができる. 24 | * Macユーザーは,Mac標準のターミナルからではなく,Docker内のUbuntuのターミナルから実行する必要がある.( `sed` の仕様がMacとLinuxで違うので,正しいcsvファイルを生成することができないため.参考:) 25 | ``` 26 | bash download_HIPcatalogue.sh 27 | ``` 28 | 29 | ### 4. 使い方 30 | + `sample_simulation_base.ini`でパラメータを設定 31 | + 初期化関数 `InitHipparcosCatalogue` を利用し,インスタンスを生成 32 | + `GetContents` を実行することで,csvファイルからデータを取得する. 33 | + 各種情報が必要な場合は, `Get` 関数を使って取得する. 34 | + hipparcos_id(HIP ID),visible_magnitude(視等級),right_ascension_deg(赤経),declination_deg(赤緯)の4要素を持つ `HipparcosData` 構造体を定義している.データはこの `HipparcosData` 型を要素にとるベクタとして保存される. 35 | 36 | ## 2. アルゴリズム説明 37 | 38 | ## 3. 動作確認結果 39 | ヒッパルコス星表のデータを用いた動作確認を `Spec_Telescope.md` にて行っているため,その結果を動作確認結果とする. 40 | 41 | 42 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_LocalCelestialInformation.md: -------------------------------------------------------------------------------- 1 | # Specification for Local Celestial Information 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - `LocalCelestialInformation` calculates the celestial bodies position and velocity on the spacecraft body-fixed frame. 6 | 7 | ### 2. Related files 8 | - `src/environment/local/local_celestial_information.cpp, .hpp` 9 | - `LocalCelestialInformation` class is defined. 10 | - `src/environment/local/local_environment.cpp, .hpp` 11 | - `LocalCelestialInformation` class is used here as a member variable of `LocalEnvironment` class. 12 | 13 | ### 3. How to use 14 | - Call ` UpdateAllObjectsInformation` function to calculates the celestial bodies position and velocity. 15 | - Users can get calculated values by using the following functions: 16 | - Get celestial body position vector from the spacecraft position. Users need to set the body name as an argument. 17 | - `GetPositionFromSpacecraft_i_m` 18 | - `GetPositionFromSpacecraft_b_m` 19 | - Get center body position vector from the spacecraft position without any arguments. 20 | - `GetCenterBodyPositionFromSpacecraft_i_m` 21 | - `GetCenterBodyPositionFromSpacecraft_b_m` 22 | - To access the celestial body position in the inertial frame, users can use `GetGlobalInformation` 23 | 24 | ## 3. Explanation of Algorithm 25 | ### 1. `UpdateAllObjectsInformation` function 26 | #### 1. overview 27 | - Convert the celestial bodies positions to the body frame from the inertial frame. 28 | 29 | ## 4. Verification 30 | - NA 31 | 32 | ## 5. References 33 | - NA 34 | 35 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_LocalEnvironment.md: -------------------------------------------------------------------------------- 1 | # Specification for Local Environment 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | + The `LocalEnvironment` class integrates all local environments. 6 | 7 | ### 2. Related files 8 | + `src/environment/local/local_environment.cpp, .hpp` 9 | + All local environment classes are initialized and updated here as a member variable. 10 | 11 | ### 3. How to use 12 | + When users make a new local environment class, users need to add the class as a member variable. 13 | 14 | ## 3. Explanation of Algorithm 15 | ### 1. `Update` function 16 | #### 1. overview 17 | - The environment calculations that depend on the spacecraft attitude are called when the spacecraft attitude is updated. 18 | - The environment calculations that depend on the spacecraft position are called when the spacecraft position is updated. 19 | 20 | ## 4. Verification 21 | - NA 22 | 23 | ## 5. References 24 | - NA 25 | 26 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_PhysicalConstants.md: -------------------------------------------------------------------------------- 1 | # Specification for Physical Constants 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | + This file defines the physical constant values used in the S2E. 6 | 7 | ### 2. Related files 8 | + `src/environment/global/physical_constants.hpp` 9 | 10 | ### 3. How to use 11 | + When users want to use some physical constant values, please see this header file. 12 | + If you cannot find what you want, please add the value here and make the Pull Request to share the value with other users. 13 | 14 | ## 3. Explanation of Algorithm 15 | - NA 16 | 17 | ## 4. Verification 18 | - NA 19 | 20 | ## 5. References 21 | - NA 22 | 23 | -------------------------------------------------------------------------------- /Specifications/Environment/Spec_SimulationTime.md: -------------------------------------------------------------------------------- 1 | # Specification for Simulation Time 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | + The `SimulationTime` class manages simulation time related information as follows. 6 | - Start time of the simulation scenario 7 | - Elapsed time of the simulation scenario 8 | - Current time of the simulation scenario 9 | - Update timing of calculations 10 | - Attitude update, orbit update, thermal update, component update 11 | - Update timing of log output and display output 12 | 13 | 14 | ### 2. Related files 15 | + `src/environment/global/simulation_time.cpp, .hpp` 16 | - `SimulationTime` class is defined. 17 | - `src/environment/global/global_environment.cpp, .hpp` 18 | - `SimulationTime` class is used here as a member variable of `GlobalEnvironment` class. 19 | - `src/environment/global/initialize_global_environment.cpp, .hpp` 20 | - `SimulationTime` class is instanced here based on the `simulation_base.ini` file. 21 | 22 | 23 | ### 3. How to use 24 | - Call ` UpdateTime` function to increment time of the simulation scenario. 25 | - Users can get time related information by using the getter functions. 26 | 27 | ## 3. Explanation of Algorithm 28 | - NA 29 | 30 | ## 4. Verification 31 | - NA 32 | 33 | ## 5. References 34 | - NA 35 | 36 | -------------------------------------------------------------------------------- /Specifications/Environment/figs/Error_IGRF_S2E_MATLAB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Error_IGRF_S2E_MATLAB.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_ECIECEF_Matlab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_ECIECEF_Matlab.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_ECIECEF_S2E_Full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_ECIECEF_S2E_Full.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_ECIECEF_S2E_Simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_ECIECEF_S2E_Simple.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_ECIECEF_S2E_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_ECIECEF_S2E_time.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_IGRF_S2E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_IGRF_S2E.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_NRLMSISE00_Web_2015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_NRLMSISE00_Web_2015.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_NRLMSISE00_Web_2020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_NRLMSISE00_Web_2020.png -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_SRPEnvironment_shadowfunction.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_SRPEnvironment_shadowfunction.jpg -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_SRP_calculation.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_SRP_calculation.JPG -------------------------------------------------------------------------------- /Specifications/Environment/figs/Result_eclipse_calculation.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/Result_eclipse_calculation.JPG -------------------------------------------------------------------------------- /Specifications/Environment/figs/result_gnss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Environment/figs/result_gnss.png -------------------------------------------------------------------------------- /Specifications/Interface/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Interface/.gitkeep -------------------------------------------------------------------------------- /Specifications/Interface/Spec_PowerPort.md: -------------------------------------------------------------------------------- 1 | # Specification of Power Port 2 | 3 | ## 1. Overview 4 | ### 1. Functions 5 | - `PowerPort` class provides features of an electrical power connection. 6 | - Users can use the class to control the electrical power switching of components and calculate the component's consumed electrical current. 7 | 8 | ### 2. Related files 9 | - Main files: `power_port.cpp, .hpp` 10 | - Referenced files: `component.cpp, .hpp` and `power_control_unit.cpp, .hpp` 11 | 12 | ### 3. How to use 13 | - **Example**: The `sample_components.hpp` in the `s2e-core/simulation_sample/spacecraft/` is helpful to know how to use the feature. 14 | - Make a component class that inherits the `Component` class. 15 | - The `Component` class has the `PowerPort` class as a member and controls the component's action according to the electrical power switches. 16 | - Make an instance of `PowerControlUnit` and connect the power port. 17 | - The `PowerControlUnit` base class has a member of the `map` of the `PowerPort` class and manages the port id and connection of the `PowerPort`. 18 | - Users can make their PCU by inheriting the `PowerControlUnit` base class and can control the power switching in the `MainRoutine` function. 19 | ```cpp 20 | pcu_ = new PowerControlUnit(clock_gen); 21 | pcu_->ConnectPort(0, 0.5, 3.3, 0.3); 22 | ``` 23 | - Make an instance of the components with the connected `PowerPort`. 24 | ```cpp 25 | obc_ = new OnBoardComputer(1, clock_gen, pcu_->GetPowerPort(0)); 26 | ``` 27 | - Control the power switches by using the `PowerControlUnit`. 28 | - The default setting of the power switch is `off`, so users need to power on the port to execute the `MainRoutine` of the components. 29 | ```cpp 30 | pcu_->GetPowerPort(0)->SetVoltage(3.3); 31 | ``` 32 | - **Note**: The virtual power port is created when users make an instance of the `Component` class and its subclasses without the `PowerPort` information. The virtual port has a minus value port ID, and the switch state is originally `ON`, but the consumed power is zero. 33 | 34 | ## 2. Explanation of Algorithm 35 | ### 1. SetVoltage 36 | #### 1. overview 37 | - This function is a setter function of the supply voltage to the power port. 38 | - Users can control the power switch by using this function. 39 | 40 | #### 2. inputs and outputs 41 | - input: supply voltage to the port 42 | - output: switch state of the port 43 | 44 | #### 3. algorithm 45 | - After the voltage is set, the `Update` function is called to check that the supply voltage is enough to turn on the component. 46 | 47 | #### 4. note: N/A 48 | 49 | ### 1. Update 50 | #### 1. overview 51 | - This is an update function of the switch state and the consumed current. 52 | - This function also has an over-current protection feature. 53 | 54 | #### 2. inputs and outputs 55 | - input: N/A (members of the class) 56 | - output: switch state of the port 57 | 58 | #### 3. algorithm 59 | - When the supply voltage is larger than the `kMinimumVoltage` of the component, the switch state becomes `true`, and the consumed current is calculated as the following equation. 60 | ```math 61 | I = P/V 62 | ``` 63 | - The `P` is the `assumed_power_consumption`, and users can set the value with the `SetAssumedPowerConsumption` function. 64 | - If the calculated current consumption is larger than the `kCurrentLimit`, the over-current protection feature is executed and turning the switch off. 65 | 66 | #### 4. note: N/A 67 | 68 | ## 3. Results of verifications 69 | N/A 70 | 71 | ## 4. References 72 | N/A 73 | -------------------------------------------------------------------------------- /Specifications/Library/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Library/.gitkeep -------------------------------------------------------------------------------- /Specifications/OverallStructure/OverallStructure.md: -------------------------------------------------------------------------------- 1 | # Overall Structure of S2E 2 | 3 | ## 1. Overview 4 | - This document explains the overall structure of the S2E. 5 | 6 | ## 2. Structure of S2E 7 | - The following figure shows the structure of the S2E. 8 | 9 | S2EStructure 10 | 11 | ### 2.1. Simulation Case 12 | - The highest layer of the structure of S2E is the `Simulation Case`, which is defined in the `src/simulation/case/simulation_case.cpp`. 13 | - The `Simulation Case` always has `Simulation Configuration` and `Global Environment`. 14 | - `Simulation Configuration` has basic information on the interface of the simulation, such as `log output` and `initialize input` information. 15 | - `Global Environment` is defined as the common environment for the whole simulation case. It includes time, celestial information, star catalog, and GNSS satellite position. 16 | - Users can make their `Simulation Case` by inheriting the `Simulation Case` base class and adding simulation target objects (e.g., spacecraft and ground station) for their demand. 17 | - The defined simulation objects can use the information of `Simulation Configuration` and `Global Environment`. 18 | 19 | ### 2.2. Spacecraft 20 | - An essential simulation object is the `Spacecraft` class. 21 | - `Spacecraft` class has the following features to simulate the behavior of spacecraft in space. 22 | - `Structure` 23 | - This class handles the structure information of the spacecraft, such as the mass, the inertia tensor, surface information, and residual magnetic moment. 24 | - The information is used to calculate disturbance and propagate dynamics. 25 | - `LocalEnvironment` 26 | - This class handles space environment information around the spacecraft, such as air density, magnetic field, solar energy, and eclipse. 27 | - The information is used to calculate disturbance and emulate environment sensors. 28 | - `Disturbance` 29 | - This class handles disturbances forces(accelerations) and torques. 30 | - The information is used to propagate dynamics. 31 | - `Dynamics` 32 | - This class handles dynamics calculation for attitude, orbit, and thermal. 33 | - This is the core of the numerical simulation. 34 | - `Components` 35 | - This class emulates the behavior of components mounted on the spacecraft. The spacecraft can measure the physical quantities and generate control output by using the components. 36 | - This class is not defined in the Spacecraft base class, and users have to define it themselves. 37 | - Users can add multiple spacecraft into their `SimulationCase`, and these spacecraft can communicate via communication components. 38 | 39 | ### 2.3. Ground Station 40 | - TBW 41 | 42 | ### 2.4. Structure of initializing files 43 | - The structure of the initializing files follows the above figure. 44 | - `simulation_base.ini` sets the parameters for `SimulationCase`, and file paths to each simulation object. 45 | - `satellite.ini` sets the parameters for `Spacecraft` and file paths to each component. 46 | 47 | ## 3. Structure of spacecraft components 48 | **Note:** the structure of components is implemented now. So the following figure is just an idea, and it may be modified. 49 | 50 | ComponentStructure 51 | - Each component can communicate with other components. 52 | - All components have a power wire, and power control components control the switch. 53 | -------------------------------------------------------------------------------- /Specifications/OverallStructure/figs/Component_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/OverallStructure/figs/Component_structure.png -------------------------------------------------------------------------------- /Specifications/OverallStructure/figs/S2E_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/OverallStructure/figs/S2E_structure.png -------------------------------------------------------------------------------- /Specifications/Simulation/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Specifications/Simulation/.gitkeep -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_GroundStation.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Ground Station 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `GroundStation` class is the base class to define the following basic feature of ground stations. 7 | - Position of the ground station 8 | - Minimum elevation angle 9 | - Visible flag for each spacecraft 10 | - Users can make user defined ground station by inheriting this class. 11 | 12 | ### 2. Related files 13 | - `src/simulation/ground_station/ground_station.cpp, .hpp` 14 | - The `GroundStation` class is defined here. 15 | - `src/simulation/ground_station/sample_ground_station/sample_ground_station.cpp, .hpp` 16 | - An example to make user defined ground station with the `GroundStation` class. 17 | 18 | ### 3. How to use 19 | - See [Sample Ground Station](./Spec_SampleGroundStation.md) 20 | 21 | 22 | ## 2. Explanation of Algorithm 23 | NA 24 | 25 | ## 3. Results of verifications 26 | NA 27 | 28 | ## 4. References 29 | NA 30 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_InstalledComponents.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Installed Components 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `InstalledComponents` class is the base class to define the following interface functions for component list. 7 | - Force and torque generation 8 | - Log setup 9 | - Users can make user defined component list by inheriting this class. 10 | 11 | ### 2. Related files 12 | - `src/simulation/spacecraft/installed_components.cpp, .hpp` 13 | - The `InstalledComponents` class is defined here. 14 | - `src/simulation/spacecraft/spacecraft.cpp, .hpp` 15 | - The `InstalledComponents` class is used here. 16 | - `src/simulation/spacecraft/sample_spacecraft/sample_components.cpp, .hpp` 17 | - An example to make user defined component list with the `InstalledComponents` class. 18 | 19 | ### 3. How to use 20 | - See [Sample Components](./Spec_SampleComponents.md) 21 | 22 | ## 2. Explanation of Algorithm 23 | NA 24 | 25 | ## 3. Results of verifications 26 | NA 27 | 28 | ## 4. References 29 | NA 30 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_MonteCarloSimulation.md: -------------------------------------------------------------------------------- 1 | # Monte Carlo Simulation 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `Monte Carlo Simulation` feature of S2E provides a framework for Monte Carlo simulation 7 | 8 | ### 2. Related files(TBW) 9 | - `src/simulation/monte_carlo_simulation` 10 | - `initialize_monte_carlo_parameters`: A class to initialize randomized parameters 11 | - `initialize_monte_carlo_simulation` 12 | - `monte_carlo_simulation_executor`: The main class for Monte Carlo simulation 13 | - `simulation_object`: 14 | - `data/sample/initialize_files/sample_simulation_base.ini` 15 | 16 | ### 3. How to use 17 | - Read [How to use Monte Carlo simulation](../../Tutorials/HowToUseMonteCarloSimulation.md) 18 | 19 | 20 | ## 2. Explanation of Algorithm 21 | TBW 22 | 23 | ## 3. Results of verifications 24 | TBW 25 | 26 | ## 4. References 27 | 1. -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_SampleCase.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Sample Case 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `SampleCase` class is an example of making the user defined scenario with the `SimulationCase` class. 7 | 8 | ### 2. Related files 9 | - `src/simulation_sample/case/sample_case.cpp, .hpp` 10 | - The `SampleCase` class is defined here. 11 | - `src/simulation/case/simulation_case.cpp, .hpp` 12 | - The `SimulationCase` class is defined here. 13 | - `src/s2e.cpp` 14 | - The instance of the `SampleCase` class is made in this main function. 15 | 16 | ## 2. How to make user defined simulation scenario 17 | - `sample_case.hpp` 18 | - Define user defined simulation case class. We use `SampleCase` class here. 19 | - Inherit the `SimulationCase` class. 20 | - Users need to define override functions for all pure virtual functions of the `SimulationCase` class. 21 | - Add spacecraft and/or ground station as users need into the member variables. 22 | - If users simulate multiple spacecraft, users can add several spacecraft here. 23 | - Multiple spacecraft case, you can refer the [s2e-ff](https://github.com/ut-issl/s2e-ff) 24 | 25 | - `sample_case.cpp` 26 | - Write detailed process of the override functions 27 | - Constructor 28 | - Usually, users just need to initialize the constructor of `SimulationCase`. 29 | - Destructor 30 | - Users need to `delete` your defined members `spacecraft` and `ground_station`. 31 | - `InitializeTargetObjects` function 32 | - You have to make instances of your `spacecraft` and `ground_station` class here. 33 | - You also need to register log output by `LogSetup` function. 34 | - `UpdateTargetObjects` function 35 | - This function is called in the `SimulationCase::Main` function. 36 | - Users can update their spacecraft and ground station classes here. 37 | - `GetLogHeader` and `GetLogValue` functions 38 | - These functions are used in the Monte-Carlo simulation mode. For the normal mode, you don't need to care. 39 | - The log definition written here is saved at the start and end timing of every simulation case of the Monte-Carlo simulation. 40 | 41 | ## 3. Results of verifications 42 | NA 43 | 44 | ## 4. References 45 | NA 46 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_SampleGroundStation.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Sample Ground Station 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `SampleGroundStation` class is is an example of making the user defined ground station with the `GroundStation` class. 7 | 8 | ### 2. Related files 9 | - `src/simulation_sample_/ground_station/sample_ground_station.cpp, .hpp` 10 | - The `SampleGroundStation` class is defined here. 11 | - `src/simulation/ground_station/ground_station.cpp, .hpp` 12 | - The `GroundStation` class is defined here. 13 | - `src/simulation_sample/case/sample_case.cpp, .hpp` 14 | - The instance of the `SampleGroundStation` class is made in this class. 15 | 16 | ## 2. How to make user defined ground station 17 | - `sample_ground_station.hpp` 18 | - Define user defined ground station class. We use `SampleGroundStation` class here. 19 | - Users can name freely like `UtGroundStation`, `DsnGroundStation`, and others. 20 | - Inherit the `GroundStation` class. 21 | - You need to define override functions for all pure virtual functions of the `GroundStation` class. 22 | - Add components for ground station if need. 23 | 24 | - `sample_ground_station.cpp` 25 | - Write detailed process of the override functions 26 | - Constructor 27 | - Initialize `GroundStation` and call the `SampleGroundStation::Initialize` function. 28 | - Destructor 29 | - Delete components. 30 | - `LogSetup` function 31 | - Set log you need. 32 | - `Update` function 33 | - Call the `GroundStation::Update` function. 34 | - Call the ground station component's `Update` functions. 35 | 36 | ## 3. Results of verifications 37 | NA 38 | 39 | ## 4. References 40 | NA 41 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_SampleGroundStationComponents.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Sample Ground Station Components 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `SampleGroundStationComponents` class is an example of component list mounted on the `SampleGroundStation`. 7 | 8 | ### 2. Related files 9 | - `src/simulation_sample/ground_station/sample_ground_station_components.cpp, .hpp` 10 | - `SampleGroundStationComponents` is defined here. 11 | - `src/simulation_sample/ground_station/sample_ground_station.cpp, .hpp` 12 | - The instance of the `SampleGroundStationComponent` class is made in this class. 13 | 14 | ### 3. How to use 15 | - See [Sample Ground Station](./Spec_SampleGroundStation.md) because the `SampleGroundStationComponent` is used in the `SampleGroundStation`. 16 | - Details: TBW 17 | 18 | ## 2. Explanation of Algorithm 19 | TBW 20 | 21 | ## 3. Results of verifications 22 | NA 23 | 24 | ## 4. References 25 | NA 26 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_SampleSpacecraft.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Sample Spacecraft 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `SampleSpacecraft` class is is an example of making the user defined spacecraft with the `Spacecraft` class. 7 | 8 | ### 2. Related files 9 | - `src/simulation_sample/spacecraft/sample_spacecraft.cpp, .hpp` 10 | - The `SampleSpacecraft` class is defined here. 11 | - `src/simulation/spacecraft/spacecraft.cpp, .hpp` 12 | - The `Spacecraft` class is defined here. 13 | - `src/simulation_sample/case/sample_case.cpp, .hpp` 14 | - The instance of the `SampleSpacecraft` class is made in this class. 15 | 16 | 17 | ## 2. How to make user defined spacecraft 18 | - `sample_spacecraft.hpp` 19 | - Define user defined ground station class. We use `SampleSpacecraft` class here. 20 | - Users can name freely like `Equuleus`, `UtSpacecraft`, and others. 21 | - Inherit the `Spacecraft` class. 22 | - You need to define override functions for all pure virtual functions of the `Spacecraft` class. 23 | - Add components for spacecraft if need. 24 | 25 | - `sample_spacecraft.cpp` 26 | - Write detailed process of the override functions 27 | - Constructor 28 | - Initialize `Spacecraft` and make an instance of `SampleComponents` as installed components. 29 | - Other functions 30 | - Usually users don't need to care other functions for normal case. 31 | 32 | ## 3. Results of verifications 33 | NA 34 | 35 | ## 4. References 36 | NA 37 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_SampleSpacecraftComponents.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Sample Spacecraft Components 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `SampleSpacecraftComponents` class is an example of component list mounted on the `SampleSpacecraft`. 7 | 8 | ### 2. Related files 9 | - `src/simulation_sample/spacecraft/sample_spacecraft_components.cpp, .hpp` 10 | - `SampleSpacecraftComponents` is defined here. 11 | - `src/simulation_sample/spacecraft/sample_ground_station.cpp, .hpp` 12 | - The instance of the `SampleSpacecraftComponent` class is made in this class. 13 | 14 | ### 3. How to use 15 | - See [Sample Spacecraft](./Spec_Samplespacecraft.md) because the `SampleSpacecraftComponent` is used in the `SampleSpacecraft`. 16 | - Details: TBW 17 | 18 | ## 2. How to make user defined components list installed on spacecraft 19 | - `sample_components.hpp` 20 | - Define user defined components class. We use `SampleComponents` class here. 21 | - Users can name freely like `EquuleusComponents`, `UtSpacecraftComponents`, and others. 22 | - Inherit the `InstalledComponents` class. 23 | - Users need to define override functions for all pure virtual functions of the `InstalledComponents` class. 24 | - Add components you want as private members of this class. 25 | - In this sample, we defined many components here to show how to use them. 26 | 27 | - `sample_components.cpp` 28 | - Write detailed process of the override functions 29 | - Constructor 30 | - In the constructor, users need to make instances of the components using `InitHoge` function for each component. 31 | - Currently, codes written here is confusing. We need to fix them to simplify the codes. 32 | - Users can also define the power line connection here. 33 | - Destructor 34 | - Delete all components here. 35 | - `GenerateForce_b_N` and `GenerateTorque_b_Nm` 36 | - If actuators are installed, please add the force or torque generated by the actuators here. 37 | - `LogSetup` 38 | - Please add to log list if you need. 39 | 40 | 41 | ## 3. Results of verifications 42 | NA 43 | 44 | ## 4. References 45 | NA 46 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_SimulationCase.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Simulation Case 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `SimulationCase` class is the base class to define the simulation scenario. 7 | - Users can make user defined simulation scenario by inheriting this class. 8 | 9 | ### 2. Related files 10 | - `src/simulation/case/simulation_case.cpp, .hpp` 11 | - The `SimulationCase` class is defined here. 12 | - `src/simulation/case/sample_case.cpp, .hpp` 13 | - An example to make user defined scenario with the `SimulationCase` class. 14 | - `src/s2e.cpp` 15 | - The instance of the `SimulationCase` class is made in this main function. 16 | 17 | ### 3. How to use 18 | - See the following documents 19 | - [How To Make New Simulation Scenario](../../Tutorials/HowToMakeNewSimulationScenario.md) 20 | - [Sample Case](./Spec_SampleCase.md.md) 21 | 22 | 23 | ## 2. Explanation of Algorithm 24 | NA 25 | 26 | ## 3. Results of verifications 27 | NA 28 | 29 | ## 4. References 30 | NA 31 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_SimulationConfiguration.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Simulation Configuration 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - `SimulationConfiguration` is a structure for simulation setting parameters. 7 | - Parameters 8 | - Input/Output 9 | - initialize_base_file_name_ 10 | - main_logger_ 11 | - Spacecraft 12 | - number_of_simulated_spacecraft_ 13 | - spacecraft_file_list_ 14 | - Ground Station 15 | - number_of_simulated_ground_station_ 16 | - ground_station_file_list_ 17 | - Others 18 | - inter_sc_communication_file_ 19 | - gnss_file_ 20 | 21 | ### 2. Related files 22 | - `src/simulation/simulation_configuration.hpp` 23 | - The `SimulationConfiguration` structure is defined here. 24 | 25 | ### 3. How to use 26 | - The `SimulationConfiguration` is initialized in the beginning of the simulation case. 27 | - In other process, the `SimulationConfiguration` is used as read only to share the simulation setting parameters. 28 | 29 | ## 2. Explanation of Algorithm 30 | NA 31 | 32 | ## 3. Results of verifications 33 | NA 34 | 35 | ## 4. References 36 | NA 37 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_Spacecraft.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Spacecraft 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `Spacecraft` class is the base class to define the following basic features of spacecraft. 7 | - Component information 8 | - Clock Generator 9 | - The base class of components (`InstalledComponents`) 10 | - Dynamics information 11 | - Attitude 12 | - Orbit 13 | - Thermal 14 | - Relative Information 15 | - Local environment 16 | - Disturbance 17 | - Structure 18 | - Users can make user defined spacecraft by inheriting this class. 19 | 20 | ### 2. Related files 21 | - `src/simulation/spacecraft/spacecraft.cpp, .hpp` 22 | - The `Spacecraft` class is defined here. 23 | - `src/simulation/spacecraft/sample_spacecraft/sample_spacecraft.cpp, .hpp` 24 | - An example to make user defined spacecraft with the `Spacecraft` class. 25 | 26 | ### 3. How to use 27 | - See [Sample Spacecraft](./Spec_SampleSpacecraft.md) 28 | - Usually, users just need to consider the user defined components. The disturbance, dynamics of the spacecraft, and etc are already considered in this base class. 29 | 30 | ## 2. Explanation of Algorithm 31 | ### 1. `Initialize` function 32 | #### 1. overview 33 | - Initialize all members 34 | - There are two functions with same name 35 | - One is for single satellite case 36 | - The other is for multiple satellite case to consider relative information 37 | 38 | ### 1. `Update` function 39 | #### 1. overview 40 | - Update states or calculations for spacecraft 41 | 42 | #### 2. inputs and outputs 43 | - Input 44 | - Simulation time 45 | - Output 46 | - NA 47 | 48 | #### 3. algorithm 49 | 1. Clear the force and torque acting on the spacecraft to zero. 50 | 1. Update the local environment around the spacecraft 51 | - The previous spacecraft position and attitude are used. 52 | 1. Update the disturbance acting on the spacecraft 53 | - The local environment information and the previous spacecraft position and attitude are used. 54 | 1. Update the components behavior mounted on the spacecraft 55 | - The components measure the state or generate force/torque. 56 | 1. Add force and torque acting on the spacecraft 57 | - The force and torque from the disturbances 58 | - The force and torque from the components 59 | 1. Propagate the dynamics of the spacecraft 60 | - Attitude and Orbit 61 | 62 | ## 3. Results of verifications 63 | NA 64 | 65 | ## 4. References 66 | NA 67 | -------------------------------------------------------------------------------- /Specifications/Simulation/Spec_Structure.md: -------------------------------------------------------------------------------- 1 | # Specification documents for Structure 2 | 3 | ## 1. Overview 4 | 5 | ### 1. Functions 6 | - The `Structure` class integrates the following structure information of spacecraft. 7 | - Kinematic Information 8 | - Surface 9 | - Residual Magnetic Moment 10 | 11 | ### 2. Related files 12 | - `src/simulation/spacecraft/structure/structure.cpp, .hpp` 13 | - The `Structure` class is defined here. 14 | - `src/simulation/spacecraft/spacecraft.cpp, .hpp` 15 | - The `Structure` class is used here. 16 | 17 | ### 3. How to use 18 | - This class is used in the `Spacecraft` class and users usually don't need to care. 19 | - If users need to change the `Structure` during the simulation, please see [Example Change Structure](TBW) 20 | 21 | ## 2. Explanation of Algorithm 22 | NA 23 | 24 | ## 3. Results of verifications 25 | NA 26 | 27 | ## 4. References 28 | NA 29 | -------------------------------------------------------------------------------- /Tutorials/HowToPerformUartHilsTest.md: -------------------------------------------------------------------------------- 1 | # How to Perform UART HILS Test 2 | 3 | ## 1. Overview 4 | - Using the [SerialPort Class](https://docs.microsoft.com/en-us/dotnet/api/system.io.ports.serialport?view=dotnet-plat-ext-5.0) in System.IO.Ports Namespace, you can perform serial communication from the COM port of your computer. 5 | - The HILS test can be performed by replacing satellite components with simulated components in S2E. 6 | - This document describes how to perform HILS Test with **UART** components. 7 | - If you want to perform HILS Test with **I2C** components, refer to [here](./HowToPerformI2cHilsTest.md). 8 | 9 | ## 2. How to build files for the HILS test 10 | - **Currently, the HILS test is only available for Visual Studio users on Windows.** 11 | - Serial port operations are written in `Interface/HilsInOut/Ports/HilsUartPort.cpp` in c++/cli language. 12 | - When users want to execute the HILS test, complete the following steps. 13 | - Edit `s2e-core/CMakeLists.txt` 14 | - `option(USE_HILS "Use HILS" OFF)` -> `option(USE_HILS "Use HILS" ON)` 15 | 16 | - build `s2e-core` 17 | - **Note**: Currently, breakpoints do not work if you build c++/cli and c++ files simultaneously. 18 | 19 | ## 3. Sample codes for UART communication 20 | - The supported version of this document 21 | - Please confirm that the version of the documents and s2e-core is compatible. 22 | - Hardware Settings 23 | - Set loopback connection of two USB-UART converters using two USB ports of your computer. 24 | - Check the COM port number for each connection. 25 | - This tutorial assumes the use of [USB-COMi-SI](https://www.titan.tw/product/usb-comi-si/), a USB-UART converter. 26 | - Software Settings 27 | - `s2e-core/src/Component/Abstract/ExpHils.cpp` is an example of a simulation component for serial port communication. 28 | - `ExpHils` is instantiated in `s2e-core/src/Simulation/Spacecraft/SampleComponents.cpp`. 29 | - Uncomment as follows in `s2e-core/src/Simulation/Spacecraft/SampleComponents.cpp`. 30 | ```c++ 31 | // UART tutorial. Comment out when not in use. 32 | exp_hils_uart_responder_ = new ExpHils(clock_gen, 1, obc_, 3, 9600, hils_port_manager_, 1); 33 | exp_hils_uart_sender_ = new ExpHils(clock_gen, 0, obc_, 4, 9600, hils_port_manager_, 0); 34 | ``` 35 | ```c++ 36 | delete exp_hils_uart_responder_; 37 | delete exp_hils_uart_sender_; 38 | ``` 39 | - Edit the constructor's argument based on the COM port number checked above. 40 | - The fourth argument of ExpHils constructor is COM port number. 41 | - Uncomment as follows in `s2e-core/src/Simulation/Spacecraft/SampleComponents.h`. 42 | ```c++ 43 | ExpHils* exp_hils_uart_responder_; 44 | ExpHils* exp_hils_uart_sender_; 45 | ``` 46 | - For the HILS test, edit the setting of simulation speed in `s2e-core/data/SampleSat/ini/SampleSimBase.ini`. 47 | ```ini 48 | // Simulation speed. 0: as fast as possible, 1: real-time, >1: faster than real-time, <1: slower than real-time 49 | SimulationSpeed = 1 50 | ``` 51 | 52 | - Execution and Result 53 | - There are two ExpHils components, a sender component and a responder component. 54 | - The sender component sends out a new message like `ABC`, `BCD`, .... 55 | - The responder component returns the message as received. 56 | - Data returned from the responder to the sender is output to the console. 57 | SerialPortCommunicationConfirmation 58 | - If the comment `Error: the specified step_sec is too small for this computer.` appears, set `StepTimeSec` in SampleSimBase.ini to a larger value. -------------------------------------------------------------------------------- /Tutorials/HowToSimulateMultipleSatellites.md: -------------------------------------------------------------------------------- 1 | # How to simulate multiple satellites 2 | 3 | ## 1. Overview 4 | - S2E can simulate multiple satellites. 5 | - This document describes how to simulate multiple satellites. 6 | - For the sample codes, please see [s2e-user-example/sample/how-to-simulate-multiple-satellites](https://github.com/ut-issl/s2e-user-example/tree/sample/how-to-simulate-multiple-satellites). 7 | - The supported version of this document 8 | - Please confirm that the version of the documents and s2e-core are compatible. 9 | 10 | 11 | ## 2. How to add a new satellite 12 | 1. Edit `ini` files 13 | 1. Add `ini` files for the new satellite. 14 | - `satellite.ini`, `disturbance.ini`, `local_environment.ini`, `structure.ini` are needed. 15 | 2. Register the `ini` file for the new satellite in `simulation_base.ini` 16 | - The arguments of `satellite_file` are used as satellite ID in simulation. 17 | ``` 18 | [SIMULATION_SETTINGS] 19 | number_of_simulated_spacecraft = 2 20 | spacecraft_file(0) = INI_FILE_DIR_FROM_EXE/user_satellite.ini 21 | spacecraft_file(1) = INI_FILE_DIR_FROM_EXE/user_satellite2.ini 22 | ``` 23 | 24 | 2. Edit source code 25 | 1. Add new `UserSatellite` instances to `Case` members in `user_case.hpp`. 26 | ```c++ 27 | UserSatellite *spacecraft0_; //!< Instance of spacecraft 28 | UserSatellite *spacecraft1_; //!< Instance of spacecraft 29 | ``` 30 | 31 | 2. Edit `user_case.cpp` to copy the spacecraft related codes as the sample code. 32 | - Please see the sample code for more details. 33 | 34 | 3. Build and execute the `s2e-user` 35 | 36 | 4. You can see the log `spacecraft_angular_velocity_b_x[rad/s]` twice. The first one is the angular velocity of `satellite 0`, and the second one is the angular velocity of `satellite 1` in the log file. 37 | 38 | 39 | ## 3. Advanced usage 40 | - In the sample, the `satellite0_` and the `satellite1_` are completely the same, but users can change the settings of these satellites with editing the `ini` files. 41 | - Users can change the orbit, initial attitude, satellite structure and so on. 42 | - Users also can set the different components for the `satellite` 0 and 1, when users define different `UserSatellite` and `UserComponents` classes. 43 | - The document to use `relative information` will be written. 44 | - Users can also refer the [S2E-FF](https://github.com/ut-issl/s2e-ff) repository. 45 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Applications/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | 3 | project(C2A_USER_APPS) 4 | 5 | set(C2A_SRCS 6 | app_registry.c 7 | DriverInstances/di_aobc.c 8 | DriverInstances/di_gs.c 9 | DriverInstances/di_uart_test.c 10 | DriverInstances/di_s2e_uart_test.c 11 | UserDefined/debug_apps.c 12 | ) 13 | 14 | if(BUILD_C2A_AS_CXX) 15 | set_source_files_properties(${C2A_SRCS} PROPERTIES LANGUAGE CXX) # C++ 16 | endif() 17 | 18 | add_library(${PROJECT_NAME} OBJECT ${C2A_SRCS}) 19 | 20 | include(${C2A_USER_DIR}/common.cmake) 21 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Applications/DriverInstances/di_s2e_uart_test.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @brief An example of driver Instance for UART cmmunication test with S2E 4 | */ 5 | #pragma section REPRO 6 | #include "di_s2e_uart_test.h" 7 | 8 | #include 9 | 10 | #include 11 | 12 | static void S2E_UART_TEST_init_(void); 13 | static void S2E_UART_TEST_update_(void); 14 | static void S2E_UART_TEST_debug_output_(void); 15 | 16 | static S2eUartTest s2e_uart_test_instance_; 17 | const S2eUartTest* s2e_uart_test_instance; 18 | 19 | AppInfo DI_S2E_UART_TEST_update(void) 20 | { 21 | return AI_create_app_info("S2E UART TEST", S2E_UART_TEST_init_, S2E_UART_TEST_update_); 22 | } 23 | 24 | AppInfo DI_S2E_UART_TEST_debug_output(void) 25 | { 26 | return AI_create_app_info("S2E UART TEST Debug", NULL, S2E_UART_TEST_debug_output_); 27 | } 28 | 29 | static void S2E_UART_TEST_init_(void) 30 | { 31 | // Initialize UART communication 32 | s2e_uart_test_instance_.uart_config.ch = 1; 33 | s2e_uart_test_instance_.uart_config.baudrate = 115200; 34 | s2e_uart_test_instance_.uart_config.stop_bit = UART_STOP_BIT_1BIT; 35 | UART_init(&s2e_uart_test_instance_.uart_config); 36 | 37 | // Initialize TX data 38 | s2e_uart_test_instance_.tx_data[0] ='S'; 39 | s2e_uart_test_instance_.tx_data[1] ='E'; 40 | s2e_uart_test_instance_.tx_data[2] ='T'; 41 | s2e_uart_test_instance_.tx_data[3] ='A'; 42 | s2e_uart_test_instance_.tx_data[4] ='\n'; 43 | 44 | return; 45 | } 46 | 47 | static void S2E_UART_TEST_update_(void) 48 | { 49 | static unsigned char count = 0; 50 | // Send 51 | s2e_uart_test_instance_.tx_data[3] = 'A' + count; 52 | UART_tx(&s2e_uart_test_instance_.uart_config, s2e_uart_test_instance_.tx_data, 5); 53 | count++; 54 | if(count >= 26) count = 0; 55 | 56 | // Receive 57 | UART_rx(&s2e_uart_test_instance_.uart_config, s2e_uart_test_instance_.rx_data, 100); 58 | } 59 | 60 | static void S2E_UART_TEST_debug_output_(void) 61 | { 62 | Printf("S2E_UART_TEST: received data = %c, %c, %c. \n", s2e_uart_test_instance_.rx_data[0], 63 | s2e_uart_test_instance_.rx_data[1], 64 | s2e_uart_test_instance_.rx_data[2]); 65 | } 66 | #pragma section 67 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Applications/DriverInstances/di_s2e_uart_test.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @brief An example of driver Instance for UART cmmunication test with S2E 4 | */ 5 | #ifndef DI_S2E_UART_TEST_H_ 6 | #define DI_S2E_UART_TEST_H_ 7 | 8 | #include 9 | #include 10 | 11 | /** 12 | * @struct S2eUartTest 13 | * @brief Struct for S2E UART TEST 14 | * @note TODO: Move this struct to Driver 15 | */ 16 | typedef struct 17 | { 18 | UART_Config uart_config; //!< UART communication instance TODO: move to Driver 19 | unsigned char rx_data[100]; //!< Received data 20 | unsigned char tx_data[5]; //!< Transmission data 21 | } S2eUartTest; 22 | 23 | extern const S2eUartTest* s2e_uart_test_instance; 24 | 25 | AppInfo DI_S2E_UART_TEST_update(void); 26 | AppInfo DI_S2E_UART_TEST_debug_output(void); 27 | 28 | #endif // DI_S2E_UART_TEST_H_ 29 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Applications/app_headers.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * @brief Appのヘッダをまとめたヘッダ 4 | */ 5 | #ifndef APP_HEADERS_H_ 6 | #define APP_HEADERS_H_ 7 | 8 | // Core 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // Core TestApp 21 | #include 22 | 23 | // DI 24 | #include "DriverInstances/di_aobc.h" 25 | #include "DriverInstances/di_uart_test.h" 26 | #include "DriverInstances/di_gs.h" 27 | #include "DriverInstances/di_s2e_uart_test.h" 28 | 29 | // UserDefined 30 | #include "UserDefined/debug_apps.h" 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Applications/app_registry.c: -------------------------------------------------------------------------------- 1 | #pragma section REPRO 2 | #include "app_registry.h" 3 | 4 | #include 5 | 6 | #include "app_headers.h" 7 | 8 | static AM_ACK add_application_(size_t id, 9 | AppInfo (*app_creator)(void)); 10 | 11 | void AR_load_initial_settings(void) 12 | { 13 | add_application_(AR_NOP, NOP_create_app); 14 | add_application_(AR_DI_GS_CMD_PH, DI_GS_cmd_packet_handler); 15 | add_application_(AR_DI_GS_MST_PH, DI_GS_mst_packet_handler); 16 | add_application_(AR_DI_GS_RPT_PH, DI_GS_rpt_packet_handler); 17 | add_application_(AR_DI_UART_TEST, UART_TEST_update); 18 | add_application_(AR_DI_S2E_UART_TEST, DI_S2E_UART_TEST_update); 19 | add_application_(AR_GSC_DISPATCHER, GSCD_create_app); 20 | add_application_(AR_RTC_DISPATCHER, RTCD_create_app); 21 | add_application_(AR_TLC_DISPATCHER_GS, TLCD_gs_create_app); 22 | add_application_(AR_TLC_DISPATCHER_BC, TLCD_bc_create_app); 23 | add_application_(AR_TLC_DISPATCHER_TLM, TLCD_tlm_create_app); 24 | #ifdef TLCD_ENABLE_MISSION_TL 25 | add_application_(AR_TLC_DISPATCHER_MIS, TLCD_mis_create_app); 26 | #endif 27 | add_application_(AR_DI_AOBC, DI_AOBC_update); 28 | add_application_(AR_DI_AOBC_CDIS, DI_AOBC_cmd_dispatcher); 29 | add_application_(AR_EVENT_UTILITY, EVENT_UTIL_create_app); 30 | add_application_(AR_MEM_DUMP, MEM_create_app); 31 | add_application_(AR_TELEMETRY_MANAGER, TLM_MGR_create_app); 32 | add_application_(AR_DIVIDED_CMD_UTILITY, DCU_create_app); 33 | add_application_(AR_UTILITY_CMD, UTIL_CMD_create_app); 34 | add_application_(AR_APP_DBG_FLUSH_SCREEN, APP_DBG_flush_screen); 35 | add_application_(AR_APP_DBG_PRINT_TIMESTAMP, APP_DBG_print_time_stamp); 36 | add_application_(AR_APP_DBG_PRINT_CMD_STATUS, APP_DBG_print_cmd_status); 37 | add_application_(AR_APP_DBG_PRINT_EVENT_LOGGER0, APP_DBG_print_event_logger0); 38 | add_application_(AR_APP_DBG_PRINT_EVENT_LOGGER1, APP_DBG_print_event_logger1); 39 | add_application_(AR_APP_DBG_PRINT_EVENT_HANDLER, APP_DBG_print_event_handler); 40 | add_application_(AR_APP_DBG_PRINT_GIT_REV, APP_DBG_print_git_rev); 41 | add_application_(AR_DI_DBG_S2E_UART_TEST, DI_S2E_UART_TEST_debug_output); 42 | } 43 | 44 | static AM_ACK add_application_(size_t id, 45 | AppInfo (*app_creator)(void)) 46 | { 47 | AppInfo ai = app_creator(); 48 | return AM_register_ai(id, &ai); 49 | } 50 | 51 | #pragma section 52 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Applications/app_registry.h: -------------------------------------------------------------------------------- 1 | #ifndef APP_REGISTRY_H_ 2 | #define APP_REGISTRY_H_ 3 | #include 4 | 5 | // こいつの自動生成がほしい... 6 | typedef enum 7 | { 8 | AR_NOP, 9 | AR_DI_GS_CMD_PH, 10 | AR_DI_GS_MST_PH, 11 | AR_DI_GS_RPT_PH, 12 | AR_DI_AOBC, 13 | AR_DI_AOBC_CDIS, 14 | AR_DI_UART_TEST, 15 | AR_DI_S2E_UART_TEST, 16 | AR_GSC_DISPATCHER, 17 | AR_RTC_DISPATCHER, 18 | AR_TLC_DISPATCHER_GS, 19 | AR_TLC_DISPATCHER_BC, 20 | AR_TLC_DISPATCHER_TLM, 21 | #ifdef TLCD_ENABLE_MISSION_TL 22 | AR_TLC_DISPATCHER_MIS, 23 | #endif 24 | AR_EVENT_UTILITY, 25 | AR_ANOMALY_HANDLER, 26 | AR_MEM_DUMP, 27 | AR_TELEMETRY_MANAGER, 28 | AR_DIVIDED_CMD_UTILITY, 29 | AR_UTILITY_CMD, 30 | AR_UTILITY_COUNTER, 31 | AR_APP_DBG_FLUSH_SCREEN, 32 | AR_APP_DBG_PRINT_TIMESTAMP, 33 | AR_APP_DBG_PRINT_CMD_STATUS, 34 | AR_APP_DBG_PRINT_EVENT_LOGGER0, 35 | AR_APP_DBG_PRINT_EVENT_LOGGER1, 36 | AR_APP_DBG_PRINT_EVENT_HANDLER, 37 | AR_APP_DBG_PRINT_GIT_REV, 38 | AR_DI_DBG_S2E_UART_TEST, 39 | } AR_APP_ID; 40 | 41 | void AR_load_initial_settings(void); 42 | 43 | #endif // APP_REGISTRY_H_ 44 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Settings/Modes/TaskLists/Elements/tl_elem_debug_display.c: -------------------------------------------------------------------------------- 1 | #pragma section REPRO 2 | #include "tl_elem_debug_display.h" 3 | 4 | #include "../../../../Applications/app_registry.h" 5 | #include "../../../../TlmCmd/block_command_definitions.h" 6 | 7 | #include 8 | 9 | void BCL_load_tl_elem_debug_display_initial(void) 10 | { 11 | BCL_tool_register_app ( 0, AR_APP_DBG_FLUSH_SCREEN); 12 | BCL_tool_register_app ( 1, AR_APP_DBG_PRINT_GIT_REV); 13 | BCL_tool_register_app ( 2, AR_APP_DBG_PRINT_TIMESTAMP); 14 | BCL_tool_register_app ( 3, AR_APP_DBG_PRINT_CMD_STATUS); 15 | BCL_tool_register_app ( 4, AR_APP_DBG_PRINT_EVENT_LOGGER0); 16 | BCL_tool_register_app ( 5, AR_APP_DBG_PRINT_EVENT_LOGGER1); 17 | BCL_tool_register_app ( 6, AR_APP_DBG_PRINT_EVENT_HANDLER); 18 | BCL_tool_register_app ( 7, AR_DI_DBG_S2E_UART_TEST); 19 | BCL_tool_register_app ( 8, AR_NOP); 20 | BCL_tool_register_app ( 9, AR_NOP); 21 | } 22 | 23 | #pragma section 24 | -------------------------------------------------------------------------------- /Tutorials/SampleCodes/c2a_integration/c2a_src_user/Settings/Modes/TaskLists/Elements/tl_elem_drivers_update.c: -------------------------------------------------------------------------------- 1 | #pragma section REPRO 2 | #include "tl_elem_drivers_update.h" 3 | 4 | #include "../../../../Applications/app_registry.h" 5 | #include "../../../../TlmCmd/block_command_definitions.h" 6 | 7 | #include 8 | 9 | 10 | void BCL_load_tl_elem_drivers_update_initial(void) 11 | { 12 | BCL_tool_register_app(0, AR_DI_AOBC); 13 | BCL_tool_register_app(1, AR_DI_S2E_UART_TEST); 14 | BCL_tool_register_app(2, AR_DI_AOBC); 15 | BCL_tool_register_app(3, AR_NOP); 16 | BCL_tool_register_app(4, AR_DI_AOBC); 17 | BCL_tool_register_app(5, AR_NOP); 18 | BCL_tool_register_app(6, AR_DI_AOBC); 19 | BCL_tool_register_app(7, AR_NOP); 20 | BCL_tool_register_app(8, AR_DI_AOBC); 21 | BCL_tool_register_app(9, AR_NOP); 22 | } 23 | 24 | #pragma section 25 | -------------------------------------------------------------------------------- /Tutorials/figs/AngularVelocityTrueVsGyro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/AngularVelocityTrueVsGyro.png -------------------------------------------------------------------------------- /Tutorials/figs/C2aBuild.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/C2aBuild.JPG -------------------------------------------------------------------------------- /Tutorials/figs/C2aCommunicationConfirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/C2aCommunicationConfirmation.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_ComponentControl_result1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_ComponentControl_result1.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_ComponentControl_result2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_ComponentControl_result2.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_ComponentControl_result3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_ComponentControl_result3.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_ComponentControl_result4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_ComponentControl_result4.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_ComponentControl_result5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_ComponentControl_result5.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_DirectControl_result1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_DirectControl_result1.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_DirectControl_result2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_DirectControl_result2.png -------------------------------------------------------------------------------- /Tutorials/figs/ControlAlgorithm_DirectControl_result3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/ControlAlgorithm_DirectControl_result3.png -------------------------------------------------------------------------------- /Tutorials/figs/GettingStarted_PlotIssOrbit3d.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/GettingStarted_PlotIssOrbit3d.JPG -------------------------------------------------------------------------------- /Tutorials/figs/GettingStarted_PlotIssOrbitInMiller.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/GettingStarted_PlotIssOrbitInMiller.JPG -------------------------------------------------------------------------------- /Tutorials/figs/GettingStarted_PlotPrismOrbit3d.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/GettingStarted_PlotPrismOrbit3d.JPG -------------------------------------------------------------------------------- /Tutorials/figs/GettingStarted_PlotPrismOrbitInMiller.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/GettingStarted_PlotPrismOrbitInMiller.JPG -------------------------------------------------------------------------------- /Tutorials/figs/SerialPortCommunicationConfirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/SerialPortCommunicationConfirmation.png -------------------------------------------------------------------------------- /Tutorials/figs/SerialPortCommunication_Confirmation2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/SerialPortCommunication_Confirmation2.png -------------------------------------------------------------------------------- /Tutorials/figs/SerialPortCommunication_I2CLoopback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ut-issl/s2e-documents/6da618ea25a0fe18ab0b4ee8a3208aa5951db4c4/Tutorials/figs/SerialPortCommunication_I2CLoopback.png -------------------------------------------------------------------------------- /book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | language = "en" 3 | multilingual = false 4 | 5 | authors = ["sksat"] 6 | 7 | src = "src" 8 | title = "S2E documents" 9 | 10 | [output.html] 11 | mathjax-support = true 12 | 13 | #[preprocessor.foo] 14 | #command = "bash prepro.sh" 15 | -------------------------------------------------------------------------------- /prepro.sh: -------------------------------------------------------------------------------- 1 | rm -rf src 2 | mkdir -p src 3 | cp *.md src/ 4 | cp -r General src/ 5 | cp -r Specifications src/ 6 | cp -r Tutorials src/ 7 | 8 | # mathjax 9 | find src -type f -name '*.md' -exec sed -i -e 's/$`/\\\\( /g' -e 's/`\$/ \\\\)/g' {} \; 10 | find src -type f -name '*.md' -exec sed -i -z -e 's/```math\n\([^`]*\)```\n/\\\\[\n\1\\\\]\n/g' {} \; 11 | # escape in block equation 12 | find src -type f -name '*.md' -exec sed -i -z -e '/\\\\\[/,/\\\\\]/s/\\\\\n/\\\\\\\\\n/g' {} \; 13 | find src -type f -name '*.md' -exec sed -i -z -e '/\\\\\[/,/\\\\\]/s/}\_{/}\\_{/g' {} \; 14 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | --------------------------------------------------------------------------------