Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to main for Major update v7.0.0 #97

Merged
merged 67 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
d7521cc
Update actions/checkout action to v4
renovate[bot] Sep 4, 2023
fbc47c0
Merge pull request #82 from ut-issl/renovate/actions-checkout-4.x
200km Sep 4, 2023
7f34995
Update crazy-max/ghaction-github-labeler action to v5
renovate[bot] Sep 10, 2023
8ebb6ee
Merge pull request #83 from ut-issl/renovate/crazy-max-ghaction-githu…
200km Sep 12, 2023
47d6a12
Update actions/checkout digest to 8ade135
renovate[bot] Oct 1, 2023
0d22dd5
Merge pull request #84 from ut-issl/renovate/actions-checkout-digest
200km Oct 2, 2023
70a09a2
Fix typo in coding convention
200km Oct 6, 2023
e566a6d
Fix typo in component
200km Oct 6, 2023
2b9e3cf
Fix typo in component
200km Oct 6, 2023
97e9472
Merge pull request #86 from ut-issl/feature/fix-typo
200km Oct 7, 2023
18d1b35
Update actions/checkout digest to b4ffde6
renovate[bot] Oct 19, 2023
452eb62
Merge pull request #88 from ut-issl/renovate/actions-checkout-digest
200km Oct 19, 2023
d9c6bb4
Update corresponding s2e-core version info
200km Nov 6, 2023
1678bf0
Update index to suit with the latest s2e
200km Nov 6, 2023
95eac21
Fix typo
200km Nov 6, 2023
dddde09
Update sensor base
200km Nov 6, 2023
34f6cb9
Update UART communication
200km Nov 6, 2023
5bc0f18
Update component base
200km Nov 6, 2023
e7308a1
Remove
200km Nov 6, 2023
94a9357
Update telescope
200km Nov 6, 2023
d138298
Update ReactionWheelJitter
200km Nov 6, 2023
d20cfc7
Update StarSensor
200km Nov 6, 2023
02ba774
Update SimpleThruster
200km Nov 6, 2023
1a2b54b
Update PowerControlUnit
200km Nov 6, 2023
3b59eb9
Fix typo
200km Nov 6, 2023
4a09115
Update disturbances
200km Nov 6, 2023
3d97b4e
Update geopotential
200km Nov 6, 2023
ca1720b
Update gravity gradient
200km Nov 6, 2023
8eea520
Update magnetic disturbance
200km Nov 6, 2023
39e28f4
Update air drag
200km Nov 6, 2023
00112d2
Update SRP
200km Nov 6, 2023
8e18606
Update Third body
200km Nov 6, 2023
6347cd2
Update attitude
200km Nov 6, 2023
00acada
Update relative orbit
200km Nov 6, 2023
d0f7673
Update Encke and Keplerorbit
200km Nov 6, 2023
8246a9e
Fix typo
200km Nov 6, 2023
ae90035
Update Atmosphere
200km Nov 6, 2023
7d33bce
Update CelestialInformation
200km Nov 6, 2023
07a5fab
Update EarthRotation
200km Nov 6, 2023
699b29c
Update Geomagnetic field
200km Nov 6, 2023
154c78a
Update Hipparcos
200km Nov 6, 2023
abaa224
Update Local celestial info
200km Nov 6, 2023
bbcecee
Update SRP environment
200km Nov 6, 2023
2834360
Update PowerPort
200km Nov 6, 2023
d9f8a26
Update Overall structure
200km Nov 6, 2023
1e99312
Update monte carlo
200km Nov 6, 2023
9074e2b
Delete sample codes
200km Nov 6, 2023
e999bae
Fix readme to describe s2e-user-example
200km Nov 6, 2023
909eb5d
Merge pull request #90 from ut-issl/feature/update-component-document…
200km Nov 7, 2023
e37e8af
Merge pull request #91 from ut-issl/feature/update-disturbance-v7
200km Nov 7, 2023
8c38052
Merge pull request #92 from ut-issl/feature/update-dynamics-v7
200km Nov 7, 2023
25786a0
Merge pull request #93 from ut-issl/feature/update-environment-v7
200km Nov 7, 2023
88d9afd
Merge pull request #94 from ut-issl/feature/update-others-v7
200km Nov 7, 2023
c9db51a
Merge pull request #89 from ut-issl/feature/update-v7
200km Nov 7, 2023
0e34773
Update new scenario tutorial to refer s2e-user-example
200km Dec 18, 2023
2b9a9cd
Update how to add tutorial to refer s2e-user-example
200km Dec 18, 2023
0c345f8
Update how to make new components tutorial to refer s2e-user-example
200km Dec 18, 2023
5964726
Update monte-carlo tutorial to refer s2e-user-example
200km Dec 18, 2023
2dc4ec8
Update how to add control algorithm to refer s2e-user-example
200km Dec 18, 2023
578c24e
Update how to integrate c2a to refer s2e-user-example
200km Dec 18, 2023
7df5108
Update how to simulate multiple satellite to refer s2e-user-example
200km Dec 18, 2023
47743e0
Delete old sample codes
200km Dec 18, 2023
4410514
Fix readme small
200km Dec 18, 2023
6f37caf
Merge pull request #95 from ut-issl/feature/update-tutorial
200km Dec 19, 2023
c0a9b4e
Merge main
200km Dec 19, 2023
5fd8a21
Delete s2e sample codes
200km Dec 19, 2023
8e962dc
Merge pull request #96 from ut-issl/feature/merge-main
200km Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: reviewdog/action-actionlint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion General/CodingConvention.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Coding Convention of S2E

