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

Feature/update environment v7 #93

Merged
merged 8 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 15 additions & 15 deletions Specifications/Environment/Spec_Atmosphere.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
+ `Atmosphere` class is defined.
+ `src/environment/local/local_environment.cpp, .hpp`
+ `Atmosphere` class is used here as a member variable of `LocalEnvironment` class.
+ `src/environment/local/initialize_local_environment.cpp, .hpp`
+ `Atmosphere` class is instanced here based on the `.ini` file for the environment.
+ `src/library/external/nrlmsise00/wrapper_nrlmsise00.cpp, .hpp`
+ An air density is calculated using an external library, NRLMSISE00 atmosphere model.

Expand All @@ -19,6 +17,8 @@
+ Model
+ `STANDARD`
+ The air density is calculated using scale height.
+ `HARRIS_PRIESTER`
+ The air density is calculated using the Harris-Priester model.
+ `NRLMSISE00`
+ The air density is calculated using the NRLMSISE00 model.
+ If users use this model, the following additional parameters must be set in the `.ini` file.
Expand Down Expand Up @@ -53,7 +53,7 @@

+ NRLMSISE00
1. Read Space weather table
+ F10.7 and Kp/Ap index, which indicates the solar activity cycle, are necessary as inputs for NRLMSISE00.
+ `F10.7` and `Kp/Ap` index, which indicates the solar activity cycle, are necessary as inputs for NRLMSISE00.
These parameters, which are only during the simulation period, are read from SpaceWeather.txt.
+ Note
+ If SpaceWeather.txt cannot be read, the atmosphere model is automatically set to STANDARD.
Expand Down Expand Up @@ -84,21 +84,21 @@
2. initial values
+ Case1 : Default initialize files
```
StartYMDHMS=2020/01/01 11:00:00.0
EndTimeSec=200
StepTimeSec=0.1
OrbitPropagateStepTimeSec=0.1
LogPeriod = 5
SimulationSpeed = 0
simulation_start_time_utc = 2020/01/01 11:00:00.0
simulation_duration_s = 200
simulation_step_s = 0.1
orbit_update_period_s = 0.1
log_output_period_s = 0.1
simulation_speed_setting = 0
```
+ Case2 : Start year only was changed to 2015.
```
StartYMDHMS=2015/01/01 11:00:00.0
EndTimeSec=200
StepTimeSec=0.1
OrbitPropagateStepTimeSec=0.1
LogPeriod = 5
SimulationSpeed = 0
simulation_start_time_utc = 2015/01/01 11:00:00.0
simulation_duration_s = 200
simulation_step_s = 0.1
orbit_update_period_s = 0.1
log_output_period_s = 0.1
simulation_speed_setting = 0
```
+ Especially, we chose following TLE for orbit calculation
```
Expand Down
4 changes: 1 addition & 3 deletions Specifications/Environment/Spec_CelestialInformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
1. Functions
- `CelestialInformation` manages the celestial bodies position and velocity on the inertial frame.
- This class also manages the celestial body information like the gravity constant, the radius, and the rotation.
- The actual calculations are executed by CSPICE or `CelestialRotation`, and this class just calls their functions.
- The actual calculations are executed by CSPICE or `EarthRotation`, and this class just calls their functions.

2. Related files
- `src/environment/global/celestial_information.cpp, .hpp`
- `CelestialInformation` class is defined.
- `src/environment/global/global_environment.cpp, .hpp`
- `CelestialInformation` class is used here as a member variable of `GlobalEnvironment` class.
- `src/environment/global/initialize_global_environment.cpp, .hpp`
- `CelestialInformation` class is instanced here based on the `.ini` file for the environment.

3. How to use
- Call ` UpdateAllObjectsInformation` function to calculates the celestial bodies position and velocity.
Expand Down
20 changes: 10 additions & 10 deletions Specifications/Environment/Spec_CelestialRotation.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Specification of Celestial Rotation
# Specification of Earth Rotation

## 1. Overview

1. Functions
- The `CelestialRotation` class calculates the rotational motion of central objects. Currently, only the Earth is supported as the central object.
- The `EarthRotation` class calculates the rotational motion of the Earth.

2. Related files
- `src/environment/global/celestial_rotation.cpp, .hpp`
- `CelestialRotation` class is defined here.
- `src/environment/global/earth_rotation.cpp, .hpp`
- `EarthRotation` class is defined here.
- `src/environment/global/celestial_information.cpp, .hpp`
- `CelestialRotation` class is used here.
- `EarthRotation` class is used here.

3. How to use
- Make an instance of the `CelestialRotation` class in `CelestialInformation` class.
- Make an instance of the `EarthRotation` class in `CelestialInformation` class.
- Select rotation mode in `sample_simulation_base.ini`
- `Idle` : no motion ( $\mathrm{DCM_{ECItoECEF}}$ is set as the unit matrix)
- If the rotation mode input is neither `Full` nor `Simple`, the `Idle` mode is set.
- `Simple` : axial rotation only ( $\mathrm{DCM_{ECItoECEF}} = \bf{R}$ )
- `Full` : Precession and Nutation are taken into account ( $\mathrm{DCM_{ECItoECEF}} = \bf{R}\bf{N}\bf{P}$ )
- `IDLE` : no motion ( $\mathrm{DCM_{ECItoECEF}}$ is set as the unit matrix)
- If the rotation mode input is neither `FULL` nor `SIMPLE`, the `IDLE` mode is set.
- `SIMPLE` : axial rotation only ( $\mathrm{DCM_{ECItoECEF}} = \bf{R}$ )
- `FULL` : Precession and Nutation are taken into account ( $\mathrm{DCM_{ECItoECEF}} = \bf{R}\bf{N}\bf{P}$ )
- $\bf{R}$, $\bf{N}$, $\bf{P}$ stand for the DCM of axial rotation, nutation, precession, respectively.

## 2. Explanation of Algorithm
Expand Down
22 changes: 10 additions & 12 deletions Specifications/Environment/Spec_GeomagneticField.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
+ `GeomagneticField` class is defined.
+ `src/environment/local/local_environment.cpp, .hpp`
+ `GeomagneticField` class is used here as a member variable of `LocalEnvironment` class.
+ `src/environment/local/initialize_local_environment.cpp, .hpp`
+ `GeomagneticField` class is instanced here based on the `.ini` file for environment.
+ `src/library/external/igrf/igrf.cpp, h`
+ A magnetic field in the ECI frame is calculated by the IGRF model.

3. How to use
+ Set a coefficient file path for the IGRF and random walk / white noise in .ini file
- coefficient_file: File path to the IGRF coefficients table.
- magnetic_field_random_walk_standard_deviation_nT: Standard deviation of the random walk noise
- magnetic_field_random_walk_limit_nT: Limit of the random walk noise
- magnetic_field_white_noise_standard_deviation_nT: Standard deviation of the normal random noise
- `coefficient_file`: File path to the IGRF coefficients table.
- `magnetic_field_random_walk_standard_deviation_nT`: Standard deviation of the random walk noise
- `magnetic_field_random_walk_limit_nT`: Limit of the random walk noise
- `magnetic_field_white_noise_standard_deviation_nT`: Standard deviation of the normal random noise
+ Public functions
+ `CalcMagneticField` : Update the magnetic field
+ `GetGeomagneticField_i_nT` : Return the magnetic field (nT) in the ECI
Expand All @@ -43,12 +41,12 @@
2. initial values
- To check the result in an example orbit, the EndTime was changed to 9000 s.
```
StartYMDHMS=2020/01/01 11:00:00.0
EndTimeSec=9000
StepTimeSec=5
OrbitPropagateStepTimeSec=0.1
LogPeriod = 5
SimulationSpeed = 0
simulation_start_time_utc = 2020/01/01 11:00:00.0
simulation_duration_s = 9000
simulation_step_s = 5
orbit_update_period_s = 0.1
log_output_period_s = 5
simulation_speed_setting = 0
```
- Especially, we chose the following TLE for orbit calculation (ISS orbit).
```
Expand Down
2 changes: 1 addition & 1 deletion Specifications/Environment/Spec_GnssSatellites_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 1. Overview
1. function
- 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.
- Determine the file name of GNSS satellites' data and time from `[GNSS_SATELLIES]` in `sample_gnss.ini`.
- Determine the file name of GNSS satellites' data and time from `[GNSS_SATELLITES]` in `sample_gnss.ini`.

