Skip to content
Merged
Show file tree
Hide file tree
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] Apr 22, 2024
2ba29bf
Merge pull request #106 from ut-issl/renovate/actions-checkout-digest
200km Apr 23, 2024
925b9f6
Update peaceiris/actions-mdbook action to v2
renovate[bot] Apr 23, 2024
a7bbcbd
Merge pull request #105 from ut-issl/renovate/peaceiris-actions-mdboo…
200km Apr 23, 2024
53b80d3
Update actions/checkout digest to 0ad4b8f
renovate[bot] Apr 25, 2024
1b523ec
specify actions/checkout minor, patch version
sksat May 2, 2024
d9e478c
Merge pull request #107 from ut-issl/renovate/actions-checkout-digest
sksat May 2, 2024
863d777
Update actions/checkout action to v4.1.5
renovate[bot] May 8, 2024
8af29e2
Merge pull request #108 from ut-issl/renovate/actions-checkout-4.x
200km May 9, 2024
7f467b5
add time series file orbit propagation specification
fukudakazuya Sep 30, 2024
f0bcef8
fix small
fukudakazuya Sep 30, 2024
6da618e
Merge pull request #111 from ut-issl/add-time-series-file-orbit-propa…
fukudakazuya Oct 1, 2024
021bba8
Update index in readme
200km Oct 3, 2024
cd3a291
Fix directory info
200km Oct 4, 2024
283cc4a
Update tutorial new simulation scenario
200km Oct 5, 2024
601023f
Update add components for v8
200km Oct 5, 2024
5e93b07
Update make new component tutorial for v8
200km Oct 5, 2024
1587adb
Update monte carlo simulation tutorial
200km Oct 5, 2024
9650bd0
Add CODEOWNERS
200km Jun 22, 2026
1dc1f9e
Merge pull request #117 from ut-issl/feature/add-codeowners
200km Jun 22, 2026
f4c48a9
Add minor update contents in v8
200km Jun 28, 2026
45c19f4
Update GNSS satellites
200km Aug 10, 2026
24fedd0
Add GNSS receiver spec by CODEX
200km Aug 10, 2026
09625d5
Add result figure
200km Aug 10, 2026
c17c506
Fix description
200km Aug 10, 2026
b8a9836
Add Orbit Observer by CODEX
200km Aug 10, 2026
3f7c9ff
Add cantilever vibration by CODEX
200km Aug 10, 2026
4dc6429
Add earth albedo by CODEX
200km Aug 10, 2026
68a63f2
Add moon rotation docs by CODEX
200km Aug 10, 2026
d396293
Add lunar gravity field docs by CODEX
200km Aug 10, 2026
83e6649
Add description
200km Aug 15, 2026
178da98
Add -v8 for sample branch
200km Aug 15, 2026
1e832a2
Update tutorial
200km Aug 15, 2026
9441917
Merge pull request #115 from ut-issl/feature/update-for-s2e-v8
200km Aug 17, 2026
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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
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
2 changes: 1 addition & 1 deletion .github/workflows/actionlint.yml

Copy link
Copy Markdown
Contributor

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_level instead [action]

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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: reviewdog/action-actionlint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

- name: setup mdbook
uses: peaceiris/actions-mdbook@v1.2.0
uses: peaceiris/actions-mdbook@v2.0.0
with:
mdbook-version: 'latest'

