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

Minor update v6.1.0 #140

Merged
merged 50 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
5abc230
fix:changed mag_vec_obs_body_nT to mag_vec_est_body_nT
ogoogo Jun 12, 2023
de50124
Merge pull request #119 from ut-issl/main
200km Jul 14, 2023
5bc45b3
Remove SSH key and update s2e version
200km Jul 14, 2023
f8f3133
Fix working directory
200km Jul 14, 2023
eac4541
Fix relative path
200km Jul 14, 2023
b7e7f1a
Modify PR template
200km Jul 14, 2023
d960f34
Modify AI template
200km Jul 14, 2023
49a0012
Modify bug report template
200km Jul 14, 2023
ae05b72
Fix code owner setting
200km Jul 14, 2023
e084e75
Merge pull request #120 from ut-issl/feature/fix-actions-as-oss
200km Jul 15, 2023
4c69444
Merge pull request #122 from ut-issl/feature/fix-code-owner
200km Jul 15, 2023
9e7e552
Merge pull request #121 from ut-issl/feature/modify-templates
200km Jul 15, 2023
139c19c
Add time diff assertion
200km Jul 15, 2023
4090fe3
Add time diff max variables
200km Jul 15, 2023
ab19583
Add TODO comments for all OBCT_diff_in_sec related codes
200km Jul 15, 2023
e54f2c3
Add sqrt function add assertion
200km Jul 15, 2023
4c396ab
Replace sqrtf function to C2A_MATH_sqrtf
200km Jul 15, 2023
5b2987f
Replace all sqrtf function to C2A_MATH_sqrtf
200km Jul 15, 2023
ba9d886
introduce arkedge/workflows-c2a v3.2.0
sksat Jul 18, 2023
fb8dad8
set python version for C2A utility scripts
sksat Jul 18, 2023
0cb86c8
Merge pull request #129 from ut-issl/main
200km Jul 18, 2023
2a796dc
Update actions/checkout action to v3
renovate[bot] Jul 18, 2023
122b89c
Merge pull request #130 from ut-issl/renovate/actions-checkout-3.x
sksat Jul 18, 2023
a0be339
Merge pull request #128 from arkedge/feature/introduce-workflows-c2a
sksat Jul 19, 2023
c84fb26
Merge pull request #124 from ut-issl/feature/add-time-diff-assertion
200km Jul 19, 2023
36b76d9
Update crazy-max/ghaction-github-labeler action to v4
renovate[bot] Jul 19, 2023
a5bd6be
build vMicro
seki-hiro Jul 19, 2023
ba5e596
Merge pull request #131 from ut-issl/renovate/crazy-max-ghaction-gith…
200km Jul 19, 2023
95ea50f
Update src/src_user/Applications/UserDefined/AOCS/AttitudeDeterminati…
200km Jul 19, 2023
162187b
Merge pull request #125 from ut-issl/feature/fix-sqrt-assertion
200km Jul 20, 2023
c6e843f
Support Linux
conjikidow May 15, 2023
36cdb35
Minor fix
conjikidow Jun 28, 2023
a1a81f9
Rename sils_sci_if.* into com_port and refactor them
conjikidow Jul 20, 2023
ed86817
Rename and refactor files
conjikidow Jul 20, 2023
78dc689
Fix bug
conjikidow Jul 20, 2023
bcd4cc5
Delete ccsds_sils_if.*
conjikidow Jul 21, 2023
c4edc45
Merge uart_sils_if.* into uart_sils.*
conjikidow Jul 21, 2023
e194f2e
Add port config for sils
conjikidow Jul 21, 2023
4623612
Add comments
conjikidow Jul 21, 2023
46910e4
Fix typo in README.md
conjikidow Jul 21, 2023
80592cc
Merge pull request #135 from ut-issl/feature/fix_readme_typo
conjikidow Jul 21, 2023
3ae4083
Move port config for sils to sils_port_config.h
conjikidow Jul 21, 2023
7282faf
comment out cautions
seki-hiro Jul 22, 2023
5f19005
Merge pull request #136 from ut-issl/feature/modify_template
seki-hiro Jul 23, 2023
7363417
Merge pull request #86 from ut-issl/feature/fix_magobs_to_magest
seki-hiro Jul 24, 2023
f1e16d0
Merge pull request #138 from ut-issl/main
seki-hiro Jul 24, 2023
8d613ff
Merge pull request #76 from ut-issl/feature/support_linux
conjikidow Jul 24, 2023
a280537
modify stt hwoc setting
seki-hiro Jul 24, 2023
767fccd
Modify sample folder as well
seki-hiro Jul 25, 2023
3d763cb
Merge pull request #139 from ut-issl/feature/modify_stt_hwoc_setting
seki-hiro Jul 25, 2023
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
8 changes: 1 addition & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# AOCS team
* @ut-issl/aocs