## Fomatter
## Formatter
- We use [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) for S2E.
- We selected `Google` base style with small modifications.
- Details are written in [.clang-format](https://github.com/ut-issl/s2e-core/blob/develop/.clang-format).
Expand Down
4 changes: 2 additions & 2 deletions General/HowToDownloadNRLMSISE00library.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

## 2. How to set up NRLMSISE00 for S2E [OLD Descriptions]
1. In any environment, run `s2e-core/scripts/Common/download_nrlmsise00_src_and_table.sh`
+ Source codes of NRLMISE00 and `SpaceWeather.txt` will be downloaded, and `libnrlmsise00.a` will be made for Linux and OSX.
+ Source codes of NRLMSISE00 and `SpaceWeather.txt` will be downloaded, and `libnrlmsise00.a` will be made for Linux and OSX.
+ 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`.
+ 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.


2. For Windows Visual Studio users, run `s2e-core/scripts/VisualStudio/make_nrlmsise00_VS32bit.bat` after the process 1.
+ VS command prompt will be launched, then run `scripts/VisualStudio/make_libnrlmsise.bat` in VS command prompt.
+ `libnrlmise.lib`, which is the library for Windows Visual Studio will be made.
+ `libnrlmsise.lib`, which is the library for Windows Visual Studio will be made.
+ 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.

3. Check your directories are as follows.
Expand Down
4 changes: 2 additions & 2 deletions General/HowToVisualizeSimulationResults.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# How to Visualize Simulation Results

## 1. Overview
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 thier simulation with the following methods.
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.
- Open the CSV file with a spreadsheet application like Excel, and make charts to analyze and/or visualize the results.
- Open the CSV file with user's handmaded programs to analyze and/or visualize the resutls.
- Open the CSV file with user's handmade programs to analyze and/or visualize the results.
- Use the `Plot Scripts` provided by the `S2E-CORE` to visualize the results.

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.
Expand Down
91 changes: 67 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- The branch construction
- main
- Documents for the latest stable version of s2e-core
- Current version supports [s2e-core v6.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v6.0.0)
- Current version supports [s2e-core v7.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v7.0.0)
- If there are several patch update versions, please use the latest one to avoid bugs.
- The old versions are managed with `release/tag/v.*.*.*`
- The `major` version number is compatible with s2e-core's `major` version number.
Expand Down Expand Up @@ -38,8 +38,11 @@
1. Tutorials
- We strongly recommend to sequentially follow the tutorials without external hardware at first.
1. [Getting Started](./Tutorials/GettingStarted.md)

- <details><summary> Tutorials without any external hardware </summary>

- Users can refer the [s2e-user-example](https://github.com/ut-issl/s2e-user-example) to see sample codes of the following tutorials.

1. [How To Make New Simulation Scenario](./Tutorials/HowToMakeNewSimulationScenario.md)
1. [How To Add Components](./Tutorials/HowToAddComponents.md)
1. [How To Make New Components](./Tutorials/HowToMakeNewComponents.md)
Expand All @@ -52,6 +55,7 @@
</details>

- <details><summary> Tutorials with external hardware for HILS test </summary>

- **NOTE**: Currently, these tutorials don't follow the major update v6.0.0.

1. [How To Perform UART HILS Test](./Tutorials/HowToPerformUartHilsTest.md)
Expand Down Expand Up @@ -132,6 +136,7 @@
1. [Reaction wheel jitter](./Specifications/Component/AOCS/Spec_RWJitter.md)
1. [Star sensor](./Specifications/Component/AOCS/Spec_STT.md)
1. Sun sensor: TBW
1. MTQ-Magnetometer interference: TBW

</details>

Expand All @@ -149,7 +154,9 @@
- `communication` directory manages components for communication of spacecraft and ground stations.

1. Antenna: TBW
1. Antenna Radiation pattern: TBW
1. GS calculator: TBW
1. WINGS command sender to C2A: TBW

</details>

Expand Down Expand Up @@ -210,7 +217,8 @@
1. [Surface force](./Specifications/Disturbance/Spec_SurfaceForce.md)
1. [Air Drag](./Specifications/Disturbance/Spec_SurfaceForce_AirDrag.md)
1. [Solar Radiation Pressure](./Specifications/Disturbance/Spec_SurfaceForce_SolarRadiation.md)

1. Lunar Gravity field: TBW

</details>

1. <details><summary> Dynamics </summary>
Expand All @@ -221,15 +229,22 @@
1. [Overview of Attitude calculation](./Specifications/Dynamics/Spec_Attitude.md)
1. [Attitude RK4](./Specifications/Dynamics/Spec_Rk4Attitude.md)
1. [Controlled Attitude](./Specifications/Dynamics/Spec_ControlledAttitude.md)

1. Orbit
1. [Overview of Orbit calculation](./Specifications/Dynamics/Spec_Orbit.md)
1. [Kepler Orbit](./Specifications/Dynamics/Spec_KeplerOrbit.md)
1. [RK4 Orbit Propagation](./Specifications/Dynamics/Spec_Rk4Orbit.md)
1. [SGP4 Orbit Propagation with TLE](./Specifications/Dynamics/Spec_Sgp4.md)
1. [Encke's method](./Specifications/Dynamics/Spec_EnckeMethod.md)
1. [Relative Orbit](./Specifications/Dynamics/Spec_RelativeOrbit.md)
1. Thermal: not supported now.


1. Thermal
1. Heater: TBW
1. Heater Controller: TBW
1. Heat load: TBW
1. Node: TBW
1. Temperature: TBW

</details>

1. <details><summary> Environment </summary>
Expand All @@ -246,7 +261,8 @@
1. Global Environment
1. [Global Environment](./Specifications/Environment/Spec_GlobalEnvironment.md)
1. [Celestial Information](./Specifications/Environment/Spec_CelestialInformation.md)
1. [Celestial Rotation](./Specifications/Environment/Spec_CelestialRotation.md)
1. [Earth Rotation](./Specifications/Environment/Spec_CelestialRotation.md)
1. Moon Rotation: TBW
1. [Clock Generator](./Specifications/Environment/Spec_ClockGenerator.md)
1. [GNSS Satellites](./Specifications/Environment/Spec_GnssSatellites_en.md), ([Japanese version](./Specifications/Environment/Spec_GnssSatellites_ja.md))
1. [Hipparcos Catalogue](./Specifications/Environment/Spec_HipparcosCatalogue_en.md), ([Japanese version](./Specifications/Environment/Spec_HipparcosCatalogue_ja.md))
Expand All @@ -264,6 +280,16 @@

1. <details><summary> Library </summary>

1. Atmosphere
1. Simple air density model: TBW
1. Harris-Priester model: TBW

1. Communication
1. COM port interface: TBW

1. Control Utilities
1. First order lag: TBW

1. External
- External library related source codes.
1. IGRF (International Geomagnetic Reference Field): TBW
Expand All @@ -274,49 +300,66 @@
1. Geodesy
1. Geodetic Position: TBW

1. Communication
1. COM port interface: TBW

1. <details><summary> math </summary>

1. MatVec (Matrix and Vector) : TBW
1. Matrix: TBW
1. ODE (Ordinary Differential Equation): TBW
1. Quaternion: TBW
1. Vector: TBW
1. s2e_math: TBW

</details>
1. Gravity
1. Gravity potential: TBW

1. Initialize
1. Initialize file access: TBW
1. WINGS operation file: TBW
1. C2A command database:TBW

1. Logger
1. Loggable: TBW
1. Log Utility: TBW
1. Logger: TBW

1. optics
1. <details><summary> math </summary>

1. Constants : TBW
1. Matrix: TBW
1. Matrix and Vector : TBW
1. Ordinary Differential Equation: TBW
- This library will be replaced by `Numerical integration`.
1. Quaternion: TBW
1. S2E math: TBW
1. Vector: TBW

</details>

1. Numerical integration
1. Runge Kutta method: TBW
1. 4th order Runge Kutta method: TBW
1. Embedded Runge Kutta method: TBW
1. Runge Kutta Fehlberg: TBW
1. 5th order Dormand and Prince: TBW
1. Numerical integrator: TBW
1. Numerical integrator manager: TBW
1. ODE examples: TBW

1. Optics
1. Gaussian Beam Base: TBW

1. Orbit
1. Kepler Orbit: TBW
1. Orbital Elements: TBW
1. Relative Orbit Models: TBW

1. Planet rotation
1. Moon rotation utilities: TBW

1. Randomization
1. Global randomization: TBW
1. Normal randomization: TBW
1. Minimal standard linear congruential generator
1. Minimal standard linear congruential generator with shuffle
1. Random walk
1. Minimal standard linear congruential generator: TBW
1. Minimal standard linear congruential generator with shuffle: TBW
1. Random walk: TBW

1. utilities
1. Macros: TBW
1. Endian: TBW
1. SLIP: TBW
1. Macros: TBW
1. Quantization: TBW
1. Ring Buffer: TBW
1. SLIP: TBW

</details>

Expand Down
34 changes: 17 additions & 17 deletions Specifications/Component/AOCS/Spec_RWJitter.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Specification for RW jitter
# Specification for ReactionWheelJitter class

## 1. Overview
- `RWJitter` class simulates the high-frequency jitter of Reaction Wheels.
- `ReactionWheelJitter` class simulates the high-frequency jitter of Reaction Wheels.
- This class uses:
+ Angular velocity of the RW
+ Parameters of RW disturbance measured by experiments
Expand All @@ -10,31 +10,31 @@
+ RW jitter forces and torques in the body frame

1. functions
- `CalcJitter(double angular_velocity)`
+ Simulates the jitter
- `CalcJitter`
+ Simulates the reaction wheel jitter
+ (If Enabled) Calls `AddStructuralResonance()`. This function adds the effect of structural resonance to the high-frequency disturbance of RW. You can choose to consider the effect of structural resonance or not.

2. files
- `RWJitter.cpp`, `RWJitter.h`
- `RW.ini`
- `radial_force_harmonics_coef.csv`,`radial_torque_harmonics_coef.csv`
- `reaction_wheel_jitter.cpp`, `reaction_wheel_jitter.hpp`
- `reaction_wheel.ini`
- `radial_force_harmonics_coefficients.csv`,`radial_torque_harmonics_coefficients.csv`
+ These files contain the harmonic coefficients from experiments.

3. how to use
- Set the harmonics coefficients in `radial_force_harmonics_coef.csv` and `radial_torque_harmonics_coef.csv`
- Set the harmonics coefficients in `radial_force_harmonics_coefficients.csv` and `radial_torque_harmonics_coefficients.csv`
- The first column is an array of the $h_i$( $i$-th harmonic number). The second column is an array of the $C_i$ (amplitude of the $i$-th harmonic).
- Set parameters in `RW.ini`
- Set parameters in `reaction_wheel.ini`
- When only the static imbalance and dynamic imbalance(correspond to $C_i$ at $h_i\ne1$) is known according to the spec sheet, edit the files as follows.
+ `radial_force_harmonics_coef.csv`
+ `radial_force_harmonics_coefficients.csv`
* Set $h_1$(the line 1 of the first column) as $1.0$.
* Set $C_1$(the line 1 of the second column) as the static imbalance on the spec sheet.
+ `radial_torque_harmonics_coef.csv`
+ `radial_torque_harmonics_coefficients.csv`
* Set $h_1$(the line 1 of the first column) as $1.0$.
* Set $C_1$(the line 1 of the second column) as the dynamic imbalance on the spec sheet.
+ `RW.ini`
+ `reaction_wheel.ini`
* Set `harmonics_degree = 1`.
- Set the jitter update period to an appropriate value.
+ Jitter update period is equal to the product of `CompoUpdateIntervalSec` in `Simbase.ini` and `fast_prescaler` in `RW.ini`.
+ Jitter update period is equal to the product of `CompoUpdateIntervalSec` in `simulation_base.ini` and `fast_prescaler` in `reaction_wheel.ini`.
+ For correct calculation, the update period of the jitter should be set to approximately 0.1ms.
+ A larger update period is not a problem, but it will cause aliasing in the jitter waveform.

Expand Down Expand Up @@ -123,18 +123,18 @@
- The RW model is rotated at 4000 rpm, 6000 rpm, and 8000 rpm, and the disturbance torque is compared with the actual experiment.
2. initial condition
1. input files
- `SampleSimbase.ini`
- `RW.ini`
- `sample_simulation_base.ini`
- `reaction_wheel.ini`
2. initial condition
- `SampleSimbase.ini`
- `sample_simulation_base.ini`
```
EndTimeSec = 0.5
StepTimeSec = 0.0001
CompoUpdateIntervalSec = 0.0001
LogOutputIntervalSec = 0.0001
```

- `RW.ini`
- `reaction_wheel.ini`
```
fast_prescaler = 1
max_angular_velocity = 9000.0
Expand Down
15 changes: 7 additions & 8 deletions Specifications/Component/AOCS/Spec_STT.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Specification for Attitude Dynamics
# Specification for StarSensor class

## 1. Overview
1. functions
- `STT` class simulates a star sensor.
- The `STT` class calculates and returns the observed quaternions and error flags.
- `StarSensor` class simulates a star sensor.
- The `StarSensor` class calculates and returns the observed quaternions and error flags.

2. files
- STT.cpp, STT.h : Definitions and declarations of the class
- InitSTT.cpp : Interface functions for the initialization of `STT` class
- STT.ini : Initialization file
- `star_sensor.cpp, star_sensor.hpp` : Definitions and declarations of the class
- `star_sensor.ini` : Initialization file

3. how to use
- Set the parameters in `STT.ini`.
- Create an instance by using the initialization function `InitSTT`
- Set the parameters in `star_sensor.ini`.
- Create an instance by using the initialization function `InitStarSensor`
- Use `Get*` function to get quaternion information.


Expand Down
8 changes: 4 additions & 4 deletions Specifications/Component/Abstract/Spec_ComponentBase.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Specification of ComponentBase class
# Specification of Component class

## 1. Overview
1. Functions
- The `ComponentBase` class is an abstract class to handle the electrical power and the update timing of components.
- The `Component` class is an abstract class to handle the electrical power and the update timing of components.
- This class has two virtual functions: `MainRoutine` and `FastUpdate`. Both are called periodically. Users can select the functions according to the required calling period.
+ The `MainRoutine` function is the components' main function. Most of the processing is handled in this function.
+ 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).

2. Related Files
- Main file: `ComponentBase.h`, `ComponentBase.cpp`
- Main file: `component.hpp`, `component.cpp`

3. How to use
- Inherit this class by the user's component class.
- The `RWModel` in `S2E_CORE` is useful as a usage example of the `FastUpdate`.
- The `ReactionWheel` in `S2E_CORE` is useful as a usage example of the `FastUpdate`.

## 2. Explanation of Algorithm
1. Constructor
Expand Down
Loading