2. Related files
- `src/environment/global/globalEnvironment.cpp, .hpp`
Expand Down
2 changes: 0 additions & 2 deletions Specifications/Environment/Spec_HipparcosCatalogue_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
2. files
+ `HipparcosCatalogue.cpp` ,`HipparcosCatalogue.hpp`
* Definitions and declarations of the class
+ `initialize_global_environment.cpp`
* The initialize function is defined here.
+ `sample_simulation_base.ini`
* Parameters for initialization
+ `hip_main.csv`
Expand Down
2 changes: 1 addition & 1 deletion Specifications/Environment/Spec_HipparcosCatalogue_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
+ `sample_simulation_base.ini`
* 初期化ファイル
+ `hip_main.csv`
* ヒッパルコス星表の元データ. `s2e-core` 外の `ExtLibralies` に保存される.使用しやすいように,HIP ID順ではなく,視等級の小さい順にソートされている.
* ヒッパルコス星表の元データ. `s2e-core` 外の `ExtLibraries` に保存される.使用しやすいように,HIP ID順ではなく,視等級の小さい順にソートされている.
3. 外部ライブラリのダウンロードに関して
+ まずは`hip_main.csv` のダウンロードを済ませる必要がある.このためのスクリプトとして `s2e-core/scripts/download_HIPcatalogue.sh`を用意した.Git Bashなどを利用して,このスクリプトがあるディレクトリで以下を実行することで,必要なcsvファイルをダウンロードすることができる.
* Macユーザーは,Mac標準のターミナルからではなく,Docker内のUbuntuのターミナルから実行する必要がある.( `sed` の仕様がMacとLinuxで違うので,正しいcsvファイルを生成することができないため.参考:<https://qiita.com/catfist/items/1156ae0c7875f61417ee>)
Expand Down
3 changes: 1 addition & 2 deletions Specifications/Environment/Spec_LocalCelestialInformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
- `LocalCelestialInformation` class is defined.
- `src/environment/local/local_environment.cpp, .hpp`
- `LocalCelestialInformation` class is used here as a member variable of `LocalEnvironment` class.
- `src/environment/local/initialize_local_environment.cpp, .hpp`
- `LocalCelestialInformation` class is instanced here based on the `.ini` file for the environment.

3. How to use
- Call ` UpdateAllObjectsInformation` function to calculates the celestial bodies position and velocity.
- Users can get calculated values by using the following functions:
Expand Down
4 changes: 1 addition & 3 deletions Specifications/Environment/Spec_SRPEnvironment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
- `SolarRadiationPressureEnvironment` class is defined.
- `src/environment/local/local_environment.cpp, .hpp`
- `SolarRadiationPressureEnvironment` class is used here as a member variable of `LocalEnvironment` class.
- `src/environment/local/initialize_local_environment.cpp, .hpp`
- `SolarRadiationPressureEnvironment` class is instanced here based on the `.ini` file for the environment.

3. How to use
- Call `UpdateAllStates` function to calculates solar power flux and updates the eclipse flag.
Expand Down Expand Up @@ -151,4 +149,4 @@


## 4. References
1. Montenbruck, O., Gill, E., & Lutze, F. (2002). Satellite orbits: models, methods, and applications. Appl. Mech. Rev., 55(2), B27-B28.
1. Montenbruck, O., Gill, E., & Lutze, F. (2002). Satellite orbits: models, methods, and applications. Appl. Mech. Rev., 55(2), B27-B28.