# CDH team
# * @chutaro

# ArkEdge Sapce
* @sksat
* @ut-issl/aocs @sksat
21 changes: 14 additions & 7 deletions .github/ISSUE_TEMPLATE/action_item.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ assignees: ''

---

## 概要
ひとことで

## 詳細
詳しく

Expand All @@ -19,8 +16,18 @@ assignees: ''
## 備考
なにかあれば

<!--
## 注意
- 関連する Projects が存在する場合,それの紐付けを行うこと
- 可能ならば `priority` ラベルを付けること
- 可能ならば Assignees を設定すること
- close するときは結論を明記すること
- 割り当てれるなら`Assignees`を割り当てる
- `Projects`として`6U AOCS team (private)`を設定する
- `Status`を`ToDo`などに設定する
- 必ず`priority` ラベルを付けること
- high: 試験などの関係ですぐさま対応してほしい
- middle: 通常これ
- low: ゆっくりで良いもの
- 必ず`update`ラベルをつけること
- major: 後方互換性なしのI/F変更
- minor: 後方互換性ありのI/F変更
- patch: I/F変更なし
- テンプレート記述は残さず、削除したり`NA`と書き換えたりする
-->
35 changes: 26 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ assignees: ''

---

## 概要
ひとことで

## 詳細
### 詳細症状
どういうバグか
どういうバグか、バグを再現できるように詳細に記述する

### 発生条件
発生した環境,症状,パラメタなど
- 発生した環境
- SILS, HILS, or 実機
- ビルド、実行環境のバージョン情報など
- C2A-AOBCのバージョン
- S2E-AOBCのバージョン
- Visual Studioなどの情報
- 症状
- 可能ならば図などもつけて
- パラメータ
- デフォルトから変更した点があるなら記入する

### 追加資料
あればリンクなどを貼る
Expand All @@ -30,8 +36,19 @@ tool類が全部死ぬ... みたいな
## 補足
何かれば

<!--
## 注意
- 関連する Projects が存在する場合,それの紐付けを行うこと
- 可能ならば `priority` ラベルを付けること
- 可能ならば Assignees を設定すること
- close するときは結論を明記すること
- 割り当てれるなら`Assignees`を割り当てる
- `Projects`として`6U AOCS team (private)`を設定する
- `Status`を`ToDo`などに設定する
- 必ず`bug`ラベルを付けること
- 必ず`priority` ラベルを付けること
- high: 試験などの関係ですぐさま対応してほしい
- middle: 通常これ
- low: ゆっくりで良いもの
- 必ず`update`ラベルをつけること
- major: 後方互換性なしのI/F変更
- minor: 後方互換性ありのI/F変更
- patch: I/F変更なし
- テンプレート記述は残さず、削除したり`NA`と書き換えたりする
-->
30 changes: 18 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
## 概要
ひとことで

## Issue
- 関連する issue

## 詳細
詳しく
詳しくPR内容を記述する

