Skip to content

Commit

Permalink
Merge pull request #97 from ut-issl/develop
Browse files Browse the repository at this point in the history
Merge develop to main for Major update v7.0.0
  • Loading branch information
200km authored Dec 21, 2023
2 parents f2e1fe4 + 8e962dc commit d40fdc7
Show file tree
Hide file tree
Showing 97 changed files with 529 additions and 3,742 deletions.
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

0 comments on commit d40fdc7

Please sign in to comment.