Skip to content

Commit e5e764a

Browse files
authored
Merge pull request #72 from ut-issl/develop
Merge main for v6.0.0 update
2 parents 27030e2 + c262ab1 commit e5e764a

File tree

171 files changed

+5609
-3696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+5609
-3696
lines changed

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v3
1818

1919
- name: Run Labeler
20-
uses: crazy-max/ghaction-github-labeler@v3
20+
uses: crazy-max/ghaction-github-labeler@v4
2121
with:
2222
github-token: ${{ secrets.GITHUB_TOKEN }}
2323
yaml-file: .github/labels.yml

.github/workflows/mdbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fetch-depth: 0
1717

1818
- name: setup mdbook
19-
uses: peaceiris/actions-mdbook@v1.1.14
19+
uses: peaceiris/actions-mdbook@v1.2.0
2020
with:
2121
mdbook-version: 'latest'
2222

General/CodingConvention.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
- Now discussing
1111
- The following rules are follows until the new naming rule is decided.
1212
- 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.
1314

1415
- File and directory Name
15-
- `CamelCase`
16+
- `snake_case`
17+
- C++ files should end in `.cpp`, and header files should end in `.hpp`.
1618

1719
- Macro (define)
1820
- Snake case with capital case
@@ -36,6 +38,9 @@
3638
- Methods (functions) in the class
3739
- `CamelCase`
3840

41+
- The #define Guard
42+
- Apply [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
43+
- `#pragma once` is prohibited
3944

4045
## Documentation
4146
- Use Doxygen
@@ -47,3 +52,37 @@
4752
## Initialization files (`.ini` files)
4853
- Comments
4954
- 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

General/DocumentFormat.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
## 0. General rule
44
- The file name should be `Spec_CamelCase.md` in the Specifications directory.
55
- Please use the markdown format.
6-
- The markdown files are converted to a book with [mdBook](https://rust-lang.github.io/mdBook/) and published in Github Pages.
7-
- The equations are rendered with [MathJax](https://www.mathjax.org/)
8-
- e.g., Please use `\boldsymbol` for bold characters instead of `\bm`.
9-
- So, please follow the writing rules of mdBook and MathJax.
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/).
107

118
## 1. Overview
129
1. Functions
@@ -28,21 +25,14 @@
2825
2. Inputs and Outputs
2926

3027
3. Algorithm
31-
- MathJax description
32-
- please use equations as
33-
34-
\\[
28+
- Math description
29+
- please use equations as
30+
$$\dot{\boldsymbol{x}}=f(\boldsymbol{x},t)$$
31+
or
32+
```math
3533
\dot{\boldsymbol{x}}=f(\boldsymbol{x},t)
36-
\\]
37-
- you can also use inline equation as \\( x=y \\)
38-
39-
- Following description is automatically converted to the above style, but do not use this for new files.
40-
41-
```math
42-
\dot{\boldsymbol{x}}=f(\boldsymbol{x},t)
43-
```
44-
- inline equation: $`x=y`$
45-
34+
```
35+
- you can also use inline equation as $x=y$
4636
4737
4. Note
4838

General/HowToCompileWithVisualStudio.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,16 @@ This document explains how to build and execute the Visual Studio environment wi
4242
<pre>
4343
├─ExtLibraries
4444
│ └─cspice
45-
│ └─nrlmsise00
45+
│ └─GeoPotential
46+
| └─nrlmsise00
4647
└─s2e-core
4748
</pre>
4849

4950
## 3. The flow of building and execution in Visual Studio 2022
5051
1. Launch VS 2022
5152

5253
2. Open the S2E project
53-
- Click `Files/Open/CMake`.
54+
- Click `File/Open/CMake`.
5455
- Select `s2e-core/CMakeLists.txt` at the top directory of the cloned S2E.
5556
- Wait a moment until the `CMake generation` is finished.
5657

General/HowToDownloadNRLMSISE00library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- [NRLMSISE00](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2002JA009430) is an atmosphere model to calculate an air density, considering the solar activity.
55
- [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.
66
- How to use NRLMSISE00 is written in the [Specification of Atmosphere model](../Specifications/Environment/Spec_Atmosphere.md).
7-
- **Note** The [s2e-core v5.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v5.0.0) provides the CMake file to download and install the external libraries, and we recommend to use it since it is simpler. So users do not need to execute the following process.
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.
88

99

1010
## 2. How to set up NRLMSISE00 for S2E [OLD Descriptions]

General/HowToDwnloadCSPCElibrary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## 1. Overview
44
- [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.
55
- [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** The [s2e-core v5.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v5.0.0) provides the CMake file to download and install the external libraries, and we recommend to use it since it is simpler. So users do not need to execute the following process.
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.
77

88

99
## 2. How to set up CSPICE Library for S2E [OLD Descriptions]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 thier 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 handmaded programs to analyze and/or visualize the resutls.
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 <path to scripts> --file-tag <log 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+
<div align="center">
40+
<img src="./figs/plot_gs_visibility.JPG" alt="plot_gs_visibility" style="zoom:50%;" />
41+
</div>
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+
<div align="center">
45+
<img src="./figs/plot_body_frame_info.JPG" alt="plot_gs_visibility" style="zoom:100%;" />
46+
</div>
47+
48+
## 4. References
49+
- NA

General/NamingRuleForUserInterface.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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]`

General/figs/plot_body_frame_info.JPG

40.1 KB
Loading

General/figs/plot_gs_visibility.JPG

115 KB
Loading

Overview.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)