## 検証結果
### ビルドチェック (どちらもチェック)
Expand All @@ -20,14 +17,23 @@
### 試験結果詳細記述場所 or 詳細ログ保存場所へのリンク
- 図や表で記述する

## 影響範囲
XX系の動作がガラッと変わる,とか.

## 補足
何かあれば
何かあれば書く。なければ`NA`とする。

<!--
## 注意
- 6U AOCS team Projects への紐付けを行うこと
- Assignees を自分に設定すること
- Reviewers を設定すること
- `priority` ラベルや`major/minor/patch update`ラベルを付けること
- 必ず`Reviewers` を設定すること
- AOCSメンテナメンバー
- `Assignees` を自分自身に割り当てること
- `Projects`として`6U AOCS team (private)`を設定する
- `Status`を`Waiting Review`に設定する
- 必ず`priority` ラベルを付けること
- high: 試験などの関係ですぐさまレビューしてほしい
- middle: 通常これ
- low: ゆっくりで良いもの
- 必ず`update`ラベルをつけること
- major: 後方互換性なしのI/F変更
- minor: 後方互換性ありのI/F変更
- patch: I/F変更なし
- テンプレート記述は残さず、削除したり`NA`と書き換えたりする
-->
1 change: 1 addition & 0 deletions .github/workflows/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
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@v2
- uses: actions/checkout@v3
- uses: reviewdog/action-actionlint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- 'src/**'

env:
S2E_AOBC_VERSION: v2.0.1
S2E_AOBC_VERSION: v3.0.1

jobs:
build_c2a_with_s2e_win:
Expand All @@ -40,7 +40,6 @@ jobs:
repository: ut-issl/s2e-aobc
ref: '${{ env.S2E_AOBC_VERSION }}'
submodules: recursive
ssh-key: ${{ secrets.S2E_AOBC_SSH_KEY }}
fetch-depth: 1

- name: Configure build for x86
Expand Down Expand Up @@ -92,10 +91,10 @@ jobs:
- name: build
shell: cmd
working-directory: ./s2e-aobc/s2e-aocs-core
working-directory: ./s2e-aobc
run: |
cl.exe
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON
cmake --build . --clean-first
build_c2a_with_s2e_linux:
Expand All @@ -121,7 +120,6 @@ jobs:
repository: ut-issl/s2e-aobc
ref: '${{ env.S2E_AOBC_VERSION }}'
submodules: recursive
ssh-key: ${{ secrets.S2E_AOBC_SSH_KEY }}
fetch-depth: 1

- name: set compiler
Expand Down Expand Up @@ -186,10 +184,10 @@ jobs:
ls nrlmsise00/src
- name: build
working-directory: ./s2e-aobc/s2e-aocs-core
working-directory: ./s2e-aobc
env:
CC: ${{ steps.compiler.outputs.CC }}
CXX: ${{ steps.compiler.outputs.CXX }}
run: |
cmake . -DBUILD_64BIT=OFF -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON
cmake . -DBUILD_64BIT=OFF -DEXT_LIB_DIR=s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON
cmake --build . --clean-first
13 changes: 13 additions & 0 deletions .github/workflows/c2a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: C2A

on:
push:
branches:
- main
- develop
pull_request:

jobs:
c2a:
name: C2A
uses: arkedge/workflows-c2a/.github/workflows/[email protected]
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@v2
- uses: actions/checkout@v3

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v3
uses: crazy-max/ghaction-github-labeler@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
Expand Down
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ option(BUILD_C2A_AS_CXX "Build C2A as C++" ON)

option(BUILD_C2A_AS_SILS_FW "Build C2A as SILS firmware" ON)

# SCI COM for connection to WINGS TMTC IF
option(USE_SCI_COM "Use SCI_COM" OFF)

# SCI COM for connection to PC UART
# !!!注意!!!
# これをONにした状態で,SCIの受け口がない場合(TMTC_IFが動いていない状態)
# そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること!