Expand Down
73 changes: 41 additions & 32 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
- The Current version supports [s2e-core v7.2.0](https://github.com/ut-issl/s2e-core/releases/tag/v7.2.0)
- The Current version supports [s2e-core v8.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v8.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 @@ -117,6 +117,7 @@
- `ideal` directory manages source codes of idealized components which are used in the initial analysis phase in research and satellite development.
- [Angular Velocity Observer](./Specifications/Component/AOCS/spec_angular_velocity_observer.md)
- [Attitude Observer](./Specifications/Component/AOCS/spec_attitude_observer.md)
- [Orbit Observer](./Specifications/Component/AOCS/spec_orbit_observer.md)
- [Force Generator](./Specifications/Component/AOCS/spec_force_generator.md)
- [Torque Generator](./Specifications/Component/AOCS/spec_torque_generator.md)

Expand All @@ -130,7 +131,7 @@

- The `aocs` directory manages components like sensors and actuators for the AOCS subsystem.

1. GNSS Receiver: TBW
1. [GNSS Receiver](./Specifications/Component/AOCS/spec_gnss_receiver.md)
1. [GYRO Sensor](./Specifications/Component/AOCS/spec_gyro_sensor.md)
1. [Magnetometer](./Specifications/Component/AOCS/spec_magnetometer.md)
1. [Magnetorquer](./Specifications/Component/AOCS/spec_magnetorquer.md)
Expand Down Expand Up @@ -219,7 +220,7 @@
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
1. [Lunar Gravity Field](./Specifications/Disturbance/Spec_LunarGravityField.md)

</details>

Expand All @@ -231,6 +232,7 @@
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. [Attitude with Cantilever Vibration](./Specifications/Dynamics/Spec_AttitudeWithCantileverVibration.md)

1. Orbit
1. [Overview of Orbit calculation](./Specifications/Dynamics/Spec_Orbit.md)
Expand All @@ -239,6 +241,7 @@
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. [Orbit Propagation with Time Series File](./Specifications/Dynamics/Spec_TimeSeriesFileOrbit.md)

1. Thermal
1. Heater: TBW
Expand All @@ -264,7 +267,7 @@
1. [Global Environment](./Specifications/Environment/Spec_GlobalEnvironment.md)
1. [Celestial Information](./Specifications/Environment/Spec_CelestialInformation.md)
1. [Earth Rotation](./Specifications/Environment/Spec_CelestialRotation.md)
1. Moon Rotation: TBW
1. [Moon Rotation](./Specifications/Environment/Spec_MoonRotation.md)
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 @@ -277,31 +280,34 @@
1. [Atmosphere](./Specifications/Environment/Spec_Atmosphere.md)
1. [Geomagnetic field](./Specifications/Environment/Spec_GeomagneticField.md)
1. [Solar Radiation Pressure Environment](./Specifications/Environment/Spec_SRPEnvironment.md)
1. [Earth Albedo](./Specifications/Environment/Spec_EarthAlbedo.md)

</details>

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

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

</details>

1. <details><summary> Math Physics </summary>

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

1. Communication
1. COM port interface: TBW
1. NRLMSISE00: TBW

1. Control Utilities
1. First order lag: TBW

1. External
- External library-related source codes.
1. IGRF (International Geomagnetic Reference Field): TBW
1. inih: TBW
1. nrlmsise00: TBW
1. sgp4: TBW

1. Geodesy
1. Geodetic Position: TBW

1. Geomagnetic
1. IGRF (International Geomagnetic Reference Field): TBW

1. GNSS (Global Navigation Satellite System)
1. ANTEX file reader: TBW
1. Bias SINEX file reader: TBW
Expand All @@ -311,16 +317,6 @@
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. <details><summary> math </summary>

1. Constants: TBW
Expand Down Expand Up @@ -352,6 +348,7 @@
1. Orbital Elements: TBW
1. Relative Orbit Models: TBW
1. Interpolation orbit: TBW
1. sgp4: TBW

1. Planet rotation
1. Moon rotation utilities: TBW
Expand All @@ -362,16 +359,17 @@
1. Minimal standard linear congruential generator: TBW
1. Minimal standard linear congruential generator with shuffle: TBW
1. Random walk: TBW

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

</details>

1. <details><summary> Setting file reader </summary>

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

</details>

1. <details><summary> Simulation </summary>

- `simulation` directory manages source codes to define the simulation scenario.
Expand Down Expand Up @@ -421,4 +419,15 @@

</details>

1. <details><summary> Utilities </summary>

1. Endian: TBW
1. Macros: TBW
1. Quantization: TBW
1. Ring Buffer: TBW
1. SLIP: TBW
1. COM port interface: TBW

</details>

1. [Troubleshooting](./General/Troubleshooting.md)
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
163 changes: 163 additions & 0 deletions Specifications/Component/AOCS/spec_gnss_receiver.md
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

![](./figs/gnss-receiver-output-simple-antenna.png)

- 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

![](./figs/gnss-receiver-output-cone-antenna.png)

- 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.
Loading
Loading