-
Notifications
You must be signed in to change notification settings - Fork 8
Merge develop to main for major version update v8.0.0 #118
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
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
297242e
Update actions/checkout digest to 1d96c77
renovate[bot] 2ba29bf
Merge pull request #106 from ut-issl/renovate/actions-checkout-digest
200km 925b9f6
Update peaceiris/actions-mdbook action to v2
renovate[bot] a7bbcbd
Merge pull request #105 from ut-issl/renovate/peaceiris-actions-mdboo…
200km 53b80d3
Update actions/checkout digest to 0ad4b8f
renovate[bot] 1b523ec
specify actions/checkout minor, patch version
sksat d9e478c
Merge pull request #107 from ut-issl/renovate/actions-checkout-digest
sksat 863d777
Update actions/checkout action to v4.1.5
renovate[bot] 8af29e2
Merge pull request #108 from ut-issl/renovate/actions-checkout-4.x
200km 7f467b5
add time series file orbit propagation specification
fukudakazuya f0bcef8
fix small
fukudakazuya 6da618e
Merge pull request #111 from ut-issl/add-time-series-file-orbit-propa…
fukudakazuya 021bba8
Update index in readme
200km cd3a291
Fix directory info
200km 283cc4a
Update tutorial new simulation scenario
200km 601023f
Update add components for v8
200km 5e93b07
Update make new component tutorial for v8
200km 1587adb
Update monte carlo simulation tutorial
200km 9650bd0
Add CODEOWNERS
200km 1dc1f9e
Merge pull request #117 from ut-issl/feature/add-codeowners
200km f4c48a9
Add minor update contents in v8
200km 45c19f4
Update GNSS satellites
200km 24fedd0
Add GNSS receiver spec by CODEX
200km 09625d5
Add result figure
200km c17c506
Fix description
200km b8a9836
Add Orbit Observer by CODEX
200km 3f7c9ff
Add cantilever vibration by CODEX
200km 4dc6429
Add earth albedo by CODEX
200km 68a63f2
Add moon rotation docs by CODEX
200km d396293
Add lunar gravity field docs by CODEX
200km 83e6649
Add description
200km 178da98
Add -v8 for sample branch
200km 1e832a2
Update tutorial
200km 9441917
Merge pull request #115 from ut-issl/feature/update-for-s2e-v8
200km File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Default owner for everything in the repository. | ||
| # Uncomment the line below and replace @your-username with the responsible user, | ||
| # or with a team (e.g. @ut-issl/<team-slug>) right after creating the repository. | ||
| * @200km |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+114 KB
Specifications/Component/AOCS/figs/gnss-receiver-output-cone-antenna.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+74.2 KB
Specifications/Component/AOCS/figs/gnss-receiver-output-simple-antenna.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| # Specification for GnssReceiver class | ||
|
|
||
| ## 1. Overview | ||
|
|
||
| ### 1. Functions | ||
|
|
||
| - The `GnssReceiver` class simulates a GNSS receiver. | ||
| - It determines whether GNSS navigation data is available from the antenna direction and the selected antenna model. | ||
| - When GNSS navigation data is available, it outputs the receiver position and velocity in the Earth-Centered Earth-Fixed (ECEF) frame with independent white noise on each axis. It also converts the measured position to geodetic latitude, longitude, and altitude. | ||
| - It maintains the current UTC and GPS time. In the cone antenna model, it also calculates information about each visible GNSS satellite. | ||
|
|
||
| ### 2. Files | ||
|
|
||
| - [`gnss_receiver.cpp`](https://github.com/ut-issl/s2e-core/blob/v8.0.4/src/components/real/aocs/gnss_receiver.cpp), [`gnss_receiver.hpp`](https://github.com/ut-issl/s2e-core/blob/v8.0.4/src/components/real/aocs/gnss_receiver.hpp): Definitions and declarations of the class | ||
| - [`gnss_receiver.ini`](https://github.com/ut-issl/s2e-core/blob/v8.0.4/settings/sample_satellite/components/gnss_receiver.ini): Example initialization file | ||
|
|
||
| ### 3. How to use | ||
|
|
||
| - Add a `[GNSS_RECEIVER_<component_id>]` section to `gnss_receiver.ini` and set the parameters described below. | ||
| - Create an instance with `InitGnssReceiver`. An overload accepting a `PowerPort` is available when the receiver power state is to be simulated. | ||
| - Pass valid references to `Dynamics`, `GnssSatellites`, and `SimulationTime` to the initialization function. | ||
| - Use the following getters to obtain observation results: | ||
| - `GetMeasuredPosition_ecef_m`: measured ECEF position [m] | ||
| - `GetMeasuredVelocity_ecef_m_s`: measured ECEF velocity [m/s] | ||
| - `GetMeasuredGeodeticPosition`: measured geodetic position | ||
| - `GetGnssInfo`: information for a visible satellite in the specified channel; this list is generated by the `CONE` model | ||
|
|
||
| ### 4. Initialization parameters | ||
|
|
||
| The following example is based on the sample configuration for component ID 1. | ||
|
|
||
| ```ini | ||
| [GNSS_RECEIVER_1] | ||
| prescaler = 10 | ||
|
|
||
| antenna_position_b_m(0) = 0.0125 | ||
| antenna_position_b_m(1) = 0.0000 | ||
| antenna_position_b_m(2) = 0.1815 | ||
|
|
||
| quaternion_b2c(0) = 0.0 | ||
| quaternion_b2c(1) = 0.0 | ||
| quaternion_b2c(2) = 0.0 | ||
| quaternion_b2c(3) = 1.0 | ||
|
|
||
| antenna_model = SIMPLE | ||
| antenna_half_width_deg = 60 | ||
|
|
||
| white_noise_standard_deviation_position_ecef_m(0) = 2000.0 | ||
| white_noise_standard_deviation_position_ecef_m(1) = 1000.0 | ||
| white_noise_standard_deviation_position_ecef_m(2) = 1500.0 | ||
|
|
||
| white_noise_standard_deviation_velocity_ecef_m_s(0) = 1.0 | ||
| white_noise_standard_deviation_velocity_ecef_m_s(1) = 1.5 | ||
| white_noise_standard_deviation_velocity_ecef_m_s(2) = 2.0 | ||
| ``` | ||
|
|
||
| | Parameter | Unit | Description | | ||
| | --- | --- | --- | | ||
| | `prescaler` | - | Frequency scale factor for component updates. Values less than or equal to 1 are set to 1. | | ||
| | `antenna_position_b_m(0..2)` | m | GNSS antenna position in the spacecraft body-fixed frame. It is used to determine satellite visibility in the `CONE` model. | | ||
| | `quaternion_b2c(0..3)` | - | Frame conversion quaternion from the body-fixed frame to the component (antenna) frame. The antenna boresight is the +Z direction of the component frame. | | ||
| | `antenna_model` | - | Antenna visibility model. The available values are `SIMPLE` and `CONE`. An undefined value is replaced with `SIMPLE`. | | ||
| | `antenna_half_width_deg` | deg | Half width of the cone antenna pattern. It is used by the `CONE` model. | | ||
| | `white_noise_standard_deviation_position_ecef_m(0..2)` | m | Standard deviation of the zero-mean normal random noise added independently to each ECEF position component. | | ||
| | `white_noise_standard_deviation_velocity_ecef_m_s(0..2)` | m/s | Standard deviation of the zero-mean normal random noise added independently to each ECEF velocity component. | | ||
|
|
||
| When the overload with a `PowerPort` is used, also set the parameters in the `[POWER_PORT]` section. The `CONE` model requires GNSS satellite calculation to be enabled in the simulation settings. If it is disabled, the antenna model is automatically changed to `SIMPLE`. | ||
|
|
||
| ## 2. Explanation of algorithm | ||
|
|
||
| ### 1. `MainRoutine` | ||
|
|
||
| #### 1. Overview | ||
|
|
||
| 1. Read the true spacecraft ECI position and the attitude quaternion from `Dynamics`. | ||
| 2. Determine GNSS visibility with the selected antenna model. | ||
| 3. If GNSS is visible, copy the true ECEF position and velocity, add white noise, and convert the measured ECEF position to a geodetic position. | ||
| 4. Update UTC and GPS time from `SimulationTime`. | ||
|
|
||
| The measured position, velocity, and geodetic position are updated only while GNSS is visible. When GNSS becomes invisible, their most recently calculated values are retained. UTC and GPS time are updated regardless of visibility. | ||
|
|
||
| ### 2. Antenna visibility models | ||
|
|
||
| #### 1. `SIMPLE` model | ||
|
|
||
| The antenna boresight is the +Z axis of the component frame. The boresight is converted to the inertial frame using `quaternion_b2c` and the spacecraft attitude. GNSS is regarded as visible when | ||
|
|
||
| ```text | ||
| dot(spacecraft_position_eci, antenna_boresight_eci) > 0. | ||
| ``` | ||
|
|
||
| Therefore, the receiver is available when the antenna points toward the anti-Earth hemisphere. This model does not calculate individual satellite visibility. | ||
|
|
||
| #### 2. `CONE` model | ||
|
|
||
| The antenna position and boresight are converted to the inertial frame. Each GNSS satellite is visible only when both of the following conditions are satisfied: | ||
|
|
||
| - The line of sight between the receiver antenna and the satellite is not occulted by the Earth. | ||
| - The direction from the antenna to the satellite is inside the antenna cone: | ||
|
|
||
| ```text | ||
| dot(antenna_boresight_eci, line_of_sight_unit_vector_eci) | ||
| > cos(antenna_half_width_deg). | ||
| ``` | ||
|
|
||
| GNSS navigation data is available when at least four satellites are visible. For every visible satellite, the receiver stores: | ||
|
|
||
| - GNSS satellite ID | ||
| - latitude angle in the component frame [rad] | ||
| - longitude angle in the component frame [rad] | ||
| - distance from the antenna to the satellite [m] | ||
|
|
||
| ### 3. Observation noise | ||
|
|
||
| For each ECEF axis, the measured position and velocity are calculated as | ||
|
|
||
| ```text | ||
| measured_position[i] = true_position[i] + N(0, position_sigma[i]) | ||
| measured_velocity[i] = true_velocity[i] + N(0, velocity_sigma[i]) | ||
| ``` | ||
|
|
||
| where `N(0, sigma)` is a normally distributed random value with zero mean and standard deviation `sigma`. The noise sources for the three axes and for position and velocity are initialized independently. | ||
|
|
||
| ### 4. Time conversion | ||
|
|
||
| UTC is copied from `SimulationTime`. GPS week and seconds of week are calculated from the current Julian day using Julian day `2444244.5` as the GPS time origin. The GPS week value is not truncated at the 1024-week rollover. | ||
|
|
||
| ### 5. Log output | ||
|
|
||
| The component logs the following values with the prefix `gnss_receiver<component_id>_`: | ||
|
|
||
| - measured UTC (year, month, day, hour, minute, and second) | ||
| - measured ECEF position [m] | ||
| - measured ECEF velocity [m/s] | ||
| - measured geodetic latitude and longitude [rad] | ||
| - measured altitude [m] | ||
| - GNSS visibility flag | ||
| - number of visible GNSS satellites | ||
|
|
||
| In the `SIMPLE` model, individual satellites are not counted, so the number of visible satellites remains zero even when the GNSS visibility flag is true. | ||
|
|
||
| ## 3. Results of verification | ||
|
|
||
| The following figures compare the true and measured receiver positions in the ECEF frame. They also show the GNSS visibility flag and the number of visible satellites. | ||
|
|
||
| ### 1. `SIMPLE` antenna model | ||
|
|
||
|  | ||
|
|
||
| - The visibility flag changes according to whether the antenna boresight points toward the anti-Earth hemisphere. | ||
| - While the visibility flag is true, the measured ECEF position follows the true position with the configured observation noise. | ||
| - While the visibility flag is false, the measured position retains its last observed value. | ||
| - The number of visible satellites remains zero because the `SIMPLE` model does not calculate the visibility of individual satellites. | ||
|
|
||
| ### 2. `CONE` antenna model | ||
|
|
||
|  | ||
|
|
||
| - The number of visible satellites changes according to Earth occultation and the antenna cone angle. | ||
| - The visibility flag is true when four or more satellites are visible and false when fewer than four satellites are visible. | ||
| - The measured ECEF position follows the true position with observation noise while the visibility flag is true. When the flag is false, the last observed position is retained until GNSS navigation data becomes available again. | ||
|
|
||
| These results confirm the visibility determination and position update behavior of both antenna models. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [actionlint] reported by reviewdog 🐶
avoid using deprecated input "fail_on_error" in action "reviewdog/action-actionlint@v1": Deprecated, use
fail_levelinstead [action]s2e-documents/.github/workflows/actionlint.yml
Line 17 in 9441917