option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF)
# UART COM for connection to PC UART
# これをONにした状態でTMTC_IFが動いていない場合,そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること!
option(USE_UART_COM "Use UART COM" OFF)

set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_core)
set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const float INA260_PARAMETERS_stim210_hw_over_current_threshold_mA = 1000.0f;
// SAGITTA
const INA260_AVERAGING_MODE INA260_PARAMETERS_sagitta_averaging_mode = INA260_AVERAGING_MODE_16;
const INA260_CONVERSION_TIME INA260_PARAMETERS_sagitta_voltage_conversion_time = INA260_CONVERSION_TIME_140US;
const INA260_CONVERSION_TIME INA260_PARAMETERS_sagitta_current_conversion_time = INA260_CONVERSION_TIME_140US;
const INA260_CONVERSION_TIME INA260_PARAMETERS_sagitta_current_conversion_time = INA260_CONVERSION_TIME_204US;
const float INA260_PARAMETERS_sagitta_hw_over_current_threshold_mA = 500.0f;

// OEM7600
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- [S2E-AOBC](https://github.com/ut-issl/s2e-aobc) v3.0.0
- Telemetry/Command interface
- [tlm-cmd-generator](https://github.com/ut-issl/c2a-tlm-cmd-code-generator)
- Version: [ISSL Branch](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/tree/feature/issl)
- Version: [ISSL Branch](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/tree/feature/issl)
- [WINGS](https://gitlab.com/ut_issl/wings/wings)
- How to use
- `The main developers` of the AOCS module directly use this repository to add new features and improve the module.
Expand Down Expand Up @@ -154,7 +154,7 @@
- Images for markdown document files are allowable when the file size is smaller than 200K Bytes.

### Coding conventions
- Please follow the [Coding rule of c2a-core](https://github.com/ut-issl/c2a-core/blob/042cdfa15b0056880398e857cdd5d5a430562fd1/Docs/General/coding_rule.md)に従う
- Please follow the [Coding rule of c2a-core](https://github.com/ut-issl/c2a-core/blob/042cdfa15b0056880398e857cdd5d5a430562fd1/Docs/General/coding_rule.md)
- Please also care about the AOCS-specific rules as follows.
- Add unit information in the name of variables and functions
- Add frame information in the name of variables and functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ AOCS_ERROR APP_BDOT_calculate_mag_vec_time_derivative_(void)
if (bdot->time_derivative_variables.num_of_mag_observation == 0)
{
// 磁気センサの観測が開始していない場合,磁場ベクトルが0となっているので,その場合はすぐにリターンする
if (VECTOR3_norm(aocs_manager->mag_vec_obs_body_nT) < MATH_CONST_NORMAL_CHECK_THRESHOLD) return AOCS_ERROR_OTHERS;
if (VECTOR3_norm(aocs_manager->mag_vec_est_body_nT) < MATH_CONST_NORMAL_CHECK_THRESHOLD) return AOCS_ERROR_OTHERS;

bdot_.time_derivative_variables.previous_obc_time = TMGR_get_master_clock();
VECTOR3_copy(bdot_.time_derivative_variables.mag_vec_before_nT, aocs_manager->mag_vec_obs_body_nT);
VECTOR3_copy(bdot_.time_derivative_variables.mag_vec_before_nT, aocs_manager->mag_vec_est_body_nT);

// 1回目の観測が終了した段階では,磁場ベクトルの微分はまだ計算できないので,エラーを出してリターンする.
bdot_.time_derivative_variables.num_of_mag_observation = 1;
Expand All @@ -158,7 +158,7 @@ AOCS_ERROR APP_BDOT_calculate_mag_vec_time_derivative_(void)
else // bdot->time_derivative_variables.num_of_mag_observation == 1
{
bdot_.time_derivative_variables.current_obc_time = TMGR_get_master_clock();
VECTOR3_copy(bdot_.time_derivative_variables.mag_vec_after_nT, aocs_manager->mag_vec_obs_body_nT);
VECTOR3_copy(bdot_.time_derivative_variables.mag_vec_after_nT, aocs_manager->mag_vec_est_body_nT);

// 時間微分のインターバルが一定以下の場合は,姿勢レートの変化が不十分とみなし,磁場の時間微分を計算しない
if (OBCT_diff_in_msec(&(bdot->time_derivative_variables.previous_obc_time), &(bdot->time_derivative_variables.current_obc_time))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ static void APP_FTAD_exec_(void)
ObcTime current_obc_time = TMGR_get_master_clock();
float time_step_s = (float)OBCT_diff_in_sec(&(fine_three_axis_determination_.previous_obc_time), &current_obc_time);
fine_three_axis_determination_.previous_obc_time = current_obc_time;
if (time_step_s < 0.0f) return;
if (time_step_s < 0.0f) return; // 時間差が負の場合は一旦飛ばす
if (time_step_s > aocs_manager->obct_diff_max_limit_s) return; // 時間差が大きすぎる場合は一旦飛ばす

Quaternion q_eci_to_body;
switch (fine_three_axis_determination_.method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ static void APP_RTAD_exec_(void)
ObcTime current_obc_time = TMGR_get_master_clock();
float time_step_s = (float)OBCT_diff_in_sec(&(rough_three_axis_determination_.previous_obc_time), &current_obc_time);
rough_three_axis_determination_.previous_obc_time = current_obc_time;
if (time_step_s < 0.0f) return; // 時間差が負の場合は一旦飛ばす
if (time_step_s > aocs_manager->obct_diff_max_limit_s) return; // 時間差が大きすぎる場合は一旦飛ばす

float sun_ref_vec[PHYSICAL_CONST_THREE_DIM]; //!< 基準の座標系における太陽方向単位ベクトル
float mag_ref_vec[PHYSICAL_CONST_THREE_DIM]; //!< 基準の座標系における磁場単位ベクトル
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,10 @@ static void APP_STT_GYRO_EKF_exec_(void)
// 時間刻みを計算する
APP_STT_GYRO_EKF_calculation_time_.current = TMGR_get_master_clock();
float time_step_s = (float)OBCT_diff_in_sec(&(APP_STT_GYRO_EKF_calculation_time_.previous),
&(APP_STT_GYRO_EKF_calculation_time_.current));
&(APP_STT_GYRO_EKF_calculation_time_.current));
APP_STT_GYRO_EKF_calculation_time_.previous = APP_STT_GYRO_EKF_calculation_time_.current;
if (time_step_s < 0.0f) return; // 時間差が負の場合は一旦飛ばす
if (time_step_s > aocs_manager->obct_diff_max_limit_s) return; // 時間差が大きすぎる場合は一旦飛ばす

APP_STT_GYRO_EKF_execute_estimation(time_step_s);
}
Expand Down Expand Up @@ -502,7 +504,7 @@ static UpdatedStateVariable APP_STT_GYRO_EKF_update_state_variable_(MATRIX_T(6,
delta_quaternion_i2b_ref_to_true.vector_part[i] = updated_state_variable_matrix_form.data[i][0];
delta_rate_bias_ref_to_true_rad_s[i] = updated_state_variable_matrix_form.data[i + 3][0];
}
delta_quaternion_i2b_ref_to_true.scalar_part = sqrtf(1.0f - VECTOR3_norm(delta_quaternion_i2b_ref_to_true.vector_part));
delta_quaternion_i2b_ref_to_true.scalar_part = C2A_MATH_sqrtf(1.0f - VECTOR3_norm(delta_quaternion_i2b_ref_to_true.vector_part));

UpdatedStateVariable updated_state_variable;
updated_state_variable.quaternion_i2b =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ void APP_SUN_VEC_PROPAGATOR_exec_(void)
ObcTime current_obc_time = TMGR_get_master_clock();
float time_step_s = (float)OBCT_diff_in_sec(&(sun_vector_propagator_.previous_obc_time), &current_obc_time);
sun_vector_propagator_.previous_obc_time = current_obc_time;

if (time_step_s < 0.0f) return; // 時間差が負の場合は一旦飛ばす
if (time_step_s > aocs_manager->obct_diff_max_limit_s) return; // 時間差が大きすぎる場合は一旦飛ばす

// Quaternionライブラリにはスカラー倍や和がないので,q + dqを計算するために一度配列にしてから計算する
float quaternion_previous_array[PHYSICAL_CONST_QUATERNION_DIM]; //!< 前回のquaternion_sun_ref_to_body
float quaternion_time_derivative_array[PHYSICAL_CONST_QUATERNION_DIM]; //!< quaternion_sun_ref_to_bodyの時間微分
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ void APP_MTQ_SEIREN_CONTROLLER_maintain_mtq_output_()
ObcTime current_obc_time = TMGR_get_master_clock();
uint32_t mtq_driving_time_ms = OBCT_diff_in_msec(&(mtq_seiren_controller->mtq_output_turned_on_obc_time), &current_obc_time);
// 目標の時間長さだけMTQに磁気モーメントを出力させたら,MTQの出力を切り,消磁に入る
// TODO: 時間アサーションが正しいかどうか検討する
if (mtq_driving_time_ms >= mtq_seiren_controller->mtq_output_time_length_ms)
{
float mag_moment_target_Am2[PHYSICAL_CONST_THREE_DIM];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ static double APP_TIME_SPACE_CALC_propagate_current_jday_ref_(void)
{
ObcTime obct_now = TMGR_get_master_clock();
float elapsed_ti_sec = (float)OBCT_diff_in_sec(&aocs_manager->obct_reference, &obct_now);
// TODO: 時間アサーションを入れるかどうか検討する

double reference_jday = (double)(elapsed_ti_sec) / (PHYSICAL_CONST_EARTH_SOLAR_DAY_s) + aocs_manager->reference_jday;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ static C2A_MATH_ERROR APP_TARGET_ATT_CALC_calc_target_angular_velocity_(void)

// Quaternion差より角速度計算
float time_diff_sec = (float)OBCT_diff_in_sec(&target_attitude_calculator_.obctime, &obctime_current);
// TODO: 時間アサーションを入れるかどうか検討する
C2A_MATH_ERROR ret = QUATERNION_calc_angular_velocity(target_attitude_calculator_.ang_vel_target_body_rad_s,
q_target_previous,
q_target_current,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static void APP_AOCS_MANAGER_init_(void)
aocs_manager_.obct_gps_time_est = OBCT_create(0, 0, 0);
aocs_manager_.obct_reference = OBCT_create(0, 0, 0);
aocs_manager_.reference_jday = ORBIT_PARAMETERS_reference_jday;
aocs_manager_.obct_diff_max_limit_s = 10.0f; // TODO_L : 可変にする?あまり必要なさそう。
// センサ状態
aocs_manager_.sun_visibility = AOCS_MANAGER_SUN_INVISIBILE;
aocs_manager_.gps_visibility = AOCS_MANAGER_GPS_INVISIBILE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ typedef struct
ObcTime obct_gps_time_est; //!< 上記を推定したタイミングのC2Aマスタークロック [-]
double reference_jday; //!< 慣性系計算の基準時刻として用いるユリウス日 [ユリウス日]
ObcTime obct_reference; //!< 慣性系計算の基準時刻として用いるユリウス日を更新した時のOBC時刻 [-]
float obct_diff_max_limit_s; //!< OBC時刻差計算時のアサーションに使う上限 [s]
// センサ状態
AOCS_MANAGER_GPS_VISIBILITY gps_visibility; //!< GPS情報の利用可否
AOCS_MANAGER_SUN_VISIBILITY sun_visibility; //!< 太陽がサンセンサから見えているかどうか
Expand Down
Loading