From 5db30eccb59acd16ddd1b6502c7780a70b774b1a Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 11 Apr 2023 15:05:29 +0200 Subject: [PATCH 001/176] Update readme --- README.md | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1a54b49b..7ce54e55 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,21 @@ -# C2A_ISSL6U_AOBC -- ISSL6UプロジェクトAOBC用搭載S/Wのレポジトリです。 +# C2AAOBC +- 姿勢制御を行うOBCであるAOBC用搭載S/Wのレポジトリです。 - 基本的には次のような構成で使うことを想定しています。 - 実機 - vMicro + Visual Studio 2019 - SILS - - S2E_CORE: [`develop` branch](https://github.com/ut-issl/s2e-core) - - S2E_6U_AOCS: [`develop` branch](https://gitlab.com/ut_issl/s2e/s2e_6u_aocs) + - S2E-AOBC: [`develop` branch](https://github.com/ut-issl/s2e-aobc) - WINGS: 最新の [`develop` branch](https://gitlab.com/ut_issl/wings/wings) # clone方法 -- `C2A_CORE_OSS` がgit submoduleとして含まれているので,以下で一発. +- `C2A-CORE` がgit submoduleとして含まれているので,以下で一発. ``` -$ git clone --recursive https://gitlab.com/ut_issl/c2a/c2a_issl6u_aobc.git +$ git clone --recursive git@github.com:ut-issl/c2a-aobc.git ``` - もしくは,以下でもOK. ``` -$ git clone https://gitlab.com/ut_issl/c2a/c2a_issl6u_aobc.git -$ cd c2a_user_oss/ +$ git clone git@github.com:ut-issl/c2a-aobc.git +$ cd c2a-aobc/ $ git submodule init $ git submodule update ``` @@ -63,8 +62,8 @@ $ git submodule update - settings.json は AOBC 用に以下のように編集すること ``` { - "c2a_root_dir" : "各自の環境でのc2a_issl6u_aobc/src/への相対パス", - "db_path" : "各自の環境でのc2a_issl6u_aobc/src/src_user/Settings/TlmCmd/DataBase/への相対パス", + "c2a_root_dir" : "各自の環境でのc2a-aobc/src/への相対パス", + "db_path" : "各自の環境でのc2a-aobc/src/src_user/Settings/TlmCmd/DataBase/への相対パス", "db_prefix" : "ISSL6U_AOBC", "tlm_id_range" : ["0x00", "0x100"], "input_file_encoding" : "utf-8", @@ -77,9 +76,10 @@ $ git submodule update # 開発方針 + branch構成 ``` -├── master # 実機での動作保証のある最新版 +├── main # 実機での動作保証のある最新版 ├── develop # ビルドが通る最新版 └── feature/* # 開発途中のソフトウェア群 +└── hotfix/* # mainに対してパッチを当てるソフトウェア群 ``` + 機能開発の流れ 1. developブランチからfeatureブランチを作成する. @@ -115,21 +115,6 @@ $ git submodule update - `git submodule update`を実施する - S2Eのcmakeキャッシュを削除する -# リンク -- AOCS向けにソフトウェア実装方針を共有するための資料 - - [AOBCソフトウェア実装の流れ](https://docs.google.com/document/d/14OuY41fJfsOdKE1TKaHTMnW9VLONgaY5A5TD-xbHqgo/edit) -- 開発環境構築について - - [Windowsでの開発環境構築](https://docs.google.com/document/d/1D-qFvEHJL7lSSLtrswytTh9BjlI4bcp1ibxdYQCqYZw/edit) -- WINGS関連 - - [WINGS](https://gitlab.com/ut_issl/wings/wings) - - [WINGS_TMTC_IF](https://gitlab.com/ut_issl/wings/wings_tmtc_if) - - [WINGSの手順書など](https://drive.google.com/drive/folders/1SCELfyxr5oZQyx01R5A-9RA1Tbu2YvMI) -- 作業メモ - - [C2Aパラメータ設定](https://docs.google.com/spreadsheets/d/1TC4UriiveSK-meA7cFga9Z1l7IFpGzfVQ6Lbi_XFUdk/edit#gid=0) - - [C2A on PIC32作業メモ](https://docs.google.com/document/d/17qht6L0Rpsqb0js0d_csOZxUoAG2PunjISfkOXmWaYQ/edit#) -- Gitlab版のC2A COREからGithub版のC2A COREへの移行方法 - - [関連MRのNoteを参照](https://gitlab.com/ut_issl/c2a/c2a_issl6u_aobc/-/merge_requests/175) - ## Brief history of development - 21st Jan. 2021: Development start in a private repository at GitLab. - 03rd Mar. 2023: Move to a private repository at GotHub to prepare publish as OSS From 02bd90ded1a6426053f88f032859013fe00adeae Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:03:50 +0200 Subject: [PATCH 002/176] Modify label --- .github/labels.yml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/labels.yml b/.github/labels.yml index c26cba7b..ff5dcde8 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -6,38 +6,14 @@ color: "0075ca" description: "Improvements or additions to documentation" -- name: "duplicate" - color: "cfd8d7" - description: "This issue or pull request already exists" - -- name: "enhancement" - description: "New feature or request" - color: "a2eeef" - - name: "good first issue" description: "Good for newcomers" color: "7057ff" -- name: "help wanted" - description: "Extra attention is needed" - color: "008672" - -- name: "invalid" - description: "This doesn't seem right" - color: "e4e669" - - name: "question" description: "Further information is requested" color: "d876e3" -- name: "wontfix" - description: "This will not be worked on" - color: "ffffff" - -- name: "icebox" - description: "icebox or pending" - color: "c5def5" - - name: "priority::high" description: "priorityg high" color: "d93f0b" @@ -50,6 +26,18 @@ description: "priority medium" color: "fbca04" +- name: "major update" + color: "B60205" + description: "Major update" + +- name: "minor update" + color: "EFFA85" + description: "Minor update" + +- name: "patch" + color: "08C036" + description: "Patch" + - name: "tools" description: "" color: "510f70" From 141b67d0144b45575a123000a8241c950f159c18 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:22:37 +0200 Subject: [PATCH 003/176] Add CI with Visual Studio --- .github/workflows/build.yml | 96 +++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..066768f9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,96 @@ +name: Build + +on: + push: + branches: + - main + - develop + pull_request: + types: [opened, synchronize, reopened, labeled] + paths: + - '.github/workflows/build.yml' + - 'c2a-aocs/CMakeLists.txt' + - 'c2a-aocs/src/**' + +env: + S2E_AOBC_VERSION: v2.0.1 + +jobs: + build_s2e_win: + name: Build with S2E on Windows VS2022 + # VS2022 を使うため + runs-on: windows-2022 + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + + - name: checkout the submodules + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: checkout S2E AOBC + uses: actions/checkout@v3 + with: + path: s2e-aobc + 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 + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: amd64_x86 + + - name: show tools version + shell: powershell + run: | + cmake --version + + - name: cache extlib + id: cache-extlib + uses: actions/cache@v3 + with: + key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }} + path: ExtLibraries + + - name: build extlib + if: steps.cache-extlib.outputs.cache-hit != 'true' + shell: powershell + working-directory: ./s2e-core/ExtLibraries + run: | + cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" + cmake --build . + + - name: install extlib + if: steps.cache-extlib.outputs.cache-hit != 'true' + shell: powershell + working-directory: ./s2e-core/ExtLibraries + run: | + cmake --install . + + - name: check extlib + shell: powershell + working-directory: ./ExtLibraries + run: | + ls cspice + ls cspice/cspice_msvs/lib + ls cspice/include + ls cspice/generic_kernels + ls nrlmsise00 + ls nrlmsise00/table + ls nrlmsise00/lib + ls nrlmsise00/lib/libnrlmsise00.lib + ls nrlmsise00/src + + - name: build + shell: cmd + working-directory: ./s2e-aocs-core + run: | + cl.exe + cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON + cmake --build . From 2d1b27cd9a9d394f1414cde598285ed52b9e9fbc Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:27:52 +0200 Subject: [PATCH 004/176] Fix directory path in build actions --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 066768f9..96c89204 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,7 @@ jobs: - name: install extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ./s2e-core/ExtLibraries + working-directory: ../s2e-aocs-core/s2e-core/ExtLibraries run: | cmake --install . @@ -89,7 +89,7 @@ jobs: - name: build shell: cmd - working-directory: ./s2e-aocs-core + working-directory: ../s2e-aocs-core run: | cl.exe cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON From a165b335eb5bccc81bfd47329ffbbf85ebc2e732 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:31:21 +0200 Subject: [PATCH 005/176] Fix directory path in build actions --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96c89204..0098181e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: - name: build extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ./s2e-core/ExtLibraries + working-directory: ../s2e-aocs-core/s2e-core/ExtLibraries run: | cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" cmake --build . From df41f363515798bce40980517f91606bbd030839 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:33:45 +0200 Subject: [PATCH 006/176] Fix directory path in build actions --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0098181e..e899c760 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: - name: build extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ../s2e-aocs-core/s2e-core/ExtLibraries + working-directory: ../s2e-aocs/s2e-core/ExtLibraries run: | cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" cmake --build . @@ -69,7 +69,7 @@ jobs: - name: install extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ../s2e-aocs-core/s2e-core/ExtLibraries + working-directory: ../s2e-aocs/s2e-core/ExtLibraries run: | cmake --install . @@ -89,7 +89,7 @@ jobs: - name: build shell: cmd - working-directory: ../s2e-aocs-core + working-directory: ../s2e-aocs/s2e-aocs-core run: | cl.exe cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON From 4949f04a3341c0c90e675ad4d44288f5ac019d04 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:35:57 +0200 Subject: [PATCH 007/176] Fix directory path in build actions --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e899c760..e7fcfeb1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: - name: build extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ../s2e-aocs/s2e-core/ExtLibraries + working-directory: ./s2e-aocs/s2e-core/ExtLibraries run: | cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" cmake --build . @@ -69,7 +69,7 @@ jobs: - name: install extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ../s2e-aocs/s2e-core/ExtLibraries + working-directory: ./s2e-aocs/s2e-core/ExtLibraries run: | cmake --install . @@ -89,8 +89,8 @@ jobs: - name: build shell: cmd - working-directory: ../s2e-aocs/s2e-aocs-core + working-directory: ./s2e-aocs/s2e-aocs-core run: | cl.exe - cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON + cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON cmake --build . From 72e9603ca14d07fcad6fd737f61a27f2785fba7b Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:39:10 +0200 Subject: [PATCH 008/176] Fix directory path in build actions --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7fcfeb1..c40c20c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: - name: build extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ./s2e-aocs/s2e-core/ExtLibraries + working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" cmake --build . @@ -69,7 +69,7 @@ jobs: - name: install extlib if: steps.cache-extlib.outputs.cache-hit != 'true' shell: powershell - working-directory: ./s2e-aocs/s2e-core/ExtLibraries + working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | cmake --install . @@ -89,7 +89,7 @@ jobs: - name: build shell: cmd - working-directory: ./s2e-aocs/s2e-aocs-core + working-directory: ./s2e-aobc/s2e-aocs-core run: | cl.exe cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON From 9d52e6aed54701c1778ab73166804b0cab1ed9b0 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:42:45 +0200 Subject: [PATCH 009/176] Fix directory path for check ExtLib --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c40c20c7..75c742f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,7 +75,7 @@ jobs: - name: check extlib shell: powershell - working-directory: ./ExtLibraries + working-directory: ./s2e-aobc/ExtLibraries run: | ls cspice ls cspice/cspice_msvs/lib From 09d7e01af53d8b560c37d7eeb87fc320f5c713e9 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:49:59 +0200 Subject: [PATCH 010/176] Fix directory path for build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 75c742f1..49efae8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,5 +92,5 @@ jobs: working-directory: ./s2e-aobc/s2e-aocs-core run: | cl.exe - cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON + cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON cmake --build . From c5102f407aa8c6ad8abbf9c396affc4d7f81f6a6 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:54:32 +0200 Subject: [PATCH 011/176] Fix cache directory path for ext lib --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49efae8c..f529a9dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: id: cache-extlib uses: actions/cache@v3 with: - key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }} + key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-aobc/s2e-core/ExtLibraries/**') }} path: ExtLibraries - name: build extlib From 4bad401de15c07e7ad642be0b27ad5b4a645f868 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:55:15 +0200 Subject: [PATCH 012/176] fix name --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f529a9dc..66b29e95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,8 @@ env: S2E_AOBC_VERSION: v2.0.1 jobs: - build_s2e_win: - name: Build with S2E on Windows VS2022 + build_c2a_with_s2e_win: + name: Build C2A with S2E on Windows VS2022 # VS2022 を使うため runs-on: windows-2022 strategy: From 5d951794beda77f36f44c7b9ae1b2c7a444e0dcb Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 30 Apr 2023 23:59:55 +0200 Subject: [PATCH 013/176] Add build with linux --- .github/workflows/build.yml | 90 +++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66b29e95..3c94952f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,3 +94,93 @@ jobs: cl.exe cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON cmake --build . + + build_c2a_with_s2e_linux: + name: Build C2A with S2E on Linux + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + compiler: ['gcc-11 g++-11'] # , 'clang clang++'] # 一旦clangは外す + + steps: + - uses: actions/checkout@v3 + + - name: checkout the submodules + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: checkout S2E AOBC + uses: actions/checkout@v3 + with: + path: s2e-aobc + 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 + id: compiler + run: | + COMPILER="${{ matrix.compiler }}" + read -r -a COMPILER <<< "$COMPILER" + echo "CC=${COMPILER[0]}" >> "$GITHUB_OUTPUT" + echo "CXX=${COMPILER[1]}" >> "$GITHUB_OUTPUT" + - name: install deps + run: | + # FIXME: temporary install gcc-11 in ubuntu:focal + if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc-11" ]]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + fi + sudo apt-get update + if [[ "${{ steps.compiler.outputs.CC }}" =~ "gcc" ]]; then + sudo apt-get install -y ${{ steps.compiler.outputs.CC }}-multilib \ + ${{ steps.compiler.outputs.CXX }}-multilib + else + sudo apt-get install -y gcc-multilib g++-multilib + fi + - name: show tools version + run: | + cmake --version + ${{ steps.compiler.outputs.CC }} --version + ${{ steps.compiler.outputs.CXX }} --version + - name: cache extlib + id: cache-extlib + uses: actions/cache@v3 + with: + key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-aobc/s2e-core/ExtLibraries/**') }}-BUILD_64BIT=OFF + path: ExtLibraries + + - name: build extlib + if: steps.cache-extlib.outputs.cache-hit != 'true' + working-directory: ./s2e-aobc/s2e-core/ExtLibraries + run: | + cmake -DBUILD_64BIT=OFF + cmake --build . + - name: install extlib + if: steps.cache-extlib.outputs.cache-hit != 'true' + working-directory: ./s2e-aobc/s2e-core/ExtLibraries + run: | + cmake --install . + - name: check extlib + working-directory: ./s2e-aobc/ExtLibraries + run: | + ls cspice + ls cspice/cspice_unix* + ls cspice/include + ls cspice/generic_kernels + ls nrlmsise00 + ls nrlmsise00/table + ls nrlmsise00/lib* + ls nrlmsise00/lib*/libnrlmsise00.a + ls nrlmsise00/src + - name: build + working-directory: ./s2e-aobc/s2e-aocs-core + env: + CC: ${{ steps.compiler.outputs.CC }} + CXX: ${{ steps.compiler.outputs.CXX }} + run: | + cmake . -DBUILD_64BIT=OFF -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON + cmake --build . From 416cdbcbc2a034febebfcd4412826a173968f0ac Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 1 May 2023 10:56:19 +0200 Subject: [PATCH 014/176] Fix PR template --- .github/PULL_REQUEST_TEMPLATE.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 82728e77..4e0b00e2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,7 +8,17 @@ 詳しく ## 検証結果 -test へのリンクや,検証結果へのリンク +### ビルドチェック (どちらもチェック) +- [ ] SILSでのビルドチェックに通った(CIで確認) +- [ ] vMicroでのビルドチェックに通った + +### 動作確認チェック (いずれかをチェック) +- [ ] SILSでアルゴリズムが想定通りに動いた +- [ ] 実機でアルゴリズムが想定通りに動いた +- [ ] (テレコマ試験の場合)コマンドファイルを使った試験をパスした + +### 試験結果詳細記述場所 or 詳細ログ保存場所へのリンク +- 図や表で記述する ## 影響範囲 XX系の動作がガラッと変わる,とか. @@ -17,7 +27,7 @@ XX系の動作がガラッと変わる,とか. 何かあれば ## 注意 -- 関連する Projects が存在する場合,それの紐付けを行うこと -- Assignees を設定すること -- 可能ならば Reviewers を設定すること -- 可能ならば `priority` ラベルを付けること +- 6U AOCS team Projects への紐付けを行うこと +- Assignees を自分に設定すること +- Reviewers を設定すること +- `priority` ラベルや`major/minor/patch update`ラベルを付けること From cd096650f5b7fc1b773a03c1b387280bd9dbba61 Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Wed, 10 May 2023 10:52:27 +0900 Subject: [PATCH 015/176] add rw commands --- .../Applications/DriverInstances/di_rw0003.c | 64 +++++++++++++++ .../Applications/DriverInstances/di_rw0003.h | 4 + src/src_user/Drivers/Aocs/rw0003.c | 77 +++++++++++++++++++ src/src_user/Drivers/Aocs/rw0003.h | 32 ++++++++ 4 files changed, 177 insertions(+) diff --git a/src/src_user/Applications/DriverInstances/di_rw0003.c b/src/src_user/Applications/DriverInstances/di_rw0003.c index 8d67608e..69753b77 100644 --- a/src/src_user/Applications/DriverInstances/di_rw0003.c +++ b/src/src_user/Applications/DriverInstances/di_rw0003.c @@ -287,4 +287,68 @@ CCP_CmdRet Cmd_DI_RW0003_DRIVE_SPEED(const CommonCmdPacket* packet) return DS_conv_cmd_err_to_ccp_cmd_ret(ret); } +CCP_CmdRet Cmd_DI_RW0003_READ_VDD(const CommonCmdPacket* packet) +{ + const uint8_t* param = CCP_get_param_head(packet); + RW0003_IDX idx; + DS_CMD_ERR_CODE ret; + + idx = (RW0003_IDX)param[0]; + if (idx >= RW0003_IDX_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + + if (DI_RW0003_is_initialized_[idx] != 1) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + + ret = RW0003_read_vdd(&rw0003_driver_[idx]); + + return DS_conv_cmd_err_to_ccp_cmd_ret(ret); +} + +CCP_CmdRet Cmd_DI_RW0003_READ_SEU_COUNT(const CommonCmdPacket* packet) +{ + const uint8_t* param = CCP_get_param_head(packet); + RW0003_IDX idx; + DS_CMD_ERR_CODE ret; + + idx = (RW0003_IDX)param[0]; + if (idx >= RW0003_IDX_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + + if (DI_RW0003_is_initialized_[idx] != 1) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + + ret = RW0003_read_seu_count(&rw0003_driver_[idx]); + + return DS_conv_cmd_err_to_ccp_cmd_ret(ret); +} + +CCP_CmdRet Cmd_DI_RW0003_READ_FAULT_STATE(const CommonCmdPacket* packet) +{ + const uint8_t* param = CCP_get_param_head(packet); + RW0003_IDX idx; + DS_CMD_ERR_CODE ret; + + idx = (RW0003_IDX)param[0]; + if (idx >= RW0003_IDX_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + + if (DI_RW0003_is_initialized_[idx] != 1) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + + ret = RW0003_read_fautl_state(&rw0003_driver_[idx]); + + return DS_conv_cmd_err_to_ccp_cmd_ret(ret); +} + +CCP_CmdRet Cmd_DI_RW0003_DIAGNOSTIC(const CommonCmdPacket* packet) +{ + const uint8_t* param = CCP_get_param_head(packet); + RW0003_IDX idx; + DS_CMD_ERR_CODE ret; + + idx = (RW0003_IDX)param[0]; + if (idx >= RW0003_IDX_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + + if (DI_RW0003_is_initialized_[idx] != 1) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + + ret = RW0003_diagnostic(&rw0003_driver_[idx]); + + return DS_conv_cmd_err_to_ccp_cmd_ret(ret); +} + #pragma section diff --git a/src/src_user/Applications/DriverInstances/di_rw0003.h b/src/src_user/Applications/DriverInstances/di_rw0003.h index 68df804c..0a2267f8 100644 --- a/src/src_user/Applications/DriverInstances/di_rw0003.h +++ b/src/src_user/Applications/DriverInstances/di_rw0003.h @@ -55,5 +55,9 @@ CCP_CmdRet Cmd_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR(const CommonCmdPacket* pa CCP_CmdRet Cmd_DI_RW0003_SET_IDLE(const CommonCmdPacket* packet); CCP_CmdRet Cmd_DI_RW0003_DRIVE_TORQUE(const CommonCmdPacket* packet); CCP_CmdRet Cmd_DI_RW0003_DRIVE_SPEED(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_RW0003_READ_VDD(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_RW0003_READ_SEU_COUNT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_RW0003_READ_FAULT_STATE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_RW0003_DIAGNOSTIC(const CommonCmdPacket* packet); #endif diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index bee75925..84fdd9a7 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -44,6 +44,7 @@ static const uint8_t RW0003_kSlipTfesc_ = 0xdd; //!< SLIP TFESC static const uint8_t RW0003_kSrcAddress_ = 0x11; //!< I2C source address. 実際は0xc0以外の適当な値でよくこの値は仕様書で例として与えられているもの static const uint8_t RW0003_kCmdIdInit_ = 0x01; +static const uint8_t RW0003_kCmdIdDiagnostic_= 0x04; static const uint8_t RW0003_kCmdIdReadFile_ = 0x07; static const uint8_t RW0003_kCmdIdWriteFile_ = 0x08; static const uint8_t RW0003_kCmdIdMax_ = 0x1f; @@ -52,12 +53,18 @@ static const uint8_t RW0003_kWriteAddressIdle_ = 0x00; static const uint8_t RW0003_kWriteAddressSpeed_ = 0x03; static const uint8_t RW0003_kWriteAddressTorque_ = 0x12; +static const uint8_t RW0003_kDiagnosticsChannel_ = 0x00; + +static const uint8_t RW0003_kReadAddressVDD_ = 0x02; static const uint8_t RW0003_kReadAddressTemperature_ = 0x03; static const uint8_t RW0003_kReadAddressSpeed_ = 0x15; +static const uint8_t RW0003_kReadAddressSEUCount_ = 0x18; +static const uint8_t RW0003_kReadAddressFaultState_ = 0x19; static const uint8_t RW0003_kReadAddressLimitSpeed1_ = 0x33; static const uint8_t RW0003_kReadAddressLimitSpeed2_ = 0x34; static const uint8_t RW0003_kMcfReadEdac_ = 0xa7; //!< EDAC memory読み出し返答テレメのMessage Control Field +static const uint8_t RW0003_kMcfDiagnostics_ = 0x00;//!< Diagnostics返答テレメのMessage Control Field TODO: 更新する static const int RW0003_kCrcRevFlag_ = 0; //!< CRC関数の反転フラグ static const uint16_t RW0003_kCrcInitial_ = 0xffff; //!< CRC計算初期値 @@ -97,6 +104,10 @@ DS_INIT_ERR_CODE RW0003_init(RW0003_Driver* rw0003_driver, uint8_t ch, uint8_t i rw0003_driver->info.speed_rad_s = 0.0f; rw0003_driver->info.torque_Nm = 0.0f; rw0003_driver->info.temperature_degC = 0.0f; + rw0003_driver->info.vdd_V = 0.0f; + rw0003_driver->info.seu_count = 0.0f; + rw0003_driver->info.fault_state = 0.0f; + rw0003_driver->info.diagnostic_reset_reason = 0; rw0003_driver->info.speed_limit1_rad_s = 900.0f; // デフォルト値を初期値とする TODO_L 設定・読み出し関数を作る rw0003_driver->info.speed_limit2_rad_s = 1000.0f; // デフォルト値を初期値とする TODO_L 設定・読み出し関数を作る rw0003_driver->info.rotation_direction_b[0] = 1.0f; @@ -201,6 +212,51 @@ C2A_MATH_ERROR RW0003_set_rotation_direction_b(RW0003_Driver* rm3100_driver, return C2A_MATH_ERROR_OK; } +DS_CMD_ERR_CODE RW0003_read_vdd(RW0003_Driver* rw0003_driver) +{ + return RW0003_read_edac_(rw0003_driver, RW0003_kReadAddressVDD_); +} + +DS_CMD_ERR_CODE RW0003_read_seu_count(RW0003_Driver* rw0003_driver) +{ + return RW0003_read_edac_(rw0003_driver, RW0003_kReadAddressSEUCount_); +} + +DS_CMD_ERR_CODE RW0003_read_fault_state(RW0003_Driver* rw0003_driver) +{ + return RW0003_read_edac_(rw0003_driver, RW0003_kReadAddressFaultState_); +} + +DS_CMD_ERR_CODE RW0003_diagnostic(RW0003_Driver* rw0003_driver) +{ + DS_CMD_ERR_CODE ret; + + // Command Definition + uint8_t mcf; + ret = RW0003_convert_to_mcf_(RW0003_POLL_WITH_REPLY, RW0003_kCmdIdDiagnostic_, &mcf); + if (ret != DS_CMD_OK) return ret; + + // NSP message conversion + const size_t kNspDataLength = RW0003_NSP_HEADER_SIZE + sizeof(uint8_t) + RW0003_NSP_CRC_SIZE; + uint8_t nsp_data[kNspDataLength]; + RW0003_convert_to_nsp_with_data_(rw0003_driver->driver.i2c_config.device_address, + mcf, &RW0003_kDiagnosticsChannel_, sizeof(RW0003_kDiagnosticsChannel_), nsp_data); + + // SLIP: diagnosticはCRCのみSLIPする可能性がある + const size_t kSlipDataMaxLength = kNspDataLength + RW0003_NSP_CRC_SIZE; + uint8_t slip_data[kSlipDataMaxLength]; + size_t slip_data_length = kSlipDataMaxLength; + RW0003_encode_slip_(nsp_data, kNspDataLength, slip_data, &slip_data_length); + slip_data[slip_data_length] = RW0003_kSlipFend_; + slip_data_length++; + + const size_t kReadDataLength = RW0003_RX_MAX_FRAME_SIZE; + ret = RW0003_send_read_(rw0003_driver, slip_data, slip_data_length, kReadDataLength); + if (ret != DS_CMD_OK) return ret; + + return DS_CMD_OK; +} + static DS_ERR_CODE RW0003_load_driver_super_init_settings_(DriverSuper* super) { @@ -443,11 +499,32 @@ static DS_ERR_CODE RW0003_analyze_rec_data_(DS_StreamConfig* stream_config, void { memcpy(&rw0003_driver->info.speed_rad_s, decoded_rx_data + pos, sizeof(float)); } + else if (read_address == RW0003_kReadAddressVDD_) + { + memcpy(&rw0003_driver->info.vdd_V, decoded_rx_data + pos, sizeof(float)); + } + else if (read_address == RW0003_kReadAddressSEUCount_) + { + memcpy(&rw0003_driver->info.seu_count, decoded_rx_data + pos, sizeof(float)); + } + else if (read_address == RW0003_kReadAddressFaultState_) + { + memcpy(&rw0003_driver->info.fault_state, decoded_rx_data + pos, sizeof(float)); + } else { return DS_ERR_CODE_ERR; } } + else if (RW0003_rx_mcf == RW0003_kMcfDiagnostics_) + { + uint8_t read_address = decoded_rx_data[pos]; + pos++; + if (read_address == RW0003_kDiagnosticsChannel_) + { + memcpy(&rw0003_driver->info.diagnostic_reset_reason, decoded_rx_data + pos, sizeof(int32_t)); + } + } return DS_ERR_CODE_OK; } diff --git a/src/src_user/Drivers/Aocs/rw0003.h b/src/src_user/Drivers/Aocs/rw0003.h index 656ed050..4ebacf16 100644 --- a/src/src_user/Drivers/Aocs/rw0003.h +++ b/src/src_user/Drivers/Aocs/rw0003.h @@ -34,6 +34,10 @@ typedef struct float speed_rad_s; //!< rotation speed [rad/s] float torque_Nm; //!< ordered torque [Nm] float temperature_degC; //!< temperature [degC] + float vdd_V; //!< output of +3.3 V DC/DC converter [V] + float seu_count; //!< number of errors + float fault_state; //!< 1: wheel is in an fault, 0: otherwise + init32_t diagnostic_reset_reason; //!< reset reason float speed_limit1_rad_s; //!< clipされる回転数 [rad/s] (limit1 < limit2) float speed_limit2_rad_s; //!< 異常停止する回転数 [rad/s] (limit1 < limit2) float rotation_direction_b[PHYSICAL_CONST_THREE_DIM]; //!< 機体座標系での回転方向単位ベクトル(右手系) @@ -121,4 +125,32 @@ DS_CMD_ERR_CODE RW0003_drive_speed(RW0003_Driver* rw0003_driver, const float spe C2A_MATH_ERROR RW0003_set_rotation_direction_b(RW0003_Driver* rm3100_driver, const float rotation_direction_b[PHYSICAL_CONST_THREE_DIM]); +/** + * @brief RW0003 VDD読み取りコマンド + * @param rw0003_driver : RW0003_Driver構造体へのポインタ + * @return DS_CMD_ERR_CODEに準じる + */ +DS_CMD_ERR_CODE RW0003_read_vdd(RW0003_Driver* rw0003_driver); + +/** + * @brief RW0003 SEU Count読み取りコマンド + * @param rw0003_driver : RW0003_Driver構造体へのポインタ + * @return DS_CMD_ERR_CODEに準じる + */ +DS_CMD_ERR_CODE RW0003_read_seu_count(RW0003_Driver* rw0003_driver); + +/** + * @brief RW0003 Fault State読み取りコマンド + * @param rw0003_driver : RW0003_Driver構造体へのポインタ + * @return DS_CMD_ERR_CODEに準じる + */ +DS_CMD_ERR_CODE RW0003_read_fault_state(RW0003_Driver* rw0003_driver); + +/** + * @brief RW0003 Diagnosticコマンド + * @param rw0003_driver : RW0003_Driver構造体へのポインタ + * @return DS_CMD_ERR_CODEに準じる + */ +DS_CMD_ERR_CODE RW0003_diagnostic(RW0003_Driver* rw0003_driver); + #endif From 7e023a30991de2ca3362646cefff8bcf880dd818 Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Wed, 10 May 2023 13:40:21 +0900 Subject: [PATCH 016/176] update tlm/cmd db --- .../Applications/DriverInstances/di_rw0003.c | 2 +- src/src_user/Drivers/Aocs/rw0003.c | 15 + src/src_user/Drivers/Aocs/rw0003.h | 2 +- .../CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv | 78 +-- .../TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv | 500 ++++++++++++++++++ .../ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv | 500 ++++++++++++++++++ 6 files changed, 1056 insertions(+), 41 deletions(-) create mode 100644 src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv create mode 100644 src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv diff --git a/src/src_user/Applications/DriverInstances/di_rw0003.c b/src/src_user/Applications/DriverInstances/di_rw0003.c index 69753b77..c84c4487 100644 --- a/src/src_user/Applications/DriverInstances/di_rw0003.c +++ b/src/src_user/Applications/DriverInstances/di_rw0003.c @@ -330,7 +330,7 @@ CCP_CmdRet Cmd_DI_RW0003_READ_FAULT_STATE(const CommonCmdPacket* packet) if (DI_RW0003_is_initialized_[idx] != 1) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - ret = RW0003_read_fautl_state(&rw0003_driver_[idx]); + ret = RW0003_read_fault_state(&rw0003_driver_[idx]); return DS_conv_cmd_err_to_ccp_cmd_ret(ret); } diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index 84fdd9a7..e3bde1de 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -15,6 +15,8 @@ #include "../../Library/vector3.h" #include "../../Library/c2a_math.h" +// #define DRIVER_RW0003_DEBUG_SHOW_REC_DATA + /** * @enum RW0003_POLL * @brief POLL bitの設定 @@ -421,6 +423,19 @@ static DS_CMD_ERR_CODE RW0003_send_read_(RW0003_Driver* rw0003_driver, return DS_CMD_DRIVER_SUPER_ERR; } +#ifdef DRIVER_RW0003_DEBUG_SHOW_REC_DATA + if (rw0003_driver->driver.super.config.rec_status_.ret_from_if_rx > 0) + { + Printf("rw rx_frame_: %d Bytes \n", rw0003_driver->driver.super.config.rec_status_.ret_from_if_rx); + for (int i = 0; i < rw0003_driver->driver.super.config.rec_status_.ret_from_if_rx; i++) + { + Printf("%02x ", rw0003_driver->driver.super.stream_config[0].rx_frame_[i]); + if (i % 4 == 3) Printf(" "); + } + Printf("\n"); + } +#endif + ret = DS_analyze_rec_data(&(rw0003_driver->driver.super), RW0003_STREAM_TLM_CMD, rw0003_driver); if (ret == DS_ERR_CODE_OK) { diff --git a/src/src_user/Drivers/Aocs/rw0003.h b/src/src_user/Drivers/Aocs/rw0003.h index 4ebacf16..a90b0db8 100644 --- a/src/src_user/Drivers/Aocs/rw0003.h +++ b/src/src_user/Drivers/Aocs/rw0003.h @@ -37,7 +37,7 @@ typedef struct float vdd_V; //!< output of +3.3 V DC/DC converter [V] float seu_count; //!< number of errors float fault_state; //!< 1: wheel is in an fault, 0: otherwise - init32_t diagnostic_reset_reason; //!< reset reason + int32_t diagnostic_reset_reason; //!< reset reason float speed_limit1_rad_s; //!< clipされる回転数 [rad/s] (limit1 < limit2) float speed_limit2_rad_s; //!< 異常停止する回転数 [rad/s] (limit1 < limit2) float rotation_direction_b[PHYSICAL_CONST_THREE_DIM]; //!< 機体座標系での回転方向単位ベクトル(右手系) diff --git a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv index df0c53b3..aa949a0c 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv @@ -159,48 +159,52 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,Cmd_DCU_CLEAR_LOG,OBC,0x0061,0,,,,,,,,,,,,,,,ログをクリアする, * CDH,,,,,,,,,,,,,,,,,,,, **,FRAMコマンド,,,,,,,,,,,,,,,,,,, -,Cmd_DI_FM25V10_WRITE_BYTE,AOBC,0x0064,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,uint8_t,write_data,,,,,,,danger,,FRAM FM25V10に1Byteを書き込む, -,Cmd_DI_FM25V10_READ_BYTE,AOBC,0x0065,2,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,,,,,,,,,,,FRAM FM25V10から1Byteを読み出す, -,Cmd_DI_FM25V10_MANAGE_STATUS,AOBC,0x0066,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint8_t,write = 0; read = others,uint8_t,write_status (ignored when read),,,,,,,,,FRAM FM25V10のステータスレジスタコマンド, +,Cmd_DI_FM25V10_WRITE_BYTE,AOBC,0x0063,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,uint8_t,write_data,,,,,,,danger,,FRAM FM25V10に1Byteを書き込む, +,Cmd_DI_FM25V10_READ_BYTE,AOBC,0x0064,2,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,,,,,,,,,,,FRAM FM25V10から1Byteを読み出す, +,Cmd_DI_FM25V10_MANAGE_STATUS,AOBC,0x0065,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint8_t,write = 0; read = others,uint8_t,write_status (ignored when read),,,,,,,,,FRAM FM25V10のステータスレジスタコマンド, **,不揮発メモリコマンド,,,,,,,,,,,,,,,,,,, -,Cmd_APP_NVM_MANAGER_WRITE_BYTES,AOBC,0x0067,3,uint32_t,start address(0-0x7ffff),uint8_t,data size,raw,write data(consider endian),,,,,,,danger,,不揮発メモリに複数データを書き込む, -,Cmd_APP_NVM_MANAGER_READ_BYTES,AOBC,0x0068,2,uint32_t,start address(0-0x7ffff),uint8_t,data size,,,,,,,,,,,不揮発メモリから複数データを読み出す, -,Cmd_APP_NVM_PARTITION_WRITE_BYTES,AOBC,0x0069,4,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,raw,write data(consider endian),,,,,danger,,パーティションアクセスで不揮発メモリに複数データを書き込む, -,Cmd_APP_NVM_PARTITION_READ_BYTES,AOBC,0x006A,3,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,,,,,,,,,パーティションアクセスで不揮発メモリから複数データを読み出す, -,Cmd_APP_AOCS_DR_SET_WRITE,AOBC,0x006B,4,uint8_t,permission: 0=DISABLE; 1=ENABLE,uint8_t,overwrite: 0=DISABLE; 1=ENABLE,uint8_t,read_partition=2; 3; 4,uint32_t,write_pointer,,,,,,,DRの書き込み設定, -,Cmd_APP_AOCS_DR_READ,AOBC,0x006C,3,uint8_t,read_mode: 0=MANUAL; 1=CONTINUOUS,uint8_t,read_partition=2; 3; 4,uint32_t,read_pointer,,,,,,,,,DRの読み出し, +,Cmd_APP_NVM_MANAGER_WRITE_BYTES,AOBC,0x0066,3,uint32_t,start address(0-0x7ffff),uint8_t,data size,raw,write data(consider endian),,,,,,,danger,,不揮発メモリに複数データを書き込む, +,Cmd_APP_NVM_MANAGER_READ_BYTES,AOBC,0x0067,2,uint32_t,start address(0-0x7ffff),uint8_t,data size,,,,,,,,,,,不揮発メモリから複数データを読み出す, +,Cmd_APP_NVM_PARTITION_WRITE_BYTES,AOBC,0x0068,4,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,raw,write data(consider endian),,,,,danger,,パーティションアクセスで不揮発メモリに複数データを書き込む, +,Cmd_APP_NVM_PARTITION_READ_BYTES,AOBC,0x0069,3,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,,,,,,,,,パーティションアクセスで不揮発メモリから複数データを読み出す, +,Cmd_APP_AOCS_DR_SET_WRITE,AOBC,0x006A,4,uint8_t,permission: 0=DISABLE; 1=ENABLE,uint8_t,overwrite: 0=DISABLE; 1=ENABLE,uint8_t,read_partition=2; 3; 4,uint32_t,write_pointer,,,,,,,DRの書き込み設定, +,Cmd_APP_AOCS_DR_READ,AOBC,0x006B,3,uint8_t,read_mode: 0=MANUAL; 1=CONTINUOUS,uint8_t,read_partition=2; 3; 4,uint32_t,read_pointer,,,,,,,,,DRの読み出し, **,,,,,,,,,,,,,,,,,,,, * POWER,電源系コマンド,,,,,,,,,,,,,,,,,,, -,Cmd_APP_PSC_CONTROL_5V_PORT,AOBC,0x006E,2,uint8_t,INA=0; MPU; RM; SS; MTQ,uint8_t,off=0; on=1,,,,,,,,,,,5V配下の電源スイッチ操作, -,Cmd_APP_PSC_CONTROL_UNREG_PORT,AOBC,0x006F,2,uint8_t,STIM=0; STT; OEM; RWX; RWY; RWZ,uint8_t,off=0; on=1,,,,,,,,,,,非安定バス配下の電源スイッチ操作, -,Cmd_DI_INA260_INIT,AOBC,0x0070,4,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint8_t,averaging_mode=0-7,uint8_t,voltage_conversion_time=0-7,uint8_t,current_conversion_time=0-7,,,,,,,INA260初期化モード設定, -,Cmd_DI_INA260_SET_OVER_CURRENT_PROTECTION,AOBC,0x0071,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,float,OC_threshold [mA],,,,,,,,,,,INA260過電流閾値設定, -,Cmd_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD,AOBC,0x0072,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,HW_OC_EL_threshold [V],,,,,,,,,,,H/W過電流EL登録用電圧閾値設定, -,Cmd_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION,AOBC,0x0073,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,SW_OC_threshold [mA],,,,,,,,,,,S/W過電流閾値設定, +,Cmd_APP_PSC_CONTROL_5V_PORT,AOBC,0x006C,2,uint8_t,INA=0; MPU; RM; SS; MTQ,uint8_t,off=0; on=1,,,,,,,,,,,5V配下の電源スイッチ操作, +,Cmd_APP_PSC_CONTROL_UNREG_PORT,AOBC,0x006D,2,uint8_t,STIM=0; STT; OEM; RWX; RWY; RWZ,uint8_t,off=0; on=1,,,,,,,,,,,非安定バス配下の電源スイッチ操作, +,Cmd_DI_INA260_INIT,AOBC,0x006E,4,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint8_t,averaging_mode=0-7,uint8_t,voltage_conversion_time=0-7,uint8_t,current_conversion_time=0-7,,,,,,,INA260初期化モード設定, +,Cmd_DI_INA260_SET_OVER_CURRENT_PROTECTION,AOBC,0x006F,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,float,OC_threshold [mA],,,,,,,,,,,INA260過電流閾値設定, +,Cmd_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD,AOBC,0x0070,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,HW_OC_EL_threshold [V],,,,,,,,,,,H/W過電流EL登録用電圧閾値設定, +,Cmd_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION,AOBC,0x0071,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,SW_OC_threshold [mA],,,,,,,,,,,S/W過電流閾値設定, **,,,,,,,,,,,,,,,,,,,, **,,,,,,,,,,,,,,,,,,,, **,姿勢系コマンド,,,,,,,,,,,,,,,,,,, * COMPO,コンポ関連,,,,,,,,,,,,,,,,,,, -,Cmd_DI_RM3100_INIT,AOBC,0x0076,1,uint8_t,0=AOBC@@1=EXT,,,,,,,,,,,,,RM3100の初期化を行う, -,Cmd_DI_MPU9250_INIT,AOBC,0x0077,0,,,,,,,,,,,,,,,MPU9250の初期化を行う, -,Cmd_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS,AOBC,0x0078,1,uint32_t,pwm_period_ms,,,,,,,,,,,,,MTQの3軸のPWM周期を一括で設定.入力は正の値に限る, -,Cmd_DI_MTQ_SEIREN_SET_PWM_DUTY,AOBC,0x0079,2,uint8_t,MTQ X=0; MTQ Y=1; MTQ Z = 2,int8_t,pwm_signed_duty_percent,,,,,,,,,,,指定した軸のMTQのPWMデューティー比を%単位の符号付整数値で設定.入力範囲は[-100; 100], -,Cmd_DI_STIM210_INIT,AOBC,0x007A,0,,,,,,,,,,,,,,,STIM210の初期化を行う (デフォルトの設定で出力), -,Cmd_DI_STIM210_SET_MODE,AOBC,0x007B,1,uint8_t,1=NORMAL@@2=SERVICE,,,,,,,,,,,,,STIM210の運用モードをノーマル/サービスモードに変更, -,Cmd_DI_STIM210_SET_NORMAL_MODE_FORMAT,AOBC,0x007C,1,uint8_t,0=RATE@@2=RATE_TEMP,,,,,,,,,,,,,STIM210の出力を変更(温度出力などを追加), -,Cmd_DI_STIM210_SET_GYRO_OUTPUT,AOBC,0x007D,1,uint8_t,0=ANG_VEL@@1=INCREMENTAL_ANG@@2=AVERAGE_ANG_VEL@@3=INTEGRATED_ANG,,,,,,,,,,,,,STIM210のジャイロ出力を角速度・角度から選択, -,Cmd_DI_STIM210_SET_SAMPLE_RATE,AOBC,0x007E,1,uint8_t,0=TRIGGER@@1=125Hz,,,,,,,,,,,,,STIM210のサンプルレートを設定, -,Cmd_DI_STIM210_SET_TERMINATION_MODE,AOBC,0x007F,1,uint8_t,0=OFF; 1=CRLF,,,,,,,,,,,,,STIM210の終端設定, -,Cmd_DI_STIM210_SET_LOW_PASS_FILTER,AOBC,0x0080,1,uint8_t,0=16Hz; 1=33Hz; 2=66Hz@@3=131Hz@@4=262Hz,,,,,,,,,,,,,STIM210のLPFカットオフ周波数設定, -,Cmd_DI_OEM7600_ONOFF_ANTENNA_POWER,AOBC,0x0081,2,uint8_t,oem_id,uint8_t,off=0; on=1,,,,,,,,,,,OEM7600のアンテナ電源操作, -,Cmd_DI_OEM7600_SOFTWARE_RESET,AOBC,0x0082,2,uint8_t,oem_id,uint8_t,time[sec],,,,,,,,,,,OEM7600のソフトウェアリセット, -,Cmd_DI_OEM7600_SAVE_TLM_SETTING,AOBC,0x0083,1,uint8_t,oem_id,,,,,,,,,,,,,OEM7600の出力テレメ設定保存, -,Cmd_DI_OEM7600_SET_TLM_CONTENTS,AOBC,0x0084,3,uint8_t,oem_id,uint8_t,out_interval,uint32_t,oem7600_tlm_id,,,,,,,,,OEM7600の出力テレメ設定変更, -,Cmd_DI_OEM7600_SET_RESET_GPIO_HIGHLOW,AOBC,0x0085,2,uint8_t,oem_id,uint8_t,low=0; high=1,,,,,,,,,,,OEM7600のハードウェアリセット, -,Cmd_DI_RW0003_INIT,AOBC,0x0086,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003の初期化を行う, -,Cmd_DI_RW0003_SET_IDLE,AOBC,0x0087,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003をIdleモードに入れる, -,Cmd_DI_RW0003_DRIVE_TORQUE,AOBC,0x0088,2,uint8_t,RWX=0; RWY; RWZ,float,torque [Nm],,,,,,,,,,,RW0003にトルク指令を与える, -,Cmd_DI_RW0003_DRIVE_SPEED,AOBC,0x0089,2,uint8_t,RWX=0; RWY; RWZ,float,speed [rad/s],,,,,,,,,,,RW0003に回転数指令を与える, +,Cmd_DI_RM3100_INIT,AOBC,0x0072,1,uint8_t,0=AOBC@@1=EXT,,,,,,,,,,,,,RM3100の初期化を行う, +,Cmd_DI_MPU9250_INIT,AOBC,0x0073,0,,,,,,,,,,,,,,,MPU9250の初期化を行う, +,Cmd_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS,AOBC,0x0074,1,uint32_t,pwm_period_ms,,,,,,,,,,,,,MTQの3軸のPWM周期を一括で設定.入力は正の値に限る, +,Cmd_DI_MTQ_SEIREN_SET_PWM_DUTY,AOBC,0x0075,2,uint8_t,MTQ X=0; MTQ Y=1; MTQ Z = 2,int8_t,pwm_signed_duty_percent,,,,,,,,,,,指定した軸のMTQのPWMデューティー比を%単位の符号付整数値で設定.入力範囲は[-100; 100], +,Cmd_DI_STIM210_INIT,AOBC,0x0076,0,,,,,,,,,,,,,,,STIM210の初期化を行う (デフォルトの設定で出力), +,Cmd_DI_STIM210_SET_MODE,AOBC,0x0077,1,uint8_t,1=NORMAL@@2=SERVICE,,,,,,,,,,,,,STIM210の運用モードをノーマル/サービスモードに変更, +,Cmd_DI_STIM210_SET_NORMAL_MODE_FORMAT,AOBC,0x0078,1,uint8_t,0=RATE@@2=RATE_TEMP,,,,,,,,,,,,,STIM210の出力を変更(温度出力などを追加), +,Cmd_DI_STIM210_SET_GYRO_OUTPUT,AOBC,0x0079,1,uint8_t,0=ANG_VEL@@1=INCREMENTAL_ANG@@2=AVERAGE_ANG_VEL@@3=INTEGRATED_ANG,,,,,,,,,,,,,STIM210のジャイロ出力を角速度・角度から選択, +,Cmd_DI_STIM210_SET_SAMPLE_RATE,AOBC,0x007A,1,uint8_t,0=TRIGGER@@1=125Hz,,,,,,,,,,,,,STIM210のサンプルレートを設定, +,Cmd_DI_STIM210_SET_TERMINATION_MODE,AOBC,0x007B,1,uint8_t,0=OFF; 1=CRLF,,,,,,,,,,,,,STIM210の終端設定, +,Cmd_DI_STIM210_SET_LOW_PASS_FILTER,AOBC,0x007C,1,uint8_t,0=16Hz; 1=33Hz; 2=66Hz@@3=131Hz@@4=262Hz,,,,,,,,,,,,,STIM210のLPFカットオフ周波数設定, +,Cmd_DI_OEM7600_ONOFF_ANTENNA_POWER,AOBC,0x007D,2,uint8_t,oem_id,uint8_t,off=0; on=1,,,,,,,,,,,OEM7600のアンテナ電源操作, +,Cmd_DI_OEM7600_SOFTWARE_RESET,AOBC,0x007E,2,uint8_t,oem_id,uint8_t,time[sec],,,,,,,,,,,OEM7600のソフトウェアリセット, +,Cmd_DI_OEM7600_SAVE_TLM_SETTING,AOBC,0x007F,1,uint8_t,oem_id,,,,,,,,,,,,,OEM7600の出力テレメ設定保存, +,Cmd_DI_OEM7600_SET_TLM_CONTENTS,AOBC,0x0080,3,uint8_t,oem_id,uint8_t,out_interval,uint32_t,oem7600_tlm_id,,,,,,,,,OEM7600の出力テレメ設定変更, +,Cmd_DI_OEM7600_SET_RESET_GPIO_HIGHLOW,AOBC,0x0081,2,uint8_t,oem_id,uint8_t,low=0; high=1,,,,,,,,,,,OEM7600のハードウェアリセット, +,Cmd_DI_RW0003_INIT,AOBC,0x0082,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003の初期化を行う, +,Cmd_DI_RW0003_SET_IDLE,AOBC,0x0083,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003をIdleモードに入れる, +,Cmd_DI_RW0003_DRIVE_TORQUE,AOBC,0x0084,2,uint8_t,RWX=0; RWY; RWZ,float,torque [Nm],,,,,,,,,,,RW0003にトルク指令を与える, +,Cmd_DI_RW0003_DRIVE_SPEED,AOBC,0x0085,2,uint8_t,RWX=0; RWY; RWZ,float,speed [rad/s],,,,,,,,,,,RW0003に回転数指令を与える, +,Cmd_DI_RW0003_READ_VDD,AOBC,0x0086,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のVDDを読み取る, +,Cmd_DI_RW0003_READ_SEU_COUNT,AOBC,0x0087,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のSEU COUNTを読み取る, +,Cmd_DI_RW0003_READ_FAULT_STATE,AOBC,0x0088,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のFault Stateを読み取る, +,Cmd_DI_RW0003_DIAGNOSTIC,AOBC,0x0089,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003にDiagnosticコマンドを送る, ,Cmd_DI_SAGITTA_BOOT,AOBC,0x008A,0,,,,,,,,,,,,,,,SAGITTAをブートしてノミナルモードに移行する, ,Cmd_DI_SAGITTA_SET_UNIX_TIME_US,AOBC,0x008B,2,uint32_t,upper 32bit,uint32_t,lower 32bit,,,,,,,,,,,SAGITTAのUnixTime[us]の設定, ,Cmd_DI_SAGITTA_SET_PARAMETER,AOBC,0x008C,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAにパラメータ設定コマンドを送る, @@ -994,7 +998,3 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv new file mode 100644 index 00000000..c49e68d2 --- /dev/null +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv @@ -0,0 +1,500 @@ +,Target,OBC,Local Var,,,,,,,,,,,,,, +,PacketID,0xcf,,,,,,,,,,,,,,, +,Enable/Disable,ENABLE,,,,,,,,,,,,,,, +,IsRestricted,TRUE,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,,,,,,,,Description,Note +,Name,Var.%%##Type,Variable or Function Name,Ext.%%##Type,Pos. Desiginator,,,Conv.%%##Type,Poly (Σa_i * x^i),,,,,,Status,, +,,,,,Octet%%##Pos.,bit%%##Pos.,bit%%##Len.,,a0,a1,a2,a3,a4,a5,,, +,PH.VER,uint16_t,,PACKET,0,0,3,NONE,,,,,,,,, +,PH.TYPE,||,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,NONE,,,,,,,,, +,PH.SH_FLAG,||,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,NONE,,,,,,,,, +,PH.APID,||,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),11,NONE,,,,,,,,, +,PH.SEQ_FLAG,uint16_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),2,NONE,,,,,,,,, +,PH.SEQ_COUNT,||,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),14,NONE,,,,,,,,, +,PH.PACKET_LEN,uint16_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.VER,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.TI,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.TLM_ID,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, +,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, +,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SPEED_rad/s.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.speed_rad_s),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SPEED_rad/s.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.speed_rad_s),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SPEED_rad/s.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.speed_rad_s),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.TEMPERATURE_DEGC.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.temperature_degC),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.TEMPERATURE_DEGC.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.temperature_degC),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.TEMPERATURE_DEGC.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.temperature_degC),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.VDD_V.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.vdd_V),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.VDD_V.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.vdd_V),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.VDD_V.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.vdd_V),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SEU_COUNT.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.set_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SEU_COUNT.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.set_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SEU_COUNT.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.set_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.FAULT_STATE.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.fault_state),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.FAULT_STATE.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.fault_state),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.FAULT_STATE.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.fault_state),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.DIAGNOSTIC.RESET_REASON.X,int32_t,(int32_t)(rw0003_driver[RW0003_IDX_ON_X]->info.diagnostic_reset_reason),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.DIAGNOSTIC.RESET_REASON.Y,int32_t,(int32_t)(rw0003_driver[RW0003_IDX_ON_Y]->info.diagnostic_reset_reason),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.DIAGNOSTIC.RESET_REASON.Z,int32_t,(int32_t)(rw0003_driver[RW0003_IDX_ON_Z]->info.diagnostic_reset_reason),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv new file mode 100644 index 00000000..a99d545b --- /dev/null +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv @@ -0,0 +1,500 @@ +,Target,OBC,Local Var,,,,,,,,,,,,,, +,PacketID,0xcf,,,,,,,,,,,,,,, +,Enable/Disable,ENABLE,,,,,,,,,,,,,,, +,IsRestricted,TRUE,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,,,,,,,,Description,Note +,Name,Var.%%##Type,Variable or Function Name,Ext.%%##Type,Pos. Desiginator,,,Conv.%%##Type,Poly (Σa_i * x^i),,,,,,Status,, +,,,,,Octet%%##Pos.,bit%%##Pos.,bit%%##Len.,,a0,a1,a2,a3,a4,a5,,, +,PH.VER,uint16_t,,PACKET,0,0,3,NONE,,,,,,,,, +,PH.TYPE,,,PACKET,0,3,1,NONE,,,,,,,,, +,PH.SH_FLAG,,,PACKET,0,4,1,NONE,,,,,,,,, +,PH.APID,,,PACKET,0,5,11,NONE,,,,,,,,, +,PH.SEQ_FLAG,uint16_t,,PACKET,2,0,2,NONE,,,,,,,,, +,PH.SEQ_COUNT,,,PACKET,2,2,14,NONE,,,,,,,,, +,PH.PACKET_LEN,uint16_t,,PACKET,4,0,16,NONE,,,,,,,,, +,SH.VER,uint8_t,,PACKET,6,0,8,NONE,,,,,,,,, +,SH.TI,uint32_t,,PACKET,7,0,32,NONE,,,,,,,,, +,SH.TLM_ID,uint8_t,,PACKET,11,0,8,HEX,,,,,,,,, +,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, +,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, +,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, +,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,RW.SPEED_rad/s.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.speed_rad_s),PACKET,26,0,32,NONE,,,,,,,,, +,RW.SPEED_rad/s.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.speed_rad_s),PACKET,30,0,32,NONE,,,,,,,,, +,RW.SPEED_rad/s.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.speed_rad_s),PACKET,34,0,32,NONE,,,,,,,,, +,RW.TEMPERATURE_DEGC.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.temperature_degC),PACKET,38,0,32,NONE,,,,,,,,, +,RW.TEMPERATURE_DEGC.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.temperature_degC),PACKET,42,0,32,NONE,,,,,,,,, +,RW.TEMPERATURE_DEGC.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.temperature_degC),PACKET,46,0,32,NONE,,,,,,,,, +,RW.VDD_V.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.vdd_V),PACKET,50,0,32,NONE,,,,,,,,, +,RW.VDD_V.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.vdd_V),PACKET,54,0,32,NONE,,,,,,,,, +,RW.VDD_V.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.vdd_V),PACKET,58,0,32,NONE,,,,,,,,, +,RW.SEU_COUNT.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.set_count),PACKET,62,0,32,NONE,,,,,,,,, +,RW.SEU_COUNT.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.set_count),PACKET,66,0,32,NONE,,,,,,,,, +,RW.SEU_COUNT.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.set_count),PACKET,70,0,32,NONE,,,,,,,,, +,RW.FAULT_STATE.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.fault_state),PACKET,74,0,32,NONE,,,,,,,,, +,RW.FAULT_STATE.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.fault_state),PACKET,78,0,32,NONE,,,,,,,,, +,RW.FAULT_STATE.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.fault_state),PACKET,82,0,32,NONE,,,,,,,,, +,RW.DIAGNOSTIC.RESET_REASON.X,int32_t,(int32_t)(rw0003_driver[RW0003_IDX_ON_X]->info.diagnostic_reset_reason),PACKET,86,0,32,NONE,,,,,,,,, +,RW.DIAGNOSTIC.RESET_REASON.Y,int32_t,(int32_t)(rw0003_driver[RW0003_IDX_ON_Y]->info.diagnostic_reset_reason),PACKET,90,0,32,NONE,,,,,,,,, +,RW.DIAGNOSTIC.RESET_REASON.Z,int32_t,(int32_t)(rw0003_driver[RW0003_IDX_ON_Z]->info.diagnostic_reset_reason),PACKET,94,0,32,NONE,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,, From 266c684e2bf52fc6f3e3c947a8ae7b83347a9113 Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Wed, 10 May 2023 15:07:55 +0900 Subject: [PATCH 017/176] modify some --- .../TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv | 6 +- .../ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv | 6 +- src/src_user/TlmCmd/command_definitions.c | 8 ++ src/src_user/TlmCmd/command_definitions.h | 74 ++++++++++--------- src/src_user/TlmCmd/telemetry_definitions.c | 31 ++++++++ src/src_user/TlmCmd/telemetry_definitions.h | 1 + 6 files changed, 85 insertions(+), 41 deletions(-) diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv index c49e68d2..c073f3ef 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv @@ -29,9 +29,9 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,RW.VDD_V.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.vdd_V),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.VDD_V.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.vdd_V),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.VDD_V.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.vdd_V),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RW.SEU_COUNT.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.set_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RW.SEU_COUNT.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.set_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RW.SEU_COUNT.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.set_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SEU_COUNT.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.seu_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SEU_COUNT.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.seu_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RW.SEU_COUNT.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.seu_count),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.FAULT_STATE.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.fault_state),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.FAULT_STATE.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.fault_state),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.FAULT_STATE.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.fault_state),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv index a99d545b..7cb41666 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv @@ -29,9 +29,9 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,RW.VDD_V.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.vdd_V),PACKET,50,0,32,NONE,,,,,,,,, ,RW.VDD_V.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.vdd_V),PACKET,54,0,32,NONE,,,,,,,,, ,RW.VDD_V.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.vdd_V),PACKET,58,0,32,NONE,,,,,,,,, -,RW.SEU_COUNT.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.set_count),PACKET,62,0,32,NONE,,,,,,,,, -,RW.SEU_COUNT.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.set_count),PACKET,66,0,32,NONE,,,,,,,,, -,RW.SEU_COUNT.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.set_count),PACKET,70,0,32,NONE,,,,,,,,, +,RW.SEU_COUNT.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.seu_count),PACKET,62,0,32,NONE,,,,,,,,, +,RW.SEU_COUNT.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.seu_count),PACKET,66,0,32,NONE,,,,,,,,, +,RW.SEU_COUNT.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.seu_count),PACKET,70,0,32,NONE,,,,,,,,, ,RW.FAULT_STATE.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.fault_state),PACKET,74,0,32,NONE,,,,,,,,, ,RW.FAULT_STATE.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.fault_state),PACKET,78,0,32,NONE,,,,,,,,, ,RW.FAULT_STATE.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.fault_state),PACKET,82,0,32,NONE,,,,,,,,, diff --git a/src/src_user/TlmCmd/command_definitions.c b/src/src_user/TlmCmd/command_definitions.c index db9cf162..1e721188 100644 --- a/src/src_user/TlmCmd/command_definitions.c +++ b/src/src_user/TlmCmd/command_definitions.c @@ -143,6 +143,10 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_SET_IDLE].cmd_func = Cmd_DI_RW0003_SET_IDLE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].cmd_func = Cmd_DI_RW0003_DRIVE_TORQUE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].cmd_func = Cmd_DI_RW0003_DRIVE_SPEED; + cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].cmd_func = Cmd_DI_RW0003_READ_VDD; + cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].cmd_func = Cmd_DI_RW0003_READ_SEU_COUNT; + cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].cmd_func = Cmd_DI_RW0003_READ_FAULT_STATE; + cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].cmd_func = Cmd_DI_RW0003_DIAGNOSTIC; cmd_table[Cmd_CODE_DI_SAGITTA_BOOT].cmd_func = Cmd_DI_SAGITTA_BOOT; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].cmd_func = Cmd_DI_SAGITTA_SET_UNIX_TIME_US; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].cmd_func = Cmd_DI_SAGITTA_SET_PARAMETER; @@ -420,6 +424,10 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; + cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; diff --git a/src/src_user/TlmCmd/command_definitions.h b/src/src_user/TlmCmd/command_definitions.h index c5732cfe..e456e5b6 100644 --- a/src/src_user/TlmCmd/command_definitions.h +++ b/src/src_user/TlmCmd/command_definitions.h @@ -106,41 +106,45 @@ typedef enum Cmd_CODE_DCU_ABORT_CMD = 0x005F, Cmd_CODE_DCU_DOWN_ABORT_FLAG = 0x0060, Cmd_CODE_DCU_CLEAR_LOG = 0x0061, - Cmd_CODE_DI_FM25V10_WRITE_BYTE = 0x0064, - Cmd_CODE_DI_FM25V10_READ_BYTE = 0x0065, - Cmd_CODE_DI_FM25V10_MANAGE_STATUS = 0x0066, - Cmd_CODE_APP_NVM_MANAGER_WRITE_BYTES = 0x0067, - Cmd_CODE_APP_NVM_MANAGER_READ_BYTES = 0x0068, - Cmd_CODE_APP_NVM_PARTITION_WRITE_BYTES = 0x0069, - Cmd_CODE_APP_NVM_PARTITION_READ_BYTES = 0x006A, - Cmd_CODE_APP_AOCS_DR_SET_WRITE = 0x006B, - Cmd_CODE_APP_AOCS_DR_READ = 0x006C, - Cmd_CODE_APP_PSC_CONTROL_5V_PORT = 0x006E, - Cmd_CODE_APP_PSC_CONTROL_UNREG_PORT = 0x006F, - Cmd_CODE_DI_INA260_INIT = 0x0070, - Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION = 0x0071, - Cmd_CODE_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD = 0x0072, - Cmd_CODE_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION = 0x0073, - Cmd_CODE_DI_RM3100_INIT = 0x0076, - Cmd_CODE_DI_MPU9250_INIT = 0x0077, - Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS = 0x0078, - Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_DUTY = 0x0079, - Cmd_CODE_DI_STIM210_INIT = 0x007A, - Cmd_CODE_DI_STIM210_SET_MODE = 0x007B, - Cmd_CODE_DI_STIM210_SET_NORMAL_MODE_FORMAT = 0x007C, - Cmd_CODE_DI_STIM210_SET_GYRO_OUTPUT = 0x007D, - Cmd_CODE_DI_STIM210_SET_SAMPLE_RATE = 0x007E, - Cmd_CODE_DI_STIM210_SET_TERMINATION_MODE = 0x007F, - Cmd_CODE_DI_STIM210_SET_LOW_PASS_FILTER = 0x0080, - Cmd_CODE_DI_OEM7600_ONOFF_ANTENNA_POWER = 0x0081, - Cmd_CODE_DI_OEM7600_SOFTWARE_RESET = 0x0082, - Cmd_CODE_DI_OEM7600_SAVE_TLM_SETTING = 0x0083, - Cmd_CODE_DI_OEM7600_SET_TLM_CONTENTS = 0x0084, - Cmd_CODE_DI_OEM7600_SET_RESET_GPIO_HIGHLOW = 0x0085, - Cmd_CODE_DI_RW0003_INIT = 0x0086, - Cmd_CODE_DI_RW0003_SET_IDLE = 0x0087, - Cmd_CODE_DI_RW0003_DRIVE_TORQUE = 0x0088, - Cmd_CODE_DI_RW0003_DRIVE_SPEED = 0x0089, + Cmd_CODE_DI_FM25V10_WRITE_BYTE = 0x0063, + Cmd_CODE_DI_FM25V10_READ_BYTE = 0x0064, + Cmd_CODE_DI_FM25V10_MANAGE_STATUS = 0x0065, + Cmd_CODE_APP_NVM_MANAGER_WRITE_BYTES = 0x0066, + Cmd_CODE_APP_NVM_MANAGER_READ_BYTES = 0x0067, + Cmd_CODE_APP_NVM_PARTITION_WRITE_BYTES = 0x0068, + Cmd_CODE_APP_NVM_PARTITION_READ_BYTES = 0x0069, + Cmd_CODE_APP_AOCS_DR_SET_WRITE = 0x006A, + Cmd_CODE_APP_AOCS_DR_READ = 0x006B, + Cmd_CODE_APP_PSC_CONTROL_5V_PORT = 0x006C, + Cmd_CODE_APP_PSC_CONTROL_UNREG_PORT = 0x006D, + Cmd_CODE_DI_INA260_INIT = 0x006E, + Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION = 0x006F, + Cmd_CODE_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD = 0x0070, + Cmd_CODE_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION = 0x0071, + Cmd_CODE_DI_RM3100_INIT = 0x0072, + Cmd_CODE_DI_MPU9250_INIT = 0x0073, + Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS = 0x0074, + Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_DUTY = 0x0075, + Cmd_CODE_DI_STIM210_INIT = 0x0076, + Cmd_CODE_DI_STIM210_SET_MODE = 0x0077, + Cmd_CODE_DI_STIM210_SET_NORMAL_MODE_FORMAT = 0x0078, + Cmd_CODE_DI_STIM210_SET_GYRO_OUTPUT = 0x0079, + Cmd_CODE_DI_STIM210_SET_SAMPLE_RATE = 0x007A, + Cmd_CODE_DI_STIM210_SET_TERMINATION_MODE = 0x007B, + Cmd_CODE_DI_STIM210_SET_LOW_PASS_FILTER = 0x007C, + Cmd_CODE_DI_OEM7600_ONOFF_ANTENNA_POWER = 0x007D, + Cmd_CODE_DI_OEM7600_SOFTWARE_RESET = 0x007E, + Cmd_CODE_DI_OEM7600_SAVE_TLM_SETTING = 0x007F, + Cmd_CODE_DI_OEM7600_SET_TLM_CONTENTS = 0x0080, + Cmd_CODE_DI_OEM7600_SET_RESET_GPIO_HIGHLOW = 0x0081, + Cmd_CODE_DI_RW0003_INIT = 0x0082, + Cmd_CODE_DI_RW0003_SET_IDLE = 0x0083, + Cmd_CODE_DI_RW0003_DRIVE_TORQUE = 0x0084, + Cmd_CODE_DI_RW0003_DRIVE_SPEED = 0x0085, + Cmd_CODE_DI_RW0003_READ_VDD = 0x0086, + Cmd_CODE_DI_RW0003_READ_SEU_COUNT = 0x0087, + Cmd_CODE_DI_RW0003_READ_FAULT_STATE = 0x0088, + Cmd_CODE_DI_RW0003_DIAGNOSTIC = 0x0089, Cmd_CODE_DI_SAGITTA_BOOT = 0x008A, Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US = 0x008B, Cmd_CODE_DI_SAGITTA_SET_PARAMETER = 0x008C, diff --git a/src/src_user/TlmCmd/telemetry_definitions.c b/src/src_user/TlmCmd/telemetry_definitions.c index 2836a906..ac7548a1 100644 --- a/src/src_user/TlmCmd/telemetry_definitions.c +++ b/src/src_user/TlmCmd/telemetry_definitions.c @@ -56,6 +56,7 @@ static TF_TLM_FUNC_ACK Tlm_AOBC_GPSR_RANGE_P2_(uint8_t* packet, uint16_t* len, u static TF_TLM_FUNC_ACK Tlm_AOBC_ORBIT2_(uint8_t* packet, uint16_t* len, uint16_t max_len); static TF_TLM_FUNC_ACK Tlm_AOBC_FILTERS_2_(uint8_t* packet, uint16_t* len, uint16_t max_len); static TF_TLM_FUNC_ACK Tlm_AOBC_DR_ALGORITHM_(uint8_t* packet, uint16_t* len, uint16_t max_len); +static TF_TLM_FUNC_ACK Tlm_AOBC_DEBUG_(uint8_t* packet, uint16_t* len, uint16_t max_len); void TF_load_tlm_table(TF_TlmInfo tlm_table[TF_MAX_TLMS]) { @@ -107,6 +108,7 @@ void TF_load_tlm_table(TF_TlmInfo tlm_table[TF_MAX_TLMS]) tlm_table[Tlm_CODE_AOBC_ORBIT2].tlm_func = Tlm_AOBC_ORBIT2_; tlm_table[Tlm_CODE_AOBC_FILTERS_2].tlm_func = Tlm_AOBC_FILTERS_2_; tlm_table[Tlm_CODE_AOBC_DR_ALGORITHM].tlm_func = Tlm_AOBC_DR_ALGORITHM_; + tlm_table[Tlm_CODE_AOBC_DEBUG].tlm_func = Tlm_AOBC_DEBUG_; } static TF_TLM_FUNC_ACK Tlm_AOBC_OBC_(uint8_t* packet, uint16_t* len, uint16_t max_len) @@ -3634,4 +3636,33 @@ static TF_TLM_FUNC_ACK Tlm_AOBC_DR_ALGORITHM_(uint8_t* packet, uint16_t* len, ui return TF_TLM_FUNC_ACK_SUCCESS; } +static TF_TLM_FUNC_ACK Tlm_AOBC_DEBUG_(uint8_t* packet, uint16_t* len, uint16_t max_len) +{ + if (98 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; + +#ifndef BUILD_SETTINGS_FAST_BUILD + TF_copy_float(&packet[26], (float)(rw0003_driver[RW0003_IDX_ON_X]->info.speed_rad_s)); + TF_copy_float(&packet[30], (float)(rw0003_driver[RW0003_IDX_ON_Y]->info.speed_rad_s)); + TF_copy_float(&packet[34], (float)(rw0003_driver[RW0003_IDX_ON_Z]->info.speed_rad_s)); + TF_copy_float(&packet[38], (float)(rw0003_driver[RW0003_IDX_ON_X]->info.temperature_degC)); + TF_copy_float(&packet[42], (float)(rw0003_driver[RW0003_IDX_ON_Y]->info.temperature_degC)); + TF_copy_float(&packet[46], (float)(rw0003_driver[RW0003_IDX_ON_Z]->info.temperature_degC)); + TF_copy_float(&packet[50], (float)(rw0003_driver[RW0003_IDX_ON_X]->info.vdd_V)); + TF_copy_float(&packet[54], (float)(rw0003_driver[RW0003_IDX_ON_Y]->info.vdd_V)); + TF_copy_float(&packet[58], (float)(rw0003_driver[RW0003_IDX_ON_Z]->info.vdd_V)); + TF_copy_float(&packet[62], (float)(rw0003_driver[RW0003_IDX_ON_X]->info.seu_count)); + TF_copy_float(&packet[66], (float)(rw0003_driver[RW0003_IDX_ON_Y]->info.seu_count)); + TF_copy_float(&packet[70], (float)(rw0003_driver[RW0003_IDX_ON_Z]->info.seu_count)); + TF_copy_float(&packet[74], (float)(rw0003_driver[RW0003_IDX_ON_X]->info.fault_state)); + TF_copy_float(&packet[78], (float)(rw0003_driver[RW0003_IDX_ON_Y]->info.fault_state)); + TF_copy_float(&packet[82], (float)(rw0003_driver[RW0003_IDX_ON_Z]->info.fault_state)); + TF_copy_i32(&packet[86], (int32_t)(rw0003_driver[RW0003_IDX_ON_X]->info.diagnostic_reset_reason)); + TF_copy_i32(&packet[90], (int32_t)(rw0003_driver[RW0003_IDX_ON_Y]->info.diagnostic_reset_reason)); + TF_copy_i32(&packet[94], (int32_t)(rw0003_driver[RW0003_IDX_ON_Z]->info.diagnostic_reset_reason)); +#endif + + *len = 98; + return TF_TLM_FUNC_ACK_SUCCESS; +} + #pragma section diff --git a/src/src_user/TlmCmd/telemetry_definitions.h b/src/src_user/TlmCmd/telemetry_definitions.h index 35264c3c..00527437 100644 --- a/src/src_user/TlmCmd/telemetry_definitions.h +++ b/src/src_user/TlmCmd/telemetry_definitions.h @@ -56,6 +56,7 @@ typedef enum Tlm_CODE_AOBC_ORBIT2 = 0xcc, Tlm_CODE_AOBC_FILTERS_2 = 0xcd, Tlm_CODE_AOBC_DR_ALGORITHM = 0xce, + Tlm_CODE_AOBC_DEBUG = 0xcf, TLM_CODE_MAX } TLM_CODE; From fafbc7721eed6a23224d09fcec6bdd715b41055b Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Wed, 10 May 2023 15:37:50 +0900 Subject: [PATCH 018/176] Add mcf calculation --- src/src_user/Drivers/Aocs/rw0003.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index e3bde1de..05f0c95f 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -66,7 +66,7 @@ static const uint8_t RW0003_kReadAddressLimitSpeed1_ = 0x33; static const uint8_t RW0003_kReadAddressLimitSpeed2_ = 0x34; static const uint8_t RW0003_kMcfReadEdac_ = 0xa7; //!< EDAC memory読み出し返答テレメのMessage Control Field -static const uint8_t RW0003_kMcfDiagnostics_ = 0x00;//!< Diagnostics返答テレメのMessage Control Field TODO: 更新する +static const uint8_t RW0003_kMcfDiagnostics_ = 0xa4;//!< Diagnostics返答テレメのMessage Control Field static const int RW0003_kCrcRevFlag_ = 0; //!< CRC関数の反転フラグ static const uint16_t RW0003_kCrcInitial_ = 0xffff; //!< CRC計算初期値 From b8749ee7f2944e14eca1e0fe9063dc40000357ce Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Wed, 10 May 2023 19:39:16 +0900 Subject: [PATCH 019/176] =?UTF-8?q?core=20update=20=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E5=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_user/Drivers/Aocs/rw0003.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index 05f0c95f..1c62790b 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -9,6 +9,7 @@ #endif #include "./rw0003.h" +#include #include #include @@ -424,12 +425,12 @@ static DS_CMD_ERR_CODE RW0003_send_read_(RW0003_Driver* rw0003_driver, } #ifdef DRIVER_RW0003_DEBUG_SHOW_REC_DATA - if (rw0003_driver->driver.super.config.rec_status_.ret_from_if_rx > 0) + if (rw0003_driver->driver.super.config.info.rec_status_.ret_from_if_rx > 0) { - Printf("rw rx_frame_: %d Bytes \n", rw0003_driver->driver.super.config.rec_status_.ret_from_if_rx); - for (int i = 0; i < rw0003_driver->driver.super.config.rec_status_.ret_from_if_rx; i++) + Printf("rw rx_frame_: %d Bytes \n", rw0003_driver->driver.super.config.info.rec_status_.ret_from_if_rx); + for (int i = 0; i < rw0003_driver->driver.super.config.info.rec_status_.ret_from_if_rx; i++) { - Printf("%02x ", rw0003_driver->driver.super.stream_config[0].rx_frame_[i]); + Printf("%02x ", rw0003_driver->driver.super.stream_config[0].settings.rx_buffer_[i]); if (i % 4 == 3) Printf(" "); } Printf("\n"); From 605a206ecc7812218410cde7078247e2ad66b8e1 Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Wed, 10 May 2023 20:03:52 +0900 Subject: [PATCH 020/176] =?UTF-8?q?=E5=AE=9F=E6=A9=9F=E6=A4=9C=E8=A8=BC?= =?UTF-8?q?=E7=B5=90=E6=9E=9C=E3=82=92=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_user/Drivers/Aocs/rw0003.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index 1c62790b..991d2c6f 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -430,7 +430,7 @@ static DS_CMD_ERR_CODE RW0003_send_read_(RW0003_Driver* rw0003_driver, Printf("rw rx_frame_: %d Bytes \n", rw0003_driver->driver.super.config.info.rec_status_.ret_from_if_rx); for (int i = 0; i < rw0003_driver->driver.super.config.info.rec_status_.ret_from_if_rx; i++) { - Printf("%02x ", rw0003_driver->driver.super.stream_config[0].settings.rx_buffer_[i]); + Printf("%02x ", rw0003_driver->driver.super.stream_config[0].settings.rx_buffer_->buffer[i]); if (i % 4 == 3) Printf(" "); } Printf("\n"); From a50e8ad1d7b385c78531a51783c2aa6682e0d4ae Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Fri, 12 May 2023 15:14:55 +0900 Subject: [PATCH 021/176] =?UTF-8?q?=E3=83=AA=E3=83=9D=E3=82=B8=E3=83=88?= =?UTF-8?q?=E3=83=AA=E5=88=86=E5=89=B2=E5=BE=8C=E3=81=AEsample=20aobc=20us?= =?UTF-8?q?er=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++ Examples/src/CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++ RUN_AFTER_CLONE.bat | 13 ++++++ RUN_AFTER_CLONE.command | 12 ++++++ 4 files changed, 110 insertions(+) create mode 100644 Examples/src/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 3861aa8e..cc959e28 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,6 @@ src/src_user/IfWrapper/SILS/FLASH_DB/*.dat # Visual Micro for PIC32 Debug/ Release/ + +# for c2a user sample +Examples/src/src_common \ No newline at end of file diff --git a/Examples/src/CMakeLists.txt b/Examples/src/CMakeLists.txt new file mode 100644 index 00000000..b6a58a8d --- /dev/null +++ b/Examples/src/CMakeLists.txt @@ -0,0 +1,82 @@ +## CMake file for S2E integration + +cmake_minimum_required(VERSION 3.13) +project(C2A) + +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) + +set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_common/src/src_core) +set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_common/src/src_user) + +set(USE_ALL_C2A_CORE_APPS OFF) +set(USE_ALL_C2A_CORE_TEST_APPS OFF) +set(USE_ALL_C2A_CORE_LIB ON) + +set(C2A_SRCS + # ${C2A_CORE_DIR}/Applications/anomaly_handler.c + ${C2A_CORE_DIR}/Applications/divided_cmd_utility.c + ${C2A_CORE_DIR}/Applications/event_utility.c + ${C2A_CORE_DIR}/Applications/gs_command_dispatcher.c + ${C2A_CORE_DIR}/Applications/memory_dump.c + ${C2A_CORE_DIR}/Applications/nop.c + ${C2A_CORE_DIR}/Applications/realtime_command_dispatcher.c + ${C2A_CORE_DIR}/Applications/timeline_command_dispatcher.c + # ${C2A_CORE_DIR}/Applications/utility_command.c + # ${C2A_CORE_DIR}/Applications/utility_counter.c + ${C2A_CORE_DIR}/System/AnomalyLogger/anomaly_logger.c + + # SRC_USER codes + # ${C2A_USER_DIR}/C2A_main.c +) + +include_directories(src) + +add_subdirectory(${C2A_CORE_DIR}) + +add_subdirectory(${C2A_USER_DIR}/Applications) +add_subdirectory(${C2A_USER_DIR}/Drivers) +add_subdirectory(${C2A_USER_DIR}/IfWrapper) +add_subdirectory(${C2A_USER_DIR}/Library) +add_subdirectory(${C2A_USER_DIR}/Settings) +add_subdirectory(${C2A_USER_DIR}/TlmCmd) + +add_library(${PROJECT_NAME} STATIC ${C2A_SRCS}) + +set(C2A_USER_MODULES + C2A_USER_APPS + C2A_USER_DRIVERS + C2A_USER_CMD_TLM + C2A_USER_IF_WRAPPER + C2A_USER_LIB + C2A_USER_SETTINGS +) + +if(MSVC) + target_link_options(${PROJECT_NAME} PRIVATE "/WHOLEARCHIVE") + target_link_libraries(${PROJECT_NAME} PRIVATE + C2A_CORE + ${C2A_USER_MODULES} + ) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE + -Wl,--whole-archive + C2A_CORE + -Wl,--no-whole-archive + ${C2A_USER_MODULES} + -lm + ) +endif() + +include(${C2A_USER_DIR}/common.cmake) diff --git a/RUN_AFTER_CLONE.bat b/RUN_AFTER_CLONE.bat index a28d4330..4a615246 100644 --- a/RUN_AFTER_CLONE.bat +++ b/RUN_AFTER_CLONE.bat @@ -11,7 +11,20 @@ echo [SET UPDATE-INDEX] rem Do nothing for now. echo done. echo. +echo [SET UP DEVELOP ENVIRONMENT FOR SAMPLE AOBC USER] +call :make_link ".\Examples\src\src_common" ".\" +echo done. +echo. echo The process has been completed. echo Press any key to exit... pause >nul +exit + + +:make_link +if exist %1 ( + rmdir /s /q %1 +) +mklink /j /d %1 %2 +exit /b diff --git a/RUN_AFTER_CLONE.command b/RUN_AFTER_CLONE.command index 66549e36..f64f79d9 100644 --- a/RUN_AFTER_CLONE.command +++ b/RUN_AFTER_CLONE.command @@ -1,8 +1,20 @@ #!/bin/sh +function make_link () { + if [ -e $1 ]; then + rm -rf $1 + fi + ln -s $2 $1 +} + echo "RUN_AFTER_CLONE.command" echo "setting for local repository." +echo "[SET UP DEVELOP ENVIRONMENT FOR SAMPLE AOBC USER]" +make_link "./Examples/src/src_common" "./" +echo done. +echo. + cd `dirname $0` # move to current directly touch ./.git/hooks/pre-commit cp -f ./.gitlab/my_hooks/pre-commit.pl ./.git/hooks/pre-commit From 3acc076e69e2c4697d78fa2006ac8ce85210a6f2 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Fri, 12 May 2023 17:00:50 +0900 Subject: [PATCH 022/176] =?UTF-8?q?VMicro=E3=81=A7=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81=E3=81=AE=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E7=BE=A4=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Examples/C2A_ISSL6U_AOBC.sln | 25 ++ Examples/C2A_ISSL6U_AOBC.vcxproj | 331 ++++++++++++++++++ Examples/C2A_ISSL6U_AOBC.vcxproj.user | 6 + Examples/{src => }/CMakeLists.txt | 0 Examples/c2a_issl6u_aobc.filters | 462 ++++++++++++++++++++++++++ Examples/c2a_issl6u_aobc.ino | 101 ++++++ Examples/c2a_issl6u_aobc.user | 6 + 7 files changed, 931 insertions(+) create mode 100644 Examples/C2A_ISSL6U_AOBC.sln create mode 100644 Examples/C2A_ISSL6U_AOBC.vcxproj create mode 100644 Examples/C2A_ISSL6U_AOBC.vcxproj.user rename Examples/{src => }/CMakeLists.txt (100%) create mode 100644 Examples/c2a_issl6u_aobc.filters create mode 100644 Examples/c2a_issl6u_aobc.ino create mode 100644 Examples/c2a_issl6u_aobc.user diff --git a/Examples/C2A_ISSL6U_AOBC.sln b/Examples/C2A_ISSL6U_AOBC.sln new file mode 100644 index 00000000..63797106 --- /dev/null +++ b/Examples/C2A_ISSL6U_AOBC.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c2a_issl6u_aobc", "c2a_issl6u_aobc.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32 + {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32 + {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32 + {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {51C424BA-5F46-4D27-998C-43D4D4A0A179} + EndGlobalSection +EndGlobal diff --git a/Examples/C2A_ISSL6U_AOBC.vcxproj b/Examples/C2A_ISSL6U_AOBC.vcxproj new file mode 100644 index 00000000..55c85ca2 --- /dev/null +++ b/Examples/C2A_ISSL6U_AOBC.vcxproj @@ -0,0 +1,331 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {C5F80730-F44F-4478-BDAE-6634EFC2CA88} + c2a_issl6u_aobc + c2a_issl6u_aobc + + + + Application + true + MultiByte + + + + + Application + false + true + MultiByte + + + + + Application + true + MultiByte + + + + + Application + false + true + MultiByte + + + + + Application + false + true + MultiByte + v141 + + + + + + + + + + + + + + + + + + + + + + + Level3 + MinSpace + true + $(ProjectDir)..\c2a_issl6u_aobc;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DTWI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DSPI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\avr;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\pps;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\util;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\variants\MXL795;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\tools\pic32-tools\1.43-pic32gcc\pic32mx\include;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32;%(AdditionalIncludeDirectories) + $(ProjectDir)__vm\.c2a_issl6u_aobc.vsarduino.h;%(ForcedIncludeFiles) + true + __PIC32_32MX795F512L__;_VMDEBUG=1;ARDUINO_ARCH_PIC32;F_CPU=80000000L;ARDUINO=108013;PIC32_CHIPKIT_MXL795B;MPIDEVER=16777998;MPIDE=150;IDE=Arduino;__cplusplus=201103L;_VMICRO_INTELLISENSE;%(PreprocessorDefinitions) + CompileAsCpp + Size + + + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + true + + + + + + + VisualMicroDebugger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Examples/C2A_ISSL6U_AOBC.vcxproj.user b/Examples/C2A_ISSL6U_AOBC.vcxproj.user new file mode 100644 index 00000000..966b4ffb --- /dev/null +++ b/Examples/C2A_ISSL6U_AOBC.vcxproj.user @@ -0,0 +1,6 @@ + + + + true + + \ No newline at end of file diff --git a/Examples/src/CMakeLists.txt b/Examples/CMakeLists.txt similarity index 100% rename from Examples/src/CMakeLists.txt rename to Examples/CMakeLists.txt diff --git a/Examples/c2a_issl6u_aobc.filters b/Examples/c2a_issl6u_aobc.filters new file mode 100644 index 00000000..9a428b97 --- /dev/null +++ b/Examples/c2a_issl6u_aobc.filters @@ -0,0 +1,462 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + + \ No newline at end of file diff --git a/Examples/c2a_issl6u_aobc.ino b/Examples/c2a_issl6u_aobc.ino new file mode 100644 index 00000000..bc8b21d8 --- /dev/null +++ b/Examples/c2a_issl6u_aobc.ino @@ -0,0 +1,101 @@ +/* + Name: C2A_ISSL6U_AOBC.ino +*/ + +extern "C" +{ +#include +#include +#include +} + +// C2A Private global variables and functions +static void C2A_init_(void); +static void C2A_main_(void); + +// Timer interrupt functions +static void C2A_timer_setting_(void); +static void __USER_ISR C2A_timer1_handler_(void); + +// Arduino functions +void setup() +{ + // TODO: ł̂ꏊ͗v + Serial.begin(115200); // Debug|[g + + C2A_init_(); + + return; +} + +void loop() +{ + // Printf("AOBC Main loop Started.\n"); + C2A_main_(); + + return; +} + +// C2A Main functions +static void C2A_main_(void) +{ + while (1) + { + C2A_core_main(); + // [U[`loop͂ɓ + } + + return; +} + +// C2A֘Ȁ +// HW֘Ai^C}[C荞ݐݒȂǁĵݓƎɏ +// Printf WDT_clear_wdt(); Ă΂Ă邱ƂɒӁI +static void C2A_init_(void) +{ + TMGR_init(); // Time Manager + // AM_initialize_all_apps ł̎Ԍv̂߂ɂŏ + Printf("C2A_init: TMGR_init done.\n"); + + // ^C}݊֘A + C2A_timer_setting_(); + Printf("C2A_init: timer_setting_ done.\n"); + + C2A_core_init(); + + TMGR_clear(); // TODO: user_ossƑčēxĂ邪C̎荞݂~߂ׂȂǗv + + return; +} + +static void C2A_timer_setting_(void) +{ + setIntVector(_TIMER_1_VECTOR, C2A_timer1_handler_); + clearIntFlag(_TIMER_1_IRQ); + setIntPriority(_TIMER_1_VECTOR, _T1_IPL_IPC, _T1_SPL_IPC); + setIntEnable(_TIMER_1_IRQ); + TMR1 = 0; // clear timer + // ̒l1ms̃NbNAbvɂȂ肩A덷~ςŏɂȂ悤Ɏs蓮l + T1CON = TACON_PS_8; // set prescaler + PR1 = (unsigned int)(10001); + + T1CONSET = TACON_ON; + + return; +} + +//static unsigned int counter_ = 0; +//static unsigned int prev_counter_ = 0; + +static void __USER_ISR C2A_timer1_handler_(void) +{ + // Debug out to check interrupt frequency + //counter_ = micros(); + //Printf("TI=%d [us]\n", counter_ - prev_counter_); + //prev_counter_ = counter_; + + TMGR_count_up_master_clock(); + clearIntFlag(_TIMER_1_IRQ); + + return; +} diff --git a/Examples/c2a_issl6u_aobc.user b/Examples/c2a_issl6u_aobc.user new file mode 100644 index 00000000..966b4ffb --- /dev/null +++ b/Examples/c2a_issl6u_aobc.user @@ -0,0 +1,6 @@ + + + + true + + \ No newline at end of file From 7bb4b9c13b55e3fa16afa9f3ef8b6e0e015d1971 Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Fri, 12 May 2023 18:08:11 +0900 Subject: [PATCH 023/176] comment out commands for ground test --- .../TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv | 8 ++++---- src/src_user/TlmCmd/command_definitions.c | 8 -------- src/src_user/TlmCmd/command_definitions.h | 4 ---- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv index aa949a0c..14a9d476 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv @@ -201,10 +201,10 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,Cmd_DI_RW0003_SET_IDLE,AOBC,0x0083,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003をIdleモードに入れる, ,Cmd_DI_RW0003_DRIVE_TORQUE,AOBC,0x0084,2,uint8_t,RWX=0; RWY; RWZ,float,torque [Nm],,,,,,,,,,,RW0003にトルク指令を与える, ,Cmd_DI_RW0003_DRIVE_SPEED,AOBC,0x0085,2,uint8_t,RWX=0; RWY; RWZ,float,speed [rad/s],,,,,,,,,,,RW0003に回転数指令を与える, -,Cmd_DI_RW0003_READ_VDD,AOBC,0x0086,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のVDDを読み取る, -,Cmd_DI_RW0003_READ_SEU_COUNT,AOBC,0x0087,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のSEU COUNTを読み取る, -,Cmd_DI_RW0003_READ_FAULT_STATE,AOBC,0x0088,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のFault Stateを読み取る, -,Cmd_DI_RW0003_DIAGNOSTIC,AOBC,0x0089,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003にDiagnosticコマンドを送る, +*,Cmd_DI_RW0003_READ_VDD,AOBC,0x0086,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のVDDを読み取る, +*,Cmd_DI_RW0003_READ_SEU_COUNT,AOBC,0x0087,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のSEU COUNTを読み取る, +*,Cmd_DI_RW0003_READ_FAULT_STATE,AOBC,0x0088,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のFault Stateを読み取る, +*,Cmd_DI_RW0003_DIAGNOSTIC,AOBC,0x0089,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003にDiagnosticコマンドを送る, ,Cmd_DI_SAGITTA_BOOT,AOBC,0x008A,0,,,,,,,,,,,,,,,SAGITTAをブートしてノミナルモードに移行する, ,Cmd_DI_SAGITTA_SET_UNIX_TIME_US,AOBC,0x008B,2,uint32_t,upper 32bit,uint32_t,lower 32bit,,,,,,,,,,,SAGITTAのUnixTime[us]の設定, ,Cmd_DI_SAGITTA_SET_PARAMETER,AOBC,0x008C,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAにパラメータ設定コマンドを送る, diff --git a/src/src_user/TlmCmd/command_definitions.c b/src/src_user/TlmCmd/command_definitions.c index 1e721188..db9cf162 100644 --- a/src/src_user/TlmCmd/command_definitions.c +++ b/src/src_user/TlmCmd/command_definitions.c @@ -143,10 +143,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_SET_IDLE].cmd_func = Cmd_DI_RW0003_SET_IDLE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].cmd_func = Cmd_DI_RW0003_DRIVE_TORQUE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].cmd_func = Cmd_DI_RW0003_DRIVE_SPEED; - cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].cmd_func = Cmd_DI_RW0003_READ_VDD; - cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].cmd_func = Cmd_DI_RW0003_READ_SEU_COUNT; - cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].cmd_func = Cmd_DI_RW0003_READ_FAULT_STATE; - cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].cmd_func = Cmd_DI_RW0003_DIAGNOSTIC; cmd_table[Cmd_CODE_DI_SAGITTA_BOOT].cmd_func = Cmd_DI_SAGITTA_BOOT; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].cmd_func = Cmd_DI_SAGITTA_SET_UNIX_TIME_US; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].cmd_func = Cmd_DI_SAGITTA_SET_PARAMETER; @@ -424,10 +420,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; diff --git a/src/src_user/TlmCmd/command_definitions.h b/src/src_user/TlmCmd/command_definitions.h index e456e5b6..f19ce834 100644 --- a/src/src_user/TlmCmd/command_definitions.h +++ b/src/src_user/TlmCmd/command_definitions.h @@ -141,10 +141,6 @@ typedef enum Cmd_CODE_DI_RW0003_SET_IDLE = 0x0083, Cmd_CODE_DI_RW0003_DRIVE_TORQUE = 0x0084, Cmd_CODE_DI_RW0003_DRIVE_SPEED = 0x0085, - Cmd_CODE_DI_RW0003_READ_VDD = 0x0086, - Cmd_CODE_DI_RW0003_READ_SEU_COUNT = 0x0087, - Cmd_CODE_DI_RW0003_READ_FAULT_STATE = 0x0088, - Cmd_CODE_DI_RW0003_DIAGNOSTIC = 0x0089, Cmd_CODE_DI_SAGITTA_BOOT = 0x008A, Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US = 0x008B, Cmd_CODE_DI_SAGITTA_SET_PARAMETER = 0x008C, From 57ac1f1291b2bcf4fb7399ec509c1b241d1eea93 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Mon, 15 May 2023 10:55:03 +0900 Subject: [PATCH 024/176] =?UTF-8?q?Example=E5=86=85=E3=81=AEc2a-aobc?= =?UTF-8?q?=E3=82=92src-aobc=E3=81=A8=E3=81=84=E3=81=86=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E3=81=A7=E6=A0=BC=E7=B4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- Examples/C2A_ISSL6U_AOBC.vcxproj | 406 +++++++++++++++---------------- Examples/CMakeLists.txt | 4 +- RUN_AFTER_CLONE.bat | 2 +- RUN_AFTER_CLONE.command | 2 +- 5 files changed, 208 insertions(+), 208 deletions(-) diff --git a/.gitignore b/.gitignore index cc959e28..f45c3c51 100644 --- a/.gitignore +++ b/.gitignore @@ -60,4 +60,4 @@ Debug/ Release/ # for c2a user sample -Examples/src/src_common \ No newline at end of file +Examples/src/src_aobc \ No newline at end of file diff --git a/Examples/C2A_ISSL6U_AOBC.vcxproj b/Examples/C2A_ISSL6U_AOBC.vcxproj index 55c85ca2..4e6f1b1c 100644 --- a/Examples/C2A_ISSL6U_AOBC.vcxproj +++ b/Examples/C2A_ISSL6U_AOBC.vcxproj @@ -109,213 +109,213 @@ VisualMicroDebugger - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index b6a58a8d..713fe0c8 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -17,8 +17,8 @@ option(USE_SCI_COM "Use SCI_COM" OFF) option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) -set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_common/src/src_core) -set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_common/src/src_user) +set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_core) +set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_user) set(USE_ALL_C2A_CORE_APPS OFF) set(USE_ALL_C2A_CORE_TEST_APPS OFF) diff --git a/RUN_AFTER_CLONE.bat b/RUN_AFTER_CLONE.bat index 4a615246..367b192e 100644 --- a/RUN_AFTER_CLONE.bat +++ b/RUN_AFTER_CLONE.bat @@ -12,7 +12,7 @@ rem Do nothing for now. echo done. echo. echo [SET UP DEVELOP ENVIRONMENT FOR SAMPLE AOBC USER] -call :make_link ".\Examples\src\src_common" ".\" +call :make_link ".\Examples\src\src_aobc" ".\" echo done. echo. echo The process has been completed. diff --git a/RUN_AFTER_CLONE.command b/RUN_AFTER_CLONE.command index f64f79d9..2952ed44 100644 --- a/RUN_AFTER_CLONE.command +++ b/RUN_AFTER_CLONE.command @@ -11,7 +11,7 @@ echo "RUN_AFTER_CLONE.command" echo "setting for local repository." echo "[SET UP DEVELOP ENVIRONMENT FOR SAMPLE AOBC USER]" -make_link "./Examples/src/src_common" "./" +make_link "./Examples/src/src_aobc" "./" echo done. echo. From 49f3967961c3264150cac61624c88c67be570400 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Tue, 16 May 2023 10:46:21 +0900 Subject: [PATCH 025/176] =?UTF-8?q?=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Examples/C2A_ISSL6U_AOBC.vcxproj | 406 +++++++++++++++---------------- Examples/CMakeLists.txt | 4 +- Examples/c2a_issl6u_aobc.filters | 288 +++++++++++----------- 3 files changed, 349 insertions(+), 349 deletions(-) diff --git a/Examples/C2A_ISSL6U_AOBC.vcxproj b/Examples/C2A_ISSL6U_AOBC.vcxproj index 4e6f1b1c..4080a127 100644 --- a/Examples/C2A_ISSL6U_AOBC.vcxproj +++ b/Examples/C2A_ISSL6U_AOBC.vcxproj @@ -109,213 +109,213 @@ VisualMicroDebugger - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 713fe0c8..619d5758 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -17,8 +17,8 @@ option(USE_SCI_COM "Use SCI_COM" OFF) option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) -set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_core) -set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_user) +set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_aobc/src/src_core) +set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_aobc/src/src_user) set(USE_ALL_C2A_CORE_APPS OFF) set(USE_ALL_C2A_CORE_TEST_APPS OFF) diff --git a/Examples/c2a_issl6u_aobc.filters b/Examples/c2a_issl6u_aobc.filters index 9a428b97..e0e4667d 100644 --- a/Examples/c2a_issl6u_aobc.filters +++ b/Examples/c2a_issl6u_aobc.filters @@ -21,438 +21,438 @@ Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files From 7ea447879b47628784dab8cfc828aef8e691d36b Mon Sep 17 00:00:00 2001 From: takayuki_hosonuma Date: Sat, 20 May 2023 18:53:09 +0900 Subject: [PATCH 026/176] fix typo in readme/history --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ce54e55..68ecf98e 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ $ git submodule update ## Brief history of development - 21st Jan. 2021: Development start in a private repository at GitLab. -- 03rd Mar. 2023: Move to a private repository at GotHub to prepare publish as OSS +- 03rd Mar. 2023: Move to a private repository at GitHub to prepare publish as OSS ## Contributors in the GitLab repository - ISSL, UT From 5c1275c449d53178172038d5e9dec6d0673d79d1 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Mon, 22 May 2023 10:36:38 +0900 Subject: [PATCH 027/176] =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=AB=E3=83=80?= =?UTF-8?q?=E6=A7=8B=E6=88=90=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Examples/C2A_ISSL6U_AOBC.vcxproj | 406 +++++++++++++++---------------- Examples/CMakeLists.txt | 4 +- Examples/c2a_issl6u_aobc.filters | 288 +++++++++++----------- 3 files changed, 349 insertions(+), 349 deletions(-) diff --git a/Examples/C2A_ISSL6U_AOBC.vcxproj b/Examples/C2A_ISSL6U_AOBC.vcxproj index 4080a127..4e6f1b1c 100644 --- a/Examples/C2A_ISSL6U_AOBC.vcxproj +++ b/Examples/C2A_ISSL6U_AOBC.vcxproj @@ -109,213 +109,213 @@ VisualMicroDebugger - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 619d5758..713fe0c8 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -17,8 +17,8 @@ option(USE_SCI_COM "Use SCI_COM" OFF) option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) -set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_aobc/src/src_core) -set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_aobc/src/src_user) +set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_core) +set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_user) set(USE_ALL_C2A_CORE_APPS OFF) set(USE_ALL_C2A_CORE_TEST_APPS OFF) diff --git a/Examples/c2a_issl6u_aobc.filters b/Examples/c2a_issl6u_aobc.filters index e0e4667d..51d3b19c 100644 --- a/Examples/c2a_issl6u_aobc.filters +++ b/Examples/c2a_issl6u_aobc.filters @@ -21,438 +21,438 @@ Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files From e0a98c7dd22b0f95407e28fc8fdf3af5e9acf02d Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Mon, 22 May 2023 11:12:23 +0900 Subject: [PATCH 028/176] =?UTF-8?q?Windows=E3=81=AE=E3=82=B3=E3=83=94?= =?UTF-8?q?=E3=83=BC=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- RUN_AFTER_CLONE.bat | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f45c3c51..e13dbfc2 100644 --- a/.gitignore +++ b/.gitignore @@ -60,4 +60,4 @@ Debug/ Release/ # for c2a user sample -Examples/src/src_aobc \ No newline at end of file +Examples/src_aobc \ No newline at end of file diff --git a/RUN_AFTER_CLONE.bat b/RUN_AFTER_CLONE.bat index 367b192e..e6f5a950 100644 --- a/RUN_AFTER_CLONE.bat +++ b/RUN_AFTER_CLONE.bat @@ -12,7 +12,7 @@ rem Do nothing for now. echo done. echo. echo [SET UP DEVELOP ENVIRONMENT FOR SAMPLE AOBC USER] -call :make_link ".\Examples\src\src_aobc" ".\" +call :make_link ".\Examples\src_aobc " ".\ " echo done. echo. echo The process has been completed. @@ -24,7 +24,9 @@ exit :make_link if exist %1 ( rmdir /s /q %1 +) else ( + mkdir %1 ) -mklink /j /d %1 %2 +robocopy %2 %1 /S /E /NFL /NDL /XD Examples exit /b From fa71735499c979334556e05bb10e0d30c6db1d68 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Mon, 22 May 2023 11:33:01 +0900 Subject: [PATCH 029/176] =?UTF-8?q?[FIX]=20=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=82=B3=E3=83=94=E3=83=BC=E6=99=82=E3=81=AENDL?= =?UTF-8?q?=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RUN_AFTER_CLONE.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RUN_AFTER_CLONE.bat b/RUN_AFTER_CLONE.bat index e6f5a950..7cb66977 100644 --- a/RUN_AFTER_CLONE.bat +++ b/RUN_AFTER_CLONE.bat @@ -27,6 +27,6 @@ if exist %1 ( ) else ( mkdir %1 ) -robocopy %2 %1 /S /E /NFL /NDL /XD Examples +robocopy %2 %1 /S /E /NFL /XD Examples exit /b From ec86192fc524fbf780a9f1c13906596c45d54ef1 Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Mon, 22 May 2023 18:31:13 +0900 Subject: [PATCH 030/176] modify based on review --- src/src_user/Drivers/Aocs/rw0003.c | 17 ++- .../CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv | 126 +++++++++--------- src/src_user/TlmCmd/command_definitions.c | 8 ++ src/src_user/TlmCmd/command_definitions.h | 122 +++++++++-------- 4 files changed, 142 insertions(+), 131 deletions(-) diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index 991d2c6f..323038c8 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -107,10 +107,10 @@ DS_INIT_ERR_CODE RW0003_init(RW0003_Driver* rw0003_driver, uint8_t ch, uint8_t i rw0003_driver->info.speed_rad_s = 0.0f; rw0003_driver->info.torque_Nm = 0.0f; rw0003_driver->info.temperature_degC = 0.0f; - rw0003_driver->info.vdd_V = 0.0f; - rw0003_driver->info.seu_count = 0.0f; - rw0003_driver->info.fault_state = 0.0f; - rw0003_driver->info.diagnostic_reset_reason = 0; + rw0003_driver->info.vdd_V = -1.0f; + rw0003_driver->info.seu_count = -1.0f; + rw0003_driver->info.fault_state = -1.0f; + rw0003_driver->info.diagnostic_reset_reason = -1; rw0003_driver->info.speed_limit1_rad_s = 900.0f; // デフォルト値を初期値とする TODO_L 設定・読み出し関数を作る rw0003_driver->info.speed_limit2_rad_s = 1000.0f; // デフォルト値を初期値とする TODO_L 設定・読み出し関数を作る rw0003_driver->info.rotation_direction_b[0] = 1.0f; @@ -240,15 +240,14 @@ DS_CMD_ERR_CODE RW0003_diagnostic(RW0003_Driver* rw0003_driver) if (ret != DS_CMD_OK) return ret; // NSP message conversion - const size_t kNspDataLength = RW0003_NSP_HEADER_SIZE + sizeof(uint8_t) + RW0003_NSP_CRC_SIZE; + const size_t kNspDataLength = RW0003_NSP_HEADER_SIZE + sizeof(uint8_t) + RW0003_NSP_CRC_SIZE; uint8_t nsp_data[kNspDataLength]; RW0003_convert_to_nsp_with_data_(rw0003_driver->driver.i2c_config.device_address, - mcf, &RW0003_kDiagnosticsChannel_, sizeof(RW0003_kDiagnosticsChannel_), nsp_data); + mcf, &RW0003_kDiagnosticsChannel_, sizeof(RW0003_kDiagnosticsChannel_), nsp_data); - // SLIP: diagnosticはCRCのみSLIPする可能性がある - const size_t kSlipDataMaxLength = kNspDataLength + RW0003_NSP_CRC_SIZE; + const size_t kSlipDataMaxLength = kNspDataLength + sizeof(RW0003_kSlipFend_); uint8_t slip_data[kSlipDataMaxLength]; - size_t slip_data_length = kSlipDataMaxLength; + size_t slip_data_length = kNspDataLength; RW0003_encode_slip_(nsp_data, kNspDataLength, slip_data, &slip_data_length); slip_data[slip_data_length] = RW0003_kSlipFend_; slip_data_length++; diff --git a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv index 14a9d476..d5af6ce9 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv @@ -159,81 +159,81 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,Cmd_DCU_CLEAR_LOG,OBC,0x0061,0,,,,,,,,,,,,,,,ログをクリアする, * CDH,,,,,,,,,,,,,,,,,,,, **,FRAMコマンド,,,,,,,,,,,,,,,,,,, -,Cmd_DI_FM25V10_WRITE_BYTE,AOBC,0x0063,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,uint8_t,write_data,,,,,,,danger,,FRAM FM25V10に1Byteを書き込む, -,Cmd_DI_FM25V10_READ_BYTE,AOBC,0x0064,2,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,,,,,,,,,,,FRAM FM25V10から1Byteを読み出す, -,Cmd_DI_FM25V10_MANAGE_STATUS,AOBC,0x0065,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint8_t,write = 0; read = others,uint8_t,write_status (ignored when read),,,,,,,,,FRAM FM25V10のステータスレジスタコマンド, +,Cmd_DI_FM25V10_WRITE_BYTE,AOBC,0x0064,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,uint8_t,write_data,,,,,,,danger,,FRAM FM25V10に1Byteを書き込む, +,Cmd_DI_FM25V10_READ_BYTE,AOBC,0x0065,2,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint32_t,address = 0x000000~0x01FFFF,,,,,,,,,,,FRAM FM25V10から1Byteを読み出す, +,Cmd_DI_FM25V10_MANAGE_STATUS,AOBC,0x0066,3,uint8_t,Chip1 = 0; Chip2 = 1; Chip3 = 2; Chip4 = 3,uint8_t,write = 0; read = others,uint8_t,write_status (ignored when read),,,,,,,,,FRAM FM25V10のステータスレジスタコマンド, **,不揮発メモリコマンド,,,,,,,,,,,,,,,,,,, -,Cmd_APP_NVM_MANAGER_WRITE_BYTES,AOBC,0x0066,3,uint32_t,start address(0-0x7ffff),uint8_t,data size,raw,write data(consider endian),,,,,,,danger,,不揮発メモリに複数データを書き込む, -,Cmd_APP_NVM_MANAGER_READ_BYTES,AOBC,0x0067,2,uint32_t,start address(0-0x7ffff),uint8_t,data size,,,,,,,,,,,不揮発メモリから複数データを読み出す, -,Cmd_APP_NVM_PARTITION_WRITE_BYTES,AOBC,0x0068,4,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,raw,write data(consider endian),,,,,danger,,パーティションアクセスで不揮発メモリに複数データを書き込む, -,Cmd_APP_NVM_PARTITION_READ_BYTES,AOBC,0x0069,3,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,,,,,,,,,パーティションアクセスで不揮発メモリから複数データを読み出す, -,Cmd_APP_AOCS_DR_SET_WRITE,AOBC,0x006A,4,uint8_t,permission: 0=DISABLE; 1=ENABLE,uint8_t,overwrite: 0=DISABLE; 1=ENABLE,uint8_t,read_partition=2; 3; 4,uint32_t,write_pointer,,,,,,,DRの書き込み設定, -,Cmd_APP_AOCS_DR_READ,AOBC,0x006B,3,uint8_t,read_mode: 0=MANUAL; 1=CONTINUOUS,uint8_t,read_partition=2; 3; 4,uint32_t,read_pointer,,,,,,,,,DRの読み出し, +,Cmd_APP_NVM_MANAGER_WRITE_BYTES,AOBC,0x0067,3,uint32_t,start address(0-0x7ffff),uint8_t,data size,raw,write data(consider endian),,,,,,,danger,,不揮発メモリに複数データを書き込む, +,Cmd_APP_NVM_MANAGER_READ_BYTES,AOBC,0x0068,2,uint32_t,start address(0-0x7ffff),uint8_t,data size,,,,,,,,,,,不揮発メモリから複数データを読み出す, +,Cmd_APP_NVM_PARTITION_WRITE_BYTES,AOBC,0x0069,4,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,raw,write data(consider endian),,,,,danger,,パーティションアクセスで不揮発メモリに複数データを書き込む, +,Cmd_APP_NVM_PARTITION_READ_BYTES,AOBC,0x006A,3,uint8_t,partition ID,uint32_t,start address(0-partitin size),uint8_t,data size,,,,,,,,,パーティションアクセスで不揮発メモリから複数データを読み出す, +,Cmd_APP_AOCS_DR_SET_WRITE,AOBC,0x006B,4,uint8_t,permission: 0=DISABLE; 1=ENABLE,uint8_t,overwrite: 0=DISABLE; 1=ENABLE,uint8_t,read_partition=2; 3; 4,uint32_t,write_pointer,,,,,,,DRの書き込み設定, +,Cmd_APP_AOCS_DR_READ,AOBC,0x006C,3,uint8_t,read_mode: 0=MANUAL; 1=CONTINUOUS,uint8_t,read_partition=2; 3; 4,uint32_t,read_pointer,,,,,,,,,DRの読み出し, **,,,,,,,,,,,,,,,,,,,, * POWER,電源系コマンド,,,,,,,,,,,,,,,,,,, -,Cmd_APP_PSC_CONTROL_5V_PORT,AOBC,0x006C,2,uint8_t,INA=0; MPU; RM; SS; MTQ,uint8_t,off=0; on=1,,,,,,,,,,,5V配下の電源スイッチ操作, -,Cmd_APP_PSC_CONTROL_UNREG_PORT,AOBC,0x006D,2,uint8_t,STIM=0; STT; OEM; RWX; RWY; RWZ,uint8_t,off=0; on=1,,,,,,,,,,,非安定バス配下の電源スイッチ操作, -,Cmd_DI_INA260_INIT,AOBC,0x006E,4,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint8_t,averaging_mode=0-7,uint8_t,voltage_conversion_time=0-7,uint8_t,current_conversion_time=0-7,,,,,,,INA260初期化モード設定, -,Cmd_DI_INA260_SET_OVER_CURRENT_PROTECTION,AOBC,0x006F,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,float,OC_threshold [mA],,,,,,,,,,,INA260過電流閾値設定, -,Cmd_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD,AOBC,0x0070,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,HW_OC_EL_threshold [V],,,,,,,,,,,H/W過電流EL登録用電圧閾値設定, -,Cmd_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION,AOBC,0x0071,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,SW_OC_threshold [mA],,,,,,,,,,,S/W過電流閾値設定, +,Cmd_APP_PSC_CONTROL_5V_PORT,AOBC,0x006E,2,uint8_t,INA=0; MPU; RM; SS; MTQ,uint8_t,off=0; on=1,,,,,,,,,,,5V配下の電源スイッチ操作, +,Cmd_APP_PSC_CONTROL_UNREG_PORT,AOBC,0x006F,2,uint8_t,STIM=0; STT; OEM; RWX; RWY; RWZ,uint8_t,off=0; on=1,,,,,,,,,,,非安定バス配下の電源スイッチ操作, +,Cmd_DI_INA260_INIT,AOBC,0x0070,4,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint8_t,averaging_mode=0-7,uint8_t,voltage_conversion_time=0-7,uint8_t,current_conversion_time=0-7,,,,,,,INA260初期化モード設定, +,Cmd_DI_INA260_SET_OVER_CURRENT_PROTECTION,AOBC,0x0071,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,float,OC_threshold [mA],,,,,,,,,,,INA260過電流閾値設定, +,Cmd_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD,AOBC,0x0072,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,HW_OC_EL_threshold [V],,,,,,,,,,,H/W過電流EL登録用電圧閾値設定, +,Cmd_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION,AOBC,0x0073,2,uint8_t,PIC=0; STIM; STT; OEM; RM; SS; MTQ; RWX; RWY; RWZ,uint16_t,SW_OC_threshold [mA],,,,,,,,,,,S/W過電流閾値設定, **,,,,,,,,,,,,,,,,,,,, **,,,,,,,,,,,,,,,,,,,, **,姿勢系コマンド,,,,,,,,,,,,,,,,,,, * COMPO,コンポ関連,,,,,,,,,,,,,,,,,,, -,Cmd_DI_RM3100_INIT,AOBC,0x0072,1,uint8_t,0=AOBC@@1=EXT,,,,,,,,,,,,,RM3100の初期化を行う, -,Cmd_DI_MPU9250_INIT,AOBC,0x0073,0,,,,,,,,,,,,,,,MPU9250の初期化を行う, -,Cmd_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS,AOBC,0x0074,1,uint32_t,pwm_period_ms,,,,,,,,,,,,,MTQの3軸のPWM周期を一括で設定.入力は正の値に限る, -,Cmd_DI_MTQ_SEIREN_SET_PWM_DUTY,AOBC,0x0075,2,uint8_t,MTQ X=0; MTQ Y=1; MTQ Z = 2,int8_t,pwm_signed_duty_percent,,,,,,,,,,,指定した軸のMTQのPWMデューティー比を%単位の符号付整数値で設定.入力範囲は[-100; 100], -,Cmd_DI_STIM210_INIT,AOBC,0x0076,0,,,,,,,,,,,,,,,STIM210の初期化を行う (デフォルトの設定で出力), -,Cmd_DI_STIM210_SET_MODE,AOBC,0x0077,1,uint8_t,1=NORMAL@@2=SERVICE,,,,,,,,,,,,,STIM210の運用モードをノーマル/サービスモードに変更, -,Cmd_DI_STIM210_SET_NORMAL_MODE_FORMAT,AOBC,0x0078,1,uint8_t,0=RATE@@2=RATE_TEMP,,,,,,,,,,,,,STIM210の出力を変更(温度出力などを追加), -,Cmd_DI_STIM210_SET_GYRO_OUTPUT,AOBC,0x0079,1,uint8_t,0=ANG_VEL@@1=INCREMENTAL_ANG@@2=AVERAGE_ANG_VEL@@3=INTEGRATED_ANG,,,,,,,,,,,,,STIM210のジャイロ出力を角速度・角度から選択, -,Cmd_DI_STIM210_SET_SAMPLE_RATE,AOBC,0x007A,1,uint8_t,0=TRIGGER@@1=125Hz,,,,,,,,,,,,,STIM210のサンプルレートを設定, -,Cmd_DI_STIM210_SET_TERMINATION_MODE,AOBC,0x007B,1,uint8_t,0=OFF; 1=CRLF,,,,,,,,,,,,,STIM210の終端設定, -,Cmd_DI_STIM210_SET_LOW_PASS_FILTER,AOBC,0x007C,1,uint8_t,0=16Hz; 1=33Hz; 2=66Hz@@3=131Hz@@4=262Hz,,,,,,,,,,,,,STIM210のLPFカットオフ周波数設定, -,Cmd_DI_OEM7600_ONOFF_ANTENNA_POWER,AOBC,0x007D,2,uint8_t,oem_id,uint8_t,off=0; on=1,,,,,,,,,,,OEM7600のアンテナ電源操作, -,Cmd_DI_OEM7600_SOFTWARE_RESET,AOBC,0x007E,2,uint8_t,oem_id,uint8_t,time[sec],,,,,,,,,,,OEM7600のソフトウェアリセット, -,Cmd_DI_OEM7600_SAVE_TLM_SETTING,AOBC,0x007F,1,uint8_t,oem_id,,,,,,,,,,,,,OEM7600の出力テレメ設定保存, -,Cmd_DI_OEM7600_SET_TLM_CONTENTS,AOBC,0x0080,3,uint8_t,oem_id,uint8_t,out_interval,uint32_t,oem7600_tlm_id,,,,,,,,,OEM7600の出力テレメ設定変更, -,Cmd_DI_OEM7600_SET_RESET_GPIO_HIGHLOW,AOBC,0x0081,2,uint8_t,oem_id,uint8_t,low=0; high=1,,,,,,,,,,,OEM7600のハードウェアリセット, -,Cmd_DI_RW0003_INIT,AOBC,0x0082,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003の初期化を行う, -,Cmd_DI_RW0003_SET_IDLE,AOBC,0x0083,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003をIdleモードに入れる, -,Cmd_DI_RW0003_DRIVE_TORQUE,AOBC,0x0084,2,uint8_t,RWX=0; RWY; RWZ,float,torque [Nm],,,,,,,,,,,RW0003にトルク指令を与える, -,Cmd_DI_RW0003_DRIVE_SPEED,AOBC,0x0085,2,uint8_t,RWX=0; RWY; RWZ,float,speed [rad/s],,,,,,,,,,,RW0003に回転数指令を与える, -*,Cmd_DI_RW0003_READ_VDD,AOBC,0x0086,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のVDDを読み取る, -*,Cmd_DI_RW0003_READ_SEU_COUNT,AOBC,0x0087,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のSEU COUNTを読み取る, -*,Cmd_DI_RW0003_READ_FAULT_STATE,AOBC,0x0088,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のFault Stateを読み取る, -*,Cmd_DI_RW0003_DIAGNOSTIC,AOBC,0x0089,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003にDiagnosticコマンドを送る, -,Cmd_DI_SAGITTA_BOOT,AOBC,0x008A,0,,,,,,,,,,,,,,,SAGITTAをブートしてノミナルモードに移行する, -,Cmd_DI_SAGITTA_SET_UNIX_TIME_US,AOBC,0x008B,2,uint32_t,upper 32bit,uint32_t,lower 32bit,,,,,,,,,,,SAGITTAのUnixTime[us]の設定, -,Cmd_DI_SAGITTA_SET_PARAMETER,AOBC,0x008C,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAにパラメータ設定コマンドを送る, -,Cmd_DI_SAGITTA_CHANGE_PARAMETER,AOBC,0x008D,3,uint8_t,PARAMETER_ID,uint8_t,PARAMETER_IDX,float,value,,,,,,,,,SAGITTAドライバ内のパラメータを変更する, -,Cmd_DI_SAGITTA_READ_PARAMETER,AOBC,0x008E,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAのパラメータを読み取る, +,Cmd_DI_RM3100_INIT,AOBC,0x0076,1,uint8_t,0=AOBC@@1=EXT,,,,,,,,,,,,,RM3100の初期化を行う, +,Cmd_DI_MPU9250_INIT,AOBC,0x0077,0,,,,,,,,,,,,,,,MPU9250の初期化を行う, +,Cmd_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS,AOBC,0x0078,1,uint32_t,pwm_period_ms,,,,,,,,,,,,,MTQの3軸のPWM周期を一括で設定.入力は正の値に限る, +,Cmd_DI_MTQ_SEIREN_SET_PWM_DUTY,AOBC,0x0079,2,uint8_t,MTQ X=0; MTQ Y=1; MTQ Z = 2,int8_t,pwm_signed_duty_percent,,,,,,,,,,,指定した軸のMTQのPWMデューティー比を%単位の符号付整数値で設定.入力範囲は[-100; 100], +,Cmd_DI_STIM210_INIT,AOBC,0x007A,0,,,,,,,,,,,,,,,STIM210の初期化を行う (デフォルトの設定で出力), +,Cmd_DI_STIM210_SET_MODE,AOBC,0x007B,1,uint8_t,1=NORMAL@@2=SERVICE,,,,,,,,,,,,,STIM210の運用モードをノーマル/サービスモードに変更, +,Cmd_DI_STIM210_SET_NORMAL_MODE_FORMAT,AOBC,0x007C,1,uint8_t,0=RATE@@2=RATE_TEMP,,,,,,,,,,,,,STIM210の出力を変更(温度出力などを追加), +,Cmd_DI_STIM210_SET_GYRO_OUTPUT,AOBC,0x007D,1,uint8_t,0=ANG_VEL@@1=INCREMENTAL_ANG@@2=AVERAGE_ANG_VEL@@3=INTEGRATED_ANG,,,,,,,,,,,,,STIM210のジャイロ出力を角速度・角度から選択, +,Cmd_DI_STIM210_SET_SAMPLE_RATE,AOBC,0x007E,1,uint8_t,0=TRIGGER@@1=125Hz,,,,,,,,,,,,,STIM210のサンプルレートを設定, +,Cmd_DI_STIM210_SET_TERMINATION_MODE,AOBC,0x007F,1,uint8_t,0=OFF; 1=CRLF,,,,,,,,,,,,,STIM210の終端設定, +,Cmd_DI_STIM210_SET_LOW_PASS_FILTER,AOBC,0x0080,1,uint8_t,0=16Hz; 1=33Hz; 2=66Hz@@3=131Hz@@4=262Hz,,,,,,,,,,,,,STIM210のLPFカットオフ周波数設定, +,Cmd_DI_OEM7600_ONOFF_ANTENNA_POWER,AOBC,0x0081,2,uint8_t,oem_id,uint8_t,off=0; on=1,,,,,,,,,,,OEM7600のアンテナ電源操作, +,Cmd_DI_OEM7600_SOFTWARE_RESET,AOBC,0x0082,2,uint8_t,oem_id,uint8_t,time[sec],,,,,,,,,,,OEM7600のソフトウェアリセット, +,Cmd_DI_OEM7600_SAVE_TLM_SETTING,AOBC,0x0083,1,uint8_t,oem_id,,,,,,,,,,,,,OEM7600の出力テレメ設定保存, +,Cmd_DI_OEM7600_SET_TLM_CONTENTS,AOBC,0x0084,3,uint8_t,oem_id,uint8_t,out_interval,uint32_t,oem7600_tlm_id,,,,,,,,,OEM7600の出力テレメ設定変更, +,Cmd_DI_OEM7600_SET_RESET_GPIO_HIGHLOW,AOBC,0x0085,2,uint8_t,oem_id,uint8_t,low=0; high=1,,,,,,,,,,,OEM7600のハードウェアリセット, +,Cmd_DI_RW0003_INIT,AOBC,0x0086,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003の初期化を行う, +,Cmd_DI_RW0003_SET_IDLE,AOBC,0x0087,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003をIdleモードに入れる, +,Cmd_DI_RW0003_DRIVE_TORQUE,AOBC,0x0088,2,uint8_t,RWX=0; RWY; RWZ,float,torque [Nm],,,,,,,,,,,RW0003にトルク指令を与える, +,Cmd_DI_RW0003_DRIVE_SPEED,AOBC,0x0089,2,uint8_t,RWX=0; RWY; RWZ,float,speed [rad/s],,,,,,,,,,,RW0003に回転数指令を与える, +,Cmd_DI_RW0003_READ_VDD,AOBC,0x008A,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のVDDを読み取る, +,Cmd_DI_RW0003_READ_SEU_COUNT,AOBC,0x008B,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のSEU COUNTを読み取る, +,Cmd_DI_RW0003_READ_FAULT_STATE,AOBC,0x008C,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のFault Stateを読み取る, +,Cmd_DI_RW0003_DIAGNOSTIC,AOBC,0x008D,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003にDiagnosticコマンドを送る, +,Cmd_DI_SAGITTA_BOOT,AOBC,0x008E,0,,,,,,,,,,,,,,,SAGITTAをブートしてノミナルモードに移行する, +,Cmd_DI_SAGITTA_SET_UNIX_TIME_US,AOBC,0x008F,2,uint32_t,upper 32bit,uint32_t,lower 32bit,,,,,,,,,,,SAGITTAのUnixTime[us]の設定, +,Cmd_DI_SAGITTA_SET_PARAMETER,AOBC,0x0090,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAにパラメータ設定コマンドを送る, +,Cmd_DI_SAGITTA_CHANGE_PARAMETER,AOBC,0x0091,3,uint8_t,PARAMETER_ID,uint8_t,PARAMETER_IDX,float,value,,,,,,,,,SAGITTAドライバ内のパラメータを変更する, +,Cmd_DI_SAGITTA_READ_PARAMETER,AOBC,0x0092,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAのパラメータを読み取る, **,座標変換,,,,,,,,,,,,,,,,,,, -,Cmd_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x008F,5,uint8_t,0=AOBC; 1=EXT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,RM3100の座標変換Quaternion_c2bを設定する, -,Cmd_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0090,5,uint8_t,0=AOBC,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,MPU9250の座標変換Quaternion_c2bを設定する, -,Cmd_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0091,5,uint8_t,0=PY; 1=MY; 2=PZ; 3=MZ,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,NanoSSOC-D60の座標変換Quaternion_c2bを設定する, -,Cmd_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0092,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,STIM210の座標変換Quaternion_c2bを設定する, -,Cmd_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0093,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,SAGITTAの座標変換Quaternion_c2bを設定する, -,Cmd_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR,AOBC,0x0094,4,uint8_t,RWX=0; RWY; RWZ,float,body_x,float,body_y,float,body_z,,,,,,,RW回転方向ベクトルを設定する, -,Cmd_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR,AOBC,0x0095,4,uint8_t,MTQ_X=0; MTQ_Y; MTQ_Z,float,body_x,float,body_y,float,body_z,,,,,,,MTQ磁気モーメント方向を設定する, +,Cmd_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0093,5,uint8_t,0=AOBC; 1=EXT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,RM3100の座標変換Quaternion_c2bを設定する, +,Cmd_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0094,5,uint8_t,0=AOBC,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,MPU9250の座標変換Quaternion_c2bを設定する, +,Cmd_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0095,5,uint8_t,0=PY; 1=MY; 2=PZ; 3=MZ,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,NanoSSOC-D60の座標変換Quaternion_c2bを設定する, +,Cmd_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0096,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,STIM210の座標変換Quaternion_c2bを設定する, +,Cmd_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0097,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,SAGITTAの座標変換Quaternion_c2bを設定する, +,Cmd_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR,AOBC,0x0098,4,uint8_t,RWX=0; RWY; RWZ,float,body_x,float,body_y,float,body_z,,,,,,,RW回転方向ベクトルを設定する, +,Cmd_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR,AOBC,0x0099,4,uint8_t,MTQ_X=0; MTQ_Y; MTQ_Z,float,body_x,float,body_y,float,body_z,,,,,,,MTQ磁気モーメント方向を設定する, **,バイアス補正,,,,,,,,,,,,,,,,,,, -,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x0096,4,uint8_t,0=AOBC,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,MPU9250角速度バイアス誤差を設定する, -,Cmd_DI_MPU9250_SET_MAG_BIAS_COMPO_NT,AOBC,0x0097,5,uint8_t,0=AOBC,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add,,,,,MPU9250磁場バイアス誤差を設定する, -,Cmd_DI_RM3100_SET_MAG_BIAS_COMPO_NT,AOBC,0x0098,5,uint8_t,0=AOBC; 1=EXT,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add; 2=default,,,,,RM3100磁場バイアス誤差を設定する, -,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x0099,4,uint8_t,0=IN UNIT,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,STIM210角速度バイアス誤差を設定する, +,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x009A,4,uint8_t,0=AOBC,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,MPU9250角速度バイアス誤差を設定する, +,Cmd_DI_MPU9250_SET_MAG_BIAS_COMPO_NT,AOBC,0x009B,5,uint8_t,0=AOBC,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add,,,,,MPU9250磁場バイアス誤差を設定する, +,Cmd_DI_RM3100_SET_MAG_BIAS_COMPO_NT,AOBC,0x009C,5,uint8_t,0=AOBC; 1=EXT,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add; 2=default,,,,,RM3100磁場バイアス誤差を設定する, +,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x009D,4,uint8_t,0=IN UNIT,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,STIM210角速度バイアス誤差を設定する, **,温度補正,,,,,,,,,,,,,,,,,,, -,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x009A,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度バイアス温度補正値の設定, -,Cmd_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x009B,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度SF温度補正値の設定, -,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x009C,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度バイアス温度補正値の設定, -,Cmd_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x009D,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度SF温度補正値の設定, +,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x009E,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度バイアス温度補正値の設定, +,Cmd_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x009F,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度SF温度補正値の設定, +,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x00A0,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度バイアス温度補正値の設定, +,Cmd_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x00A1,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度SF温度補正値の設定, **,セレクター,,,,,,,,,,,,,,,,,,, -,Cmd_APP_MAG_SELECTOR_SET_STATE,AOBC,0x009E,1,uint8_t,RM_AOBC=0; RM_EXT; MPU; FUSION,,,,,,,,,,,,,使う磁気センサを選択する, -,Cmd_APP_GYRO_SELECTOR_SET_STATE,AOBC,0x009F,1,uint8_t,MPU=0; STIM; FUSION,,,,,,,,,,,,,使うジャイロセンサを選択する, -,Cmd_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD,AOBC,0x00A0,2,float,lower_threshold_percent,float,upper_threshold_percent,,,,,,,,,,,サンセンサが使用可能であると判定する太陽強度閾値設定, +,Cmd_APP_MAG_SELECTOR_SET_STATE,AOBC,0x00A2,1,uint8_t,RM_AOBC=0; RM_EXT; MPU; FUSION,,,,,,,,,,,,,使う磁気センサを選択する, +,Cmd_APP_GYRO_SELECTOR_SET_STATE,AOBC,0x00A3,1,uint8_t,MPU=0; STIM; FUSION,,,,,,,,,,,,,使うジャイロセンサを選択する, +,Cmd_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD,AOBC,0x00A4,2,float,lower_threshold_percent,float,upper_threshold_percent,,,,,,,,,,,サンセンサが使用可能であると判定する太陽強度閾値設定, **,アノマリー,,,,,,,,,,,,,,,,,,, -,Cmd_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD,AOBC,0x00A1,3,uint8_t,0=PIC; RW_DCDC; ROUGH_GYRO; FINE_GYRO_X; Y; Z; STT_MCU; STT_CMOS; RW_X; Y; Z; GPSR,float,upper_degC,float,lower_degC,,,,,,,,,温度アノマリ閾値設定, +,Cmd_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD,AOBC,0x00A5,3,uint8_t,0=PIC; RW_DCDC; ROUGH_GYRO; FINE_GYRO_X; Y; Z; STT_MCU; STT_CMOS; RW_X; Y; Z; GPSR,float,upper_degC,float,lower_degC,,,,,,,,,温度アノマリ閾値設定, * FILTER,センサフィルター関連,,,,,,,,,,,,,,,,,,, ,Cmd_APP_MPU9250_FILTER_SET_ZFILTER_PARAM,AOBC,0x00A3,4,uint8_t,MAG=0; GYRO=1,uint8_t,X=0; Y; Z,float,sampling_freq_Hz,float,cut_off_feq_Hz,,,,,,,MPU9250のSW-LPF設定, *,Cmd_APP_MPU9250_FILTER_RESET_ZFILTER,AOBC,,2,uint8_t,MAG=0; GYRO=1,uint8_t,X=0; Y; Z,,,,,,,,,,,MPU9250のSW-LPFリセット, diff --git a/src/src_user/TlmCmd/command_definitions.c b/src/src_user/TlmCmd/command_definitions.c index db9cf162..1e721188 100644 --- a/src/src_user/TlmCmd/command_definitions.c +++ b/src/src_user/TlmCmd/command_definitions.c @@ -143,6 +143,10 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_SET_IDLE].cmd_func = Cmd_DI_RW0003_SET_IDLE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].cmd_func = Cmd_DI_RW0003_DRIVE_TORQUE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].cmd_func = Cmd_DI_RW0003_DRIVE_SPEED; + cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].cmd_func = Cmd_DI_RW0003_READ_VDD; + cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].cmd_func = Cmd_DI_RW0003_READ_SEU_COUNT; + cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].cmd_func = Cmd_DI_RW0003_READ_FAULT_STATE; + cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].cmd_func = Cmd_DI_RW0003_DIAGNOSTIC; cmd_table[Cmd_CODE_DI_SAGITTA_BOOT].cmd_func = Cmd_DI_SAGITTA_BOOT; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].cmd_func = Cmd_DI_SAGITTA_SET_UNIX_TIME_US; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].cmd_func = Cmd_DI_SAGITTA_SET_PARAMETER; @@ -420,6 +424,10 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; + cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; diff --git a/src/src_user/TlmCmd/command_definitions.h b/src/src_user/TlmCmd/command_definitions.h index f19ce834..553c9917 100644 --- a/src/src_user/TlmCmd/command_definitions.h +++ b/src/src_user/TlmCmd/command_definitions.h @@ -106,65 +106,69 @@ typedef enum Cmd_CODE_DCU_ABORT_CMD = 0x005F, Cmd_CODE_DCU_DOWN_ABORT_FLAG = 0x0060, Cmd_CODE_DCU_CLEAR_LOG = 0x0061, - Cmd_CODE_DI_FM25V10_WRITE_BYTE = 0x0063, - Cmd_CODE_DI_FM25V10_READ_BYTE = 0x0064, - Cmd_CODE_DI_FM25V10_MANAGE_STATUS = 0x0065, - Cmd_CODE_APP_NVM_MANAGER_WRITE_BYTES = 0x0066, - Cmd_CODE_APP_NVM_MANAGER_READ_BYTES = 0x0067, - Cmd_CODE_APP_NVM_PARTITION_WRITE_BYTES = 0x0068, - Cmd_CODE_APP_NVM_PARTITION_READ_BYTES = 0x0069, - Cmd_CODE_APP_AOCS_DR_SET_WRITE = 0x006A, - Cmd_CODE_APP_AOCS_DR_READ = 0x006B, - Cmd_CODE_APP_PSC_CONTROL_5V_PORT = 0x006C, - Cmd_CODE_APP_PSC_CONTROL_UNREG_PORT = 0x006D, - Cmd_CODE_DI_INA260_INIT = 0x006E, - Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION = 0x006F, - Cmd_CODE_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD = 0x0070, - Cmd_CODE_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION = 0x0071, - Cmd_CODE_DI_RM3100_INIT = 0x0072, - Cmd_CODE_DI_MPU9250_INIT = 0x0073, - Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS = 0x0074, - Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_DUTY = 0x0075, - Cmd_CODE_DI_STIM210_INIT = 0x0076, - Cmd_CODE_DI_STIM210_SET_MODE = 0x0077, - Cmd_CODE_DI_STIM210_SET_NORMAL_MODE_FORMAT = 0x0078, - Cmd_CODE_DI_STIM210_SET_GYRO_OUTPUT = 0x0079, - Cmd_CODE_DI_STIM210_SET_SAMPLE_RATE = 0x007A, - Cmd_CODE_DI_STIM210_SET_TERMINATION_MODE = 0x007B, - Cmd_CODE_DI_STIM210_SET_LOW_PASS_FILTER = 0x007C, - Cmd_CODE_DI_OEM7600_ONOFF_ANTENNA_POWER = 0x007D, - Cmd_CODE_DI_OEM7600_SOFTWARE_RESET = 0x007E, - Cmd_CODE_DI_OEM7600_SAVE_TLM_SETTING = 0x007F, - Cmd_CODE_DI_OEM7600_SET_TLM_CONTENTS = 0x0080, - Cmd_CODE_DI_OEM7600_SET_RESET_GPIO_HIGHLOW = 0x0081, - Cmd_CODE_DI_RW0003_INIT = 0x0082, - Cmd_CODE_DI_RW0003_SET_IDLE = 0x0083, - Cmd_CODE_DI_RW0003_DRIVE_TORQUE = 0x0084, - Cmd_CODE_DI_RW0003_DRIVE_SPEED = 0x0085, - Cmd_CODE_DI_SAGITTA_BOOT = 0x008A, - Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US = 0x008B, - Cmd_CODE_DI_SAGITTA_SET_PARAMETER = 0x008C, - Cmd_CODE_DI_SAGITTA_CHANGE_PARAMETER = 0x008D, - Cmd_CODE_DI_SAGITTA_READ_PARAMETER = 0x008E, - Cmd_CODE_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x008F, - Cmd_CODE_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0090, - Cmd_CODE_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0091, - Cmd_CODE_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0092, - Cmd_CODE_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0093, - Cmd_CODE_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR = 0x0094, - Cmd_CODE_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR = 0x0095, - Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x0096, - Cmd_CODE_DI_MPU9250_SET_MAG_BIAS_COMPO_NT = 0x0097, - Cmd_CODE_DI_RM3100_SET_MAG_BIAS_COMPO_NT = 0x0098, - Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x0099, - Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x009A, - Cmd_CODE_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB = 0x009B, - Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x009C, - Cmd_CODE_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB = 0x009D, - Cmd_CODE_APP_MAG_SELECTOR_SET_STATE = 0x009E, - Cmd_CODE_APP_GYRO_SELECTOR_SET_STATE = 0x009F, - Cmd_CODE_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD = 0x00A0, - Cmd_CODE_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD = 0x00A1, + Cmd_CODE_DI_FM25V10_WRITE_BYTE = 0x0064, + Cmd_CODE_DI_FM25V10_READ_BYTE = 0x0065, + Cmd_CODE_DI_FM25V10_MANAGE_STATUS = 0x0066, + Cmd_CODE_APP_NVM_MANAGER_WRITE_BYTES = 0x0067, + Cmd_CODE_APP_NVM_MANAGER_READ_BYTES = 0x0068, + Cmd_CODE_APP_NVM_PARTITION_WRITE_BYTES = 0x0069, + Cmd_CODE_APP_NVM_PARTITION_READ_BYTES = 0x006A, + Cmd_CODE_APP_AOCS_DR_SET_WRITE = 0x006B, + Cmd_CODE_APP_AOCS_DR_READ = 0x006C, + Cmd_CODE_APP_PSC_CONTROL_5V_PORT = 0x006E, + Cmd_CODE_APP_PSC_CONTROL_UNREG_PORT = 0x006F, + Cmd_CODE_DI_INA260_INIT = 0x0070, + Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION = 0x0071, + Cmd_CODE_APP_CURRENT_ANOMALY_SET_HW_OC_EL_THRESHOLD = 0x0072, + Cmd_CODE_APP_CURRENT_ANOMALY_SET_SW_OVER_CURRENT_PROTECTION = 0x0073, + Cmd_CODE_DI_RM3100_INIT = 0x0076, + Cmd_CODE_DI_MPU9250_INIT = 0x0077, + Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_PERIOD_MS = 0x0078, + Cmd_CODE_DI_MTQ_SEIREN_SET_PWM_DUTY = 0x0079, + Cmd_CODE_DI_STIM210_INIT = 0x007A, + Cmd_CODE_DI_STIM210_SET_MODE = 0x007B, + Cmd_CODE_DI_STIM210_SET_NORMAL_MODE_FORMAT = 0x007C, + Cmd_CODE_DI_STIM210_SET_GYRO_OUTPUT = 0x007D, + Cmd_CODE_DI_STIM210_SET_SAMPLE_RATE = 0x007E, + Cmd_CODE_DI_STIM210_SET_TERMINATION_MODE = 0x007F, + Cmd_CODE_DI_STIM210_SET_LOW_PASS_FILTER = 0x0080, + Cmd_CODE_DI_OEM7600_ONOFF_ANTENNA_POWER = 0x0081, + Cmd_CODE_DI_OEM7600_SOFTWARE_RESET = 0x0082, + Cmd_CODE_DI_OEM7600_SAVE_TLM_SETTING = 0x0083, + Cmd_CODE_DI_OEM7600_SET_TLM_CONTENTS = 0x0084, + Cmd_CODE_DI_OEM7600_SET_RESET_GPIO_HIGHLOW = 0x0085, + Cmd_CODE_DI_RW0003_INIT = 0x0086, + Cmd_CODE_DI_RW0003_SET_IDLE = 0x0087, + Cmd_CODE_DI_RW0003_DRIVE_TORQUE = 0x0088, + Cmd_CODE_DI_RW0003_DRIVE_SPEED = 0x0089, + Cmd_CODE_DI_RW0003_READ_VDD = 0x008A, + Cmd_CODE_DI_RW0003_READ_SEU_COUNT = 0x008B, + Cmd_CODE_DI_RW0003_READ_FAULT_STATE = 0x008C, + Cmd_CODE_DI_RW0003_DIAGNOSTIC = 0x008D, + Cmd_CODE_DI_SAGITTA_BOOT = 0x008E, + Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US = 0x008F, + Cmd_CODE_DI_SAGITTA_SET_PARAMETER = 0x0090, + Cmd_CODE_DI_SAGITTA_CHANGE_PARAMETER = 0x0091, + Cmd_CODE_DI_SAGITTA_READ_PARAMETER = 0x0092, + Cmd_CODE_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0093, + Cmd_CODE_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0094, + Cmd_CODE_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0095, + Cmd_CODE_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0096, + Cmd_CODE_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0097, + Cmd_CODE_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR = 0x0098, + Cmd_CODE_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR = 0x0099, + Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x009A, + Cmd_CODE_DI_MPU9250_SET_MAG_BIAS_COMPO_NT = 0x009B, + Cmd_CODE_DI_RM3100_SET_MAG_BIAS_COMPO_NT = 0x009C, + Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x009D, + Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x009E, + Cmd_CODE_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB = 0x009F, + Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x00A0, + Cmd_CODE_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB = 0x00A1, + Cmd_CODE_APP_MAG_SELECTOR_SET_STATE = 0x00A2, + Cmd_CODE_APP_GYRO_SELECTOR_SET_STATE = 0x00A3, + Cmd_CODE_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD = 0x00A4, + Cmd_CODE_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD = 0x00A5, Cmd_CODE_APP_MPU9250_FILTER_SET_ZFILTER_PARAM = 0x00A3, Cmd_CODE_APP_MPU9250_FILTER_SET_SPIKE_FILTER_PARAM = 0x00A4, Cmd_CODE_APP_STIM210_FILTER_SET_ZFILTER_PARAM = 0x00A5, From 74acff2e3257c335ed42591918841eb99f50913f Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Mon, 22 May 2023 18:38:16 +0900 Subject: [PATCH 031/176] Add cmd file --- .../TlmCmd/DataBase/CmdPlan/AOBC_RW0003.ops | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/src_user/Settings/TlmCmd/DataBase/CmdPlan/AOBC_RW0003.ops diff --git a/src/src_user/Settings/TlmCmd/DataBase/CmdPlan/AOBC_RW0003.ops b/src/src_user/Settings/TlmCmd/DataBase/CmdPlan/AOBC_RW0003.ops new file mode 100644 index 00000000..481324a3 --- /dev/null +++ b/src/src_user/Settings/TlmCmd/DataBase/CmdPlan/AOBC_RW0003.ops @@ -0,0 +1,41 @@ +.# ===== RW0003 単体試験 ===== +.# +.AOBC_RT.Cmd_GENERATE_TLM 0x40 0xcf 1 # AOBC_DEBUGをDL +.# 初期値が設定どおりであることを確認する +.# +.# ----- テレコマ試験 ----- +.Cmd_DI_RW0003_READ_VDD 0 + wait_sec 1 + Cmd_DI_RW0003_READ_VDD 1 + wait_sec 1 + Cmd_DI_RW0003_READ_VDD 2 + wait_sec 1 + AOBC_RT.Cmd_GENERATE_TLM 0x40 0xcf 1 # AOBC_DEBUGをDL +.# 正しくテレメが取れていることを確認する + # +.Cmd_DI_RW0003_READ_SEU_COUNT 0 + wait_sec 1 + Cmd_DI_RW0003_READ_SEU_COUNT 1 + wait_sec 1 + Cmd_DI_RW0003_READ_SEU_COUNT 2 + wait_sec 1 + AOBC_RT.Cmd_GENERATE_TLM 0x40 0xcf 1 # AOBC_DEBUGをDL +.# 正しくテレメが取れていることを確認する + # +.Cmd_DI_RW0003_READ_FAULT_STATE 0 + wait_sec 1 + Cmd_DI_RW0003_READ_FAULT_STATE 1 + wait_sec 1 + Cmd_DI_RW0003_READ_FAULT_STATE 2 + wait_sec 1 + AOBC_RT.Cmd_GENERATE_TLM 0x40 0xcf 1 # AOBC_DEBUGをDL +.# 正しくテレメが取れていることを確認する + # +.Cmd_DI_RW0003_DIAGNOSTIC 0 + wait_sec 1 + Cmd_DI_RW0003_DIAGNOSTIC 1 + wait_sec 1 + Cmd_DI_RW0003_DIAGNOSTIC 2 + wait_sec 1 + AOBC_RT.Cmd_GENERATE_TLM 0x40 0xcf 1 # AOBC_DEBUGをDL +.# 正しくテレメが取れていることを確認する From 6b4423e7cf1b63a4efd968a44dcd59f60cd02bed Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Mon, 22 May 2023 18:46:42 +0900 Subject: [PATCH 032/176] =?UTF-8?q?=E8=A9=A6=E9=A8=93=E7=94=A8=E3=82=B3?= =?UTF-8?q?=E3=83=9E=E3=83=B3=E3=83=89=E3=81=AE=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=A2=E3=82=A6=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv | 56 +++++++++---------- src/src_user/TlmCmd/command_definitions.c | 8 --- src/src_user/TlmCmd/command_definitions.h | 52 ++++++++--------- 3 files changed, 52 insertions(+), 64 deletions(-) diff --git a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv index d5af6ce9..b482fb8e 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv @@ -201,39 +201,39 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,Cmd_DI_RW0003_SET_IDLE,AOBC,0x0087,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003をIdleモードに入れる, ,Cmd_DI_RW0003_DRIVE_TORQUE,AOBC,0x0088,2,uint8_t,RWX=0; RWY; RWZ,float,torque [Nm],,,,,,,,,,,RW0003にトルク指令を与える, ,Cmd_DI_RW0003_DRIVE_SPEED,AOBC,0x0089,2,uint8_t,RWX=0; RWY; RWZ,float,speed [rad/s],,,,,,,,,,,RW0003に回転数指令を与える, -,Cmd_DI_RW0003_READ_VDD,AOBC,0x008A,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のVDDを読み取る, -,Cmd_DI_RW0003_READ_SEU_COUNT,AOBC,0x008B,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のSEU COUNTを読み取る, -,Cmd_DI_RW0003_READ_FAULT_STATE,AOBC,0x008C,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のFault Stateを読み取る, -,Cmd_DI_RW0003_DIAGNOSTIC,AOBC,0x008D,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003にDiagnosticコマンドを送る, -,Cmd_DI_SAGITTA_BOOT,AOBC,0x008E,0,,,,,,,,,,,,,,,SAGITTAをブートしてノミナルモードに移行する, -,Cmd_DI_SAGITTA_SET_UNIX_TIME_US,AOBC,0x008F,2,uint32_t,upper 32bit,uint32_t,lower 32bit,,,,,,,,,,,SAGITTAのUnixTime[us]の設定, -,Cmd_DI_SAGITTA_SET_PARAMETER,AOBC,0x0090,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAにパラメータ設定コマンドを送る, -,Cmd_DI_SAGITTA_CHANGE_PARAMETER,AOBC,0x0091,3,uint8_t,PARAMETER_ID,uint8_t,PARAMETER_IDX,float,value,,,,,,,,,SAGITTAドライバ内のパラメータを変更する, -,Cmd_DI_SAGITTA_READ_PARAMETER,AOBC,0x0092,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAのパラメータを読み取る, +*,Cmd_DI_RW0003_READ_VDD,AOBC,,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のVDDを読み取る, +*,Cmd_DI_RW0003_READ_SEU_COUNT,AOBC,,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のSEU COUNTを読み取る, +*,Cmd_DI_RW0003_READ_FAULT_STATE,AOBC,,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003のFault Stateを読み取る, +*,Cmd_DI_RW0003_DIAGNOSTIC,AOBC,,1,uint8_t,RWX=0; RWY; RWZ,,,,,,,,,,,,,RW0003にDiagnosticコマンドを送る, +,Cmd_DI_SAGITTA_BOOT,AOBC,0x008A,0,,,,,,,,,,,,,,,SAGITTAをブートしてノミナルモードに移行する, +,Cmd_DI_SAGITTA_SET_UNIX_TIME_US,AOBC,0x008B,2,uint32_t,upper 32bit,uint32_t,lower 32bit,,,,,,,,,,,SAGITTAのUnixTime[us]の設定, +,Cmd_DI_SAGITTA_SET_PARAMETER,AOBC,0x008C,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAにパラメータ設定コマンドを送る, +,Cmd_DI_SAGITTA_CHANGE_PARAMETER,AOBC,0x008D,3,uint8_t,PARAMETER_ID,uint8_t,PARAMETER_IDX,float,value,,,,,,,,,SAGITTAドライバ内のパラメータを変更する, +,Cmd_DI_SAGITTA_READ_PARAMETER,AOBC,0x008E,1,uint8_t,PARAMETER_ID,,,,,,,,,,,,,SAGITTAのパラメータを読み取る, **,座標変換,,,,,,,,,,,,,,,,,,, -,Cmd_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0093,5,uint8_t,0=AOBC; 1=EXT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,RM3100の座標変換Quaternion_c2bを設定する, -,Cmd_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0094,5,uint8_t,0=AOBC,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,MPU9250の座標変換Quaternion_c2bを設定する, -,Cmd_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0095,5,uint8_t,0=PY; 1=MY; 2=PZ; 3=MZ,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,NanoSSOC-D60の座標変換Quaternion_c2bを設定する, -,Cmd_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0096,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,STIM210の座標変換Quaternion_c2bを設定する, -,Cmd_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0097,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,SAGITTAの座標変換Quaternion_c2bを設定する, -,Cmd_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR,AOBC,0x0098,4,uint8_t,RWX=0; RWY; RWZ,float,body_x,float,body_y,float,body_z,,,,,,,RW回転方向ベクトルを設定する, -,Cmd_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR,AOBC,0x0099,4,uint8_t,MTQ_X=0; MTQ_Y; MTQ_Z,float,body_x,float,body_y,float,body_z,,,,,,,MTQ磁気モーメント方向を設定する, +,Cmd_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x008F,5,uint8_t,0=AOBC; 1=EXT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,RM3100の座標変換Quaternion_c2bを設定する, +,Cmd_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0090,5,uint8_t,0=AOBC,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,MPU9250の座標変換Quaternion_c2bを設定する, +,Cmd_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0091,5,uint8_t,0=PY; 1=MY; 2=PZ; 3=MZ,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,NanoSSOC-D60の座標変換Quaternion_c2bを設定する, +,Cmd_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0092,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,STIM210の座標変換Quaternion_c2bを設定する, +,Cmd_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B,AOBC,0x0093,5,uint8_t,0=IN UNIT,float,q_c2b_vec_0,float,q_c2b_vec_1,float,q_c2b_vec_2,float,q_c2b_scalar,,,,,SAGITTAの座標変換Quaternion_c2bを設定する, +,Cmd_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR,AOBC,0x0094,4,uint8_t,RWX=0; RWY; RWZ,float,body_x,float,body_y,float,body_z,,,,,,,RW回転方向ベクトルを設定する, +,Cmd_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR,AOBC,0x0095,4,uint8_t,MTQ_X=0; MTQ_Y; MTQ_Z,float,body_x,float,body_y,float,body_z,,,,,,,MTQ磁気モーメント方向を設定する, **,バイアス補正,,,,,,,,,,,,,,,,,,, -,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x009A,4,uint8_t,0=AOBC,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,MPU9250角速度バイアス誤差を設定する, -,Cmd_DI_MPU9250_SET_MAG_BIAS_COMPO_NT,AOBC,0x009B,5,uint8_t,0=AOBC,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add,,,,,MPU9250磁場バイアス誤差を設定する, -,Cmd_DI_RM3100_SET_MAG_BIAS_COMPO_NT,AOBC,0x009C,5,uint8_t,0=AOBC; 1=EXT,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add; 2=default,,,,,RM3100磁場バイアス誤差を設定する, -,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x009D,4,uint8_t,0=IN UNIT,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,STIM210角速度バイアス誤差を設定する, +,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x0096,4,uint8_t,0=AOBC,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,MPU9250角速度バイアス誤差を設定する, +,Cmd_DI_MPU9250_SET_MAG_BIAS_COMPO_NT,AOBC,0x0097,5,uint8_t,0=AOBC,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add,,,,,MPU9250磁場バイアス誤差を設定する, +,Cmd_DI_RM3100_SET_MAG_BIAS_COMPO_NT,AOBC,0x0098,5,uint8_t,0=AOBC; 1=EXT,float,compo_x_nT,float,compo_y_nT,float,compo_z_nT,uint8_t,0=set; 1=add; 2=default,,,,,RM3100磁場バイアス誤差を設定する, +,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S,AOBC,0x0099,4,uint8_t,0=IN UNIT,float,compo_x_rad_s,float,compo_y_rad_s,float,compo_z_rad_s,,,,,,,STIM210角速度バイアス誤差を設定する, **,温度補正,,,,,,,,,,,,,,,,,,, -,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x009E,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度バイアス温度補正値の設定, -,Cmd_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x009F,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度SF温度補正値の設定, -,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x00A0,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度バイアス温度補正値の設定, -,Cmd_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x00A1,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度SF温度補正値の設定, +,Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x009A,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度バイアス温度補正値の設定, +,Cmd_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x009B,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,MPU角速度SF温度補正値の設定, +,Cmd_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB,AOBC,0x009C,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度バイアス温度補正値の設定, +,Cmd_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB,AOBC,0x009D,5,uint8_t,X=0; Y; Z,float,range_low_degC,float,range_high_degC,float,coeff_0,float,coeff_1,,,,,STIM角速度SF温度補正値の設定, **,セレクター,,,,,,,,,,,,,,,,,,, -,Cmd_APP_MAG_SELECTOR_SET_STATE,AOBC,0x00A2,1,uint8_t,RM_AOBC=0; RM_EXT; MPU; FUSION,,,,,,,,,,,,,使う磁気センサを選択する, -,Cmd_APP_GYRO_SELECTOR_SET_STATE,AOBC,0x00A3,1,uint8_t,MPU=0; STIM; FUSION,,,,,,,,,,,,,使うジャイロセンサを選択する, -,Cmd_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD,AOBC,0x00A4,2,float,lower_threshold_percent,float,upper_threshold_percent,,,,,,,,,,,サンセンサが使用可能であると判定する太陽強度閾値設定, +,Cmd_APP_MAG_SELECTOR_SET_STATE,AOBC,0x009E,1,uint8_t,RM_AOBC=0; RM_EXT; MPU; FUSION,,,,,,,,,,,,,使う磁気センサを選択する, +,Cmd_APP_GYRO_SELECTOR_SET_STATE,AOBC,0x009F,1,uint8_t,MPU=0; STIM; FUSION,,,,,,,,,,,,,使うジャイロセンサを選択する, +,Cmd_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD,AOBC,0x00A0,2,float,lower_threshold_percent,float,upper_threshold_percent,,,,,,,,,,,サンセンサが使用可能であると判定する太陽強度閾値設定, **,アノマリー,,,,,,,,,,,,,,,,,,, -,Cmd_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD,AOBC,0x00A5,3,uint8_t,0=PIC; RW_DCDC; ROUGH_GYRO; FINE_GYRO_X; Y; Z; STT_MCU; STT_CMOS; RW_X; Y; Z; GPSR,float,upper_degC,float,lower_degC,,,,,,,,,温度アノマリ閾値設定, +,Cmd_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD,AOBC,0x00A1,3,uint8_t,0=PIC; RW_DCDC; ROUGH_GYRO; FINE_GYRO_X; Y; Z; STT_MCU; STT_CMOS; RW_X; Y; Z; GPSR,float,upper_degC,float,lower_degC,,,,,,,,,温度アノマリ閾値設定, * FILTER,センサフィルター関連,,,,,,,,,,,,,,,,,,, ,Cmd_APP_MPU9250_FILTER_SET_ZFILTER_PARAM,AOBC,0x00A3,4,uint8_t,MAG=0; GYRO=1,uint8_t,X=0; Y; Z,float,sampling_freq_Hz,float,cut_off_feq_Hz,,,,,,,MPU9250のSW-LPF設定, *,Cmd_APP_MPU9250_FILTER_RESET_ZFILTER,AOBC,,2,uint8_t,MAG=0; GYRO=1,uint8_t,X=0; Y; Z,,,,,,,,,,,MPU9250のSW-LPFリセット, diff --git a/src/src_user/TlmCmd/command_definitions.c b/src/src_user/TlmCmd/command_definitions.c index 1e721188..db9cf162 100644 --- a/src/src_user/TlmCmd/command_definitions.c +++ b/src/src_user/TlmCmd/command_definitions.c @@ -143,10 +143,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_SET_IDLE].cmd_func = Cmd_DI_RW0003_SET_IDLE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].cmd_func = Cmd_DI_RW0003_DRIVE_TORQUE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].cmd_func = Cmd_DI_RW0003_DRIVE_SPEED; - cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].cmd_func = Cmd_DI_RW0003_READ_VDD; - cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].cmd_func = Cmd_DI_RW0003_READ_SEU_COUNT; - cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].cmd_func = Cmd_DI_RW0003_READ_FAULT_STATE; - cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].cmd_func = Cmd_DI_RW0003_DIAGNOSTIC; cmd_table[Cmd_CODE_DI_SAGITTA_BOOT].cmd_func = Cmd_DI_SAGITTA_BOOT; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].cmd_func = Cmd_DI_SAGITTA_SET_UNIX_TIME_US; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].cmd_func = Cmd_DI_SAGITTA_SET_PARAMETER; @@ -424,10 +420,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_RW0003_DRIVE_TORQUE].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_RW0003_DRIVE_SPEED].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_DI_RW0003_READ_VDD].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_DI_RW0003_READ_SEU_COUNT].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_DI_RW0003_READ_FAULT_STATE].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_DI_RW0003_DIAGNOSTIC].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_DI_SAGITTA_SET_PARAMETER].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; diff --git a/src/src_user/TlmCmd/command_definitions.h b/src/src_user/TlmCmd/command_definitions.h index 553c9917..c5732cfe 100644 --- a/src/src_user/TlmCmd/command_definitions.h +++ b/src/src_user/TlmCmd/command_definitions.h @@ -141,34 +141,30 @@ typedef enum Cmd_CODE_DI_RW0003_SET_IDLE = 0x0087, Cmd_CODE_DI_RW0003_DRIVE_TORQUE = 0x0088, Cmd_CODE_DI_RW0003_DRIVE_SPEED = 0x0089, - Cmd_CODE_DI_RW0003_READ_VDD = 0x008A, - Cmd_CODE_DI_RW0003_READ_SEU_COUNT = 0x008B, - Cmd_CODE_DI_RW0003_READ_FAULT_STATE = 0x008C, - Cmd_CODE_DI_RW0003_DIAGNOSTIC = 0x008D, - Cmd_CODE_DI_SAGITTA_BOOT = 0x008E, - Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US = 0x008F, - Cmd_CODE_DI_SAGITTA_SET_PARAMETER = 0x0090, - Cmd_CODE_DI_SAGITTA_CHANGE_PARAMETER = 0x0091, - Cmd_CODE_DI_SAGITTA_READ_PARAMETER = 0x0092, - Cmd_CODE_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0093, - Cmd_CODE_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0094, - Cmd_CODE_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0095, - Cmd_CODE_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0096, - Cmd_CODE_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0097, - Cmd_CODE_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR = 0x0098, - Cmd_CODE_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR = 0x0099, - Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x009A, - Cmd_CODE_DI_MPU9250_SET_MAG_BIAS_COMPO_NT = 0x009B, - Cmd_CODE_DI_RM3100_SET_MAG_BIAS_COMPO_NT = 0x009C, - Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x009D, - Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x009E, - Cmd_CODE_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB = 0x009F, - Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x00A0, - Cmd_CODE_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB = 0x00A1, - Cmd_CODE_APP_MAG_SELECTOR_SET_STATE = 0x00A2, - Cmd_CODE_APP_GYRO_SELECTOR_SET_STATE = 0x00A3, - Cmd_CODE_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD = 0x00A4, - Cmd_CODE_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD = 0x00A5, + Cmd_CODE_DI_SAGITTA_BOOT = 0x008A, + Cmd_CODE_DI_SAGITTA_SET_UNIX_TIME_US = 0x008B, + Cmd_CODE_DI_SAGITTA_SET_PARAMETER = 0x008C, + Cmd_CODE_DI_SAGITTA_CHANGE_PARAMETER = 0x008D, + Cmd_CODE_DI_SAGITTA_READ_PARAMETER = 0x008E, + Cmd_CODE_DI_RM3100_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x008F, + Cmd_CODE_DI_MPU9250_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0090, + Cmd_CODE_DI_NANOSSOC_D60_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0091, + Cmd_CODE_DI_STIM210_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0092, + Cmd_CODE_DI_SAGITTA_SET_FRAME_TRANSFORMATION_QUATERNION_C2B = 0x0093, + Cmd_CODE_DI_RW0003_SET_ROTATION_DIRECTION_VECTOR = 0x0094, + Cmd_CODE_DI_MTQ_SEIREN_SET_MAGNETIC_MOMENT_DIRECTION_VECTOR = 0x0095, + Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x0096, + Cmd_CODE_DI_MPU9250_SET_MAG_BIAS_COMPO_NT = 0x0097, + Cmd_CODE_DI_RM3100_SET_MAG_BIAS_COMPO_NT = 0x0098, + Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_COMPO_RAD_S = 0x0099, + Cmd_CODE_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x009A, + Cmd_CODE_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB = 0x009B, + Cmd_CODE_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB = 0x009C, + Cmd_CODE_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB = 0x009D, + Cmd_CODE_APP_MAG_SELECTOR_SET_STATE = 0x009E, + Cmd_CODE_APP_GYRO_SELECTOR_SET_STATE = 0x009F, + Cmd_CODE_SUN_SENSOR_SELECTOR_SET_INTENSITY_THRESHOLD = 0x00A0, + Cmd_CODE_APP_TEMPERATURE_ANOMALY_SET_THRESHOLD = 0x00A1, Cmd_CODE_APP_MPU9250_FILTER_SET_ZFILTER_PARAM = 0x00A3, Cmd_CODE_APP_MPU9250_FILTER_SET_SPIKE_FILTER_PARAM = 0x00A4, Cmd_CODE_APP_STIM210_FILTER_SET_ZFILTER_PARAM = 0x00A5, From a665eca7817da9c8903d6855cc5fa2a213736df4 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Tue, 23 May 2023 11:15:54 +0900 Subject: [PATCH 033/176] [fix] fix file name for OSS --- C2A_ISSL6U_AOBC.sln => C2A_AOBC.sln | 2 +- C2A_ISSL6U_AOBC.vcxproj => C2A_AOBC.vcxproj | 12 +++++----- c2a_issl6u_aobc.user => C2A_AOBC.vcxproj.user | 10 ++++----- ...A_ISSL6U_AOBC.sln => C2A_AOBC_EXAMPLE.sln} | 2 +- ..._AOBC.vcxproj => C2A_AOBC_EXAMPLE.vcxproj} | 12 +++++----- .../C2A_AOBC_EXAMPLE.vcxproj.user | 0 ..._aobc.filters => c2a_aobc_example.filters} | 4 ++-- .../c2a_aobc_example.ino | 22 +++++++++---------- ...OBC.vcxproj.user => c2a_aobc_example.user} | 0 c2a_issl6u_aobc.filters => c2a_aobc.filters | 4 ++-- Examples/c2a_issl6u_aobc.ino => c2a_aobc.ino | 22 +++++++++---------- .../c2a_issl6u_aobc.user => c2a_aobc.user | 0 12 files changed, 45 insertions(+), 45 deletions(-) rename C2A_ISSL6U_AOBC.sln => C2A_AOBC.sln (87%) rename C2A_ISSL6U_AOBC.vcxproj => C2A_AOBC.vcxproj (94%) rename c2a_issl6u_aobc.user => C2A_AOBC.vcxproj.user (97%) rename Examples/{C2A_ISSL6U_AOBC.sln => C2A_AOBC_EXAMPLE.sln} (86%) rename Examples/{C2A_ISSL6U_AOBC.vcxproj => C2A_AOBC_EXAMPLE.vcxproj} (95%) rename C2A_ISSL6U_AOBC.vcxproj.user => Examples/C2A_AOBC_EXAMPLE.vcxproj.user (100%) rename Examples/{c2a_issl6u_aobc.filters => c2a_aobc_example.filters} (99%) rename c2a_issl6u_aobc.ino => Examples/c2a_aobc_example.ino (61%) rename Examples/{C2A_ISSL6U_AOBC.vcxproj.user => c2a_aobc_example.user} (100%) rename c2a_issl6u_aobc.filters => c2a_aobc.filters (99%) rename Examples/c2a_issl6u_aobc.ino => c2a_aobc.ino (61%) rename Examples/c2a_issl6u_aobc.user => c2a_aobc.user (100%) diff --git a/C2A_ISSL6U_AOBC.sln b/C2A_AOBC.sln similarity index 87% rename from C2A_ISSL6U_AOBC.sln rename to C2A_AOBC.sln index 63797106..d1f95080 100644 --- a/C2A_ISSL6U_AOBC.sln +++ b/C2A_AOBC.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30413.136 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c2a_issl6u_aobc", "c2a_issl6u_aobc.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c2a_aobc", "c2a_aobc.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/C2A_ISSL6U_AOBC.vcxproj b/C2A_AOBC.vcxproj similarity index 94% rename from C2A_ISSL6U_AOBC.vcxproj rename to C2A_AOBC.vcxproj index f24eeb9e..6a04bb39 100644 --- a/C2A_ISSL6U_AOBC.vcxproj +++ b/C2A_AOBC.vcxproj @@ -12,8 +12,8 @@ {C5F80730-F44F-4478-BDAE-6634EFC2CA88} - c2a_issl6u_aobc - c2a_issl6u_aobc + c2a_aobc + c2a_aobc @@ -77,8 +77,8 @@ Level3 MinSpace true - $(ProjectDir)..\c2a_issl6u_aobc;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DTWI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DSPI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\avr;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\pps;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\util;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\variants\MXL795;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\tools\pic32-tools\1.43-pic32gcc\pic32mx\include;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32;%(AdditionalIncludeDirectories) - $(ProjectDir)__vm\.c2a_issl6u_aobc.vsarduino.h;%(ForcedIncludeFiles) + $(ProjectDir)..\c2a_aobc;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DTWI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DSPI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\avr;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\pps;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\util;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\variants\MXL795;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\tools\pic32-tools\1.43-pic32gcc\pic32mx\include;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32;%(AdditionalIncludeDirectories) + $(ProjectDir)__vm\.c2a_aobc.vsarduino.h;%(ForcedIncludeFiles) true __PIC32_32MX795F512L__;_VMDEBUG=1;ARDUINO_ARCH_PIC32;F_CPU=80000000L;ARDUINO=108013;PIC32_CHIPKIT_MXL795B;MPIDEVER=16777998;MPIDE=150;IDE=Arduino;__cplusplus=201103L;_VMICRO_INTELLISENSE;%(PreprocessorDefinitions) CompileAsCpp @@ -110,7 +110,7 @@ - + @@ -318,7 +318,7 @@ - + diff --git a/c2a_issl6u_aobc.user b/C2A_AOBC.vcxproj.user similarity index 97% rename from c2a_issl6u_aobc.user rename to C2A_AOBC.vcxproj.user index 966b4ffb..429333de 100644 --- a/c2a_issl6u_aobc.user +++ b/C2A_AOBC.vcxproj.user @@ -1,6 +1,6 @@ - - - - true - + + + + true + \ No newline at end of file diff --git a/Examples/C2A_ISSL6U_AOBC.sln b/Examples/C2A_AOBC_EXAMPLE.sln similarity index 86% rename from Examples/C2A_ISSL6U_AOBC.sln rename to Examples/C2A_AOBC_EXAMPLE.sln index 63797106..e89470fb 100644 --- a/Examples/C2A_ISSL6U_AOBC.sln +++ b/Examples/C2A_AOBC_EXAMPLE.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30413.136 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c2a_issl6u_aobc", "c2a_issl6u_aobc.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c2a_aobc_example", "c2a_aobc_example.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Examples/C2A_ISSL6U_AOBC.vcxproj b/Examples/C2A_AOBC_EXAMPLE.vcxproj similarity index 95% rename from Examples/C2A_ISSL6U_AOBC.vcxproj rename to Examples/C2A_AOBC_EXAMPLE.vcxproj index 4e6f1b1c..e666e395 100644 --- a/Examples/C2A_ISSL6U_AOBC.vcxproj +++ b/Examples/C2A_AOBC_EXAMPLE.vcxproj @@ -12,8 +12,8 @@ {C5F80730-F44F-4478-BDAE-6634EFC2CA88} - c2a_issl6u_aobc - c2a_issl6u_aobc + c2a_aobc_example + c2a_aobc_example @@ -77,8 +77,8 @@ Level3 MinSpace true - $(ProjectDir)..\c2a_issl6u_aobc;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DTWI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DSPI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\avr;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\pps;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\util;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\variants\MXL795;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\tools\pic32-tools\1.43-pic32gcc\pic32mx\include;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32;%(AdditionalIncludeDirectories) - $(ProjectDir)__vm\.c2a_issl6u_aobc.vsarduino.h;%(ForcedIncludeFiles) + $(ProjectDir)..\c2a_aobc_example;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DTWI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\libraries\DSPI;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\avr;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\pps;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32\util;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32\2.1.0\variants\MXL795;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\tools\pic32-tools\1.43-pic32gcc\pic32mx\include;C:\Users\USERNAME\AppData\Local\arduino15\packages\chipKIT\hardware\pic32;%(AdditionalIncludeDirectories) + $(ProjectDir)__vm\.c2a_aobc_example.vsarduino.h;%(ForcedIncludeFiles) true __PIC32_32MX795F512L__;_VMDEBUG=1;ARDUINO_ARCH_PIC32;F_CPU=80000000L;ARDUINO=108013;PIC32_CHIPKIT_MXL795B;MPIDEVER=16777998;MPIDE=150;IDE=Arduino;__cplusplus=201103L;_VMICRO_INTELLISENSE;%(PreprocessorDefinitions) CompileAsCpp @@ -110,7 +110,7 @@ - + @@ -318,7 +318,7 @@ - + diff --git a/C2A_ISSL6U_AOBC.vcxproj.user b/Examples/C2A_AOBC_EXAMPLE.vcxproj.user similarity index 100% rename from C2A_ISSL6U_AOBC.vcxproj.user rename to Examples/C2A_AOBC_EXAMPLE.vcxproj.user diff --git a/Examples/c2a_issl6u_aobc.filters b/Examples/c2a_aobc_example.filters similarity index 99% rename from Examples/c2a_issl6u_aobc.filters rename to Examples/c2a_aobc_example.filters index 51d3b19c..32725933 100644 --- a/Examples/c2a_issl6u_aobc.filters +++ b/Examples/c2a_aobc_example.filters @@ -15,7 +15,7 @@ - + Header Files @@ -457,6 +457,6 @@ - + \ No newline at end of file diff --git a/c2a_issl6u_aobc.ino b/Examples/c2a_aobc_example.ino similarity index 61% rename from c2a_issl6u_aobc.ino rename to Examples/c2a_aobc_example.ino index bc8b21d8..6b9dd29b 100644 --- a/c2a_issl6u_aobc.ino +++ b/Examples/c2a_aobc_example.ino @@ -1,5 +1,5 @@ /* - Name: C2A_ISSL6U_AOBC.ino + Name: C2A_AOBC_EXAMPLE.ino */ extern "C" @@ -20,8 +20,8 @@ static void __USER_ISR C2A_timer1_handler_(void); // Arduino functions void setup() { - // TODO: ł̂ꏊ͗v - Serial.begin(115200); // Debug|[g + // TODO: �����ł����̂��ꏊ�͗v���� + Serial.begin(115200); // Debug�|�[�g C2A_init_(); @@ -42,28 +42,28 @@ static void C2A_main_(void) while (1) { C2A_core_main(); - // [U[`loop͂ɓ + // ���[�U�[��`loop�����͂����ɓ���� } return; } -// C2A֘Ȁ -// HW֘Ai^C}[C荞ݐݒȂǁĵݓƎɏ -// Printf WDT_clear_wdt(); Ă΂Ă邱ƂɒӁI +// C2A�֘A�̏����� +// HW�֘A�����i�^�C�}�[�C���荞�ݐݒ�Ȃǁj�̂ݓƎ��ɏ����� +// Printf������ WDT_clear_wdt(); ���Ă΂�Ă邱�Ƃɒ��ӁI static void C2A_init_(void) { TMGR_init(); // Time Manager - // AM_initialize_all_apps ł̎Ԍv̂߂ɂŏ + // AM_initialize_all_apps �ł̎��Ԍv���̂��߂ɂ����ŏ����� Printf("C2A_init: TMGR_init done.\n"); - // ^C}݊֘A + // �^�C�}�����݊֘A C2A_timer_setting_(); Printf("C2A_init: timer_setting_ done.\n"); C2A_core_init(); - TMGR_clear(); // TODO: user_ossƑčēxĂ邪C̎荞݂~߂ׂȂǗv + TMGR_clear(); // TODO: user_oss�Ƒ����čēx���������Ă��邪�C���̎����荞�݂��~�߂�ׂ����ȂǗv���� return; } @@ -75,7 +75,7 @@ static void C2A_timer_setting_(void) setIntPriority(_TIMER_1_VECTOR, _T1_IPL_IPC, _T1_SPL_IPC); setIntEnable(_TIMER_1_IRQ); TMR1 = 0; // clear timer - // ̒l1ms̃NbNAbvɂȂ肩A덷~ςŏɂȂ悤Ɏs蓮l + // ���̒l��1ms�̃N���b�N�A�b�v�ɂȂ肩�A�����덷�~�ς��ŏ��ɂȂ�悤�Ɏ������s���蓮���������l T1CON = TACON_PS_8; // set prescaler PR1 = (unsigned int)(10001); diff --git a/Examples/C2A_ISSL6U_AOBC.vcxproj.user b/Examples/c2a_aobc_example.user similarity index 100% rename from Examples/C2A_ISSL6U_AOBC.vcxproj.user rename to Examples/c2a_aobc_example.user diff --git a/c2a_issl6u_aobc.filters b/c2a_aobc.filters similarity index 99% rename from c2a_issl6u_aobc.filters rename to c2a_aobc.filters index cb72b246..792ce5af 100644 --- a/c2a_issl6u_aobc.filters +++ b/c2a_aobc.filters @@ -15,7 +15,7 @@ - + Header Files @@ -457,6 +457,6 @@ - + \ No newline at end of file diff --git a/Examples/c2a_issl6u_aobc.ino b/c2a_aobc.ino similarity index 61% rename from Examples/c2a_issl6u_aobc.ino rename to c2a_aobc.ino index bc8b21d8..5ca938ab 100644 --- a/Examples/c2a_issl6u_aobc.ino +++ b/c2a_aobc.ino @@ -1,5 +1,5 @@ /* - Name: C2A_ISSL6U_AOBC.ino + Name: C2A_AOBC.ino */ extern "C" @@ -20,8 +20,8 @@ static void __USER_ISR C2A_timer1_handler_(void); // Arduino functions void setup() { - // TODO: ł̂ꏊ͗v - Serial.begin(115200); // Debug|[g + // TODO: �����ł����̂��ꏊ�͗v���� + Serial.begin(115200); // Debug�|�[�g C2A_init_(); @@ -42,28 +42,28 @@ static void C2A_main_(void) while (1) { C2A_core_main(); - // [U[`loop͂ɓ + // ���[�U�[��`loop�����͂����ɓ���� } return; } -// C2A֘Ȁ -// HW֘Ai^C}[C荞ݐݒȂǁĵݓƎɏ -// Printf WDT_clear_wdt(); Ă΂Ă邱ƂɒӁI +// C2A�֘A�̏����� +// HW�֘A�����i�^�C�}�[�C���荞�ݐݒ�Ȃǁj�̂ݓƎ��ɏ����� +// Printf������ WDT_clear_wdt(); ���Ă΂�Ă邱�Ƃɒ��ӁI static void C2A_init_(void) { TMGR_init(); // Time Manager - // AM_initialize_all_apps ł̎Ԍv̂߂ɂŏ + // AM_initialize_all_apps �ł̎��Ԍv���̂��߂ɂ����ŏ����� Printf("C2A_init: TMGR_init done.\n"); - // ^C}݊֘A + // �^�C�}�����݊֘A C2A_timer_setting_(); Printf("C2A_init: timer_setting_ done.\n"); C2A_core_init(); - TMGR_clear(); // TODO: user_ossƑčēxĂ邪C̎荞݂~߂ׂȂǗv + TMGR_clear(); // TODO: user_oss�Ƒ����čēx���������Ă��邪�C���̎����荞�݂��~�߂�ׂ����ȂǗv���� return; } @@ -75,7 +75,7 @@ static void C2A_timer_setting_(void) setIntPriority(_TIMER_1_VECTOR, _T1_IPL_IPC, _T1_SPL_IPC); setIntEnable(_TIMER_1_IRQ); TMR1 = 0; // clear timer - // ̒l1ms̃NbNAbvɂȂ肩A덷~ςŏɂȂ悤Ɏs蓮l + // ���̒l��1ms�̃N���b�N�A�b�v�ɂȂ肩�A�����덷�~�ς��ŏ��ɂȂ�悤�Ɏ������s���蓮���������l T1CON = TACON_PS_8; // set prescaler PR1 = (unsigned int)(10001); diff --git a/Examples/c2a_issl6u_aobc.user b/c2a_aobc.user similarity index 100% rename from Examples/c2a_issl6u_aobc.user rename to c2a_aobc.user From 418f900c7eb346778fee1614a3f908ad187ea799 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Tue, 23 May 2023 20:41:30 +0900 Subject: [PATCH 034/176] [fix] fix include directory in CMakeLists.txt --- Examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 713fe0c8..3b17d882 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -41,7 +41,7 @@ set(C2A_SRCS # ${C2A_USER_DIR}/C2A_main.c ) -include_directories(src) +include_directories(src_aobc/src) add_subdirectory(${C2A_CORE_DIR}) From ca876d784f005c29e62035e7e83a531af6f76bd4 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Thu, 25 May 2023 10:46:25 +0900 Subject: [PATCH 035/176] [fix] fix character code from SJIS to UTF-8 --- Examples/c2a_aobc_example.ino | 22 +++++++++++----------- c2a_aobc.ino | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Examples/c2a_aobc_example.ino b/Examples/c2a_aobc_example.ino index 6b9dd29b..2eb722fb 100644 --- a/Examples/c2a_aobc_example.ino +++ b/Examples/c2a_aobc_example.ino @@ -1,5 +1,5 @@ /* - Name: C2A_AOBC_EXAMPLE.ino + Name: c2a_aobc_example.ino */ extern "C" @@ -20,8 +20,8 @@ static void __USER_ISR C2A_timer1_handler_(void); // Arduino functions void setup() { - // TODO: �����ł����̂��ꏊ�͗v���� - Serial.begin(115200); // Debug�|�[�g + // TODO: ここでいいのか場所は要検討 + Serial.begin(115200); // Debugポート C2A_init_(); @@ -42,28 +42,28 @@ static void C2A_main_(void) while (1) { C2A_core_main(); - // ���[�U�[��`loop�����͂����ɓ���� + // ユーザー定義loop処理はここに入れる } return; } -// C2A�֘A�̏����� -// HW�֘A�����i�^�C�}�[�C���荞�ݐݒ�Ȃǁj�̂ݓƎ��ɏ����� -// Printf������ WDT_clear_wdt(); ���Ă΂�Ă邱�Ƃɒ��ӁI +// C2A関連の初期化 +// HW関連部分(タイマー,割り込み設定など)のみ独自に初期化 +// Printf内部で WDT_clear_wdt(); が呼ばれてることに注意! static void C2A_init_(void) { TMGR_init(); // Time Manager - // AM_initialize_all_apps �ł̎��Ԍv���̂��߂ɂ����ŏ����� + // AM_initialize_all_apps での時間計測のためにここで初期化 Printf("C2A_init: TMGR_init done.\n"); - // �^�C�}�����݊֘A + // タイマ割込み関連 C2A_timer_setting_(); Printf("C2A_init: timer_setting_ done.\n"); C2A_core_init(); - TMGR_clear(); // TODO: user_oss�Ƒ����čēx���������Ă��邪�C���̎����荞�݂��~�߂�ׂ����ȂǗv���� + TMGR_clear(); // TODO: user_ossと揃えて再度初期化しているが,この時割り込みを止めるべきかなど要検討 return; } @@ -75,7 +75,7 @@ static void C2A_timer_setting_(void) setIntPriority(_TIMER_1_VECTOR, _T1_IPL_IPC, _T1_SPL_IPC); setIntEnable(_TIMER_1_IRQ); TMR1 = 0; // clear timer - // ���̒l��1ms�̃N���b�N�A�b�v�ɂȂ肩�A�����덷�~�ς��ŏ��ɂȂ�悤�Ɏ������s���蓮���������l + // 次の値は1msのクロックアップになりかつ、時刻誤差蓄積が最小になるように実験を行う手動調整した値 T1CON = TACON_PS_8; // set prescaler PR1 = (unsigned int)(10001); diff --git a/c2a_aobc.ino b/c2a_aobc.ino index 5ca938ab..62961bf9 100644 --- a/c2a_aobc.ino +++ b/c2a_aobc.ino @@ -1,5 +1,5 @@ /* - Name: C2A_AOBC.ino + Name: c2a_aobc.ino */ extern "C" @@ -20,8 +20,8 @@ static void __USER_ISR C2A_timer1_handler_(void); // Arduino functions void setup() { - // TODO: �����ł����̂��ꏊ�͗v���� - Serial.begin(115200); // Debug�|�[�g + // TODO: ここでいいのか場所は要検討 + Serial.begin(115200); // Debugポート C2A_init_(); @@ -42,28 +42,28 @@ static void C2A_main_(void) while (1) { C2A_core_main(); - // ���[�U�[��`loop�����͂����ɓ���� + // ユーザー定義loop処理はここに入れる } return; } -// C2A�֘A�̏����� -// HW�֘A�����i�^�C�}�[�C���荞�ݐݒ�Ȃǁj�̂ݓƎ��ɏ����� -// Printf������ WDT_clear_wdt(); ���Ă΂�Ă邱�Ƃɒ��ӁI +// C2A関連の初期化 +// HW関連部分(タイマー,割り込み設定など)のみ独自に初期化 +// Printf内部で WDT_clear_wdt(); が呼ばれてることに注意! static void C2A_init_(void) { TMGR_init(); // Time Manager - // AM_initialize_all_apps �ł̎��Ԍv���̂��߂ɂ����ŏ����� + // AM_initialize_all_apps での時間計測のためにここで初期化 Printf("C2A_init: TMGR_init done.\n"); - // �^�C�}�����݊֘A + // タイマ割込み関連 C2A_timer_setting_(); Printf("C2A_init: timer_setting_ done.\n"); C2A_core_init(); - TMGR_clear(); // TODO: user_oss�Ƒ����čēx���������Ă��邪�C���̎����荞�݂��~�߂�ׂ����ȂǗv���� + TMGR_clear(); // TODO: user_ossと揃えて再度初期化しているが,この時割り込みを止めるべきかなど要検討 return; } @@ -75,7 +75,7 @@ static void C2A_timer_setting_(void) setIntPriority(_TIMER_1_VECTOR, _T1_IPL_IPC, _T1_SPL_IPC); setIntEnable(_TIMER_1_IRQ); TMR1 = 0; // clear timer - // ���̒l��1ms�̃N���b�N�A�b�v�ɂȂ肩�A�����덷�~�ς��ŏ��ɂȂ�悤�Ɏ������s���蓮���������l + // 次の値は1msのクロックアップになりかつ、時刻誤差蓄積が最小になるように実験を行う手動調整した値 T1CON = TACON_PS_8; // set prescaler PR1 = (unsigned int)(10001); From c0434b6a4802290df72aba4359687209e192cace Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Fri, 26 May 2023 15:29:29 +0900 Subject: [PATCH 036/176] [feature] modify README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7ce54e55..a977cd2f 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ $ git submodule update - clone後, windowsの場合は`RUN_AFTER_CLONE.bat`,macの場合は`RUN_AFTER_CLONE.command`を実行する. - これで,localのgit環境設定が行われる - 別ディレクトリなどに新しくcloneし直した場合も,実行し直す + - `Examples`フォルダへのコピーも行われる. # 開発環境構築手順 @@ -115,6 +116,9 @@ $ git submodule update - `git submodule update`を実施する - S2Eのcmakeキャッシュを削除する +# 本リポジトリに対するユーザーサイドリポジトリの設定について +- 衛星固有の設定ファイルなどを含んだユーザーリポジトリを作成する際は、`Examples` のフォルダ構成を参考にすること。 + ## Brief history of development - 21st Jan. 2021: Development start in a private repository at GitLab. - 03rd Mar. 2023: Move to a private repository at GotHub to prepare publish as OSS From c6da314ba7613ffe9360d5b64272c4ea59a52b18 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Fri, 26 May 2023 15:36:48 +0900 Subject: [PATCH 037/176] [fix] add src_aobc_example/.gitkeep --- Examples/src_aobc_example/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Examples/src_aobc_example/.gitkeep diff --git a/Examples/src_aobc_example/.gitkeep b/Examples/src_aobc_example/.gitkeep new file mode 100644 index 00000000..e69de29b From 3f53801675e32eabec70e02e7ca8b014c1c906b9 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Fri, 26 May 2023 17:36:04 +0900 Subject: [PATCH 038/176] fix the title in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 80c5aca5..1935c471 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# C2AAOBC +# C2A-AOBC - 姿勢制御を行うOBCであるAOBC用搭載S/Wのレポジトリです。 - 基本的には次のような構成で使うことを想定しています。 - 実機 From 877c69c6e76057d4f0016fd5b756520724545772 Mon Sep 17 00:00:00 2001 From: Sae Ogoshi Date: Tue, 30 May 2023 20:51:25 +0900 Subject: [PATCH 039/176] fix:add_OBCT_sec2cycle #32 --- src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c index 3a2c3337..f3c3816c 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c +++ b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c @@ -43,7 +43,7 @@ void BCL_load_rough_three_axis_rw_to_fine_three_axis(void) timing_sec += 35; // モード遷移完了 - BCL_tool_register_cmd(timing_sec, Cmd_CODE_MM_FINISH_TRANSITION); + BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON timing_sec += (5 * 60); From 72a036e36fa0fd17712ee589ad89bf3e98764ae2 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Fri, 26 May 2023 17:45:49 +0900 Subject: [PATCH 040/176] =?UTF-8?q?update=20core=20to=20v3.9.beta.7=20?= =?UTF-8?q?=E3=81=AE=E6=AC=A1=E3=81=AE=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_core b/src/src_core index 041feb6d..042cdfa1 160000 --- a/src/src_core +++ b/src/src_core @@ -1 +1 @@ -Subproject commit 041feb6d931ec46faa1dd622f9a0e5d08712dda0 +Subproject commit 042cdfa15b0056880398e857cdd5d5a430562fd1 From 38ff918c38f1c89e03b14794584ce2fe411f30d9 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Fri, 26 May 2023 18:54:59 +0900 Subject: [PATCH 041/176] replace to --- .../DriverInstances/di_mtq_seiren.c | 2 +- .../UserDefined/AOCS/AttitudeControl/bdot.h | 2 +- .../AOCS/AttitudeControl/sun_pointing.h | 2 +- .../AttitudeControl/three_axis_control_mtq.h | 2 +- .../AttitudeControl/three_axis_control_rw.h | 2 +- .../AOCS/AttitudeControl/unloading.h | 2 +- .../fine_three_axis_determination.h | 2 +- .../rough_three_axis_determination.h | 2 +- .../sun_vector_propagator.h | 2 +- .../ActuatorControllers/rw_controller.h | 2 +- .../SensorFilters/mpu9250_filter.h | 2 +- .../SensorFilters/nanossoc_d60_filter.h | 2 +- .../SensorFilters/oem7600_filter.h | 2 +- .../SensorFilters/rm3100_filter.h | 2 +- .../SensorFilters/rw0003_filter.h | 2 +- .../SensorFilters/stim210_filter.h | 2 +- .../SensorSelectors/gpsr_selector.h | 2 +- .../SensorSelectors/gyro_selector.h | 2 +- .../SensorSelectors/magnetometer_selector.h | 2 +- .../SensorSelectors/stt_selector.h | 2 +- .../SensorSelectors/sun_sensor_selector.h | 2 +- .../inertial_geomag_calculator.h | 2 +- .../InertialReference/time_space_calculator.c | 2 +- .../UserDefined/AOCS/aocs_manager.h | 2 +- .../UserDefined/AOCS/aocs_mode_manager.h | 2 +- .../Cdh/non_volatile_memory_manager.c | 3 +- .../Cdh/non_volatile_memory_parameter.c | 3 +- .../Cdh/non_volatile_memory_parameter.h | 2 +- .../Cdh/non_volatile_memory_partition.c | 3 +- .../Cdh/non_volatile_memory_partition.h | 2 +- .../UserDefined/Thermal/thermo_sensor.c | 2 +- src/src_user/IfWrapper/ADC.h | 2 +- src/src_user/IfWrapper/GPIO.h | 2 +- src/src_user/Library/Orbit/sgp4.h | 2 +- .../SignalProcess/polynomial_approximation.h | 2 +- .../Library/SignalProcess/spike_filter.h | 2 +- src/src_user/Library/SignalProcess/z_filter.h | 2 +- src/src_user/Library/c2a_math.h | 2 +- src/src_user/Library/crc8.h | 2 +- src/src_user/Library/geomagnetism.h | 2 +- src/src_user/Library/git_revision.h | 2 +- src/src_user/Library/matrix_definition.h | 2 +- src/src_user/Library/quaternion.h | 2 +- src/src_user/Library/stdint.h | 29 ------------------- src/src_user/Library/time_space.h | 2 +- .../Settings/TlmCmd/Ccsds/apid_define.h | 2 +- 46 files changed, 48 insertions(+), 74 deletions(-) delete mode 100644 src/src_user/Library/stdint.h diff --git a/src/src_user/Applications/DriverInstances/di_mtq_seiren.c b/src/src_user/Applications/DriverInstances/di_mtq_seiren.c index d556a152..324e9cd9 100644 --- a/src/src_user/Applications/DriverInstances/di_mtq_seiren.c +++ b/src/src_user/Applications/DriverInstances/di_mtq_seiren.c @@ -6,11 +6,11 @@ #include "di_mtq_seiren.h" +#include #include #include #include "../UserDefined/AOCS/aocs_manager.h" #include "../../Settings/port_config.h" -#include "../../Library/stdint.h" #include "../../Library/vector3.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h index 41742e54..52b2b328 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h @@ -5,11 +5,11 @@ #ifndef BDOT_H_ #define BDOT_H_ +#include #include #include #include #include "../../../../Library/physical_constants.h" -#include "../../../../Library/stdint.h" #include "../../AOCS/aocs_error.h" /** diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h index fd50bf78..83183859 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h @@ -5,12 +5,12 @@ #ifndef SUN_POINTING_H_ #define SUN_POINTING_H_ +#include #include #include #include "../../../../Library/physical_constants.h" #include "../../../../Library/ControlUtility/cross_product_control.h"; #include "../../../../Library/pid_control.h" -#include "../../../../Library/stdint.h" #include "../../../../Library/SignalProcess/z_filter.h" #include "../../AOCS/aocs_error.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h index 3b052594..79787e3a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h @@ -6,12 +6,12 @@ #ifndef THREE_AXIS_CONTROL_MTQ_H_ #define THREE_AXIS_CONTROL_MTQ_H_ +#include #include #include #include "../../../../Library/physical_constants.h" #include "../../../../Library/ControlUtility/cross_product_control.h"; #include "../../../../Library/pid_control.h" -#include "../../../../Library/stdint.h" #include "../../../../Library/SignalProcess/z_filter.h" #include "../../AOCS/aocs_error.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h index 70078517..ff497365 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h @@ -6,11 +6,11 @@ #ifndef THREE_AXIS_CONTROL_RW_H_ #define THREE_AXIS_CONTROL_RW_H_ +#include #include #include #include "../../../../Library/physical_constants.h" #include "../../../../Library/pid_control.h" -#include "../../../../Library/stdint.h" #include "../../AOCS/aocs_error.h" /** diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h index 37ccac6e..9645086a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h @@ -5,11 +5,11 @@ #ifndef UNLOADING_H_ #define UNLOADING_H_ +#include #include #include #include "../../../../Library/physical_constants.h" #include "../../../../Library/ControlUtility/cross_product_control.h" -#include "../../../../Library/stdint.h" #include "../aocs_manager.h" /** diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.h index 3fd7579d..80b33515 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.h @@ -7,9 +7,9 @@ #ifndef FINE_THREE_AXIS_DETERMINATION_H_ #define FINE_THREE_AXIS_DETERMINATION_H_ +#include #include #include -#include "../../../../Library/stdint.h" /** * @enum FINE_THREE_AXIS_DETERMINATION_METHOD diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.h index bc93086a..70f84930 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.h @@ -7,9 +7,9 @@ #ifndef ROUGH_THREE_AXIS_DETERMINATION_H_ #define ROUGH_THREE_AXIS_DETERMINATION_H_ +#include #include #include -#include "../../../../Library/stdint.h" /** * @enum ROUGH_THREE_AXIS_DETERMINATION_METHOD diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h index e8b7359e..1f260650 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h @@ -7,9 +7,9 @@ #ifndef SUN_VECTOR_PROPAGATOR_H_ #define SUN_VECTOR_PROPAGATOR_H_ +#include #include #include -#include "../../../../Library/stdint.h" #include "../../../../Library/quaternion.h" #include "../../../../Library/physical_constants.h" #include "../../AOCS/aocs_error.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h index 1a0d9ae5..4d9d54a0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h @@ -6,10 +6,10 @@ #ifndef RW_CONTROLLER_H_ #define RW_CONTROLLER_H_ +#include #include #include #include "../../aocs_manager.h" -#include "../../../../../Library/stdint.h" #include "../../../../DriverInstances/di_rw0003.h" AppInfo APP_RW_CONTROLLER_create_app(void); diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h index 8ecc7677..b51da4ad 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h @@ -5,9 +5,9 @@ #ifndef MPU9250_FILTER_H_ #define MPU9250_FILTER_H_ +#include #include #include -#include "../../../../../Library/stdint.h" #include "../../../../../Library/physical_constants.h" #include "../../../../../Library/SignalProcess/z_filter.h" #include "../../../../../Library/SignalProcess/spike_filter.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h index 3c85ffd5..454bd6a0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h @@ -5,9 +5,9 @@ #ifndef NANOSSOC_D60_FILTER_H_ #define NANOSSOC_D60_FILTER_H_ +#include #include #include -#include "../../../../../Library/stdint.h" #include "../../../../../Library/physical_constants.h" #include "../../../../../Library/SignalProcess/z_filter.h" #include "../../../../../Library/SignalProcess/spike_filter.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h index b4d13941..e1b0599d 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h @@ -5,9 +5,9 @@ #ifndef OEM7600_FILTER_H_ #define OEM7600_FILTER_H_ +#include #include #include -#include "../../../../../Library/stdint.h" #include "../../../../../Library/physical_constants.h" #include "../../../../../Library/SignalProcess/spike_filter.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h index 457ab7eb..e9f8d102 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h @@ -5,9 +5,9 @@ #ifndef RM3100_FILTER_H_ #define RM3100_FILTER_H_ +#include #include #include -#include "../../../../../Library/stdint.h" #include "../../../../../Library/physical_constants.h" #include "../../../../../Library/SignalProcess/z_filter.h" #include "../../../../../Library/SignalProcess/spike_filter.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h index 530f2e60..ab871463 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h @@ -5,10 +5,10 @@ #ifndef RW0003_FILTER_H_ #define RW0003_FILTER_H_ +#include #include #include #include "../../../../DriverInstances/di_rw0003.h" -#include "../../../../../Library/stdint.h" #include "../../../../../Library/physical_constants.h" #include "../../../../../Library/SignalProcess/spike_filter.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h index 8059cd43..ee9ffafd 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h @@ -5,9 +5,9 @@ #ifndef STIM210_FILTER_H_ #define STIM210_FILTER_H_ +#include #include #include -#include "../../../../../Library/stdint.h" #include "../../../../../Library/physical_constants.h" #include "../../../../../Library/SignalProcess/z_filter.h" #include "../../../../../Library/SignalProcess/spike_filter.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.h index 54bb9386..870b756f 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.h @@ -6,8 +6,8 @@ #ifndef GPSR_SELECTOR_H_ #define GPSR_SELECTOR_H_ +#include #include -#include "../../../../../Library/stdint.h" /** * @enum APP_GPSR_SELECTOR_STATE diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h index f89f2799..d3f3a6ee 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h @@ -5,9 +5,9 @@ #ifndef GYRO_SELECTOR_H_ #define GYRO_SELECTOR_H_ +#include #include #include -#include "../../../../../Library/stdint.h" /** * @enum APP_GYRO_SELECTOR_STATE diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h index 2fba4bb3..900b84d1 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h @@ -5,9 +5,9 @@ #ifndef MAGNETOMETER_SELECTOR_H_ #define MAGNETOMETER_SELECTOR_H_ +#include #include #include -#include "../../../../../Library/stdint.h" /** * @enum APP_MAG_SELECTOR_STATE diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.h index 0fc8f3d6..43d632e6 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.h @@ -6,8 +6,8 @@ #ifndef STT_SELECTOR_H_ #define STT_SELECTOR_H_ +#include #include -#include "../../../../../Library/stdint.h" /** * @enum APP_STT_SELECTOR_STATE diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.h index e64b75a8..81617f16 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.h @@ -5,9 +5,9 @@ #ifndef SUN_SENSOR_SELECTOR_H_ #define SUN_SENSOR_SELECTOR_H_ +#include #include #include -#include "../../../../../Library/stdint.h" typedef struct { diff --git a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.h b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.h index ceb8652f..9b8bf3d2 100644 --- a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.h +++ b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.h @@ -5,8 +5,8 @@ #ifndef INERTIAL_GEOMAG_CALCULATOR_H_ #define INERTIAL_GEOMAG_CALCULATOR_H_ +#include #include -#include "../../../../Library/stdint.h" /** * @struct InertialGeomagCalculator diff --git a/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c b/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c index f5f38534..f4a86fa7 100644 --- a/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c @@ -4,13 +4,13 @@ * @brief 各種慣性系リファレンス計算のうち,時刻と座標の変換を行う */ +#include #include "time_space_calculator.h" #include #include #include #include "../aocs_manager.h" #include "../../../../Library/time_space.h" -#include "../../../../Library/stdint.h" #include "../../../../Library/c2a_math.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h index e9e4203b..6e1c1401 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h @@ -5,11 +5,11 @@ #ifndef AOCS_MANAGER_H_ #define AOCS_MANAGER_H_ +#include #include #include #include "../../../Library/physical_constants.h" #include "../../../Library/quaternion.h" -#include "../../../Library/stdint.h" #include "../../DriverInstances/di_rw0003.h" #include "../../DriverInstances/di_mtq_seiren.h" diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.h b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.h index 9b2d3414..68f2da97 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.h +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.h @@ -6,9 +6,9 @@ #ifndef AOCS_MODE_MANAGER_H_ #define AOCS_MODE_MANAGER_H_ +#include #include #include -#include "../../../Library/stdint.h" /** * @struct AocsModeManager diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.c b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.c index 3f637b26..64f103f4 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.c +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.c @@ -3,8 +3,9 @@ * @file non_volatile_memory_manager.c * @brief 不揮発メモリ管理をするアプリ */ + +#include #include "non_volatile_memory_manager.h" -#include "../../../Library/stdint.h" #include #include diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c index 44a84b85..49d7e04b 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c @@ -3,11 +3,12 @@ * @file non_volatile_memory_parameter.h * @brief 不揮発メモリパラメータの定義 */ + +#include #include "non_volatile_memory_parameter.h" #include #include #include -#include "../../../Library/stdint.h" #include #include diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h index 5125690e..3e194942 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h @@ -5,10 +5,10 @@ #ifndef NON_VOLATILE_MEMORY_PARAMETER_H_ #define NON_VOLATILE_MEMORY_PARAMETER_H_ +#include #include "non_volatile_memory_partition.h" #include "../../../Settings/Applications/NvmParams/non_volatile_memory_normal_parameters.h" #include "../../../Settings/Applications/NvmParams/non_volatile_memory_redundant_parameters.h" -#include "../../../Library/stdint.h" /** * @enum APP_NVM_PARAM_TYPE diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.c b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.c index 8922744f..e908924d 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.c +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.c @@ -3,10 +3,11 @@ * @file non_volatile_memory_partition.c * @brief 不揮発メモリアクセス用のパーティションを定義する */ + +#include #include "non_volatile_memory_partition.h" #include #include -#include "../../../Library/stdint.h" #include static NonVolatileMemoryPartition non_volatile_memory_partition_; diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.h b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.h index f57fc531..c9069b58 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.h +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_partition.h @@ -5,8 +5,8 @@ #ifndef NON_VOLATILE_MEMORY_PARTITION_H_ #define NON_VOLATILE_MEMORY_PARTITION_H_ +#include #include "non_volatile_memory_manager.h" -#include "../../../Library/stdint.h" #include #include diff --git a/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c b/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c index b507368d..7cec95ae 100644 --- a/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c +++ b/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c @@ -5,9 +5,9 @@ */ #include "thermo_sensor.h" +#include #include "../../../IfWrapper/ADC.h" #include "../../../Settings/port_config.h" -#include "../../../Library/stdint.h" #include "../../../Library/physical_constants.h" diff --git a/src/src_user/IfWrapper/ADC.h b/src/src_user/IfWrapper/ADC.h index da702ab0..1387ed58 100644 --- a/src/src_user/IfWrapper/ADC.h +++ b/src/src_user/IfWrapper/ADC.h @@ -7,7 +7,7 @@ #ifndef ADC_H_ #define ADC_H_ -#include "../Library/stdint.h" +#include /** * @brief ADCの初期化 diff --git a/src/src_user/IfWrapper/GPIO.h b/src/src_user/IfWrapper/GPIO.h index 016e8c2f..7c727665 100644 --- a/src/src_user/IfWrapper/GPIO.h +++ b/src/src_user/IfWrapper/GPIO.h @@ -1,7 +1,7 @@ #ifndef GPIO_H_ #define GPIO_H_ -#include "../Library/stdint.h" +#include /** * @brief GPIOの方向を定義するためのenum diff --git a/src/src_user/Library/Orbit/sgp4.h b/src/src_user/Library/Orbit/sgp4.h index 0ae65b95..036da371 100644 --- a/src/src_user/Library/Orbit/sgp4.h +++ b/src/src_user/Library/Orbit/sgp4.h @@ -7,7 +7,7 @@ #ifndef SGP4_H_ #define SGP4_H_ -#include "../stdint.h" +#include #include "../physical_constants.h" #include "../c2a_math.h" diff --git a/src/src_user/Library/SignalProcess/polynomial_approximation.h b/src/src_user/Library/SignalProcess/polynomial_approximation.h index e4656885..0330d1d7 100644 --- a/src/src_user/Library/SignalProcess/polynomial_approximation.h +++ b/src/src_user/Library/SignalProcess/polynomial_approximation.h @@ -6,7 +6,7 @@ #ifndef POLYNOMIAL_APPROXIMATION_H_ #define POLYNOMIAL_APPROXIMATION_H_ -#include "../stdint.h" +#include #define POLYNOMIAL_APPROX_MAX_COEFF_NUM (10) //!< 係数数最大数 diff --git a/src/src_user/Library/SignalProcess/spike_filter.h b/src/src_user/Library/SignalProcess/spike_filter.h index 705f9f72..9106b0c8 100644 --- a/src/src_user/Library/SignalProcess/spike_filter.h +++ b/src/src_user/Library/SignalProcess/spike_filter.h @@ -6,7 +6,7 @@ #ifndef SPIKE_FILTER_H_ #define SPIKE_FILTER_H_ -#include "../stdint.h" +#include #include "../c2a_math.h" #include "../physical_constants.h" diff --git a/src/src_user/Library/SignalProcess/z_filter.h b/src/src_user/Library/SignalProcess/z_filter.h index 62370b5f..b7152c3b 100644 --- a/src/src_user/Library/SignalProcess/z_filter.h +++ b/src/src_user/Library/SignalProcess/z_filter.h @@ -6,7 +6,7 @@ #ifndef Z_FILTER_H_ #define Z_FILTER_H_ -#include "../stdint.h" +#include #include "../c2a_math.h" diff --git a/src/src_user/Library/c2a_math.h b/src/src_user/Library/c2a_math.h index 2e675700..e27d0125 100644 --- a/src/src_user/Library/c2a_math.h +++ b/src/src_user/Library/c2a_math.h @@ -7,7 +7,7 @@ #ifndef C2A_MATH_H_ #define C2A_MATH_H_ -#include "stdint.h" +#include /** * @enum C2A_MATH_ERROR diff --git a/src/src_user/Library/crc8.h b/src/src_user/Library/crc8.h index 03609c74..acf623d5 100644 --- a/src/src_user/Library/crc8.h +++ b/src/src_user/Library/crc8.h @@ -8,7 +8,7 @@ #include // for size_t #include -#include "stdint.h" +#include /** * @brief CRC-8-ATM diff --git a/src/src_user/Library/geomagnetism.h b/src/src_user/Library/geomagnetism.h index 19b333f7..3e3ee130 100644 --- a/src/src_user/Library/geomagnetism.h +++ b/src/src_user/Library/geomagnetism.h @@ -8,7 +8,7 @@ #ifndef GEOMAGNETISM_H_ #define GEOMAGNETISM_H_ -#include "stdint.h" +#include #include "physical_constants.h" #include "c2a_math.h" diff --git a/src/src_user/Library/git_revision.h b/src/src_user/Library/git_revision.h index 39b51f13..4c07128c 100644 --- a/src/src_user/Library/git_revision.h +++ b/src/src_user/Library/git_revision.h @@ -8,7 +8,7 @@ #ifndef GIT_REVISION_H_ #define GIT_REVISION_H_ -#include "stdint.h" +#include extern const char GIT_REV_CORE[41]; extern const uint32_t GIT_REV_CORE_SHORT; diff --git a/src/src_user/Library/matrix_definition.h b/src/src_user/Library/matrix_definition.h index 3bbc7deb..be5b5e60 100644 --- a/src/src_user/Library/matrix_definition.h +++ b/src/src_user/Library/matrix_definition.h @@ -6,7 +6,7 @@ #ifndef MATRIX_DEFINITION_H_ #define MATRIX_DEFINITION_H_ -#include "stdint.h" +#include #include /** diff --git a/src/src_user/Library/quaternion.h b/src/src_user/Library/quaternion.h index c4d2bd05..ce669efa 100644 --- a/src/src_user/Library/quaternion.h +++ b/src/src_user/Library/quaternion.h @@ -8,7 +8,7 @@ #ifndef QUATERNION_H_ #define QUATERNION_H_ -#include "stdint.h" +#include #include "physical_constants.h" #include "c2a_math.h" #include "euler_angle.h" diff --git a/src/src_user/Library/stdint.h b/src/src_user/Library/stdint.h deleted file mode 100644 index 8e233203..00000000 --- a/src/src_user/Library/stdint.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef STDINT_H_ -#define STDINT_H_ - -#include "../Settings/sils_define.h" - -// 明星ヘッダーとの重複typedefをガード -#ifndef _TYPEDEFINE_H_ - -#ifndef SILS_FW -// HEWに標準ヘッダstdint.hに相当するヘッダがなかったため、必要機能を自前で定義。 -// bit幅指定の整数型をひとまず定義 - -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed long int32_t; -typedef signed long long int int64_t; - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -typedef unsigned long long int uint64_t; - -#else -#include -#endif // SILS_FW - - -#endif // _TYPEDEFINE_H_ -#endif // STDINT_H_ diff --git a/src/src_user/Library/time_space.h b/src/src_user/Library/time_space.h index ccd3b6a7..089fb407 100644 --- a/src/src_user/Library/time_space.h +++ b/src/src_user/Library/time_space.h @@ -7,7 +7,7 @@ #ifndef TIME_SPACE_H_ #define TIME_SPACE_H_ -#include "stdint.h" +#include #include "physical_constants.h" #include "c2a_math.h" diff --git a/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h b/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h index 628e950a..66acbb12 100644 --- a/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h +++ b/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h @@ -6,7 +6,7 @@ #ifndef APID_DEFINE_H_ #define APID_DEFINE_H_ -#include "../../../Library/stdint.h" +#include /** * @enum APID From 789ad15598df733cbdeadeea9f812d05accf2ff9 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Fri, 26 May 2023 19:01:12 +0900 Subject: [PATCH 042/176] rename DR_PARTITION to DEST_INFO --- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv | 2 +- .../TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv | 2 +- .../TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv | 2 +- .../TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv | 2 +- .../TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv | 2 +- .../TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv | 2 +- .../DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv | 2 +- .../TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv | 2 +- .../ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv | 2 +- .../ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv | 2 +- .../ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv | 2 +- .../TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv | 2 +- .../calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv | 2 +- .../DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv | 2 +- 98 files changed, 98 insertions(+), 98 deletions(-) diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv index 0e3d124c..1e243040 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(app_manager->page_no),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP0_INITIALIZER,uint32_t,(uint32_t)(app_manager->ais[(AM_TLM_PAGE_SIZE*app_manager->page_no)+0].initializer),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP0_ENTRYPOINT,uint32_t,(uint32_t)(app_manager->ais[(AM_TLM_PAGE_SIZE*app_manager->page_no)+0].entry_point),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv index 4aa33db0..38af7c50 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TEMPERATURE.THRESHOLD.PIC_UPPER_DEGC,float,(float)temperature_anomaly->threshold_list[APP_TEMPERATURE_ANOMALY_IDX_PIC].upper_degC,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,PIC温度上限, ,TEMPERATURE.THRESHOLD.PIC_LOWER_DEGC,float,(float)temperature_anomaly->threshold_list[APP_TEMPERATURE_ANOMALY_IDX_PIC].lower_degC,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,PIC温度下限, ,TEMPERATURE.THRESHOLD.RW_DCDC_UPPER_DEGC,float,(float)temperature_anomaly->threshold_list[APP_TEMPERATURE_ANOMALY_IDX_RW_DCDC].upper_degC,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,RW_DCDC温度上限, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv index 7fe50145..46e6784b 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,MASS_kg,float,(float)(aocs_manager->mass_sc_kg),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,衛星質量 [kg], ,SC_RMM_BODY.X_Am2,float,(float)(aocs_manager->rmm_sc_body_Am2[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,機体固定X軸衛星残留磁気モーメント [Am2], ,SC_RMM_BODY.Y_Am2,float,(float)(aocs_manager->rmm_sc_body_Am2[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,機体固定Y軸衛星残留磁気モーメント [Am2], diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv index 155f36c1..c5e9b98a 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP0.INIT_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].init_duration),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP0.PREV_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].prev),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP0.MIN_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].min),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv index 419bc3c5..ffe8b24d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP50.INIT_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[50].init_duration),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP50.PREV_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[50].prev),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,APP50.MIN_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[50].min),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv index 2c5a6640..6c0aa016 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,STT_GYRO_EKF.GYRO_RANDOM_NOISE_COMPO_STANDARD_DEVIATION_RAD_S.X,float,(float)(stt_gyro_ekf->gyro_random_noise.standard_deviation_compo_rad_s[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,ジャイロランダムノイズ標準偏差, ,STT_GYRO_EKF.GYRO_RANDOM_NOISE_COMPO_STANDARD_DEVIATION_RAD_S.Y,float,(float)(stt_gyro_ekf->gyro_random_noise.standard_deviation_compo_rad_s[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,ジャイロランダムノイズ標準偏差, ,STT_GYRO_EKF.GYRO_RANDOM_NOISE_COMPO_STANDARD_DEVIATION_RAD_S.Z,float,(float)(stt_gyro_ekf->gyro_random_noise.standard_deviation_compo_rad_s[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,ジャイロランダムノイズ標準偏差, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv index 310386b3..caddf87e 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,STT_GYRO_EKF.COVARIANCE.0_0,float,(float)(stt_gyro_ekf->estimated_result.covariance_matrix.data[0][0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,STT_GYRO_EKF.COVARIANCE.0_1,float,(float)(stt_gyro_ekf->estimated_result.covariance_matrix.data[0][1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,STT_GYRO_EKF.COVARIANCE.0_2,float,(float)(stt_gyro_ekf->estimated_result.covariance_matrix.data[0][2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv index 1f9efd8b..889eeb90 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,MPU9250_ANG_VEL_BIAS_COMP_X_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_bias_compo_rad_s[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,MPU9250角速度バイアス誤差コンポ座標X軸, ,MPU9250_ANG_VEL_BIAS_COMP_Y_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_bias_compo_rad_s[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,MPU9250角速度バイアス誤差コンポ座標Y軸, ,MPU9250_ANG_VEL_BIAS_COMP_Z_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_bias_compo_rad_s[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,MPU9250角速度バイアス誤差コンポ座標Z軸, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv index 94680a3b..2e59c873 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,BLOCK_NO,uint16_t,block_command_table->pos.block,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,テレメトリを生成したブロック番号, ,CMD_POS,uint8_t,block_command_table->pos.cmd,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,BLOCK_LENGTH,uint8_t,BCT_get_bc_length(block_command_table->pos.block),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv index 9c374af3..ae9e20b1 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(command_analyze->tlm_page_no),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CMD0.FUNC,uint32_t,(uint32_t)(command_analyze->cmd_table[CA_TLM_PAGE_SIZE*(command_analyze->tlm_page_no)+0].cmd_func),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, ,CMD0.PARAM0_SIZE,uint8_t,(uint8_t)(((command_analyze->cmd_table[CA_TLM_PAGE_SIZE*(command_analyze->tlm_page_no)+0].param_size_infos[0].packed_info.bit.first & 0x0f) << 4) | (command_analyze->cmd_table[CA_TLM_PAGE_SIZE*(command_analyze->tlm_page_no)+0].param_size_infos[0].packed_info.bit.second & 0x0f)),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),4,STATUS,,,,,,,0=NONE@@1=1BYTE@@2=2BYTE@@3=4BYTE@@4=8BYTE@@15=RAW@@*=N/A,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv index 335673ae..a35ba3ff 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,MPU9250.ACCEL_COMPO_M_S2_X,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.accel_compo_m_s2[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載MPU9250での加速度測定値(コンポ座標X), ,MPU9250.ACCEL_COMPO_M_S2_Y,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.accel_compo_m_s2[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載MPU9250での加速度測定値(コンポ座標Y), ,MPU9250.ACCEL_COMPO_M_S2_Z,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.accel_compo_m_s2[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載MPU9250での加速度測定値(コンポ座標Z), diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv index 2dd3325d..1262f1c7 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,BDOT_GAIN_X,float,(float)(bdot->control_gain[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,body座標系x軸に関するBdot則制御ゲイン, ,BDOT_GAIN_Y,float,(float)(bdot->control_gain[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,body座標系y軸に関するBdot則制御ゲイン, ,BDOT_GAIN_Z,float,(float)(bdot->control_gain[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,body座標系z軸に関するBdot則制御ゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv index 60b24542..e9ef7a16 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,EXEC_LOG_ORDER0,uint8_t,divided_cmd_utility->exec_log_order[0],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,EXEC_LOG_ORDER1,uint8_t,divided_cmd_utility->exec_log_order[1],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,EXEC_LOG_ORDER2,uint8_t,divided_cmd_utility->exec_log_order[2],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv index c073f3ef..02ed0eda 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.SPEED_rad/s.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.speed_rad_s),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.SPEED_rad/s.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.speed_rad_s),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW.SPEED_rad/s.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.speed_rad_s),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv index 00667bd2..623d39da 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,COUNTER,uint32_t,(uint32_t)(aocs_data_recorder->read_tlm_algorithm.counter),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RECODED_TIME.OBCT_TOTAL_CYCLE,uint32_t,(uint32_t)(aocs_data_recorder->read_tlm_algorithm.obct_total_cycle_recorded),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RECODED_TIME.REFERENCE_jday,double,(double)(aocs_data_recorder->read_tlm_algorithm.reference_jday),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv index f58a0b66..e8688228 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,EVENT_UTIL.IS_ENABLED_EH_EXECUTION,uint8_t,event_utility->is_enabled_eh_execution,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=DISABLE@@ 1=ENABLE@@ *=N/A,, ,EL_EVENT_COUNTER.COUNTER_TOTAL,uint32_t,event_handler->el_event_counter.counter_total,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,EL_EVENT_COUNTER.COUNTERS.EL_ERROR_LEVEL_HIGH,uint32_t,event_handler->el_event_counter.counters[EL_ERROR_LEVEL_HIGH],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv index fc98d4f7..32bf6573 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM_INFO.RULE_SORTED_INDEX.PAGE_NO,uint8_t,event_handler->tlm_info.rule_sorted_index.page_no,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,IDX0.GROUP,uint8_t,(uint8_t)event_handler->sorted_idxes[0 + offset].group,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,IDX0.LOCAL,uint32_t,event_handler->sorted_idxes[0 + offset].local,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv index b36c65d6..df2afef1 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM_INFO.LOG.PAGE_NO,uint8_t,event_handler->tlm_info.log.page_no,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_TABLE.LOG_WP,uint16_t,event_handler->log_table.log_wp,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv index 096de3a1..f2ae273a 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM_INFO.RULE.PAGE_NO,uint8_t,event_handler->tlm_info.rule.page_no,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RULE_TABLE.REGISTERED_RULE_NUM,uint16_t,event_handler->rule_table.registered_rule_num,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RULE0.SETTINGS.EVENT.GROUP,uint8_t,(uint8_t)rules[0 + offset].settings.event.group,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv index c592f7a1..72a8ee17 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,STATISTICS.RECORD_COUNTERS_HIGH,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, *,STATISTICS.RECORD_COUNTERS_MIDDLE,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv index cb52bb0c..4157cbae 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM_INFO.CLOG.PAGE_NO,uint8_t,event_logger->tlm_info.clog.page_no,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM_INFO.CLOG.ERR_LEVEL,uint8_t,(uint8_t)err_level,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=HIGH@@1=LOW@@ 2=EL@@ 3=EH@@ *=N/A,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv index dc2d33a5..fdee76a9 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM_INFO.TLOG.PAGE_NO,uint8_t,event_logger->tlm_info.tlog.page_no,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM_INFO.TLOG.ERR_LEVEL,uint8_t,(uint8_t)((err_level << 4 & 0xf0) | (event_logger->tlogs[err_level].is_enable_overwrite << 3 & 0x08) | ( event_logger->tlogs[err_level].is_table_overflow << 2 & 0x04)),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),4,STATUS,,,,,,,0=HIGH@@1=LOW@@ 2=EL@@ 3=EH@@ *=N/A,, ,TLOGS.IS_ENABLE_OVERWRITE,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv index b1cc78cd..6fa5591f 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RW0003.SPIKE_CONFIG_X_CNT_LMT_ACCEPT,uint8_t,(uint8_t)(rw0003_filter->spike_filter_config[0].count_limit_to_accept),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,RW0003_Xスパイク値を真値として受け入れるまでのカウント数, ,RW0003.SPIKE_CONFIG_X_CNT_LMT_REJECT,uint8_t,(uint8_t)(rw0003_filter->spike_filter_config[0].count_limit_to_reject_continued_warning),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,RW0003_X連続して入力値を除外した回数のカウント上限値, ,RW0003.SPIKE_CONFIG_X_REJECT_THRESHOLD,float,(float)(rw0003_filter->spike_filter_config[0].reject_threshold),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,RW0003_Xスパイク値判定に用いる閾値, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv index 76577e59..dfc50ec7 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,MPU9250.MAG_SPIKE_CONFIG_X_CNT_LMT_ACCEPT,uint8_t,(uint8_t)(mpu9250_filter->spike_filter_config_mag[0].count_limit_to_accept),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,MPU9250.MAG_SPIKE_CONFIG_X_CNT_LMT_REJECT,uint8_t,(uint8_t)(mpu9250_filter->spike_filter_config_mag[0].count_limit_to_reject_continued_warning),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,MPU9250.MAG_SPIKE_CONFIG_X_REJECT_THRESHOLD,float,(float)(mpu9250_filter->spike_filter_config_mag[0].reject_threshold),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv index 79a77944..04da6d3b 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RM3100_AOBC_QUATERNION_C2B_VECTOR_0,float,(float)(rm3100_driver[RM3100_IDX_ON_AOBC]->info.frame_transform_c2b.vector_part[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載RM3100座標変換Quaternion_c2bのベクトル部第0成分, ,RM3100_AOBC_QUATERNION_C2B_VECTOR_1,float,(float)(rm3100_driver[RM3100_IDX_ON_AOBC]->info.frame_transform_c2b.vector_part[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載RM3100座標変換Quaternion_c2bのベクトル部第1成分, ,RM3100_AOBC_QUATERNION_C2B_VECTOR_2,float,(float)(rm3100_driver[RM3100_IDX_ON_AOBC]->info.frame_transform_c2b.vector_part[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載RM3100座標変換Quaternion_c2bのベクトル部第2成分, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv index 15618f52..4e219a9e 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CORE0,uint8_t,(uint8_t)GIT_REV_CORE[0],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CORE1,uint8_t,(uint8_t)GIT_REV_CORE[1],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CORE2,uint8_t,(uint8_t)GIT_REV_CORE[2],PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv index b1832bcf..1e49ccfc 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,OEM7600.RANGE0.prn_slot,uint16_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[0].prn_slot),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,PIC温度上限, ,OEM7600.RANGE0.is_updated,uint8_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[0].is_updated),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,PIC温度下限, ,OEM7600.RANGE0.pseudo_range_m,double,(double)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[0].pseudo_range_m),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,RW_DCDC温度上限, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv index 4566ed13..a940ce7d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,OEM7600.RANGE7.prn_slot,uint16_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[7].prn_slot),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,PIC温度上限, ,OEM7600.RANGE7.is_updated,uint8_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[7].is_updated),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,PIC温度下限, ,OEM7600.RANGE7.pseudo_range_m,double,(double)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[7].pseudo_range_m),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,RW_DCDC温度上限, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv index ad74ff9f..8441f435 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,ANG_VEL.EST_B_X_rad/s,float,(float)(aocs_manager->ang_vel_est_body_rad_s[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,推定角加速度 機体座標X [rad/s], ,ANG_VEL.EST_B_Y_rad/s,float,(float)(aocs_manager->ang_vel_est_body_rad_s[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,推定角加速度 機体座標Y [rad/s], ,ANG_VEL.EST_B_Z_rad/s,float,(float)(aocs_manager->ang_vel_est_body_rad_s[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,推定角加速度 機体座標Z [rad/s], diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv index a3057a70..946954b4 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,ROUGH.GYRO_ANG_VEL_BODY_X_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_body_rad_s[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載MPU9250での角速度測定値(コンポ座標X), ,ROUGH.GYRO_ANG_VEL_BODY_Y_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_body_rad_s[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載MPU9250での角速度測定値(コンポ座標Y), ,ROUGH.GYRO_ANG_VEL_BODY_Z_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_body_rad_s[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,AOBC搭載MPU9250での角速度測定値(コンポ座標Z), diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv index d70da925..99084a6c 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,OBC.TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_cycle),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,OBC.MM.OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=Bdot@@3=RoughSunPointing@@4=RoughThreeAxisMtq@@5=RoughThreeAxisRw@@6=FineThreeAxis@@7=Reserved@@8=MAX@@*=N/A,, ,OBC.MM.STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS:G@@*=N/A,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv index 7f2c09d2..68614fd4 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CURRENT_MODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,PREVIOSU_MODE,uint8_t,(uint8_t)(mode_manager->previous_id),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TRANSITION_STATUS,uint8_t,(uint8_t)(mode_manager->stat),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv index 7c0ed856..97ab47a2 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,ERROR_STATUS,uint8_t,(uint8_t)(non_volatile_memory_manager->error_status),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=OK@@ 1=NG_ADDRESS@@ 2=NG_LENGTH@@ 3=NG_READ@@ 4=NG_WRITE@@ 5=NG_OTHERS,不揮発メモリエラーステータス, ,WRITE.START_ADDRESS,uint32_t,(uint32_t)(non_volatile_memory_manager->write_info.start_address),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,不揮発メモリ書き込み先頭アドレス, ,WRITE.DATA_SIZE,uint8_t,(uint8_t)(non_volatile_memory_manager->write_info.data_size_byte),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,不揮発メモリ書き込みサイズ, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv index 350ac824..6ef75f66 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_cycle),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,モード遷移後経過時刻, ,MM_STS,uint8_t,(uint8_t)(mode_manager->stat),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,モード遷移実行状態, ,MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,現状モード番号, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv index 87d73b67..bbc506e6 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,METHOD,uint8_t,(uint8_t)(orbit_calculator->method),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=KEPLER@@ 1=SGP4@@ 2=KEPLER_GPSR@@ 3=EKF,軌道伝搬手法, ,KEPLER.SEMI_MAJOR_AXIS_km,float,(float)(kepler_orbit_propagator->orbital_elements.semi_major_axis_km),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,Kepler伝搬で使われている軌道長半径, ,KEPLER.ECCENTRICITY,float,(float)(kepler_orbit_propagator->orbital_elements.eccentricity),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,Kepler伝搬で使われている離心率, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv index bb93abd2..59ec2532 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,METHOD,uint8_t,(uint8_t)(orbit_calculator->method),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=KEPLER@@ 1=SGP4@@ 2=KEPLER_GPSR@@ 3=EKF,軌道伝搬手法, ,KEPLER_GPSR.GPSR_UPDATE,uint8_t,(uint8_t)(orbit_calculator->gpsr_update),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=DISABLE@@ 1=ENABLE,Kepler伝播にGPSRテレメを用いるフラッグ, ,KEPLER_GPSR.SEMI_MAJOR_AXIS_km,float,(float)(gpsr_orbit_propagator->orbital_elements.semi_major_axis_km),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,GPSRテレメを用いたKepler伝搬で使われている軌道長半径, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv index 60c1d743..ea57f508 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,POW_INA260_SWITCH_STATE,uint8_t,(uint8_t)(power_switch_control->switch_state_5v[APP_PSC_5V_IDX_INA260]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=OFF@@ 1=ON,INA260の電源状態, ,POW_MPU9250_SWITCH_STATE,uint8_t,(uint8_t)(power_switch_control->switch_state_5v[APP_PSC_5V_IDX_MPU9250]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=OFF@@ 1=ON,MPU9250の電源状態, ,POW_RM3100_SWITCH_STATE,uint8_t,(uint8_t)(power_switch_control->switch_state_5v[APP_PSC_5V_IDX_RM3100]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=OFF@@ 1=ON,RM3100の電源状態の電源状態, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv index 47ff52c4..d7d41d78 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL1,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.log_level[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL2,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.log_level[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL3,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.log_level[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv index 62b90ac5..d1621649 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LISA.MODE,uint32_t,(uint32_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.lisa.mode),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LISA.PREFILTER_DISTANCE_THRESHOLD_mm,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.lisa.prefilter_distance_threshold_mm),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LISA.PREFILTER_ANGLE_THRESHOLD_rad,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.lisa.prefilter_angle_threshold_rad),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv index 64faaa51..8a6a612a 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL1,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.log_level[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL2,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.log_level[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL3,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.log_level[2]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv index e1afce3a..18272fd9 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LISA.MODE,uint32_t,(uint32_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.lisa.mode),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LISA.PREFILTER_DISTANCE_THRESHOLD_mm,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.lisa.prefilter_distance_threshold_mm),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LISA.PREFILTER_ANGLE_THRESHOLD_rad,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.lisa.prefilter_angle_threshold_rad),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv index a238ab53..bcd814cf 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,PID_OMEGA.BODY_X_P_GAIN,float,(float)(sun_pointing->pid_omega[0].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定X軸_Pゲイン, ,PID_OMEGA.BODY_Y_P_GAIN,float,(float)(sun_pointing->pid_omega[1].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定Y軸_Pゲイン, ,PID_OMEGA.BODY_Z_P_GAIN,float,(float)(sun_pointing->pid_omega[2].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定Z軸_Pゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv index 86674765..e3735a37 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TARGET0_TI,uint32_t,(uint32_t)(quaternion_interpolator->target_list[0].attitude_changed_ti),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,姿勢変更完了予定時刻, ,TARGET0_X,float,(float)(quaternion_interpolator->target_list[0].quaternion_target_i2t.vector_part[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,目標Quaternion I2T X, ,TARGET0_Y,float,(float)(quaternion_interpolator->target_list[0].quaternion_target_i2t.vector_part[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,目標Quaternion I2T Y, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv index f51e4259..11c596ae 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TARGET10_TI,uint32_t,(uint32_t)(quaternion_interpolator->target_list[10].attitude_changed_ti),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,姿勢変更完了予定時刻, ,TARGET10_X,float,(float)(quaternion_interpolator->target_list[10].quaternion_target_i2t.vector_part[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,目標Quaternion I2T X, ,TARGET10_Y,float,(float)(quaternion_interpolator->target_list[10].quaternion_target_i2t.vector_part[1]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,目標Quaternion I2T Y, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv index 62fa1f3c..051d3002 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,MPU_GYRO_X_BIAS_RANGE_LOW,float,(float)(di_mpu9250[MPU9250_IDX_ON_AOBC]->gyro_bias_compo_rad_s[0].range_low_),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,MPUジャイロバイアスX軸温度補正範囲下限, ,MPU_GYRO_X_BIAS_RANGE_HIGH,float,(float)(di_mpu9250[MPU9250_IDX_ON_AOBC]->gyro_bias_compo_rad_s[0].range_high_),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,MPUジャイロバイアスX軸温度補正範囲上限, ,MPU_GYRO_X_BIAS_COEFF_0,float,(float)(di_mpu9250[MPU9250_IDX_ON_AOBC]->gyro_bias_compo_rad_s[0].coefficients_[0]),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,MPUジャイロバイアスX軸温度補正係数0次, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv index b8eecc7b..2760b33c 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,PAGE_NO,uint8_t,page,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM0,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+0].tlm_func),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,TLM1,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+1].tlm_func),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv index 82552219..97e5e6b5 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,PID_OMEGA.BODY_X_P_GAIN,float,(float)(three_axis_control_mtq->pid_omega[0].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定X軸_Pゲイン, ,PID_OMEGA.BODY_Y_P_GAIN,float,(float)(three_axis_control_mtq->pid_omega[1].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定Y軸_Pゲイン, ,PID_OMEGA.BODY_Z_P_GAIN,float,(float)(three_axis_control_mtq->pid_omega[2].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定Z軸_Pゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv index be0318d7..7e193bba 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,PID_OMEGA.BODY_X_P_GAIN,float,(float)(three_axis_control_rw->pid_omega[0].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定X軸_Pゲイン, ,PID_OMEGA.BODY_Y_P_GAIN,float,(float)(three_axis_control_rw->pid_omega[1].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定Y軸_Pゲイン, ,PID_OMEGA.BODY_Z_P_GAIN,float,(float)(three_axis_control_rw->pid_omega[2].gains.p_gain),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,角速度制御_機体固定Z軸_Pゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv index eba70853..6c215d0a 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,LINE_NO,uint8_t,TLCD_update_tl_list_for_tlm(timeline_command_dispatcher->tlm_info_.id),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,テレメトリを生成したライン番号, ,PAGE_NO,uint8_t,timeline_command_dispatcher->tlm_info_.page_no,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UPDATED_AT,uint32_t,timeline_command_dispatcher->tlm_info_.updated_at,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv index a05b88bb..bc9d408e 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(app_manager->page_no),PACKET,26,0,8,NONE,,,,,,,,, ,APP0_INITIALIZER,uint32_t,(uint32_t)(app_manager->ais[(AM_TLM_PAGE_SIZE*app_manager->page_no)+0].initializer),PACKET,27,0,32,NONE,,,,,,,,, ,APP0_ENTRYPOINT,uint32_t,(uint32_t)(app_manager->ais[(AM_TLM_PAGE_SIZE*app_manager->page_no)+0].entry_point),PACKET,31,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv index 4c394ec1..c263f99f 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ANOMALY.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TEMPERATURE.THRESHOLD.PIC_UPPER_DEGC,float,(float)temperature_anomaly->threshold_list[APP_TEMPERATURE_ANOMALY_IDX_PIC].upper_degC,PACKET,26,0,32,NONE,,,,,,,,PIC温度上限, ,TEMPERATURE.THRESHOLD.PIC_LOWER_DEGC,float,(float)temperature_anomaly->threshold_list[APP_TEMPERATURE_ANOMALY_IDX_PIC].lower_degC,PACKET,30,0,32,NONE,,,,,,,,PIC温度下限, ,TEMPERATURE.THRESHOLD.RW_DCDC_UPPER_DEGC,float,(float)temperature_anomaly->threshold_list[APP_TEMPERATURE_ANOMALY_IDX_RW_DCDC].upper_degC,PACKET,34,0,32,NONE,,,,,,,,RW_DCDC温度上限, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv index 4c023f37..b25e3e6d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_AOCS_MANAGER.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,MASS_kg,float,(float)(aocs_manager->mass_sc_kg),PACKET,26,0,32,NONE,,,,,,,,衛星質量 [kg], ,SC_RMM_BODY.X_Am2,float,(float)(aocs_manager->rmm_sc_body_Am2[0]),PACKET,30,0,32,NONE,,,,,,,,機体固定X軸衛星残留磁気モーメント [Am2], ,SC_RMM_BODY.Y_Am2,float,(float)(aocs_manager->rmm_sc_body_Am2[1]),PACKET,34,0,32,NONE,,,,,,,,機体固定Y軸衛星残留磁気モーメント [Am2], diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv index 7fd857b7..a800ec12 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,APP0.INIT_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].init_duration),PACKET,26,0,8,NONE,,,,,,,,, ,APP0.PREV_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].prev),PACKET,27,0,8,NONE,,,,,,,,, ,APP0.MIN_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].min),PACKET,28,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv index 36d42869..e7e20719 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_APP_TIME_2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,APP50.INIT_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[50].init_duration),PACKET,26,0,8,NONE,,,,,,,,, ,APP50.PREV_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[50].prev),PACKET,27,0,8,NONE,,,,,,,,, ,APP50.MIN_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[50].min),PACKET,28,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv index d1e135cc..0866231d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,STT_GYRO_EKF.GYRO_RANDOM_NOISE_COMPO_STANDARD_DEVIATION_RAD_S.X,float,(float)(stt_gyro_ekf->gyro_random_noise.standard_deviation_compo_rad_s[0]),PACKET,26,0,32,NONE,,,,,,,,ジャイロランダムノイズ標準偏差, ,STT_GYRO_EKF.GYRO_RANDOM_NOISE_COMPO_STANDARD_DEVIATION_RAD_S.Y,float,(float)(stt_gyro_ekf->gyro_random_noise.standard_deviation_compo_rad_s[1]),PACKET,30,0,32,NONE,,,,,,,,ジャイロランダムノイズ標準偏差, ,STT_GYRO_EKF.GYRO_RANDOM_NOISE_COMPO_STANDARD_DEVIATION_RAD_S.Z,float,(float)(stt_gyro_ekf->gyro_random_noise.standard_deviation_compo_rad_s[2]),PACKET,34,0,32,NONE,,,,,,,,ジャイロランダムノイズ標準偏差, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv index 1706d092..8e81e032 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ATTITUDE_DETERMINATION2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,STT_GYRO_EKF.COVARIANCE.0_0,float,(float)(stt_gyro_ekf->estimated_result.covariance_matrix.data[0][0]),PACKET,26,0,32,NONE,,,,,,,,, ,STT_GYRO_EKF.COVARIANCE.0_1,float,(float)(stt_gyro_ekf->estimated_result.covariance_matrix.data[0][1]),PACKET,30,0,32,NONE,,,,,,,,, ,STT_GYRO_EKF.COVARIANCE.0_2,float,(float)(stt_gyro_ekf->estimated_result.covariance_matrix.data[0][2]),PACKET,34,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv index 88dccec8..01a9150c 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BIAS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,MPU9250_ANG_VEL_BIAS_COMP_X_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_bias_compo_rad_s[0]),PACKET,26,0,32,NONE,,,,,,,,MPU9250角速度バイアス誤差コンポ座標X軸, ,MPU9250_ANG_VEL_BIAS_COMP_Y_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_bias_compo_rad_s[1]),PACKET,30,0,32,NONE,,,,,,,,MPU9250角速度バイアス誤差コンポ座標Y軸, ,MPU9250_ANG_VEL_BIAS_COMP_Z_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_bias_compo_rad_s[2]),PACKET,34,0,32,NONE,,,,,,,,MPU9250角速度バイアス誤差コンポ座標Z軸, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv index a784dd57..b3a8213c 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_BL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,BLOCK_NO,uint16_t,block_command_table->pos.block,PACKET,26,0,16,NONE,,,,,,,,テレメトリを生成したブロック番号, ,CMD_POS,uint8_t,block_command_table->pos.cmd,PACKET,28,0,8,NONE,,,,,,,,, ,BLOCK_LENGTH,uint8_t,BCT_get_bc_length(block_command_table->pos.block),PACKET,29,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv index 49f52e8b..a3443147 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CA.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(command_analyze->tlm_page_no),PACKET,26,0,8,NONE,,,,,,,,, ,CMD0.FUNC,uint32_t,(uint32_t)(command_analyze->cmd_table[CA_TLM_PAGE_SIZE*(command_analyze->tlm_page_no)+0].cmd_func),PACKET,27,0,32,HEX,,,,,,,,, ,CMD0.PARAM0_SIZE,uint8_t,(uint8_t)(((command_analyze->cmd_table[CA_TLM_PAGE_SIZE*(command_analyze->tlm_page_no)+0].param_size_infos[0].packed_info.bit.first & 0x0f) << 4) | (command_analyze->cmd_table[CA_TLM_PAGE_SIZE*(command_analyze->tlm_page_no)+0].param_size_infos[0].packed_info.bit.second & 0x0f)),PACKET,31,0,4,STATUS,,,,,,,0=NONE@@1=1BYTE@@2=2BYTE@@3=4BYTE@@4=8BYTE@@15=RAW@@*=N/A,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv index 23bc9ce0..e902d709 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_COMPONENTS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,MPU9250.ACCEL_COMPO_M_S2_X,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.accel_compo_m_s2[0]),PACKET,26,0,32,NONE,,,,,,,,AOBC搭載MPU9250での加速度測定値(コンポ座標X), ,MPU9250.ACCEL_COMPO_M_S2_Y,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.accel_compo_m_s2[1]),PACKET,30,0,32,NONE,,,,,,,,AOBC搭載MPU9250での加速度測定値(コンポ座標Y), ,MPU9250.ACCEL_COMPO_M_S2_Z,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.accel_compo_m_s2[2]),PACKET,34,0,32,NONE,,,,,,,,AOBC搭載MPU9250での加速度測定値(コンポ座標Z), diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv index 08217d24..a9b78d19 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_CONTROL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,BDOT_GAIN_X,float,(float)(bdot->control_gain[0]),PACKET,26,0,32,NONE,,,,,,,,body座標系x軸に関するBdot則制御ゲイン, ,BDOT_GAIN_Y,float,(float)(bdot->control_gain[1]),PACKET,30,0,32,NONE,,,,,,,,body座標系y軸に関するBdot則制御ゲイン, ,BDOT_GAIN_Z,float,(float)(bdot->control_gain[2]),PACKET,34,0,32,NONE,,,,,,,,body座標系z軸に関するBdot則制御ゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv index 4dc3ead3..93ca2326 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DCU.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,EXEC_LOG_ORDER0,uint8_t,divided_cmd_utility->exec_log_order[0],PACKET,26,0,8,NONE,,,,,,,,, ,EXEC_LOG_ORDER1,uint8_t,divided_cmd_utility->exec_log_order[1],PACKET,27,0,8,NONE,,,,,,,,, ,EXEC_LOG_ORDER2,uint8_t,divided_cmd_utility->exec_log_order[2],PACKET,28,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv index 7cb41666..6056894e 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DEBUG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,RW.SPEED_rad/s.X,float,(float)(rw0003_driver[RW0003_IDX_ON_X]->info.speed_rad_s),PACKET,26,0,32,NONE,,,,,,,,, ,RW.SPEED_rad/s.Y,float,(float)(rw0003_driver[RW0003_IDX_ON_Y]->info.speed_rad_s),PACKET,30,0,32,NONE,,,,,,,,, ,RW.SPEED_rad/s.Z,float,(float)(rw0003_driver[RW0003_IDX_ON_Z]->info.speed_rad_s),PACKET,34,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv index b236496c..ae0a3a35 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_DR_ALGORITHM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,COUNTER,uint32_t,(uint32_t)(aocs_data_recorder->read_tlm_algorithm.counter),PACKET,26,0,32,NONE,,,,,,,,, ,RECODED_TIME.OBCT_TOTAL_CYCLE,uint32_t,(uint32_t)(aocs_data_recorder->read_tlm_algorithm.obct_total_cycle_recorded),PACKET,30,0,32,NONE,,,,,,,,, ,RECODED_TIME.REFERENCE_jday,double,(double)(aocs_data_recorder->read_tlm_algorithm.reference_jday),PACKET,34,0,64,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv index 15076b2e..eefa6cd5 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,EVENT_UTIL.IS_ENABLED_EH_EXECUTION,uint8_t,event_utility->is_enabled_eh_execution,PACKET,26,0,8,STATUS,,,,,,,0=DISABLE@@ 1=ENABLE@@ *=N/A,, ,EL_EVENT_COUNTER.COUNTER_TOTAL,uint32_t,event_handler->el_event_counter.counter_total,PACKET,27,0,32,NONE,,,,,,,,, ,EL_EVENT_COUNTER.COUNTERS.EL_ERROR_LEVEL_HIGH,uint32_t,event_handler->el_event_counter.counters[EL_ERROR_LEVEL_HIGH],PACKET,31,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv index 85f04b96..951a1a39 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_INDEX.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.RULE_SORTED_INDEX.PAGE_NO,uint8_t,event_handler->tlm_info.rule_sorted_index.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,IDX0.GROUP,uint8_t,(uint8_t)event_handler->sorted_idxes[0 + offset].group,PACKET,27,0,8,NONE,,,,,,,,, ,IDX0.LOCAL,uint32_t,event_handler->sorted_idxes[0 + offset].local,PACKET,28,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv index 9e3fda4f..dad33a88 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_LOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.LOG.PAGE_NO,uint8_t,event_handler->tlm_info.log.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_counter,PACKET,27,0,32,NONE,,,,,,,,, ,LOG_TABLE.LOG_WP,uint16_t,event_handler->log_table.log_wp,PACKET,31,0,16,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv index 4a2b4f0a..18e6c8f7 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EH_RULE.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.RULE.PAGE_NO,uint8_t,event_handler->tlm_info.rule.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,RULE_TABLE.REGISTERED_RULE_NUM,uint16_t,event_handler->rule_table.registered_rule_num,PACKET,27,0,16,NONE,,,,,,,,, ,RULE0.SETTINGS.EVENT.GROUP,uint8_t,(uint8_t)rules[0 + offset].settings.event.group,PACKET,29,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv index 2fe4119a..4897a4c3 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,26,0,32,NONE,,,,,,,,, ,STATISTICS.RECORD_COUNTERS_HIGH,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],PACKET,30,0,32,NONE,,,,,,,,, *,STATISTICS.RECORD_COUNTERS_MIDDLE,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],PACKET,34,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv index a6f95e06..5fedb263 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_CLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.CLOG.PAGE_NO,uint8_t,event_logger->tlm_info.clog.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,TLM_INFO.CLOG.ERR_LEVEL,uint8_t,(uint8_t)err_level,PACKET,27,0,8,STATUS,,,,,,,0=HIGH@@1=LOW@@ 2=EL@@ 3=EH@@ *=N/A,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,28,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv index ca78cd2b..7e5ad419 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_EL_TLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.TLOG.PAGE_NO,uint8_t,event_logger->tlm_info.tlog.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,TLM_INFO.TLOG.ERR_LEVEL,uint8_t,(uint8_t)((err_level << 4 & 0xf0) | (event_logger->tlogs[err_level].is_enable_overwrite << 3 & 0x08) | ( event_logger->tlogs[err_level].is_table_overflow << 2 & 0x04)),PACKET,27,0,4,STATUS,,,,,,,0=HIGH@@1=LOW@@ 2=EL@@ 3=EH@@ *=N/A,, ,TLOGS.IS_ENABLE_OVERWRITE,,,PACKET,27,4,1,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv index f4b28a83..a7f387e8 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,RW0003.SPIKE_CONFIG_X_CNT_LMT_ACCEPT,uint8_t,(uint8_t)(rw0003_filter->spike_filter_config[0].count_limit_to_accept),PACKET,26,0,8,NONE,,,,,,,,RW0003_Xスパイク値を真値として受け入れるまでのカウント数, ,RW0003.SPIKE_CONFIG_X_CNT_LMT_REJECT,uint8_t,(uint8_t)(rw0003_filter->spike_filter_config[0].count_limit_to_reject_continued_warning),PACKET,27,0,8,NONE,,,,,,,,RW0003_X連続して入力値を除外した回数のカウント上限値, ,RW0003.SPIKE_CONFIG_X_REJECT_THRESHOLD,float,(float)(rw0003_filter->spike_filter_config[0].reject_threshold),PACKET,28,0,32,NONE,,,,,,,,RW0003_Xスパイク値判定に用いる閾値, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv index c9802927..bbe583ad 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FILTERS_2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,MPU9250.MAG_SPIKE_CONFIG_X_CNT_LMT_ACCEPT,uint8_t,(uint8_t)(mpu9250_filter->spike_filter_config_mag[0].count_limit_to_accept),PACKET,26,0,8,NONE,,,,,,,,, ,MPU9250.MAG_SPIKE_CONFIG_X_CNT_LMT_REJECT,uint8_t,(uint8_t)(mpu9250_filter->spike_filter_config_mag[0].count_limit_to_reject_continued_warning),PACKET,27,0,8,NONE,,,,,,,,, ,MPU9250.MAG_SPIKE_CONFIG_X_REJECT_THRESHOLD,float,(float)(mpu9250_filter->spike_filter_config_mag[0].reject_threshold),PACKET,28,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv index 721be52c..d37d9676 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_FRAME_TRANSFORMATION.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,RM3100_AOBC_QUATERNION_C2B_VECTOR_0,float,(float)(rm3100_driver[RM3100_IDX_ON_AOBC]->info.frame_transform_c2b.vector_part[0]),PACKET,26,0,32,NONE,,,,,,,,AOBC搭載RM3100座標変換Quaternion_c2bのベクトル部第0成分, ,RM3100_AOBC_QUATERNION_C2B_VECTOR_1,float,(float)(rm3100_driver[RM3100_IDX_ON_AOBC]->info.frame_transform_c2b.vector_part[1]),PACKET,30,0,32,NONE,,,,,,,,AOBC搭載RM3100座標変換Quaternion_c2bのベクトル部第1成分, ,RM3100_AOBC_QUATERNION_C2B_VECTOR_2,float,(float)(rm3100_driver[RM3100_IDX_ON_AOBC]->info.frame_transform_c2b.vector_part[2]),PACKET,34,0,32,NONE,,,,,,,,AOBC搭載RM3100座標変換Quaternion_c2bのベクトル部第2成分, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv index e0c52df3..4dc175bf 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GIT_REV.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,CORE0,uint8_t,(uint8_t)GIT_REV_CORE[0],PACKET,26,0,8,NONE,,,,,,,,, ,CORE1,uint8_t,(uint8_t)GIT_REV_CORE[1],PACKET,27,0,8,NONE,,,,,,,,, ,CORE2,uint8_t,(uint8_t)GIT_REV_CORE[2],PACKET,28,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv index eece14ab..bdf80b9f 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,OEM7600.RANGE0.prn_slot,uint16_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[0].prn_slot),PACKET,26,0,16,NONE,,,,,,,,PIC温度上限, ,OEM7600.RANGE0.is_updated,uint8_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[0].is_updated),PACKET,28,0,8,NONE,,,,,,,,PIC温度下限, ,OEM7600.RANGE0.pseudo_range_m,double,(double)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[0].pseudo_range_m),PACKET,29,0,64,NONE,,,,,,,,RW_DCDC温度上限, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv index 458ca546..2f3e877d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_GPSR_RANGE_P2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,OEM7600.RANGE7.prn_slot,uint16_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[7].prn_slot),PACKET,26,0,16,NONE,,,,,,,,PIC温度上限, ,OEM7600.RANGE7.is_updated,uint8_t,(uint16_t)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[7].is_updated),PACKET,28,0,8,NONE,,,,,,,,PIC温度下限, ,OEM7600.RANGE7.pseudo_range_m,double,(double)(oem7600_driver[OEM7600_IDX_IN_UNIT]->info.range_tlm[7].pseudo_range_m),PACKET,29,0,64,NONE,,,,,,,,RW_DCDC温度上限, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv index b590323c..5a6cee7f 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_ALGO.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,ANG_VEL.EST_B_X_rad/s,float,(float)(aocs_manager->ang_vel_est_body_rad_s[0]),PACKET,26,0,32,NONE,,,,,,,,推定角加速度 機体座標X [rad/s], ,ANG_VEL.EST_B_Y_rad/s,float,(float)(aocs_manager->ang_vel_est_body_rad_s[1]),PACKET,30,0,32,NONE,,,,,,,,推定角加速度 機体座標Y [rad/s], ,ANG_VEL.EST_B_Z_rad/s,float,(float)(aocs_manager->ang_vel_est_body_rad_s[2]),PACKET,34,0,32,NONE,,,,,,,,推定角加速度 機体座標Z [rad/s], diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv index 8228f8a7..472aefcb 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_COMPO.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,ROUGH.GYRO_ANG_VEL_BODY_X_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_body_rad_s[0]),PACKET,26,0,32,NONE,,,,,,,,AOBC搭載MPU9250での角速度測定値(コンポ座標X), ,ROUGH.GYRO_ANG_VEL_BODY_Y_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_body_rad_s[1]),PACKET,30,0,32,NONE,,,,,,,,AOBC搭載MPU9250での角速度測定値(コンポ座標Y), ,ROUGH.GYRO_ANG_VEL_BODY_Z_rad/s,float,(float)(mpu9250_driver[MPU9250_IDX_ON_AOBC]->info.ang_vel_body_rad_s[2]),PACKET,34,0,32,NONE,,,,,,,,AOBC搭載MPU9250での角速度測定値(コンポ座標Z), diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv index 4927a752..81687d1b 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_HK_GEN.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,OBC.TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_cycle),PACKET,26,0,32,NONE,,,,,,,,, ,OBC.MM.OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,30,0,8,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=Bdot@@3=RoughSunPointing@@4=RoughThreeAxisMtq@@5=RoughThreeAxisRw@@6=FineThreeAxis@@7=Reserved@@8=MAX@@*=N/A,, ,OBC.MM.STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,31,0,1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS:G@@*=N/A,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv index 08196e38..9202354e 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_MM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,CURRENT_MODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,26,0,8,NONE,,,,,,,,, ,PREVIOSU_MODE,uint8_t,(uint8_t)(mode_manager->previous_id),PACKET,27,0,8,NONE,,,,,,,,, ,TRANSITION_STATUS,uint8_t,(uint8_t)(mode_manager->stat),PACKET,28,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv index 7177c729..0a2cc1e5 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_NON_VOLATILE.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,ERROR_STATUS,uint8_t,(uint8_t)(non_volatile_memory_manager->error_status),PACKET,26,0,8,STATUS,,,,,,,0=OK@@ 1=NG_ADDRESS@@ 2=NG_LENGTH@@ 3=NG_READ@@ 4=NG_WRITE@@ 5=NG_OTHERS,不揮発メモリエラーステータス, ,WRITE.START_ADDRESS,uint32_t,(uint32_t)(non_volatile_memory_manager->write_info.start_address),PACKET,27,0,32,NONE,,,,,,,,不揮発メモリ書き込み先頭アドレス, ,WRITE.DATA_SIZE,uint8_t,(uint8_t)(non_volatile_memory_manager->write_info.data_size_byte),PACKET,31,0,8,NONE,,,,,,,,不揮発メモリ書き込みサイズ, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv index 7ac9b174..e7d7cefb 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_OBC.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_cycle),PACKET,26,0,32,NONE,,,,,,,,モード遷移後経過時刻, ,MM_STS,uint8_t,(uint8_t)(mode_manager->stat),PACKET,30,0,8,NONE,,,,,,,,モード遷移実行状態, ,MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,31,0,8,NONE,,,,,,,,現状モード番号, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv index ffd9093f..b364817d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,METHOD,uint8_t,(uint8_t)(orbit_calculator->method),PACKET,26,0,8,STATUS,,,,,,,0=KEPLER@@ 1=SGP4@@ 2=KEPLER_GPSR@@ 3=EKF,軌道伝搬手法, ,KEPLER.SEMI_MAJOR_AXIS_km,float,(float)(kepler_orbit_propagator->orbital_elements.semi_major_axis_km),PACKET,27,0,32,NONE,,,,,,,,Kepler伝搬で使われている軌道長半径, ,KEPLER.ECCENTRICITY,float,(float)(kepler_orbit_propagator->orbital_elements.eccentricity),PACKET,31,0,32,NONE,,,,,,,,Kepler伝搬で使われている離心率, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv index fe2ded60..ed562cfa 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_ORBIT2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,METHOD,uint8_t,(uint8_t)(orbit_calculator->method),PACKET,26,0,8,STATUS,,,,,,,0=KEPLER@@ 1=SGP4@@ 2=KEPLER_GPSR@@ 3=EKF,軌道伝搬手法, ,KEPLER_GPSR.GPSR_UPDATE,uint8_t,(uint8_t)(orbit_calculator->gpsr_update),PACKET,27,0,8,STATUS,,,,,,,0=DISABLE@@ 1=ENABLE,Kepler伝播にGPSRテレメを用いるフラッグ, ,KEPLER_GPSR.SEMI_MAJOR_AXIS_km,float,(float)(gpsr_orbit_propagator->orbital_elements.semi_major_axis_km),PACKET,28,0,32,NONE,,,,,,,,GPSRテレメを用いたKepler伝搬で使われている軌道長半径, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv index 29746529..3fd068ca 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_POWER.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,POW_INA260_SWITCH_STATE,uint8_t,(uint8_t)(power_switch_control->switch_state_5v[APP_PSC_5V_IDX_INA260]),PACKET,26,0,8,STATUS,,,,,,,0=OFF@@ 1=ON,INA260の電源状態, ,POW_MPU9250_SWITCH_STATE,uint8_t,(uint8_t)(power_switch_control->switch_state_5v[APP_PSC_5V_IDX_MPU9250]),PACKET,27,0,8,STATUS,,,,,,,0=OFF@@ 1=ON,MPU9250の電源状態, ,POW_RM3100_SWITCH_STATE,uint8_t,(uint8_t)(power_switch_control->switch_state_5v[APP_PSC_5V_IDX_RM3100]),PACKET,28,0,8,STATUS,,,,,,,0=OFF@@ 1=ON,RM3100の電源状態の電源状態, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv index eb78347a..bae59057 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL1,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.log_level[0]),PACKET,26,0,8,NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL2,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.log_level[1]),PACKET,27,0,8,NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL3,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.log_level[2]),PACKET,28,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv index 50b2489b..bd46cc8d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_READ2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,LISA.MODE,uint32_t,(uint32_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.lisa.mode),PACKET,26,0,32,NONE,,,,,,,,, ,LISA.PREFILTER_DISTANCE_THRESHOLD_mm,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.lisa.prefilter_distance_threshold_mm),PACKET,30,0,32,NONE,,,,,,,,, ,LISA.PREFILTER_ANGLE_THRESHOLD_rad,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.read_parameter.lisa.prefilter_angle_threshold_rad),PACKET,34,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv index ddaf023d..bac6ccf4 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL1,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.log_level[0]),PACKET,26,0,8,NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL2,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.log_level[1]),PACKET,27,0,8,NONE,,,,,,,,, ,LOG_LEVEL.LOG_LEVEL3,uint8_t,(uint8_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.log_level[2]),PACKET,28,0,8,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv index 225cd891..83743eec 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SAGITTA_SET2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,LISA.MODE,uint32_t,(uint32_t)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.lisa.mode),PACKET,26,0,32,NONE,,,,,,,,, ,LISA.PREFILTER_DISTANCE_THRESHOLD_mm,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.lisa.prefilter_distance_threshold_mm),PACKET,30,0,32,NONE,,,,,,,,, ,LISA.PREFILTER_ANGLE_THRESHOLD_rad,float,(float)(sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.set_parameter.lisa.prefilter_angle_threshold_rad),PACKET,34,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv index 1a03593c..a41d4c2b 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_SUN_POINTING.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PID_OMEGA.BODY_X_P_GAIN,float,(float)(sun_pointing->pid_omega[0].gains.p_gain),PACKET,26,0,32,NONE,,,,,,,,角速度制御_機体固定X軸_Pゲイン, ,PID_OMEGA.BODY_Y_P_GAIN,float,(float)(sun_pointing->pid_omega[1].gains.p_gain),PACKET,30,0,32,NONE,,,,,,,,角速度制御_機体固定Y軸_Pゲイン, ,PID_OMEGA.BODY_Z_P_GAIN,float,(float)(sun_pointing->pid_omega[2].gains.p_gain),PACKET,34,0,32,NONE,,,,,,,,角速度制御_機体固定Z軸_Pゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv index e2c71035..d9c26011 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION1.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TARGET0_TI,uint32_t,(uint32_t)(quaternion_interpolator->target_list[0].attitude_changed_ti),PACKET,26,0,32,NONE,,,,,,,,姿勢変更完了予定時刻, ,TARGET0_X,float,(float)(quaternion_interpolator->target_list[0].quaternion_target_i2t.vector_part[0]),PACKET,30,0,32,NONE,,,,,,,,目標Quaternion I2T X, ,TARGET0_Y,float,(float)(quaternion_interpolator->target_list[0].quaternion_target_i2t.vector_part[1]),PACKET,34,0,32,NONE,,,,,,,,目標Quaternion I2T Y, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv index 2f128759..9c2f665f 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TARGET_QUATERNION2.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TARGET10_TI,uint32_t,(uint32_t)(quaternion_interpolator->target_list[10].attitude_changed_ti),PACKET,26,0,32,NONE,,,,,,,,姿勢変更完了予定時刻, ,TARGET10_X,float,(float)(quaternion_interpolator->target_list[10].quaternion_target_i2t.vector_part[0]),PACKET,30,0,32,NONE,,,,,,,,目標Quaternion I2T X, ,TARGET10_Y,float,(float)(quaternion_interpolator->target_list[10].quaternion_target_i2t.vector_part[1]),PACKET,34,0,32,NONE,,,,,,,,目標Quaternion I2T Y, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv index 594baad7..6e2375fa 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TEMP_CALIB.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,MPU_GYRO_X_BIAS_RANGE_LOW,float,(float)(di_mpu9250[MPU9250_IDX_ON_AOBC]->gyro_bias_compo_rad_s[0].range_low_),PACKET,26,0,32,NONE,,,,,,,,MPUジャイロバイアスX軸温度補正範囲下限, ,MPU_GYRO_X_BIAS_RANGE_HIGH,float,(float)(di_mpu9250[MPU9250_IDX_ON_AOBC]->gyro_bias_compo_rad_s[0].range_high_),PACKET,30,0,32,NONE,,,,,,,,MPUジャイロバイアスX軸温度補正範囲上限, ,MPU_GYRO_X_BIAS_COEFF_0,float,(float)(di_mpu9250[MPU9250_IDX_ON_AOBC]->gyro_bias_compo_rad_s[0].coefficients_[0]),PACKET,34,0,32,NONE,,,,,,,,MPUジャイロバイアスX軸温度補正係数0次, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv index dbc63174..a7bf6487 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TF.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PAGE_NO,uint8_t,page,PACKET,26,0,8,NONE,,,,,,,,, ,TLM0,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+0].tlm_func),PACKET,27,0,32,NONE,,,,,,,,, ,TLM1,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+1].tlm_func),PACKET,31,0,32,NONE,,,,,,,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv index 9aab31fd..9c36d6e1 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_MTQ.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PID_OMEGA.BODY_X_P_GAIN,float,(float)(three_axis_control_mtq->pid_omega[0].gains.p_gain),PACKET,26,0,32,NONE,,,,,,,,角速度制御_機体固定X軸_Pゲイン, ,PID_OMEGA.BODY_Y_P_GAIN,float,(float)(three_axis_control_mtq->pid_omega[1].gains.p_gain),PACKET,30,0,32,NONE,,,,,,,,角速度制御_機体固定Y軸_Pゲイン, ,PID_OMEGA.BODY_Z_P_GAIN,float,(float)(three_axis_control_mtq->pid_omega[2].gains.p_gain),PACKET,34,0,32,NONE,,,,,,,,角速度制御_機体固定Z軸_Pゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv index e3be0208..e00102cd 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_THREE_AXIS_RW.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PID_OMEGA.BODY_X_P_GAIN,float,(float)(three_axis_control_rw->pid_omega[0].gains.p_gain),PACKET,26,0,32,NONE,,,,,,,,角速度制御_機体固定X軸_Pゲイン, ,PID_OMEGA.BODY_Y_P_GAIN,float,(float)(three_axis_control_rw->pid_omega[1].gains.p_gain),PACKET,30,0,32,NONE,,,,,,,,角速度制御_機体固定Y軸_Pゲイン, ,PID_OMEGA.BODY_Z_P_GAIN,float,(float)(three_axis_control_rw->pid_omega[2].gains.p_gain),PACKET,34,0,32,NONE,,,,,,,,角速度制御_機体固定Z軸_Pゲイン, diff --git a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv index 29694d96..2f241443 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/ISSL6U_AOBC_TLM_DB_AOBC_TL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,LINE_NO,uint8_t,TLCD_update_tl_list_for_tlm(timeline_command_dispatcher->tlm_info_.id),PACKET,26,0,8,NONE,,,,,,,,テレメトリを生成したライン番号, ,PAGE_NO,uint8_t,timeline_command_dispatcher->tlm_info_.page_no,PACKET,27,0,8,NONE,,,,,,,,, ,UPDATED_AT,uint32_t,timeline_command_dispatcher->tlm_info_.updated_at,PACKET,28,0,32,NONE,,,,,,,,, From 401de6e8d6cfc002dafdde513fd0da33e6c060e4 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Fri, 26 May 2023 19:30:18 +0900 Subject: [PATCH 043/176] delete al and ah --- CMakeLists.txt | 2 -- Examples/CMakeLists.txt | 2 -- .../Applications/UserDefined/debug_apps.c | 18 ----------- src/src_user/Applications/app_headers.h | 1 - src/src_user/Applications/app_registry.c | 2 -- src/src_user/Applications/app_registry.h | 2 -- .../EventHandlerRules/event_handler_rules.h | 2 +- .../Settings/System/anomaly_logger_define.h | 11 ------- .../CMD_DB/ISSL6U_AOBC_CMD_DB_BCT.csv | 2 +- .../CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv | 32 +++++++++---------- 10 files changed, 18 insertions(+), 56 deletions(-) delete mode 100644 src/src_user/Settings/System/anomaly_logger_define.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 56adab87..428da61b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ set(USE_ALL_C2A_CORE_TEST_APPS OFF) set(USE_ALL_C2A_CORE_LIB ON) set(C2A_SRCS - # ${C2A_CORE_DIR}/Applications/anomaly_handler.c ${C2A_CORE_DIR}/Applications/divided_cmd_utility.c ${C2A_CORE_DIR}/Applications/event_utility.c ${C2A_CORE_DIR}/Applications/gs_command_dispatcher.c @@ -35,7 +34,6 @@ set(C2A_SRCS ${C2A_CORE_DIR}/Applications/timeline_command_dispatcher.c # ${C2A_CORE_DIR}/Applications/utility_command.c # ${C2A_CORE_DIR}/Applications/utility_counter.c - ${C2A_CORE_DIR}/System/AnomalyLogger/anomaly_logger.c # SRC_USER codes # ${C2A_USER_DIR}/C2A_main.c diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 3b17d882..20fa512e 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -25,7 +25,6 @@ set(USE_ALL_C2A_CORE_TEST_APPS OFF) set(USE_ALL_C2A_CORE_LIB ON) set(C2A_SRCS - # ${C2A_CORE_DIR}/Applications/anomaly_handler.c ${C2A_CORE_DIR}/Applications/divided_cmd_utility.c ${C2A_CORE_DIR}/Applications/event_utility.c ${C2A_CORE_DIR}/Applications/gs_command_dispatcher.c @@ -35,7 +34,6 @@ set(C2A_SRCS ${C2A_CORE_DIR}/Applications/timeline_command_dispatcher.c # ${C2A_CORE_DIR}/Applications/utility_command.c # ${C2A_CORE_DIR}/Applications/utility_counter.c - ${C2A_CORE_DIR}/System/AnomalyLogger/anomaly_logger.c # SRC_USER codes # ${C2A_USER_DIR}/C2A_main.c diff --git a/src/src_user/Applications/UserDefined/debug_apps.c b/src/src_user/Applications/UserDefined/debug_apps.c index 3c9502d4..ffb53791 100644 --- a/src/src_user/Applications/UserDefined/debug_apps.c +++ b/src/src_user/Applications/UserDefined/debug_apps.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "../../TlmCmd/telemetry_definitions.h" #include @@ -31,11 +30,6 @@ AppInfo print_time_stamp(void) return AI_create_app_info("tstm", NULL, print_time_stamp_); } -// AppInfo print_anomaly_status(void) -// { -// return AI_create_app_info("anmly", NULL, print_anomaly_status_); -// } - AppInfo print_cmd_status(void) { return AI_create_app_info("cmds", NULL, print_cmd_status_); @@ -48,7 +42,6 @@ void flush_screen_(void) VT100_erase_line(); Printf("-- EQUULEUS Flight S/W (H-ON, F-ON) --\n"); VT100_erase_line(); - // Printf("BUILD: %s %s (Rev. %d)\n", __DATE__, __TIME__, SVN_REVISION); Printf("BUILD: %s %s\n", __DATE__, __TIME__); } @@ -62,17 +55,6 @@ void print_time_stamp_(void) mode_manager->stat, mode_manager->previous_id, mode_manager->current_id); } -// void print_anomaly_status_(void) -// { -// const AL_AnomalyRecord* ar = AL_get_latest_record(); -// VT100_erase_line(); -// Printf("ANOMALY: CTR %d, HEAD %d, TIME: <%d, %d, %d>, CODE: <%d, %d>, RL %d\n", -// anomaly_logger->counter, anomaly_logger->header, -// ar->time.total_cycle, ar->time.mode_cycle, ar->time.step, -// ar->code.group, ar->code.local, -// ar->run_length); -// } - void print_cmd_status_(void) { VT100_erase_line(); diff --git a/src/src_user/Applications/app_headers.h b/src/src_user/Applications/app_headers.h index 69c09b1d..37f4169d 100644 --- a/src/src_user/Applications/app_headers.h +++ b/src/src_user/Applications/app_headers.h @@ -8,7 +8,6 @@ #include #include #include -// #include #include #include #include diff --git a/src/src_user/Applications/app_registry.c b/src/src_user/Applications/app_registry.c index 5ad10781..292dbc58 100644 --- a/src/src_user/Applications/app_registry.c +++ b/src/src_user/Applications/app_registry.c @@ -38,11 +38,9 @@ void AR_load_initial_settings(void) add_application_(AR_TLC_DISPATCHER_BC, TLCD_bc_create_app); add_application_(AR_TLC_DISPATCHER_TLM, TLCD_tlm_create_app); add_application_(AR_EVENT_UTILITY, EVENT_UTIL_create_app); - // add_application_(AR_ANOMALY_HANDLER, AH_create_app); // add_application_(AR_DBG_FLUSH_SCREEN, flush_screen); // add_application_(AR_DBG_PRINT_TIMESTAMP, print_time_stamp); // add_application_(AR_DBG_PRINT_CMD_STATUS, print_cmd_status); - // add_application_(AR_DBG_AH_STATUS, print_ah_status); // User Defined // AOCS diff --git a/src/src_user/Applications/app_registry.h b/src/src_user/Applications/app_registry.h index 1d7a5a7e..248e7936 100644 --- a/src/src_user/Applications/app_registry.h +++ b/src/src_user/Applications/app_registry.h @@ -33,11 +33,9 @@ typedef enum AR_TLC_DISPATCHER_BC, AR_TLC_DISPATCHER_TLM, AR_EVENT_UTILITY, - // AR_ANOMALY_HANDLER, // AR_DBG_FLUSH_SCREEN, // AR_DBG_PRINT_TIMESTAMP, // AR_DBG_PRINT_CMD_STATUS, - // AR_DBG_AH_STATUS, // User Defined // AOCS diff --git a/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h b/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h index b9ff50cb..47791c8d 100644 --- a/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h +++ b/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h @@ -6,7 +6,7 @@ #define EVENT_HANDLER_RULES_H_ /** - * @enum AH_RULE_ID + * @enum EH_RULE_ID * @brief EH_Rule の ID * @note 最大数は EH_RULE_MAX で規定 * @note uint16_t を想定 diff --git a/src/src_user/Settings/System/anomaly_logger_define.h b/src/src_user/Settings/System/anomaly_logger_define.h deleted file mode 100644 index c794bc8d..00000000 --- a/src/src_user/Settings/System/anomaly_logger_define.h +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @file - * @brief AL (と AH) を有効化するかどうかの定義 - * @note AL, AH は EL, EH の新規実装によって deprecated であり,基本的には使うべきではない - */ -#ifndef ANOMALY_LOGGER_DEFINE_H_ -#define ANOMALY_LOGGER_DEFINE_H_ - -// #define AL_ENABLE - -#endif diff --git a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_BCT.csv b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_BCT.csv index 57d46995..4877ac0b 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_BCT.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_BCT.csv @@ -37,7 +37,7 @@ Comment,Name,ShortName,BCID,エイリアス,,,,,Danger Flag,Description,Note ,BC_AC_STT_UPDATE,,28,,,,,,danger,, **,==== 各系領域 ====,,,,,,,,,, *,./C2A/TlmCmd/NormalBlockCommandDefinition/で定義,,,,,,,,,, -*,アノマリハンドラはBC_AH_など,接頭辞を適切につけること!,,,,,,,,,, +*,イベントハンドラはBC_EH_など,接頭辞を適切につけること!,,,,,,,,,, **,AOCS,,,,,,,,,, ,BC_HK_CYCLIC_TLM,,30,○,○,○,○,○,,, ,BC_SELECT_RM3100_ON_AOBC,,31,○,○,○,○,○,,, diff --git a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv index b482fb8e..ffa1e0d8 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv @@ -68,22 +68,6 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, *,Cmd_MEM_LOAD,OBC,,2,uint32_t,開始アドレス,raw,HEXBINARY,,,,,,,,,,,開始アドレス、データを指定,第2パラメータの指定は仮設定 *,Cmd_MEM_SET_DESTINATION,OBC,,1,uint32_t,コピー先アドレス,,,,,,,,,,,,,コピー先設定, *,Cmd_MEM_COPY_REGION_SEQ,OBC,,1,uint32_t,コピー幅,,,,,,,,,,,,,領域コピー, -**,AnomalyLogger用,,,,,,,,,,,,,,,,,,, -*,Cmd_AL_ADD_ANOMALY,OBC,,2,uint32_t,group,uint32_t,local,,,,,,,,,,,アノマリーコード(group@@ local)を発生させる, -*,Cmd_AL_CLEAR_LIST,OBC,,0,,,,,,,,,,,,,,,AnomalyListをクリアする, -*,Cmd_AL_SET_PAGE_FOR_TLM,OBC,,1,uint8_t,page no,,,,,,,,,,,,,テレメトリ生成用ページ番号設定, -*,Cmd_AL_INIT_LOGGING_ENA_FLAG,OBC,,0,,,,,,,,,,,,,,,ロギングのフラグを初期化(全有効化), -*,Cmd_AL_ENABLE_LOGGING,OBC,,1,uint32_t,group,,,,,,,,,,,,,ロギングを有効化, -*,Cmd_AL_DISABLE_LOGGING,OBC,,1,uint32_t,group,,,,,,,,,,,,,ロギングを無効化, -*,Cmd_AL_SET_THRES_OF_NEARLY_FULL,OBC,,1,uint16_t,,,,,,,,,,,,,,AL_NEARLY_FULLアノマリを出すしきい値設定, -**,AnomalyHandler用,,,,,,,,,,,,,,,,,,, -*,Cmd_AH_REGISTER_RULE,OBC,,6,uint8_t,id,uint8_t,group,uint8_t,local,uint8_t,cond,uint8_t,threshold,uint16_t,bc_index,,,AHパラメタを設定する, -*,Cmd_AH_ACTIVATE_RULE,OBC,,1,uint8_t,id,,,,,,,,,,,,,idで指定したルールを有効化する, -*,Cmd_AH_INACTIVATE_RULE,OBC,,1,uint8_t,id,,,,,,,,,,,,,idで指定したルールを無効化する, -*,Cmd_AH_CLEAR_LOG,OBC,,0,,,,,,,,,,,,,,,アノマリ記録と関連情報を初期化する, -*,Cmd_AH_SET_PAGE_FOR_TLM,OBC,,1,uint8_t,page no,,,,,,,,,,,,,テレメトリ生成用ページ番号設定, -*,Cmd_AHRES_LOG_CLEAR,OBC,,0,,,,,,,,,,,,,,,アノマリ対処ログをクリア, -*,Cmd_AHRES_LOG_SET_PAGE_FOR_TLM,OBC,,1,uint8_t,page no,,,,,,,,,,,,,アノマリ対処ログテレメトリ生成用ページ番号設定, **,EventLogger,,,,,,,,,,,,,,,,,,, ,Cmd_EL_INIT,OBC,0x0023,0,,,,,,,,,,,,,,,EL初期化, ,Cmd_EL_CLEAR_LOG_ALL,OBC,0x0024,0,,,,,,,,,,,,,,,全ログ削除, @@ -998,3 +982,19 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, From e1729b0512fb89726b266fe167f9935468fcd251 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 00:34:26 +0900 Subject: [PATCH 044/176] =?UTF-8?q?stdint=20=E3=82=84=E3=82=8A=E6=AE=8B?= =?UTF-8?q?=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ActuatorControllers/mtq_seiren_controller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h index 1c62d60c..a9e68c27 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h @@ -10,10 +10,10 @@ #ifndef MTQ_SEIREN_CONTROLLER_H_ #define MTQ_SEIREN_CONTROLLER_H_ +#include #include #include #include -#include "../../../../../Library/stdint.h" #include "../../../../../Library/physical_constants.h" #include "../../../../../Library/ControlUtility/cross_product_control.h" From 6fbe5910db10f12e110b61728c777877e4eeebf7 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 00:35:46 +0900 Subject: [PATCH 045/176] =?UTF-8?q?APID=5Fis=5Fother=5Fobc=5Ftlm=5Fapid=20?= =?UTF-8?q?=E3=81=AE=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_user/Settings/TlmCmd/Ccsds/apid_define.c | 13 ------------- src/src_user/Settings/TlmCmd/Ccsds/apid_define.h | 9 --------- 2 files changed, 22 deletions(-) diff --git a/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c b/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c index 491c21ed..11bf7f8d 100644 --- a/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c +++ b/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c @@ -26,17 +26,4 @@ APID APID_get_apid_from_uint16(uint16_t apid) } } -int APID_is_other_obc_tlm_apid(APID apid) -{ - switch (apid) - { - case APID_AOBC_TLM: // FALLTHROUGH - case APID_TOBC_TLM: - return 1; - - default: - return 0; - } -} - #pragma section diff --git a/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h b/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h index 66acbb12..dc6960fd 100644 --- a/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h +++ b/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h @@ -36,13 +36,4 @@ typedef enum */ APID APID_get_apid_from_uint16(uint16_t apid); -/** - * @brief 入力した APID が他の OBC で生成された TLM の APID かどうか - * @param apid: APID - * @note 不正な APID は 0 を返す - * @retval 1: 他 OBC で生成された TLM の APID - * @retval 0: それ以外の APID - */ -int APID_is_other_obc_tlm_apid(APID apid); - #endif From 6113a496d4e8c0f0f381cb81110b09294c64695c Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 00:54:44 +0900 Subject: [PATCH 046/176] =?UTF-8?q?telemetry=20generator=20=E3=81=AE?= =?UTF-8?q?=E6=94=B9=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv | 84 +++++++++---------- src/src_user/TlmCmd/user_packet_handler.c | 18 ++++ src/src_user/TlmCmd/user_packet_handler.h | 18 ++++ 3 files changed, 78 insertions(+), 42 deletions(-) diff --git a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv index ffa1e0d8..68a5c36d 100644 --- a/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv +++ b/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/ISSL6U_AOBC_CMD_DB_CMD_DB.csv @@ -28,24 +28,33 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,Cmd_TLCD_SET_LOUT_FLAG,OBC,0x0011,2,uint8_t,ID: GS=0; BC=1; TLM=2,uint8_t,,,,,,,,,,,,実行停止機能設定(ライン番号@@ フラグ), ,Cmd_TLCD_SET_ID_FOR_TLM,OBC,0x0012,1,uint8_t,ID: GS=0; BC=1; TLM=2,,,,,,,,,,,,,テレメで降ろすTL_IDの設定とTLテレメの更新, ,Cmd_TLCD_SET_PAGE_FOR_TLM,OBC,0x0013,1,uint8_t,page_no,,,,,,,,,,,,,テレメトリ生成用ページ番号設定, -,Cmd_GENERATE_TLM,OBC,0x0014,3,uint8_t,category(def=0x40),uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,TLMパケット生成, *,Cmd_OBC_CLEAR_STARTUP_CNT,OBC,,0,,,,,,,,,,,,,,,OBCの起動回数累積カウンタを初期化, +**,Telemetry Generator,,,,,,,,,,,,,,,,,,, +,Cmd_GENERATE_TLM,OBC,0x0014,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,TLMパケット生成 (deprecated), +,Cmd_TG_GENERATE_TLM,OBC,0x0015,4,uint8_t,tlm id,uint8_t,dest flags,uint8_t,dest info,uint8_t,送出回数,,,,,,,自身の OBC のテレメを生成, +,Cmd_TG_GENERATE_HK_TLM,OBC,0x0016,1,uint8_t,tlm id,,,,,,,,,,,,,HK テレメを生成 (事実上,現在使われていない), +,Cmd_TG_GENERATE_MS_TLM,OBC,0x0017,1,uint8_t,tlm id,,,,,,,,,,,,,MS テレメを生成, +,Cmd_TG_GENERATE_ST_TLM,OBC,0x0018,2,uint8_t,tlm id,uint8_t,dr partition (dest info),,,,,,,,,,,ST テレメを生成, +*,Cmd_TG_FORWARD_TLM,OBC,,5,uint16_t,apid,uint8_t,tlm id,uint8_t,dest flags,uint8_t,dest info,uint8_t,送出回数,,,,,2nd OBC のテレメを転送, +*,Cmd_TG_FORWARD_AS_HK_TLM,OBC,,2,uint16_t,apid,uint8_t,tlm id,,,,,,,,,,,HK テレメとして 2nd OBC のテレメを転送 (事実上,現在使われていない), +*,Cmd_TG_FORWARD_AS_MS_TLM,OBC,,2,uint16_t,apid,uint8_t,tlm id,,,,,,,,,,,MS テレメとして 2nd OBC のテレメを転送, +*,Cmd_TG_FORWARD_AS_ST_TLM,OBC,,3,uint16_t,apid,uint8_t,tlm id,uint8_t,dr partition (dest info),,,,,,,,,ST テレメとして 2nd OBC のテレメを転送, **,BCTコマンド,,,,,,,,,,,,,,,,,,, -,Cmd_BCT_CLEAR_BLOCK,OBC,0x0015,1,uint16_t,bc_index,,,,,,,,,,,,,BLC登録解除コマンド, -,Cmd_BCT_SET_BLOCK_POSITION,OBC,0x0016,2,uint16_t,bc_index,uint8_t,cmd_index,,,,,,,,,,,BLC操作ポインタ設定コマンド, -,Cmd_BCT_COPY_BCT,OBC,0x0017,2,uint16_t,dst_bc_index,uint16_t,src_bc_index,,,,,,,,,,,BCT の内容を別の場所にコピー, -,Cmd_BCT_OVERWRITE_CMD,OBC,0x0018,5,uint16_t,CMD_CODE,uint32_t,TI,uint16_t,pos.block,uint8_t,pos.cmd,raw,cmd_param (big endian),,,danger,,BCTの内容を上書き, -,Cmd_BCT_FILL_NOP,OBC,0x0019,1,uint8_t,,,,,,,,,,,,,,テレメ運用時の10個BCをNOP埋めする.(NOP個数), +,Cmd_BCT_CLEAR_BLOCK,OBC,0x0019,1,uint16_t,bc_index,,,,,,,,,,,,,BLC登録解除コマンド, +,Cmd_BCT_SET_BLOCK_POSITION,OBC,0x001A,2,uint16_t,bc_index,uint8_t,cmd_index,,,,,,,,,,,BLC操作ポインタ設定コマンド, +,Cmd_BCT_COPY_BCT,OBC,0x001B,2,uint16_t,dst_bc_index,uint16_t,src_bc_index,,,,,,,,,,,BCT の内容を別の場所にコピー, +,Cmd_BCT_OVERWRITE_CMD,OBC,0x001C,5,uint16_t,CMD_CODE,uint32_t,TI,uint16_t,pos.block,uint8_t,pos.cmd,raw,cmd_param (big endian),,,danger,,BCTの内容を上書き, +,Cmd_BCT_FILL_NOP,OBC,0x001D,1,uint8_t,,,,,,,,,,,,,,テレメ運用時の10個BCをNOP埋めする.(NOP個数), **,BCEコマンド,,,,,,,,,,,,,,,,,,, -,Cmd_BCE_ACTIVATE_BLOCK,OBC,0x001A,0,,,,,,,,,,,,,,,BLC有効化コマンド, -,Cmd_BCE_ACTIVATE_BLOCK_BY_ID,OBC,0x001B,1,uint16_t,bc_index,,,,,,,,,,,,,BCを(無条件に)有効化, -,Cmd_BCE_INACTIVATE_BLOCK_BY_ID,OBC,0x001C,1,uint16_t,bc_index,,,,,,,,,,,,,BCを(無条件に)無効化, -,Cmd_BCE_ROTATE_BLOCK,OBC,0x001D,1,uint16_t,bc_index,,,,,,,,,,,,,BLC回転コマンド, -,Cmd_BCE_COMBINE_BLOCK,OBC,0x001E,1,uint16_t,bc_index,,,,,,,,,,,,,BLC融合コマンド, -,Cmd_BCE_TIMELIMIT_COMBINE_BLOCK,OBC,0x001F,2,uint16_t,bc_index,uint8_t,limit_step,,,,,,,,,,,時間制限付きBLC融合コマンド, -,Cmd_BCE_RESET_ROTATOR_INFO,OBC,0x0020,0,,,,,,,,,,,,,danger,,カウンタ類リセット, -,Cmd_BCE_RESET_COMBINER_INFO,OBC,0x0021,0,,,,,,,,,,,,,danger,,カウンタ類リセット, -,Cmd_BCE_SET_ROTATE_INTERVAL,OBC,0x0022,2,uint16_t,,uint16_t,,,,,,,,,,,,BC回転時の回転間隔周期を設定する, +,Cmd_BCE_ACTIVATE_BLOCK,OBC,0x001E,0,,,,,,,,,,,,,,,BLC有効化コマンド, +,Cmd_BCE_ACTIVATE_BLOCK_BY_ID,OBC,0x001F,1,uint16_t,bc_index,,,,,,,,,,,,,BCを(無条件に)有効化, +,Cmd_BCE_INACTIVATE_BLOCK_BY_ID,OBC,0x0020,1,uint16_t,bc_index,,,,,,,,,,,,,BCを(無条件に)無効化, +,Cmd_BCE_ROTATE_BLOCK,OBC,0x0021,1,uint16_t,bc_index,,,,,,,,,,,,,BLC回転コマンド, +,Cmd_BCE_COMBINE_BLOCK,OBC,0x0022,1,uint16_t,bc_index,,,,,,,,,,,,,BLC融合コマンド, +,Cmd_BCE_TIMELIMIT_COMBINE_BLOCK,OBC,0x0023,2,uint16_t,bc_index,uint8_t,limit_step,,,,,,,,,,,時間制限付きBLC融合コマンド, +,Cmd_BCE_RESET_ROTATOR_INFO,OBC,0x0024,0,,,,,,,,,,,,,danger,,カウンタ類リセット, +,Cmd_BCE_RESET_COMBINER_INFO,OBC,0x0025,0,,,,,,,,,,,,,danger,,カウンタ類リセット, +,Cmd_BCE_SET_ROTATE_INTERVAL,OBC,0x0026,2,uint16_t,,uint16_t,,,,,,,,,,,,BC回転時の回転間隔周期を設定する, **,Data Recorder用コマンド,,,,,,,,,,,,,,,,,,, *,Cmd_DR_SET_PARAMS,OBC,,4,uint8_t,partition ID,uint32_t,先頭Addr,uint32_t,終端Addr,uint8_t,書き込みモード,,,,,,,パーティション設定, *,Cmd_DR_SET_WP,OBC,,2,uint8_t,partition ID,uint32_t,pointer,,,,,,,,,,,書き込みポインタ設定, @@ -69,24 +78,24 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, *,Cmd_MEM_SET_DESTINATION,OBC,,1,uint32_t,コピー先アドレス,,,,,,,,,,,,,コピー先設定, *,Cmd_MEM_COPY_REGION_SEQ,OBC,,1,uint32_t,コピー幅,,,,,,,,,,,,,領域コピー, **,EventLogger,,,,,,,,,,,,,,,,,,, -,Cmd_EL_INIT,OBC,0x0023,0,,,,,,,,,,,,,,,EL初期化, -,Cmd_EL_CLEAR_LOG_ALL,OBC,0x0024,0,,,,,,,,,,,,,,,全ログ削除, -,Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL,OBC,0x0025,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,エラーレベル指定ログ削除, -,Cmd_EL_CLEAR_STATISTICS,OBC,0x0026,0,,,,,,,,,,,,,,,統計情報削除, -,Cmd_EL_CLEAR_TLOG,OBC,0x0027,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,TLog削除, -,Cmd_EL_CLEAR_CLOG,OBC,0x0028,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,CLog削除, -,Cmd_EL_RECORD_EVENT,OBC,0x0029,4,uint32_t,group,uint32_t,local,uint8_t,Level: High=0; Low=1; EL=2; EH=3,uint32_t,note,,,,,,,イベント記録, -,Cmd_EL_TLOG_SET_PAGE_FOR_TLM,OBC,0x002A,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,TLogのダウンリンクテレメ設定, -,Cmd_EL_CLOG_SET_PAGE_FOR_TLM,OBC,0x002B,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,CLogのダウンリンクテレメ設定, -,Cmd_EL_INIT_LOGGING_SETTINGS,OBC,0x002C,0,,,,,,,,,,,,,,,ログ設定を初期化, -,Cmd_EL_ENABLE_LOGGING,OBC,0x002D,1,uint32_t,group,,,,,,,,,,,,,ロギングを有効化, -,Cmd_EL_DISABLE_LOGGING,OBC,0x002E,1,uint32_t,group,,,,,,,,,,,,,ロギングを無効化, -,Cmd_EL_ENABLE_LOGGING_ALL,OBC,0x002F,0,,,,,,,,,,,,,,,すべてのロギングを有効化, -,Cmd_EL_DISABLE_LOGGING_ALL,OBC,0x0030,0,,,,,,,,,,,,,,,すべてのロギングを無効化, -,Cmd_EL_ENABLE_TLOG_OVERWRITE,OBC,0x0031,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,TLogのログ上書きを有効化, -,Cmd_EL_DISABLE_TLOG_OVERWRITE,OBC,0x0032,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,TLogのログ上書きを無効化, -,Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL,OBC,0x0033,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを有効化, -,Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL,OBC,0x0034,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを無効化, +,Cmd_EL_INIT,OBC,0x0027,0,,,,,,,,,,,,,,,EL初期化, +,Cmd_EL_CLEAR_LOG_ALL,OBC,0x0028,0,,,,,,,,,,,,,,,全ログ削除, +,Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL,OBC,0x0029,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,エラーレベル指定ログ削除, +,Cmd_EL_CLEAR_STATISTICS,OBC,0x002A,0,,,,,,,,,,,,,,,統計情報削除, +,Cmd_EL_CLEAR_TLOG,OBC,0x002B,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,TLog削除, +,Cmd_EL_CLEAR_CLOG,OBC,0x002C,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,CLog削除, +,Cmd_EL_RECORD_EVENT,OBC,0x002D,4,uint32_t,group,uint32_t,local,uint8_t,Level: High=0; Low=1; EL=2; EH=3,uint32_t,note,,,,,,,イベント記録, +,Cmd_EL_TLOG_SET_PAGE_FOR_TLM,OBC,0x002E,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,TLogのダウンリンクテレメ設定, +,Cmd_EL_CLOG_SET_PAGE_FOR_TLM,OBC,0x002F,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,CLogのダウンリンクテレメ設定, +,Cmd_EL_INIT_LOGGING_SETTINGS,OBC,0x0030,0,,,,,,,,,,,,,,,ログ設定を初期化, +,Cmd_EL_ENABLE_LOGGING,OBC,0x0031,1,uint32_t,group,,,,,,,,,,,,,ロギングを有効化, +,Cmd_EL_DISABLE_LOGGING,OBC,0x0032,1,uint32_t,group,,,,,,,,,,,,,ロギングを無効化, +*,Cmd_EL_ENABLE_LOGGING_ALL,OBC,,0,,,,,,,,,,,,,,,すべてのロギングを有効化, +*,Cmd_EL_DISABLE_LOGGING_ALL,OBC,,0,,,,,,,,,,,,,,,すべてのロギングを無効化, +,Cmd_EL_ENABLE_TLOG_OVERWRITE,OBC,0x0033,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,TLogのログ上書きを有効化, +,Cmd_EL_DISABLE_TLOG_OVERWRITE,OBC,0x0034,1,uint8_t,Level: High=0; Low=1; EL=2; EH=3,,,,,,,,,,,,,TLogのログ上書きを無効化, +*,Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL,OBC,,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを有効化, +*,Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL,OBC,,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを無効化, **,EventHandler,,,,,,,,,,,,,,,,,,, ,Cmd_EH_INIT,OBC,0x0035,0,,,,,,,,,,,,,,,EHの初期化, ,Cmd_EH_CLEAR_ALL_RULE,OBC,0x0036,0,,,,,,,,,,,,,,,EHのすべてのルールをクリア, @@ -989,12 +998,3 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,, diff --git a/src/src_user/TlmCmd/user_packet_handler.c b/src/src_user/TlmCmd/user_packet_handler.c index d8198981..fa9badaf 100644 --- a/src/src_user/TlmCmd/user_packet_handler.c +++ b/src/src_user/TlmCmd/user_packet_handler.c @@ -33,4 +33,22 @@ CCP_CmdRet PH_user_cmd_router(const CommonCmdPacket* packet) } } +TF_TLM_FUNC_ACK PH_user_telemetry_router(APID apid, + TLM_CODE tlm_id, + uint8_t* packet, + uint16_t* len, + uint16_t max_len) +{ + (void)tlm_id; + (void)packet; + (void)len; + (void)max_len; + + switch (apid) + { + default: + return TF_TLM_FUNC_ACK_NOT_DEFINED; + } +} + #pragma section diff --git a/src/src_user/TlmCmd/user_packet_handler.h b/src/src_user/TlmCmd/user_packet_handler.h index 84a750f0..31539e0a 100644 --- a/src/src_user/TlmCmd/user_packet_handler.h +++ b/src/src_user/TlmCmd/user_packet_handler.h @@ -8,6 +8,9 @@ #include #include #include +#include +#include "telemetry_definitions.h" +#include "../Settings/TlmCmd/Ccsds/apid_define.h" /** * @brief PH のユーザー固有部初期化処理 @@ -44,4 +47,19 @@ PH_ACK PH_user_analyze_cmd(const CommonCmdPacket* packet); */ CCP_CmdRet PH_user_cmd_router(const CommonCmdPacket* packet); +/** + * @brief 2nd OBC のテレメを転送するために, APID からテレメを判定してルーティングする // FIXME: 命名, router ではない? + * @param[in] apid: 2nd OBC の Tlm APID + * @param[in] tlm_id: 2nd OBC の Tlm ID + * @param[out] packet: テレメを作る uint8_t にシリアライズされた packet へのポインタ + * @param[out] len: 転送するテレメのパケット長 + * @param[in] max_len: 許容できる最大テレメパケット長 + * @return TF_TLM_FUNC_ACK + */ +TF_TLM_FUNC_ACK PH_user_telemetry_router(APID apid, + TLM_CODE tlm_id, + uint8_t* packet, + uint16_t* len, + uint16_t max_len); + #endif From b364867fddd0f574b63cd658f4ebc16917350cc3 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 00:59:22 +0900 Subject: [PATCH 047/176] =?UTF-8?q?CCP=5FDEST=5FTYPE=5FTO=5FAPID=20?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_user/Drivers/Etc/mobc.c | 4 ++-- .../Settings/TlmCmd/common_cmd_packet_define.c | 3 ++- .../Settings/TlmCmd/common_cmd_packet_define.h | 14 +++++++------- src/src_user/TlmCmd/user_packet_handler.c | 1 + 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/src_user/Drivers/Etc/mobc.c b/src/src_user/Drivers/Etc/mobc.c index 0cb7b117..d9e4ccf4 100644 --- a/src/src_user/Drivers/Etc/mobc.c +++ b/src/src_user/Drivers/Etc/mobc.c @@ -114,8 +114,8 @@ static DS_ERR_CODE MOBC_analyze_rec_data_(DS_StreamConfig* p_stream_config, void // CCP_EXEC_TYPE_TL_FROM_GS <- GSからMOBCのキューに入らず直接転送されたもの // CCP_EXEC_TYPE_BC <- GSからMOBCのキューに入らず直接転送されたもの // CCP_EXEC_TYPE_RT <- これがGS→MOBCとの違いで,MOBCのTLC/BCキューに溜まって実行されたもの - // TCP_CMD_DEST_TYPE: - // TCP_CMD_DEST_TYPE_TO_ME (TCP_CMD_DEST_TYPE_TO_AOBC の可能性はなくはないが,MEに上書きされているはず) + // CCP_DEST_TYPE: + // CCP_DEST_TYPE_TO_ME (CCP_DEST_TYPE_TO_APID, CCP_DEST_TYPE_TO_AOBC の可能性はなくはないが, ME に上書きされているはず) // 通信的にはOKなので, OK を返すのでいいという認識 mobc_driver->info.c2a.ph_ack = PH_analyze_cmd_packet(&packet); diff --git a/src/src_user/Settings/TlmCmd/common_cmd_packet_define.c b/src/src_user/Settings/TlmCmd/common_cmd_packet_define.c index 8bf81cf3..b175240f 100644 --- a/src/src_user/Settings/TlmCmd/common_cmd_packet_define.c +++ b/src/src_user/Settings/TlmCmd/common_cmd_packet_define.c @@ -12,7 +12,8 @@ CCP_DEST_TYPE CCP_get_dest_type_from_uint8(uint8_t dest_type) case CCP_DEST_TYPE_TO_ME: // FALL THROUGH case CCP_DEST_TYPE_TO_MOBC: // FALL THROUGH case CCP_DEST_TYPE_TO_AOBC: // FALL THROUGH - case CCP_DEST_TYPE_TO_TOBC: + case CCP_DEST_TYPE_TO_TOBC: // FALL THROUGH + case CCP_DEST_TYPE_TO_APID: return (CCP_DEST_TYPE)dest_type; default: return CCP_DEST_TYPE_TO_UNKOWN; diff --git a/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h b/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h index c8fd624a..db45ab6c 100644 --- a/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h +++ b/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h @@ -19,17 +19,17 @@ typedef CmdSpacePacket CommonCmdPacket; /** * @enum CCP_DEST_TYPE * @brief コマンドの解釈の宛先を規定 - * @note TO_ME: 自分自身 → 自分自身の TLC や BC として解釈.コマンド実行時に必要に応じて別 OBC へ配送 (この定義は C2A Core で使うため,どんな C2A でも必須) - * @note TO_*: 転送先の TL や BC として解釈 (直接指定 OBC へ配送. GS から来たコマンドを自身のキューにいれない) + * @note 詳細は https://github.com/ut-issl/c2a-core/blob/develop/Docs/Core/communication.md を参照 * @note 4bit を想定 */ typedef enum { - CCP_DEST_TYPE_TO_ME = 0, - CCP_DEST_TYPE_TO_MOBC = 1, - CCP_DEST_TYPE_TO_AOBC = 2, - CCP_DEST_TYPE_TO_TOBC = 3, - CCP_DEST_TYPE_TO_UNKOWN = 4 + CCP_DEST_TYPE_TO_ME = 0x0, + CCP_DEST_TYPE_TO_MOBC = 0x1, // CCP_DEST_TYPE_TO_APID の追加に伴い deprecated + CCP_DEST_TYPE_TO_AOBC = 0x2, // CCP_DEST_TYPE_TO_APID の追加に伴い deprecated + CCP_DEST_TYPE_TO_TOBC = 0x3, // CCP_DEST_TYPE_TO_APID の追加に伴い deprecated + CCP_DEST_TYPE_TO_UNKOWN = 0xe, + CCP_DEST_TYPE_TO_APID = 0xf } CCP_DEST_TYPE; /** diff --git a/src/src_user/TlmCmd/user_packet_handler.c b/src/src_user/TlmCmd/user_packet_handler.c index fa9badaf..d3193a60 100644 --- a/src/src_user/TlmCmd/user_packet_handler.c +++ b/src/src_user/TlmCmd/user_packet_handler.c @@ -17,6 +17,7 @@ PH_ACK PH_user_analyze_cmd(const CommonCmdPacket* packet) switch (CCP_get_dest_type(packet)) { default: + // 2nd OBC なので,自分宛て以外のパケットはないはず return PH_ACK_UNKNOWN; } } From 5920ae4ed3cdaac2a446a6c3b2eaf2b24af28be9 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 01:08:31 +0900 Subject: [PATCH 048/176] run tlm-cmd generator --- .../TlmCmd/block_command_definitions.h | 2 +- src/src_user/TlmCmd/command_definitions.c | 16 +++-- src/src_user/TlmCmd/command_definitions.h | 64 +++++++++---------- 3 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/src_user/TlmCmd/block_command_definitions.h b/src/src_user/TlmCmd/block_command_definitions.h index 2ef34fa5..6fe3bf62 100644 --- a/src/src_user/TlmCmd/block_command_definitions.h +++ b/src/src_user/TlmCmd/block_command_definitions.h @@ -50,7 +50,7 @@ typedef enum // ==== 各系領域 ==== // ./C2A/TlmCmd/NormalBlockCommandDefinition/で定義 - // アノマリハンドラはBC_AH_など,接頭辞を適切につけること! + // イベントハンドラはBC_EH_など,接頭辞を適切につけること! // AOCS BC_HK_CYCLIC_TLM = 30, diff --git a/src/src_user/TlmCmd/command_definitions.c b/src/src_user/TlmCmd/command_definitions.c index db9cf162..3347511d 100644 --- a/src/src_user/TlmCmd/command_definitions.c +++ b/src/src_user/TlmCmd/command_definitions.c @@ -31,6 +31,10 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_TLCD_SET_ID_FOR_TLM].cmd_func = Cmd_TLCD_SET_ID_FOR_TLM; cmd_table[Cmd_CODE_TLCD_SET_PAGE_FOR_TLM].cmd_func = Cmd_TLCD_SET_PAGE_FOR_TLM; cmd_table[Cmd_CODE_GENERATE_TLM].cmd_func = Cmd_GENERATE_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].cmd_func = Cmd_TG_GENERATE_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_HK_TLM].cmd_func = Cmd_TG_GENERATE_HK_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_MS_TLM].cmd_func = Cmd_TG_GENERATE_MS_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_ST_TLM].cmd_func = Cmd_TG_GENERATE_ST_TLM; cmd_table[Cmd_CODE_BCT_CLEAR_BLOCK].cmd_func = Cmd_BCT_CLEAR_BLOCK; cmd_table[Cmd_CODE_BCT_SET_BLOCK_POSITION].cmd_func = Cmd_BCT_SET_BLOCK_POSITION; cmd_table[Cmd_CODE_BCT_COPY_BCT].cmd_func = Cmd_BCT_COPY_BCT; @@ -57,12 +61,8 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_EL_INIT_LOGGING_SETTINGS].cmd_func = Cmd_EL_INIT_LOGGING_SETTINGS; cmd_table[Cmd_CODE_EL_ENABLE_LOGGING].cmd_func = Cmd_EL_ENABLE_LOGGING; cmd_table[Cmd_CODE_EL_DISABLE_LOGGING].cmd_func = Cmd_EL_DISABLE_LOGGING; - cmd_table[Cmd_CODE_EL_ENABLE_LOGGING_ALL].cmd_func = Cmd_EL_ENABLE_LOGGING_ALL; - cmd_table[Cmd_CODE_EL_DISABLE_LOGGING_ALL].cmd_func = Cmd_EL_DISABLE_LOGGING_ALL; cmd_table[Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE].cmd_func = Cmd_EL_ENABLE_TLOG_OVERWRITE; cmd_table[Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE].cmd_func = Cmd_EL_DISABLE_TLOG_OVERWRITE; - cmd_table[Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE_ALL].cmd_func = Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL; - cmd_table[Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE_ALL].cmd_func = Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL; cmd_table[Cmd_CODE_EH_INIT].cmd_func = Cmd_EH_INIT; cmd_table[Cmd_CODE_EH_CLEAR_ALL_RULE].cmd_func = Cmd_EH_CLEAR_ALL_RULE; cmd_table[Cmd_CODE_EH_LOAD_DEFAULT_RULE].cmd_func = Cmd_EH_LOAD_DEFAULT_RULE; @@ -274,6 +274,14 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_GENERATE_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_GENERATE_TLM].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_GENERATE_TLM].param_size_infos[1].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[1].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[1].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_HK_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_MS_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_ST_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_ST_TLM].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_BCT_CLEAR_BLOCK].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_2BYTE; cmd_table[Cmd_CODE_BCT_SET_BLOCK_POSITION].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_2BYTE; cmd_table[Cmd_CODE_BCT_SET_BLOCK_POSITION].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; diff --git a/src/src_user/TlmCmd/command_definitions.h b/src/src_user/TlmCmd/command_definitions.h index c5732cfe..585b4baf 100644 --- a/src/src_user/TlmCmd/command_definitions.h +++ b/src/src_user/TlmCmd/command_definitions.h @@ -29,38 +29,38 @@ typedef enum Cmd_CODE_TLCD_SET_ID_FOR_TLM = 0x0012, Cmd_CODE_TLCD_SET_PAGE_FOR_TLM = 0x0013, Cmd_CODE_GENERATE_TLM = 0x0014, - Cmd_CODE_BCT_CLEAR_BLOCK = 0x0015, - Cmd_CODE_BCT_SET_BLOCK_POSITION = 0x0016, - Cmd_CODE_BCT_COPY_BCT = 0x0017, - Cmd_CODE_BCT_OVERWRITE_CMD = 0x0018, - Cmd_CODE_BCT_FILL_NOP = 0x0019, - Cmd_CODE_BCE_ACTIVATE_BLOCK = 0x001A, - Cmd_CODE_BCE_ACTIVATE_BLOCK_BY_ID = 0x001B, - Cmd_CODE_BCE_INACTIVATE_BLOCK_BY_ID = 0x001C, - Cmd_CODE_BCE_ROTATE_BLOCK = 0x001D, - Cmd_CODE_BCE_COMBINE_BLOCK = 0x001E, - Cmd_CODE_BCE_TIMELIMIT_COMBINE_BLOCK = 0x001F, - Cmd_CODE_BCE_RESET_ROTATOR_INFO = 0x0020, - Cmd_CODE_BCE_RESET_COMBINER_INFO = 0x0021, - Cmd_CODE_BCE_SET_ROTATE_INTERVAL = 0x0022, - Cmd_CODE_EL_INIT = 0x0023, - Cmd_CODE_EL_CLEAR_LOG_ALL = 0x0024, - Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL = 0x0025, - Cmd_CODE_EL_CLEAR_STATISTICS = 0x0026, - Cmd_CODE_EL_CLEAR_TLOG = 0x0027, - Cmd_CODE_EL_CLEAR_CLOG = 0x0028, - Cmd_CODE_EL_RECORD_EVENT = 0x0029, - Cmd_CODE_EL_TLOG_SET_PAGE_FOR_TLM = 0x002A, - Cmd_CODE_EL_CLOG_SET_PAGE_FOR_TLM = 0x002B, - Cmd_CODE_EL_INIT_LOGGING_SETTINGS = 0x002C, - Cmd_CODE_EL_ENABLE_LOGGING = 0x002D, - Cmd_CODE_EL_DISABLE_LOGGING = 0x002E, - Cmd_CODE_EL_ENABLE_LOGGING_ALL = 0x002F, - Cmd_CODE_EL_DISABLE_LOGGING_ALL = 0x0030, - Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE = 0x0031, - Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE = 0x0032, - Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE_ALL = 0x0033, - Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE_ALL = 0x0034, + Cmd_CODE_TG_GENERATE_TLM = 0x0015, + Cmd_CODE_TG_GENERATE_HK_TLM = 0x0016, + Cmd_CODE_TG_GENERATE_MS_TLM = 0x0017, + Cmd_CODE_TG_GENERATE_ST_TLM = 0x0018, + Cmd_CODE_BCT_CLEAR_BLOCK = 0x0019, + Cmd_CODE_BCT_SET_BLOCK_POSITION = 0x001A, + Cmd_CODE_BCT_COPY_BCT = 0x001B, + Cmd_CODE_BCT_OVERWRITE_CMD = 0x001C, + Cmd_CODE_BCT_FILL_NOP = 0x001D, + Cmd_CODE_BCE_ACTIVATE_BLOCK = 0x001E, + Cmd_CODE_BCE_ACTIVATE_BLOCK_BY_ID = 0x001F, + Cmd_CODE_BCE_INACTIVATE_BLOCK_BY_ID = 0x0020, + Cmd_CODE_BCE_ROTATE_BLOCK = 0x0021, + Cmd_CODE_BCE_COMBINE_BLOCK = 0x0022, + Cmd_CODE_BCE_TIMELIMIT_COMBINE_BLOCK = 0x0023, + Cmd_CODE_BCE_RESET_ROTATOR_INFO = 0x0024, + Cmd_CODE_BCE_RESET_COMBINER_INFO = 0x0025, + Cmd_CODE_BCE_SET_ROTATE_INTERVAL = 0x0026, + Cmd_CODE_EL_INIT = 0x0027, + Cmd_CODE_EL_CLEAR_LOG_ALL = 0x0028, + Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL = 0x0029, + Cmd_CODE_EL_CLEAR_STATISTICS = 0x002A, + Cmd_CODE_EL_CLEAR_TLOG = 0x002B, + Cmd_CODE_EL_CLEAR_CLOG = 0x002C, + Cmd_CODE_EL_RECORD_EVENT = 0x002D, + Cmd_CODE_EL_TLOG_SET_PAGE_FOR_TLM = 0x002E, + Cmd_CODE_EL_CLOG_SET_PAGE_FOR_TLM = 0x002F, + Cmd_CODE_EL_INIT_LOGGING_SETTINGS = 0x0030, + Cmd_CODE_EL_ENABLE_LOGGING = 0x0031, + Cmd_CODE_EL_DISABLE_LOGGING = 0x0032, + Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE = 0x0033, + Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE = 0x0034, Cmd_CODE_EH_INIT = 0x0035, Cmd_CODE_EH_CLEAR_ALL_RULE = 0x0036, Cmd_CODE_EH_LOAD_DEFAULT_RULE = 0x0037, From f559f019b5e43e6290df062934d40c272f7bce5f Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 01:23:30 +0900 Subject: [PATCH 049/176] =?UTF-8?q?git=20revision=20=E3=82=92=E3=81=A9?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=8B=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_user/Library/CMakeLists.txt | 1 - src/src_user/Library/git_revision.c | 17 ------------ src/src_user/Library/git_revision.h | 18 ------------- src/src_user/Script/Git/revision.bat | 30 +++++++++++++++++++++ src/src_user/Script/Git/revision.sh | 22 +++++++++++++++ src/src_user/Script/git_revision.bat | 29 -------------------- src/src_user/Script/git_revision.sh | 18 ------------- src/src_user/Script/git_revision.tmp | 17 ------------ src/src_user/Settings/git_revision_config.h | 2 ++ src/src_user/TlmCmd/telemetry_source.h | 2 +- 10 files changed, 55 insertions(+), 101 deletions(-) delete mode 100644 src/src_user/Library/git_revision.c delete mode 100644 src/src_user/Library/git_revision.h create mode 100644 src/src_user/Script/Git/revision.bat create mode 100644 src/src_user/Script/Git/revision.sh delete mode 100644 src/src_user/Script/git_revision.bat delete mode 100644 src/src_user/Script/git_revision.sh delete mode 100644 src/src_user/Script/git_revision.tmp create mode 100644 src/src_user/Settings/git_revision_config.h diff --git a/src/src_user/Library/CMakeLists.txt b/src/src_user/Library/CMakeLists.txt index 412891d0..8a925b5e 100644 --- a/src/src_user/Library/CMakeLists.txt +++ b/src/src_user/Library/CMakeLists.txt @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.13) project(C2A_USER_LIB) set(C2A_SRCS - git_revision.c pid_control.c ControlUtility/cross_product_control.c ControlUtility/gyroscopic_effect.c diff --git a/src/src_user/Library/git_revision.c b/src/src_user/Library/git_revision.c deleted file mode 100644 index d071a367..00000000 --- a/src/src_user/Library/git_revision.c +++ /dev/null @@ -1,17 +0,0 @@ -#pragma section REPRO -/** - * @file - * @brief git revisionをコードに埋め込む - * - * @author 牛 佳成 - * @date 2021.01.11 - */ - -#include "git_revision.h" - -const char GIT_REV_CORE[41] = "0000000000000000000000000000000000000000"; -const uint32_t GIT_REV_CORE_SHORT = 0x0000000; -const char GIT_REV_USER[41] = "0000000000000000000000000000000000000000"; -const uint32_t GIT_REV_USER_SHORT = 0x0000000; - -#pragma section diff --git a/src/src_user/Library/git_revision.h b/src/src_user/Library/git_revision.h deleted file mode 100644 index 4c07128c..00000000 --- a/src/src_user/Library/git_revision.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @file - * @brief git revisionをコードに埋め込む - * - * @author 牛 佳成 - * @date 2021.01.11 - */ -#ifndef GIT_REVISION_H_ -#define GIT_REVISION_H_ - -#include - -extern const char GIT_REV_CORE[41]; -extern const uint32_t GIT_REV_CORE_SHORT; -extern const char GIT_REV_USER[41]; -extern const uint32_t GIT_REV_USER_SHORT; - -#endif // GIT_REVISION_H_ diff --git a/src/src_user/Script/Git/revision.bat b/src/src_user/Script/Git/revision.bat new file mode 100644 index 00000000..0ddf60b4 --- /dev/null +++ b/src/src_user/Script/Git/revision.bat @@ -0,0 +1,30 @@ +@ECHO OFF +REM generate C header for Git revision + +REM move to current directory (src_user/Script/Git) +cd /d %~dp0 + +REM move to src_user +cd ..\.. + +for /f "usebackq" %%a in (`"git log --pretty=format:%%H -1"`) do set git_rev_user=%%a +for /f "usebackq" %%a in (`"git log --pretty=format:%%h -1"`) do set git_rev_user_short=%%a + +REM generate header +REM MEMO: このヒアドキュメントもどきの書き方はwineのcmd.exe(Windows 6.1.7601)だと動かない? +( +echo.#ifndef GIT_REVISION_CONFIG_H_ +echo.#define GIT_REVISION_CONFIG_H_ +echo. +echo./* This file is generated by src_user/Script/Git/revision.bat */ +echo.#define C2A_GIT_REVISION_GENERATED +echo. +call ..\src_core\Script\Git\revision.bat +echo.#define GIT_REVISION_C2A_USER "%git_rev_user%" +echo.#define GIT_REVISION_C2A_USER_SHORT 0x%git_rev_user_short% +echo. +echo.#endif // GIT_REVISION_CONFIG_H_ +) > Settings\git_revision_config.h + +REM move to current directory (src_user/Script/Git) +cd /d %~dp0 diff --git a/src/src_user/Script/Git/revision.sh b/src/src_user/Script/Git/revision.sh new file mode 100644 index 00000000..8501727c --- /dev/null +++ b/src/src_user/Script/Git/revision.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# generate C header for Git revision + +cd $(dirname $0) # src/src_user/Script/Git +cd ../../ # src/src_user + +# get core revision +git_revs_core=$(../src_core/Script/Git/revision.sh) + +git_rev_user=$(git log --pretty=format:%H -1) +git_rev_user_short=$(git log --pretty=format:%h -1) + +tee Settings/git_revision_config.h << EOS +#ifndef GIT_REVISION_CONFIG_H_ +#define GIT_REVISION_CONFIG_H_ +/* This file is generated by src_user/Script/Git/revision.sh */ +#define C2A_GIT_REVISION_GENERATED +${git_revs_core} +#define GIT_REVISION_C2A_USER "${git_rev_user}" +#define GIT_REVISION_C2A_USER_SHORT 0x${git_rev_user_short} +#endif // GIT_REVISION_CONFIG_H_ +EOS diff --git a/src/src_user/Script/git_revision.bat b/src/src_user/Script/git_revision.bat deleted file mode 100644 index 99aab22e..00000000 --- a/src/src_user/Script/git_revision.bat +++ /dev/null @@ -1,29 +0,0 @@ -@ECHO OFF - -REM @brief git revision ߍ - -REM current directoryɈړ -cd /d %~dp0 - -for /f "usebackq" %%a in (`"git log --pretty=format:%%H -1"`) do set git_rev_user=%%a -for /f "usebackq" %%a in (`"git log --pretty=format:%%h -1"`) do set git_rev_user_short=%%a - -cd ..\..\src_core - -for /f "usebackq" %%a in (`"git log --pretty=format:%%H -1"`) do set git_rev_core=%%a -for /f "usebackq" %%a in (`"git log --pretty=format:%%h -1"`) do set git_rev_core_short=%%a - -cd ..\src_user\Script - -if exist ..\Library\git_revision.c del ..\Library\git_revision.c - -setlocal EnableDelayedExpansion -for /f "delims=" %%a in (git_revision.tmp) do ( - set line=%%a - set line=!line:git_rev_core_hash=%git_rev_core%! - set line=!line:git_rev_core_short_hash=%git_rev_core_short%! - set line=!line:git_rev_user_hash=%git_rev_user%! - set line=!line:git_rev_user_short_hash=%git_rev_user_short%! - echo !line! >> ..\Library\git_revision.c -) -endlocal diff --git a/src/src_user/Script/git_revision.sh b/src/src_user/Script/git_revision.sh deleted file mode 100644 index 756a5f33..00000000 --- a/src/src_user/Script/git_revision.sh +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/sh - -# @brief git revision 埋め込み - -# current directoryに移動 -cd `dirname $0` - -git_rev_user=$(git log --pretty=format:%H -1) -git_rev_user_short=$(git log --pretty=format:%h -1) - -cd ../../src_core - -git_rev_core=$(git log --pretty=format:%H -1) -git_rev_core_short=$(git log --pretty=format:%h -1) - -cd ../src_user/Script - -sed -e s/git_rev_core_hash/${git_rev_core}/ -e s/git_rev_core_short_hash/${git_rev_core_short}/ -e s/git_rev_core_short_hash/${git_rev_core_short}/ -e s/git_rev_user_hash/${git_rev_user}/ -e s/git_rev_user_short_hash/${git_rev_user_short}/ git_revision.tmp > ../Library/git_revision.c diff --git a/src/src_user/Script/git_revision.tmp b/src/src_user/Script/git_revision.tmp deleted file mode 100644 index c49865f0..00000000 --- a/src/src_user/Script/git_revision.tmp +++ /dev/null @@ -1,17 +0,0 @@ -#pragma section REPRO -/** - * @file - * @brief git revisionをコードに埋め込む - * - * @author 牛 佳成 - * @date 2021.01.11 - */ - -#include "git_revision.h" - -const char GIT_REV_CORE[41] = "git_rev_core_hash"; -const uint32_t GIT_REV_CORE_SHORT = 0xgit_rev_core_short_hash; -const char GIT_REV_USER[41] = "git_rev_user_hash"; -const uint32_t GIT_REV_USER_SHORT = 0xgit_rev_user_short_hash; - -#pragma section diff --git a/src/src_user/Settings/git_revision_config.h b/src/src_user/Settings/git_revision_config.h new file mode 100644 index 00000000..6974ff68 --- /dev/null +++ b/src/src_user/Settings/git_revision_config.h @@ -0,0 +1,2 @@ +// いったん git revision は無効化しておく +#define C2A_GIT_REVISION_IGNORE diff --git a/src/src_user/TlmCmd/telemetry_source.h b/src/src_user/TlmCmd/telemetry_source.h index 9eda117b..ee98a208 100644 --- a/src/src_user/TlmCmd/telemetry_source.h +++ b/src/src_user/TlmCmd/telemetry_source.h @@ -5,6 +5,7 @@ #ifndef TELEMETRY_SOURCE_H_ #define TELEMETRY_SOURCE_H_ +#include #include #include #include @@ -16,6 +17,5 @@ #include #include "../Applications/app_headers.h" -#include "../Library/git_revision.h" #endif // TELEMETRY_SOURCE_H_ From 1b9c1463df9848177a889ab0f596daff67dab561 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 01:27:46 +0900 Subject: [PATCH 050/176] update tlm-cmd generator info in readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1935c471..6f6cb3f0 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ $ git submodule update - [テレコマDBの使い方](https://github.com/ut-issl/tlm-cmd-db) 2. tlm-cmd-generator を実行してソースコードに反映させる - [tlm-cmd-generatorの使い方](https://github.com/ut-issl/c2a-tlm-cmd-code-generator) - - [v.1.4.0-issl-variant](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/tree/v1.4.0-issl-variant) に git checkout すること + - [ISSL用のブランチ](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/tree/feature/issl) に git checkout すること - settings.json は AOBC 用に以下のように編集すること ``` { @@ -67,6 +67,7 @@ $ git submodule update "db_path" : "各自の環境でのc2a-aobc/src/src_user/Settings/TlmCmd/DataBase/への相対パス", "db_prefix" : "ISSL6U_AOBC", "tlm_id_range" : ["0x00", "0x100"], + "is_cmd_prefixed_in_db" : 1, "input_file_encoding" : "utf-8", "output_file_encoding" : "utf-8", "is_main_obc" : 0 From 6fc3d8e8bc3a40038da20d7b4b5a4c5ac26a58cc Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 26 May 2023 20:18:49 +0200 Subject: [PATCH 051/176] Fix build CI --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c94952f..63313556 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ on: types: [opened, synchronize, reopened, labeled] paths: - '.github/workflows/build.yml' - - 'c2a-aocs/CMakeLists.txt' - - 'c2a-aocs/src/**' + - 'c2a-aobc/CMakeLists.txt' + - 'c2a-aobc/src/**' env: S2E_AOBC_VERSION: v2.0.1 From 785feaf54675fcfed5ba28b8992573293175be89 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 27 May 2023 13:11:49 +0900 Subject: [PATCH 052/176] =?UTF-8?q?obc=5Ftime=5Fconfig=20=E3=81=AE=20inclu?= =?UTF-8?q?de=20=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c index 66afd0bd..e0566ab7 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c @@ -6,6 +6,7 @@ #include #include +#include #include "../../../app_registry.h" #include "quaternion_interpolator.h" From f05ad543cc4d4830edb70f276a1421de9b8917ac Mon Sep 17 00:00:00 2001 From: hirotaka sekine Date: Thu, 1 Jun 2023 14:03:12 +0900 Subject: [PATCH 053/176] =?UTF-8?q?vcxproj=E3=81=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- C2A_AOBC.vcxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/C2A_AOBC.vcxproj b/C2A_AOBC.vcxproj index 6a04bb39..a1dbd5bf 100644 --- a/C2A_AOBC.vcxproj +++ b/C2A_AOBC.vcxproj @@ -145,7 +145,6 @@ - @@ -262,7 +261,6 @@ - From c687549e8e403c8b90b5bd378c4666931ef94cc5 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 2 Jun 2023 15:22:46 +0200 Subject: [PATCH 054/176] Fix build CI target path --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63313556..2beba589 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,9 @@ on: types: [opened, synchronize, reopened, labeled] paths: - '.github/workflows/build.yml' - - 'c2a-aobc/CMakeLists.txt' - - 'c2a-aobc/src/**' + - 'CMakeLists.txt' + - 'Examples/**' + - 'src/**' env: S2E_AOBC_VERSION: v2.0.1 From fbece8d044f5334b12a73034708201442fcf1877 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 2 Jun 2023 15:33:18 +0200 Subject: [PATCH 055/176] Add Cmake json for VS --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2beba589..6de3659a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ on: paths: - '.github/workflows/build.yml' - 'CMakeLists.txt' + - 'CMakeSettings.json' - 'Examples/**' - 'src/**' From 002f63ffe9350cd67e94edf599502e2fe2772d4c Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 2 Jun 2023 23:44:32 +0200 Subject: [PATCH 056/176] Add SatelliteParameters as first test --- CMakeLists.txt | 1 + .../UserDefined/AOCS/aocs_manager.c | 757 ++++++++++-------- .../SatelliteParameters/CMakeLists.txt | 11 + .../Sample/orbit_parameters.c | 8 + .../SatelliteParameters/orbit_parameters.h | 6 + 5 files changed, 433 insertions(+), 350 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/CMakeLists.txt create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/orbit_parameters.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 56adab87..3fa9925c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,7 @@ add_subdirectory(${C2A_USER_DIR}/Drivers) add_subdirectory(${C2A_USER_DIR}/IfWrapper) add_subdirectory(${C2A_USER_DIR}/Library) add_subdirectory(${C2A_USER_DIR}/Settings) +add_subdirectory(${C2A_USER_DIR}/Settings/SatelliteParameters) add_subdirectory(${C2A_USER_DIR}/TlmCmd) add_library(${PROJECT_NAME} STATIC ${C2A_SRCS}) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index c75b844c..14e32df7 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -1,23 +1,27 @@ #pragma section REPRO /** -* @file aocs_manager.c -* @brief AOCS系の変数などをH/Wと切り分けて管理するマネージャーアプリ -*/ + * @file aocs_manager.c + * @brief AOCS系の変数などをH/Wと切り分けて管理するマネージャーアプリ + */ #include "aocs_manager.h" + #include #include + +#include "../../../Library/ControlUtility/gyroscopic_effect.h" #include "../../../Library/c2a_math.h" #include "../../../Library/math_constants.h" -#include "../../../Library/vector3.h" #include "../../../Library/matrix33.h" -#include "../../../Library/ControlUtility/gyroscopic_effect.h" - +#include "../../../Library/vector3.h" #include "AttitudeControl/unloading.h" #include "aocs_mode_manager.h" -static AocsManager aocs_manager_; -const AocsManager* const aocs_manager = &aocs_manager_; +// SatelliteParameters +#include "../../../Settings/SatelliteParameters/orbit_parameters.h" + +static AocsManager aocs_manager_; +const AocsManager* const aocs_manager = &aocs_manager_; static void APP_AOCS_MANAGER_init_(void); static void APP_AOCS_MANAGER_exec_(void); @@ -29,80 +33,89 @@ static void APP_AOCS_MANAGER_exec_(void); * @param[in] bit : 最下位から何bit目を操作するか(1~8まで) * @return 計算後のフラグ */ -static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, const uint8_t flag_on, const uint8_t bit); +static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, + const uint8_t flag_on, + const uint8_t bit); -AppInfo APP_AOCS_MANAGER_create_app(void) -{ - return AI_create_app_info("AOCS Manager", APP_AOCS_MANAGER_init_, APP_AOCS_MANAGER_exec_); +AppInfo APP_AOCS_MANAGER_create_app(void) { + return AI_create_app_info("AOCS Manager", APP_AOCS_MANAGER_init_, + APP_AOCS_MANAGER_exec_); } -static void APP_AOCS_MANAGER_init_(void) -{ +static void APP_AOCS_MANAGER_init_(void) { // 下記初期化値は物理的あり得る範囲でテキトウな値であり、全てsetter関数で意味のある値に変更されることを想定している // 衛星特性 aocs_manager_.mass_sc_kg = 10.0f; VECTOR3_initialize(aocs_manager_.rmm_sc_body_Am2, 0.1f); - aocs_manager_.inertia_tensor_sc_body_kgm2[0][0] = 0.1f; - aocs_manager_.inertia_tensor_sc_body_kgm2[0][1] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[0][2] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][0] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][1] = 0.2f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][2] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][0] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][1] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][2] = 0.2f; + aocs_manager_.inertia_tensor_sc_body_kgm2[0][0] = 0.1f; + aocs_manager_.inertia_tensor_sc_body_kgm2[0][1] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[0][2] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[1][0] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[1][1] = 0.2f; + aocs_manager_.inertia_tensor_sc_body_kgm2[1][2] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[2][0] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[2][1] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[2][2] = 0.2f; // 角速度 - VECTOR3_initialize(aocs_manager_.ang_vel_obs_body_rad_s, 0.0f); - VECTOR3_initialize(aocs_manager_.ang_vel_est_body_rad_s, 0.0f); + VECTOR3_initialize(aocs_manager_.ang_vel_obs_body_rad_s, 0.0f); + VECTOR3_initialize(aocs_manager_.ang_vel_est_body_rad_s, 0.0f); VECTOR3_initialize(aocs_manager_.ang_vel_target_body_rad_s, 0.0f); - VECTOR3_initialize(aocs_manager_.ang_vel_error_body_rad_s, 0.0f); - aocs_manager_.limit_angular_velocity_rad_s = PHYSICAL_CONST_degree_to_radian(0.8f); + VECTOR3_initialize(aocs_manager_.ang_vel_error_body_rad_s, 0.0f); + aocs_manager_.limit_angular_velocity_rad_s = + PHYSICAL_CONST_degree_to_radian(0.8f); // Quaternion aocs_manager_.quaternion_obs_i2b = QUATERNION_make_unit(); aocs_manager_.quaternion_est_i2b = QUATERNION_make_unit(); aocs_manager_.quaternion_target_i2t = QUATERNION_make_unit(); aocs_manager_.quaternion_error_b2t = QUATERNION_make_unit(); - aocs_manager_.limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); + aocs_manager_.limit_maneuver_angle_rad = + PHYSICAL_CONST_degree_to_radian(30.0f); // 太陽方向 - const float kSqrtOneThird = 0.57735f; // ノルム1になる値 - VECTOR3_initialize(aocs_manager_.sun_vec_obs_body, kSqrtOneThird); - VECTOR3_initialize(aocs_manager_.sun_vec_est_body, kSqrtOneThird); - VECTOR3_initialize(aocs_manager_.sun_vec_est_eci, kSqrtOneThird); + const float kSqrtOneThird = 0.57735f; // ノルム1になる値 + VECTOR3_initialize(aocs_manager_.sun_vec_obs_body, kSqrtOneThird); + VECTOR3_initialize(aocs_manager_.sun_vec_est_body, kSqrtOneThird); + VECTOR3_initialize(aocs_manager_.sun_vec_est_eci, kSqrtOneThird); VECTOR3_initialize(aocs_manager_.sun_vec_target_body, kSqrtOneThird); aocs_manager_.sun_vec_error_rad = 0.0f; // 磁場ベクトル VECTOR3_initialize(aocs_manager_.mag_vec_obs_body_nT, 0.0f); VECTOR3_initialize(aocs_manager_.mag_vec_est_body_nT, 0.0f); - VECTOR3_initialize(aocs_manager_.mag_vec_est_eci_nT, 0.0f); + VECTOR3_initialize(aocs_manager_.mag_vec_est_eci_nT, 0.0f); // トルク VECTOR3_initialize(aocs_manager_.internal_torque_target_body_Nm, 0.0f); VECTOR3_initialize(aocs_manager_.external_torque_target_body_Nm, 0.0f); - VECTOR3_initialize(aocs_manager_.torque_est_body_Nm, 0.0f); - VECTOR3_initialize(aocs_manager_.internal_torque_max_body_Nm, 5e-3f); // これで進めるが、必要になったら修正してよい - VECTOR3_initialize(aocs_manager_.external_torque_max_body_Nm, 3e-4f); // これで進めるが、必要になったら修正してよい - VECTOR3_initialize(aocs_manager_.constant_torque_body_Nm, 0.0f); - aocs_manager_.constant_torque_permission = AOCS_MANAGER_CONSTANT_TORQUE_DISABLE; + VECTOR3_initialize(aocs_manager_.torque_est_body_Nm, 0.0f); + VECTOR3_initialize(aocs_manager_.internal_torque_max_body_Nm, + 5e-3f); // これで進めるが、必要になったら修正してよい + VECTOR3_initialize(aocs_manager_.external_torque_max_body_Nm, + 3e-4f); // これで進めるが、必要になったら修正してよい + VECTOR3_initialize(aocs_manager_.constant_torque_body_Nm, 0.0f); + aocs_manager_.constant_torque_permission = + AOCS_MANAGER_CONSTANT_TORQUE_DISABLE; // 磁気モーメント VECTOR3_initialize(aocs_manager_.mag_moment_target_body_Am2, 0.0f); // MTQ情報 - for (int mtq_idx = 0; mtq_idx < AOCS_MANAGER_NUM_OF_MTQ; mtq_idx++) - { + for (int mtq_idx = 0; mtq_idx < AOCS_MANAGER_NUM_OF_MTQ; mtq_idx++) { VECTOR3_copy(aocs_manager_.mtq_magnetic_moment_direction_matrix[mtq_idx], - mtq_seiren_driver[mtq_idx]->info.magnetic_moment_direction_b); + mtq_seiren_driver[mtq_idx]->info.magnetic_moment_direction_b); } - AOCS_MANAGER_set_mtq_magnetic_moment_direction_matrix(aocs_manager_.mtq_magnetic_moment_direction_matrix); + AOCS_MANAGER_set_mtq_magnetic_moment_direction_matrix( + aocs_manager_.mtq_magnetic_moment_direction_matrix); aocs_manager_.mtq_output_state = AOCS_MANAGER_MTQ_OUTPUT_STATE_OFF; aocs_manager_.mag_exclusive_state = AOCS_MANAGER_MAG_EXCLUSIVE_STATE_ACTIVE; // RW情報 - float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW][PHYSICAL_CONST_THREE_DIM]; - for (int rw_idx = 0; rw_idx < AOCS_MANAGER_NUM_OF_RW; rw_idx++) - { + float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW] + [PHYSICAL_CONST_THREE_DIM]; + for (int rw_idx = 0; rw_idx < AOCS_MANAGER_NUM_OF_RW; rw_idx++) { // 方向ベクトル情報のマスターはDI_RWとなっている点に注意 - VECTOR3_copy(rw_rotation_direction_matrix[rw_idx], rw0003_driver[rw_idx]->info.rotation_direction_b); - // 慣性モーメント情報のマスターはDriverとなっている点に注意 TODO_L: 可変にするか要検討 - aocs_manager_.rw_moment_of_inertia_kgm2[rw_idx] = RW0003_kMomentOfInertiaKgm2; + VECTOR3_copy(rw_rotation_direction_matrix[rw_idx], + rw0003_driver[rw_idx]->info.rotation_direction_b); + // 慣性モーメント情報のマスターはDriverとなっている点に注意 TODO_L: + // 可変にするか要検討 + aocs_manager_.rw_moment_of_inertia_kgm2[rw_idx] = + RW0003_kMomentOfInertiaKgm2; } AOCS_MANAGER_set_rw_rotation_direction_matrix(rw_rotation_direction_matrix); float rw_angular_velocity_rad_s[AOCS_MANAGER_NUM_OF_RW]; @@ -115,360 +128,377 @@ static void APP_AOCS_MANAGER_init_(void) // aocs_manager_.current_gps_time_est_msec = 0; // aocs_manager_.current_gps_time_est_week = 0; aocs_manager_.obct_gps_time_est = OBCT_create(0, 0, 0); - aocs_manager_.obct_reference = OBCT_create(0, 0, 0); - aocs_manager_.reference_jday = 2459932.000; // 2022/12/18 12:00:00 + aocs_manager_.obct_reference = OBCT_create(0, 0, 0); + aocs_manager_.reference_jday = ORBIT_PARAMETERS_reference_jday; // センサ状態 aocs_manager_.sun_visibility = AOCS_MANAGER_SUN_INVISIBILE; aocs_manager_.gps_visibility = AOCS_MANAGER_GPS_INVISIBILE; aocs_manager_.stt_availability = AOCS_MANAGER_STT_UNAVAILABLE; // 軌道 - VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_ecef_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_eci_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_pos_est_ecef_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_pos_est_eci_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_ecef_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_eci_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_est_ecef_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_est_eci_m, 0.0); VECTOR3_initialize_double(aocs_manager_.sat_pos_est_lla_rad_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_ecef_m_s, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_eci_m_s, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_est_ecef_m_s, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_est_eci_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_ecef_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_eci_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_est_ecef_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_est_eci_m_s, 0.0); // 各種フラグ aocs_manager_.flags_for_tlm = 0; } -static void APP_AOCS_MANAGER_exec_(void) -{ +static void APP_AOCS_MANAGER_exec_(void) { // TLM生成用処理 - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, - aocs_manager_.sun_visibility == AOCS_MANAGER_SUN_VISIBLE, - 1); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, - aocs_manager_.gps_visibility == AOCS_MANAGER_GPS_VISIBLE, - 2); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, - aocs_manager_.stt_availability == AOCS_MANAGER_STT_AVAILABLE, - 3); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, - unloading->unloading_state[RW0003_IDX_ON_X] != APP_UNLOADING_STATE_OFF, - 4); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, - unloading->unloading_state[RW0003_IDX_ON_Y] != APP_UNLOADING_STATE_OFF, - 5); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, - unloading->unloading_state[RW0003_IDX_ON_Z] != APP_UNLOADING_STATE_OFF, - 6); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, - aocs_mode_manager->is_control_error_small == 1, - 7); - + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( + aocs_manager_.flags_for_tlm, + aocs_manager_.sun_visibility == AOCS_MANAGER_SUN_VISIBLE, 1); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( + aocs_manager_.flags_for_tlm, + aocs_manager_.gps_visibility == AOCS_MANAGER_GPS_VISIBLE, 2); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( + aocs_manager_.flags_for_tlm, + aocs_manager_.stt_availability == AOCS_MANAGER_STT_AVAILABLE, 3); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( + aocs_manager_.flags_for_tlm, + unloading->unloading_state[RW0003_IDX_ON_X] != APP_UNLOADING_STATE_OFF, + 4); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( + aocs_manager_.flags_for_tlm, + unloading->unloading_state[RW0003_IDX_ON_Y] != APP_UNLOADING_STATE_OFF, + 5); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( + aocs_manager_.flags_for_tlm, + unloading->unloading_state[RW0003_IDX_ON_Z] != APP_UNLOADING_STATE_OFF, + 6); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( + aocs_manager_.flags_for_tlm, + aocs_mode_manager->is_control_error_small == 1, 7); } // 衛星特性 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mass_sc_kg(const float mass_sc_kg) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mass_sc_kg(const float mass_sc_kg) { if (mass_sc_kg <= 0.0f) return AOCS_MANAGER_ERROR_NG; aocs_manager_.mass_sc_kg = mass_sc_kg; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_rmm_sc_body_Am2(const float rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_rmm_sc_body_Am2( + const float rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy(aocs_manager_.rmm_sc_body_Am2, rmm_sc_body_Am2); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2(const float inertia_tensor_sc_body_kgm2[][PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2( + const float inertia_tensor_sc_body_kgm2[][PHYSICAL_CONST_THREE_DIM]) { // 対角成分確認 - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { - if (inertia_tensor_sc_body_kgm2[i][i] <= 0.0f) - { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + if (inertia_tensor_sc_body_kgm2[i][i] <= 0.0f) { return AOCS_MANAGER_ERROR_NG; } } // 対称行列確認 - if (MATRIX33_is_symmetry(inertia_tensor_sc_body_kgm2) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; + if (MATRIX33_is_symmetry(inertia_tensor_sc_body_kgm2) != C2A_MATH_ERROR_OK) + return AOCS_MANAGER_ERROR_NG; - MATRIX33_copy(aocs_manager_.inertia_tensor_sc_body_kgm2, inertia_tensor_sc_body_kgm2); + MATRIX33_copy(aocs_manager_.inertia_tensor_sc_body_kgm2, + inertia_tensor_sc_body_kgm2); return AOCS_MANAGER_ERROR_OK; } // 角速度 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_obs_body_rad_s(const float ang_vel_obs_body_rad_s[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_obs_body_rad_s( + const float ang_vel_obs_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy(aocs_manager_.ang_vel_obs_body_rad_s, ang_vel_obs_body_rad_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_est_body_rad_s(const float ang_vel_est_body_rad_s[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_est_body_rad_s( + const float ang_vel_est_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy(aocs_manager_.ang_vel_est_body_rad_s, ang_vel_est_body_rad_s); // 保有角運動量の計算 - GYROSCOPIC_EFFECT_calculate_total_momentum(aocs_manager_.ang_mom_est_body_Nms, - aocs_manager_.inertia_tensor_sc_body_kgm2, - aocs_manager_.ang_vel_est_body_rad_s, - aocs_manager_.rw_angular_momentum_body_Nms); + GYROSCOPIC_EFFECT_calculate_total_momentum( + aocs_manager_.ang_mom_est_body_Nms, + aocs_manager_.inertia_tensor_sc_body_kgm2, + aocs_manager_.ang_vel_est_body_rad_s, + aocs_manager_.rw_angular_momentum_body_Nms); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_target_body_rad_s(const float ang_vel_target_body_rad_s[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_target_body_rad_s( + const float ang_vel_target_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { float ang_vel_norm_rad_s = VECTOR3_norm(ang_vel_target_body_rad_s); - if (ang_vel_norm_rad_s > aocs_manager_.limit_angular_velocity_rad_s) return AOCS_MANAGER_ERROR_NG; - VECTOR3_copy(aocs_manager_.ang_vel_target_body_rad_s, ang_vel_target_body_rad_s); + if (ang_vel_norm_rad_s > aocs_manager_.limit_angular_velocity_rad_s) + return AOCS_MANAGER_ERROR_NG; + VECTOR3_copy(aocs_manager_.ang_vel_target_body_rad_s, + ang_vel_target_body_rad_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_error_body_rad_s(const float ang_vel_error_body_rad_s[PHYSICAL_CONST_THREE_DIM]) -{ - VECTOR3_copy(aocs_manager_.ang_vel_error_body_rad_s, ang_vel_error_body_rad_s); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_error_body_rad_s( + const float ang_vel_error_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { + VECTOR3_copy(aocs_manager_.ang_vel_error_body_rad_s, + ang_vel_error_body_rad_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_angular_velocity_rad_s(const float limit_angular_velocity_rad_s) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_angular_velocity_rad_s( + const float limit_angular_velocity_rad_s) { if (limit_angular_velocity_rad_s < 0.0f) return AOCS_MANAGER_ERROR_NG; aocs_manager_.limit_angular_velocity_rad_s = limit_angular_velocity_rad_s; return AOCS_MANAGER_ERROR_OK; } // Quaternion -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_obs_i2b(const Quaternion quaternion_obs_i2b) -{ - +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_obs_i2b( + const Quaternion quaternion_obs_i2b) { aocs_manager_.quaternion_obs_i2b = quaternion_obs_i2b; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_est_i2b(const Quaternion quaternion_est_i2b) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_est_i2b( + const Quaternion quaternion_est_i2b) { aocs_manager_.quaternion_est_i2b = quaternion_est_i2b; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_target_i2t(const Quaternion quaternion_target_i2t) -{ - Quaternion q_diff = QUATERNION_divide(aocs_manager_.quaternion_est_i2b, quaternion_target_i2t); - if (q_diff.scalar_part < 0.0f) q_diff.scalar_part = q_diff.scalar_part * -1.0f; - float angle_rad = 2.0f * acosf(q_diff.scalar_part); // 必ず正の値 - if (angle_rad > aocs_manager_.limit_maneuver_angle_rad) return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_target_i2t( + const Quaternion quaternion_target_i2t) { + Quaternion q_diff = QUATERNION_divide(aocs_manager_.quaternion_est_i2b, + quaternion_target_i2t); + if (q_diff.scalar_part < 0.0f) + q_diff.scalar_part = q_diff.scalar_part * -1.0f; + float angle_rad = 2.0f * acosf(q_diff.scalar_part); // 必ず正の値 + if (angle_rad > aocs_manager_.limit_maneuver_angle_rad) + return AOCS_MANAGER_ERROR_NG; aocs_manager_.quaternion_target_i2t = quaternion_target_i2t; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_error_b2t(const Quaternion quaternion_error_b2t) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_error_b2t( + const Quaternion quaternion_error_b2t) { aocs_manager_.quaternion_error_b2t = quaternion_error_b2t; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_maneuver_angle_rad(const float limit_maneuver_angle_rad) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_maneuver_angle_rad( + const float limit_maneuver_angle_rad) { if (limit_maneuver_angle_rad < 0.0) return AOCS_MANAGER_ERROR_NG; if (limit_maneuver_angle_rad > MATH_CONST_PI) return AOCS_MANAGER_ERROR_NG; aocs_manager_.limit_maneuver_angle_rad = limit_maneuver_angle_rad; return AOCS_MANAGER_ERROR_OK; } - // 太陽方向 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_obs_body(const float sun_vec_obs_body[PHYSICAL_CONST_THREE_DIM]) -{ - if (VECTOR3_is_normalized(sun_vec_obs_body) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_obs_body( + const float sun_vec_obs_body[PHYSICAL_CONST_THREE_DIM]) { + if (VECTOR3_is_normalized(sun_vec_obs_body) != C2A_MATH_ERROR_OK) + return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_obs_body, sun_vec_obs_body); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_body(const float sun_vec_est_body[PHYSICAL_CONST_THREE_DIM]) -{ - if (VECTOR3_is_normalized(sun_vec_est_body) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_body( + const float sun_vec_est_body[PHYSICAL_CONST_THREE_DIM]) { + if (VECTOR3_is_normalized(sun_vec_est_body) != C2A_MATH_ERROR_OK) + return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_est_body, sun_vec_est_body); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_eci(const float sun_vec_est_eci[PHYSICAL_CONST_THREE_DIM]) -{ - if (VECTOR3_is_normalized(sun_vec_est_eci) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_eci( + const float sun_vec_est_eci[PHYSICAL_CONST_THREE_DIM]) { + if (VECTOR3_is_normalized(sun_vec_est_eci) != C2A_MATH_ERROR_OK) + return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_est_eci, sun_vec_est_eci); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_target_body(const float sun_vec_target_body[PHYSICAL_CONST_THREE_DIM]) -{ - if (VECTOR3_is_normalized(sun_vec_target_body) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_target_body( + const float sun_vec_target_body[PHYSICAL_CONST_THREE_DIM]) { + if (VECTOR3_is_normalized(sun_vec_target_body) != C2A_MATH_ERROR_OK) + return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_target_body, sun_vec_target_body); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_error_rad(const float sun_vec_error_rad) -{ - aocs_manager_.sun_vec_error_rad = C2A_MATH_normalize_zero_2pi(sun_vec_error_rad); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_error_rad( + const float sun_vec_error_rad) { + aocs_manager_.sun_vec_error_rad = + C2A_MATH_normalize_zero_2pi(sun_vec_error_rad); return AOCS_MANAGER_ERROR_OK; } // 磁場ベクトル -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_obs_body_nT(const float mag_vec_obs_body_nT[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_obs_body_nT( + const float mag_vec_obs_body_nT[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy(aocs_manager_.mag_vec_obs_body_nT, mag_vec_obs_body_nT); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_body_nT(const float mag_vec_est_body_nT[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_body_nT( + const float mag_vec_est_body_nT[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy(aocs_manager_.mag_vec_est_body_nT, mag_vec_est_body_nT); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_eci_nT(const float mag_vec_est_eci_nT[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_eci_nT( + const float mag_vec_est_eci_nT[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy(aocs_manager_.mag_vec_est_eci_nT, mag_vec_est_eci_nT); return AOCS_MANAGER_ERROR_OK; } // トルク -AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_target_body_Nm(const float internal_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_target_body_Nm( + const float internal_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) { float clipped_value[PHYSICAL_CONST_THREE_DIM]; - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { - clipped_value[i] = C2A_MATH_clip_value_abs(internal_torque_target_body_Nm[i], - aocs_manager_.internal_torque_max_body_Nm[i]); + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + clipped_value[i] = + C2A_MATH_clip_value_abs(internal_torque_target_body_Nm[i], + aocs_manager_.internal_torque_max_body_Nm[i]); } VECTOR3_copy(aocs_manager_.internal_torque_target_body_Nm, clipped_value); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_target_body_Nm(const float external_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_target_body_Nm( + const float external_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) { float clipped_value[PHYSICAL_CONST_THREE_DIM]; - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { - clipped_value[i] = C2A_MATH_clip_value_abs(external_torque_target_body_Nm[i], - aocs_manager_.external_torque_max_body_Nm[i]); + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + clipped_value[i] = + C2A_MATH_clip_value_abs(external_torque_target_body_Nm[i], + aocs_manager_.external_torque_max_body_Nm[i]); } VECTOR3_copy(aocs_manager_.external_torque_target_body_Nm, clipped_value); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_max_body_Nm(const float internal_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_max_body_Nm( + const float internal_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) { + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { if (internal_torque_max_body_Nm[i] < 0.0f) return AOCS_MANAGER_ERROR_NG; } - VECTOR3_copy(aocs_manager_.internal_torque_max_body_Nm, internal_torque_max_body_Nm); + VECTOR3_copy(aocs_manager_.internal_torque_max_body_Nm, + internal_torque_max_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_max_body_Nm(const float external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_max_body_Nm( + const float external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) { + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { if (external_torque_max_body_Nm[i] < 0.0f) return AOCS_MANAGER_ERROR_NG; } - VECTOR3_copy(aocs_manager_.external_torque_max_body_Nm, external_torque_max_body_Nm); + VECTOR3_copy(aocs_manager_.external_torque_max_body_Nm, + external_torque_max_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_torque_est_body_Nm(const float torque_est_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_torque_est_body_Nm( + const float torque_est_body_Nm[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy(aocs_manager_.torque_est_body_Nm, torque_est_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_body_Nm(const float constant_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { - C2A_MATH_ERROR ret = C2A_MATH_check_abs_range_violation(constant_torque_body_Nm[i], - aocs_manager_.internal_torque_max_body_Nm[i]); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_body_Nm( + const float constant_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) { + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + C2A_MATH_ERROR ret = C2A_MATH_check_abs_range_violation( + constant_torque_body_Nm[i], + aocs_manager_.internal_torque_max_body_Nm[i]); if (ret == C2A_MATH_ERROR_RANGE_OVER) return AOCS_MANAGER_ERROR_NG; } VECTOR3_copy(aocs_manager_.constant_torque_body_Nm, constant_torque_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_permission(const AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION constant_torque_permission) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_permission( + const AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION constant_torque_permission) { aocs_manager_.constant_torque_permission = constant_torque_permission; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_moment_target_body_Am2(const float mag_moment_target_body_Am2[PHYSICAL_CONST_THREE_DIM]) -{ - VECTOR3_copy(aocs_manager_.mag_moment_target_body_Am2, mag_moment_target_body_Am2); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_moment_target_body_Am2( + const float mag_moment_target_body_Am2[PHYSICAL_CONST_THREE_DIM]) { + VECTOR3_copy(aocs_manager_.mag_moment_target_body_Am2, + mag_moment_target_body_Am2); return AOCS_MANAGER_ERROR_OK; } AOCS_MANAGER_ERROR AOCS_MANAGER_set_mtq_magnetic_moment_direction_matrix( - const float mtq_magnetic_moment_direction_matrix[AOCS_MANAGER_NUM_OF_MTQ][PHYSICAL_CONST_THREE_DIM]) -{ - for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_MTQ; idx++) - { - VECTOR3_copy(aocs_manager_.mtq_magnetic_moment_direction_matrix[idx], mtq_magnetic_moment_direction_matrix[idx]); + const float + mtq_magnetic_moment_direction_matrix[AOCS_MANAGER_NUM_OF_MTQ] + [PHYSICAL_CONST_THREE_DIM]) { + for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_MTQ; idx++) { + VECTOR3_copy(aocs_manager_.mtq_magnetic_moment_direction_matrix[idx], + mtq_magnetic_moment_direction_matrix[idx]); } // TODO_L: MTQが4つ以上になったら修正が必要 - C2A_MATH_ERROR ret = MATRIX33_inverse(aocs_manager_.mtq_distribution_matrix, aocs_manager_.mtq_magnetic_moment_direction_matrix); + C2A_MATH_ERROR ret = + MATRIX33_inverse(aocs_manager_.mtq_distribution_matrix, + aocs_manager_.mtq_magnetic_moment_direction_matrix); if (ret != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mtq_output_state(const AOCS_MANAGER_MTQ_OUTPUT_STATE mtq_output_state) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mtq_output_state( + const AOCS_MANAGER_MTQ_OUTPUT_STATE mtq_output_state) { aocs_manager_.mtq_output_state = mtq_output_state; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_exclusive_state(const AOCS_MANAGER_MAG_EXCLUSIVE_STATE mag_exclusive_state) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_exclusive_state( + const AOCS_MANAGER_MAG_EXCLUSIVE_STATE mag_exclusive_state) { aocs_manager_.mag_exclusive_state = mag_exclusive_state; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_rw_angular_velocity_rad_s(const float rw_angular_velocity_rad_s[AOCS_MANAGER_NUM_OF_RW]) -{ - VECTOR3_copy(aocs_manager_.rw_angular_velocity_rad_s, rw_angular_velocity_rad_s); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_rw_angular_velocity_rad_s( + const float rw_angular_velocity_rad_s[AOCS_MANAGER_NUM_OF_RW]) { + VECTOR3_copy(aocs_manager_.rw_angular_velocity_rad_s, + rw_angular_velocity_rad_s); // 角運動量の計算 - for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) - { - aocs_manager_.rw_angular_momentum_Nms[idx] = aocs_manager_.rw_angular_velocity_rad_s[idx] * aocs_manager_.rw_moment_of_inertia_kgm2[idx]; + for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) { + aocs_manager_.rw_angular_momentum_Nms[idx] = + aocs_manager_.rw_angular_velocity_rad_s[idx] * + aocs_manager_.rw_moment_of_inertia_kgm2[idx]; } // 角運動量の座標変換 TODO_L: RWが4つになったら修正が必要 MATRIX33_multiply_matrix_vector(aocs_manager_.rw_angular_momentum_body_Nms, - aocs_manager_.rw_rotation_direction_matrix, - aocs_manager_.rw_angular_momentum_Nms); + aocs_manager_.rw_rotation_direction_matrix, + aocs_manager_.rw_angular_momentum_Nms); return AOCS_MANAGER_ERROR_OK; } AOCS_MANAGER_ERROR AOCS_MANAGER_set_rw_rotation_direction_matrix( - const float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW][PHYSICAL_CONST_THREE_DIM]) -{ - for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) - { - VECTOR3_copy(aocs_manager_.rw_rotation_direction_matrix[idx], rw_rotation_direction_matrix[idx]); + const float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW] + [PHYSICAL_CONST_THREE_DIM]) { + for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) { + VECTOR3_copy(aocs_manager_.rw_rotation_direction_matrix[idx], + rw_rotation_direction_matrix[idx]); } // TODO_L: RWが4つ以上になったら修正が必要 - C2A_MATH_ERROR ret = MATRIX33_inverse(aocs_manager_.rw_distribution_matrix, aocs_manager_.rw_rotation_direction_matrix); + C2A_MATH_ERROR ret = + MATRIX33_inverse(aocs_manager_.rw_distribution_matrix, + aocs_manager_.rw_rotation_direction_matrix); if (ret != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; return AOCS_MANAGER_ERROR_OK; } // 時刻 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs(const uint32_t current_gps_time_obs_msec, - const uint16_t current_gps_time_obs_week, - const ObcTime obct_gps_time_obs) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs( + const uint32_t current_gps_time_obs_msec, + const uint16_t current_gps_time_obs_week, const ObcTime obct_gps_time_obs) { aocs_manager_.current_gps_time_obs_msec = current_gps_time_obs_msec; aocs_manager_.current_gps_time_obs_week = current_gps_time_obs_week; aocs_manager_.obct_gps_time_obs = obct_gps_time_obs; @@ -476,9 +506,12 @@ AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs(const uint32_t current_ } // 22_08_24時点で使用箇所がないため,一旦コメントアウト -// AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_est(const uint32_t current_gps_time_est_msec, -// const uint16_t current_gps_time_est_week, -// const ObcTime obct_gps_time_est) +// AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_est(const uint32_t +// current_gps_time_est_msec, +// const uint16_t +// current_gps_time_est_week, +// const ObcTime +// obct_gps_time_est) // { // aocs_manager_.current_gps_time_est_msec = current_gps_time_est_msec; // aocs_manager_.current_gps_time_est_week = current_gps_time_est_week; @@ -486,8 +519,8 @@ AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs(const uint32_t current_ // return AOCS_MANAGER_ERROR_OK; // } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_reference_jday(const double reference_jday, const ObcTime obct_reference) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_reference_jday( + const double reference_jday, const ObcTime obct_reference) { if (reference_jday <= 0.0) return AOCS_MANAGER_ERROR_NG; aocs_manager_.reference_jday = reference_jday; @@ -496,361 +529,385 @@ AOCS_MANAGER_ERROR AOCS_MANAGER_set_reference_jday(const double reference_jday, } // センサ状態 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_visibility(const AOCS_MANAGER_SUN_VISIBILITY sun_visibility) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_visibility( + const AOCS_MANAGER_SUN_VISIBILITY sun_visibility) { aocs_manager_.sun_visibility = sun_visibility; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_stt_availability(const AOCS_MANAGER_STT_AVAILABILITY stt_availibility) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_stt_availability( + const AOCS_MANAGER_STT_AVAILABILITY stt_availibility) { aocs_manager_.stt_availability = stt_availibility; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_gps_visibility(const AOCS_MANAGER_GPS_VISIBILITY gps_visibility) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_gps_visibility( + const AOCS_MANAGER_GPS_VISIBILITY gps_visibility) { aocs_manager_.gps_visibility = gps_visibility; return AOCS_MANAGER_ERROR_OK; } // 軌道 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_ecef_m(const double sat_pos_obs_ecef_m [PHYSICAL_CONST_THREE_DIM], - const double sat_vel_obs_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_ecef_m( + const double sat_pos_obs_ecef_m[PHYSICAL_CONST_THREE_DIM], + const double sat_vel_obs_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy_double(aocs_manager_.sat_pos_obs_ecef_m, sat_pos_obs_ecef_m); VECTOR3_copy_double(aocs_manager_.sat_vel_obs_ecef_m_s, sat_vel_obs_ecef_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_eci_m(const double sat_pos_obs_eci_m[PHYSICAL_CONST_THREE_DIM], - const double sat_vel_obs_eci_m_s[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_eci_m( + const double sat_pos_obs_eci_m[PHYSICAL_CONST_THREE_DIM], + const double sat_vel_obs_eci_m_s[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy_double(aocs_manager_.sat_pos_obs_eci_m, sat_pos_obs_eci_m); VECTOR3_copy_double(aocs_manager_.sat_vel_obs_eci_m_s, sat_vel_obs_eci_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_ecef_m(const double sat_pos_est_ecef_m [PHYSICAL_CONST_THREE_DIM], - const double sat_vel_est_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_ecef_m( + const double sat_pos_est_ecef_m[PHYSICAL_CONST_THREE_DIM], + const double sat_vel_est_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy_double(aocs_manager_.sat_pos_est_ecef_m, sat_pos_est_ecef_m); VECTOR3_copy_double(aocs_manager_.sat_vel_est_ecef_m_s, sat_vel_est_ecef_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_eci_m(const double sat_pos_est_eci_m [PHYSICAL_CONST_THREE_DIM], - const double sat_vel_est_eci_m_s[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_eci_m( + const double sat_pos_est_eci_m[PHYSICAL_CONST_THREE_DIM], + const double sat_vel_est_eci_m_s[PHYSICAL_CONST_THREE_DIM]) { VECTOR3_copy_double(aocs_manager_.sat_pos_est_eci_m, sat_pos_est_eci_m); VECTOR3_copy_double(aocs_manager_.sat_vel_est_eci_m_s, sat_vel_est_eci_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_est_lla_rad_m(const double sat_pos_est_lla_rad_m[PHYSICAL_CONST_THREE_DIM]) -{ - VECTOR3_copy_double(aocs_manager_.sat_pos_est_lla_rad_m, sat_pos_est_lla_rad_m); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_est_lla_rad_m( + const double sat_pos_est_lla_rad_m[PHYSICAL_CONST_THREE_DIM]) { + VECTOR3_copy_double(aocs_manager_.sat_pos_est_lla_rad_m, + sat_pos_est_lla_rad_m); return AOCS_MANAGER_ERROR_OK; } // 座標変換 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_dcm_eci_to_ecef(const double dcm_eci_to_ecef[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_set_dcm_eci_to_ecef( + const double dcm_eci_to_ecef[PHYSICAL_CONST_THREE_DIM] + [PHYSICAL_CONST_THREE_DIM]) { MATRIX33_copy_double(aocs_manager_.dcm_eci_to_ecef, dcm_eci_to_ecef); return AOCS_MANAGER_ERROR_OK; } - // 計算関数 -AOCS_MANAGER_ERROR AOCS_MANAGER_add_constant_torque_body_nm(float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], - const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ - if (aocs_manager_.constant_torque_permission != AOCS_MANAGER_CONSTANT_TORQUE_ENABLE) - { +AOCS_MANAGER_ERROR AOCS_MANAGER_add_constant_torque_body_nm( + float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], + const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) { + if (aocs_manager_.constant_torque_permission != + AOCS_MANAGER_CONSTANT_TORQUE_ENABLE) { VECTOR3_copy(out_torque_body_Nm, in_torque_body_Nm); return AOCS_MANAGER_ERROR_NG; } - VECTOR3_add(out_torque_body_Nm, in_torque_body_Nm, aocs_manager_.constant_torque_body_Nm); + VECTOR3_add(out_torque_body_Nm, in_torque_body_Nm, + aocs_manager_.constant_torque_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_add_gyroscopic_torque_body_nm(float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], - const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) -{ +AOCS_MANAGER_ERROR AOCS_MANAGER_add_gyroscopic_torque_body_nm( + float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], + const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) { float gyroscopic_effect_trq_Nm[PHYSICAL_CONST_THREE_DIM]; - GYROSCOPIC_EFFECT_calculate_gyroscopic_torque(gyroscopic_effect_trq_Nm, - aocs_manager->ang_vel_est_body_rad_s, - aocs_manager->ang_mom_est_body_Nms); + GYROSCOPIC_EFFECT_calculate_gyroscopic_torque( + gyroscopic_effect_trq_Nm, aocs_manager->ang_vel_est_body_rad_s, + aocs_manager->ang_mom_est_body_Nms); VECTOR3_add(out_torque_body_Nm, in_torque_body_Nm, gyroscopic_effect_trq_Nm); return AOCS_MANAGER_ERROR_OK; } - // Static functions -static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, const uint8_t flag_on, const uint8_t bit) -{ +static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, + const uint8_t flag_on, + const uint8_t bit) { uint8_t bit_field = 0x01 << (bit - 1); uint8_t flags_out; - if (flag_on) - { + if (flag_on) { flags_out = flags_in | bit_field; - } - else - { + } else { flags_out = flags_in & ~bit_field; } return flags_out; } - // Command functions // Structure -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MASS(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MASS(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); float mass_sc_kg; ENDIAN_memcpy(&mass_sc_kg, param, sizeof(float)); AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_mass_sc_kg(mass_sc_kg); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_INERTIA_TENSOR(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_INERTIA_TENSOR( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; - float inertia_tensor_sc_body_kgm2[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM]; + float inertia_tensor_sc_body_kgm2[PHYSICAL_CONST_THREE_DIM] + [PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[i][i], param + param_id, sizeof(float)); + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[i][i], param + param_id, + sizeof(float)); param_id += (int)sizeof(float); } - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][1], param + param_id, sizeof(float)); + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][1], param + param_id, + sizeof(float)); param_id += (int)sizeof(float); inertia_tensor_sc_body_kgm2[1][0] = inertia_tensor_sc_body_kgm2[0][1]; - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][2], param + param_id, sizeof(float)); + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][2], param + param_id, + sizeof(float)); param_id += (int)sizeof(float); inertia_tensor_sc_body_kgm2[2][0] = inertia_tensor_sc_body_kgm2[0][2]; - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[1][2], param + param_id, sizeof(float)); + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[1][2], param + param_id, + sizeof(float)); param_id += (int)sizeof(float); inertia_tensor_sc_body_kgm2[2][1] = inertia_tensor_sc_body_kgm2[1][2]; - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2(inertia_tensor_sc_body_kgm2); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2(inertia_tensor_sc_body_kgm2); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_RMM(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_RMM(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { ENDIAN_memcpy(&rmm_sc_body_Am2[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_rmm_sc_body_Am2(rmm_sc_body_Am2); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // Target -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float quaternion_target_i2t_array[PHYSICAL_CONST_QUATERNION_DIM]; - for (int i = 0; i < PHYSICAL_CONST_QUATERNION_DIM; i++) - { - ENDIAN_memcpy(&quaternion_target_i2t_array[i], param + param_id, sizeof(float)); + for (int i = 0; i < PHYSICAL_CONST_QUATERNION_DIM; i++) { + ENDIAN_memcpy(&quaternion_target_i2t_array[i], param + param_id, + sizeof(float)); param_id += (int)sizeof(float); } Quaternion quaternion_target_i2t; - C2A_MATH_ERROR ret_c2a_math = QUATERNION_make_from_array(&quaternion_target_i2t, - quaternion_target_i2t_array, - QUATERNION_SCALAR_POSITION_LAST); - if (ret_c2a_math != C2A_MATH_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + C2A_MATH_ERROR ret_c2a_math = QUATERNION_make_from_array( + &quaternion_target_i2t, quaternion_target_i2t_array, + QUATERNION_SCALAR_POSITION_LAST); + if (ret_c2a_math != C2A_MATH_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - AOCS_MANAGER_ERROR ret_aocs_manager = AOCS_MANAGER_set_quaternion_target_i2t(quaternion_target_i2t); - if (ret_aocs_manager != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + AOCS_MANAGER_ERROR ret_aocs_manager = + AOCS_MANAGER_set_quaternion_target_i2t(quaternion_target_i2t); + if (ret_aocs_manager != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION_FROM_CURRENT_ATTITUDE(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION_FROM_CURRENT_ATTITUDE( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; MATRIX33_ROTATION_AXIS axis = (MATRIX33_ROTATION_AXIS)param[0]; param_id += (int)sizeof(uint8_t); - if (axis >= MATRIX33_ROTATION_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (axis >= MATRIX33_ROTATION_MAX) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float angle_deg = 0.0f; ENDIAN_memcpy(&angle_deg, param + param_id, sizeof(float)); param_id += (int)sizeof(float); - if ((angle_deg < -180.0f) || (180.0f < angle_deg)) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if ((angle_deg < -180.0f) || (180.0f < angle_deg)) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float angle_rad = PHYSICAL_CONST_degree_to_radian(angle_deg); Quaternion q_diff; - switch (axis) - { - case MATRIX33_ROTATION_AXIS_X: - q_diff = QUATERNION_make_x_rot(angle_rad); - break; - case MATRIX33_ROTATION_AXIS_Y: - q_diff = QUATERNION_make_y_rot(angle_rad); - break; - case MATRIX33_ROTATION_AXIS_Z: - q_diff = QUATERNION_make_z_rot(angle_rad); - break; - default: - break; + switch (axis) { + case MATRIX33_ROTATION_AXIS_X: + q_diff = QUATERNION_make_x_rot(angle_rad); + break; + case MATRIX33_ROTATION_AXIS_Y: + q_diff = QUATERNION_make_y_rot(angle_rad); + break; + case MATRIX33_ROTATION_AXIS_Z: + q_diff = QUATERNION_make_z_rot(angle_rad); + break; + default: + break; } Quaternion q_current = aocs_manager_.quaternion_est_i2b; Quaternion q_target = QUATERNION_product(q_current, q_diff); AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_quaternion_target_i2t(q_target); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_MANEUVER_ANGLE(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_MANEUVER_ANGLE( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); float angle_deg; ENDIAN_memcpy(&angle_deg, param, sizeof(float)); - if ((angle_deg < 0.0f) || (180.0f < angle_deg)) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if ((angle_deg < 0.0f) || (180.0f < angle_deg)) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float angle_rad = PHYSICAL_CONST_degree_to_radian(angle_deg); AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_limit_maneuver_angle_rad(angle_rad); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_ANGULAR_VELOCITY(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_ANGULAR_VELOCITY( + const CommonCmdPacket* packet) { float ang_vel_deg_s = CCP_get_param_from_packet(packet, 0, float); - if (ang_vel_deg_s < 0.0f) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ang_vel_deg_s < 0.0f) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float ang_vel_rad_s = PHYSICAL_CONST_degree_to_radian(ang_vel_deg_s); - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_limit_angular_velocity_rad_s(ang_vel_rad_s); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_limit_angular_velocity_rad_s(ang_vel_rad_s); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // Others -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_REFERENCE_TIME(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_REFERENCE_TIME( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); double reference_jday; ENDIAN_memcpy(&reference_jday, param, sizeof(double)); ObcTime obct_reference = TMGR_get_master_clock(); - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_reference_jday(reference_jday, obct_reference); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_reference_jday(reference_jday, obct_reference); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float constant_torque[PHYSICAL_CONST_THREE_DIM] = {0.0f, 0.0f, 0.0f}; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { ENDIAN_memcpy(&constant_torque[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_constant_torque_body_Nm(constant_torque); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_constant_torque_body_Nm(constant_torque); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE_PERMISSION(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE_PERMISSION( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION permission_flag; permission_flag = (AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION)param[0]; - if (permission_flag >= AOCS_MANAGER_CONSTANT_TORQUE_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (permission_flag >= AOCS_MANAGER_CONSTANT_TORQUE_MAX) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_constant_torque_permission(permission_flag); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_constant_torque_permission(permission_flag); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAG_EXCLUSIVE_STATE(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAG_EXCLUSIVE_STATE( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); AOCS_MANAGER_MAG_EXCLUSIVE_STATE mag_exclusive_state; mag_exclusive_state = (AOCS_MANAGER_MAG_EXCLUSIVE_STATE)param[0]; - if (mag_exclusive_state >= AOCS_MANAGER_MAG_EXCLUSIVE_STATE_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (mag_exclusive_state >= AOCS_MANAGER_MAG_EXCLUSIVE_STATE_MAX) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_mag_exclusive_state(mag_exclusive_state); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_mag_exclusive_state(mag_exclusive_state); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_IN_TORQUE(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_IN_TORQUE( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float max_torque[PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { ENDIAN_memcpy(&max_torque[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_internal_torque_max_body_Nm(max_torque); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_internal_torque_max_body_Nm(max_torque); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_EXT_TORQUE(const CommonCmdPacket* packet) -{ +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_EXT_TORQUE( + const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float max_torque[PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) - { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { ENDIAN_memcpy(&max_torque[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } - AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_external_torque_max_body_Nm(max_torque); - if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = + AOCS_MANAGER_set_external_torque_max_body_Nm(max_torque); + if (ret != AOCS_MANAGER_ERROR_OK) + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } diff --git a/src/src_user/Settings/SatelliteParameters/CMakeLists.txt b/src/src_user/Settings/SatelliteParameters/CMakeLists.txt new file mode 100644 index 00000000..d094089b --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.13) + +project(C2A_USER_SETTINGS_SATELLITE_PARAMETERS) + +set(C2A_SRCS + Sample/orbit_parameters.c +) + +add_library(${PROJECT_NAME} OBJECT ${C2A_SRCS}) + +include(${C2A_USER_DIR}/common.cmake) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c new file mode 100644 index 00000000..9eba2553 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -0,0 +1,8 @@ +/** + * @file orbit_parameters.c + * @brief 軌道・時刻関連の衛星固有パラメータを管理する + */ + +#include + +const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h new file mode 100644 index 00000000..25fa3564 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -0,0 +1,6 @@ +/** + * @file orbit_parameters.h + * @brief 軌道・時刻関連の衛星固有パラメータを管理する + */ + +extern const double ORBIT_PARAMETERS_reference_jday; //!< Reference time for orbit calculation [Julian day] From 05d895bccc92ad0fe8e84d282ca78bbe1ba6b3a8 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 2 Jun 2023 23:49:04 +0200 Subject: [PATCH 057/176] Add user submodule --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fa9925c..498c1cff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,7 @@ set(C2A_USER_MODULES C2A_USER_IF_WRAPPER C2A_USER_LIB C2A_USER_SETTINGS + C2A_USER_SETTINGS_SATELLITE_PARAMETERS ) if(MSVC) From 6dc963bdd0e41722a95c3cec07e2e7419152d82a Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 2 Jun 2023 23:54:24 +0200 Subject: [PATCH 058/176] Fix include path --- .../Settings/SatelliteParameters/Sample/orbit_parameters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index 9eba2553..d7afa193 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -3,6 +3,6 @@ * @brief 軌道・時刻関連の衛星固有パラメータを管理する */ -#include +#include const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 From 79d44261f748cd2d59433dae5093b6f8918c405c Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 3 Jun 2023 11:18:09 +0200 Subject: [PATCH 059/176] Add orbit calculation method --- .../UserDefined/AOCS/OrbitEstimation/orbit_calculator.c | 5 ++++- .../Settings/SatelliteParameters/Sample/orbit_parameters.c | 4 ++++ .../Settings/SatelliteParameters/orbit_parameters.h | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c index fe47bbba..4f48d657 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c @@ -21,6 +21,9 @@ #include "../../../../Library/matrix33.h" #include "../../../../Library/time_space.h" +// SatelliteParameters +#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" + static OrbitCalculator orbit_calculator_; const OrbitCalculator* const orbit_calculator = &orbit_calculator_; @@ -34,7 +37,7 @@ AppInfo APP_ORBIT_CALC_create_app(void) static void APP_ORBIT_CALC_init_(void) { - orbit_calculator_.method = APP_ORBIT_CALC_METHOD_KEPLER; + orbit_calculator_.method = ORBIT_PARAMETERS_orbit_calculation_method; orbit_calculator_.gpsr_update = APP_ORBIT_CALC_GPSR_UPDATE_DISABLE; memset(&(orbit_calculator_.position_gpsr_kepler_eci_km), 0x00, sizeof(orbit_calculator_.position_gpsr_kepler_eci_km)); memset(&(orbit_calculator_.velocity_gpsr_kepler_eci_km_s), 0x00, sizeof(orbit_calculator_.velocity_gpsr_kepler_eci_km_s)); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index d7afa193..a0145e06 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -5,4 +5,8 @@ #include +// Time const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 + +// Orbit +const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method = APP_ORBIT_CALC_METHOD_KEPLER; diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h index 25fa3564..732ca717 100644 --- a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -3,4 +3,10 @@ * @brief 軌道・時刻関連の衛星固有パラメータを管理する */ +#include + +// Time extern const double ORBIT_PARAMETERS_reference_jday; //!< Reference time for orbit calculation [Julian day] + +// Orbit +extern const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method; //!< Orbit calculation method From 572533b5e95da19a8f6b6a74414f415a252e23ed Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 3 Jun 2023 11:20:05 +0200 Subject: [PATCH 060/176] Add include guard --- src/src_user/Settings/SatelliteParameters/orbit_parameters.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h index 732ca717..e39b8f6f 100644 --- a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -3,6 +3,9 @@ * @brief 軌道・時刻関連の衛星固有パラメータを管理する */ +#ifndef ORBIT_PARAMETERS_H_ +#define ORBIT_PARAMETERS_H_ + #include // Time @@ -10,3 +13,5 @@ extern const double ORBIT_PARAMETERS_reference_jday; //!< Reference time for orb // Orbit extern const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method; //!< Orbit calculation method + +#endif // ORBIT_PARAMETERS_H_ From 26b852f9474f169d89bc70aca382b31f104e9dc4 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 3 Jun 2023 11:23:28 +0200 Subject: [PATCH 061/176] Revert unnecessary formatting for aocs_manager --- .../UserDefined/AOCS/aocs_manager.c | 752 ++++++++---------- 1 file changed, 349 insertions(+), 403 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index 14e32df7..5c205218 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -1,27 +1,26 @@ #pragma section REPRO /** - * @file aocs_manager.c - * @brief AOCS系の変数などをH/Wと切り分けて管理するマネージャーアプリ - */ +* @file aocs_manager.c +* @brief AOCS系の変数などをH/Wと切り分けて管理するマネージャーアプリ +*/ #include "aocs_manager.h" - #include #include - -#include "../../../Library/ControlUtility/gyroscopic_effect.h" #include "../../../Library/c2a_math.h" #include "../../../Library/math_constants.h" -#include "../../../Library/matrix33.h" #include "../../../Library/vector3.h" +#include "../../../Library/matrix33.h" +#include "../../../Library/ControlUtility/gyroscopic_effect.h" + #include "AttitudeControl/unloading.h" #include "aocs_mode_manager.h" // SatelliteParameters #include "../../../Settings/SatelliteParameters/orbit_parameters.h" -static AocsManager aocs_manager_; -const AocsManager* const aocs_manager = &aocs_manager_; +static AocsManager aocs_manager_; +const AocsManager* const aocs_manager = &aocs_manager_; static void APP_AOCS_MANAGER_init_(void); static void APP_AOCS_MANAGER_exec_(void); @@ -33,89 +32,80 @@ static void APP_AOCS_MANAGER_exec_(void); * @param[in] bit : 最下位から何bit目を操作するか(1~8まで) * @return 計算後のフラグ */ -static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, - const uint8_t flag_on, - const uint8_t bit); +static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, const uint8_t flag_on, const uint8_t bit); -AppInfo APP_AOCS_MANAGER_create_app(void) { - return AI_create_app_info("AOCS Manager", APP_AOCS_MANAGER_init_, - APP_AOCS_MANAGER_exec_); +AppInfo APP_AOCS_MANAGER_create_app(void) +{ + return AI_create_app_info("AOCS Manager", APP_AOCS_MANAGER_init_, APP_AOCS_MANAGER_exec_); } -static void APP_AOCS_MANAGER_init_(void) { +static void APP_AOCS_MANAGER_init_(void) +{ // 下記初期化値は物理的あり得る範囲でテキトウな値であり、全てsetter関数で意味のある値に変更されることを想定している // 衛星特性 aocs_manager_.mass_sc_kg = 10.0f; VECTOR3_initialize(aocs_manager_.rmm_sc_body_Am2, 0.1f); - aocs_manager_.inertia_tensor_sc_body_kgm2[0][0] = 0.1f; - aocs_manager_.inertia_tensor_sc_body_kgm2[0][1] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[0][2] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][0] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][1] = 0.2f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][2] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][0] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][1] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][2] = 0.2f; + aocs_manager_.inertia_tensor_sc_body_kgm2[0][0] = 0.1f; + aocs_manager_.inertia_tensor_sc_body_kgm2[0][1] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[0][2] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[1][0] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[1][1] = 0.2f; + aocs_manager_.inertia_tensor_sc_body_kgm2[1][2] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[2][0] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[2][1] = 0.0e-4f; + aocs_manager_.inertia_tensor_sc_body_kgm2[2][2] = 0.2f; // 角速度 - VECTOR3_initialize(aocs_manager_.ang_vel_obs_body_rad_s, 0.0f); - VECTOR3_initialize(aocs_manager_.ang_vel_est_body_rad_s, 0.0f); + VECTOR3_initialize(aocs_manager_.ang_vel_obs_body_rad_s, 0.0f); + VECTOR3_initialize(aocs_manager_.ang_vel_est_body_rad_s, 0.0f); VECTOR3_initialize(aocs_manager_.ang_vel_target_body_rad_s, 0.0f); - VECTOR3_initialize(aocs_manager_.ang_vel_error_body_rad_s, 0.0f); - aocs_manager_.limit_angular_velocity_rad_s = - PHYSICAL_CONST_degree_to_radian(0.8f); + VECTOR3_initialize(aocs_manager_.ang_vel_error_body_rad_s, 0.0f); + aocs_manager_.limit_angular_velocity_rad_s = PHYSICAL_CONST_degree_to_radian(0.8f); // Quaternion aocs_manager_.quaternion_obs_i2b = QUATERNION_make_unit(); aocs_manager_.quaternion_est_i2b = QUATERNION_make_unit(); aocs_manager_.quaternion_target_i2t = QUATERNION_make_unit(); aocs_manager_.quaternion_error_b2t = QUATERNION_make_unit(); - aocs_manager_.limit_maneuver_angle_rad = - PHYSICAL_CONST_degree_to_radian(30.0f); + aocs_manager_.limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); // 太陽方向 - const float kSqrtOneThird = 0.57735f; // ノルム1になる値 - VECTOR3_initialize(aocs_manager_.sun_vec_obs_body, kSqrtOneThird); - VECTOR3_initialize(aocs_manager_.sun_vec_est_body, kSqrtOneThird); - VECTOR3_initialize(aocs_manager_.sun_vec_est_eci, kSqrtOneThird); + const float kSqrtOneThird = 0.57735f; // ノルム1になる値 + VECTOR3_initialize(aocs_manager_.sun_vec_obs_body, kSqrtOneThird); + VECTOR3_initialize(aocs_manager_.sun_vec_est_body, kSqrtOneThird); + VECTOR3_initialize(aocs_manager_.sun_vec_est_eci, kSqrtOneThird); VECTOR3_initialize(aocs_manager_.sun_vec_target_body, kSqrtOneThird); aocs_manager_.sun_vec_error_rad = 0.0f; // 磁場ベクトル VECTOR3_initialize(aocs_manager_.mag_vec_obs_body_nT, 0.0f); VECTOR3_initialize(aocs_manager_.mag_vec_est_body_nT, 0.0f); - VECTOR3_initialize(aocs_manager_.mag_vec_est_eci_nT, 0.0f); + VECTOR3_initialize(aocs_manager_.mag_vec_est_eci_nT, 0.0f); // トルク VECTOR3_initialize(aocs_manager_.internal_torque_target_body_Nm, 0.0f); VECTOR3_initialize(aocs_manager_.external_torque_target_body_Nm, 0.0f); - VECTOR3_initialize(aocs_manager_.torque_est_body_Nm, 0.0f); - VECTOR3_initialize(aocs_manager_.internal_torque_max_body_Nm, - 5e-3f); // これで進めるが、必要になったら修正してよい - VECTOR3_initialize(aocs_manager_.external_torque_max_body_Nm, - 3e-4f); // これで進めるが、必要になったら修正してよい - VECTOR3_initialize(aocs_manager_.constant_torque_body_Nm, 0.0f); - aocs_manager_.constant_torque_permission = - AOCS_MANAGER_CONSTANT_TORQUE_DISABLE; + VECTOR3_initialize(aocs_manager_.torque_est_body_Nm, 0.0f); + VECTOR3_initialize(aocs_manager_.internal_torque_max_body_Nm, 5e-3f); // これで進めるが、必要になったら修正してよい + VECTOR3_initialize(aocs_manager_.external_torque_max_body_Nm, 3e-4f); // これで進めるが、必要になったら修正してよい + VECTOR3_initialize(aocs_manager_.constant_torque_body_Nm, 0.0f); + aocs_manager_.constant_torque_permission = AOCS_MANAGER_CONSTANT_TORQUE_DISABLE; // 磁気モーメント VECTOR3_initialize(aocs_manager_.mag_moment_target_body_Am2, 0.0f); // MTQ情報 - for (int mtq_idx = 0; mtq_idx < AOCS_MANAGER_NUM_OF_MTQ; mtq_idx++) { + for (int mtq_idx = 0; mtq_idx < AOCS_MANAGER_NUM_OF_MTQ; mtq_idx++) + { VECTOR3_copy(aocs_manager_.mtq_magnetic_moment_direction_matrix[mtq_idx], - mtq_seiren_driver[mtq_idx]->info.magnetic_moment_direction_b); + mtq_seiren_driver[mtq_idx]->info.magnetic_moment_direction_b); } - AOCS_MANAGER_set_mtq_magnetic_moment_direction_matrix( - aocs_manager_.mtq_magnetic_moment_direction_matrix); + AOCS_MANAGER_set_mtq_magnetic_moment_direction_matrix(aocs_manager_.mtq_magnetic_moment_direction_matrix); aocs_manager_.mtq_output_state = AOCS_MANAGER_MTQ_OUTPUT_STATE_OFF; aocs_manager_.mag_exclusive_state = AOCS_MANAGER_MAG_EXCLUSIVE_STATE_ACTIVE; // RW情報 - float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW] - [PHYSICAL_CONST_THREE_DIM]; - for (int rw_idx = 0; rw_idx < AOCS_MANAGER_NUM_OF_RW; rw_idx++) { + float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW][PHYSICAL_CONST_THREE_DIM]; + for (int rw_idx = 0; rw_idx < AOCS_MANAGER_NUM_OF_RW; rw_idx++) + { // 方向ベクトル情報のマスターはDI_RWとなっている点に注意 - VECTOR3_copy(rw_rotation_direction_matrix[rw_idx], - rw0003_driver[rw_idx]->info.rotation_direction_b); - // 慣性モーメント情報のマスターはDriverとなっている点に注意 TODO_L: - // 可変にするか要検討 - aocs_manager_.rw_moment_of_inertia_kgm2[rw_idx] = - RW0003_kMomentOfInertiaKgm2; + VECTOR3_copy(rw_rotation_direction_matrix[rw_idx], rw0003_driver[rw_idx]->info.rotation_direction_b); + // 慣性モーメント情報のマスターはDriverとなっている点に注意 TODO_L: 可変にするか要検討 + aocs_manager_.rw_moment_of_inertia_kgm2[rw_idx] = RW0003_kMomentOfInertiaKgm2; } AOCS_MANAGER_set_rw_rotation_direction_matrix(rw_rotation_direction_matrix); float rw_angular_velocity_rad_s[AOCS_MANAGER_NUM_OF_RW]; @@ -128,7 +118,7 @@ static void APP_AOCS_MANAGER_init_(void) { // aocs_manager_.current_gps_time_est_msec = 0; // aocs_manager_.current_gps_time_est_week = 0; aocs_manager_.obct_gps_time_est = OBCT_create(0, 0, 0); - aocs_manager_.obct_reference = OBCT_create(0, 0, 0); + aocs_manager_.obct_reference = OBCT_create(0, 0, 0); aocs_manager_.reference_jday = ORBIT_PARAMETERS_reference_jday; // センサ状態 aocs_manager_.sun_visibility = AOCS_MANAGER_SUN_INVISIBILE; @@ -136,369 +126,352 @@ static void APP_AOCS_MANAGER_init_(void) { aocs_manager_.stt_availability = AOCS_MANAGER_STT_UNAVAILABLE; // 軌道 - VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_ecef_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_eci_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_pos_est_ecef_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_pos_est_eci_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_ecef_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_obs_eci_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_est_ecef_m, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_pos_est_eci_m, 0.0); VECTOR3_initialize_double(aocs_manager_.sat_pos_est_lla_rad_m, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_ecef_m_s, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_eci_m_s, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_est_ecef_m_s, 0.0); - VECTOR3_initialize_double(aocs_manager_.sat_vel_est_eci_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_ecef_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_obs_eci_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_est_ecef_m_s, 0.0); + VECTOR3_initialize_double(aocs_manager_.sat_vel_est_eci_m_s, 0.0); // 各種フラグ aocs_manager_.flags_for_tlm = 0; } -static void APP_AOCS_MANAGER_exec_(void) { +static void APP_AOCS_MANAGER_exec_(void) +{ // TLM生成用処理 - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( - aocs_manager_.flags_for_tlm, - aocs_manager_.sun_visibility == AOCS_MANAGER_SUN_VISIBLE, 1); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( - aocs_manager_.flags_for_tlm, - aocs_manager_.gps_visibility == AOCS_MANAGER_GPS_VISIBLE, 2); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( - aocs_manager_.flags_for_tlm, - aocs_manager_.stt_availability == AOCS_MANAGER_STT_AVAILABLE, 3); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( - aocs_manager_.flags_for_tlm, - unloading->unloading_state[RW0003_IDX_ON_X] != APP_UNLOADING_STATE_OFF, - 4); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( - aocs_manager_.flags_for_tlm, - unloading->unloading_state[RW0003_IDX_ON_Y] != APP_UNLOADING_STATE_OFF, - 5); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( - aocs_manager_.flags_for_tlm, - unloading->unloading_state[RW0003_IDX_ON_Z] != APP_UNLOADING_STATE_OFF, - 6); - aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_( - aocs_manager_.flags_for_tlm, - aocs_mode_manager->is_control_error_small == 1, 7); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, + aocs_manager_.sun_visibility == AOCS_MANAGER_SUN_VISIBLE, + 1); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, + aocs_manager_.gps_visibility == AOCS_MANAGER_GPS_VISIBLE, + 2); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, + aocs_manager_.stt_availability == AOCS_MANAGER_STT_AVAILABLE, + 3); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, + unloading->unloading_state[RW0003_IDX_ON_X] != APP_UNLOADING_STATE_OFF, + 4); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, + unloading->unloading_state[RW0003_IDX_ON_Y] != APP_UNLOADING_STATE_OFF, + 5); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, + unloading->unloading_state[RW0003_IDX_ON_Z] != APP_UNLOADING_STATE_OFF, + 6); + aocs_manager_.flags_for_tlm = APP_AOCS_MANAGER_bit_flag_control_(aocs_manager_.flags_for_tlm, + aocs_mode_manager->is_control_error_small == 1, + 7); + } // 衛星特性 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mass_sc_kg(const float mass_sc_kg) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mass_sc_kg(const float mass_sc_kg) +{ if (mass_sc_kg <= 0.0f) return AOCS_MANAGER_ERROR_NG; aocs_manager_.mass_sc_kg = mass_sc_kg; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_rmm_sc_body_Am2( - const float rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_rmm_sc_body_Am2(const float rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy(aocs_manager_.rmm_sc_body_Am2, rmm_sc_body_Am2); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2( - const float inertia_tensor_sc_body_kgm2[][PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2(const float inertia_tensor_sc_body_kgm2[][PHYSICAL_CONST_THREE_DIM]) +{ // 対角成分確認 - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { - if (inertia_tensor_sc_body_kgm2[i][i] <= 0.0f) { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { + if (inertia_tensor_sc_body_kgm2[i][i] <= 0.0f) + { return AOCS_MANAGER_ERROR_NG; } } // 対称行列確認 - if (MATRIX33_is_symmetry(inertia_tensor_sc_body_kgm2) != C2A_MATH_ERROR_OK) - return AOCS_MANAGER_ERROR_NG; + if (MATRIX33_is_symmetry(inertia_tensor_sc_body_kgm2) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; - MATRIX33_copy(aocs_manager_.inertia_tensor_sc_body_kgm2, - inertia_tensor_sc_body_kgm2); + MATRIX33_copy(aocs_manager_.inertia_tensor_sc_body_kgm2, inertia_tensor_sc_body_kgm2); return AOCS_MANAGER_ERROR_OK; } // 角速度 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_obs_body_rad_s( - const float ang_vel_obs_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_obs_body_rad_s(const float ang_vel_obs_body_rad_s[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy(aocs_manager_.ang_vel_obs_body_rad_s, ang_vel_obs_body_rad_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_est_body_rad_s( - const float ang_vel_est_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_est_body_rad_s(const float ang_vel_est_body_rad_s[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy(aocs_manager_.ang_vel_est_body_rad_s, ang_vel_est_body_rad_s); // 保有角運動量の計算 - GYROSCOPIC_EFFECT_calculate_total_momentum( - aocs_manager_.ang_mom_est_body_Nms, - aocs_manager_.inertia_tensor_sc_body_kgm2, - aocs_manager_.ang_vel_est_body_rad_s, - aocs_manager_.rw_angular_momentum_body_Nms); + GYROSCOPIC_EFFECT_calculate_total_momentum(aocs_manager_.ang_mom_est_body_Nms, + aocs_manager_.inertia_tensor_sc_body_kgm2, + aocs_manager_.ang_vel_est_body_rad_s, + aocs_manager_.rw_angular_momentum_body_Nms); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_target_body_rad_s( - const float ang_vel_target_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_target_body_rad_s(const float ang_vel_target_body_rad_s[PHYSICAL_CONST_THREE_DIM]) +{ float ang_vel_norm_rad_s = VECTOR3_norm(ang_vel_target_body_rad_s); - if (ang_vel_norm_rad_s > aocs_manager_.limit_angular_velocity_rad_s) - return AOCS_MANAGER_ERROR_NG; - VECTOR3_copy(aocs_manager_.ang_vel_target_body_rad_s, - ang_vel_target_body_rad_s); + if (ang_vel_norm_rad_s > aocs_manager_.limit_angular_velocity_rad_s) return AOCS_MANAGER_ERROR_NG; + VECTOR3_copy(aocs_manager_.ang_vel_target_body_rad_s, ang_vel_target_body_rad_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_error_body_rad_s( - const float ang_vel_error_body_rad_s[PHYSICAL_CONST_THREE_DIM]) { - VECTOR3_copy(aocs_manager_.ang_vel_error_body_rad_s, - ang_vel_error_body_rad_s); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_ang_vel_error_body_rad_s(const float ang_vel_error_body_rad_s[PHYSICAL_CONST_THREE_DIM]) +{ + VECTOR3_copy(aocs_manager_.ang_vel_error_body_rad_s, ang_vel_error_body_rad_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_angular_velocity_rad_s( - const float limit_angular_velocity_rad_s) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_angular_velocity_rad_s(const float limit_angular_velocity_rad_s) +{ if (limit_angular_velocity_rad_s < 0.0f) return AOCS_MANAGER_ERROR_NG; aocs_manager_.limit_angular_velocity_rad_s = limit_angular_velocity_rad_s; return AOCS_MANAGER_ERROR_OK; } // Quaternion -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_obs_i2b( - const Quaternion quaternion_obs_i2b) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_obs_i2b(const Quaternion quaternion_obs_i2b) +{ + aocs_manager_.quaternion_obs_i2b = quaternion_obs_i2b; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_est_i2b( - const Quaternion quaternion_est_i2b) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_est_i2b(const Quaternion quaternion_est_i2b) +{ aocs_manager_.quaternion_est_i2b = quaternion_est_i2b; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_target_i2t( - const Quaternion quaternion_target_i2t) { - Quaternion q_diff = QUATERNION_divide(aocs_manager_.quaternion_est_i2b, - quaternion_target_i2t); - if (q_diff.scalar_part < 0.0f) - q_diff.scalar_part = q_diff.scalar_part * -1.0f; - float angle_rad = 2.0f * acosf(q_diff.scalar_part); // 必ず正の値 - if (angle_rad > aocs_manager_.limit_maneuver_angle_rad) - return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_target_i2t(const Quaternion quaternion_target_i2t) +{ + Quaternion q_diff = QUATERNION_divide(aocs_manager_.quaternion_est_i2b, quaternion_target_i2t); + if (q_diff.scalar_part < 0.0f) q_diff.scalar_part = q_diff.scalar_part * -1.0f; + float angle_rad = 2.0f * acosf(q_diff.scalar_part); // 必ず正の値 + if (angle_rad > aocs_manager_.limit_maneuver_angle_rad) return AOCS_MANAGER_ERROR_NG; aocs_manager_.quaternion_target_i2t = quaternion_target_i2t; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_error_b2t( - const Quaternion quaternion_error_b2t) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_quaternion_error_b2t(const Quaternion quaternion_error_b2t) +{ aocs_manager_.quaternion_error_b2t = quaternion_error_b2t; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_maneuver_angle_rad( - const float limit_maneuver_angle_rad) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_limit_maneuver_angle_rad(const float limit_maneuver_angle_rad) +{ if (limit_maneuver_angle_rad < 0.0) return AOCS_MANAGER_ERROR_NG; if (limit_maneuver_angle_rad > MATH_CONST_PI) return AOCS_MANAGER_ERROR_NG; aocs_manager_.limit_maneuver_angle_rad = limit_maneuver_angle_rad; return AOCS_MANAGER_ERROR_OK; } + // 太陽方向 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_obs_body( - const float sun_vec_obs_body[PHYSICAL_CONST_THREE_DIM]) { - if (VECTOR3_is_normalized(sun_vec_obs_body) != C2A_MATH_ERROR_OK) - return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_obs_body(const float sun_vec_obs_body[PHYSICAL_CONST_THREE_DIM]) +{ + if (VECTOR3_is_normalized(sun_vec_obs_body) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_obs_body, sun_vec_obs_body); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_body( - const float sun_vec_est_body[PHYSICAL_CONST_THREE_DIM]) { - if (VECTOR3_is_normalized(sun_vec_est_body) != C2A_MATH_ERROR_OK) - return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_body(const float sun_vec_est_body[PHYSICAL_CONST_THREE_DIM]) +{ + if (VECTOR3_is_normalized(sun_vec_est_body) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_est_body, sun_vec_est_body); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_eci( - const float sun_vec_est_eci[PHYSICAL_CONST_THREE_DIM]) { - if (VECTOR3_is_normalized(sun_vec_est_eci) != C2A_MATH_ERROR_OK) - return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_est_eci(const float sun_vec_est_eci[PHYSICAL_CONST_THREE_DIM]) +{ + if (VECTOR3_is_normalized(sun_vec_est_eci) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_est_eci, sun_vec_est_eci); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_target_body( - const float sun_vec_target_body[PHYSICAL_CONST_THREE_DIM]) { - if (VECTOR3_is_normalized(sun_vec_target_body) != C2A_MATH_ERROR_OK) - return AOCS_MANAGER_ERROR_NG; +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_target_body(const float sun_vec_target_body[PHYSICAL_CONST_THREE_DIM]) +{ + if (VECTOR3_is_normalized(sun_vec_target_body) != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; VECTOR3_copy(aocs_manager_.sun_vec_target_body, sun_vec_target_body); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_error_rad( - const float sun_vec_error_rad) { - aocs_manager_.sun_vec_error_rad = - C2A_MATH_normalize_zero_2pi(sun_vec_error_rad); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_vec_error_rad(const float sun_vec_error_rad) +{ + aocs_manager_.sun_vec_error_rad = C2A_MATH_normalize_zero_2pi(sun_vec_error_rad); return AOCS_MANAGER_ERROR_OK; } // 磁場ベクトル -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_obs_body_nT( - const float mag_vec_obs_body_nT[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_obs_body_nT(const float mag_vec_obs_body_nT[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy(aocs_manager_.mag_vec_obs_body_nT, mag_vec_obs_body_nT); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_body_nT( - const float mag_vec_est_body_nT[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_body_nT(const float mag_vec_est_body_nT[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy(aocs_manager_.mag_vec_est_body_nT, mag_vec_est_body_nT); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_eci_nT( - const float mag_vec_est_eci_nT[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_vec_est_eci_nT(const float mag_vec_est_eci_nT[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy(aocs_manager_.mag_vec_est_eci_nT, mag_vec_est_eci_nT); return AOCS_MANAGER_ERROR_OK; } // トルク -AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_target_body_Nm( - const float internal_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_target_body_Nm(const float internal_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ float clipped_value[PHYSICAL_CONST_THREE_DIM]; - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { - clipped_value[i] = - C2A_MATH_clip_value_abs(internal_torque_target_body_Nm[i], - aocs_manager_.internal_torque_max_body_Nm[i]); + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { + clipped_value[i] = C2A_MATH_clip_value_abs(internal_torque_target_body_Nm[i], + aocs_manager_.internal_torque_max_body_Nm[i]); } VECTOR3_copy(aocs_manager_.internal_torque_target_body_Nm, clipped_value); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_target_body_Nm( - const float external_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_target_body_Nm(const float external_torque_target_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ float clipped_value[PHYSICAL_CONST_THREE_DIM]; - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { - clipped_value[i] = - C2A_MATH_clip_value_abs(external_torque_target_body_Nm[i], - aocs_manager_.external_torque_max_body_Nm[i]); + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { + clipped_value[i] = C2A_MATH_clip_value_abs(external_torque_target_body_Nm[i], + aocs_manager_.external_torque_max_body_Nm[i]); } VECTOR3_copy(aocs_manager_.external_torque_target_body_Nm, clipped_value); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_max_body_Nm( - const float internal_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) { - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_internal_torque_max_body_Nm(const float internal_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { if (internal_torque_max_body_Nm[i] < 0.0f) return AOCS_MANAGER_ERROR_NG; } - VECTOR3_copy(aocs_manager_.internal_torque_max_body_Nm, - internal_torque_max_body_Nm); + VECTOR3_copy(aocs_manager_.internal_torque_max_body_Nm, internal_torque_max_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_max_body_Nm( - const float external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) { - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_external_torque_max_body_Nm(const float external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { if (external_torque_max_body_Nm[i] < 0.0f) return AOCS_MANAGER_ERROR_NG; } - VECTOR3_copy(aocs_manager_.external_torque_max_body_Nm, - external_torque_max_body_Nm); + VECTOR3_copy(aocs_manager_.external_torque_max_body_Nm, external_torque_max_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_torque_est_body_Nm( - const float torque_est_body_Nm[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_torque_est_body_Nm(const float torque_est_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy(aocs_manager_.torque_est_body_Nm, torque_est_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_body_Nm( - const float constant_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) { - for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { - C2A_MATH_ERROR ret = C2A_MATH_check_abs_range_violation( - constant_torque_body_Nm[i], - aocs_manager_.internal_torque_max_body_Nm[i]); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_body_Nm(const float constant_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ + for (uint8_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { + C2A_MATH_ERROR ret = C2A_MATH_check_abs_range_violation(constant_torque_body_Nm[i], + aocs_manager_.internal_torque_max_body_Nm[i]); if (ret == C2A_MATH_ERROR_RANGE_OVER) return AOCS_MANAGER_ERROR_NG; } VECTOR3_copy(aocs_manager_.constant_torque_body_Nm, constant_torque_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_permission( - const AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION constant_torque_permission) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_constant_torque_permission(const AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION constant_torque_permission) +{ aocs_manager_.constant_torque_permission = constant_torque_permission; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_moment_target_body_Am2( - const float mag_moment_target_body_Am2[PHYSICAL_CONST_THREE_DIM]) { - VECTOR3_copy(aocs_manager_.mag_moment_target_body_Am2, - mag_moment_target_body_Am2); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_moment_target_body_Am2(const float mag_moment_target_body_Am2[PHYSICAL_CONST_THREE_DIM]) +{ + VECTOR3_copy(aocs_manager_.mag_moment_target_body_Am2, mag_moment_target_body_Am2); return AOCS_MANAGER_ERROR_OK; } AOCS_MANAGER_ERROR AOCS_MANAGER_set_mtq_magnetic_moment_direction_matrix( - const float - mtq_magnetic_moment_direction_matrix[AOCS_MANAGER_NUM_OF_MTQ] - [PHYSICAL_CONST_THREE_DIM]) { - for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_MTQ; idx++) { - VECTOR3_copy(aocs_manager_.mtq_magnetic_moment_direction_matrix[idx], - mtq_magnetic_moment_direction_matrix[idx]); + const float mtq_magnetic_moment_direction_matrix[AOCS_MANAGER_NUM_OF_MTQ][PHYSICAL_CONST_THREE_DIM]) +{ + for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_MTQ; idx++) + { + VECTOR3_copy(aocs_manager_.mtq_magnetic_moment_direction_matrix[idx], mtq_magnetic_moment_direction_matrix[idx]); } // TODO_L: MTQが4つ以上になったら修正が必要 - C2A_MATH_ERROR ret = - MATRIX33_inverse(aocs_manager_.mtq_distribution_matrix, - aocs_manager_.mtq_magnetic_moment_direction_matrix); + C2A_MATH_ERROR ret = MATRIX33_inverse(aocs_manager_.mtq_distribution_matrix, aocs_manager_.mtq_magnetic_moment_direction_matrix); if (ret != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mtq_output_state( - const AOCS_MANAGER_MTQ_OUTPUT_STATE mtq_output_state) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mtq_output_state(const AOCS_MANAGER_MTQ_OUTPUT_STATE mtq_output_state) +{ aocs_manager_.mtq_output_state = mtq_output_state; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_exclusive_state( - const AOCS_MANAGER_MAG_EXCLUSIVE_STATE mag_exclusive_state) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_mag_exclusive_state(const AOCS_MANAGER_MAG_EXCLUSIVE_STATE mag_exclusive_state) +{ aocs_manager_.mag_exclusive_state = mag_exclusive_state; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_rw_angular_velocity_rad_s( - const float rw_angular_velocity_rad_s[AOCS_MANAGER_NUM_OF_RW]) { - VECTOR3_copy(aocs_manager_.rw_angular_velocity_rad_s, - rw_angular_velocity_rad_s); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_rw_angular_velocity_rad_s(const float rw_angular_velocity_rad_s[AOCS_MANAGER_NUM_OF_RW]) +{ + VECTOR3_copy(aocs_manager_.rw_angular_velocity_rad_s, rw_angular_velocity_rad_s); // 角運動量の計算 - for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) { - aocs_manager_.rw_angular_momentum_Nms[idx] = - aocs_manager_.rw_angular_velocity_rad_s[idx] * - aocs_manager_.rw_moment_of_inertia_kgm2[idx]; + for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) + { + aocs_manager_.rw_angular_momentum_Nms[idx] = aocs_manager_.rw_angular_velocity_rad_s[idx] * aocs_manager_.rw_moment_of_inertia_kgm2[idx]; } // 角運動量の座標変換 TODO_L: RWが4つになったら修正が必要 MATRIX33_multiply_matrix_vector(aocs_manager_.rw_angular_momentum_body_Nms, - aocs_manager_.rw_rotation_direction_matrix, - aocs_manager_.rw_angular_momentum_Nms); + aocs_manager_.rw_rotation_direction_matrix, + aocs_manager_.rw_angular_momentum_Nms); return AOCS_MANAGER_ERROR_OK; } AOCS_MANAGER_ERROR AOCS_MANAGER_set_rw_rotation_direction_matrix( - const float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW] - [PHYSICAL_CONST_THREE_DIM]) { - for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) { - VECTOR3_copy(aocs_manager_.rw_rotation_direction_matrix[idx], - rw_rotation_direction_matrix[idx]); + const float rw_rotation_direction_matrix[AOCS_MANAGER_NUM_OF_RW][PHYSICAL_CONST_THREE_DIM]) +{ + for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) + { + VECTOR3_copy(aocs_manager_.rw_rotation_direction_matrix[idx], rw_rotation_direction_matrix[idx]); } // TODO_L: RWが4つ以上になったら修正が必要 - C2A_MATH_ERROR ret = - MATRIX33_inverse(aocs_manager_.rw_distribution_matrix, - aocs_manager_.rw_rotation_direction_matrix); + C2A_MATH_ERROR ret = MATRIX33_inverse(aocs_manager_.rw_distribution_matrix, aocs_manager_.rw_rotation_direction_matrix); if (ret != C2A_MATH_ERROR_OK) return AOCS_MANAGER_ERROR_NG; return AOCS_MANAGER_ERROR_OK; } // 時刻 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs( - const uint32_t current_gps_time_obs_msec, - const uint16_t current_gps_time_obs_week, const ObcTime obct_gps_time_obs) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs(const uint32_t current_gps_time_obs_msec, + const uint16_t current_gps_time_obs_week, + const ObcTime obct_gps_time_obs) +{ aocs_manager_.current_gps_time_obs_msec = current_gps_time_obs_msec; aocs_manager_.current_gps_time_obs_week = current_gps_time_obs_week; aocs_manager_.obct_gps_time_obs = obct_gps_time_obs; @@ -506,12 +479,9 @@ AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs( } // 22_08_24時点で使用箇所がないため,一旦コメントアウト -// AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_est(const uint32_t -// current_gps_time_est_msec, -// const uint16_t -// current_gps_time_est_week, -// const ObcTime -// obct_gps_time_est) +// AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_est(const uint32_t current_gps_time_est_msec, +// const uint16_t current_gps_time_est_week, +// const ObcTime obct_gps_time_est) // { // aocs_manager_.current_gps_time_est_msec = current_gps_time_est_msec; // aocs_manager_.current_gps_time_est_week = current_gps_time_est_week; @@ -519,8 +489,8 @@ AOCS_MANAGER_ERROR AOCS_MANAGER_set_current_gps_time_obs( // return AOCS_MANAGER_ERROR_OK; // } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_reference_jday( - const double reference_jday, const ObcTime obct_reference) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_reference_jday(const double reference_jday, const ObcTime obct_reference) +{ if (reference_jday <= 0.0) return AOCS_MANAGER_ERROR_NG; aocs_manager_.reference_jday = reference_jday; @@ -529,385 +499,361 @@ AOCS_MANAGER_ERROR AOCS_MANAGER_set_reference_jday( } // センサ状態 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_visibility( - const AOCS_MANAGER_SUN_VISIBILITY sun_visibility) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_visibility(const AOCS_MANAGER_SUN_VISIBILITY sun_visibility) +{ aocs_manager_.sun_visibility = sun_visibility; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_stt_availability( - const AOCS_MANAGER_STT_AVAILABILITY stt_availibility) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_stt_availability(const AOCS_MANAGER_STT_AVAILABILITY stt_availibility) +{ aocs_manager_.stt_availability = stt_availibility; return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_gps_visibility( - const AOCS_MANAGER_GPS_VISIBILITY gps_visibility) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_gps_visibility(const AOCS_MANAGER_GPS_VISIBILITY gps_visibility) +{ aocs_manager_.gps_visibility = gps_visibility; return AOCS_MANAGER_ERROR_OK; } // 軌道 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_ecef_m( - const double sat_pos_obs_ecef_m[PHYSICAL_CONST_THREE_DIM], - const double sat_vel_obs_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_ecef_m(const double sat_pos_obs_ecef_m [PHYSICAL_CONST_THREE_DIM], + const double sat_vel_obs_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy_double(aocs_manager_.sat_pos_obs_ecef_m, sat_pos_obs_ecef_m); VECTOR3_copy_double(aocs_manager_.sat_vel_obs_ecef_m_s, sat_vel_obs_ecef_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_eci_m( - const double sat_pos_obs_eci_m[PHYSICAL_CONST_THREE_DIM], - const double sat_vel_obs_eci_m_s[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_obs_eci_m(const double sat_pos_obs_eci_m[PHYSICAL_CONST_THREE_DIM], + const double sat_vel_obs_eci_m_s[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy_double(aocs_manager_.sat_pos_obs_eci_m, sat_pos_obs_eci_m); VECTOR3_copy_double(aocs_manager_.sat_vel_obs_eci_m_s, sat_vel_obs_eci_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_ecef_m( - const double sat_pos_est_ecef_m[PHYSICAL_CONST_THREE_DIM], - const double sat_vel_est_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_ecef_m(const double sat_pos_est_ecef_m [PHYSICAL_CONST_THREE_DIM], + const double sat_vel_est_ecef_m_s[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy_double(aocs_manager_.sat_pos_est_ecef_m, sat_pos_est_ecef_m); VECTOR3_copy_double(aocs_manager_.sat_vel_est_ecef_m_s, sat_vel_est_ecef_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_eci_m( - const double sat_pos_est_eci_m[PHYSICAL_CONST_THREE_DIM], - const double sat_vel_est_eci_m_s[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_vel_est_eci_m(const double sat_pos_est_eci_m [PHYSICAL_CONST_THREE_DIM], + const double sat_vel_est_eci_m_s[PHYSICAL_CONST_THREE_DIM]) +{ VECTOR3_copy_double(aocs_manager_.sat_pos_est_eci_m, sat_pos_est_eci_m); VECTOR3_copy_double(aocs_manager_.sat_vel_est_eci_m_s, sat_vel_est_eci_m_s); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_est_lla_rad_m( - const double sat_pos_est_lla_rad_m[PHYSICAL_CONST_THREE_DIM]) { - VECTOR3_copy_double(aocs_manager_.sat_pos_est_lla_rad_m, - sat_pos_est_lla_rad_m); +AOCS_MANAGER_ERROR AOCS_MANAGER_set_sat_pos_est_lla_rad_m(const double sat_pos_est_lla_rad_m[PHYSICAL_CONST_THREE_DIM]) +{ + VECTOR3_copy_double(aocs_manager_.sat_pos_est_lla_rad_m, sat_pos_est_lla_rad_m); return AOCS_MANAGER_ERROR_OK; } // 座標変換 -AOCS_MANAGER_ERROR AOCS_MANAGER_set_dcm_eci_to_ecef( - const double dcm_eci_to_ecef[PHYSICAL_CONST_THREE_DIM] - [PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_set_dcm_eci_to_ecef(const double dcm_eci_to_ecef[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM]) +{ MATRIX33_copy_double(aocs_manager_.dcm_eci_to_ecef, dcm_eci_to_ecef); return AOCS_MANAGER_ERROR_OK; } + // 計算関数 -AOCS_MANAGER_ERROR AOCS_MANAGER_add_constant_torque_body_nm( - float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], - const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) { - if (aocs_manager_.constant_torque_permission != - AOCS_MANAGER_CONSTANT_TORQUE_ENABLE) { +AOCS_MANAGER_ERROR AOCS_MANAGER_add_constant_torque_body_nm(float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], + const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ + if (aocs_manager_.constant_torque_permission != AOCS_MANAGER_CONSTANT_TORQUE_ENABLE) + { VECTOR3_copy(out_torque_body_Nm, in_torque_body_Nm); return AOCS_MANAGER_ERROR_NG; } - VECTOR3_add(out_torque_body_Nm, in_torque_body_Nm, - aocs_manager_.constant_torque_body_Nm); + VECTOR3_add(out_torque_body_Nm, in_torque_body_Nm, aocs_manager_.constant_torque_body_Nm); return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_add_gyroscopic_torque_body_nm( - float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], - const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) { +AOCS_MANAGER_ERROR AOCS_MANAGER_add_gyroscopic_torque_body_nm(float out_torque_body_Nm[PHYSICAL_CONST_THREE_DIM], + const float in_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]) +{ float gyroscopic_effect_trq_Nm[PHYSICAL_CONST_THREE_DIM]; - GYROSCOPIC_EFFECT_calculate_gyroscopic_torque( - gyroscopic_effect_trq_Nm, aocs_manager->ang_vel_est_body_rad_s, - aocs_manager->ang_mom_est_body_Nms); + GYROSCOPIC_EFFECT_calculate_gyroscopic_torque(gyroscopic_effect_trq_Nm, + aocs_manager->ang_vel_est_body_rad_s, + aocs_manager->ang_mom_est_body_Nms); VECTOR3_add(out_torque_body_Nm, in_torque_body_Nm, gyroscopic_effect_trq_Nm); return AOCS_MANAGER_ERROR_OK; } + // Static functions -static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, - const uint8_t flag_on, - const uint8_t bit) { +static uint8_t APP_AOCS_MANAGER_bit_flag_control_(const uint8_t flags_in, const uint8_t flag_on, const uint8_t bit) +{ uint8_t bit_field = 0x01 << (bit - 1); uint8_t flags_out; - if (flag_on) { + if (flag_on) + { flags_out = flags_in | bit_field; - } else { + } + else + { flags_out = flags_in & ~bit_field; } return flags_out; } + // Command functions // Structure -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MASS(const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MASS(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); float mass_sc_kg; ENDIAN_memcpy(&mass_sc_kg, param, sizeof(float)); AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_mass_sc_kg(mass_sc_kg); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_INERTIA_TENSOR( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_INERTIA_TENSOR(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; - float inertia_tensor_sc_body_kgm2[PHYSICAL_CONST_THREE_DIM] - [PHYSICAL_CONST_THREE_DIM]; + float inertia_tensor_sc_body_kgm2[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[i][i], param + param_id, - sizeof(float)); + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[i][i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][1], param + param_id, - sizeof(float)); + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][1], param + param_id, sizeof(float)); param_id += (int)sizeof(float); inertia_tensor_sc_body_kgm2[1][0] = inertia_tensor_sc_body_kgm2[0][1]; - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][2], param + param_id, - sizeof(float)); + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[0][2], param + param_id, sizeof(float)); param_id += (int)sizeof(float); inertia_tensor_sc_body_kgm2[2][0] = inertia_tensor_sc_body_kgm2[0][2]; - ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[1][2], param + param_id, - sizeof(float)); + ENDIAN_memcpy(&inertia_tensor_sc_body_kgm2[1][2], param + param_id, sizeof(float)); param_id += (int)sizeof(float); inertia_tensor_sc_body_kgm2[2][1] = inertia_tensor_sc_body_kgm2[1][2]; - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2(inertia_tensor_sc_body_kgm2); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_inertia_tensor_sc_body_kgm2(inertia_tensor_sc_body_kgm2); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_RMM(const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_RMM(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { ENDIAN_memcpy(&rmm_sc_body_Am2[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_rmm_sc_body_Am2(rmm_sc_body_Am2); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // Target -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float quaternion_target_i2t_array[PHYSICAL_CONST_QUATERNION_DIM]; - for (int i = 0; i < PHYSICAL_CONST_QUATERNION_DIM; i++) { - ENDIAN_memcpy(&quaternion_target_i2t_array[i], param + param_id, - sizeof(float)); + for (int i = 0; i < PHYSICAL_CONST_QUATERNION_DIM; i++) + { + ENDIAN_memcpy(&quaternion_target_i2t_array[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } Quaternion quaternion_target_i2t; - C2A_MATH_ERROR ret_c2a_math = QUATERNION_make_from_array( - &quaternion_target_i2t, quaternion_target_i2t_array, - QUATERNION_SCALAR_POSITION_LAST); - if (ret_c2a_math != C2A_MATH_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + C2A_MATH_ERROR ret_c2a_math = QUATERNION_make_from_array(&quaternion_target_i2t, + quaternion_target_i2t_array, + QUATERNION_SCALAR_POSITION_LAST); + if (ret_c2a_math != C2A_MATH_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - AOCS_MANAGER_ERROR ret_aocs_manager = - AOCS_MANAGER_set_quaternion_target_i2t(quaternion_target_i2t); - if (ret_aocs_manager != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + AOCS_MANAGER_ERROR ret_aocs_manager = AOCS_MANAGER_set_quaternion_target_i2t(quaternion_target_i2t); + if (ret_aocs_manager != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION_FROM_CURRENT_ATTITUDE( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_TARGET_QUATERNION_FROM_CURRENT_ATTITUDE(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; MATRIX33_ROTATION_AXIS axis = (MATRIX33_ROTATION_AXIS)param[0]; param_id += (int)sizeof(uint8_t); - if (axis >= MATRIX33_ROTATION_MAX) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (axis >= MATRIX33_ROTATION_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float angle_deg = 0.0f; ENDIAN_memcpy(&angle_deg, param + param_id, sizeof(float)); param_id += (int)sizeof(float); - if ((angle_deg < -180.0f) || (180.0f < angle_deg)) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if ((angle_deg < -180.0f) || (180.0f < angle_deg)) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float angle_rad = PHYSICAL_CONST_degree_to_radian(angle_deg); Quaternion q_diff; - switch (axis) { - case MATRIX33_ROTATION_AXIS_X: - q_diff = QUATERNION_make_x_rot(angle_rad); - break; - case MATRIX33_ROTATION_AXIS_Y: - q_diff = QUATERNION_make_y_rot(angle_rad); - break; - case MATRIX33_ROTATION_AXIS_Z: - q_diff = QUATERNION_make_z_rot(angle_rad); - break; - default: - break; + switch (axis) + { + case MATRIX33_ROTATION_AXIS_X: + q_diff = QUATERNION_make_x_rot(angle_rad); + break; + case MATRIX33_ROTATION_AXIS_Y: + q_diff = QUATERNION_make_y_rot(angle_rad); + break; + case MATRIX33_ROTATION_AXIS_Z: + q_diff = QUATERNION_make_z_rot(angle_rad); + break; + default: + break; } Quaternion q_current = aocs_manager_.quaternion_est_i2b; Quaternion q_target = QUATERNION_product(q_current, q_diff); AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_quaternion_target_i2t(q_target); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_MANEUVER_ANGLE( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_MANEUVER_ANGLE(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); float angle_deg; ENDIAN_memcpy(&angle_deg, param, sizeof(float)); - if ((angle_deg < 0.0f) || (180.0f < angle_deg)) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if ((angle_deg < 0.0f) || (180.0f < angle_deg)) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float angle_rad = PHYSICAL_CONST_degree_to_radian(angle_deg); AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_limit_maneuver_angle_rad(angle_rad); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_ANGULAR_VELOCITY( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_LIMIT_ANGULAR_VELOCITY(const CommonCmdPacket* packet) +{ float ang_vel_deg_s = CCP_get_param_from_packet(packet, 0, float); - if (ang_vel_deg_s < 0.0f) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ang_vel_deg_s < 0.0f) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); float ang_vel_rad_s = PHYSICAL_CONST_degree_to_radian(ang_vel_deg_s); - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_limit_angular_velocity_rad_s(ang_vel_rad_s); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_limit_angular_velocity_rad_s(ang_vel_rad_s); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // Others -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_REFERENCE_TIME( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_REFERENCE_TIME(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); double reference_jday; ENDIAN_memcpy(&reference_jday, param, sizeof(double)); ObcTime obct_reference = TMGR_get_master_clock(); - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_reference_jday(reference_jday, obct_reference); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_reference_jday(reference_jday, obct_reference); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float constant_torque[PHYSICAL_CONST_THREE_DIM] = {0.0f, 0.0f, 0.0f}; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { ENDIAN_memcpy(&constant_torque[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_constant_torque_body_Nm(constant_torque); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_constant_torque_body_Nm(constant_torque); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE_PERMISSION( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_CONSTANT_TORQUE_PERMISSION(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION permission_flag; permission_flag = (AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION)param[0]; - if (permission_flag >= AOCS_MANAGER_CONSTANT_TORQUE_MAX) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (permission_flag >= AOCS_MANAGER_CONSTANT_TORQUE_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_constant_torque_permission(permission_flag); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_constant_torque_permission(permission_flag); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAG_EXCLUSIVE_STATE( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAG_EXCLUSIVE_STATE(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); AOCS_MANAGER_MAG_EXCLUSIVE_STATE mag_exclusive_state; mag_exclusive_state = (AOCS_MANAGER_MAG_EXCLUSIVE_STATE)param[0]; - if (mag_exclusive_state >= AOCS_MANAGER_MAG_EXCLUSIVE_STATE_MAX) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (mag_exclusive_state >= AOCS_MANAGER_MAG_EXCLUSIVE_STATE_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_mag_exclusive_state(mag_exclusive_state); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_mag_exclusive_state(mag_exclusive_state); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_IN_TORQUE( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_IN_TORQUE(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float max_torque[PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { ENDIAN_memcpy(&max_torque[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_internal_torque_max_body_Nm(max_torque); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_internal_torque_max_body_Nm(max_torque); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_EXT_TORQUE( - const CommonCmdPacket* packet) { +CCP_CmdRet Cmd_APP_AOCS_MANAGER_SET_MAX_EXT_TORQUE(const CommonCmdPacket* packet) +{ const uint8_t* param = CCP_get_param_head(packet); int param_id = 0; float max_torque[PHYSICAL_CONST_THREE_DIM]; - for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { + for (int i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) + { ENDIAN_memcpy(&max_torque[i], param + param_id, sizeof(float)); param_id += (int)sizeof(float); } - AOCS_MANAGER_ERROR ret = - AOCS_MANAGER_set_external_torque_max_body_Nm(max_torque); - if (ret != AOCS_MANAGER_ERROR_OK) - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + AOCS_MANAGER_ERROR ret = AOCS_MANAGER_set_external_torque_max_body_Nm(max_torque); + if (ret != AOCS_MANAGER_ERROR_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } From 2d89de40bdc03c3a44dc94870d13c0e732e21b98 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 3 Jun 2023 11:36:41 +0200 Subject: [PATCH 062/176] Add structure parameters --- .../Applications/UserDefined/AOCS/aocs_manager.c | 3 ++- .../Settings/SatelliteParameters/CMakeLists.txt | 1 + .../SatelliteParameters/Sample/structure_parameters.c | 8 ++++++++ .../SatelliteParameters/structure_parameters.h | 11 +++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/structure_parameters.h diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index 5c205218..0f91760b 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -18,6 +18,7 @@ // SatelliteParameters #include "../../../Settings/SatelliteParameters/orbit_parameters.h" +#include "../../../Settings/SatelliteParameters/structure_parameters.h" static AocsManager aocs_manager_; const AocsManager* const aocs_manager = &aocs_manager_; @@ -44,7 +45,7 @@ static void APP_AOCS_MANAGER_init_(void) // 下記初期化値は物理的あり得る範囲でテキトウな値であり、全てsetter関数で意味のある値に変更されることを想定している // 衛星特性 - aocs_manager_.mass_sc_kg = 10.0f; + aocs_manager_.mass_sc_kg = STRUCTURE_PARAMETERS_mass_sc_kg; VECTOR3_initialize(aocs_manager_.rmm_sc_body_Am2, 0.1f); aocs_manager_.inertia_tensor_sc_body_kgm2[0][0] = 0.1f; diff --git a/src/src_user/Settings/SatelliteParameters/CMakeLists.txt b/src/src_user/Settings/SatelliteParameters/CMakeLists.txt index d094089b..f34fecdb 100644 --- a/src/src_user/Settings/SatelliteParameters/CMakeLists.txt +++ b/src/src_user/Settings/SatelliteParameters/CMakeLists.txt @@ -4,6 +4,7 @@ project(C2A_USER_SETTINGS_SATELLITE_PARAMETERS) set(C2A_SRCS Sample/orbit_parameters.c + Sample/structure_parameters.c ) add_library(${PROJECT_NAME} OBJECT ${C2A_SRCS}) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c new file mode 100644 index 00000000..ede07bff --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c @@ -0,0 +1,8 @@ +/** + * @file structure_parameters.c + * @brief 衛星構造に関する衛星固有パラメータを管理する + */ + +#include + +const double STRUCTURE_PARAMETERS_mass_sc_kg = 10; diff --git a/src/src_user/Settings/SatelliteParameters/structure_parameters.h b/src/src_user/Settings/SatelliteParameters/structure_parameters.h new file mode 100644 index 00000000..e3d3df9e --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/structure_parameters.h @@ -0,0 +1,11 @@ +/** + * @file structure_parameters.h + * @brief 衛星構造に関する衛星固有パラメータを管理する + */ + +#ifndef STRUCTURE_PARAMETERS_H_ +#define STRUCTURE_PARAMETERS_H_ + +extern const double STRUCTURE_PARAMETERS_mass_sc_kg; //!< Spacecraft mass [kg] + +#endif // STRUCTURE_PARAMETERS_H_ From 3575184178be02ee58209e2534af5c2e1507f07a Mon Sep 17 00:00:00 2001 From: Hiro-0110 Date: Fri, 2 Jun 2023 18:43:22 +0900 Subject: [PATCH 063/176] *fix-sun-sensor-reset-bc* --- src/src_core | 2 +- .../TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_core b/src/src_core index 042cdfa1..041feb6d 160000 --- a/src/src_core +++ b/src/src_core @@ -1 +1 @@ -Subproject commit 042cdfa15b0056880398e857cdd5d5a430562fd1 +Subproject commit 041feb6d931ec46faa1dd622f9a0e5d08712dda0 diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c index 2b50f8aa..c0a30034 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c @@ -130,10 +130,10 @@ void BCL_load_reset_nanossoc_d60(void) { cycle_t bc_cycle = 1; - BCL_tool_register_combine(bc_cycle, BC_POWER_OFF_NANOSSOC_D60); // 4.5sec + BCL_tool_register_deploy(bc_cycle, BC_POWER_OFF_NANOSSOC_D60); // 4.5sec bc_cycle += OBCT_sec2cycle(5); - BCL_tool_register_combine(bc_cycle, BC_POWER_ON_NANOSSOC_D60); + BCL_tool_register_deploy(bc_cycle, BC_POWER_ON_NANOSSOC_D60); } void BCL_load_activate_nanossoc_d60_eh(void) From 52e594dc42c50b96f98f285c4fc8639597a10cdf Mon Sep 17 00:00:00 2001 From: Hiro-0110 Date: Mon, 5 Jun 2023 21:57:47 +0900 Subject: [PATCH 064/176] Revert c2a-core version --- src/src_core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_core b/src/src_core index 041feb6d..042cdfa1 160000 --- a/src/src_core +++ b/src/src_core @@ -1 +1 @@ -Subproject commit 041feb6d931ec46faa1dd622f9a0e5d08712dda0 +Subproject commit 042cdfa15b0056880398e857cdd5d5a430562fd1 From d1d24a98ba4fb49b7e9704c5902b35c24633fe40 Mon Sep 17 00:00:00 2001 From: Hiro-0110 Date: Tue, 6 Jun 2023 16:40:04 +0900 Subject: [PATCH 065/176] updated file --- .../TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c index c0a30034..5d0576eb 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c @@ -55,7 +55,7 @@ void BCL_load_power_on_nanossoc_d60(void) BCL_tool_prepare_param_uint8(1); // Add BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_RM3100_SET_MAG_BIAS_COMPO_NT); - bc_cycle++; + bc_cycle++; #endif // Enable EL @@ -130,10 +130,10 @@ void BCL_load_reset_nanossoc_d60(void) { cycle_t bc_cycle = 1; - BCL_tool_register_deploy(bc_cycle, BC_POWER_OFF_NANOSSOC_D60); // 4.5sec + BCL_tool_register_deploy(bc_cycle, BC_POWER_OFF_NANOSSOC_D60, TLCD_ID_DEPLOY_BC); // 4.5sec bc_cycle += OBCT_sec2cycle(5); - BCL_tool_register_deploy(bc_cycle, BC_POWER_ON_NANOSSOC_D60); + BCL_tool_register_deploy(bc_cycle, BC_POWER_ON_NANOSSOC_D60, TLCD_ID_DEPLOY_BC); } void BCL_load_activate_nanossoc_d60_eh(void) From a79998ca86d151b477be2457107cc17a643da8bb Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 6 Jun 2023 22:32:16 +0200 Subject: [PATCH 066/176] Change CMake construction --- CMakeLists.txt | 3 +-- src/src_user/Settings/CMakeLists.txt | 3 +++ .../Settings/SatelliteParameters/CMakeLists.txt | 12 ------------ 3 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 src/src_user/Settings/SatelliteParameters/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 498c1cff..e10e6ea2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_core) set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/src_user) +set(C2A_SATELLITE_PARAMETERS_DIR SatelliteParameters/Sample) # relative path from Settings set(USE_ALL_C2A_CORE_APPS OFF) set(USE_ALL_C2A_CORE_TEST_APPS OFF) @@ -50,7 +51,6 @@ add_subdirectory(${C2A_USER_DIR}/Drivers) add_subdirectory(${C2A_USER_DIR}/IfWrapper) add_subdirectory(${C2A_USER_DIR}/Library) add_subdirectory(${C2A_USER_DIR}/Settings) -add_subdirectory(${C2A_USER_DIR}/Settings/SatelliteParameters) add_subdirectory(${C2A_USER_DIR}/TlmCmd) add_library(${PROJECT_NAME} STATIC ${C2A_SRCS}) @@ -62,7 +62,6 @@ set(C2A_USER_MODULES C2A_USER_IF_WRAPPER C2A_USER_LIB C2A_USER_SETTINGS - C2A_USER_SETTINGS_SATELLITE_PARAMETERS ) if(MSVC) diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index b7cf8b7c..cea67b56 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -45,6 +45,9 @@ set(C2A_SRCS # TlmCmd TlmCmd/common_cmd_packet_define.c TlmCmd/Ccsds/apid_define.c + # Satellite Parameters + ${C2A_SATELLITE_PARAMETERS_DIR}/orbit_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/structure_parameters.c ) add_library(${PROJECT_NAME} OBJECT ${C2A_SRCS}) diff --git a/src/src_user/Settings/SatelliteParameters/CMakeLists.txt b/src/src_user/Settings/SatelliteParameters/CMakeLists.txt deleted file mode 100644 index f34fecdb..00000000 --- a/src/src_user/Settings/SatelliteParameters/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 3.13) - -project(C2A_USER_SETTINGS_SATELLITE_PARAMETERS) - -set(C2A_SRCS - Sample/orbit_parameters.c - Sample/structure_parameters.c -) - -add_library(${PROJECT_NAME} OBJECT ${C2A_SRCS}) - -include(${C2A_USER_DIR}/common.cmake) From 712671dc9eb4b637ec18e7b4b5cda8d9f8ac57fd Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 10:45:23 +0200 Subject: [PATCH 067/176] Add SatelliteParameters for Kepler orbit propagator --- .../OrbitEstimation/kepler_orbit_propagator.c | 15 +++++++++------ .../SatelliteParameters/Sample/orbit_parameters.c | 9 +++++++++ .../SatelliteParameters/orbit_parameters.h | 8 ++++++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c index cef4532f..06f9a242 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c @@ -13,6 +13,9 @@ #include "../../../../Library/time_space.h" #include +// SatelliteParameters +#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" + static KeplerOrbitPropagator kepler_orbit_propagator_; const KeplerOrbitPropagator* const kepler_orbit_propagator = &kepler_orbit_propagator_; @@ -28,12 +31,12 @@ static void APP_KOP_init_(void) { memset(&kepler_orbit_propagator_, 0x00, sizeof(KeplerOrbitPropagator)); - kepler_orbit_propagator_.orbital_elements.semi_major_axis_km = 6899.3234f; - kepler_orbit_propagator_.orbital_elements.eccentricity = 4.86396e-4f; - kepler_orbit_propagator_.orbital_elements.inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); - kepler_orbit_propagator_.orbital_elements.raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); - kepler_orbit_propagator_.orbital_elements.arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); - kepler_orbit_propagator_.orbital_elements.epoch_jday = 2.459931936719433e6; + kepler_orbit_propagator_.orbital_elements.semi_major_axis_km = ORBIT_PARAMETERS_kepler_semi_major_axis_km; + kepler_orbit_propagator_.orbital_elements.eccentricity = ORBIT_PARAMETERS_kepler_eccentricity; + kepler_orbit_propagator_.orbital_elements.inclination_rad = ORBIT_PARAMETERS_kepler_inclination_rad; + kepler_orbit_propagator_.orbital_elements.raan_rad = ORBIT_PARAMETERS_kepler_raan_rad; + kepler_orbit_propagator_.orbital_elements.arg_perigee_rad = ORBIT_PARAMETERS_kepler_arg_perigee_rad; + kepler_orbit_propagator_.orbital_elements.epoch_jday = ORBIT_PARAMETERS_kepler_epoch_jday; KEPLER_ORBIT_init_constants(&kepler_orbit_propagator_.orbit_constants, kepler_orbit_propagator_.orbital_elements); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index a0145e06..043c19c6 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -4,9 +4,18 @@ */ #include +#include // Time const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 // Orbit +// Orbit Calculator const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method = APP_ORBIT_CALC_METHOD_KEPLER; +// Kepler Orbit +const double ORBIT_PARAMETERS_kepler_semi_major_axis_km = 6899.3234f; +const double ORBIT_PARAMETERS_kepler_eccentricity = 4.86396e-4f; +const double ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); +const double ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); +const double ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); +const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h index e39b8f6f..99519fef 100644 --- a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -12,6 +12,14 @@ extern const double ORBIT_PARAMETERS_reference_jday; //!< Reference time for orbit calculation [Julian day] // Orbit +// Orbit Calculator extern const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method; //!< Orbit calculation method +// Kepler Orbit +extern const double ORBIT_PARAMETERS_kepler_semi_major_axis_km; //!< Semi-major axis for Kepler Propagator [km] +extern const double ORBIT_PARAMETERS_kepler_eccentricity; //!< Eccentricity for Kepler Propagator +extern const double ORBIT_PARAMETERS_kepler_inclination_rad; //!< Inclination for Kepler Propagator [rad] +extern const double ORBIT_PARAMETERS_kepler_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for Kepler Propagator [rad] +extern const double ORBIT_PARAMETERS_kepler_arg_perigee_rad; //!< Argment of perigee for Kepler Propagator [rad] +extern const double ORBIT_PARAMETERS_kepler_epoch_jday; //!< Epoch for Kepler Propagator [Julian day] #endif // ORBIT_PARAMETERS_H_ From d74be1875c4d9eeb18443a741743ccb42a95e94e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 10:58:16 +0200 Subject: [PATCH 068/176] Add SatelliteParameters for SGP4 propagator --- .../OrbitEstimation/sgp4_orbit_propagator.c | 21 +++++++++++-------- .../Sample/orbit_parameters.c | 10 +++++++++ .../SatelliteParameters/orbit_parameters.h | 11 ++++++++++ 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c index 379e7c2f..0efe4489 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c @@ -15,6 +15,9 @@ #include "../../../../Library/time_space.h" #include +// SatelliteParameters +#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" + // #define APP_SGP4_DEBUG_OUTPUT //!< デバッグ出力を表示させたいときに定義する static Sgp4OrbitPropagator sgp4_orbit_propagator_; @@ -33,16 +36,16 @@ static void APP_SGP4_init_(void) memset(&sgp4_orbit_propagator_, 0x00, sizeof(Sgp4OrbitPropagator)); // 1行目 - sgp4_orbit_propagator_.tle_input.epoch_year = 22; - sgp4_orbit_propagator_.tle_input.epoch_day = 352.00000000; - sgp4_orbit_propagator_.tle_input.b_star = 0.0f; + sgp4_orbit_propagator_.tle_input.epoch_year = ORBIT_PARAMETERS_tle_epoch_year; + sgp4_orbit_propagator_.tle_input.epoch_day = ORBIT_PARAMETERS_tle_epoch_day; + sgp4_orbit_propagator_.tle_input.b_star = ORBIT_PARAMETERS_tle_b_star; // 2行目 - sgp4_orbit_propagator_.tle_input.inclination_deg = 97.5068f; - sgp4_orbit_propagator_.tle_input.raan_deg = 339.7118f; - sgp4_orbit_propagator_.tle_input.eccentricity = 0.0011775f; - sgp4_orbit_propagator_.tle_input.arg_perigee_deg = 245.9837f; - sgp4_orbit_propagator_.tle_input.mean_anomaly_deg = 114.0163f; - sgp4_orbit_propagator_.tle_input.mean_motion_rpd = 15.15782335f; + sgp4_orbit_propagator_.tle_input.inclination_deg = ORBIT_PARAMETERS_tle_inclination_deg; + sgp4_orbit_propagator_.tle_input.raan_deg = ORBIT_PARAMETERS_tle_raan_deg; + sgp4_orbit_propagator_.tle_input.eccentricity = ORBIT_PARAMETERS_tle_eccentricity; + sgp4_orbit_propagator_.tle_input.arg_perigee_deg = ORBIT_PARAMETERS_tle_arg_perigee_deg; + sgp4_orbit_propagator_.tle_input.mean_anomaly_deg = ORBIT_PARAMETERS_tle_mean_anomaly_deg; + sgp4_orbit_propagator_.tle_input.mean_motion_rpd = ORBIT_PARAMETERS_tle_mean_motion_rpd; #ifdef APP_SGP4_DEBUG_OUTPUT uint32_t start_time_ms = (uint32_t)TMGR_get_master_total_cycle_in_msec(); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index 043c19c6..e9c50a9c 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -19,3 +19,13 @@ const double ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_ const double ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); const double ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; +// TLE for SGP4 +const double ORBIT_PARAMETERS_tle_epoch_year = 22; +const double ORBIT_PARAMETERS_tle_epoch_day = 352.00000000; +const double ORBIT_PARAMETERS_tle_b_star = 0.0; +const double ORBIT_PARAMETERS_tle_inclination_deg = 97.5068f; +const double ORBIT_PARAMETERS_tle_raan_deg = 339.7118f; +const double ORBIT_PARAMETERS_tle_eccentricity = 0.0011775f; +const double ORBIT_PARAMETERS_tle_arg_perigee_deg = 245.9837f; +const double ORBIT_PARAMETERS_tle_mean_anomaly_deg = 114.0163f; +const double ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h index 99519fef..54e0feed 100644 --- a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -21,5 +21,16 @@ extern const double ORBIT_PARAMETERS_kepler_inclination_rad; //!< Inclination extern const double ORBIT_PARAMETERS_kepler_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for Kepler Propagator [rad] extern const double ORBIT_PARAMETERS_kepler_arg_perigee_rad; //!< Argment of perigee for Kepler Propagator [rad] extern const double ORBIT_PARAMETERS_kepler_epoch_jday; //!< Epoch for Kepler Propagator [Julian day] +// TLE for SGP4 +extern const double ORBIT_PARAMETERS_tle_epoch_year; //!< Epoch year in TLE 1st line for SGP4 Propagator +extern const double ORBIT_PARAMETERS_tle_epoch_day; //!< Epoch day in TLE 1st line for SGP4 Propagator +extern const double ORBIT_PARAMETERS_tle_b_star; //!< B-star in TLE 1st line for SGP4 Propagator +extern const double ORBIT_PARAMETERS_tle_inclination_deg; //!< Inclination in TLE 2nd line for SGP4 Propagator [deg] +extern const double ORBIT_PARAMETERS_tle_raan_deg; //!< RAAN (Right Ascension of Ascending Node) in TLE 2nd line for SGP4 Propagator [deg] +extern const double ORBIT_PARAMETERS_tle_eccentricity; //!< Eccentricity in TLE 2nd line for SGP4 Propagator [-] +extern const double ORBIT_PARAMETERS_tle_arg_perigee_deg; //!< Argment of perigee in TLE 2nd line for SGP4 Propagator [deg] +extern const double ORBIT_PARAMETERS_tle_mean_anomaly_deg; //!< Mean anomaly in TLE 2nd line for SGP4 Propagator [deg] +extern const double ORBIT_PARAMETERS_tle_mean_motion_rpd; //!< Mean motion in TLE 2nd line for SGP4 Propagator [RPD] + #endif // ORBIT_PARAMETERS_H_ From 1d5d04bedcf764885c7533ba43dc25b73bdb02f7 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 11:47:01 +0200 Subject: [PATCH 069/176] Add SatelliteParameters for GPS-R propagator --- .../OrbitEstimation/gpsr_orbit_propagator.c | 29 ++++++++++--------- .../Sample/orbit_parameters.c | 17 +++++++++++ .../SatelliteParameters/orbit_parameters.h | 17 +++++++++++ 3 files changed, 50 insertions(+), 13 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c index 078ca703..729e01f9 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c @@ -15,6 +15,9 @@ #include "../../../../Library/time_space.h" #include +// SatelliteParameters +#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" + static GpsrOrbitPropagator gpsr_orbit_propagator_; const GpsrOrbitPropagator* const gpsr_orbit_propagator = &gpsr_orbit_propagator_; @@ -39,19 +42,19 @@ static void APP_GPSROP_init_(void) memset(&gpsr_orbit_propagator_, 0x00, sizeof(GpsrOrbitPropagator)); // ひとまず初期値はS2E_ISSL6U_AOCSの軌道設定に合わせる - gpsr_orbit_propagator_.orbital_elements.semi_major_axis_km = 6794.5f; - gpsr_orbit_propagator_.orbital_elements.eccentricity = 0.0015f; - gpsr_orbit_propagator_.orbital_elements.inclination_rad = 0.9012f; - gpsr_orbit_propagator_.orbital_elements.raan_rad = 0.1411f; - gpsr_orbit_propagator_.orbital_elements.arg_perigee_rad = 0.0f; // 最終書き込み確認用に1.7952fから変更 - gpsr_orbit_propagator_.orbital_elements.epoch_jday = 2.458940966402607e6; - - gpsr_orbit_propagator_.orbital_elements_threshold.semi_major_axis_km = 50.0f; - gpsr_orbit_propagator_.orbital_elements_threshold.eccentricity = 0.1f; - gpsr_orbit_propagator_.orbital_elements_threshold.inclination_rad = PHYSICAL_CONST_degree_to_radian(20.0f); - gpsr_orbit_propagator_.orbital_elements_threshold.raan_rad = PHYSICAL_CONST_degree_to_radian(20.0f); - gpsr_orbit_propagator_.orbital_elements_threshold.arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(50.0f); - gpsr_orbit_propagator_.orbital_elements_threshold.epoch_jday = 0.1; + gpsr_orbit_propagator_.orbital_elements.semi_major_axis_km = ORBIT_PARAMETERS_gpsr_semi_major_axis_km; + gpsr_orbit_propagator_.orbital_elements.eccentricity = ORBIT_PARAMETERS_gpsr_eccentricity; + gpsr_orbit_propagator_.orbital_elements.inclination_rad = ORBIT_PARAMETERS_gpsr_inclination_rad; + gpsr_orbit_propagator_.orbital_elements.raan_rad = ORBIT_PARAMETERS_gpsr_raan_rad; + gpsr_orbit_propagator_.orbital_elements.arg_perigee_rad = ORBIT_PARAMETERS_gpsr_arg_perigee_rad; + gpsr_orbit_propagator_.orbital_elements.epoch_jday = ORBIT_PARAMETERS_gpsr_epoch_jday; + + gpsr_orbit_propagator_.orbital_elements_threshold.semi_major_axis_km = ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km; + gpsr_orbit_propagator_.orbital_elements_threshold.eccentricity = ORBIT_PARAMETERS_gpsr_threshold_eccentricity; + gpsr_orbit_propagator_.orbital_elements_threshold.inclination_rad = ORBIT_PARAMETERS_gpsr_threshold_inclination_rad; + gpsr_orbit_propagator_.orbital_elements_threshold.raan_rad = ORBIT_PARAMETERS_gpsr_threshold_raan_rad; + gpsr_orbit_propagator_.orbital_elements_threshold.arg_perigee_rad =ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad; + gpsr_orbit_propagator_.orbital_elements_threshold.epoch_jday = ORBIT_PARAMETERS_gpsr_threshold_epoch_jday; KEPLER_ORBIT_init_constants(&gpsr_orbit_propagator_.orbit_constants, gpsr_orbit_propagator_.orbital_elements); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index e9c50a9c..a703e324 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -20,12 +20,29 @@ const double ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian( const double ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; // TLE for SGP4 +// 1st line const double ORBIT_PARAMETERS_tle_epoch_year = 22; const double ORBIT_PARAMETERS_tle_epoch_day = 352.00000000; const double ORBIT_PARAMETERS_tle_b_star = 0.0; +// 2nd line const double ORBIT_PARAMETERS_tle_inclination_deg = 97.5068f; const double ORBIT_PARAMETERS_tle_raan_deg = 339.7118f; const double ORBIT_PARAMETERS_tle_eccentricity = 0.0011775f; const double ORBIT_PARAMETERS_tle_arg_perigee_deg = 245.9837f; const double ORBIT_PARAMETERS_tle_mean_anomaly_deg = 114.0163f; const double ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; +// GPS-R Orbit Propagator +// Initial orbital elements +const double ORBIT_PARAMETERS_gpsr_semi_major_axis_km = 6899.3234f; +const double ORBIT_PARAMETERS_gpsr_eccentricity = 4.86396e-4f; +const double ORBIT_PARAMETERS_gpsr_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); +const double ORBIT_PARAMETERS_gpsr_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); +const double ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(0.0f); +const double ORBIT_PARAMETERS_gpsr_epoch_jday = 2.459931936719433e6; +// Threshold +const double ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km = 50.0f; +const double ORBIT_PARAMETERS_gpsr_threshold_eccentricity = 0.1f; +const double ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const double ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const double ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(50.0f); +const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday = 0.1; diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h index 54e0feed..57f59c48 100644 --- a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -22,15 +22,32 @@ extern const double ORBIT_PARAMETERS_kepler_raan_rad; //!< RAAN (Right extern const double ORBIT_PARAMETERS_kepler_arg_perigee_rad; //!< Argment of perigee for Kepler Propagator [rad] extern const double ORBIT_PARAMETERS_kepler_epoch_jday; //!< Epoch for Kepler Propagator [Julian day] // TLE for SGP4 +// 1st line extern const double ORBIT_PARAMETERS_tle_epoch_year; //!< Epoch year in TLE 1st line for SGP4 Propagator extern const double ORBIT_PARAMETERS_tle_epoch_day; //!< Epoch day in TLE 1st line for SGP4 Propagator extern const double ORBIT_PARAMETERS_tle_b_star; //!< B-star in TLE 1st line for SGP4 Propagator +// 2nd line extern const double ORBIT_PARAMETERS_tle_inclination_deg; //!< Inclination in TLE 2nd line for SGP4 Propagator [deg] extern const double ORBIT_PARAMETERS_tle_raan_deg; //!< RAAN (Right Ascension of Ascending Node) in TLE 2nd line for SGP4 Propagator [deg] extern const double ORBIT_PARAMETERS_tle_eccentricity; //!< Eccentricity in TLE 2nd line for SGP4 Propagator [-] extern const double ORBIT_PARAMETERS_tle_arg_perigee_deg; //!< Argment of perigee in TLE 2nd line for SGP4 Propagator [deg] extern const double ORBIT_PARAMETERS_tle_mean_anomaly_deg; //!< Mean anomaly in TLE 2nd line for SGP4 Propagator [deg] extern const double ORBIT_PARAMETERS_tle_mean_motion_rpd; //!< Mean motion in TLE 2nd line for SGP4 Propagator [RPD] +// GPS-R Orbit Propagator +// Initial orbital elements +extern const double ORBIT_PARAMETERS_gpsr_semi_major_axis_km; //!< Semi-major axis for GPS-R Orbit Propagator [km] +extern const double ORBIT_PARAMETERS_gpsr_eccentricity; //!< Eccentricity for GPS-R Orbit Propagator +extern const double ORBIT_PARAMETERS_gpsr_inclination_rad; //!< Inclination for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_arg_perigee_rad; //!< Argment of perigee for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_epoch_jday; //!< Epoch for GPS-R Orbit Propagator [Julian day] +// Threshold +extern const double ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km; //!< Semi-major axis threshold for GPS-R Orbit Propagator [km] +extern const double ORBIT_PARAMETERS_gpsr_threshold_eccentricity; //!< Eccentricity threshold for GPS-R Orbit Propagator +extern const double ORBIT_PARAMETERS_gpsr_threshold_inclination_rad; //!< Inclination threshold for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_threshold_raan_rad; //!< RAAN (Right Ascension of Ascending Node) threshold for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad; //!< Argment of perigee threshold for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday; //!< Epoch threshold for GPS-R Orbit Propagator [Julian day] #endif // ORBIT_PARAMETERS_H_ From 0192dd2a40511926a602025e090de99408a20db4 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 11:48:34 +0200 Subject: [PATCH 070/176] fix newline --- .../Settings/SatelliteParameters/Sample/orbit_parameters.c | 4 +++- src/src_user/Settings/SatelliteParameters/orbit_parameters.h | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index a703e324..e8a4ae2a 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -9,9 +9,9 @@ // Time const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 -// Orbit // Orbit Calculator const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method = APP_ORBIT_CALC_METHOD_KEPLER; + // Kepler Orbit const double ORBIT_PARAMETERS_kepler_semi_major_axis_km = 6899.3234f; const double ORBIT_PARAMETERS_kepler_eccentricity = 4.86396e-4f; @@ -19,6 +19,7 @@ const double ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_ const double ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); const double ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; + // TLE for SGP4 // 1st line const double ORBIT_PARAMETERS_tle_epoch_year = 22; @@ -31,6 +32,7 @@ const double ORBIT_PARAMETERS_tle_eccentricity = 0.0011775f; const double ORBIT_PARAMETERS_tle_arg_perigee_deg = 245.9837f; const double ORBIT_PARAMETERS_tle_mean_anomaly_deg = 114.0163f; const double ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; + // GPS-R Orbit Propagator // Initial orbital elements const double ORBIT_PARAMETERS_gpsr_semi_major_axis_km = 6899.3234f; diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h index 57f59c48..02c77be2 100644 --- a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -11,9 +11,9 @@ // Time extern const double ORBIT_PARAMETERS_reference_jday; //!< Reference time for orbit calculation [Julian day] -// Orbit // Orbit Calculator extern const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method; //!< Orbit calculation method + // Kepler Orbit extern const double ORBIT_PARAMETERS_kepler_semi_major_axis_km; //!< Semi-major axis for Kepler Propagator [km] extern const double ORBIT_PARAMETERS_kepler_eccentricity; //!< Eccentricity for Kepler Propagator @@ -21,6 +21,7 @@ extern const double ORBIT_PARAMETERS_kepler_inclination_rad; //!< Inclination extern const double ORBIT_PARAMETERS_kepler_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for Kepler Propagator [rad] extern const double ORBIT_PARAMETERS_kepler_arg_perigee_rad; //!< Argment of perigee for Kepler Propagator [rad] extern const double ORBIT_PARAMETERS_kepler_epoch_jday; //!< Epoch for Kepler Propagator [Julian day] + // TLE for SGP4 // 1st line extern const double ORBIT_PARAMETERS_tle_epoch_year; //!< Epoch year in TLE 1st line for SGP4 Propagator @@ -33,6 +34,7 @@ extern const double ORBIT_PARAMETERS_tle_eccentricity; //!< Eccentricity in extern const double ORBIT_PARAMETERS_tle_arg_perigee_deg; //!< Argment of perigee in TLE 2nd line for SGP4 Propagator [deg] extern const double ORBIT_PARAMETERS_tle_mean_anomaly_deg; //!< Mean anomaly in TLE 2nd line for SGP4 Propagator [deg] extern const double ORBIT_PARAMETERS_tle_mean_motion_rpd; //!< Mean motion in TLE 2nd line for SGP4 Propagator [RPD] + // GPS-R Orbit Propagator // Initial orbital elements extern const double ORBIT_PARAMETERS_gpsr_semi_major_axis_km; //!< Semi-major axis for GPS-R Orbit Propagator [km] @@ -49,5 +51,4 @@ extern const double ORBIT_PARAMETERS_gpsr_threshold_raan_rad; //!< RAA extern const double ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad; //!< Argment of perigee threshold for GPS-R Orbit Propagator [rad] extern const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday; //!< Epoch threshold for GPS-R Orbit Propagator [Julian day] - #endif // ORBIT_PARAMETERS_H_ From 41518a0480c7d555df802d31e10bef9b65502de4 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 15:23:42 +0200 Subject: [PATCH 071/176] Add description of SatelliteParameters in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6f6cb3f0..219c62f5 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ $ git submodule update - S2Eのcmakeキャッシュを削除する # 本リポジトリに対するユーザーサイドリポジトリの設定について +- 同じAOCSユニットを使う場合でも、衛星固有でパラメータを調整する必要がある。これらのパラメータは`src/Settings/SatelliteParameters`に整理されており、衛星毎に別途値を定める必要がある。 - 衛星固有の設定ファイルなどを含んだユーザーリポジトリを作成する際は、`Examples` のフォルダ構成を参考にすること。 ## Brief history of development From 2a6f7df6b5fe8947ae795e0c3f9716b7ec721a64 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 15:52:45 +0200 Subject: [PATCH 072/176] Add inertia tensor and RMM --- .../Applications/UserDefined/AOCS/aocs_manager.c | 16 +++++----------- .../Sample/structure_parameters.c | 8 +++++++- .../SatelliteParameters/structure_parameters.h | 8 +++++++- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index 0f91760b..e45bc736 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -46,17 +46,11 @@ static void APP_AOCS_MANAGER_init_(void) // 衛星特性 aocs_manager_.mass_sc_kg = STRUCTURE_PARAMETERS_mass_sc_kg; - VECTOR3_initialize(aocs_manager_.rmm_sc_body_Am2, 0.1f); - - aocs_manager_.inertia_tensor_sc_body_kgm2[0][0] = 0.1f; - aocs_manager_.inertia_tensor_sc_body_kgm2[0][1] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[0][2] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][0] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][1] = 0.2f; - aocs_manager_.inertia_tensor_sc_body_kgm2[1][2] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][0] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][1] = 0.0e-4f; - aocs_manager_.inertia_tensor_sc_body_kgm2[2][2] = 0.2f; + VECTOR3_copy(aocs_manager_.rmm_sc_body_Am2, + STRUCTURE_PARAMETERS_rmm_sc_body_Am2); + MATRIX33_copy(aocs_manager_.inertia_tensor_sc_body_kgm2, + STRUCTURE_PARAMETERS_inertia_tensor_sc_body_kgm2); + // 角速度 VECTOR3_initialize(aocs_manager_.ang_vel_obs_body_rad_s, 0.0f); VECTOR3_initialize(aocs_manager_.ang_vel_est_body_rad_s, 0.0f); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c index ede07bff..3f6d3896 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/structure_parameters.c @@ -5,4 +5,10 @@ #include -const double STRUCTURE_PARAMETERS_mass_sc_kg = 10; +const float STRUCTURE_PARAMETERS_mass_sc_kg = 10.0; + +const float STRUCTURE_PARAMETERS_rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM] = {0.3f, 0.2f, 0.1f}; + +const float STRUCTURE_PARAMETERS_inertia_tensor_sc_body_kgm2[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM] = {{0.1f, 0.0f, 0.0f}, + {0.0f, 0.2f, 0.0f}, + {0.0f, 0.0f, 0.3f}}; diff --git a/src/src_user/Settings/SatelliteParameters/structure_parameters.h b/src/src_user/Settings/SatelliteParameters/structure_parameters.h index e3d3df9e..d42500b2 100644 --- a/src/src_user/Settings/SatelliteParameters/structure_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/structure_parameters.h @@ -6,6 +6,12 @@ #ifndef STRUCTURE_PARAMETERS_H_ #define STRUCTURE_PARAMETERS_H_ -extern const double STRUCTURE_PARAMETERS_mass_sc_kg; //!< Spacecraft mass [kg] +#include + +extern const float STRUCTURE_PARAMETERS_mass_sc_kg; //!< Spacecraft mass [kg] + +extern const float STRUCTURE_PARAMETERS_rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM]; //!< Spacecraft Residual Magnetic Moment at body-fixed frame [Am2] + +extern const float STRUCTURE_PARAMETERS_inertia_tensor_sc_body_kgm2[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM]; //!< Spacecraft inertia tensor @ body-fixed frame [kg m2] #endif // STRUCTURE_PARAMETERS_H_ From db8f9e5ad7de733709380fc1a0c708bf3af9a226 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 16:06:26 +0200 Subject: [PATCH 073/176] Fix type --- .../Sample/orbit_parameters.c | 46 ++++++++-------- .../SatelliteParameters/orbit_parameters.h | 54 +++++++++---------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index e8a4ae2a..d9c07057 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -13,38 +13,38 @@ const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00 const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method = APP_ORBIT_CALC_METHOD_KEPLER; // Kepler Orbit -const double ORBIT_PARAMETERS_kepler_semi_major_axis_km = 6899.3234f; -const double ORBIT_PARAMETERS_kepler_eccentricity = 4.86396e-4f; -const double ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); -const double ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); -const double ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); +const float ORBIT_PARAMETERS_kepler_semi_major_axis_km = 6899.3234f; +const float ORBIT_PARAMETERS_kepler_eccentricity = 4.86396e-4f; +const float ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); +const float ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); +const float ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; // TLE for SGP4 // 1st line -const double ORBIT_PARAMETERS_tle_epoch_year = 22; +const uint8_t ORBIT_PARAMETERS_tle_epoch_year = 22; const double ORBIT_PARAMETERS_tle_epoch_day = 352.00000000; -const double ORBIT_PARAMETERS_tle_b_star = 0.0; +const float ORBIT_PARAMETERS_tle_b_star = 0.0; // 2nd line -const double ORBIT_PARAMETERS_tle_inclination_deg = 97.5068f; -const double ORBIT_PARAMETERS_tle_raan_deg = 339.7118f; -const double ORBIT_PARAMETERS_tle_eccentricity = 0.0011775f; -const double ORBIT_PARAMETERS_tle_arg_perigee_deg = 245.9837f; -const double ORBIT_PARAMETERS_tle_mean_anomaly_deg = 114.0163f; -const double ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; +const float ORBIT_PARAMETERS_tle_inclination_deg = 97.5068f; +const float ORBIT_PARAMETERS_tle_raan_deg = 339.7118f; +const float ORBIT_PARAMETERS_tle_eccentricity = 0.0011775f; +const float ORBIT_PARAMETERS_tle_arg_perigee_deg = 245.9837f; +const float ORBIT_PARAMETERS_tle_mean_anomaly_deg = 114.0163f; +const float ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; // GPS-R Orbit Propagator // Initial orbital elements -const double ORBIT_PARAMETERS_gpsr_semi_major_axis_km = 6899.3234f; -const double ORBIT_PARAMETERS_gpsr_eccentricity = 4.86396e-4f; -const double ORBIT_PARAMETERS_gpsr_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); -const double ORBIT_PARAMETERS_gpsr_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); -const double ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(0.0f); +const float ORBIT_PARAMETERS_gpsr_semi_major_axis_km = 6899.3234f; +const float ORBIT_PARAMETERS_gpsr_eccentricity = 4.86396e-4f; +const float ORBIT_PARAMETERS_gpsr_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); +const float ORBIT_PARAMETERS_gpsr_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); +const float ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(0.0f); const double ORBIT_PARAMETERS_gpsr_epoch_jday = 2.459931936719433e6; // Threshold -const double ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km = 50.0f; -const double ORBIT_PARAMETERS_gpsr_threshold_eccentricity = 0.1f; -const double ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const double ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const double ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(50.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km = 50.0f; +const float ORBIT_PARAMETERS_gpsr_threshold_eccentricity = 0.1f; +const float ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(50.0f); const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday = 0.1; diff --git a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h index 02c77be2..afe7c513 100644 --- a/src/src_user/Settings/SatelliteParameters/orbit_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/orbit_parameters.h @@ -15,40 +15,40 @@ extern const double ORBIT_PARAMETERS_reference_jday; //!< Reference time for orb extern const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method; //!< Orbit calculation method // Kepler Orbit -extern const double ORBIT_PARAMETERS_kepler_semi_major_axis_km; //!< Semi-major axis for Kepler Propagator [km] -extern const double ORBIT_PARAMETERS_kepler_eccentricity; //!< Eccentricity for Kepler Propagator -extern const double ORBIT_PARAMETERS_kepler_inclination_rad; //!< Inclination for Kepler Propagator [rad] -extern const double ORBIT_PARAMETERS_kepler_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for Kepler Propagator [rad] -extern const double ORBIT_PARAMETERS_kepler_arg_perigee_rad; //!< Argment of perigee for Kepler Propagator [rad] -extern const double ORBIT_PARAMETERS_kepler_epoch_jday; //!< Epoch for Kepler Propagator [Julian day] +extern const float ORBIT_PARAMETERS_kepler_semi_major_axis_km; //!< Semi-major axis for Kepler Propagator [km] +extern const float ORBIT_PARAMETERS_kepler_eccentricity; //!< Eccentricity for Kepler Propagator +extern const float ORBIT_PARAMETERS_kepler_inclination_rad; //!< Inclination for Kepler Propagator [rad] +extern const float ORBIT_PARAMETERS_kepler_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for Kepler Propagator [rad] +extern const float ORBIT_PARAMETERS_kepler_arg_perigee_rad; //!< Argment of perigee for Kepler Propagator [rad] +extern const double ORBIT_PARAMETERS_kepler_epoch_jday; //!< Epoch for Kepler Propagator [Julian day] // TLE for SGP4 // 1st line -extern const double ORBIT_PARAMETERS_tle_epoch_year; //!< Epoch year in TLE 1st line for SGP4 Propagator -extern const double ORBIT_PARAMETERS_tle_epoch_day; //!< Epoch day in TLE 1st line for SGP4 Propagator -extern const double ORBIT_PARAMETERS_tle_b_star; //!< B-star in TLE 1st line for SGP4 Propagator +extern const uint8_t ORBIT_PARAMETERS_tle_epoch_year; //!< Epoch year in TLE 1st line for SGP4 Propagator +extern const double ORBIT_PARAMETERS_tle_epoch_day; //!< Epoch day in TLE 1st line for SGP4 Propagator +extern const float ORBIT_PARAMETERS_tle_b_star; //!< B-star in TLE 1st line for SGP4 Propagator // 2nd line -extern const double ORBIT_PARAMETERS_tle_inclination_deg; //!< Inclination in TLE 2nd line for SGP4 Propagator [deg] -extern const double ORBIT_PARAMETERS_tle_raan_deg; //!< RAAN (Right Ascension of Ascending Node) in TLE 2nd line for SGP4 Propagator [deg] -extern const double ORBIT_PARAMETERS_tle_eccentricity; //!< Eccentricity in TLE 2nd line for SGP4 Propagator [-] -extern const double ORBIT_PARAMETERS_tle_arg_perigee_deg; //!< Argment of perigee in TLE 2nd line for SGP4 Propagator [deg] -extern const double ORBIT_PARAMETERS_tle_mean_anomaly_deg; //!< Mean anomaly in TLE 2nd line for SGP4 Propagator [deg] -extern const double ORBIT_PARAMETERS_tle_mean_motion_rpd; //!< Mean motion in TLE 2nd line for SGP4 Propagator [RPD] +extern const float ORBIT_PARAMETERS_tle_inclination_deg; //!< Inclination in TLE 2nd line for SGP4 Propagator [deg] +extern const float ORBIT_PARAMETERS_tle_raan_deg; //!< RAAN (Right Ascension of Ascending Node) in TLE 2nd line for SGP4 Propagator [deg] +extern const float ORBIT_PARAMETERS_tle_eccentricity; //!< Eccentricity in TLE 2nd line for SGP4 Propagator [-] +extern const float ORBIT_PARAMETERS_tle_arg_perigee_deg; //!< Argment of perigee in TLE 2nd line for SGP4 Propagator [deg] +extern const float ORBIT_PARAMETERS_tle_mean_anomaly_deg; //!< Mean anomaly in TLE 2nd line for SGP4 Propagator [deg] +extern const float ORBIT_PARAMETERS_tle_mean_motion_rpd; //!< Mean motion in TLE 2nd line for SGP4 Propagator [RPD] // GPS-R Orbit Propagator // Initial orbital elements -extern const double ORBIT_PARAMETERS_gpsr_semi_major_axis_km; //!< Semi-major axis for GPS-R Orbit Propagator [km] -extern const double ORBIT_PARAMETERS_gpsr_eccentricity; //!< Eccentricity for GPS-R Orbit Propagator -extern const double ORBIT_PARAMETERS_gpsr_inclination_rad; //!< Inclination for GPS-R Orbit Propagator [rad] -extern const double ORBIT_PARAMETERS_gpsr_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for GPS-R Orbit Propagator [rad] -extern const double ORBIT_PARAMETERS_gpsr_arg_perigee_rad; //!< Argment of perigee for GPS-R Orbit Propagator [rad] -extern const double ORBIT_PARAMETERS_gpsr_epoch_jday; //!< Epoch for GPS-R Orbit Propagator [Julian day] +extern const float ORBIT_PARAMETERS_gpsr_semi_major_axis_km; //!< Semi-major axis for GPS-R Orbit Propagator [km] +extern const float ORBIT_PARAMETERS_gpsr_eccentricity; //!< Eccentricity for GPS-R Orbit Propagator +extern const float ORBIT_PARAMETERS_gpsr_inclination_rad; //!< Inclination for GPS-R Orbit Propagator [rad] +extern const float ORBIT_PARAMETERS_gpsr_raan_rad; //!< RAAN (Right Ascension of Ascending Node) for GPS-R Orbit Propagator [rad] +extern const float ORBIT_PARAMETERS_gpsr_arg_perigee_rad; //!< Argment of perigee for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_epoch_jday; //!< Epoch for GPS-R Orbit Propagator [Julian day] // Threshold -extern const double ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km; //!< Semi-major axis threshold for GPS-R Orbit Propagator [km] -extern const double ORBIT_PARAMETERS_gpsr_threshold_eccentricity; //!< Eccentricity threshold for GPS-R Orbit Propagator -extern const double ORBIT_PARAMETERS_gpsr_threshold_inclination_rad; //!< Inclination threshold for GPS-R Orbit Propagator [rad] -extern const double ORBIT_PARAMETERS_gpsr_threshold_raan_rad; //!< RAAN (Right Ascension of Ascending Node) threshold for GPS-R Orbit Propagator [rad] -extern const double ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad; //!< Argment of perigee threshold for GPS-R Orbit Propagator [rad] -extern const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday; //!< Epoch threshold for GPS-R Orbit Propagator [Julian day] +extern const float ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km; //!< Semi-major axis threshold for GPS-R Orbit Propagator [km] +extern const float ORBIT_PARAMETERS_gpsr_threshold_eccentricity; //!< Eccentricity threshold for GPS-R Orbit Propagator +extern const float ORBIT_PARAMETERS_gpsr_threshold_inclination_rad; //!< Inclination threshold for GPS-R Orbit Propagator [rad] +extern const float ORBIT_PARAMETERS_gpsr_threshold_raan_rad; //!< RAAN (Right Ascension of Ascending Node) threshold for GPS-R Orbit Propagator [rad] +extern const float ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad; //!< Argment of perigee threshold for GPS-R Orbit Propagator [rad] +extern const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday; //!< Epoch threshold for GPS-R Orbit Propagator [Julian day] #endif // ORBIT_PARAMETERS_H_ From 47aba7a9c546bf3308207f71c66e7e5a0e5432a3 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 19:18:03 +0200 Subject: [PATCH 074/176] Add src as comment in CMake to avoid conflict --- src/src_user/Settings/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index cea67b56..81d4e530 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -48,6 +48,19 @@ set(C2A_SRCS # Satellite Parameters ${C2A_SATELLITE_PARAMETERS_DIR}/orbit_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/structure_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/seiren_mtq_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/rw0003_parameters.c + # ${C2A_SATELLITE_PARAMETERS_DIR}/component_selector_parameters.c ) add_library(${PROJECT_NAME} OBJECT ${C2A_SRCS}) From c8c3784b0e02c067c90a4060fb7502dca8f55d77 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 9 Jun 2023 21:20:28 +0200 Subject: [PATCH 075/176] Add attitude target parameters file --- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/attitude_target_parameters.c | 9 +++++++++ .../attitude_target_parameters.h | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 81d4e530..91f1d4a7 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -48,7 +48,7 @@ set(C2A_SRCS # Satellite Parameters ${C2A_SATELLITE_PARAMETERS_DIR}/orbit_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/structure_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c new file mode 100644 index 00000000..0ad81405 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c @@ -0,0 +1,9 @@ +/** + * @file attitude_target_parameters.c + * @brief 姿勢目標の衛星固有パラメータを管理する + */ + +#include + +// Target Calculation Mode +const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_CALC_MODE_MANUAL; diff --git a/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h new file mode 100644 index 00000000..c015198d --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h @@ -0,0 +1,14 @@ +/** + * @file attitude_target_parameters.h + * @brief 姿勢目標の衛星固有パラメータを管理する + */ + +#ifndef ATTITUDE_TARGET_PARAMETERS_H_ +#define ATTITUDE_TARGET_PARAMETERS_H_ + +#include + +// Target Calculation Mode +extern const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode; //!< Attitude target mode + +#endif // ATTITUDE_TARGET_PARAMETERS_H_ From 4af0af53ee5bc56cf4b3f0f870f9668d164333c4 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 10 Jun 2023 08:32:21 +0200 Subject: [PATCH 076/176] Add manual target quaternion --- src/src_user/Applications/UserDefined/AOCS/aocs_manager.c | 3 ++- .../SatelliteParameters/Sample/attitude_target_parameters.c | 4 ++++ .../Settings/SatelliteParameters/attitude_target_parameters.h | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index 0f91760b..7e90ff62 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -19,6 +19,7 @@ // SatelliteParameters #include "../../../Settings/SatelliteParameters/orbit_parameters.h" #include "../../../Settings/SatelliteParameters/structure_parameters.h" +#include "../../../Settings/SatelliteParameters/attitude_target_parameters.h" static AocsManager aocs_manager_; const AocsManager* const aocs_manager = &aocs_manager_; @@ -66,7 +67,7 @@ static void APP_AOCS_MANAGER_init_(void) // Quaternion aocs_manager_.quaternion_obs_i2b = QUATERNION_make_unit(); aocs_manager_.quaternion_est_i2b = QUATERNION_make_unit(); - aocs_manager_.quaternion_target_i2t = QUATERNION_make_unit(); + aocs_manager_.quaternion_target_i2t = ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t; aocs_manager_.quaternion_error_b2t = QUATERNION_make_unit(); aocs_manager_.limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); // 太陽方向 diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c index 0ad81405..83eaa731 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c @@ -7,3 +7,7 @@ // Target Calculation Mode const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_CALC_MODE_MANUAL; + +// Manual mode target +const Quaternion ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t = {0.5f, 0.5f, 0.5f, 0.5f}; + diff --git a/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h index c015198d..96599313 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h @@ -7,8 +7,12 @@ #define ATTITUDE_TARGET_PARAMETERS_H_ #include +#include // Target Calculation Mode extern const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode; //!< Attitude target mode +// Manual mode target +extern const Quaternion ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t; //!< Target Quaternion + #endif // ATTITUDE_TARGET_PARAMETERS_H_ From 699de0f0a64fa46dfdb6aea23a01e4181b9fffe6 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 10 Jun 2023 09:07:52 +0200 Subject: [PATCH 077/176] Add target from orbit --- .../target_attitude_from_orbit.c | 28 +++++++++---------- .../Sample/attitude_target_parameters.c | 14 ++++++++++ .../attitude_target_parameters.h | 14 ++++++++++ 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c index 558fc6d1..39c7203c 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c @@ -15,6 +15,10 @@ #include "../../../../Library/vector3.h" #include "../../../../Library/time_space.h" +// SatelliteParameters +#include "../../../../Settings/SatelliteParameters/attitude_target_parameters.h" + + static TargetAttitudeFromOrbit target_attitude_from_orbit_; const TargetAttitudeFromOrbit* const target_attitude_from_orbit = &target_attitude_from_orbit_; @@ -60,21 +64,15 @@ AppInfo APP_TAFO_create_app(void) static void APP_TAFO_init_(void) { - target_attitude_from_orbit_.main_target_direction = APP_TAFO_TARGET_DIRECITON_SUN; - target_attitude_from_orbit_.sub_target_direction = APP_TAFO_TARGET_DIRECITON_EARTH_CENTER; - target_attitude_from_orbit_.vec_to_main_target_body[0] = 1.0f; - target_attitude_from_orbit_.vec_to_main_target_body[1] = 0.0f; - target_attitude_from_orbit_.vec_to_main_target_body[2] = 0.0f; - target_attitude_from_orbit_.vec_to_sub_target_body[0] = 0.0f; - target_attitude_from_orbit_.vec_to_sub_target_body[1] = 1.0f; - target_attitude_from_orbit_.vec_to_sub_target_body[2] = 0.0f; - target_attitude_from_orbit_.offset_angle_axis = MATRIX33_ROTATION_AXIS_X; - target_attitude_from_orbit_.offset_angle_rad = 0.0f; - - // 東大正門 - target_attitude_from_orbit_.target_lla_rad_m[0] = PHYSICAL_CONST_degree_to_radian(35.7130f); - target_attitude_from_orbit_.target_lla_rad_m[1] = PHYSICAL_CONST_degree_to_radian(139.7596f); - target_attitude_from_orbit_.target_lla_rad_m[2] = 23.0f; + target_attitude_from_orbit_.main_target_direction = ATTITUDE_TARGET_PARAMETERS_main_target_direction; + target_attitude_from_orbit_.sub_target_direction = ATTITUDE_TARGET_PARAMETERS_sub_target_direction; + VECTOR3_copy(target_attitude_from_orbit_.vec_to_main_target_body, ATTITUDE_TARGET_PARAMETERS_vec_to_main_target_body); + VECTOR3_copy(target_attitude_from_orbit_.vec_to_sub_target_body, ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body); + + target_attitude_from_orbit_.offset_angle_axis = ATTITUDE_TARGET_PARAMETERS_offset_angle_axis; + target_attitude_from_orbit_.offset_angle_rad = ATTITUDE_TARGET_PARAMETERS_offset_angle_rad; + + VECTOR3_copy(target_attitude_from_orbit_.target_lla_rad_m, ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m); } diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c index 83eaa731..badd7aaf 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c @@ -11,3 +11,17 @@ const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_ // Manual mode target const Quaternion ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t = {0.5f, 0.5f, 0.5f, 0.5f}; +// Target calculation from orbit +// Main target +extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_main_target_direction = APP_TAFO_TARGET_DIRECITON_SUN; +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_main_target_body[PHYSICAL_CONST_THREE_DIM] = {1.0f, 0.0f, 0.0f}; +// Sub target +extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_sub_target_direction = APP_TAFO_TARGET_DIRECITON_EARTH_CENTER; +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body[PHYSICAL_CONST_THREE_DIM] = {0.0f, 1.0f, 0.0f}; +// Offset angle +extern const MATRIX33_ROTATION_AXIS ATTITUDE_TARGET_PARAMETERS_offset_angle_axis = MATRIX33_ROTATION_AXIS_X; +extern const float ATTITUDE_TARGET_PARAMETERS_offset_angle_rad = 0.0f; +// Target on earth surface +extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM] = { PHYSICAL_CONST_degree_to_radian(35.7130f), + PHYSICAL_CONST_degree_to_radian(139.7596f), + 23.0f}; diff --git a/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h index 96599313..effae009 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_target_parameters.h @@ -7,6 +7,7 @@ #define ATTITUDE_TARGET_PARAMETERS_H_ #include +#include #include // Target Calculation Mode @@ -15,4 +16,17 @@ extern const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode; //!< Atti // Manual mode target extern const Quaternion ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t; //!< Target Quaternion +// Target calculation from orbit +// Main target +extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_main_target_direction; //!< Main target +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_main_target_body[PHYSICAL_CONST_THREE_DIM]; //!< Main direction at body frame +// Sub target +extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_sub_target_direction; //!< Sub target +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body[PHYSICAL_CONST_THREE_DIM]; //!< Sub direction at body frame +// Offset angle +extern const MATRIX33_ROTATION_AXIS ATTITUDE_TARGET_PARAMETERS_offset_angle_axis; //!< Offset angle axis +extern const float ATTITUDE_TARGET_PARAMETERS_offset_angle_rad; //!< Offset angle [m] +// Target on earth surface +extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM]; //!< Target as latitude [rad], longitude [rad], altitude [m] + #endif // ATTITUDE_TARGET_PARAMETERS_H_ From 2eb9e37c5534d44d7ed21eb3f75bc4060663b6ed Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 10 Jun 2023 09:08:27 +0200 Subject: [PATCH 078/176] Fix small --- .../SatelliteParameters/Sample/attitude_target_parameters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c index badd7aaf..c168f617 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c @@ -24,4 +24,4 @@ extern const float ATTITUDE_TARGET_PARAMETERS_offset_angle_rad = 0.0f; // Target on earth surface extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM] = { PHYSICAL_CONST_degree_to_radian(35.7130f), PHYSICAL_CONST_degree_to_radian(139.7596f), - 23.0f}; + 23.0f }; From 3bcd2ae6dad4f4e6dc1d0594cca138371725108e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sat, 10 Jun 2023 09:08:44 +0200 Subject: [PATCH 079/176] Fix small --- .../SatelliteParameters/Sample/attitude_target_parameters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c index c168f617..6c8730cc 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c @@ -9,15 +9,15 @@ const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_CALC_MODE_MANUAL; // Manual mode target -const Quaternion ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t = {0.5f, 0.5f, 0.5f, 0.5f}; +const Quaternion ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t = { 0.5f, 0.5f, 0.5f, 0.5f }; // Target calculation from orbit // Main target extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_main_target_direction = APP_TAFO_TARGET_DIRECITON_SUN; -extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_main_target_body[PHYSICAL_CONST_THREE_DIM] = {1.0f, 0.0f, 0.0f}; +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_main_target_body[PHYSICAL_CONST_THREE_DIM] = { 1.0f, 0.0f, 0.0f }; // Sub target extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_sub_target_direction = APP_TAFO_TARGET_DIRECITON_EARTH_CENTER; -extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body[PHYSICAL_CONST_THREE_DIM] = {0.0f, 1.0f, 0.0f}; +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body[PHYSICAL_CONST_THREE_DIM] = { 0.0f, 1.0f, 0.0f }; // Offset angle extern const MATRIX33_ROTATION_AXIS ATTITUDE_TARGET_PARAMETERS_offset_angle_axis = MATRIX33_ROTATION_AXIS_X; extern const float ATTITUDE_TARGET_PARAMETERS_offset_angle_rad = 0.0f; From 93952cbdf85677a02c4118933b1530b9fc2eca40 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 09:59:49 +0200 Subject: [PATCH 080/176] Fix small --- .../AOCS/TargetAttitude/target_attitude_calculator.c | 7 +++++-- .../AOCS/TargetAttitude/target_attitude_from_orbit.c | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c index c40e0a91..0187a30b 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c @@ -16,6 +16,9 @@ #include "../../../app_registry.h" #include "../../../../Library/vector3.h" +// SatelliteParameters +#include "../../../../Settings/SatelliteParameters/attitude_target_parameters.h" + static TargetAttitudeCalculator target_attitude_calculator_; const TargetAttitudeCalculator* const target_attitude_calculator = &target_attitude_calculator_; @@ -46,8 +49,8 @@ AppInfo APP_TARGET_ATT_CALC_create_app(void) static void APP_TARGET_ATT_CALC_init_(void) { // デフォルトはMANUALモード - target_attitude_calculator_.mode = APP_TARGET_ATT_CALC_MODE_MANUAL; - target_attitude_calculator_.quaternion_target_i2t = QUATERNION_make_unit(); + target_attitude_calculator_.mode = ATTITUDE_TARGET_PARAMETERS_mode; + target_attitude_calculator_.quaternion_target_i2t = ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t; target_attitude_calculator_.is_enabled = 0; } diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c index 39c7203c..d136036e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c @@ -18,7 +18,6 @@ // SatelliteParameters #include "../../../../Settings/SatelliteParameters/attitude_target_parameters.h" - static TargetAttitudeFromOrbit target_attitude_from_orbit_; const TargetAttitudeFromOrbit* const target_attitude_from_orbit = &target_attitude_from_orbit_; From 5e1771dc29abc66b5d6cf2ec6e58608b84b81c93 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 11:39:44 +0200 Subject: [PATCH 081/176] Add attitude determination parameters --- .../fine_three_axis_determination.c | 5 +- .../rough_three_axis_determination.c | 9 ++- .../AOCS/AttitudeDetermination/stt_gyro_ekf.c | 79 +++++++++---------- src/src_user/Settings/CMakeLists.txt | 2 +- .../attitude_determination_parameters.c | 39 +++++++++ .../attitude_determination_parameters.h | 31 ++++++++ 6 files changed, 120 insertions(+), 45 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/attitude_determination_parameters.h diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c index 1b69dbac..4a89b3ff 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c @@ -15,6 +15,9 @@ #include "../../../../Library/quaternion.h" #include "stt_gyro_ekf.h" +// Satellite parameters +#include "../../../../Settings/SatelliteParameters/attitude_determination_parameters.h" + static FineThreeAxisDetermination fine_three_axis_determination_; const FineThreeAxisDetermination* const fine_three_axis_determination = &fine_three_axis_determination_; @@ -35,7 +38,7 @@ AppInfo APP_FTAD_create_app(void) static void APP_FTAD_init_(void) { fine_three_axis_determination_.previous_obc_time = TMGR_get_master_clock(); - fine_three_axis_determination_.method = APP_FTAD_METHOD_STT; + fine_three_axis_determination_.method = ATTITUDE_DETERMINATION_PARAMETERS_ftad_method; } static void APP_FTAD_exec_(void) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c index a1fe6c6c..89cce836 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c @@ -18,6 +18,9 @@ #include "../../../../Library/physical_constants.h" #include "../../../../Library/math_constants.h" +// Satellite parameters +#include "../../../../Settings/SatelliteParameters/attitude_determination_parameters.h" + static RoughThreeAxisDetermination rough_three_axis_determination_; const RoughThreeAxisDetermination* const rough_three_axis_determination = &rough_three_axis_determination_; @@ -169,9 +172,9 @@ AppInfo APP_RTAD_create_app(void) static void APP_RTAD_init_(void) { rough_three_axis_determination_.previous_obc_time = TMGR_get_master_clock(); - rough_three_axis_determination_.method = APP_RTAD_METHOD_TRIAD; - rough_three_axis_determination_.q_method_info.sun_vec_weight = 0.5f; // TODO_L: サンセンサの観測分散と磁気センサの観測分散で決める - rough_three_axis_determination_.q_method_info.mag_vec_weight = 1.0f - rough_three_axis_determination_.q_method_info.sun_vec_weight; // TODO_L: サンセンサの観測分散と磁気センサの観測分散で決める + rough_three_axis_determination_.method = ATTITUDE_DETERMINATION_PARAMETERS_rtad_method; + rough_three_axis_determination_.q_method_info.sun_vec_weight = ATTITUDE_DETERMINATION_PARAMETERS_q_method_sun_vec_weight; + rough_three_axis_determination_.q_method_info.mag_vec_weight = 1.0f - rough_three_axis_determination_.q_method_info.sun_vec_weight; } static void APP_RTAD_exec_(void) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c index 822f459b..34ff03b7 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c @@ -20,6 +20,9 @@ #include "../HardwareDependent/SensorFilters/sagitta_filter.h" #include "../../../../Library/math_constants.h" +// Satellite parameters +#include "../../../../Settings/SatelliteParameters/attitude_determination_parameters.h" + MATRIX_DEFINE_MATRIX_SRTUCT(6, 3, float); MATRIX_DEFINE_MATRIX_SRTUCT(6, 1, float); MATRIX_DEFINE_MATRIX_SRTUCT(3, 6, float); @@ -196,14 +199,21 @@ AppInfo APP_STT_GYRO_EKF_create_app(void) static void APP_STT_GYRO_EKF_init_(void) { - APP_STT_GYRO_EKF_process_noise_covariance_ = MATRIX_MAKE_INIT_MATRIX(6, 6, float); - // 姿勢変化は制御周期0.1秒間での軌道位相変化と同程度とし,分散はその2乗になる. - const float kOrbitPeriodSec = 5700.0f; //!< 軌道周期 - stt_gyro_ekf_.process_noise_covariance.attitude_element = - powf((MATH_CONST_2PI / kOrbitPeriodSec * APP_STT_GYRO_EKF_kComputationCycle_), 2.0f); - // 姿勢レート変化はどの程度の値にするか未定. - stt_gyro_ekf_.process_noise_covariance.attitude_rate_element = - powf((MATH_CONST_2PI / kOrbitPeriodSec * APP_STT_GYRO_EKF_kComputationCycle_), 2.0f); + // General parameters + APP_STT_GYRO_EKF_calculation_time_.previous = TMGR_get_master_clock(); + APP_STT_GYRO_EKF_calculation_time_.current = TMGR_get_master_clock(); + APP_STT_GYRO_EKF_before_stt_unix_time_ms_ = 0; + + stt_gyro_ekf_.estimated_result.quaternion_i2b = QUATERNION_make_unit(); + VECTOR3_initialize(stt_gyro_ekf_.estimated_result.angular_velocity_body_rad_s, 0.0f); + VECTOR3_initialize(stt_gyro_ekf_.estimated_result.rate_bias_body_rad_s, 0.0f); + + stt_gyro_ekf_.use_ekf_estimated_attitude = APP_STT_GYRO_EKF_USE_ESTIMATED_ATTITUDE_DISABLE; + stt_gyro_ekf_.calculation_state = APP_STT_GYRO_EKF_CALCULATION_DIVERGED; + + // Process noise model + stt_gyro_ekf_.process_noise_covariance.attitude_element = ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude; + stt_gyro_ekf_.process_noise_covariance.attitude_rate_element = ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude; APP_STT_GYRO_EKF_process_noise_covariance_ = MATRIX_MAKE_INIT_MATRIX(6, 6, float); for (size_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { @@ -211,39 +221,36 @@ static void APP_STT_GYRO_EKF_init_(void) APP_STT_GYRO_EKF_process_noise_covariance_.data[i + 3][i + 3] = stt_gyro_ekf_.process_noise_covariance.attitude_rate_element; } + // Observation model APP_STT_GYRO_EKF_observation_matrix_ = MATRIX_MAKE_INIT_MATRIX(3, 6, float); for (size_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { APP_STT_GYRO_EKF_observation_matrix_.data[i][i] = 1.0f; } - APP_STT_GYRO_EKF_calculation_time_.previous = TMGR_get_master_clock(); - APP_STT_GYRO_EKF_calculation_time_.current = TMGR_get_master_clock(); - APP_STT_GYRO_EKF_before_stt_unix_time_ms_ = 0; - - stt_gyro_ekf_.estimated_result.quaternion_i2b = QUATERNION_make_unit(); - VECTOR3_initialize(stt_gyro_ekf_.estimated_result.angular_velocity_body_rad_s, 0.0f); - VECTOR3_initialize(stt_gyro_ekf_.estimated_result.rate_bias_body_rad_s, 0.0f); - - stt_gyro_ekf_.gyro_random_noise.standard_deviation_compo_rad_s[0] = 4.363323e-5f; // STIM210ランダムノイズN:15deg/sq(h) - stt_gyro_ekf_.gyro_random_noise.standard_deviation_compo_rad_s[1] = 4.363323e-5f; // STIM210ランダムノイズN:15deg/sq(h) - stt_gyro_ekf_.gyro_random_noise.standard_deviation_compo_rad_s[2] = 4.363323e-5f; // STIM210ランダムノイズN:15deg/sq(h) + // Observation noise model for Gyro sensor + VECTOR3_copy(stt_gyro_ekf_.gyro_random_noise.standard_deviation_compo_rad_s, + ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_noise_standard_deviation_compo_rad_s); QUATERNION_trans_coordinate(stt_gyro_ekf_.gyro_random_noise.standard_deviation_body_rad_s, - stim210_driver[STIM210_IDX_IN_UNIT]->info.frame_transform_c2b, - stt_gyro_ekf_.gyro_random_noise.standard_deviation_compo_rad_s); + stim210_driver[STIM210_IDX_IN_UNIT]->info.frame_transform_c2b, + stt_gyro_ekf_.gyro_random_noise.standard_deviation_compo_rad_s); - // ランダムウォークノイズ:STIM210 bias stability B = 0.3deg/h - stt_gyro_ekf_.gyro_random_walk.standard_deviation_compo_rad_s2[0] = 7.272205e-8f; // K=3/2*B^2/Nとして計算 - stt_gyro_ekf_.gyro_random_walk.standard_deviation_compo_rad_s2[1] = 7.272205e-8f; // K=3/2*B^2/Nとして計算 - stt_gyro_ekf_.gyro_random_walk.standard_deviation_compo_rad_s2[2] = 7.272205e-8f; // K=3/2*B^2/Nとして計算 + VECTOR3_copy(stt_gyro_ekf_.gyro_random_walk.standard_deviation_compo_rad_s2, + ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_standard_deviation_compo_rad_s2); QUATERNION_trans_coordinate(stt_gyro_ekf_.gyro_random_walk.standard_deviation_body_rad_s2, - stim210_driver[STIM210_IDX_IN_UNIT]->info.frame_transform_c2b, - stt_gyro_ekf_.gyro_random_walk.standard_deviation_compo_rad_s2); + stim210_driver[STIM210_IDX_IN_UNIT]->info.frame_transform_c2b, + stt_gyro_ekf_.gyro_random_walk.standard_deviation_compo_rad_s2); - // STIM210のノイズは,ECRVよりは単純なランダムウォークノイズとしてモデル化するのが適切. - // ECRV時定数->無限大の極限がランダムウォークノイズと一致するので,今回は大きな値として10^9で設定する. - stt_gyro_ekf_.gyro_random_walk.time_constant_s = 1.0E9f; + stt_gyro_ekf_.gyro_random_walk.time_constant_s = ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_time_constant_s; + // Observation noise model for Star sensor + VECTOR3_copy(stt_gyro_ekf_.stt_error.standard_deviation_compo_rad, + ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_rad); + QUATERNION_trans_coordinate(stt_gyro_ekf_.stt_error.standard_deviation_body_rad, + sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.frame_transform_c2b, + stt_gyro_ekf_.stt_error.standard_deviation_compo_rad); + + // System matrix APP_STT_GYRO_EKF_system_matrix_.a = MATRIX_MAKE_INIT_MATRIX(6, 6, float); APP_STT_GYRO_EKF_system_matrix_.a.data[0][3] = -0.5f; APP_STT_GYRO_EKF_system_matrix_.a.data[1][4] = -0.5f; @@ -260,13 +267,7 @@ static void APP_STT_GYRO_EKF_init_(void) APP_STT_GYRO_EKF_system_matrix_.b.data[4][4] = 1.0f; APP_STT_GYRO_EKF_system_matrix_.b.data[5][5] = 1.0f; - stt_gyro_ekf_.stt_error.standard_deviation_compo_rad[0] = 4.8481e-5f; // STT roll方向精度:10秒角 - stt_gyro_ekf_.stt_error.standard_deviation_compo_rad[1] = 9.6963e-6f; // STT cross方向精度:2秒角 - stt_gyro_ekf_.stt_error.standard_deviation_compo_rad[2] = 9.6963e-6f; // STT cross方向精度:2秒角 - QUATERNION_trans_coordinate(stt_gyro_ekf_.stt_error.standard_deviation_body_rad, - sagitta_driver[SAGITTA_IDX_IN_UNIT]->info.frame_transform_c2b, - stt_gyro_ekf_.stt_error.standard_deviation_compo_rad); - + // Covariance matrix stt_gyro_ekf_.initial_covariance.diagonal_component_stt[0] = powf(stt_gyro_ekf_.stt_error.standard_deviation_body_rad[0], 2.0f); stt_gyro_ekf_.initial_covariance.diagonal_component_stt[1] = @@ -277,9 +278,7 @@ static void APP_STT_GYRO_EKF_init_(void) powf(stt_gyro_ekf_.gyro_random_noise.standard_deviation_body_rad_s[0], 2.0f); APP_STT_GYRO_EKF_initialize_covariance_matrix_(); - stt_gyro_ekf_.use_ekf_estimated_attitude = APP_STT_GYRO_EKF_USE_ESTIMATED_ATTITUDE_DISABLE; - stt_gyro_ekf_.calculation_state = APP_STT_GYRO_EKF_CALCULATION_DIVERGED; - + // Observation covariance APP_STT_GYRO_EKF_observation_noise_covariance_ = MATRIX_MAKE_INIT_MATRIX(3, 3, float); for (size_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 81d4e530..eed10e70 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -49,7 +49,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/orbit_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/structure_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c new file mode 100644 index 00000000..6da1eefe --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c @@ -0,0 +1,39 @@ +/** + * @file attitude_determination_parameters.c + * @brief 姿勢決定系に関する衛星固有パラメータを管理する + */ + +#include +#include +#include + +// Rough Three Axis Determination +const APP_RTAD_METHOD ATTITUDE_DETERMINATION_PARAMETERS_rtad_method = APP_RTAD_METHOD_TRIAD; +const float ATTITUDE_DETERMINATION_PARAMETERS_q_method_sun_vec_weight = 0.5f; + +// Fine Three Axis Determination +const APP_FTAD_METHOD ATTITUDE_DETERMINATION_PARAMETERS_ftad_method = APP_FTAD_METHOD_STT; + +// STT-Gyro Extended Kalman Filter +// STIM210 random noise N = 15deg/sq(h) +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_noise_standard_deviation_compo_rad_s[PHYSICAL_CONST_THREE_DIM] = { 4.363323e-5f, + 4.363323e-5f, + 4.363323e-5f }; +// STIM210 bias stability B = 0.3deg/h, K=3/2*B^2/N +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_standard_deviation_compo_rad_s2[PHYSICAL_CONST_THREE_DIM] = { 7.272205e-8f, + 7.272205e-8f, + 7.272205e-8f }; +// As result of sensor feature measurement, STIM210 noise looks a simple random walk model. +// When ECRV time constant is infinite, the model is same as a simple random walk, so we set very large value here. +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_time_constant_s = 1e9f; + +// STT noise roll direction 10 arcsec, cross direction 2 arcsec +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_rad[PHYSICAL_CONST_THREE_DIM] = { 4.8481e-5f, + 9.6963e-6f, + 9.6963e-6f }; +// Process noise model +// We assume the attitude target is operated to synchronize with orbit. +const float kOrbitPeriodSec = 5700.0f; +const float kEkfComputationCycleSec = 0.1f; +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); diff --git a/src/src_user/Settings/SatelliteParameters/attitude_determination_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_determination_parameters.h new file mode 100644 index 00000000..46ff26bc --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/attitude_determination_parameters.h @@ -0,0 +1,31 @@ +/** + * @file attitude_determination_parameters.h + * @brief 姿勢決定系に関する衛星固有パラメータを管理する + */ + +#ifndef ATTITUDE_DETERMINATION_PARAMETERS_H_ +#define ATTITUDE_DETERMINATION_PARAMETERS_H_ + +#include +#include +#include + +// Rough Three Axis Determination +extern const APP_RTAD_METHOD ATTITUDE_DETERMINATION_PARAMETERS_rtad_method; //!< Rough three axis determination method +extern const float ATTITUDE_DETERMINATION_PARAMETERS_q_method_sun_vec_weight; //!< Q-method sun vector weight (0.0f ~ 1.0f) + +// Fine Three Axis Determination +extern const APP_FTAD_METHOD ATTITUDE_DETERMINATION_PARAMETERS_ftad_method; //!< Fine three axis determination method + +// STT-Gyro Extended Kalman Filter +// Observation noise model of Gyro sensor +extern const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_noise_standard_deviation_compo_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< EKF gyro sensor random noise standard deviation @ component frame [rad/s] +extern const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_standard_deviation_compo_rad_s2[PHYSICAL_CONST_THREE_DIM]; //!< EKF gyro sensor random walk standard deviation @ component frame [rad/s2] +extern const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_time_constant_s; //!< EKF gyro sensor random walk time constant [s] +// Observation noise model of Star sensor +extern const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_rad[PHYSICAL_CONST_THREE_DIM]; //!< EKF star sensor random noise standard deviation @ component frame [rad] +// Process noise model +extern const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude; //!< Process noise covariance for attitude +extern const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate; //!< Process noise covariance for attitude rate + +#endif // ATTITUDE_DETERMINATION_PARAMETERS_H_ From 12dc517c8f9ebf2a1f43b389ebacc905cee64c91 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 11:46:42 +0200 Subject: [PATCH 082/176] Fix process noise for attitude to attitude rate --- .../UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c index 34ff03b7..8ea16fda 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c @@ -213,7 +213,7 @@ static void APP_STT_GYRO_EKF_init_(void) // Process noise model stt_gyro_ekf_.process_noise_covariance.attitude_element = ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude; - stt_gyro_ekf_.process_noise_covariance.attitude_rate_element = ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude; + stt_gyro_ekf_.process_noise_covariance.attitude_rate_element = ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate; APP_STT_GYRO_EKF_process_noise_covariance_ = MATRIX_MAKE_INIT_MATRIX(6, 6, float); for (size_t i = 0; i < PHYSICAL_CONST_THREE_DIM; i++) { From 0d0d6cca6e922f3b8188983b1af4c12b421fa103 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 11:47:58 +0200 Subject: [PATCH 083/176] Add comment --- .../Sample/attitude_determination_parameters.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c index 6da1eefe..55ab0951 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c @@ -36,4 +36,5 @@ const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_r const float kOrbitPeriodSec = 5700.0f; const float kEkfComputationCycleSec = 0.1f; const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); +// The attitude rate process noise is not well tuned at this moment const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); From c6fdd8b6092b804bfa2658b70ef55d5fdd5e30cf Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 16:02:49 +0200 Subject: [PATCH 084/176] Add attitude control parameter files --- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/attitude_control_parameters.c | 7 +++++++ .../SatelliteParameters/attitude_control_parameters.h | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 81d4e530..8915dd45 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -50,7 +50,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/structure_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c new file mode 100644 index 00000000..dc9f1afd --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -0,0 +1,7 @@ +/** + * @file attitude_control_parameters.c + * @brief 姿勢制御関連の衛星固有パラメータを管理する + */ + +#include + diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h new file mode 100644 index 00000000..5da8e3ed --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -0,0 +1,9 @@ +/** + * @file attitude_control_parameters.h + * @brief 姿勢制御関連の衛星固有パラメータを管理する + */ + +#ifndef ATTITUDE_CONTROL_PARAMETERS_H_ +#define ATTITUDE_CONTROL_PARAMETERS_H_ + +#endif // ATTITUDE_CONTROL_PARAMETERS_H_ From 66d2184e22ef502cb30a561151da363d14c7a67d Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 16:20:54 +0200 Subject: [PATCH 085/176] Add Bdot parameters --- .../Applications/UserDefined/AOCS/AttitudeControl/bdot.c | 9 ++++++--- .../Sample/attitude_control_parameters.c | 4 ++++ .../SatelliteParameters/attitude_control_parameters.h | 8 ++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c index 75a71bc1..672c3cd1 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c @@ -13,6 +13,9 @@ #include "../aocs_manager.h" #include "../../../DriverInstances/di_mtq_seiren.h" +// Satellite parameters +#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" + static Bdot bdot_; const Bdot* const bdot = &bdot_; @@ -71,9 +74,9 @@ AppInfo APP_BDOT_create_app(void) static void APP_BDOT_init_(void) { - VECTOR3_initialize(bdot_.control_gain, -0.1f); - bdot_.minimum_time_derivative_step_ms = 100; // SILS試験で正しくレートダンプに成功したときの値を設定している - bdot_.mtq_output_time_length_ms = 1000; // SILS試験で正しくレートダンプに成功したときの値を設定している + VECTOR3_copy(bdot_.control_gain, ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain); + bdot_.minimum_time_derivative_step_ms = ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_step_ms; + bdot_.mtq_output_time_length_ms = ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms; bdot_.mtq_output_turned_on_obc_time = TMGR_get_master_clock(); bdot_.time_derivative_variables.previous_obc_time = TMGR_get_master_clock(); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index dc9f1afd..20f7ff0e 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -5,3 +5,7 @@ #include +// Bdor +const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM] = { -0.1f, -0.1f, -0.1f }; +const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_step_ms = 100; +const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms = 1000; diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h index 5da8e3ed..84e0f92e 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -6,4 +6,12 @@ #ifndef ATTITUDE_CONTROL_PARAMETERS_H_ #define ATTITUDE_CONTROL_PARAMETERS_H_ +#include +#include + +// Bdot +extern const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM]; //!< Control gain for B-dot +extern const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_step_ms; //!< Minimum interval for magnetic field derivative [ms] +extern const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms; //!< Keep time for MTQ ON as an actuation [ms] + #endif // ATTITUDE_CONTROL_PARAMETERS_H_ From 3d9b3ff03b63b7da6d50846980d071ade2ca6aa2 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 17:15:51 +0200 Subject: [PATCH 086/176] Add sun pointing parameters --- .../AOCS/AttitudeControl/sun_pointing.c | 73 ++++++++----------- .../Sample/attitude_control_parameters.c | 30 ++++++++ .../attitude_control_parameters.h | 36 ++++++++- 3 files changed, 94 insertions(+), 45 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c index 1c675446..8c35a697 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c @@ -23,6 +23,9 @@ #include #include +// Satellite Parameters +#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" + static SunPointing sun_pointing_; const SunPointing* const sun_pointing = &sun_pointing_; @@ -85,7 +88,7 @@ static void APP_SUN_POINTING_init_(void) CROSS_PRODUCT_CONTROL_init(&sun_pointing_.cross_product_cntrl); - sun_pointing_.sun_pointing_axis_id = SUN_POINTING_AXIS_ID_Z; + sun_pointing_.sun_pointing_axis_id = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_axis_id; sun_pointing_.control_state = SUN_POINTING_CONTROL_STATE_TRANSIENT; float sun_vec_target_body[PHYSICAL_CONST_THREE_DIM] = { 0.0f, 0.0f, 0.0f }; @@ -94,52 +97,36 @@ static void APP_SUN_POINTING_init_(void) // ノミナルのスピン軸 (Z軸) 周りの姿勢制御はフリーとし,スピン軸周りはレートのみPD制御する PidGains gains_att[PHYSICAL_CONST_THREE_DIM]; - gains_att[0].p_gain = 5.0e-5f; - gains_att[1].p_gain = 10.0e-5f; - gains_att[2].p_gain = 0.0f; - - gains_att[0].i_gain = 0.0f; - gains_att[1].i_gain = 0.0f; - gains_att[2].i_gain = 0.0f; - - gains_att[0].d_gain = 0.0f; - gains_att[1].d_gain = 0.0f; - gains_att[2].d_gain = 0.0f; + gains_att[0] = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_x; + gains_att[1] = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_y; + gains_att[2] = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_z; PidGains gains_omega[PHYSICAL_CONST_THREE_DIM]; - gains_omega[0].p_gain = 1.0e-2f; - gains_omega[1].p_gain = 2.0e-2f; - gains_omega[2].p_gain = 7.0e-3f; - - gains_omega[0].i_gain = 0.0f; - gains_omega[1].i_gain = 0.0f; - gains_omega[2].i_gain = 0.0f; - - gains_omega[0].d_gain = 0.0f; - gains_omega[1].d_gain = 0.0f; - gains_omega[2].d_gain = 2.0e-2f; - - sun_pointing_.max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); - sun_pointing_.max_direct_feedback_rate_rad_s = 1.6e-3f; - sun_pointing_.max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); - sun_pointing_.max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); - sun_pointing_.integral_control_permission_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); - - sun_pointing_.acceptable_angle_error_to_spin_up_rad = PHYSICAL_CONST_degree_to_radian(30.0f); - sun_pointing_.spin_rate_around_sun_rad_s = 1.4e-2f; - - sun_pointing_.lpf_sample_freq_Hz = 10.0f; - sun_pointing_.lpf_trq_cutoff_freq_Hz = 0.10f; - sun_pointing_.lpf_trq_damping_factor = 1.0f; - - sun_pointing_.lpf_trq_cutoff_freq_spin_axis_Hz = 0.03f; - sun_pointing_.lpf_spin_rate_cutoff_freq_Hz = 5e-4f; + gains_omega[0] = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_x; + gains_omega[1] = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y; + gains_omega[2] = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z; + + sun_pointing_.max_direct_feedback_angle_rad = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad; + sun_pointing_.max_direct_feedback_rate_rad_s = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_rate_rad_s; + sun_pointing_.max_integral_angle_rad = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad; + sun_pointing_.max_angle_to_run_integral_control_rad = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad; + sun_pointing_.integral_control_permission_angle_rad = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad; + + sun_pointing_.acceptable_angle_error_to_spin_up_rad = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad; + sun_pointing_.spin_rate_around_sun_rad_s = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s; + + sun_pointing_.lpf_sample_freq_Hz = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz; + sun_pointing_.lpf_trq_cutoff_freq_Hz = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_Hz; + sun_pointing_.lpf_trq_damping_factor = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_damping_factor; + + sun_pointing_.lpf_trq_cutoff_freq_spin_axis_Hz = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_spin_axis_Hz; + sun_pointing_.lpf_spin_rate_cutoff_freq_Hz = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz; // 下記の値はISS軌道を想定した値 (極軌道に近ければ緩めて良いはず) - sun_pointing_.mtq_allowable_error_ratio_transient = 0.6f; - sun_pointing_.correction_gain_transient = 0.0f; - sun_pointing_.mtq_allowable_error_ratio_stable = 0.8f; - sun_pointing_.correction_gain_stable = 0.25f; + sun_pointing_.mtq_allowable_error_ratio_transient = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_transient; + sun_pointing_.correction_gain_transient = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_transient; + sun_pointing_.mtq_allowable_error_ratio_stable = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_stable; + sun_pointing_.correction_gain_stable = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_stable; for (uint8_t axis = 0; axis < PHYSICAL_CONST_THREE_DIM; axis++) { diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index 20f7ff0e..4cc5f14c 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -9,3 +9,33 @@ const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM] = { -0.1f, -0.1f, -0.1f }; const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_step_ms = 100; const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms = 1000; + +// Sun Pointing +const SUN_POINTING_AXIS_ID ATTITUDE_CONTROL_PARAMETERS_sun_pointing_axis_id = SUN_POINTING_AXIS_ID_Z; +// Gain +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_x = { 5.0e-5f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_y = { 10.0e-5f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_z = { 0.0f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_x = { 1.0e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y = { 2.0e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z = { 7.0e-3f, 0.0f, 2.0e-2f }; +// MTQ control settings +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_rate_rad_s = 1.6e-3f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_transient = 0.6f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_transient = 0.0f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_stable = 0.8f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_stable = 0.25f; +// Integral control setting +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); +// Spin control setting +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s = 1.4e-2f; +// Low Pass Filter setting +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz = 10.0f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_Hz = 0.10f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_damping_factor = 1.0f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_spin_axis_Hz = 0.03f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz = 5e-4f; \ No newline at end of file diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h index 84e0f92e..ba348a03 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -6,12 +6,44 @@ #ifndef ATTITUDE_CONTROL_PARAMETERS_H_ #define ATTITUDE_CONTROL_PARAMETERS_H_ -#include -#include +#include +#include // Bdot extern const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM]; //!< Control gain for B-dot extern const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_step_ms; //!< Minimum interval for magnetic field derivative [ms] extern const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms; //!< Keep time for MTQ ON as an actuation [ms] +// Sun Pointing +extern const SUN_POINTING_AXIS_ID ATTITUDE_CONTROL_PARAMETERS_sun_pointing_axis_id; //!< Sun pointing target axis ID +// Gain +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_x; //!< Sun pointing attitude gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_y; //!< Sun pointing attitude gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_z; //!< Sun pointing attitude gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_x; //!< Sun pointing attitude rate gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y; //!< Sun pointing attitude rate gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z; //!< Sun pointing attitude rate gain body Z axis +// MTQ control settings +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad; //!< Sun pointing direct feedback max angle [rad] +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_rate_rad_s; //!< Sun pointing direct feedback max angular rate [rad_s] +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_transient; //!< Sun pointing MTQ allowable error in transient phase +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_transient; //!< Sun pointing correction gain in transient phase +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_stable; //!< Sun pointing MTQ allowable error in stable phase +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_stable; //!< Sun pointing correction gain in stable phase +// Integral control setting +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad; //!< Sun pointing maximum integral angle [rad] +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad; //!< Sun pointing maximum angle to run integral control [rad] +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad; //!< Sun pointing integral control permission angle [rad] +// Spin control setting +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad; //!< Sun pointing acceptable angle error to start spin-up control [rad] +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s; //!< Sun pointing spin rate around sun direction [rad/s] +// Output torque Low Pass Filter(LPF) setting +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz; //!< Sun pointing sampling frequency for both LPF [Hz] +// Output torque LPF (2nd order filter) +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_Hz; //!< Sun pointing output LPF cutoff frequency for cross spin axis [Hz] +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_spin_axis_Hz; //!< Sun pointing output LPF cutoff frequency for spin axis [Hz] +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_damping_factor; //!< Sun pointing output LPF damping factor +// Spin up LPF (1st order filter) +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz; //!< Sun pointing spin up LPF cutoff frequency [Hz] + #endif // ATTITUDE_CONTROL_PARAMETERS_H_ From b3452978b81c5ed21be1a416d28e482cd49b3fd0 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 20:36:09 +0200 Subject: [PATCH 087/176] Add three axis mtq parameters --- .../AttitudeControl/three_axis_control_mtq.c | 55 +++++++------------ .../Sample/attitude_control_parameters.c | 27 ++++++++- .../attitude_control_parameters.h | 30 +++++++++- 3 files changed, 75 insertions(+), 37 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c index 59d02c1f..8da9c325 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c @@ -23,6 +23,9 @@ #include #include +// Satellite Parameters +#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" + static ThreeAxisControlMtq three_axis_control_mtq_; const ThreeAxisControlMtq* const three_axis_control_mtq = &three_axis_control_mtq_; @@ -71,47 +74,31 @@ static void APP_TAC_MTQ_init_(void) CROSS_PRODUCT_CONTROL_init(&three_axis_control_mtq_.cross_product_cntrl); PidGains gains_att[PHYSICAL_CONST_THREE_DIM]; - gains_att[0].p_gain = 1.2e-4f; - gains_att[1].p_gain = 2.0f * 1.2e-4f; - gains_att[2].p_gain = 1.5f * 1.2e-4f; - - gains_att[0].i_gain = 0.0f; - gains_att[1].i_gain = 0.0f; - gains_att[2].i_gain = 0.0f; - - gains_att[0].d_gain = 0.0f; - gains_att[1].d_gain = 0.0f; - gains_att[2].d_gain = 0.0f; + gains_att[0] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_x; + gains_att[1] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_y; + gains_att[2] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_z; PidGains gains_omega[PHYSICAL_CONST_THREE_DIM]; - gains_omega[0].p_gain = 2.5e-2f; - gains_omega[1].p_gain = 2.0f * 2.5e-2f; - gains_omega[2].p_gain = 1.5f * 2.5e-2f; - - gains_omega[0].i_gain = 0.0f; - gains_omega[1].i_gain = 0.0f; - gains_omega[2].i_gain = 0.0f; - - gains_omega[0].d_gain = 0.0f; - gains_omega[1].d_gain = 0.0f; - gains_omega[2].d_gain = 0.0f; + gains_omega[0] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_x; + gains_omega[1] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y; + gains_omega[2] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z; // 下記値の変更時は,HW側の出力最大値にかからない様に留意しながら,ゲインと組み合わせて調整すること. - three_axis_control_mtq_.max_direct_feedback_angle_mtq_rad = PHYSICAL_CONST_degree_to_radian(18.0f); - three_axis_control_mtq_.max_direct_feedback_rate_mtq_rad_s = 5.0e-3f; - three_axis_control_mtq_.max_integral_angle_mtq_rad = PHYSICAL_CONST_degree_to_radian(40.0f); - three_axis_control_mtq_.max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); + three_axis_control_mtq_.max_direct_feedback_angle_mtq_rad = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad; + three_axis_control_mtq_.max_direct_feedback_rate_mtq_rad_s = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s; + three_axis_control_mtq_.max_integral_angle_mtq_rad = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad; + three_axis_control_mtq_.max_angle_to_run_integral_control_rad = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad; - three_axis_control_mtq_.mtq_lpf_sample_freq_Hz = 10.0f; - three_axis_control_mtq_.mtq_lpf_cutoff_freq_Hz = 0.30f; - three_axis_control_mtq_.mtq_lpf_damping_factor = 1.0f; + three_axis_control_mtq_.mtq_lpf_sample_freq_Hz = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz; + three_axis_control_mtq_.mtq_lpf_cutoff_freq_Hz = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz; + three_axis_control_mtq_.mtq_lpf_damping_factor = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor; // 下記の値はISS軌道を想定した値 (極軌道に近ければ緩めて良いはず) - three_axis_control_mtq_.allowable_error_ratio_transient = 0.6f; - three_axis_control_mtq_.correction_gain_transient = 0.0f; - three_axis_control_mtq_.allowable_error_ratio_stable = 0.60f; - three_axis_control_mtq_.correction_gain_stable = 0.1f; - three_axis_control_mtq_.acceptable_angle_error_as_stable_rad = PHYSICAL_CONST_degree_to_radian(20.0f); + three_axis_control_mtq_.allowable_error_ratio_transient = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient; + three_axis_control_mtq_.correction_gain_transient = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient; + three_axis_control_mtq_.allowable_error_ratio_stable = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable; + three_axis_control_mtq_.correction_gain_stable = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_stable ; + three_axis_control_mtq_.acceptable_angle_error_as_stable_rad = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad; for (uint8_t axis = 0; axis < PHYSICAL_CONST_THREE_DIM; axis++) { diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index 4cc5f14c..f85459b5 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -38,4 +38,29 @@ const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz = 10.0f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_Hz = 0.10f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_damping_factor = 1.0f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_spin_axis_Hz = 0.03f; -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz = 5e-4f; \ No newline at end of file +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz = 5e-4f; + +// Three Axis Control with MTQ +// Gain +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_x = { 1.2e-4f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_y = { 2.0f * 1.2e-4f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_z = { 1.5f * 1.2e-4f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_x = { 2.5e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y = { 2.0f * 2.5e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z = { 1.5f * 2.5e-2f, 0.0f, 0.0f }; +// MTQ control settings +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(18.0f); +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s = 5.0e-3f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient = 0.6f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient = 0.0f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable = 0.6f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_stable = 0.1f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad = PHYSICAL_CONST_degree_to_radian(20.0f); + +// Integral control setting +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +// Output torque Low Pass Filter(LPF) setting +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz = 10.0f; +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz = 0.3f; +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor = 1.0f; diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h index ba348a03..0258096b 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -15,7 +15,9 @@ extern const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_s extern const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms; //!< Keep time for MTQ ON as an actuation [ms] // Sun Pointing -extern const SUN_POINTING_AXIS_ID ATTITUDE_CONTROL_PARAMETERS_sun_pointing_axis_id; //!< Sun pointing target axis ID +// Target +extern const SUN_POINTING_AXIS_ID ATTITUDE_CONTROL_PARAMETERS_sun_pointing_axis_id; //!< Sun pointing target axis ID +extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s; //!< Sun pointing target spin rate around sun direction [rad/s] // Gain extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_x; //!< Sun pointing attitude gain body X axis extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_y; //!< Sun pointing attitude gain body Y axis @@ -36,7 +38,6 @@ extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_int extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad; //!< Sun pointing integral control permission angle [rad] // Spin control setting extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad; //!< Sun pointing acceptable angle error to start spin-up control [rad] -extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s; //!< Sun pointing spin rate around sun direction [rad/s] // Output torque Low Pass Filter(LPF) setting extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz; //!< Sun pointing sampling frequency for both LPF [Hz] // Output torque LPF (2nd order filter) @@ -46,4 +47,29 @@ extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_damping_fact // Spin up LPF (1st order filter) extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz; //!< Sun pointing spin up LPF cutoff frequency [Hz] +// Three Axis Control with MTQ +// Gain +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_x; //!< Three Axis Control MTQ attitude gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_y; //!< Three Axis Control MTQ attitude gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_z; //!< Three Axis Control MTQ attitude gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_x; //!< Three Axis Control MTQ attitude rate gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y; //!< Three Axis Control MTQ attitude rate gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z; //!< Three Axis Control MTQ attitude rate gain body Z axis +// MTQ control settings +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad; //!< Three Axis Control direct feedback max angle [rad] +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s; //!< Three Axis Control direct feedback max angular rate [rad_s] +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient; //!< Three Axis Control MTQ allowable error in transient phase +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient; //!< Three Axis Control correction gain in transient phase +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable; //!< Three Axis Control MTQ allowable error in stable phase +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_stable; //!< Three Axis Control correction gain in stable phase +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad; //!< Three Axis Control acceptable angle error as stable [rad] +// Integral control setting +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad; //!< Three Axis Control maximum integral angle [rad] +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad; //!< Three Axis Control maximum angle to run integral control [rad] +// Output torque Low Pass Filter(LPF) setting +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz; //!< Three Axis Control sampling frequency for both LPF [Hz] +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz; //!< Three Axis Control output LPF cutoff frequency for cross spin axis [Hz] +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor; //!< Three Axis Control output LPF damping factor + + #endif // ATTITUDE_CONTROL_PARAMETERS_H_ From 594c068c277daaa41c4ea12beb1181bb8f6247d5 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 20:56:57 +0200 Subject: [PATCH 088/176] Add three axis rw parameters --- .../AttitudeControl/three_axis_control_rw.c | 33 ++++++------------- .../Sample/attitude_control_parameters.c | 9 +++++ .../attitude_control_parameters.h | 8 +++++ 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c index ee1e3108..284a9c39 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c @@ -20,6 +20,9 @@ #include #include +// Satellite Parameters +#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" + static ThreeAxisControlRw three_axis_control_rw_; const ThreeAxisControlRw* const three_axis_control_rw = &three_axis_control_rw_; @@ -53,31 +56,15 @@ static void APP_TAC_RW_init_(void) PID_CONTROL_init(&three_axis_control_rw_.pid_att[axis]); } - PidGains gains_omega[PHYSICAL_CONST_THREE_DIM]; - gains_omega[0].p_gain = aocs_manager->inertia_tensor_sc_body_kgm2[0][0] * 7.0e-1f; - gains_omega[1].p_gain = aocs_manager->inertia_tensor_sc_body_kgm2[1][1] * 7.0e-1f; - gains_omega[2].p_gain = aocs_manager->inertia_tensor_sc_body_kgm2[2][2] * 7.0e-1f; - - gains_omega[0].i_gain = aocs_manager->inertia_tensor_sc_body_kgm2[0][0] * 0.0e-1f; - gains_omega[1].i_gain = aocs_manager->inertia_tensor_sc_body_kgm2[1][1] * 0.0e-1f; - gains_omega[2].i_gain = aocs_manager->inertia_tensor_sc_body_kgm2[2][2] * 0.0e-1f; - - gains_omega[0].d_gain = aocs_manager->inertia_tensor_sc_body_kgm2[0][0] * 2.0e-2f; - gains_omega[1].d_gain = aocs_manager->inertia_tensor_sc_body_kgm2[1][1] * 2.0e-2f; - gains_omega[2].d_gain = aocs_manager->inertia_tensor_sc_body_kgm2[2][2] * 2.0e-2f; - PidGains gains_att[PHYSICAL_CONST_THREE_DIM]; - gains_att[0].p_gain = aocs_manager->inertia_tensor_sc_body_kgm2[0][0] * 1.0e-2f; - gains_att[1].p_gain = aocs_manager->inertia_tensor_sc_body_kgm2[1][1] * 1.0e-2f; - gains_att[2].p_gain = aocs_manager->inertia_tensor_sc_body_kgm2[2][2] * 1.0e-2f; - - gains_att[0].i_gain = aocs_manager->inertia_tensor_sc_body_kgm2[0][0] * 0.0e-2f; - gains_att[1].i_gain = aocs_manager->inertia_tensor_sc_body_kgm2[1][1] * 0.0e-2f; - gains_att[2].i_gain = aocs_manager->inertia_tensor_sc_body_kgm2[2][2] * 0.0e-2f; + gains_att[0] = ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_x; + gains_att[1] = ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_y; + gains_att[2] = ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_z; - gains_att[0].d_gain = aocs_manager->inertia_tensor_sc_body_kgm2[0][0] * 1.0e-2f; - gains_att[1].d_gain = aocs_manager->inertia_tensor_sc_body_kgm2[1][1] * 1.0e-2f; - gains_att[2].d_gain = aocs_manager->inertia_tensor_sc_body_kgm2[2][2] * 1.0e-2f; + PidGains gains_omega[PHYSICAL_CONST_THREE_DIM]; + gains_omega[0] = ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_x; + gains_omega[1] = ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y; + gains_omega[2] = ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z; for (uint8_t axis = 0; axis < PHYSICAL_CONST_THREE_DIM; axis++) { diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index f85459b5..06cfa4e5 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -64,3 +64,12 @@ extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz = 10.0f; extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz = 0.3f; extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor = 1.0f; + +// Three Axis Control with MTQ +// Gain +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_x = { 1.0e-3f, 0.0f, 1.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_y = { 2.0f * 1.0e-3f, 0.0f, 2.0f * 1.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_z = { 2.0f * 1.0e-3f, 0.0f, 2.0f * 1.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_x = { 7.0e-2f, 0.0f, 2.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h index 0258096b..a256ac97 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -71,5 +71,13 @@ extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz; extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz; //!< Three Axis Control output LPF cutoff frequency for cross spin axis [Hz] extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor; //!< Three Axis Control output LPF damping factor +// Three Axis Control with RW +// Gain +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_x; //!< Three Axis Control RW attitude gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_y; //!< Three Axis Control RW attitude gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_z; //!< Three Axis Control RW attitude gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_x; //!< Three Axis Control RW attitude rate gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y; //!< Three Axis Control RW attitude rate gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z; //!< Three Axis Control RW attitude rate gain body Z axis #endif // ATTITUDE_CONTROL_PARAMETERS_H_ From 4517b2ec558da5e19acf0c6723c3bb9c58b1e7c7 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 21:06:55 +0200 Subject: [PATCH 089/176] Add unloading parameters --- .../UserDefined/AOCS/AttitudeControl/unloading.c | 13 ++++++++----- .../Sample/attitude_control_parameters.c | 7 +++++++ .../attitude_control_parameters.h | 9 +++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c index c5d755bf..388da610 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c @@ -13,6 +13,9 @@ #include "../../../../Library/vector3.h" #include "../HardwareDependent/ActuatorControllers/mtq_seiren_controller.h" +// Satellite Parameters +#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" + static Unloading unloading_; const Unloading* const unloading = &unloading_; @@ -43,13 +46,13 @@ AppInfo APP_UNLOADING_create_app(void) static void APP_UNLOADING_init_(void) { - unloading_.angular_velocity_upper_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(7000.0f); - unloading_.angular_velocity_lower_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(-7000.0f); - unloading_.angular_velocity_target_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(0.0f); + unloading_.angular_velocity_upper_threshold_rad_s = ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s; + unloading_.angular_velocity_lower_threshold_rad_s = ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s; + unloading_.angular_velocity_target_rad_s = ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s; - unloading_.control_gain = -1.0e-7f; + unloading_.control_gain = ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain; - unloading_.exec_is_enable = APP_UNLOADING_EXEC_DISABLE; + unloading_.exec_is_enable = ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable; for (int idx = 0; idx < AOCS_MANAGER_NUM_OF_RW; idx++) { diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index 06cfa4e5..d464ef7c 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -73,3 +73,10 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_z = { 2.0f const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_x = { 7.0e-2f, 0.0f, 2.0e-3f }; const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; + +// Unloading +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(-7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(0.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain = -1.0e-7f; +const APP_UNLOADING_EXEC ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable = APP_UNLOADING_EXEC_DISABLE; diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h index a256ac97..78087796 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -8,6 +8,7 @@ #include #include +#include // Bdot extern const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM]; //!< Control gain for B-dot @@ -80,4 +81,12 @@ extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_bod extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y; //!< Three Axis Control RW attitude rate gain body Y axis extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z; //!< Three Axis Control RW attitude rate gain body Z axis +// Unloading + +extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s; //!< Unloading upper threshold [rad/s] +extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s; //!< Unloading lower threshold [rad/s] +extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s; //!< Unloading target [rad/s] +extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain; //!< Unloading gain +extern const APP_UNLOADING_EXEC ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable; //!< Unloading execution enable flag + #endif // ATTITUDE_CONTROL_PARAMETERS_H_ From 437cb00b79c6d0c61f90fd93ffae7bb3bf345111 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 11 Jun 2023 21:07:59 +0200 Subject: [PATCH 090/176] Fix comment --- .../attitude_control_parameters.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h index 78087796..1abcbf47 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -20,12 +20,12 @@ extern const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms extern const SUN_POINTING_AXIS_ID ATTITUDE_CONTROL_PARAMETERS_sun_pointing_axis_id; //!< Sun pointing target axis ID extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s; //!< Sun pointing target spin rate around sun direction [rad/s] // Gain -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_x; //!< Sun pointing attitude gain body X axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_y; //!< Sun pointing attitude gain body Y axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_z; //!< Sun pointing attitude gain body Z axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_x; //!< Sun pointing attitude rate gain body X axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y; //!< Sun pointing attitude rate gain body Y axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z; //!< Sun pointing attitude rate gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_x; //!< Sun pointing attitude gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_y; //!< Sun pointing attitude gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_z; //!< Sun pointing attitude gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_x; //!< Sun pointing attitude rate gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y; //!< Sun pointing attitude rate gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z; //!< Sun pointing attitude rate gain body Z axis // MTQ control settings extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad; //!< Sun pointing direct feedback max angle [rad] extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_rate_rad_s; //!< Sun pointing direct feedback max angular rate [rad_s] @@ -50,9 +50,9 @@ extern const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff // Three Axis Control with MTQ // Gain -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_x; //!< Three Axis Control MTQ attitude gain body X axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_y; //!< Three Axis Control MTQ attitude gain body Y axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_z; //!< Three Axis Control MTQ attitude gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_x; //!< Three Axis Control MTQ attitude gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_y; //!< Three Axis Control MTQ attitude gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_z; //!< Three Axis Control MTQ attitude gain body Z axis extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_x; //!< Three Axis Control MTQ attitude rate gain body X axis extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y; //!< Three Axis Control MTQ attitude rate gain body Y axis extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z; //!< Three Axis Control MTQ attitude rate gain body Z axis @@ -74,12 +74,12 @@ extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor; // Three Axis Control with RW // Gain -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_x; //!< Three Axis Control RW attitude gain body X axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_y; //!< Three Axis Control RW attitude gain body Y axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_z; //!< Three Axis Control RW attitude gain body Z axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_x; //!< Three Axis Control RW attitude rate gain body X axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y; //!< Three Axis Control RW attitude rate gain body Y axis -extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z; //!< Three Axis Control RW attitude rate gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_x; //!< Three Axis Control RW attitude gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_y; //!< Three Axis Control RW attitude gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_z; //!< Three Axis Control RW attitude gain body Z axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_x; //!< Three Axis Control RW attitude rate gain body X axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y; //!< Three Axis Control RW attitude rate gain body Y axis +extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z; //!< Three Axis Control RW attitude rate gain body Z axis // Unloading From 1ec31cc340188758405ed131eb834b7d8666e2c5 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 12 Jun 2023 19:15:12 +0200 Subject: [PATCH 091/176] Add c2a_aobc filter --- c2a_aobc.filters | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/c2a_aobc.filters b/c2a_aobc.filters index 792ce5af..b053e525 100644 --- a/c2a_aobc.filters +++ b/c2a_aobc.filters @@ -452,6 +452,12 @@ Source Files + + Source Files + + + Source Files + Source Files From c573b9aef75d37ab123182b0f6347dc96da8da67 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 12 Jun 2023 19:21:31 +0200 Subject: [PATCH 092/176] Add Satellite Parameters as build target for vMicro --- C2A_AOBC.vcxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C2A_AOBC.vcxproj b/C2A_AOBC.vcxproj index a1dbd5bf..583c7539 100644 --- a/C2A_AOBC.vcxproj +++ b/C2A_AOBC.vcxproj @@ -309,6 +309,8 @@ + + From 32bef6dc5111b5793649a72779df2300ab9f1322 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 12 Jun 2023 19:22:13 +0200 Subject: [PATCH 093/176] Revert filter --- c2a_aobc.filters | 6 ------ 1 file changed, 6 deletions(-) diff --git a/c2a_aobc.filters b/c2a_aobc.filters index b053e525..792ce5af 100644 --- a/c2a_aobc.filters +++ b/c2a_aobc.filters @@ -452,12 +452,6 @@ Source Files - - Source Files - - - Source Files - Source Files From 28d4fe276fc42638be391ae5267f8cb9e6715900 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 12 Jun 2023 20:41:42 +0200 Subject: [PATCH 094/176] Add aocs manager parameters --- .../Applications/UserDefined/AOCS/aocs_manager.c | 13 +++++++------ .../Sample/attitude_control_parameters.c | 10 ++++++++++ .../attitude_control_parameters.h | 12 +++++++++++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index 0f91760b..70b4af39 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -19,6 +19,7 @@ // SatelliteParameters #include "../../../Settings/SatelliteParameters/orbit_parameters.h" #include "../../../Settings/SatelliteParameters/structure_parameters.h" +#include "../../../Settings/SatelliteParameters/attitude_control_parameters.h" static AocsManager aocs_manager_; const AocsManager* const aocs_manager = &aocs_manager_; @@ -62,13 +63,13 @@ static void APP_AOCS_MANAGER_init_(void) VECTOR3_initialize(aocs_manager_.ang_vel_est_body_rad_s, 0.0f); VECTOR3_initialize(aocs_manager_.ang_vel_target_body_rad_s, 0.0f); VECTOR3_initialize(aocs_manager_.ang_vel_error_body_rad_s, 0.0f); - aocs_manager_.limit_angular_velocity_rad_s = PHYSICAL_CONST_degree_to_radian(0.8f); + aocs_manager_.limit_angular_velocity_rad_s = ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s; // Quaternion aocs_manager_.quaternion_obs_i2b = QUATERNION_make_unit(); aocs_manager_.quaternion_est_i2b = QUATERNION_make_unit(); aocs_manager_.quaternion_target_i2t = QUATERNION_make_unit(); aocs_manager_.quaternion_error_b2t = QUATERNION_make_unit(); - aocs_manager_.limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); + aocs_manager_.limit_maneuver_angle_rad = ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad; // 太陽方向 const float kSqrtOneThird = 0.57735f; // ノルム1になる値 VECTOR3_initialize(aocs_manager_.sun_vec_obs_body, kSqrtOneThird); @@ -84,10 +85,10 @@ static void APP_AOCS_MANAGER_init_(void) VECTOR3_initialize(aocs_manager_.internal_torque_target_body_Nm, 0.0f); VECTOR3_initialize(aocs_manager_.external_torque_target_body_Nm, 0.0f); VECTOR3_initialize(aocs_manager_.torque_est_body_Nm, 0.0f); - VECTOR3_initialize(aocs_manager_.internal_torque_max_body_Nm, 5e-3f); // これで進めるが、必要になったら修正してよい - VECTOR3_initialize(aocs_manager_.external_torque_max_body_Nm, 3e-4f); // これで進めるが、必要になったら修正してよい - VECTOR3_initialize(aocs_manager_.constant_torque_body_Nm, 0.0f); - aocs_manager_.constant_torque_permission = AOCS_MANAGER_CONSTANT_TORQUE_DISABLE; + VECTOR3_copy(aocs_manager_.internal_torque_max_body_Nm, ATTITUDE_CONTROL_PARAMETERS_internal_torque_max_body_Nm); + VECTOR3_copy(aocs_manager_.external_torque_max_body_Nm, ATTITUDE_CONTROL_PARAMETERS_external_torque_max_body_Nm); + VECTOR3_copy(aocs_manager_.constant_torque_body_Nm, ATTITUDE_CONTROL_PARAMETERS_constant_torque_body_Nm); + aocs_manager_.constant_torque_permission = ATTITUDE_CONTROL_PARAMETERS_constant_torque_permission; // 磁気モーメント VECTOR3_initialize(aocs_manager_.mag_moment_target_body_Am2, 0.0f); // MTQ情報 diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index d464ef7c..5a087406 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -80,3 +80,13 @@ const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_thresho const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(0.0f); const float ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain = -1.0e-7f; const APP_UNLOADING_EXEC ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable = APP_UNLOADING_EXEC_DISABLE; + +// Control Torques +const AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION ATTITUDE_CONTROL_PARAMETERS_constant_torque_permission = AOCS_MANAGER_CONSTANT_TORQUE_DISABLE; +const float ATTITUDE_CONTROL_PARAMETERS_constant_torque_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 0.0f, 0.0f, 0.0f }; +const float ATTITUDE_CONTROL_PARAMETERS_internal_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 5.0e-3f, 5.0e-3f, 5.0e-3f }; +const float ATTITUDE_CONTROL_PARAMETERS_external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 3.0e-4f, 3.0e-4f, 3.0e-4f }; + +// Target Setting parameters +const float ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s = PHYSICAL_CONST_degree_to_radian(0.8f); +const float ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); diff --git a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h index 1abcbf47..a139e897 100644 --- a/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/attitude_control_parameters.h @@ -9,6 +9,7 @@ #include #include #include +#include // Bdot extern const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM]; //!< Control gain for B-dot @@ -82,11 +83,20 @@ extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_bod extern const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z; //!< Three Axis Control RW attitude rate gain body Z axis // Unloading - extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s; //!< Unloading upper threshold [rad/s] extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s; //!< Unloading lower threshold [rad/s] extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s; //!< Unloading target [rad/s] extern const float ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain; //!< Unloading gain extern const APP_UNLOADING_EXEC ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable; //!< Unloading execution enable flag +// Control Torques +extern const AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION ATTITUDE_CONTROL_PARAMETERS_constant_torque_permission; //!< Constant torque correction permission +extern const float ATTITUDE_CONTROL_PARAMETERS_constant_torque_body_Nm[PHYSICAL_CONST_THREE_DIM]; //!< Constant torque [Nm] +extern const float ATTITUDE_CONTROL_PARAMETERS_internal_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]; //!< Maximum output torque for internal torque [Nm] +extern const float ATTITUDE_CONTROL_PARAMETERS_external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM]; //!< Maximum output torque for external torque [Nm] + +// Target Setting parameters +extern const float ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s; //!< Limit of angular velocity target error [rad/s] +extern const float ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad; //!< Limit of angle target error [rad] + #endif // ATTITUDE_CONTROL_PARAMETERS_H_ From 51e277263899757112467f3baad60c5147167349 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 12 Jun 2023 20:46:24 +0200 Subject: [PATCH 095/176] Fix comment --- .../SatelliteParameters/Sample/attitude_control_parameters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index 5a087406..0969e92d 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -5,7 +5,7 @@ #include -// Bdor +// Bdot const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM] = { -0.1f, -0.1f, -0.1f }; const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_step_ms = 100; const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms = 1000; From e2e0c2345a368c5563c1c0e85ce6680cf949126e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 12 Jun 2023 21:04:13 +0200 Subject: [PATCH 096/176] Fix comment --- .../UserDefined/AOCS/AttitudeControl/sun_pointing.c | 1 - .../UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c | 2 -- .../SatelliteParameters/Sample/attitude_control_parameters.c | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c index 8c35a697..d1aa6e6a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c @@ -122,7 +122,6 @@ static void APP_SUN_POINTING_init_(void) sun_pointing_.lpf_trq_cutoff_freq_spin_axis_Hz = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_spin_axis_Hz; sun_pointing_.lpf_spin_rate_cutoff_freq_Hz = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz; - // 下記の値はISS軌道を想定した値 (極軌道に近ければ緩めて良いはず) sun_pointing_.mtq_allowable_error_ratio_transient = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_transient; sun_pointing_.correction_gain_transient = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_transient; sun_pointing_.mtq_allowable_error_ratio_stable = ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_stable; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c index 8da9c325..650e026e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c @@ -83,7 +83,6 @@ static void APP_TAC_MTQ_init_(void) gains_omega[1] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y; gains_omega[2] = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z; - // 下記値の変更時は,HW側の出力最大値にかからない様に留意しながら,ゲインと組み合わせて調整すること. three_axis_control_mtq_.max_direct_feedback_angle_mtq_rad = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad; three_axis_control_mtq_.max_direct_feedback_rate_mtq_rad_s = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s; three_axis_control_mtq_.max_integral_angle_mtq_rad = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad; @@ -93,7 +92,6 @@ static void APP_TAC_MTQ_init_(void) three_axis_control_mtq_.mtq_lpf_cutoff_freq_Hz = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz; three_axis_control_mtq_.mtq_lpf_damping_factor = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor; - // 下記の値はISS軌道を想定した値 (極軌道に近ければ緩めて良いはず) three_axis_control_mtq_.allowable_error_ratio_transient = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient; three_axis_control_mtq_.correction_gain_transient = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient; three_axis_control_mtq_.allowable_error_ratio_stable = ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index 0969e92d..e5a3d2d3 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -49,6 +49,7 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_x = const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y = { 2.0f * 2.5e-2f, 0.0f, 0.0f }; const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z = { 1.5f * 2.5e-2f, 0.0f, 0.0f }; // MTQ control settings +// 下記の値はISS軌道を想定した値, 変更時は,HW側の出力最大値にかからない様に留意しながら,ゲインと組み合わせて調整すること. const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(18.0f); const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s = 5.0e-3f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient = 0.6f; @@ -56,7 +57,6 @@ const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient = 0.0f const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable = 0.6f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_stable = 0.1f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad = PHYSICAL_CONST_degree_to_radian(20.0f); - // Integral control setting extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); From e7c0c6b4a0ed0a09ef272bf7b3fb605db77dacfe Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 12 Jun 2023 21:29:11 +0200 Subject: [PATCH 097/176] Add mpu parameter file --- src/src_user/Settings/CMakeLists.txt | 2 +- .../SatelliteParameters/Sample/mpu9250_parameters.c | 7 +++++++ .../Settings/SatelliteParameters/mpu9250_parameters.h | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 81d4e530..59601694 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -52,7 +52,7 @@ set(C2A_SRCS # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c new file mode 100644 index 00000000..65fcdf42 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c @@ -0,0 +1,7 @@ +/** + * @file mpu9250_parameters.c + * @brief MPU9250に関する衛星固有パラメータを管理する + */ + +#include + diff --git a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h new file mode 100644 index 00000000..ed873e4c --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h @@ -0,0 +1,9 @@ +/** + * @file mpu9250_parameters.h + * @brief MPU9250に関する衛星固有パラメータを管理する + */ + +#ifndef MPU9250_PARAMETERS_H_ +#define MPU9250_PARAMETERS_H_ + +#endif // MPU9250_PARAMETERS_H_ From 51aecb9bb972483e09beeaded5863a839cfd6fde Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 13 Jun 2023 20:39:46 +0200 Subject: [PATCH 098/176] Add temperature calibration parameters --- .../Applications/DriverInstances/di_mpu9250.c | 67 +++++++++---------- .../Sample/mpu9250_parameters.c | 15 +++++ .../SatelliteParameters/mpu9250_parameters.h | 24 +++++++ 3 files changed, 71 insertions(+), 35 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_mpu9250.c b/src/src_user/Applications/DriverInstances/di_mpu9250.c index 4d22644b..1082f0da 100644 --- a/src/src_user/Applications/DriverInstances/di_mpu9250.c +++ b/src/src_user/Applications/DriverInstances/di_mpu9250.c @@ -14,6 +14,9 @@ #include "../UserDefined/Power/power_switch_control.h" #include "../../Library/matrix33.h" +// Satellite Parameters +#include "../../Settings/SatelliteParameters/mpu9250_parameters.h" + static void DI_MPU9250_init_(void); static void DI_MPU9250_update_(void); static void DI_MPU9250_temperature_caliblation_(void); @@ -30,8 +33,6 @@ static DS_StreamRecBuffer DI_AK8963_rx_buffer_; static uint8_t DI_MPU9250_rx_buffer_allocation_[DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; static uint8_t DI_AK8963_rx_buffer_allocation_[DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; -static const uint8_t DI_MPU9250_kNumCoeffTempCalib_ = 2; - static uint8_t DI_MPU9250_is_initialized_[MPU9250_IDX_MAX] = { 0 }; //!< 0 = not initialized, 1 = initialized @@ -93,54 +94,50 @@ static void DI_MPU9250_init_(void) Printf("MPU9250: ang_vel_bias set error.\n"); } - float mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { -18417.53f, -30423.31f, 20969.18f }; // 実機計測値 - ret_math = MPU9250_set_mag_bias_compo_nT(&mpu9250_driver_[MPU9250_IDX_ON_AOBC], mag_bias_compo_nT); + ret_math = MPU9250_set_mag_bias_compo_nT(&mpu9250_driver_[MPU9250_IDX_ON_AOBC], MPU9250_PARAMETERS_mag_bias_compo_nT); if (ret_math != C2A_MATH_ERROR_OK) { Printf("MPU9250: mag_bias set error.\n"); } // 温度補正 - const float kRangeLow = -50.0f; // degC - const float kRangeHigh = 50.0f; // degC - float bias_coeff[DI_MPU9250_kNumCoeffTempCalib_]; - float scale_factor_coeff[DI_MPU9250_kNumCoeffTempCalib_]; + const float kRangeLow = MPU9250_PARAMETERS_temperature_range_low_degC; + const float kRangeHigh = MPU9250_PARAMETERS_temperature_range_high_degC; // 切片は実機計測値、切片はOPT-1, RWASATでの測定値を利用 // 特にSFは小さいのでなしとする // SF,バイアスは y = SF*x - BIASという式を想定 // X軸 - bias_coeff[0] = -0.024f; - bias_coeff[1] = 0.0002f; ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_bias_compo_rad_s[0]), - DI_MPU9250_kNumCoeffTempCalib_, bias_coeff, kRangeLow, kRangeHigh); + MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_bias_coeff_compo_x, + kRangeLow, kRangeHigh); if (ret3 < 0) Printf("MPU9250 Gyro-X Bias Temperature Caliblation init Failed ! \n"); - scale_factor_coeff[0] = 1.0f; - scale_factor_coeff[1] = 0.0f; + ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_scale_factor_compo[0]), - DI_MPU9250_kNumCoeffTempCalib_, scale_factor_coeff, kRangeLow, kRangeHigh); - if (ret3 < 0) Printf("MPU9250 Gyro-X SF Temperature Caliblation init Failed ! \n"); + MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_scale_factor_coeff_compo_x, + kRangeLow, kRangeHigh); + if (ret3 < 0) Printf("MPU9250 Gyro-X SF Temperature Calibration init Failed ! \n"); + // Y軸 - bias_coeff[0] = 0.0058f; - bias_coeff[1] = -0.0005f; ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_bias_compo_rad_s[1]), - DI_MPU9250_kNumCoeffTempCalib_, bias_coeff, kRangeLow, kRangeHigh); - if (ret3 < 0) Printf("MPU9250 Gyro-Y Bias Temperature Caliblation init Failed ! \n"); - scale_factor_coeff[0] = 1.0f; - scale_factor_coeff[1] = 0.0f; + MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_bias_coeff_compo_y, + kRangeLow, kRangeHigh); + if (ret3 < 0) Printf("MPU9250 Gyro-Y Bias Temperature Calibration init Failed ! \n"); + ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_scale_factor_compo[1]), - DI_MPU9250_kNumCoeffTempCalib_, scale_factor_coeff, kRangeLow, kRangeHigh); - if (ret3 < 0) Printf("MPU9250 Gyro-Y SF Temperature Caliblation init Failed ! \n"); + MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_scale_factor_coeff_compo_x, + kRangeLow, kRangeHigh); + if (ret3 < 0) Printf("MPU9250 Gyro-Y SF Temperature Calibration init Failed ! \n"); + // Z軸 - bias_coeff[0] = 0.0179f; - bias_coeff[1] = 0.0001f; ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_bias_compo_rad_s[2]), - DI_MPU9250_kNumCoeffTempCalib_, bias_coeff, kRangeLow, kRangeHigh); - if (ret3 < 0) Printf("MPU9250 Gyro-Z Bias Temperature Caliblation init Failed ! \n"); - scale_factor_coeff[0] = 1.0f; - scale_factor_coeff[1] = 0.0f; + MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_bias_coeff_compo_z, + kRangeLow, kRangeHigh); + if (ret3 < 0) Printf("MPU9250 Gyro-Z Bias Temperature Calibration init Failed ! \n"); + ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_scale_factor_compo[2]), - DI_MPU9250_kNumCoeffTempCalib_, scale_factor_coeff, kRangeLow, kRangeHigh); - if (ret3 < 0) Printf("MPU9250 Gyro-Z SF Temperature Caliblation init Failed ! \n"); + MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_scale_factor_coeff_compo_x, + kRangeLow, kRangeHigh); + if (ret3 < 0) Printf("MPU9250 Gyro-Z SF Temperature Calibration init Failed ! \n"); return; } @@ -320,14 +317,14 @@ CCP_CmdRet Cmd_DI_MPU9250_SET_ANG_VEL_BIAS_TEMP_CALIB(const CommonCmdPacket* pac ENDIAN_memcpy(&range_high_degC, param + offset, sizeof(float)); offset += sizeof(float); - float coeff[DI_MPU9250_kNumCoeffTempCalib_]; + float coeff[MPU9250_PARAMETERS_kNumCoeffTempCalib]; ENDIAN_memcpy(&coeff[0], param + offset, sizeof(float)); offset += sizeof(float); ENDIAN_memcpy(&coeff[1], param + offset, sizeof(float)); offset += sizeof(float); int ret = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_bias_compo_rad_s[axis]), - DI_MPU9250_kNumCoeffTempCalib_, coeff, range_low_degC, range_high_degC); + MPU9250_PARAMETERS_kNumCoeffTempCalib, coeff, range_low_degC, range_high_degC); if (ret < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); @@ -350,14 +347,14 @@ CCP_CmdRet Cmd_DI_MPU9250_SET_ANG_VEL_SF_TEMP_CALIB(const CommonCmdPacket* packe ENDIAN_memcpy(&range_high_degC, param + offset, sizeof(float)); offset += sizeof(float); - float coeff[DI_MPU9250_kNumCoeffTempCalib_]; + float coeff[MPU9250_PARAMETERS_kNumCoeffTempCalib]; ENDIAN_memcpy(&coeff[0], param + offset, sizeof(float)); offset += sizeof(float); ENDIAN_memcpy(&coeff[1], param + offset, sizeof(float)); offset += sizeof(float); int ret = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_scale_factor_compo[axis]), - DI_MPU9250_kNumCoeffTempCalib_, coeff, range_low_degC, range_high_degC); + MPU9250_PARAMETERS_kNumCoeffTempCalib, coeff, range_low_degC, range_high_degC); if (ret < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c index 65fcdf42..130683e0 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c @@ -5,3 +5,18 @@ #include +// Communication port + +// Magnetometer bias +const float MPU9250_PARAMETERS_mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { -18417.53f, -30423.31f, 20969.18f }; + +// Gyro Bias and scale factor temperature calibration +const float MPU9250_PARAMETERS_temperature_range_high_degC = 60.0f; +const float MPU9250_PARAMETERS_temperature_range_low_degC = -50.0f; + +const float MPU9250_PARAMETERS_bias_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { -0.024f, 0.0002f }; +const float MPU9250_PARAMETERS_scale_factor_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float MPU9250_PARAMETERS_bias_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 0.0058f, -0.0005f }; +const float MPU9250_PARAMETERS_scale_factor_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float MPU9250_PARAMETERS_bias_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 0.0179f, 0.0001f }; +const float MPU9250_PARAMETERS_scale_factor_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; diff --git a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h index ed873e4c..8c7c9e93 100644 --- a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h @@ -6,4 +6,28 @@ #ifndef MPU9250_PARAMETERS_H_ #define MPU9250_PARAMETERS_H_ +#include +#include +#include + +// Constant value +const uint8_t MPU9250_PARAMETERS_kNumCoeffTempCalib = 2; //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. + +// Communication port + +// Magnetometer bias +extern const float MPU9250_PARAMETERS_mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< Magnetic field observation bias @ component frame [nT] + + +// Gyro Bias and scale factor temperature calibration +extern const float MPU9250_PARAMETERS_temperature_range_high_degC; //!< Temperature range high [degC] +extern const float MPU9250_PARAMETERS_temperature_range_low_degC; //!< Temperature range low [degC] + +extern const float MPU9250_PARAMETERS_bias_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame X axis +extern const float MPU9250_PARAMETERS_scale_factor_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame X axis +extern const float MPU9250_PARAMETERS_bias_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Y axis +extern const float MPU9250_PARAMETERS_scale_factor_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Y axis +extern const float MPU9250_PARAMETERS_bias_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Z axis +extern const float MPU9250_PARAMETERS_scale_factor_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Z axis + #endif // MPU9250_PARAMETERS_H_ From d60cfa26b074f68cbe4735a6cf1d9ff085ff3e49 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 13 Jun 2023 21:20:01 +0200 Subject: [PATCH 099/176] Add filter parameters --- .../SensorFilters/mpu9250_filter.c | 34 ++++++++----------- .../Sample/mpu9250_parameters.c | 21 +++++++++++- .../SatelliteParameters/mpu9250_parameters.h | 24 ++++++++++--- 3 files changed, 55 insertions(+), 24 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c index 522a1b47..2bd015d0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c @@ -11,6 +11,10 @@ #include #include "../../../../DriverInstances/di_mpu9250.h" #include "../../aocs_manager.h" +#include "../../../../../Library/vector3.h" + +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/mpu9250_parameters.h" static Mpu9250Filter mpu9250_filter_; const Mpu9250Filter* const mpu9250_filter = &mpu9250_filter_; @@ -128,10 +132,7 @@ static void APP_MPU9250_FILTER_exec_(void) static int APP_MPU9250_FILTER_init_z_filter_mag_(void) { - // カットオフ周波数は今後調整してもよいが今の時点ではこれで進める - mpu9250_filter_.cut_off_freq_lpf_1st_mag_Hz[0] = 0.5f; - mpu9250_filter_.cut_off_freq_lpf_1st_mag_Hz[1] = 0.5f; - mpu9250_filter_.cut_off_freq_lpf_1st_mag_Hz[2] = 0.5f; + VECTOR3_copy(mpu9250_filter_.cut_off_freq_lpf_1st_mag_Hz, MPU9250_PARAMETERS_mag_cut_off_freq_lpf_1st_Hz); C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) @@ -155,11 +156,7 @@ static int APP_MPU9250_FILTER_init_z_filter_mag_(void) static int APP_MPU9250_FILTER_init_z_filter_gyro_(void) { - // カットオフ周波数は今後調整してもよいが今の時点ではこれで進める - // 広帯域制御を狙う場合にはコマンドなどで要調整 - mpu9250_filter_.cut_off_freq_lpf_1st_gyro_Hz[0] = 0.05f; - mpu9250_filter_.cut_off_freq_lpf_1st_gyro_Hz[1] = 0.05f; - mpu9250_filter_.cut_off_freq_lpf_1st_gyro_Hz[2] = 0.05f; + VECTOR3_copy(mpu9250_filter_.cut_off_freq_lpf_1st_gyro_Hz, MPU9250_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz); C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) @@ -183,13 +180,13 @@ static int APP_MPU9250_FILTER_init_z_filter_gyro_(void) static int APP_MPU9250_FILTER_init_spike_filter_mag_(void) { - // 値は調整してよいが一旦これで進める + for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { - mpu9250_filter_.spike_filter_config_mag[axis_id].count_limit_to_accept = 3; - mpu9250_filter_.spike_filter_config_mag[axis_id].count_limit_to_reject_continued_warning = 60; - mpu9250_filter_.spike_filter_config_mag[axis_id].reject_threshold = 5000.0; // nT - mpu9250_filter_.spike_filter_config_mag[axis_id].amplitude_limit_to_accept_as_step = 1500.0; // nT + mpu9250_filter_.spike_filter_config_mag[axis_id].count_limit_to_accept = MPU9250_PARAMETERS_mag_spike_count_limit_to_accept[axis_id]; + mpu9250_filter_.spike_filter_config_mag[axis_id].count_limit_to_reject_continued_warning = MPU9250_PARAMETERS_mag_spike_count_limit_to_reject_continued_warning[axis_id]; + mpu9250_filter_.spike_filter_config_mag[axis_id].reject_threshold = MPU9250_PARAMETERS_mag_spike_reject_threshold_nT[axis_id]; + mpu9250_filter_.spike_filter_config_mag[axis_id].amplitude_limit_to_accept_as_step = MPU9250_PARAMETERS_mag_spike_amplitude_limit_to_accept_as_step_nT[axis_id]; } C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; @@ -213,13 +210,12 @@ static int APP_MPU9250_FILTER_init_spike_filter_mag_(void) static int APP_MPU9250_FILTER_init_spike_filter_gyro_(void) { - // 値は調整してよいが一旦これで進める for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { - mpu9250_filter_.spike_filter_config_gyro[axis_id].count_limit_to_accept = 3; - mpu9250_filter_.spike_filter_config_gyro[axis_id].count_limit_to_reject_continued_warning = 60; - mpu9250_filter_.spike_filter_config_gyro[axis_id].reject_threshold = 0.01; // rad/s - mpu9250_filter_.spike_filter_config_gyro[axis_id].amplitude_limit_to_accept_as_step = 0.005; // rad/s + mpu9250_filter_.spike_filter_config_gyro[axis_id].count_limit_to_accept = MPU9250_PARAMETERS_gyro_spike_count_limit_to_accept[axis_id]; + mpu9250_filter_.spike_filter_config_gyro[axis_id].count_limit_to_reject_continued_warning = MPU9250_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[axis_id]; + mpu9250_filter_.spike_filter_config_gyro[axis_id].reject_threshold = MPU9250_PARAMETERS_gyro_spike_reject_threshold_rad_s[axis_id]; + mpu9250_filter_.spike_filter_config_gyro[axis_id].amplitude_limit_to_accept_as_step = MPU9250_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[axis_id]; } C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c index 130683e0..fede6c2c 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/mpu9250_parameters.c @@ -8,15 +8,34 @@ // Communication port // Magnetometer bias +// The following parameter should be tuned with magnetic experiment const float MPU9250_PARAMETERS_mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { -18417.53f, -30423.31f, 20969.18f }; // Gyro Bias and scale factor temperature calibration const float MPU9250_PARAMETERS_temperature_range_high_degC = 60.0f; const float MPU9250_PARAMETERS_temperature_range_low_degC = -50.0f; - +// The following parameters should be tuned with temperature experiment results const float MPU9250_PARAMETERS_bias_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { -0.024f, 0.0002f }; const float MPU9250_PARAMETERS_scale_factor_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; const float MPU9250_PARAMETERS_bias_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 0.0058f, -0.0005f }; const float MPU9250_PARAMETERS_scale_factor_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; const float MPU9250_PARAMETERS_bias_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 0.0179f, 0.0001f }; const float MPU9250_PARAMETERS_scale_factor_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; + +// Magnetometer filter +// 1st order Low Pass Filter +const float MPU9250_PARAMETERS_mag_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.5f, 0.5f, 0.5f }; +// Spike filter +const uint8_t MPU9250_PARAMETERS_mag_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t MPU9250_PARAMETERS_mag_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float MPU9250_PARAMETERS_mag_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM] = { 5000.0f, 5000.0f, 5000.0f }; +const float MPU9250_PARAMETERS_mag_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM] = { 1500.0f, 1500.0f, 1500.0f }; + +// Gyro filter +// 1st order Low Pass Filter +const float MPU9250_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.05f, 0.05f, 0.05f }; +// Spike filter +const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float MPU9250_PARAMETERS_gyro_spike_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.01f, 0.01f, 0.01f }; +const float MPU9250_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.005f, 0.005f, 0.005f }; diff --git a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h index 8c7c9e93..dab91022 100644 --- a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h @@ -18,11 +18,9 @@ const uint8_t MPU9250_PARAMETERS_kNumCoeffTempCalib = 2; //!< Number of coeffici // Magnetometer bias extern const float MPU9250_PARAMETERS_mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< Magnetic field observation bias @ component frame [nT] - // Gyro Bias and scale factor temperature calibration -extern const float MPU9250_PARAMETERS_temperature_range_high_degC; //!< Temperature range high [degC] -extern const float MPU9250_PARAMETERS_temperature_range_low_degC; //!< Temperature range low [degC] - +extern const float MPU9250_PARAMETERS_temperature_range_high_degC; //!< Temperature range high [degC] +extern const float MPU9250_PARAMETERS_temperature_range_low_degC; //!< Temperature range low [degC] extern const float MPU9250_PARAMETERS_bias_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame X axis extern const float MPU9250_PARAMETERS_scale_factor_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame X axis extern const float MPU9250_PARAMETERS_bias_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Y axis @@ -30,4 +28,22 @@ extern const float MPU9250_PARAMETERS_scale_factor_coeff_compo_y[MPU9250_PARAMET extern const float MPU9250_PARAMETERS_bias_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Z axis extern const float MPU9250_PARAMETERS_scale_factor_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Z axis +// Magnetometer filter +// 1st order Low Pass Filter +extern const float MPU9250_PARAMETERS_mag_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM]; //!< Cut off frequency for magnetometer filter [Hz] +// Spike filter +extern const uint8_t MPU9250_PARAMETERS_mag_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept +extern const uint8_t MPU9250_PARAMETERS_mag_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning +extern const float MPU9250_PARAMETERS_mag_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold [nT] +extern const float MPU9250_PARAMETERS_mag_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input [nT] + +// Gyro filter +// 1st order Low Pass Filter +extern const float MPU9250_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM]; //!< Cut off frequency for magnetometer filter [Hz] +// Spike filter +extern const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept +extern const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning +extern const float MPU9250_PARAMETERS_gyro_spike_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold [rad/s] +extern const float MPU9250_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input [rad/s] + #endif // MPU9250_PARAMETERS_H_ From 0ab304b47dc73bc784d1cca345aa58ab89f98f26 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 13 Jun 2023 21:54:15 +0200 Subject: [PATCH 100/176] Fix comment --- .../Settings/SatelliteParameters/mpu9250_parameters.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h index dab91022..ea177b68 100644 --- a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h @@ -13,8 +13,6 @@ // Constant value const uint8_t MPU9250_PARAMETERS_kNumCoeffTempCalib = 2; //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. -// Communication port - // Magnetometer bias extern const float MPU9250_PARAMETERS_mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< Magnetic field observation bias @ component frame [nT] @@ -39,7 +37,7 @@ extern const float MPU9250_PARAMETERS_mag_spike_amplitude_limit_to_accept_as_ste // Gyro filter // 1st order Low Pass Filter -extern const float MPU9250_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM]; //!< Cut off frequency for magnetometer filter [Hz] +extern const float MPU9250_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM]; //!< Cut off frequency for gyro filter [Hz] // Spike filter extern const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept extern const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning From 42f3fe635f1adcf39684d6f27bc9db6c3bff860a Mon Sep 17 00:00:00 2001 From: Hiro-0110 Date: Wed, 14 Jun 2023 12:13:15 +0900 Subject: [PATCH 101/176] minor change --- .../TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c index 5d0576eb..9e56ed08 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c @@ -55,7 +55,7 @@ void BCL_load_power_on_nanossoc_d60(void) BCL_tool_prepare_param_uint8(1); // Add BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_RM3100_SET_MAG_BIAS_COMPO_NT); - bc_cycle++; + bc_cycle++; #endif // Enable EL From 5ca177b28a848e3416208ce5f625b613474b2449 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 14 Jun 2023 08:45:13 +0200 Subject: [PATCH 102/176] Fix mis merge --- src/src_user/Settings/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 8adc8d86..137ec4c2 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -48,13 +48,10 @@ set(C2A_SRCS # Satellite Parameters ${C2A_SATELLITE_PARAMETERS_DIR}/orbit_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/structure_parameters.c -<<<<<<< HEAD - # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c -======= ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c ->>>>>>> feature/satellite-parameters # ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c From 3f7ba6a20a03dc34964c54383f8faf8f7b6c7eaf Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 18 Jun 2023 15:07:05 +0200 Subject: [PATCH 103/176] Add user defined I2C address --- src/src_user/Settings/port_config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/src_user/Settings/port_config.h b/src/src_user/Settings/port_config.h index 25662ad3..0092d7b9 100644 --- a/src/src_user/Settings/port_config.h +++ b/src/src_user/Settings/port_config.h @@ -125,4 +125,9 @@ #define I2C_DEVICE_ADDR_INA_RWY (0x48) //!< RW_Y軸用のINA260電流センサ #define I2C_DEVICE_ADDR_INA_RWZ (0x49) //!< RW_Z軸用のINA260電流センサ +// Use user defined I2C address +#ifdef USER_DEFINED_I2C_ADDRESS + #include +#endif + #endif From 6bce5bcf5566320d5dfd87772694250a57a32e2b Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 18 Jun 2023 15:39:08 +0200 Subject: [PATCH 104/176] Fix cache path --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6de3659a..dcd4cf01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: uses: actions/cache@v3 with: key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-aobc/s2e-core/ExtLibraries/**') }} - path: ExtLibraries + path: ./s2e-aobc/s2e-core/ExtLibraries - name: build extlib if: steps.cache-extlib.outputs.cache-hit != 'true' @@ -66,7 +66,7 @@ jobs: working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" - cmake --build . + cmake --build . --clean-first - name: install extlib if: steps.cache-extlib.outputs.cache-hit != 'true' @@ -95,7 +95,7 @@ jobs: run: | cl.exe cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON - cmake --build . + cmake --build . --clean-first build_c2a_with_s2e_linux: name: Build C2A with S2E on Linux @@ -130,6 +130,7 @@ jobs: read -r -a COMPILER <<< "$COMPILER" echo "CC=${COMPILER[0]}" >> "$GITHUB_OUTPUT" echo "CXX=${COMPILER[1]}" >> "$GITHUB_OUTPUT" + - name: install deps run: | # FIXME: temporary install gcc-11 in ubuntu:focal @@ -143,29 +144,33 @@ jobs: else sudo apt-get install -y gcc-multilib g++-multilib fi + - name: show tools version run: | cmake --version ${{ steps.compiler.outputs.CC }} --version ${{ steps.compiler.outputs.CXX }} --version + - name: cache extlib id: cache-extlib uses: actions/cache@v3 with: key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-aobc/s2e-core/ExtLibraries/**') }}-BUILD_64BIT=OFF - path: ExtLibraries + path: ./s2e-aobc/s2e-core/ExtLibraries - name: build extlib if: steps.cache-extlib.outputs.cache-hit != 'true' working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | cmake -DBUILD_64BIT=OFF - cmake --build . + cmake --build . --clean-first + - name: install extlib if: steps.cache-extlib.outputs.cache-hit != 'true' working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | cmake --install . + - name: check extlib working-directory: ./s2e-aobc/ExtLibraries run: | @@ -178,6 +183,7 @@ jobs: ls nrlmsise00/lib* ls nrlmsise00/lib*/libnrlmsise00.a ls nrlmsise00/src + - name: build working-directory: ./s2e-aobc/s2e-aocs-core env: @@ -185,4 +191,4 @@ jobs: CXX: ${{ steps.compiler.outputs.CXX }} run: | cmake . -DBUILD_64BIT=OFF -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON - cmake --build . + cmake --build . --clean-first From a30ae1b91dca9683a199a5fe422ceda579f4bae3 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 19 Jun 2023 09:19:15 +0200 Subject: [PATCH 105/176] Remove indent --- src/src_user/Settings/port_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Settings/port_config.h b/src/src_user/Settings/port_config.h index 0092d7b9..3a639432 100644 --- a/src/src_user/Settings/port_config.h +++ b/src/src_user/Settings/port_config.h @@ -127,7 +127,7 @@ // Use user defined I2C address #ifdef USER_DEFINED_I2C_ADDRESS - #include +#include #endif #endif From 87675c8318f4e0ee47a8cb609ec91b9e958ed3c9 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 19 Jun 2023 20:24:29 +0200 Subject: [PATCH 106/176] Add rm3100 parameters --- .../Applications/DriverInstances/di_rm3100.c | 17 +++---- .../SensorFilters/rm3100_filter.c | 46 +++++++++++-------- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/rm3100_parameters.c | 38 +++++++++++++++ .../SatelliteParameters/rm3100_parameters.h | 41 +++++++++++++++++ 5 files changed, 112 insertions(+), 32 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/rm3100_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/rm3100_parameters.h diff --git a/src/src_user/Applications/DriverInstances/di_rm3100.c b/src/src_user/Applications/DriverInstances/di_rm3100.c index 68ea287b..2d424566 100644 --- a/src/src_user/Applications/DriverInstances/di_rm3100.c +++ b/src/src_user/Applications/DriverInstances/di_rm3100.c @@ -15,6 +15,9 @@ #include "../UserDefined/Power/power_switch_control.h" #include "../../Library/vector3.h" +// Satellite Parameters +#include "../../Settings/SatelliteParameters/rm3100_parameters.h" + static void DI_RM3100_init_(void); static void DI_RM3100_update_(void); @@ -27,8 +30,6 @@ static uint8_t DI_RM3100_rx_buffer_allocation_[RM3100_IDX_MAX][DS_STREAM_REC_BUF static uint8_t DI_RM3100_is_initialized_[RM3100_IDX_MAX] = { 0, 0 }; //!< 0 = not initialized, 1 = initialized -static float DI_RM3100_default_bias_aobc_compo_nT_[PHYSICAL_CONST_THREE_DIM] = { 32808.59f, -79748.68f, 22059.96f }; //!< デフォルトバイアス値 -static float DI_RM3100_default_bias_ext_compo_nT_[PHYSICAL_CONST_THREE_DIM] = { 36824.97f, -4596.48f, -1133.40f }; //!< デフォルトバイアス値 static float DI_RM3100_kBiasDiffMax_nT_ = 20000.0f; //!< 磁気バイアスAddコマンドでトータルバイアスがデフォルト値から離れすぎないようにするためのしきい値 @@ -73,7 +74,7 @@ static void DI_RM3100_init_(void) Printf("RM3100: q_aobc_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_ON_AOBC], DI_RM3100_default_bias_aobc_compo_nT_); + ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_ON_AOBC], RM3100_PARAMETERS_mag_aobc_bias_compo_nT); if (ret != C2A_MATH_ERROR_OK) { Printf("RM3100: mag_aobc_bias set error.\n"); @@ -84,19 +85,13 @@ static void DI_RM3100_init_(void) PORT_CH_I2C_SENSORS, I2C_DEVICE_ADDR_EXT_RM, &DI_RM3100_rx_buffer_[RM3100_IDX_EXTERNAL]); - Quaternion q_ext_c2b; - QUATERNION_make_from_euler_angles(&q_ext_c2b, - PHYSICAL_CONST_degree_to_radian(-90.0f), - PHYSICAL_CONST_degree_to_radian(0.0f), - PHYSICAL_CONST_degree_to_radian(180.0f), - EULER_ANGLE_ROTATION_ORDER_321); - ret = RM3100_set_frame_transform_c2b(&rm3100_driver_[RM3100_IDX_EXTERNAL], q_ext_c2b); + ret = RM3100_set_frame_transform_c2b(&rm3100_driver_[RM3100_IDX_EXTERNAL], RM3100_PARAMETERS_mag_ext_quaternion_c2b); if (ret != C2A_MATH_ERROR_OK) { Printf("RM3100: q_ext_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_EXTERNAL], DI_RM3100_default_bias_ext_compo_nT_); + ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_EXTERNAL], RM3100_PARAMETERS_mag_ext_bias_compo_nT); if (ret != C2A_MATH_ERROR_OK) { Printf("RM3100: mag_ext_bias set error.\n"); diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c index e00b717e..45a77649 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c @@ -20,12 +20,12 @@ static SpikeFilter APP_RM3100_FILTER_spike_[RM3100_IDX_MAX][PHYSICAL_CONST_THREE static void APP_RM3100_FILTER_init_(void); static void APP_RM3100_FILTER_exec_(void); -static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_freq_Hz); +static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_freq_Hz[PHYSICAL_CONST_THREE_DIM]); static int APP_RM3100_FILTER_init_spike_filter_(RM3100_IDX rm3100_id, - uint8_t count_limit_to_accept, - uint8_t count_limit_to_reject_continued_warning, - double reject_threshold_nT, - double amplitude_limit_to_accept_as_step_nT); + uint8_t count_limit_to_accept[PHYSICAL_CONST_THREE_DIM], + uint8_t count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM], + double reject_threshold_nT[PHYSICAL_CONST_THREE_DIM], + double amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]); AppInfo APP_RM3100_FILTER_create_app(void) { @@ -35,30 +35,36 @@ AppInfo APP_RM3100_FILTER_create_app(void) static void APP_RM3100_FILTER_init_(void) { // same sampling frequency is applied to all filters - // (since the frequency must be coincide with the call interval of this apllication) + // (since the frequency must be coincide with the call interval of this application) rm3100_filter_.sampling_freq_Hz = 10.0f; - int z_filter_aobc_init_result = APP_RM3100_FILTER_init_z_filter_(RM3100_IDX_ON_AOBC, 0.5f); + int z_filter_aobc_init_result = APP_RM3100_FILTER_init_z_filter_(RM3100_IDX_ON_AOBC, RM3100_PARAMETERS_mag_aobc_cut_off_freq_lpf_1st_Hz); if (z_filter_aobc_init_result != 0) { Printf("RM3100 on AOBC ZFilter init Failed ! \n"); } - int z_filter_external_init_result = APP_RM3100_FILTER_init_z_filter_(RM3100_IDX_EXTERNAL, 0.5f); + int z_filter_external_init_result = APP_RM3100_FILTER_init_z_filter_(RM3100_IDX_EXTERNAL, RM3100_PARAMETERS_mag_ext_cut_off_freq_lpf_1st_Hz); if (z_filter_external_init_result != 0) { Printf("RM3100 external ZFilter init Failed ! \n"); } int spike_filter_aobc_init_result = APP_RM3100_FILTER_init_spike_filter_(RM3100_IDX_ON_AOBC, - 3, 60, 5000.0, 1500.0); + RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_accept, + RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_reject_continued_warning, + RM3100_PARAMETERS_mag_aobc_spike_reject_threshold_nT, + RM3100_PARAMETERS_mag_aobc_spike_amplitude_limit_to_accept_as_step_nT); if (spike_filter_aobc_init_result != 0) { Printf("RM3100 on AOBC SpikeFilter init Failed ! \n"); } int spike_filter_external_init_result = APP_RM3100_FILTER_init_spike_filter_(RM3100_IDX_EXTERNAL, - 3, 60, 5000.0, 1500.0); + RM3100_PARAMETERS_mag_ext_spike_count_limit_to_accept, + RM3100_PARAMETERS_mag_ext_spike_count_limit_to_reject_continued_warning, + RM3100_PARAMETERS_mag_ext_spike_reject_threshold_nT, + RM3100_PARAMETERS_mag_ext_spike_amplitude_limit_to_accept_as_step_nT); if (spike_filter_external_init_result != 0) { Printf("RM3100 external SpikeFilter init Failed ! \n"); @@ -114,11 +120,11 @@ static void APP_RM3100_FILTER_exec_(void) return; } -static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_freq_Hz) +static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_freq_Hz[PHYSICAL_CONST_THREE_DIM]) { for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { - rm3100_filter_.cut_off_freq_lpf_1st_Hz[rm3100_id][axis_id] = cut_off_freq_Hz; + rm3100_filter_.cut_off_freq_lpf_1st_Hz[rm3100_id][axis_id] = cut_off_freq_Hz[axis_id]; } C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; @@ -144,20 +150,20 @@ static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_ } static int APP_RM3100_FILTER_init_spike_filter_(RM3100_IDX rm3100_id, - uint8_t count_limit_to_accept, - uint8_t count_limit_to_reject_continued_warning, - double reject_threshold_nT, - double amplitude_limit_to_accept_as_step_nT) + uint8_t count_limit_to_accept[PHYSICAL_CONST_THREE_DIM], + uint8_t count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM], + double reject_threshold_nT[PHYSICAL_CONST_THREE_DIM], + double amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]) { for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { rm3100_filter_.spike_filter_config[rm3100_id][axis_id].count_limit_to_accept = - count_limit_to_accept; + count_limit_to_accept[axis_id]; rm3100_filter_.spike_filter_config[rm3100_id][axis_id].count_limit_to_reject_continued_warning = - count_limit_to_reject_continued_warning; - rm3100_filter_.spike_filter_config[rm3100_id][axis_id].reject_threshold = reject_threshold_nT; + count_limit_to_reject_continued_warning[axis_id]; + rm3100_filter_.spike_filter_config[rm3100_id][axis_id].reject_threshold = reject_threshold_nT[axis_id]; rm3100_filter_.spike_filter_config[rm3100_id][axis_id].amplitude_limit_to_accept_as_step = - amplitude_limit_to_accept_as_step_nT; + amplitude_limit_to_accept_as_step_nT[axis_id]; } C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index dd11fec7..78131e7f 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -53,7 +53,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/rm3100_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/rm3100_parameters.c new file mode 100644 index 00000000..7439e422 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/rm3100_parameters.c @@ -0,0 +1,38 @@ +/** + * @file rm3100_parameters.c + * @brief RM3100に関する衛星固有パラメータを管理する + */ + +#include + +// AOBC RM3100 +// Magnetometer bias +// The following parameter should be tuned with magnetic experiment +const float RM3100_PARAMETERS_mag_aobc_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { 32808.59f, -79748.68f, 22059.96f }; + +// Magnetometer filter +// 1st order Low Pass Filter +const float RM3100_PARAMETERS_mag_aobc_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.5f, 0.5f, 0.5f }; +// Spike filter +const uint8_t RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float RM3100_PARAMETERS_mag_aobc_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM] = { 5000.0f, 5000.0f, 5000.0f }; +const float RM3100_PARAMETERS_mag_aobc_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM] = { 1500.0f, 1500.0f, 1500.0f }; + + +// External RM3100 +// Frame conversion +const Quaternion RM3100_PARAMETERS_mag_ext_quaternion_c2b = {-0.707106471, 0.707107127, 0.0f, 0.0f}; + +// Magnetometer bias +// The following parameter should be tuned with magnetic experiment +const float RM3100_PARAMETERS_mag_ext_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { 36824.97f, -4596.48f, -1133.40f }; + +// Magnetometer filter +// 1st order Low Pass Filter +const float RM3100_PARAMETERS_mag_ext_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.5f, 0.5f, 0.5f }; +// Spike filter +const uint8_t RM3100_PARAMETERS_mag_ext_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t RM3100_PARAMETERS_mag_ext_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float RM3100_PARAMETERS_mag_ext_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM] = { 5000.0f, 5000.0f, 5000.0f }; +const float RM3100_PARAMETERS_mag_ext_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM] = { 1500.0f, 1500.0f, 1500.0f }; diff --git a/src/src_user/Settings/SatelliteParameters/rm3100_parameters.h b/src/src_user/Settings/SatelliteParameters/rm3100_parameters.h new file mode 100644 index 00000000..d18ebbcd --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/rm3100_parameters.h @@ -0,0 +1,41 @@ +/** + * @file rm3100_parameters.h + * @brief RM3100に関する衛星固有パラメータを管理する + */ + +#ifndef RM3100_PARAMETERS_H_ +#define RM3100_PARAMETERS_H_ + +#include +#include +#include +#include + +// AOBC RM3100 +// Magnetometer bias +extern const float RM3100_PARAMETERS_mag_aobc_bias_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< Magnetic field observation bias for AOBC RM3100 @ component frame [nT] +// Magnetometer filter +// 1st order Low Pass Filter +extern const float RM3100_PARAMETERS_mag_aobc_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM]; //!< Cut off frequency for magnetometer filter [Hz] +// Spike filter +extern const uint8_t RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept +extern const uint8_t RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning +extern const float RM3100_PARAMETERS_mag_aobc_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold [nT] +extern const float RM3100_PARAMETERS_mag_aobc_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input [nT] + + +// External RM3100 +// Frame conversion +extern const Quaternion RM3100_PARAMETERS_mag_ext_quaternion_c2b; //!< Frame conversion Quaternion from component to body frame +// Magnetometer bias +extern const float RM3100_PARAMETERS_mag_ext_bias_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< Magnetic field observation bias for external RM3100 @ component frame [nT] +// Magnetometer filter +// 1st order Low Pass Filter +extern const float RM3100_PARAMETERS_mag_ext_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM]; //!< Cut off frequency for magnetometer filter [Hz] +// Spike filter +extern const uint8_t RM3100_PARAMETERS_mag_ext_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept +extern const uint8_t RM3100_PARAMETERS_mag_ext_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning +extern const float RM3100_PARAMETERS_mag_ext_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold [nT] +extern const float RM3100_PARAMETERS_mag_ext_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input [nT] + +#endif // RM3100_PARAMETERS_H_ From c205b97ea3231183db950f9bafdcf1239e1aa668 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 19 Jun 2023 20:58:55 +0200 Subject: [PATCH 107/176] Fix --- .../Applications/DriverInstances/di_rm3100.c | 8 +++++-- .../SensorFilters/rm3100_filter.c | 23 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_rm3100.c b/src/src_user/Applications/DriverInstances/di_rm3100.c index 2d424566..5cd13b1e 100644 --- a/src/src_user/Applications/DriverInstances/di_rm3100.c +++ b/src/src_user/Applications/DriverInstances/di_rm3100.c @@ -30,6 +30,8 @@ static uint8_t DI_RM3100_rx_buffer_allocation_[RM3100_IDX_MAX][DS_STREAM_REC_BUF static uint8_t DI_RM3100_is_initialized_[RM3100_IDX_MAX] = { 0, 0 }; //!< 0 = not initialized, 1 = initialized +static float DI_RM3100_default_bias_aobc_compo_nT_[PHYSICAL_CONST_THREE_DIM]; +static float DI_RM3100_default_bias_ext_compo_nT_[PHYSICAL_CONST_THREE_DIM]; static float DI_RM3100_kBiasDiffMax_nT_ = 20000.0f; //!< 磁気バイアスAddコマンドでトータルバイアスがデフォルト値から離れすぎないようにするためのしきい値 @@ -74,7 +76,8 @@ static void DI_RM3100_init_(void) Printf("RM3100: q_aobc_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_ON_AOBC], RM3100_PARAMETERS_mag_aobc_bias_compo_nT); + VECTOR3_copy(DI_RM3100_default_bias_aobc_compo_nT_, RM3100_PARAMETERS_mag_aobc_bias_compo_nT); + ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_ON_AOBC], DI_RM3100_default_bias_aobc_compo_nT_); if (ret != C2A_MATH_ERROR_OK) { Printf("RM3100: mag_aobc_bias set error.\n"); @@ -91,7 +94,8 @@ static void DI_RM3100_init_(void) Printf("RM3100: q_ext_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_EXTERNAL], RM3100_PARAMETERS_mag_ext_bias_compo_nT); + VECTOR3_copy(DI_RM3100_default_bias_ext_compo_nT_, RM3100_PARAMETERS_mag_ext_bias_compo_nT); + ret = RM3100_set_mag_bias_compo_nT(&rm3100_driver_[RM3100_IDX_EXTERNAL], DI_RM3100_default_bias_ext_compo_nT_); if (ret != C2A_MATH_ERROR_OK) { Printf("RM3100: mag_ext_bias set error.\n"); diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c index 45a77649..0c2a3a89 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c @@ -11,6 +11,9 @@ #include #include "../../aocs_manager.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/rm3100_parameters.h" + static Rm3100Filter rm3100_filter_; const Rm3100Filter* const rm3100_filter = &rm3100_filter_; @@ -20,12 +23,12 @@ static SpikeFilter APP_RM3100_FILTER_spike_[RM3100_IDX_MAX][PHYSICAL_CONST_THREE static void APP_RM3100_FILTER_init_(void); static void APP_RM3100_FILTER_exec_(void); -static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_freq_Hz[PHYSICAL_CONST_THREE_DIM]); +static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, const float cut_off_freq_Hz[PHYSICAL_CONST_THREE_DIM]); static int APP_RM3100_FILTER_init_spike_filter_(RM3100_IDX rm3100_id, - uint8_t count_limit_to_accept[PHYSICAL_CONST_THREE_DIM], - uint8_t count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM], - double reject_threshold_nT[PHYSICAL_CONST_THREE_DIM], - double amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]); + const uint8_t count_limit_to_accept[PHYSICAL_CONST_THREE_DIM], + const uint8_t count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM], + const float reject_threshold_nT[PHYSICAL_CONST_THREE_DIM], + const float amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]); AppInfo APP_RM3100_FILTER_create_app(void) { @@ -120,7 +123,7 @@ static void APP_RM3100_FILTER_exec_(void) return; } -static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_freq_Hz[PHYSICAL_CONST_THREE_DIM]) +static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, const float cut_off_freq_Hz[PHYSICAL_CONST_THREE_DIM]) { for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { @@ -150,10 +153,10 @@ static int APP_RM3100_FILTER_init_z_filter_(RM3100_IDX rm3100_id, float cut_off_ } static int APP_RM3100_FILTER_init_spike_filter_(RM3100_IDX rm3100_id, - uint8_t count_limit_to_accept[PHYSICAL_CONST_THREE_DIM], - uint8_t count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM], - double reject_threshold_nT[PHYSICAL_CONST_THREE_DIM], - double amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]) + const uint8_t count_limit_to_accept[PHYSICAL_CONST_THREE_DIM], + const uint8_t count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM], + const float reject_threshold_nT[PHYSICAL_CONST_THREE_DIM], + const float amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM]) { for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { From d8d318f8cc2905602a7feb61de682b972fca8254 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 19 Jun 2023 21:11:51 +0200 Subject: [PATCH 108/176] Add parameter files --- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/nanossoc_d60_parameters.c | 6 ++++++ .../SatelliteParameters/nanossoc_d60_parameters.h | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index dd11fec7..347d42bb 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -54,7 +54,7 @@ set(C2A_SRCS # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c new file mode 100644 index 00000000..0158a6b6 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c @@ -0,0 +1,6 @@ +/** + * @file nanossoc_d60_parameters.c + * @brief nanossoc-D60に関する衛星固有パラメータを管理する + */ + +#include diff --git a/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h new file mode 100644 index 00000000..802f79c1 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h @@ -0,0 +1,11 @@ +/** + * @file nanossoc_d60_parameters.h + * @brief nanossoc-D60に関する衛星固有パラメータを管理する + */ + +#ifndef NANOSSOC_D60_PARAMETERS_H_ +#define NANOSSOC_D60_PARAMETERS_H_ + + + +#endif // NANOSSOC_D60_PARAMETERS_H_ From 0e231d5781d95ff1ca562371bb459b261fd29bb9 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 19 Jun 2023 22:12:26 +0200 Subject: [PATCH 109/176] Add frame conversion parameters --- .../DriverInstances/di_nanossoc_d60.c | 27 +++++-------------- .../Sample/nanossoc_d60_parameters.c | 6 +++++ .../nanossoc_d60_parameters.h | 7 +++++ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c b/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c index 00b10649..192fa907 100644 --- a/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c +++ b/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c @@ -14,6 +14,9 @@ #include "../UserDefined/Power/power_switch_control.h" #include "../../IfWrapper/GPIO.h" +// Satellite Parameters +#include "../../Settings/SatelliteParameters/nanossoc_d60_parameters.h" + static void DI_NANOSSOC_D60_init_(void); static void DI_NANOSSOC_D60_update_(void); static uint8_t DI_NANOSSOC_D60_conv_idx_to_i2c_address_(uint8_t idx); @@ -69,41 +72,25 @@ static void DI_NANOSSOC_D60_init_(void) } C2A_MATH_ERROR ret_math; - Quaternion q_py_c2b; - q_py_c2b = QUATERNION_make_x_rot(PHYSICAL_CONST_degree_to_radian(90.0f)); - ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_PY], q_py_c2b); + ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_PY], NANOSSOC_D60_PARAMETERS_py_quaternion_c2b); if (ret_math != C2A_MATH_ERROR_OK) { Printf("NanoSSOC-D60: q_py_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - Quaternion q_my_c2b; - QUATERNION_make_from_euler_angles(&q_my_c2b, - PHYSICAL_CONST_degree_to_radian(90.0f), - PHYSICAL_CONST_degree_to_radian(0.0f), - PHYSICAL_CONST_degree_to_radian(180.0f), - EULER_ANGLE_ROTATION_ORDER_123); - ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_MY], q_my_c2b); + ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_MY], NANOSSOC_D60_PARAMETERS_my_quaternion_c2b); if (ret_math != C2A_MATH_ERROR_OK) { Printf("NanoSSOC-D60: q_py_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - Quaternion q_pz_c2b; - q_pz_c2b = QUATERNION_make_z_rot(PHYSICAL_CONST_degree_to_radian(90.0f)); - ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_PZ], q_pz_c2b); + ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_PZ], NANOSSOC_D60_PARAMETERS_pz_quaternion_c2b); if (ret_math != C2A_MATH_ERROR_OK) { Printf("NanoSSOC-D60: q_py_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - Quaternion q_mz_c2b; - QUATERNION_make_from_euler_angles(&q_mz_c2b, - PHYSICAL_CONST_degree_to_radian(-90.0f), - PHYSICAL_CONST_degree_to_radian(0.0f), - PHYSICAL_CONST_degree_to_radian(180.0f), - EULER_ANGLE_ROTATION_ORDER_321); - ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_MZ], q_mz_c2b); + ret_math = NANOSSOC_D60_set_frame_transform_c2b(&nanossoc_d60_driver_[NANOSSOC_D60_IDX_ON_MZ], NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b); if (ret_math != C2A_MATH_ERROR_OK) { Printf("NanoSSOC-D60: q_py_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ diff --git a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c index 0158a6b6..5a89ce9e 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c @@ -4,3 +4,9 @@ */ #include + +// Frame conversion +const Quaternion NANOSSOC_D60_PARAMETERS_py_quaternion_c2b = { 0.70710665f, 0.0f, 0.0f, 0.70710665f }; +const Quaternion NANOSSOC_D60_PARAMETERS_my_quaternion_c2b = { 0.0f, -0.70710665f, 0.70710665f, 0.0f }; +const Quaternion NANOSSOC_D60_PARAMETERS_pz_quaternion_c2b = { 0.0f, 0.0f, 0.70710665f, 0.70710665f }; +const Quaternion NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b = { -0.707106471f, 0.707106471f, 0.0f, 0.0f }; diff --git a/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h index 802f79c1..a96d9810 100644 --- a/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h @@ -6,6 +6,13 @@ #ifndef NANOSSOC_D60_PARAMETERS_H_ #define NANOSSOC_D60_PARAMETERS_H_ +#include + +// Frame conversion +extern const Quaternion NANOSSOC_D60_PARAMETERS_py_quaternion_c2b; //!< Frame conversion quaternion for PY sun sensor +extern const Quaternion NANOSSOC_D60_PARAMETERS_my_quaternion_c2b; //!< Frame conversion quaternion for MY sun sensor +extern const Quaternion NANOSSOC_D60_PARAMETERS_pz_quaternion_c2b; //!< Frame conversion quaternion for PZ sun sensor +extern const Quaternion NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b; //!< Frame conversion quaternion for MZ sun sensor #endif // NANOSSOC_D60_PARAMETERS_H_ From 57f8dd35ec7c36b771c60eef1549d79218edc6f1 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 19 Jun 2023 22:20:33 +0200 Subject: [PATCH 110/176] Add SS filter parameters --- .../SensorFilters/nanossoc_d60_filter.c | 11 +++++++---- .../Sample/nanossoc_d60_parameters.c | 6 ++++++ .../SatelliteParameters/nanossoc_d60_parameters.h | 5 +++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c index a14559db..f53c68e1 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c @@ -13,6 +13,9 @@ #include "../../../../../Library/c2a_math.h" #include "../../../../../Library/math_constants.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/nanossoc_d60_parameters.h" + static NanoSsocD60Filter nanossoc_d60_filter_; const NanoSsocD60Filter* const nanossoc_d60_filter = &nanossoc_d60_filter_; @@ -33,10 +36,10 @@ static void APP_NANOSSOC_D60_FILTER_init_(void) VECTOR3_initialize(nanossoc_d60_filter_.sun_vec_est_body, 0.0f); nanossoc_d60_filter_.sun_vec_est_body[2] = 1.0f; // 規格時等にエラーにならない様に,Z軸に1.0fを代入 - nanossoc_d60_filter_.spike_filter_config.count_limit_to_accept = 10; - nanossoc_d60_filter_.spike_filter_config.count_limit_to_reject_continued_warning = 60; - nanossoc_d60_filter_.spike_filter_config.reject_threshold = PHYSICAL_CONST_degree_to_radian(3); - nanossoc_d60_filter_.spike_filter_config.amplitude_limit_to_accept_as_step = PHYSICAL_CONST_degree_to_radian(180); + nanossoc_d60_filter_.spike_filter_config.count_limit_to_accept = NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_accept; + nanossoc_d60_filter_.spike_filter_config.count_limit_to_reject_continued_warning = NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning; + nanossoc_d60_filter_.spike_filter_config.reject_threshold = NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad; + nanossoc_d60_filter_.spike_filter_config.amplitude_limit_to_accept_as_step =NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad; C2A_MATH_ERROR filter_setting_result = SPIKE_FILTER_init(&APP_NANOSSOC_D60_FILTER_spike_, nanossoc_d60_filter_.spike_filter_config); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c index 5a89ce9e..b38f6500 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c @@ -10,3 +10,9 @@ const Quaternion NANOSSOC_D60_PARAMETERS_py_quaternion_c2b = { 0.70710665f, 0.0f const Quaternion NANOSSOC_D60_PARAMETERS_my_quaternion_c2b = { 0.0f, -0.70710665f, 0.70710665f, 0.0f }; const Quaternion NANOSSOC_D60_PARAMETERS_pz_quaternion_c2b = { 0.0f, 0.0f, 0.70710665f, 0.70710665f }; const Quaternion NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b = { -0.707106471f, 0.707106471f, 0.0f, 0.0f }; + +// Spike Filter +uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_accept = 10; +uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning = 60; +float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(3); +float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(180); diff --git a/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h index a96d9810..b75cfeab 100644 --- a/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h @@ -14,5 +14,10 @@ extern const Quaternion NANOSSOC_D60_PARAMETERS_my_quaternion_c2b; //!< Frame c extern const Quaternion NANOSSOC_D60_PARAMETERS_pz_quaternion_c2b; //!< Frame conversion quaternion for PZ sun sensor extern const Quaternion NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b; //!< Frame conversion quaternion for MZ sun sensor +// Spike Filter +extern uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_accept; //!< Count limit to accept +extern uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning; //!< Count limit to reject continued warning +extern float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad; //!< Reject threshold [rad] +extern float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad; //!< Amplitude limit to accept as step input [rad] #endif // NANOSSOC_D60_PARAMETERS_H_ From 3fdaff51722280afb070249eeee26acee31f0b69 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 19 Jun 2023 22:25:06 +0200 Subject: [PATCH 111/176] Add intensity threshold --- .../SensorSelectors/sun_sensor_selector.c | 7 +++++-- .../SatelliteParameters/Sample/nanossoc_d60_parameters.c | 4 ++++ .../Settings/SatelliteParameters/nanossoc_d60_parameters.h | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c index 013f1b7b..4ff954ae 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c @@ -12,6 +12,9 @@ #include "../../../../DriverInstances/di_nanossoc_d60.h" #include "../../aocs_manager.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/nanossoc_d60_parameters.h" + static SunSensorSelector sun_sensor_selector_; const SunSensorSelector* const sun_sensor_selector = &sun_sensor_selector_; @@ -43,8 +46,8 @@ AppInfo APP_SS_SELECTOR_create_app(void) static void APP_SS_SELECTOR_init_(void) { - sun_sensor_selector_.sun_intensity_lower_threshold_percent = 80.0; - sun_sensor_selector_.sun_intensity_upper_threshold_percent = 120.0; + sun_sensor_selector_.sun_intensity_lower_threshold_percent = NANOSSOC_D60_PARAMETERS_sun_intensity_lower_threshold_percent; + sun_sensor_selector_.sun_intensity_upper_threshold_percent = NANOSSOC_D60_PARAMETERS_sun_intensity_upper_threshold_percent; for (int idx = 0; idx < NANOSSOC_D60_IDX_MAX; idx++) { APP_SS_SELECTOR_available_sun_sensor_list_[idx] = NANOSSOC_D60_IDX_MAX; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c index b38f6500..72d17df6 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c @@ -16,3 +16,7 @@ uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_accept = 10; uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning = 60; float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(3); float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(180); + +// Sun intensity threshold +float NANOSSOC_D60_PARAMETERS_sun_intensity_lower_threshold_percent = 80.0f; +float NANOSSOC_D60_PARAMETERS_sun_intensity_upper_threshold_percent = 120.0f; diff --git a/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h index b75cfeab..544b4344 100644 --- a/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/nanossoc_d60_parameters.h @@ -20,4 +20,8 @@ extern uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject extern float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad; //!< Reject threshold [rad] extern float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad; //!< Amplitude limit to accept as step input [rad] +// Sun intensity threshold +extern float NANOSSOC_D60_PARAMETERS_sun_intensity_lower_threshold_percent; //!< Sun intensity lower threshold [%] +extern float NANOSSOC_D60_PARAMETERS_sun_intensity_upper_threshold_percent; //!< Sun intensity upper threshold [%] + #endif // NANOSSOC_D60_PARAMETERS_H_ From 443ff3fe6836781325c83d520162d61967951949 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 21 Jun 2023 20:25:10 +0200 Subject: [PATCH 112/176] Add FDIR parameter files --- src/src_user/Settings/CMakeLists.txt | 2 +- .../SatelliteParameters/Sample/fdir_parameters.c | 6 ++++++ .../Settings/SatelliteParameters/fdir_parameters.h | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/fdir_parameters.h diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index dd11fec7..e766e7ef 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -51,7 +51,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_target_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c new file mode 100644 index 00000000..e3a41826 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -0,0 +1,6 @@ +/** + * @file fdir_parameters.c + * @brief FDIRに関する衛星固有パラメータを管理する + */ + +#include diff --git a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h new file mode 100644 index 00000000..3365b2a2 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h @@ -0,0 +1,11 @@ +/** + * @file structure_parameters.h + * @brief 衛星構造に関する衛星固有パラメータを管理する + */ + +#ifndef FDIR_PARAMETERS_H_ +#define FDIR_PARAMETERS_H_ + +#include + +#endif // FDIR_PARAMETERS_H_ From ff9717e1ed24bfb813a4a4e0cb250412b8d82588 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 21 Jun 2023 21:11:26 +0200 Subject: [PATCH 113/176] Add FDIR application parameters --- .../SensorMonitors/current_anomaly.c | 45 +++++++++--------- .../UserDefined/AOCS/aocs_mode_manager.c | 23 ++++++---- .../Sample/fdir_parameters.c | 41 +++++++++++++++++ .../SatelliteParameters/fdir_parameters.h | 46 +++++++++++++++++++ 4 files changed, 124 insertions(+), 31 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c index c8ad8146..e9d19ddb 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c @@ -10,6 +10,9 @@ #include #include "../../../Power/power_switch_control.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/fdir_parameters.h" + static CurrentAnomaly current_anomaly_; const CurrentAnomaly* const current_anomaly = ¤t_anomaly_; @@ -30,27 +33,27 @@ AppInfo APP_CURRENT_ANOMALY_create_app(void) static void APP_CURRENT_ANOMALY_init_(void) { - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_PIC] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_STIM210] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_SAGITTA] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_OEM7600] = 1.0; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RM3100] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_NANOSSOC_D60] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_MTQ] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RW0003_X] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RW0003_Y] = 0.5; - current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RW0003_Z] = 0.5; - - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_PIC] = 200; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_STIM210] = 1000; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_SAGITTA] = 500; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_OEM7600] = 1000; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RM3100] = 200; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_NANOSSOC_D60] = 150; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_MTQ] = 2000; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RW0003_X] = 2000; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RW0003_Y] = 2000; - current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RW0003_Z] = 2000; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_PIC] = FDIR_PARAMETERS_hw_oc_detection_threshold_pic_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_STIM210] = FDIR_PARAMETERS_hw_oc_detection_threshold_stim210_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_SAGITTA] = FDIR_PARAMETERS_hw_oc_detection_threshold_sagitta_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_OEM7600] = FDIR_PARAMETERS_hw_oc_detection_threshold_oem7600_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RM3100] = FDIR_PARAMETERS_hw_oc_detection_threshold_rm3100_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_NANOSSOC_D60] = FDIR_PARAMETERS_hw_oc_detection_threshold_nanossoc_d60_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_MTQ] = FDIR_PARAMETERS_hw_oc_detection_threshold_mtq_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RW0003_X] = FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_x_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RW0003_Y] = FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_y_V; + current_anomaly_.hw_oc_event_logger_threshold_V[INA260_IDX_RW0003_Z] = FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_z_V; + + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_PIC] = FDIR_PARAMETERS_sw_oc_threshold_pic_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_STIM210] = FDIR_PARAMETERS_sw_oc_threshold_stim210_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_SAGITTA] = FDIR_PARAMETERS_sw_oc_threshold_sagitta_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_OEM7600] = FDIR_PARAMETERS_sw_oc_threshold_oem7600_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RM3100] = FDIR_PARAMETERS_sw_oc_threshold_rm3100_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_NANOSSOC_D60] = FDIR_PARAMETERS_sw_oc_threshold_nanossoc_d60_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_MTQ] = FDIR_PARAMETERS_sw_oc_threshold_mtq_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RW0003_X] = FDIR_PARAMETERS_sw_oc_threshold_rw0003_x_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RW0003_Y] = FDIR_PARAMETERS_sw_oc_threshold_rw0003_y_mA; + current_anomaly_.sw_oc_threshold_mA[INA260_IDX_RW0003_Z] = FDIR_PARAMETERS_sw_oc_threshold_rw0003_z_mA; return; } diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c index f18176d8..e06d11a3 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c @@ -18,6 +18,9 @@ #include "../../../Library/physical_constants.h" #include "../../../Library/math_constants.h" +// SatelliteParameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + // #define APP_AOCS_MM_TEST_WITH_S2E //!< S2Eでテストするときにコメントを外すと実行後Bdotモードに遷移する #ifdef SILS_FW #ifdef APP_AOCS_MM_TEST_WITH_S2E @@ -93,21 +96,21 @@ static void APP_AOCS_MM_init_(void) aocs_mode_manager_.bdot_retry_count = 0; aocs_mode_manager_.is_control_error_small = 0; - aocs_mode_manager_.ang_vel_conv_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); - aocs_mode_manager_.ang_vel_conv_time_limit_s = 5.0f * 60.0f; + aocs_mode_manager_.ang_vel_conv_limit_rad_s = FDIR_PARAMETERS_ang_vel_conv_limit_rad_s; + aocs_mode_manager_.ang_vel_conv_time_limit_s = FDIR_PARAMETERS_ang_vel_conv_time_limit_s; - aocs_mode_manager_.ang_vel_norm_increase_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); - aocs_mode_manager_.ang_vel_anomaly_detection_period_s = 200.0f; + aocs_mode_manager_.ang_vel_norm_increase_limit_rad_s = FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s; + aocs_mode_manager_.ang_vel_anomaly_detection_period_s = FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s; - aocs_mode_manager_.sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); - aocs_mode_manager_.sun_angle_div_time_limit_s = 50.0f * 60.0f; + aocs_mode_manager_.sun_angle_div_limit_rad = FDIR_PARAMETERS_sun_angle_div_limit_rad; + aocs_mode_manager_.sun_angle_div_time_limit_s = FDIR_PARAMETERS_sun_angle_div_time_limit_s; // Rough MTQを想定して初期値は大きめに設定、各モード遷移時に適切に設定することを想定 - aocs_mode_manager_.three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); - aocs_mode_manager_.three_axis_div_time_limit_s = 5.0f * 60.0f; + aocs_mode_manager_.three_axis_div_limit_rad = FDIR_PARAMETERS_three_axis_div_limit_rad; + aocs_mode_manager_.three_axis_div_time_limit_s = FDIR_PARAMETERS_three_axis_div_time_limit_s; - aocs_mode_manager_.sun_invisible_time_limit_s = 50.0f * 60.0f; - aocs_mode_manager_.stt_invisible_time_limit_s = 10.0f * 60.0f; + aocs_mode_manager_.sun_invisible_time_limit_s = FDIR_PARAMETERS_sun_invisible_time_limit_s; + aocs_mode_manager_.stt_invisible_time_limit_s = FDIR_PARAMETERS_stt_invisible_time_limit_s; return; } diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c index e3a41826..e5d5cd1e 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -4,3 +4,44 @@ */ #include + +// Mode Manager +const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s = 5.0f * 60.0f; + +const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s = 200.0f; + +const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); +const float FDIR_PARAMETERS_sun_angle_div_time_limit_s = 50.0f * 60.0f; + +const float FDIR_PARAMETERS_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float FDIR_PARAMETERS_three_axis_div_time_limit_s = 5.0f * 60.0f; + +const float FDIR_PARAMETERS_sun_invisible_time_limit_s = 50.0f * 60.0f; +const float FDIR_PARAMETERS_stt_invisible_time_limit_s = 10.0f * 60.0f; + +// S/W over current detection +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_pic_mA = 200; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_stim210_mA = 1000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_sagitta_mA = 500; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_oem7600_mA = 1000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rm3100_mA = 200; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_nanossoc_d60_mA = 150; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_mtq_mA = 2000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_x_mA = 2000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_y_mA = 2000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_z_mA = 2000; + +// H/W over current detection +// If the measured voltage is smaller than the following values, we assume that the H/W OC protection was executed by the INA260. +const float FDIR_PARAMETERS_hw_oc_detection_threshold_pic_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_stim210_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_sagitta_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_oem7600_V = 1.0f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rm3100_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_nanossoc_d60_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_mtq_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_x_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_y_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_z_V = 0.5f; \ No newline at end of file diff --git a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h index 3365b2a2..74dc515e 100644 --- a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h @@ -7,5 +7,51 @@ #define FDIR_PARAMETERS_H_ #include +#include + +// Mode Manager +extern const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s; //!< Angular velocity convergence detection limit [rad/s] +extern const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s; //!< Angular velocity convergence detection time limit [s] + +extern const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s; //!< Angular velocity increase anomaly detection limit [rad/s] +extern const float FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s; //!< Angular velocity anomaly detection period [s] + +extern const float FDIR_PARAMETERS_sun_angle_div_limit_rad; //!< Sun pointing divergence detection limit [rad] +extern const float FDIR_PARAMETERS_sun_angle_div_time_limit_s; //!< Sun pointing divergence detection time limit [s] + +extern const float FDIR_PARAMETERS_three_axis_div_limit_rad; //!< Three axis control divergence detection limit [rad] +extern const float FDIR_PARAMETERS_three_axis_div_time_limit_s; //!< Three axis control divergence detection time limit [s] + +extern const float FDIR_PARAMETERS_sun_invisible_time_limit_s; //!< Sun invisible anomaly detection time limit [s] +extern const float FDIR_PARAMETERS_stt_invisible_time_limit_s; //!< STT invisible anomaly detection time limit [s] + +// S/W over current detection +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_pic_mA; //!< S/W over current detection threshold for PIC [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_stim210_mA; //!< S/W over current detection threshold for STIM210 [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_sagitta_mA; //!< S/W over current detection threshold for SAGITTA [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_oem7600_mA; //!< S/W over current detection threshold for OEM7600 [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rm3100_mA; //!< S/W over current detection threshold for RM3100 [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_nanossoc_d60_mA; //!< S/W over current detection threshold for nanoSSOC D60 [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_mtq_mA; //!< S/W over current detection threshold for MTQ [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_x_mA; //!< S/W over current detection threshold for RW003 X-axis [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_y_mA; //!< S/W over current detection threshold for RW003 Y-axis [mA] +extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_z_mA; //!< S/W over current detection threshold for RW003 Z-axis [mA] + +// H/W over current detection +// If the measured voltage is smaller than the following values, we assume that the H/W OC protection was executed by the INA260. +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_pic_V; //!< H/W over current detection threshold for PIC [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_stim210_V; //!< H/W over current detection threshold for STIM210 [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_sagitta_V; //!< H/W over current detection threshold for SAGITTA [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_oem7600_V; //!< H/W over current detection threshold for OEM7600 [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_rm3100_V; //!< H/W over current detection threshold for RM3100 [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_nanossoc_d60_V; //!< H/W over current detection threshold for nanoSSOC D60 [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_mtq_V; //!< H/W over current detection threshold for MTQ [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_x_V; //!< H/W over current detection threshold for RW003 X-axis [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_y_V; //!< H/W over current detection threshold for RW003 Y-axis [V] +extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_z_V; //!< H/W over current detection threshold for RW003 Z-axis [V] + + +// Temperature anomaly +// TBI #endif // FDIR_PARAMETERS_H_ From 733ee54f4e188b086fe2d7fba7d5326e4a4f6370 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 21 Jun 2023 22:01:37 +0200 Subject: [PATCH 114/176] Add oc eh rule settings --- .../Sample/fdir_parameters.c | 90 ++++++++++++++++++- .../SatelliteParameters/fdir_parameters.h | 89 +++++++++++++++++- .../event_handler_rule_hw_oc.c | 75 ++++++++-------- .../event_handler_rule_sw_oc.c | 75 ++++++++-------- 4 files changed, 255 insertions(+), 74 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c index e5d5cd1e..7ed35009 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -32,6 +32,50 @@ const uint16_t FDIR_PARAMETERS_sw_oc_threshold_mtq_mA = 2000; const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_x_mA = 2000; const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_y_mA = 2000; const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_z_mA = 2000; +// Event handler settings +// STIM210 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_stim210 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_stim210_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_stim210 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_stim210_ms = 0; +// Sagitta +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_sagitta = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_sagitta_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_sagitta = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_sagitta_ms = 0; +// OEM7600 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_oem7600 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_oem7600_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_oem7600 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_oem7600_ms = 0; +// RM3100 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rm3100 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rm3100_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rm3100 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rm3100_ms = 0; +// nanoSSOC D60 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_nanossoc_d60 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_nanossoc_d60_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_nanossoc_d60 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_nanossoc_d60_ms = 0; +// MTQ +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_mtq = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_mtq_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_mtq = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_mtq_ms = 0; +// RW +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_x = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_x_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_x = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_x_ms = 0; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_y = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_y_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_y = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_y_ms = 0; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_z = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_z_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_z = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_z_ms = 0; // H/W over current detection // If the measured voltage is smaller than the following values, we assume that the H/W OC protection was executed by the INA260. @@ -44,4 +88,48 @@ const float FDIR_PARAMETERS_hw_oc_detection_threshold_nanossoc_d60_V = 0.5f; const float FDIR_PARAMETERS_hw_oc_detection_threshold_mtq_V = 0.5f; const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_x_V = 0.5f; const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_y_V = 0.5f; -const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_z_V = 0.5f; \ No newline at end of file +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_z_V = 0.5f; +// Event handler settings +// STIM210 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_stim210 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_stim210_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_stim210 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_stim210_ms = 0; +// Sagitta +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_sagitta = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_sagitta_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_sagitta = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_sagitta_ms = 0; +// OEM7600 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_oem7600 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_oem7600_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_oem7600 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_oem7600_ms = 0; +// RM3100 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rm3100 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rm3100_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rm3100 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rm3100_ms = 0; +// nanoSSOC D60 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_nanossoc_d60 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_nanossoc_d60_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_nanossoc_d60 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_nanossoc_d60_ms = 0; +// MTQ +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_mtq = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_mtq_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_mtq = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_mtq_ms = 0; +// RW +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_x = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_x_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_x = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_x_ms = 0; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_y = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_y_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_y = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_y_ms = 0; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_z = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_z_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_z = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_z_ms = 0; diff --git a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h index 74dc515e..0e0fea98 100644 --- a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h @@ -36,6 +36,50 @@ extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_mtq_mA; //!< S/W extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_x_mA; //!< S/W over current detection threshold for RW003 X-axis [mA] extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_y_mA; //!< S/W over current detection threshold for RW003 Y-axis [mA] extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_z_mA; //!< S/W over current detection threshold for RW003 Z-axis [mA] +// Event handler settings +// STIM210 +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_stim210; //!< S/W over current detection event handler reset count threshold for STIM210 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_stim210_ms; //!< S/W over current detection event handler reset time threshold for STIM210 [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_stim210; //!< S/W over current detection event handler power off count threshold for STIM210 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_stim210_ms; //!< S/W over current detection event handler power off time threshold for STIM210 [ms] +// Sagitta +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_sagitta; //!< S/W over current detection event handler reset count threshold for SAGITTA +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_sagitta_ms; //!< S/W over current detection event handler reset time threshold for SAGITTA [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_sagitta; //!< S/W over current detection event handler power off count threshold for SAGITTA +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_sagitta_ms; //!< S/W over current detection event handler power off time threshold for SAGITTA [ms] +// OEM7600 +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_oem7600; //!< S/W over current detection event handler reset count threshold for OEM7600 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_oem7600_ms; //!< S/W over current detection event handler reset time threshold for OEM7600 [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_oem7600; //!< S/W over current detection event handler power off count threshold for OEM7600 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_oem7600_ms; //!< S/W over current detection event handler power off time threshold for OEM7600 [ms] +// RM3100 +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rm3100; //!< S/W over current detection event handler reset count threshold for RM3100 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rm3100_ms; //!< S/W over current detection event handler reset time threshold for RM3100 [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rm3100; //!< S/W over current detection event handler power off count threshold for RM3100 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rm3100_ms; //!< S/W over current detection event handler power off time threshold for RM3100 [ms] +// nanoSSOC D60 +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_nanossoc_d60; //!< S/W over current detection event handler reset count threshold for nanoSSOC D60 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_nanossoc_d60_ms; //!< S/W over current detection event handler reset time threshold for nanoSSOC D60 [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_nanossoc_d60; //!< S/W over current detection event handler power off count threshold for nanoSSOC D60 +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_nanossoc_d60_ms; //!< S/W over current detection event handler power off time threshold for nanoSSOC D60 [ms] +// MTQ +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_mtq; //!< S/W over current detection event handler reset count threshold for MTQ +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_mtq_ms; //!< S/W over current detection event handler reset time threshold for MTQ [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_mtq; //!< S/W over current detection event handler power off count threshold for MTQ +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_mtq_ms; //!< S/W over current detection event handler power off time threshold for MTQ [ms] +// RW +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_x; //!< S/W over current detection event handler reset count threshold for RW0003 X +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_x_ms; //!< S/W over current detection event handler reset time threshold for RW0003 X [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_x; //!< S/W over current detection event handler power off count threshold for RW0003 X +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_x_ms; //!< S/W over current detection event handler power off time threshold for RW0003 X [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_y; //!< S/W over current detection event handler reset count threshold for RW0003 Y +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_y_ms; //!< S/W over current detection event handler reset time threshold for RW0003 Y [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_y; //!< S/W over current detection event handler power off count threshold for RW0003 Y +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_y_ms; //!< S/W over current detection event handler power off time threshold for RW0003 Y [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_z; //!< S/W over current detection event handler reset count threshold for RW0003 Z +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_z_ms; //!< S/W over current detection event handler reset time threshold for RW0003 Z [ms] +extern const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_z; //!< S/W over current detection event handler power off count threshold for RW0003 Z +extern const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_z_ms; //!< S/W over current detection event handler power off time threshold for RW0003 Z [ms] // H/W over current detection // If the measured voltage is smaller than the following values, we assume that the H/W OC protection was executed by the INA260. @@ -49,7 +93,50 @@ extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_mtq_V; //! extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_x_V; //!< H/W over current detection threshold for RW003 X-axis [V] extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_y_V; //!< H/W over current detection threshold for RW003 Y-axis [V] extern const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_z_V; //!< H/W over current detection threshold for RW003 Z-axis [V] - +// Event handler settings +// STIM210 +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_stim210; //!< H/W over current detection event handler reset count threshold for STIM210 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_stim210_ms; //!< H/W over current detection event handler reset time threshold for STIM210 [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_stim210; //!< H/W over current detection event handler power off count threshold for STIM210 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_stim210_ms; //!< H/W over current detection event handler power off time threshold for STIM210 [ms] +// Sagitta +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_sagitta; //!< H/W over current detection event handler reset count threshold for SAGITTA +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_sagitta_ms; //!< H/W over current detection event handler reset time threshold for SAGITTA [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_sagitta; //!< H/W over current detection event handler power off count threshold for SAGITTA +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_sagitta_ms; //!< H/W over current detection event handler power off time threshold for SAGITTA [ms] +// OEM7600 +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_oem7600; //!< H/W over current detection event handler reset count threshold for OEM7600 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_oem7600_ms; //!< H/W over current detection event handler reset time threshold for OEM7600 [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_oem7600; //!< H/W over current detection event handler power off count threshold for OEM7600 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_oem7600_ms; //!< H/W over current detection event handler power off time threshold for OEM7600 [ms] +// RM3100 +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rm3100; //!< H/W over current detection event handler reset count threshold for RM3100 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rm3100_ms; //!< H/W over current detection event handler reset time threshold for RM3100 [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rm3100; //!< H/W over current detection event handler power off count threshold for RM3100 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rm3100_ms; //!< H/W over current detection event handler power off time threshold for RM3100 [ms] +// nanoSSOC D60 +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_nanossoc_d60; //!< H/W over current detection event handler reset count threshold for nanoSSOC D60 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_nanossoc_d60_ms; //!< H/W over current detection event handler reset time threshold for nanoSSOC D60 [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_nanossoc_d60; //!< H/W over current detection event handler power off count threshold for nanoSSOC D60 +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_nanossoc_d60_ms; //!< H/W over current detection event handler power off time threshold for nanoSSOC D60 [ms] +// MTQ +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_mtq; //!< H/W over current detection event handler reset count threshold for MTQ +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_mtq_ms; //!< H/W over current detection event handler reset time threshold for MTQ [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_mtq; //!< H/W over current detection event handler power off count threshold for MTQ +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_mtq_ms; //!< H/W over current detection event handler power off time threshold for MTQ [ms] +// RW +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_x; //!< H/W over current detection event handler reset count threshold for RW0003 X +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_x_ms; //!< H/W over current detection event handler reset time threshold for RW0003 X [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_x; //!< H/W over current detection event handler power off count threshold for RW0003 X +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_x_ms; //!< H/W over current detection event handler power off time threshold for RW0003 X [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_y; //!< H/W over current detection event handler reset count threshold for RW0003 Y +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_y_ms; //!< H/W over current detection event handler reset time threshold for RW0003 Y [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_y; //!< H/W over current detection event handler power off count threshold for RW0003 Y +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_y_ms; //!< H/W over current detection event handler power off time threshold for RW0003 Y [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_z; //!< H/W over current detection event handler reset count threshold for RW0003 Z +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_z_ms; //!< H/W over current detection event handler reset time threshold for RW0003 Z [ms] +extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_z; //!< H/W over current detection event handler power off count threshold for RW0003 Z +extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_z_ms; //!< H/W over current detection event handler power off time threshold for RW0003 Z [ms] // Temperature anomaly // TBI diff --git a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c index 3e1e09d8..f9425f1a 100644 --- a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c +++ b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c @@ -9,6 +9,9 @@ #include "../event_logger_group.h" #include "../../../Applications/DriverInstances/di_ina260.h" +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + void EH_load_rule_hw_oc(void) { EH_RuleSettings settings; @@ -18,8 +21,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_stim210_ms; settings.deploy_bct_id = BC_RESET_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_STIM210, &settings); @@ -30,8 +33,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_stim210_ms; settings.deploy_bct_id = BC_POWER_OFF_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_STIM210_BROKEN, &settings); @@ -41,8 +44,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_sagitta; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_sagitta_ms; settings.deploy_bct_id = BC_RESET_SAGITTA; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_SAGITTA, &settings); @@ -53,8 +56,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_sagitta; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_sagitta_ms; settings.deploy_bct_id = BC_POWER_OFF_SAGITTA; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_SAGITTA_BROKEN, &settings); @@ -64,8 +67,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_oem7600; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_oem7600_ms; settings.deploy_bct_id = BC_RESET_OEM7600; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_OEM7600, &settings); @@ -76,8 +79,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_oem7600; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_oem7600_ms; settings.deploy_bct_id = BC_POWER_OFF_OEM7600; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_OEM7600_BROKEN, &settings); @@ -87,8 +90,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_RESET_RM3100; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RM3100, &settings); @@ -99,8 +102,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_POWER_OFF_RM3100; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RM3100_BROKEN, &settings); @@ -110,8 +113,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms =FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_NANOSSOC_D60, &settings); @@ -122,8 +125,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_POWER_OFF_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_NANOSSOC_D60_BROKEN, &settings); @@ -133,8 +136,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_mtq; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_mtq_ms; settings.deploy_bct_id = BC_RESET_MTQ; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_MTQ, &settings); @@ -145,8 +148,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_mtq; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_mtq_ms; settings.deploy_bct_id = BC_POWER_OFF_MTQ; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_MTQ_BROKEN, &settings); @@ -156,8 +159,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_x; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_x_ms; settings.deploy_bct_id = BC_RESET_RWX; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RW0003X, &settings); @@ -168,8 +171,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_x; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_x_ms; settings.deploy_bct_id = BC_POWER_OFF_RWX; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RW0003X_BROKEN, &settings); @@ -179,8 +182,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_y; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_y_ms; settings.deploy_bct_id = BC_RESET_RWY; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RW0003Y, &settings); @@ -191,8 +194,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_y; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_y_ms; settings.deploy_bct_id = BC_POWER_OFF_RWY; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RW0003Y_BROKEN, &settings); @@ -202,8 +205,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_z; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_z_ms; settings.deploy_bct_id = BC_RESET_RWZ; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RW0003Z, &settings); @@ -214,8 +217,8 @@ void EH_load_rule_hw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_z; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_z_ms; settings.deploy_bct_id = BC_POWER_OFF_RWZ; settings.is_active = 0; EH_register_rule(EH_RULE_HW_OC_RW0003Z_BROKEN, &settings); diff --git a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c index 51153f39..e4441c00 100644 --- a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c +++ b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c @@ -9,6 +9,9 @@ #include "../event_logger_group.h" #include "../../../Applications/DriverInstances/di_ina260.h" +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + void EH_load_rule_sw_oc(void) { EH_RuleSettings settings; @@ -18,8 +21,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_stim210_ms; settings.deploy_bct_id = BC_RESET_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_STIM210, &settings); @@ -30,8 +33,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_stim210_ms; settings.deploy_bct_id = BC_POWER_OFF_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_STIM210_BROKEN, &settings); @@ -41,8 +44,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_sagitta; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_sagitta_ms; settings.deploy_bct_id = BC_RESET_SAGITTA; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_SAGITTA, &settings); @@ -53,8 +56,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_sagitta; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_sagitta_ms; settings.deploy_bct_id = BC_POWER_OFF_SAGITTA; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_SAGITTA_BROKEN, &settings); @@ -64,8 +67,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_oem7600; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_oem7600_ms; settings.deploy_bct_id = BC_RESET_OEM7600; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_OEM7600, &settings); @@ -76,8 +79,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_oem7600; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_oem7600_ms; settings.deploy_bct_id = BC_POWER_OFF_OEM7600; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_OEM7600_BROKEN, &settings); @@ -87,8 +90,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_RESET_RM3100; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RM3100, &settings); @@ -99,8 +102,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_POWER_OFF_RM3100; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RM3100_BROKEN, &settings); @@ -110,8 +113,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms =FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_NANOSSOC_D60, &settings); @@ -122,8 +125,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_POWER_OFF_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_NANOSSOC_D60_BROKEN, &settings); @@ -133,8 +136,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_mtq; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_mtq_ms; settings.deploy_bct_id = BC_RESET_MTQ; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_MTQ, &settings); @@ -145,8 +148,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_mtq; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_mtq_ms; settings.deploy_bct_id = BC_POWER_OFF_MTQ; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_MTQ_BROKEN, &settings); @@ -156,8 +159,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_x; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_x_ms; settings.deploy_bct_id = BC_RESET_RWX; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RW0003X, &settings); @@ -168,8 +171,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_x; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_x_ms; settings.deploy_bct_id = BC_POWER_OFF_RWX; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RW0003X_BROKEN, &settings); @@ -179,8 +182,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_y; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_y_ms; settings.deploy_bct_id = BC_RESET_RWY; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RW0003Y, &settings); @@ -191,8 +194,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_z; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_z_ms; settings.deploy_bct_id = BC_POWER_OFF_RWY; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RW0003Y_BROKEN, &settings); @@ -202,8 +205,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_LOW; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_z; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_z_ms; settings.deploy_bct_id = BC_RESET_RWZ; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RW0003Z, &settings); @@ -214,8 +217,8 @@ void EH_load_rule_sw_oc(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_z; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_z_ms; settings.deploy_bct_id = BC_POWER_OFF_RWZ; settings.is_active = 0; EH_register_rule(EH_RULE_SW_OC_RW0003Z_BROKEN, &settings); From 3525e9522d5008eb373875d76e0203107827b1a7 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 21 Jun 2023 22:19:43 +0200 Subject: [PATCH 115/176] Add auto mode transition start time --- .../Settings/Modes/Transitions/sl_bdot.c | 5 ++++- .../Modes/Transitions/sl_fine_three_axis.c | 5 ++++- .../Modes/Transitions/sl_rough_sun_pointing.c | 5 ++++- .../Modes/Transitions/sl_rough_three_axis.c | 4 +++- .../Modes/Transitions/sl_rough_three_axis_rw.c | 5 ++++- .../Sample/fdir_parameters.c | 14 ++++++++++---- .../SatelliteParameters/fdir_parameters.h | 18 ++++++++++++------ 7 files changed, 41 insertions(+), 15 deletions(-) diff --git a/src/src_user/Settings/Modes/Transitions/sl_bdot.c b/src/src_user/Settings/Modes/Transitions/sl_bdot.c index 09cb1483..4147400e 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_bdot.c +++ b/src/src_user/Settings/Modes/Transitions/sl_bdot.c @@ -16,6 +16,9 @@ #include #include +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + void BCL_load_initial_to_bdot(void) { cycle_t bc_cycle = OBCT_sec2cycle(1); @@ -105,7 +108,7 @@ void BCL_load_any_to_bdot(void) BCL_tool_register_cmd(OBCT_sec2cycle(time_sec), Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON - time_sec += 5 * 60; + time_sec += FDIR_PARAMETERS_bdot_start_mode_manager_time_s; BCL_tool_prepare_param_uint8(1); BCL_tool_register_cmd(OBCT_sec2cycle(time_sec), Cmd_CODE_APP_AOCS_MM_SET_AUTO_MODE_TRANSITION); diff --git a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c index f3c3816c..3d5a9641 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c +++ b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c @@ -15,6 +15,9 @@ #include #include +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + void BCL_load_rough_three_axis_rw_to_fine_three_axis(void) { uint32_t timing_sec = 1; @@ -46,7 +49,7 @@ void BCL_load_rough_three_axis_rw_to_fine_three_axis(void) BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON - timing_sec += (5 * 60); + timing_sec += FDIR_PARAMETERS_fine_three_axis_bdot_start_mode_manager_time_s; BCL_tool_prepare_param_uint8(1); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_AUTO_MODE_TRANSITION); } diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c b/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c index 2c2dc083..49e067cc 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c @@ -14,6 +14,9 @@ #include #include +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + void BCL_load_bdot_to_rough_sun_pointing(void) { cycle_t bc_cycle = OBCT_sec2cycle(1); @@ -31,7 +34,7 @@ void BCL_load_bdot_to_rough_sun_pointing(void) BCL_tool_register_cmd(bc_cycle, Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON - bc_cycle += OBCT_sec2cycle(25 * 60); + bc_cycle += OBCT_sec2cycle(FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s); BCL_tool_prepare_param_uint8(1); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_APP_AOCS_MM_SET_AUTO_MODE_TRANSITION); } diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c index d71d2ffc..8b26c511 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c @@ -13,6 +13,8 @@ #include #include +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" void BCL_load_rough_sun_pointing_to_rough_three_axis(void) { @@ -32,7 +34,7 @@ void BCL_load_rough_sun_pointing_to_rough_three_axis(void) BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON - timing_sec += (35 * 60); + timing_sec += FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s; BCL_tool_prepare_param_uint8(1); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_AUTO_MODE_TRANSITION); } diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c index d9b70357..260fbc6b 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c @@ -16,6 +16,9 @@ #include #include +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + void BCL_load_rough_three_axis_to_rough_three_axis_rw(void) { uint32_t timing_sec = 1; @@ -57,7 +60,7 @@ void BCL_load_rough_three_axis_to_rough_three_axis_rw(void) BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON - timing_sec += (5 * 60); + timing_sec += FDIR_PARAMETERS_rough_three_axis_rw_bdot_start_mode_manager_time_s; BCL_tool_prepare_param_uint8(1); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_AUTO_MODE_TRANSITION); } diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c index 7ed35009..0304bbcb 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -6,21 +6,27 @@ #include // Mode Manager +// Bdot const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s = 5.0f * 60.0f; - const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); const float FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s = 200.0f; - +const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s = 5 * 60; +// Sun pointing control divergence anomaly const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); const float FDIR_PARAMETERS_sun_angle_div_time_limit_s = 50.0f * 60.0f; - +extern const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s = 25 * 60; +// Three axis control divergence anomaly const float FDIR_PARAMETERS_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); const float FDIR_PARAMETERS_three_axis_div_time_limit_s = 5.0f * 60.0f; - +extern const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s = 35 * 60; +extern const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_bdot_start_mode_manager_time_s = 5 * 60; +extern const uint32_t FDIR_PARAMETERS_fine_three_axis_bdot_start_mode_manager_time_s = 5 * 60; +// Sensor invisible anomaly const float FDIR_PARAMETERS_sun_invisible_time_limit_s = 50.0f * 60.0f; const float FDIR_PARAMETERS_stt_invisible_time_limit_s = 10.0f * 60.0f; + // S/W over current detection const uint16_t FDIR_PARAMETERS_sw_oc_threshold_pic_mA = 200; const uint16_t FDIR_PARAMETERS_sw_oc_threshold_stim210_mA = 1000; diff --git a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h index 0e0fea98..18c16079 100644 --- a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h @@ -10,21 +10,27 @@ #include // Mode Manager -extern const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s; //!< Angular velocity convergence detection limit [rad/s] -extern const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s; //!< Angular velocity convergence detection time limit [s] - +// Bdot +extern const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s; //!< Angular velocity convergence detection limit [rad/s] +extern const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s; //!< Angular velocity convergence detection time limit [s] extern const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s; //!< Angular velocity increase anomaly detection limit [rad/s] extern const float FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s; //!< Angular velocity anomaly detection period [s] - +extern const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s; //!< Bdot start auto mode transition time [s] +// Sun pointing control divergence anomaly extern const float FDIR_PARAMETERS_sun_angle_div_limit_rad; //!< Sun pointing divergence detection limit [rad] extern const float FDIR_PARAMETERS_sun_angle_div_time_limit_s; //!< Sun pointing divergence detection time limit [s] - +extern const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s; //!< Sun pointing start auto mode transition time [s] +// Three axis control divergence anomaly extern const float FDIR_PARAMETERS_three_axis_div_limit_rad; //!< Three axis control divergence detection limit [rad] extern const float FDIR_PARAMETERS_three_axis_div_time_limit_s; //!< Three axis control divergence detection time limit [s] - +extern const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s; //!< Rough Three Axis with MTQ start auto mode transition time [s] +extern const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_bdot_start_mode_manager_time_s; //!< Rough Three Axis with RW start auto mode transition time [s] +extern const uint32_t FDIR_PARAMETERS_fine_three_axis_bdot_start_mode_manager_time_s; //!< Fine Three Axis with RW start auto mode transition time [s] +// Sensor invisible anomaly extern const float FDIR_PARAMETERS_sun_invisible_time_limit_s; //!< Sun invisible anomaly detection time limit [s] extern const float FDIR_PARAMETERS_stt_invisible_time_limit_s; //!< STT invisible anomaly detection time limit [s] + // S/W over current detection extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_pic_mA; //!< S/W over current detection threshold for PIC [mA] extern const uint16_t FDIR_PARAMETERS_sw_oc_threshold_stim210_mA; //!< S/W over current detection threshold for STIM210 [mA] From 2a5c19ff0a7ed6fbbf6e83f36d21ae2793a51468 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 21 Jun 2023 22:28:42 +0200 Subject: [PATCH 116/176] Add mode transition parameters for each three axis control --- .../UserDefined/AOCS/aocs_mode_manager.c | 4 ++-- .../Modes/Transitions/sl_fine_three_axis.c | 6 +++--- .../Modes/Transitions/sl_rough_three_axis.c | 4 ++-- .../Modes/Transitions/sl_rough_three_axis_rw.c | 6 +++--- .../SatelliteParameters/Sample/fdir_parameters.c | 16 +++++++++++----- .../SatelliteParameters/fdir_parameters.h | 16 +++++++++++----- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c index e06d11a3..9a01c601 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c @@ -106,8 +106,8 @@ static void APP_AOCS_MM_init_(void) aocs_mode_manager_.sun_angle_div_time_limit_s = FDIR_PARAMETERS_sun_angle_div_time_limit_s; // Rough MTQを想定して初期値は大きめに設定、各モード遷移時に適切に設定することを想定 - aocs_mode_manager_.three_axis_div_limit_rad = FDIR_PARAMETERS_three_axis_div_limit_rad; - aocs_mode_manager_.three_axis_div_time_limit_s = FDIR_PARAMETERS_three_axis_div_time_limit_s; + aocs_mode_manager_.three_axis_div_limit_rad = FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad; + aocs_mode_manager_.three_axis_div_time_limit_s = FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s; aocs_mode_manager_.sun_invisible_time_limit_s = FDIR_PARAMETERS_sun_invisible_time_limit_s; aocs_mode_manager_.stt_invisible_time_limit_s = FDIR_PARAMETERS_stt_invisible_time_limit_s; diff --git a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c index 3d5a9641..92cfb49c 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c +++ b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c @@ -27,8 +27,8 @@ void BCL_load_rough_three_axis_rw_to_fine_three_axis(void) timing_sec++; // 自動モード遷移閾値変更 - BCL_tool_prepare_param_float(PHYSICAL_CONST_degree_to_radian(5.0f)); - BCL_tool_prepare_param_float(1.0f * 60.0f); + BCL_tool_prepare_param_float(FDIR_PARAMETERS_fine_three_axis_div_limit_rad); + BCL_tool_prepare_param_float(FDIR_PARAMETERS_fine_three_axis_div_time_limit_s); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_THREE_AXIS_THRESHOLD); timing_sec++; @@ -49,7 +49,7 @@ void BCL_load_rough_three_axis_rw_to_fine_three_axis(void) BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON - timing_sec += FDIR_PARAMETERS_fine_three_axis_bdot_start_mode_manager_time_s; + timing_sec += FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s; BCL_tool_prepare_param_uint8(1); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_AUTO_MODE_TRANSITION); } diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c index 8b26c511..d6c6f421 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c @@ -25,8 +25,8 @@ void BCL_load_rough_sun_pointing_to_rough_three_axis(void) // 自動モード遷移閾値変更 timing_sec++; - BCL_tool_prepare_param_float(PHYSICAL_CONST_degree_to_radian(30.0f)); - BCL_tool_prepare_param_float(5.0f * 60.0f); + BCL_tool_prepare_param_float(FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad); + BCL_tool_prepare_param_float(FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_THREE_AXIS_THRESHOLD); // モード遷移完了 diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c index 260fbc6b..c601eb46 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c @@ -28,8 +28,8 @@ void BCL_load_rough_three_axis_to_rough_three_axis_rw(void) // 自動モード遷移閾値変更 timing_sec++; - BCL_tool_prepare_param_float(PHYSICAL_CONST_degree_to_radian(10.0f)); - BCL_tool_prepare_param_float(1.0f * 60.0f); + BCL_tool_prepare_param_float(FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad); + BCL_tool_prepare_param_float(FDIR_PARAMETERS_rough_three_axis_rw_div_time_limit_s); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_THREE_AXIS_THRESHOLD); // RW X ON @@ -60,7 +60,7 @@ void BCL_load_rough_three_axis_to_rough_three_axis_rw(void) BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_MM_FINISH_TRANSITION); // 自動モード遷移ON - timing_sec += FDIR_PARAMETERS_rough_three_axis_rw_bdot_start_mode_manager_time_s; + timing_sec += FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s; BCL_tool_prepare_param_uint8(1); BCL_tool_register_cmd(OBCT_sec2cycle(timing_sec), Cmd_CODE_APP_AOCS_MM_SET_AUTO_MODE_TRANSITION); } diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c index 0304bbcb..1d8ce4a4 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -16,12 +16,18 @@ const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s = 5 * 60; const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); const float FDIR_PARAMETERS_sun_angle_div_time_limit_s = 50.0f * 60.0f; extern const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s = 25 * 60; -// Three axis control divergence anomaly -const float FDIR_PARAMETERS_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); -const float FDIR_PARAMETERS_three_axis_div_time_limit_s = 5.0f * 60.0f; +// Rough three axis control with MTQ divergence anomaly +const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s = 5.0f * 60.0f; extern const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s = 35 * 60; -extern const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_bdot_start_mode_manager_time_s = 5 * 60; -extern const uint32_t FDIR_PARAMETERS_fine_three_axis_bdot_start_mode_manager_time_s = 5 * 60; +// Rough three axis control with RW divergence anomaly +const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad = PHYSICAL_CONST_degree_to_radian(10.0f); +const float FDIR_PARAMETERS_rough_three_axis_rw_div_time_limit_s = 1.0f * 60.0f; +extern const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s = 5 * 60; +// Fine three axis control divergence anomaly +const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(5.0f); +const float FDIR_PARAMETERS_fine_three_axis_div_time_limit_s = 1.0f * 60.0f; +extern const uint32_t FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s = 5 * 60; // Sensor invisible anomaly const float FDIR_PARAMETERS_sun_invisible_time_limit_s = 50.0f * 60.0f; const float FDIR_PARAMETERS_stt_invisible_time_limit_s = 10.0f * 60.0f; diff --git a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h index 18c16079..ae4d4ad0 100644 --- a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h @@ -20,12 +20,18 @@ extern const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s; //!< Bdo extern const float FDIR_PARAMETERS_sun_angle_div_limit_rad; //!< Sun pointing divergence detection limit [rad] extern const float FDIR_PARAMETERS_sun_angle_div_time_limit_s; //!< Sun pointing divergence detection time limit [s] extern const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s; //!< Sun pointing start auto mode transition time [s] -// Three axis control divergence anomaly -extern const float FDIR_PARAMETERS_three_axis_div_limit_rad; //!< Three axis control divergence detection limit [rad] -extern const float FDIR_PARAMETERS_three_axis_div_time_limit_s; //!< Three axis control divergence detection time limit [s] +// Rough three axis control with MTQ divergence anomaly +extern const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad; //!< Three axis control divergence detection limit [rad] +extern const float FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s; //!< Three axis control divergence detection time limit [s] extern const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s; //!< Rough Three Axis with MTQ start auto mode transition time [s] -extern const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_bdot_start_mode_manager_time_s; //!< Rough Three Axis with RW start auto mode transition time [s] -extern const uint32_t FDIR_PARAMETERS_fine_three_axis_bdot_start_mode_manager_time_s; //!< Fine Three Axis with RW start auto mode transition time [s] +// Rough three axis control with RW divergence anomaly +extern const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad; //!< Three axis control divergence detection limit [rad] +extern const float FDIR_PARAMETERS_rough_three_axis_rw_div_time_limit_s; //!< Three axis control divergence detection time limit [s] +extern const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s; //!< Rough Three Axis with RW start auto mode transition time [s] +// Fine three axis control divergence anomaly +extern const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad; //!< Three axis control divergence detection limit [rad] +extern const float FDIR_PARAMETERS_fine_three_axis_div_time_limit_s; //!< Three axis control divergence detection time limit [s] +extern const uint32_t FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s; //!< Fine Three Axis with RW start auto mode transition time [s] // Sensor invisible anomaly extern const float FDIR_PARAMETERS_sun_invisible_time_limit_s; //!< Sun invisible anomaly detection time limit [s] extern const float FDIR_PARAMETERS_stt_invisible_time_limit_s; //!< STT invisible anomaly detection time limit [s] From 7203ee4309a1e60fbf1226a80ae5159b7afef06c Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 21 Jun 2023 23:09:17 +0200 Subject: [PATCH 117/176] Add TLM anomaly parameters --- .../Sample/fdir_parameters.c | 43 ++++- .../SatelliteParameters/fdir_parameters.h | 34 ++++ .../event_handler_rule_tlmcmd.c | 151 +++++++++--------- 3 files changed, 150 insertions(+), 78 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c index 1d8ce4a4..5c4966ba 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -15,19 +15,19 @@ const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s = 5 * 60; // Sun pointing control divergence anomaly const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); const float FDIR_PARAMETERS_sun_angle_div_time_limit_s = 50.0f * 60.0f; -extern const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s = 25 * 60; +const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s = 25 * 60; // Rough three axis control with MTQ divergence anomaly const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); const float FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s = 5.0f * 60.0f; -extern const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s = 35 * 60; +const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s = 35 * 60; // Rough three axis control with RW divergence anomaly const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad = PHYSICAL_CONST_degree_to_radian(10.0f); const float FDIR_PARAMETERS_rough_three_axis_rw_div_time_limit_s = 1.0f * 60.0f; -extern const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s = 5 * 60; +const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s = 5 * 60; // Fine three axis control divergence anomaly const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(5.0f); const float FDIR_PARAMETERS_fine_three_axis_div_time_limit_s = 1.0f * 60.0f; -extern const uint32_t FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s = 5 * 60; +const uint32_t FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s = 5 * 60; // Sensor invisible anomaly const float FDIR_PARAMETERS_sun_invisible_time_limit_s = 50.0f * 60.0f; const float FDIR_PARAMETERS_stt_invisible_time_limit_s = 10.0f * 60.0f; @@ -89,6 +89,7 @@ const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_z_ms = 5000; const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_z = 5; const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_z_ms = 0; + // H/W over current detection // If the measured voltage is smaller than the following values, we assume that the H/W OC protection was executed by the INA260. const float FDIR_PARAMETERS_hw_oc_detection_threshold_pic_V = 0.5f; @@ -145,3 +146,37 @@ const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_z = 10; const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_z_ms = 5000; const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_z = 5; const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_z_ms = 0; + +// Telemetry anomaly +// MPU9250 +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_mp9250 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_mp9250_ms = 2000; +// RM3100 +// Use same value for all RM3100s (Users can also change the value with command for each RM3100) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rm3100 = 1000; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rm3100_ms = 2000; +const uint16_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_rm3100 = 10; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_rm3100_ms = 0; +// nanoSSOC D60 +// Use same value for all sun sensors (Users can also change the value with command for each sun sensors) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60 = 250; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms = 2000; +// STIM210 +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_stim210 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_stim210_ms = 2000; +const uint16_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_stim210 = 5; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_stim210_ms = 0; +// Sagitta +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_sagitta = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_sagitta_ms = 2000; +// OEM7600 +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_oem7600 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_oem7600_ms = 1000; +// RW0003 +// Use same value for all RWs (Users can also change the value with command for each RW) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003 = 10; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms = 2000; +// INA260 +// Use same value for all current sensors (Users can also change the value with command for each current sensor) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms = 5000; diff --git a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h index ae4d4ad0..857371e6 100644 --- a/src/src_user/Settings/SatelliteParameters/fdir_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/fdir_parameters.h @@ -150,6 +150,40 @@ extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_z_ms; extern const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_z; //!< H/W over current detection event handler power off count threshold for RW0003 Z extern const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_z_ms; //!< H/W over current detection event handler power off time threshold for RW0003 Z [ms] +// Telemetry anomaly +// MPU9250 +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_mp9250; //!< TLM error detection event handler reset count threshold for MPU9250 +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_mp9250_ms; //!< TLM error detection event handler reset time threshold for MPU9250 [ms] +// RM3100 +// Use same value for all RM3100s (Users can also change the value with command for each RM3100) +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rm3100; //!< TLM error detection event handler reset count threshold for RM3100 AOBC +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rm3100_ms; //!< TLM error detection event handler reset time threshold for RM3100 AOBC [ms] +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_rm3100; //!< TLM error detection event handler switch sensor count threshold for RM3100 AOBC +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_rm3100_ms; //!< TLM error detection event handler switch sensor time threshold for RM3100 AOBC [ms] +// nanoSSOC D60 +// Use same value for all sun sensors (Users can also change the value with command for each sun sensors) +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; //!< TLM error detection event handler reset count threshold for nanoSSOC D60 +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; //!< TLM error detection event handler reset time threshold for nanoSSOC D60 [ms] +// STIM210 +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_stim210; //!< TLM error detection event handler reset count threshold for STIM210 +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_stim210_ms; //!< TLM error detection event handler reset time threshold for STIM210 [ms] +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_stim210; //!< TLM error detection event handler switch sensor count threshold for STIM210 +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_stim210_ms; //!< TLM error detection event handler switch sensor time threshold for STIM210 [ms] +// Sagitta +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_sagitta; //!< TLM error detection event handler reset count threshold for Sagitta +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_sagitta_ms; //!< TLM error detection event handler reset time threshold for Sagitta [ms] +// OEM7600 +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_oem7600; //!< TLM error detection event handler reset count threshold for OEM7600 +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_oem7600_ms; //!< TLM error detection event handler reset time threshold for OEM7600 [ms] +// RW0003 +// Use same value for all RWs (Users can also change the value with command for each RW) +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003; //!< TLM error detection event handler reset count threshold for RW0003 +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms; //!< TLM error detection event handler reset time threshold for RW0003 [ms] +// INA260 +// Use same value for all current sensors (Users can also change the value with command for each current sensor) +extern const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; //!< TLM error detection event handler reset count threshold for INA260 +extern const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; //!< TLM error detection event handler reset time threshold for INA260 [ms] + // Temperature anomaly // TBI diff --git a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c index 8f33acdb..a363ad25 100644 --- a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c +++ b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c @@ -16,6 +16,9 @@ #include "../../../Applications/DriverInstances/di_rw0003.h" #include "../../../Applications/DriverInstances/di_ina260.h" +// Satellite Parameters +#include "../../../Settings/SatelliteParameters/fdir_parameters.h" + void EH_load_rule_tlmcmd(void) { EH_RuleSettings settings; @@ -26,8 +29,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_mp9250; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_mp9250_ms; settings.deploy_bct_id = BC_RESET_MPU9250; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_MPU9250, &settings); @@ -38,8 +41,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_RESET_RM3100; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_RM3100_ON_AOBC, &settings); @@ -50,8 +53,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_SELECT_RM3100_EXTERNAL; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_RM3100_ON_AOBC_BROKEN, &settings); @@ -62,8 +65,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 1000; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_RESET_RM3100; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_RM3100_EXTERNAL, &settings); @@ -74,8 +77,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_rm3100; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_rm3100_ms; settings.deploy_bct_id = BC_SELECT_RM3100_ON_AOBC; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_RM3100_EXTERNAL_BROKEN, &settings); @@ -86,8 +89,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_NANOSSOC_D60_PY, &settings); @@ -98,8 +101,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_NANOSSOC_D60_MY, &settings); @@ -110,8 +113,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_NANOSSOC_D60_PZ, &settings); @@ -122,8 +125,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_NANOSSOC_D60_MZ, &settings); @@ -134,8 +137,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_stim210_ms; settings.deploy_bct_id = BC_RESET_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_STIM210, &settings); @@ -146,8 +149,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_stim210_ms; settings.deploy_bct_id = BC_POWER_OFF_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_STIM210_BROKEN, &settings); @@ -158,8 +161,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_sagitta; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_sagitta_ms; settings.deploy_bct_id = BC_RESET_SAGITTA; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_SAGITTA, &settings); @@ -170,8 +173,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_oem7600; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_oem7600_ms; settings.deploy_bct_id = BC_RESET_OEM7600; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_OEM7600, &settings); @@ -182,8 +185,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms; settings.deploy_bct_id = BC_RESET_RWX; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_RWX, &settings); @@ -194,8 +197,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms; settings.deploy_bct_id = BC_RESET_RWY; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_RWY, &settings); @@ -206,8 +209,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 10; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms; settings.deploy_bct_id = BC_RESET_RWZ; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_RWZ, &settings); @@ -218,8 +221,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_PIC, &settings); @@ -229,8 +232,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_STIM210, &settings); @@ -240,8 +243,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_SAGITTA, &settings); @@ -251,8 +254,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_OEM7600, &settings); @@ -262,8 +265,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_RM3100, &settings); @@ -273,8 +276,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_NANOSSOC_D60, &settings); @@ -284,8 +287,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_MTQ, &settings); @@ -295,8 +298,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_RW0003_X, &settings); @@ -306,8 +309,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_RW0003_Y, &settings); @@ -317,8 +320,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 5000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms; settings.deploy_bct_id = BC_RESET_INA260; settings.is_active = 0; EH_register_rule(EH_RULE_TLM_ERROR_INA260_RW0003_Z, &settings); @@ -329,8 +332,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_CHECKSUM_ERROR_NANOSSOC_D60_PY, &settings); @@ -341,8 +344,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_CHECKSUM_ERROR_NANOSSOC_D60_MY, &settings); @@ -353,8 +356,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_CHECKSUM_ERROR_NANOSSOC_D60_PZ, &settings); @@ -365,8 +368,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 250; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms; settings.deploy_bct_id = BC_RESET_NANOSSOC_D60; settings.is_active = 0; EH_register_rule(EH_RULE_CHECKSUM_ERROR_NANOSSOC_D60_MZ, &settings); @@ -377,8 +380,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_stim210_ms; settings.deploy_bct_id = BC_RESET_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_CRC_ERROR_STIM210, &settings); @@ -389,8 +392,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_EH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CUMULATIVE; - settings.condition.count_threshold = 5; - settings.condition.time_threshold_ms = 0; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_stim210; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_stim210_ms; settings.deploy_bct_id = BC_POWER_OFF_STIM210; settings.is_active = 0; EH_register_rule(EH_RULE_CRC_ERROR_STIM210_BROKEN, &settings); @@ -401,8 +404,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_sagitta; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_sagitta_ms; settings.deploy_bct_id = BC_RESET_SAGITTA; settings.is_active = 0; EH_register_rule(EH_RULE_XXHASH_ERROR_SAGITTA, &settings); @@ -413,8 +416,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_oem7600; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_oem7600_ms; settings.deploy_bct_id = BC_RESET_OEM7600; settings.is_active = 0; EH_register_rule(EH_RULE_CRC_ERROR_OEM7600, &settings); @@ -425,8 +428,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms; settings.deploy_bct_id = BC_RESET_RWX; settings.is_active = 0; EH_register_rule(EH_RULE_CRC_ERROR_RWX, &settings); @@ -437,8 +440,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms; settings.deploy_bct_id = BC_RESET_RWY; settings.is_active = 0; EH_register_rule(EH_RULE_CRC_ERROR_RWY, &settings); @@ -449,8 +452,8 @@ void EH_load_rule_tlmcmd(void) settings.event.err_level = EL_ERROR_LEVEL_HIGH; settings.should_match_err_level = 1; settings.condition.type = EH_RESPONSE_CONDITION_CONTINUOUS; - settings.condition.count_threshold = 100; - settings.condition.time_threshold_ms = 2000; + settings.condition.count_threshold = FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003; + settings.condition.time_threshold_ms = FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms; settings.deploy_bct_id = BC_RESET_RWZ; settings.is_active = 0; EH_register_rule(EH_RULE_CRC_ERROR_RWZ, &settings); From 29db489f154c62da31528e4104b41f52b167f72e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 26 Jun 2023 19:17:04 +0200 Subject: [PATCH 118/176] Add INA260 parameters files --- src/src_user/Settings/CMakeLists.txt | 1 + .../SatelliteParameters/Sample/ina260_parameters.c | 6 ++++++ .../Settings/SatelliteParameters/ina260_parameters.h | 10 ++++++++++ 3 files changed, 17 insertions(+) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/ina260_parameters.h diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index b52cabeb..8b4fd261 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -52,6 +52,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_determination_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/attitude_control_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/fdir_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/ina260_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c new file mode 100644 index 00000000..526ba2db --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c @@ -0,0 +1,6 @@ +/** + * @file ina260_parameters.c + * @brief INA260に関する衛星固有パラメータを管理する + */ + +#include diff --git a/src/src_user/Settings/SatelliteParameters/ina260_parameters.h b/src/src_user/Settings/SatelliteParameters/ina260_parameters.h new file mode 100644 index 00000000..eb6d968c --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/ina260_parameters.h @@ -0,0 +1,10 @@ +/** + * @file ina260_parameters.h + * @brief INA260に関する衛星固有パラメータを管理する + */ + +#ifndef INA260_PARAMETERS_H_ +#define INA260_PARAMETERS_H_ + + +#endif // INA260_PARAMETERS_H_ From 235897787b9d48c658a7568cbf0c921f9948c86d Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Mon, 26 Jun 2023 19:42:22 +0200 Subject: [PATCH 119/176] Add HW OC parameters --- .../Sample/ina260_parameters.c | 60 ++++++++++++++ .../SatelliteParameters/ina260_parameters.h | 61 ++++++++++++++ .../NormalBlockCommandDefinition/nbc_ina260.c | 83 ++++++++++--------- 3 files changed, 164 insertions(+), 40 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c index 526ba2db..49dce5a4 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/ina260_parameters.c @@ -4,3 +4,63 @@ */ #include + +// PIC +const INA260_AVERAGING_MODE INA260_PARAMETERS_pic_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_pic_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_pic_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_pic_hw_over_current_threshold_mA = 200.0f; + +// STIM210 +const INA260_AVERAGING_MODE INA260_PARAMETERS_stim210_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_stim210_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_stim210_current_conversion_time = INA260_CONVERSION_TIME_140US; +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 float INA260_PARAMETERS_sagitta_hw_over_current_threshold_mA = 500.0f; + +// OEM7600 +const INA260_AVERAGING_MODE INA260_PARAMETERS_oem7600_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_oem7600_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_oem7600_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_oem7600_hw_over_current_threshold_mA = 1000.0f; + +// RM3100 +const INA260_AVERAGING_MODE INA260_PARAMETERS_rm3100_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rm3100_voltage_conversion_time = INA260_CONVERSION_TIME_1MS; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rm3100_current_conversion_time = INA260_CONVERSION_TIME_1MS; +const float INA260_PARAMETERS_rm3100_hw_over_current_threshold_mA = 200.0f; + +// NanoSSOC-D60 +const INA260_AVERAGING_MODE INA260_PARAMETERS_nanossoc_d60_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_nanossoc_d60_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_nanossoc_d60_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_nanossoc_d60_hw_over_current_threshold_mA = 150.0f; + +// MTQ +const INA260_AVERAGING_MODE INA260_PARAMETERS_mtq_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_mtq_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_mtq_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_mtq_hw_over_current_threshold_mA = 2000.0f; + +// RW0003 X +const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_x_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_x_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_x_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_rw0003_x_hw_over_current_threshold_mA = 2000.0f; + +// RW0003 Y +const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_y_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_y_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_y_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_rw0003_y_hw_over_current_threshold_mA = 2000.0f; + +// RW0003 Z +const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_z_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_z_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_z_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_rw0003_z_hw_over_current_threshold_mA = 2000.0f; diff --git a/src/src_user/Settings/SatelliteParameters/ina260_parameters.h b/src/src_user/Settings/SatelliteParameters/ina260_parameters.h index eb6d968c..5585d58e 100644 --- a/src/src_user/Settings/SatelliteParameters/ina260_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/ina260_parameters.h @@ -6,5 +6,66 @@ #ifndef INA260_PARAMETERS_H_ #define INA260_PARAMETERS_H_ +#include + +// PIC +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_pic_averaging_mode; //!< Averaging mode for PIC +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_pic_voltage_conversion_time; //!< Voltage conversion time for PIC +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_pic_current_conversion_time; //!< Current conversion time for PIC +extern const float INA260_PARAMETERS_pic_hw_over_current_threshold_mA; //!< H/W over current threshold for PIC [mA] + +// STIM210 +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_stim210_averaging_mode; //!< Averaging mode for STIM210 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_stim210_voltage_conversion_time; //!< Voltage conversion time for STIM210 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_stim210_current_conversion_time; //!< Current conversion time for STIM210 +extern const float INA260_PARAMETERS_stim210_hw_over_current_threshold_mA; //!< H/W over current threshold for STIM210 [mA] + +// SAGITTA +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_sagitta_averaging_mode; //!< Averaging mode for SAGITTA +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_sagitta_voltage_conversion_time; //!< Voltage conversion time for SAGITTA +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_sagitta_current_conversion_time; //!< Current conversion time for SAGITTA +extern const float INA260_PARAMETERS_sagitta_hw_over_current_threshold_mA; //!< H/W over current threshold for SAGITTA [mA] + +// OEM7600 +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_oem7600_averaging_mode; //!< Averaging mode for OEM7600 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_oem7600_voltage_conversion_time; //!< Voltage conversion time for OEM7600 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_oem7600_current_conversion_time; //!< Current conversion time for OEM7600 +extern const float INA260_PARAMETERS_oem7600_hw_over_current_threshold_mA; //!< H/W over current threshold for OEM7600 [mA] + +// RM3100 +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_rm3100_averaging_mode; //!< Averaging mode for RM3100 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rm3100_voltage_conversion_time; //!< Voltage conversion time for RM3100 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rm3100_current_conversion_time; //!< Current conversion time for RM3100 +extern const float INA260_PARAMETERS_rm3100_hw_over_current_threshold_mA; //!< H/W over current threshold for RM3100 [mA] + +// NanoSSOC-D60 +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_nanossoc_d60_averaging_mode; //!< Averaging mode for NanoSSOC-D60 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_nanossoc_d60_voltage_conversion_time; //!< Voltage conversion time for NanoSSOC-D60 +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_nanossoc_d60_current_conversion_time; //!< Current conversion time for NanoSSOC-D60 +extern const float INA260_PARAMETERS_nanossoc_d60_hw_over_current_threshold_mA; //!< H/W over current threshold for NanoSSOC-D60 [mA] + +// MTQ +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_mtq_averaging_mode; //!< Averaging mode for MTQ +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_mtq_voltage_conversion_time; //!< Voltage conversion time for MTQ +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_mtq_current_conversion_time; //!< Current conversion time for MTQ +extern const float INA260_PARAMETERS_mtq_hw_over_current_threshold_mA; //!< H/W over current threshold for MTQ [mA] + +// RW0003 X +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_x_averaging_mode; //!< Averaging mode for RW0003 X +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_x_voltage_conversion_time; //!< Voltage conversion time for RW0003 X +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_x_current_conversion_time; //!< Current conversion time for RW0003 X +extern const float INA260_PARAMETERS_rw0003_x_hw_over_current_threshold_mA; //!< H/W over current threshold for RW0003 X [mA] + +// RW0003 Y +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_y_averaging_mode; //!< Averaging mode for RW0003 Y +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_y_voltage_conversion_time; //!< Voltage conversion time for RW0003 Y +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_y_current_conversion_time; //!< Current conversion time for RW0003 Y +extern const float INA260_PARAMETERS_rw0003_y_hw_over_current_threshold_mA; //!< H/W over current threshold for RW0003 Y [mA] + +// RW0003 Z +extern const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_z_averaging_mode; //!< Averaging mode for RW0003 Z +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_z_voltage_conversion_time; //!< Voltage conversion time for RW0003 Z +extern const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_z_current_conversion_time; //!< Current conversion time for RW0003 Z +extern const float INA260_PARAMETERS_rw0003_z_hw_over_current_threshold_mA; //!< H/W over current threshold for RW0003 Z [mA] #endif // INA260_PARAMETERS_H_ diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c index 0b39108b..309b8acc 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c @@ -13,6 +13,9 @@ #include "../../Settings/System/EventHandlerRules/event_handler_rules.h" #include "../../Settings/System/event_logger_group.h" +// Satellite Parameters +#include "../../Settings/SatelliteParameters/ina260_parameters.h" + void BCL_load_power_on_ina260() { cycle_t bc_cycle = 1; @@ -24,72 +27,72 @@ void BCL_load_power_on_ina260() // Initialize BCL_tool_prepare_param_uint8(INA260_IDX_PIC); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_pic_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_pic_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_pic_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_STIM210); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_stim210_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_stim210_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_stim210_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_SAGITTA); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_sagitta_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_sagitta_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_sagitta_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_OEM7600); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_oem7600_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_oem7600_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_oem7600_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RM3100); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_1MS); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_1MS); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rm3100_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rm3100_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rm3100_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_NANOSSOC_D60); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_nanossoc_d60_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_nanossoc_d60_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_nanossoc_d60_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_MTQ); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_mtq_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_mtq_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_mtq_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RW0003_X); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_x_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_x_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_x_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RW0003_Y); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_y_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_y_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_y_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RW0003_Z); - BCL_tool_prepare_param_uint8(INA260_AVERAGING_MODE_16); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); - BCL_tool_prepare_param_uint8(INA260_CONVERSION_TIME_140US); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_z_averaging_mode); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_z_voltage_conversion_time); + BCL_tool_prepare_param_uint8(INA260_PARAMETERS_rw0003_z_current_conversion_time); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_INIT); bc_cycle++; @@ -119,52 +122,52 @@ void BCL_load_set_ina260_oc_limit() cycle_t bc_cycle = 1; BCL_tool_prepare_param_uint8(INA260_IDX_PIC); - BCL_tool_prepare_param_float(200.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_pic_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_STIM210); - BCL_tool_prepare_param_float(1000.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_stim210_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_SAGITTA); - BCL_tool_prepare_param_float(500.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_sagitta_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_OEM7600); - BCL_tool_prepare_param_float(1000.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_oem7600_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RM3100); - BCL_tool_prepare_param_float(200.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_rm3100_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_NANOSSOC_D60); - BCL_tool_prepare_param_float(150.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_nanossoc_d60_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_MTQ); - BCL_tool_prepare_param_float(2000.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_mtq_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RW0003_X); - BCL_tool_prepare_param_float(2000.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_rw0003_x_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RW0003_Y); - BCL_tool_prepare_param_float(2000.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_rw0003_y_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; BCL_tool_prepare_param_uint8(INA260_IDX_RW0003_Z); - BCL_tool_prepare_param_float(2000.0f); // mA + BCL_tool_prepare_param_float(INA260_PARAMETERS_rw0003_z_hw_over_current_threshold_mA); BCL_tool_register_cmd(bc_cycle, Cmd_CODE_DI_INA260_SET_OVER_CURRENT_PROTECTION); bc_cycle++; From 68a76c62a561c88d8f70d8eb7ab71bbd65247611 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Mon, 26 Jun 2023 11:31:54 +0900 Subject: [PATCH 120/176] [Feature] Separate OEM7600 parameters --- .../SensorFilters/oem7600_filter.c | 22 ++++++++-------- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/oem7600_parameters.c | 21 ++++++++++++++++ .../SatelliteParameters/oem7600_parameters.h | 25 +++++++++++++++++++ 4 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/oem7600_parameters.h diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c index 703dce69..281e16d2 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c @@ -16,6 +16,9 @@ #include "../../../../../Library/time_space.h" #include "../../../../../Library/math_constants.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/oem7600_parameters.h" + #define OEM7600_FILTER_POS_VEL_SIX_DIM (6) static Oem7600Filter oem7600_filter_; @@ -117,18 +120,17 @@ static void APP_OEM7600_FILTER_exec_(void) static int APP_OEM7600_FILTER_init_spike_filter_(void) { - // 値は調整してよいが一旦これで進める for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { - oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_accept = 3; - oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = 60; - oem7600_filter_.position_spike_filter_config[axis_id].reject_threshold = 10000.0; // m - oem7600_filter_.position_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = 8000.0; // m - - oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_accept = 3; - oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = 60; - oem7600_filter_.velocity_spike_filter_config[axis_id].reject_threshold = 1000.0; // m/s - oem7600_filter_.velocity_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = 100; // m/s + oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_accept = OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept; + oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning; + oem7600_filter_.position_spike_filter_config[axis_id].reject_threshold = OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m; + oem7600_filter_.position_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m; + + oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_accept = OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept; + oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning; + oem7600_filter_.velocity_spike_filter_config[axis_id].reject_threshold = OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s; + oem7600_filter_.velocity_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s; } C2A_MATH_ERROR position_filter_setting_result = C2A_MATH_ERROR_OK; diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index b52cabeb..a090a583 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -55,7 +55,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/mpu9250_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/seiren_mtq_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c new file mode 100644 index 00000000..4ea60211 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c @@ -0,0 +1,21 @@ +/** + * @file oem7600_parameters.c + * @brief OEM7600に関する衛星固有パラメータを管理する + */ + +#include + +// Frame conversion: GPS-Rについては無し + +// Spike Filter +uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept = 3; +uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning = 60; +double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m = 10000.0; +double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m = 8000.0; + +uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept = 3; +uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning = 60; +double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s = 1000.0; +double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s = 100.0; + +// Sun intensity threshold diff --git a/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h b/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h new file mode 100644 index 00000000..2802d459 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h @@ -0,0 +1,25 @@ +/** + * @file oem7600_parameters.h + * @brief OEM7600に関する衛星固有パラメータを管理する +*/ + +#ifndef OEM7600_PARAMETERS_H_ +#define OEM7600_PARAMETERS_H_ + +#include + +// Frame conversion: GPS-Rについては無し + +// Spike Filter +extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept; +extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning; +extern double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m; +extern double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m; + +extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept; +extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning; +extern double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s; +extern double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s; + + +#endif // OEM7600_PARAMETERS_H_ From ca19be1e31ee7a6ea2518f3636d6017330257d42 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Tue, 27 Jun 2023 18:36:01 +0900 Subject: [PATCH 121/176] [Style] Add comment --- .../Sample/oem7600_parameters.c | 2 -- .../SatelliteParameters/oem7600_parameters.h | 21 ++++++++----------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c index 4ea60211..b1095960 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c @@ -5,8 +5,6 @@ #include -// Frame conversion: GPS-Rについては無し - // Spike Filter uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept = 3; uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning = 60; diff --git a/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h b/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h index 2802d459..322af7c4 100644 --- a/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h @@ -1,25 +1,22 @@ /** * @file oem7600_parameters.h * @brief OEM7600に関する衛星固有パラメータを管理する -*/ + */ #ifndef OEM7600_PARAMETERS_H_ #define OEM7600_PARAMETERS_H_ #include -// Frame conversion: GPS-Rについては無し - // Spike Filter -extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept; -extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning; -extern double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m; -extern double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m; - -extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept; -extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning; -extern double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s; -extern double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s; +extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept; //!< Count limit to accept about position +extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning; //!< Count limit to reject continued warning about position +extern double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m; //!< Reject threshold about position [m] +extern double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m; //!< Amplitude limit to accept as step input about position [m] +extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept; //!< Count limit to accept about velocity +extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning; //!< Count limit to reject continued warning about velocity +extern double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s; //!< Reject threshold about velocity [m/s] +extern double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s; //!< Amplitude limit to accept as step input about velocity [m/s] #endif // OEM7600_PARAMETERS_H_ From 99d103e77c0d8c1beeef7f7a29fd91d9ba42db6d Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Tue, 27 Jun 2023 19:24:23 +0900 Subject: [PATCH 122/176] [Fix] Fix OEM7600 spike filter parameter into array --- .../SensorFilters/oem7600_filter.c | 18 +++++++++--------- .../Sample/oem7600_parameters.c | 16 ++++++++-------- .../SatelliteParameters/oem7600_parameters.h | 16 ++++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c index 281e16d2..5712b117 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c @@ -122,15 +122,15 @@ static int APP_OEM7600_FILTER_init_spike_filter_(void) { for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { - oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_accept = OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept; - oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning; - oem7600_filter_.position_spike_filter_config[axis_id].reject_threshold = OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m; - oem7600_filter_.position_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m; - - oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_accept = OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept; - oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning; - oem7600_filter_.velocity_spike_filter_config[axis_id].reject_threshold = OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s; - oem7600_filter_.velocity_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s; + oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_accept = OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept[axis_id]; + oem7600_filter_.position_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning[axis_id]; + oem7600_filter_.position_spike_filter_config[axis_id].reject_threshold = OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m[axis_id]; + oem7600_filter_.position_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m[axis_id]; + + oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_accept = OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept[axis_id]; + oem7600_filter_.velocity_spike_filter_config[axis_id].count_limit_to_reject_continued_warning = OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning[axis_id]; + oem7600_filter_.velocity_spike_filter_config[axis_id].reject_threshold = OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s[axis_id]; + oem7600_filter_.velocity_spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s[axis_id]; } C2A_MATH_ERROR position_filter_setting_result = C2A_MATH_ERROR_OK; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c index b1095960..e14ee8f2 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/oem7600_parameters.c @@ -6,14 +6,14 @@ #include // Spike Filter -uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept = 3; -uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning = 60; -double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m = 10000.0; -double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m = 8000.0; +uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = {3, 3, 3}; +uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = {60, 60, 60}; +double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m[PHYSICAL_CONST_THREE_DIM] = {10000.0, 10000.0, 10000.0}; +double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m[PHYSICAL_CONST_THREE_DIM] = {8000.0, 8000.0, 8000.0}; -uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept = 3; -uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning = 60; -double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s = 1000.0; -double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s = 100.0; +uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = {3, 3, 3}; +uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = {60, 60, 60}; +double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s[PHYSICAL_CONST_THREE_DIM] = {1000.0, 1000.0, 1000.0}; +double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s[PHYSICAL_CONST_THREE_DIM] = {100.0, 100.0, 100.0}; // Sun intensity threshold diff --git a/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h b/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h index 322af7c4..af36ff8e 100644 --- a/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/oem7600_parameters.h @@ -9,14 +9,14 @@ #include // Spike Filter -extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept; //!< Count limit to accept about position -extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning; //!< Count limit to reject continued warning about position -extern double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m; //!< Reject threshold about position [m] -extern double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m; //!< Amplitude limit to accept as step input about position [m] +extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept about position +extern uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning about position +extern double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold about position [m] +extern double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input about position [m] -extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept; //!< Count limit to accept about velocity -extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning; //!< Count limit to reject continued warning about velocity -extern double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s; //!< Reject threshold about velocity [m/s] -extern double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s; //!< Amplitude limit to accept as step input about velocity [m/s] +extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept about velocity +extern uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning about velocity +extern double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold about velocity [m/s] +extern double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input about velocity [m/s] #endif // OEM7600_PARAMETERS_H_ From ca475ada48030674948153469883e4cef0412551 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Tue, 27 Jun 2023 20:38:12 +0900 Subject: [PATCH 123/176] [Feature] Separate STIM210 parameters --- .../Applications/DriverInstances/di_stim210.c | 51 +++++++------------ .../SensorFilters/stim210_filter.c | 18 +++---- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/stim210_parameters.c | 30 +++++++++++ .../SatelliteParameters/stim210_parameters.h | 37 ++++++++++++++ 5 files changed, 95 insertions(+), 43 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/stim210_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/stim210_parameters.h diff --git a/src/src_user/Applications/DriverInstances/di_stim210.c b/src/src_user/Applications/DriverInstances/di_stim210.c index 7173b923..a43566a3 100644 --- a/src/src_user/Applications/DriverInstances/di_stim210.c +++ b/src/src_user/Applications/DriverInstances/di_stim210.c @@ -14,6 +14,9 @@ #include "../UserDefined/Power/power_switch_control.h" #include "../../Library/matrix33.h" +// Satellite Parameters +#include "../../Settings/SatelliteParameters/stim210_parameters.h" + static void DI_STIM210_init_(void); static void DI_STIM210_update_(void); static void DI_STIM210_temperature_caliblation_(void); @@ -29,9 +32,6 @@ const DiStim210* const di_stim210 [STIM210_IDX_MAX] = {&di_stim210_[STIM210_IDX static DS_StreamRecBuffer DI_STIM210_rx_buffer_; static uint8_t DI_STIM210_rx_buffer_allocation_[DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; -static const uint8_t DI_STIM210_kNumCoeffTempCalib_ = 2; - - AppInfo DI_STIM210_update(void) { return AI_create_app_info("update_DI_STIM210", DI_STIM210_init_, DI_STIM210_update_); @@ -74,55 +74,40 @@ static void DI_STIM210_init_(void) Printf("STIM210: q_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - float ang_vel_bias_compo_rad_s[PHYSICAL_CONST_THREE_DIM] = { -2.27E-04f, 2.80E-04f, -3.37E-04f }; // TODO_L: 温度補正されるので、削除しても良い - ret_math = STIM210_set_ang_vel_bias_compo_rad_s(&stim210_driver_[STIM210_IDX_IN_UNIT], ang_vel_bias_compo_rad_s); + ret_math = STIM210_set_ang_vel_bias_compo_rad_s(&stim210_driver_[STIM210_IDX_IN_UNIT], STIM210_PARAMETERS_ang_vel_bias_compo_rad_s); if (ret_math != C2A_MATH_ERROR_OK) { Printf("STIM210: ang_vel_bias set error.\n"); } // 温度補正 - const float kRangeLow = -50.0f; // degC - const float kRangeHigh = 50.0f; // degC - float bias_coeff[DI_STIM210_kNumCoeffTempCalib_]; - float scale_factor_coeff[DI_STIM210_kNumCoeffTempCalib_]; + const float kRangeLow = STIM210_PARAMETERS_temperature_range_low_degC; // degC + const float kRangeHigh = STIM210_PARAMETERS_temperature_range_high_degC; // degC // 計測値から設定するが温度依存性はかなり小さい // 特にSFは取付誤差と見分けづらいのでなしとする // SF,バイアスは y = SF*x - BIASという式を想定 // X軸 - bias_coeff[0] = -1.698E-04f; - bias_coeff[1] = 1.309E-06f; ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].bias_compo_rad_s[0]), - DI_STIM210_kNumCoeffTempCalib_, bias_coeff, kRangeLow, kRangeHigh); + STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_bias_coeff_compo_x, kRangeLow, kRangeHigh); if (ret < 0) Printf("STIM210 Gyro-X Bias Temperature Caliblation init Failed ! \n"); - scale_factor_coeff[0] = 1.0f; - scale_factor_coeff[1] = 0.0f; ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].scale_factor_compo[0]), - DI_STIM210_kNumCoeffTempCalib_, scale_factor_coeff, kRangeLow, kRangeHigh); + STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_scale_factor_coeff_compo_x, kRangeLow, kRangeHigh); if (ret < 0) Printf("STIM210 Gyro-X SF Temperature Caliblation init Failed ! \n"); // Y軸 - bias_coeff[0] = 2.990E-04f; - bias_coeff[1] = -6.060E-07f; ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].bias_compo_rad_s[1]), - DI_STIM210_kNumCoeffTempCalib_, bias_coeff, kRangeLow, kRangeHigh); + STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_bias_coeff_compo_y, kRangeLow, kRangeHigh); if (ret < 0) Printf("STIM210 Gyro-Y Bias Temperature Caliblation init Failed ! \n"); - scale_factor_coeff[0] = 1.0f; - scale_factor_coeff[1] = 0.0f; ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].scale_factor_compo[1]), - DI_STIM210_kNumCoeffTempCalib_, scale_factor_coeff, kRangeLow, kRangeHigh); + STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_scale_factor_coeff_compo_y, kRangeLow, kRangeHigh); if (ret < 0) Printf("STIM210 Gyro-Y SF Temperature Caliblation init Failed ! \n"); // Z軸 - bias_coeff[0] = -2.306E-04f; - bias_coeff[1] = -6.303E-07f; ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].bias_compo_rad_s[2]), - DI_STIM210_kNumCoeffTempCalib_, bias_coeff, kRangeLow, kRangeHigh); + STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_bias_coeff_compo_z, kRangeLow, kRangeHigh); if (ret < 0) Printf("STIM210 Gyro-Z Bias Temperature Caliblation init Failed ! \n"); - scale_factor_coeff[0] = 1.0f; - scale_factor_coeff[1] = 0.0f; ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].scale_factor_compo[2]), - DI_STIM210_kNumCoeffTempCalib_, scale_factor_coeff, kRangeLow, kRangeHigh); + STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_scale_factor_coeff_compo_z, kRangeLow, kRangeHigh); if (ret < 0) Printf("STIM210 Gyro-Z SF Temperature Caliblation init Failed ! \n"); return; @@ -366,15 +351,15 @@ CCP_CmdRet Cmd_DI_STIM210_SET_ANG_VEL_BIAS_TEMP_CALIB(const CommonCmdPacket* pac ENDIAN_memcpy(&range_high_degC, param + offset, sizeof(float)); offset += sizeof(float); - float coeff[DI_STIM210_kNumCoeffTempCalib_]; - for (uint8_t coeff_idx = 0; coeff_idx < DI_STIM210_kNumCoeffTempCalib_; coeff_idx++) + float coeff[STIM210_PARAMETERS_kNumCoeffTempCalib]; + for (uint8_t coeff_idx = 0; coeff_idx < STIM210_PARAMETERS_kNumCoeffTempCalib; coeff_idx++) { ENDIAN_memcpy(&coeff[coeff_idx], param + offset, sizeof(float)); offset += sizeof(float); } int ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].bias_compo_rad_s[axis]), - DI_STIM210_kNumCoeffTempCalib_, coeff, range_low_degC, range_high_degC); + STIM210_PARAMETERS_kNumCoeffTempCalib, coeff, range_low_degC, range_high_degC); if (ret < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); @@ -397,15 +382,15 @@ CCP_CmdRet Cmd_DI_STIM210_SET_ANG_VEL_SF_TEMP_CALIB(const CommonCmdPacket* packe ENDIAN_memcpy(&range_high_degC, param + offset, sizeof(float)); offset += sizeof(float); - float coeff[DI_STIM210_kNumCoeffTempCalib_]; - for (uint8_t coeff_idx = 0; coeff_idx < DI_STIM210_kNumCoeffTempCalib_; coeff_idx++) + float coeff[STIM210_PARAMETERS_kNumCoeffTempCalib]; + for (uint8_t coeff_idx = 0; coeff_idx < STIM210_PARAMETERS_kNumCoeffTempCalib; coeff_idx++) { ENDIAN_memcpy(&coeff[coeff_idx], param + offset, sizeof(float)); offset += sizeof(float); } int ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].scale_factor_compo[axis]), - DI_STIM210_kNumCoeffTempCalib_, coeff, range_low_degC, range_high_degC); + STIM210_PARAMETERS_kNumCoeffTempCalib, coeff, range_low_degC, range_high_degC); if (ret < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c index 18392076..8e8ee19a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c @@ -10,6 +10,10 @@ #include #include #include "../../../../DriverInstances/di_stim210.h" +#include "../../../../../Library/vector3.h" + +//Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/stim210_parameters.h" static Stim210Filter stim210_filter_; const Stim210Filter* const stim210_filter = &stim210_filter_; @@ -85,10 +89,7 @@ static void APP_STIM210_FILTER_exec_(void) static int APP_STIM210_FILTER_init_z_filter_(void) { - // 値は調整してよいが一旦これで進める - stim210_filter_.cut_off_freq_lpf_1st_Hz[0] = 1.0f; - stim210_filter_.cut_off_freq_lpf_1st_Hz[1] = 1.0f; - stim210_filter_.cut_off_freq_lpf_1st_Hz[2] = 1.0f; + VECTOR3_copy(stim210_filter_.cut_off_freq_lpf_1st_Hz, STIM210_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz); C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) @@ -114,13 +115,12 @@ static int APP_STIM210_FILTER_init_z_filter_(void) static int APP_STIM210_FILTER_init_spike_filter_(void) { - // 値は調整してよいが一旦これで進める for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { - stim210_filter_.spike_filter_config[axis_id].count_limit_to_accept = 3; - stim210_filter_.spike_filter_config[axis_id].count_limit_to_reject_continued_warning = 60; - stim210_filter_.spike_filter_config[axis_id].reject_threshold = 0.01; // rad/s - stim210_filter_.spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = 0.002; // rad/s + stim210_filter_.spike_filter_config[axis_id].count_limit_to_accept = STIM210_PARAMETERS_gyro_spike_count_limit_to_accept[axis_id]; + stim210_filter_.spike_filter_config[axis_id].count_limit_to_reject_continued_warning = STIM210_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[axis_id]; + stim210_filter_.spike_filter_config[axis_id].reject_threshold = STIM210_PARAMETERS_gyro_spike_reject_threshold_rad_s[axis_id]; + stim210_filter_.spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = STIM210_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[axis_id]; } C2A_MATH_ERROR filter_setting_result_three_axis = C2A_MATH_ERROR_OK; diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 3d421575..dc24164d 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -57,7 +57,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/rm3100_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/seiren_mtq_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/rw0003_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/stim210_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/stim210_parameters.c new file mode 100644 index 00000000..50e0172c --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/stim210_parameters.c @@ -0,0 +1,30 @@ +/** + * @file stim210_parameters.c + * @brief STIM210に関する衛星固有パラメータを管理する + */ + +#include + +// Gyro constant bias +// The following parameter should be tuned with experiment +const float STIM210_PARAMETERS_ang_vel_bias_compo_rad_s[PHYSICAL_CONST_THREE_DIM] = { -2.27E-04f, 2.80E-04f, -3.37E-04f }; + +// Gyro Bias and scale factor temperature calibration +const float STIM210_PARAMETERS_temperature_range_high_degC = 50.0f; +const float STIM210_PARAMETERS_temperature_range_low_degC = -50.0f; +// The following parameters should be tuned with temperature experiment results +const float STIM210_PARAMETERS_bias_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib] = { -1.698E-04f, 1.309E-06f }; +const float STIM210_PARAMETERS_scale_factor_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float STIM210_PARAMETERS_bias_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 2.990E-04, -6.060E-07f }; +const float STIM210_PARAMETERS_scale_factor_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float STIM210_PARAMETERS_bias_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib] = { -2.306E-04f, -6.303E-07f }; +const float STIM210_PARAMETERS_scale_factor_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; + +// Gyro filter +// 1st order Low Pass Filter +const float STIM210_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 1.0f, 1.0f, 1.0f }; +// Spike filter +const uint8_t STIM210_PARAMETERS_gyro_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t STIM210_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float STIM210_PARAMETERS_gyro_spike_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.01f, 0.01f, 0.01f }; +const float STIM210_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.002f, 0.002f, 0.002f }; diff --git a/src/src_user/Settings/SatelliteParameters/stim210_parameters.h b/src/src_user/Settings/SatelliteParameters/stim210_parameters.h new file mode 100644 index 00000000..68f30a56 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/stim210_parameters.h @@ -0,0 +1,37 @@ +/** + * @file stim210_parameters.h + * @brief STIM210に関する衛星固有パラメータを管理する + */ + +#ifndef STIM210_PARAMETERS_H_ +#define STIM210_PARAMETERS_H_ + +#include +#include + +// Constant value +const uint8_t STIM210_PARAMETERS_kNumCoeffTempCalib = 2; //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. + +// Angular Velocity Bias +extern const float STIM210_PARAMETERS_ang_vel_bias_compo_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Angular velocity bias @ component frame [rad/s] + +// Gyro Bias and scale factor temperature calibration +extern const float STIM210_PARAMETERS_temperature_range_high_degC; //!< Temperature range high [degC] +extern const float STIM210_PARAMETERS_temperature_range_low_degC; //!< Temperature range low [degC] +extern const float STIM210_PARAMETERS_bias_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame X axis +extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame X axis +extern const float STIM210_PARAMETERS_bias_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Y axis +extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Y axis +extern const float STIM210_PARAMETERS_bias_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Z axis +extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Z axis + +// Gyro filter +// 1st order Low Pass Filter +extern const float STIM210_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM]; //!< Cut off frequency for gyro filter [Hz] +// Spike filter +extern const uint8_t STIM210_PARAMETERS_gyro_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept +extern const uint8_t STIM210_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning +extern const float STIM210_PARAMETERS_gyro_spike_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold [rad/s] +extern const float STIM210_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input [rad/s] + +#endif // STIM210_PARAMETERS_H_ From bd794c93a22a727fc76f3dbf94e1b94a92db43c0 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 28 Jun 2023 10:48:15 +0900 Subject: [PATCH 124/176] [Fix] Delete unnecessary parameters about STIM210 --- .../Applications/DriverInstances/di_stim210.c | 10 ++-------- .../SatelliteParameters/stim210_parameters.h | 19 ++++++++----------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_stim210.c b/src/src_user/Applications/DriverInstances/di_stim210.c index a43566a3..39e9f636 100644 --- a/src/src_user/Applications/DriverInstances/di_stim210.c +++ b/src/src_user/Applications/DriverInstances/di_stim210.c @@ -74,15 +74,9 @@ static void DI_STIM210_init_(void) Printf("STIM210: q_c2b set error.\n"); // 初期化時のエラーはデバッグ表示して知らせるだけ } - ret_math = STIM210_set_ang_vel_bias_compo_rad_s(&stim210_driver_[STIM210_IDX_IN_UNIT], STIM210_PARAMETERS_ang_vel_bias_compo_rad_s); - if (ret_math != C2A_MATH_ERROR_OK) - { - Printf("STIM210: ang_vel_bias set error.\n"); - } - // 温度補正 - const float kRangeLow = STIM210_PARAMETERS_temperature_range_low_degC; // degC - const float kRangeHigh = STIM210_PARAMETERS_temperature_range_high_degC; // degC + const float kRangeLow = STIM210_PARAMETERS_temperature_range_low_degC; + const float kRangeHigh = STIM210_PARAMETERS_temperature_range_high_degC; // 計測値から設定するが温度依存性はかなり小さい // 特にSFは取付誤差と見分けづらいのでなしとする // SF,バイアスは y = SF*x - BIASという式を想定 diff --git a/src/src_user/Settings/SatelliteParameters/stim210_parameters.h b/src/src_user/Settings/SatelliteParameters/stim210_parameters.h index 68f30a56..1e13a5d1 100644 --- a/src/src_user/Settings/SatelliteParameters/stim210_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/stim210_parameters.h @@ -12,18 +12,15 @@ // Constant value const uint8_t STIM210_PARAMETERS_kNumCoeffTempCalib = 2; //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. -// Angular Velocity Bias -extern const float STIM210_PARAMETERS_ang_vel_bias_compo_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Angular velocity bias @ component frame [rad/s] - // Gyro Bias and scale factor temperature calibration -extern const float STIM210_PARAMETERS_temperature_range_high_degC; //!< Temperature range high [degC] -extern const float STIM210_PARAMETERS_temperature_range_low_degC; //!< Temperature range low [degC] -extern const float STIM210_PARAMETERS_bias_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame X axis -extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame X axis -extern const float STIM210_PARAMETERS_bias_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Y axis -extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Y axis -extern const float STIM210_PARAMETERS_bias_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Z axis -extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Z axis +extern const float STIM210_PARAMETERS_temperature_range_high_degC; //!< Temperature range high [degC] +extern const float STIM210_PARAMETERS_temperature_range_low_degC; //!< Temperature range low [degC] +extern const float STIM210_PARAMETERS_bias_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame X axis +extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame X axis +extern const float STIM210_PARAMETERS_bias_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Y axis +extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Y axis +extern const float STIM210_PARAMETERS_bias_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Bias coefficients @ component frame Z axis +extern const float STIM210_PARAMETERS_scale_factor_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib]; //!< Scale Factor coefficients @ component frame Z axis // Gyro filter // 1st order Low Pass Filter From 55797c7f94a9c4854929287979dc45c01bb60805 Mon Sep 17 00:00:00 2001 From: Riki Nakamura Date: Wed, 28 Jun 2023 14:19:11 +0900 Subject: [PATCH 125/176] Update coding rule URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f6cb3f0..9c22d019 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ $ git submodule update # コーディング規則 -- 基本的にCDHが制定している[コーディング規則](https://gitlab.com/ut_issl/c2a/documents_oss/-/blob/master/General/CodingRule.md)に従う +- 基本的にCDHが制定している[コーディング規則](https://github.com/ut-issl/c2a-core/blob/042cdfa15b0056880398e857cdd5d5a430562fd1/Docs/General/coding_rule.md)に従う - その他、AOCSとして特有な下記のことにも気をつける - 変数、関数命名時に単位がわかるように配慮する - 搭載S/W内では、系内で意思統一した単位系を用いる From b6367a79aad85f82b0aff4e09cb7aef0feb5e273 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 28 Jun 2023 13:14:02 +0900 Subject: [PATCH 126/176] [Feature] Separate parameters about Sagitta --- .../SensorFilters/sagitta_filter.c | 14 +++++++------- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/sagitta_parameters.c | 14 ++++++++++++++ .../SatelliteParameters/sagitta_parameters.h | 18 ++++++++++++++++++ 4 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/sagitta_parameters.h diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c index 08652323..1b8c6363 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c @@ -13,6 +13,9 @@ #include "../../aocs_manager.h" #include "../../../../../Library/physical_constants.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/sagitta_parameters.h" + static SagittaFilter sagitta_filter_; const SagittaFilter* const sagitta_filter = &sagitta_filter_; @@ -78,13 +81,10 @@ static void APP_SAGITTA_FILTER_exec_(void) static int APP_SAGITTA_FILTER_init_spike_filter_(void) { - // 値は調整してよいが一旦これで進める - sagitta_filter_.q_i2b_spike_filter_config.count_limit_to_accept = 20; - sagitta_filter_.q_i2b_spike_filter_config.count_limit_to_reject_continued_warning = 200; - sagitta_filter_.q_i2b_spike_filter_config.reject_threshold = - PHYSICAL_CONST_degree_to_radian(1.0f); - sagitta_filter_.q_i2b_spike_filter_config.amplitude_limit_to_accept_as_step = - PHYSICAL_CONST_degree_to_radian(0.6f); // STT精度は8.7 [秒角(1σ)] + sagitta_filter_.q_i2b_spike_filter_config.count_limit_to_accept = SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_accept; + sagitta_filter_.q_i2b_spike_filter_config.count_limit_to_reject_continued_warning = SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_reject_continued_warning; + sagitta_filter_.q_i2b_spike_filter_config.reject_threshold = SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad; + sagitta_filter_.q_i2b_spike_filter_config.amplitude_limit_to_accept_as_step = SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad; C2A_MATH_ERROR q_i2b_spike_filter_setting_result = C2A_MATH_ERROR_OK; C2A_MATH_ERROR filter_setting_result = diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index dc24164d..93ba07eb 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -58,7 +58,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/nanossoc_d60_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/oem7600_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/seiren_mtq_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/rw0003_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/component_selector_parameters.c diff --git a/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c new file mode 100644 index 00000000..e38955fe --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c @@ -0,0 +1,14 @@ +/** + * @file sagitta_parameters.c + * @brief Sagittaに関する衛星固有パラメータを管理する + */ + +#include + +// Spike Filter +uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_accept = 20; +uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_reject_continued_warning = 200; +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(1.0f); +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(0.6f); + +// Sun intensity threshold diff --git a/src/src_user/Settings/SatelliteParameters/sagitta_parameters.h b/src/src_user/Settings/SatelliteParameters/sagitta_parameters.h new file mode 100644 index 00000000..56f566cf --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/sagitta_parameters.h @@ -0,0 +1,18 @@ +/** + * @file sagitta_parameters.h + * @brief SAGITTAに関する衛星固有パラメータを管理する + */ + +#ifndef SAGITTA_PARAMETERS_H_ +#define SAGITTA_PARAMETERS_H_ + +#include +#include + +// Spike Filter +extern uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_accept; //!< Count limit to accept +extern uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_reject_continued_warning; //!< Count limit to reject continued warning +extern double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad; //!< Reject threshold [rad] +extern double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad; //!< Amplitude limit to accept as step input [rad] + +#endif // SAGITTA_PARAMETERS_H_ From f20daf0128866b0f4d1bc07ac8a5d09ac2bf6b42 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 28 Jun 2023 15:57:32 +0900 Subject: [PATCH 127/176] [Feature] Separate parameters about RW0.003 --- .../SensorFilters/rw0003_filter.c | 12 +++++++----- src/src_user/Settings/CMakeLists.txt | 2 +- .../Sample/rw0003_parameters.c | 12 ++++++++++++ .../SatelliteParameters/rw0003_parameters.h | 18 ++++++++++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/rw0003_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/rw0003_parameters.h diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c index 9c71e1a4..34af807e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c @@ -11,6 +11,9 @@ #include #include "../../aocs_manager.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/rw0003_parameters.h" + static Rw0003Filter rw0003_filter_; const Rw0003Filter* const rw0003_filter = &rw0003_filter_; @@ -29,11 +32,10 @@ static void APP_RW0003_FILTER_init_(void) for (uint8_t axis_id = 0; axis_id < RW0003_IDX_MAX; axis_id++) { rw0003_filter_.filter_error[axis_id] = C2A_MATH_ERROR_OK; - // 値は調整してよいが一旦これで進める - rw0003_filter_.spike_filter_config[axis_id].count_limit_to_accept = 3; - rw0003_filter_.spike_filter_config[axis_id].count_limit_to_reject_continued_warning = 10; - rw0003_filter_.spike_filter_config[axis_id].reject_threshold = 50.0; // rad/s - rw0003_filter_.spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = 25.0; // rad/s + rw0003_filter_.spike_filter_config[axis_id].count_limit_to_accept = RW0003_PARAMETERS_spike_filter_config_count_limit_to_accept[axis_id]; + rw0003_filter_.spike_filter_config[axis_id].count_limit_to_reject_continued_warning = RW0003_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning[axis_id]; + rw0003_filter_.spike_filter_config[axis_id].reject_threshold = RW0003_PARAMETERS_spike_filter_config_reject_threshold_rad_s[axis_id]; + rw0003_filter_.spike_filter_config[axis_id].amplitude_limit_to_accept_as_step = RW0003_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad_s[axis_id]; C2A_MATH_ERROR ret = SPIKE_FILTER_init(&APP_RW0003_FILTER_spike_[axis_id], rw0003_filter_.spike_filter_config[axis_id]); if (ret != C2A_MATH_ERROR_OK) diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 93ba07eb..46a12e43 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -60,7 +60,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/stim210_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/seiren_mtq_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/rw0003_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/rw0003_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/component_selector_parameters.c ) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/rw0003_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/rw0003_parameters.c new file mode 100644 index 00000000..61bcfda9 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/rw0003_parameters.c @@ -0,0 +1,12 @@ +/** + * @file rw0003_parameters.c + * @brief RW.0003に関する衛星固有パラメータを管理する + */ + +#include + +// Spike Filter +uint8_t RW0003_PARAMETERS_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = {3, 3, 3}; +uint8_t RW0003_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = {10, 10, 10}; +double RW0003_PARAMETERS_spike_filter_config_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM] = {50.0, 50.0, 50.0}; +double RW0003_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM] = {25.0, 25.0, 25.0}; diff --git a/src/src_user/Settings/SatelliteParameters/rw0003_parameters.h b/src/src_user/Settings/SatelliteParameters/rw0003_parameters.h new file mode 100644 index 00000000..5ca0b275 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/rw0003_parameters.h @@ -0,0 +1,18 @@ +/** + * @file rw0003_parameters.h + * @brief RW0.003に関する衛星固有パラメータを管理する + */ + +#ifndef RW0003_PARAMETERS_H_ +#define RW0003_PARAMETERS_H_ + +#include +#include + +// Spike Filter +extern uint8_t RW0003_PARAMETERS_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to accept +extern uint8_t RW0003_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM]; //!< Count limit to reject continued warning +extern double RW0003_PARAMETERS_spike_filter_config_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Reject threshold [rad/s] +extern double RW0003_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< Amplitude limit to accept as step input [rad/s] + +#endif // RW0003_PARAMETERS_H_ From 1399bd2db8fb4fdc891e4ea5a333ed1e82ef7878 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 28 Jun 2023 17:57:43 +0900 Subject: [PATCH 128/176] [Feature] Separate parameters about sensor selector --- .../SensorSelectors/gyro_selector.c | 5 ++++- .../SensorSelectors/magnetometer_selector.c | 5 ++++- src/src_user/Settings/CMakeLists.txt | 2 +- src/src_user/Settings/Modes/Transitions/sl_bdot.c | 5 +++-- .../Sample/component_selector_parameters.c | 9 +++++++++ .../component_selector_parameters.h | 15 +++++++++++++++ 6 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c create mode 100644 src/src_user/Settings/SatelliteParameters/component_selector_parameters.h diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c index 624cc642..237b4c62 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c @@ -15,6 +15,9 @@ #include "../SensorFilters/stim210_filter.h" #include "../../aocs_manager.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/component_selector_parameters.h" + static GyroSelector gyro_selector_; const GyroSelector* const gyro_selector = &gyro_selector_; @@ -31,7 +34,7 @@ AppInfo APP_GYRO_SELECTOR_create_app(void) static void APP_GYRO_SELECTOR_init_(void) { - gyro_selector_.state = APP_GYRO_SELECTOR_STATE_MPU; + gyro_selector_.state = COMPONENT_SELECTOR_PARAMETERS_initial_selected_gyro; gyro_selector_.auto_flag = 0; return; } diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c index 544d2ca9..2a83cacf 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c @@ -14,6 +14,9 @@ #include "../SensorFilters/rm3100_filter.h" #include "../../aocs_manager.h" +// Satellite Parameters +#include "../../../../../Settings/SatelliteParameters/component_selector_parameters.h" + static MagnetometerSelector magnetometer_selector_; const MagnetometerSelector* const magnetometer_selector = &magnetometer_selector_; @@ -30,7 +33,7 @@ AppInfo APP_MAG_SELECTOR_create_app(void) static void APP_MAG_SELECTOR_init_(void) { - magnetometer_selector_.state = APP_MAG_SELECTOR_STATE_RM_EXT; + magnetometer_selector_.state = COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer; magnetometer_selector_.auto_flag = 0; return; } diff --git a/src/src_user/Settings/CMakeLists.txt b/src/src_user/Settings/CMakeLists.txt index 46a12e43..d3fab7b8 100644 --- a/src/src_user/Settings/CMakeLists.txt +++ b/src/src_user/Settings/CMakeLists.txt @@ -61,7 +61,7 @@ set(C2A_SRCS ${C2A_SATELLITE_PARAMETERS_DIR}/sagitta_parameters.c # ${C2A_SATELLITE_PARAMETERS_DIR}/seiren_mtq_parameters.c ${C2A_SATELLITE_PARAMETERS_DIR}/rw0003_parameters.c - # ${C2A_SATELLITE_PARAMETERS_DIR}/component_selector_parameters.c + ${C2A_SATELLITE_PARAMETERS_DIR}/component_selector_parameters.c ) add_library(${PROJECT_NAME} OBJECT ${C2A_SRCS}) diff --git a/src/src_user/Settings/Modes/Transitions/sl_bdot.c b/src/src_user/Settings/Modes/Transitions/sl_bdot.c index 4147400e..7249ff8a 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_bdot.c +++ b/src/src_user/Settings/Modes/Transitions/sl_bdot.c @@ -18,6 +18,7 @@ // Satellite Parameters #include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include "../../../Settings/SatelliteParameters/component_selector_parameters.h" void BCL_load_initial_to_bdot(void) { @@ -100,8 +101,8 @@ void BCL_load_any_to_bdot(void) BCL_tool_register_cmd(OBCT_sec2cycle(time_sec), Cmd_CODE_DI_RM3100_SET_MAG_BIAS_COMPO_NT); time_sec += 1; - // 使う磁気センサをExternalに設定 - BCL_tool_prepare_param_uint8(APP_MAG_SELECTOR_STATE_RM_EXT); + // 使う磁気センサを設定 + BCL_tool_prepare_param_uint8(COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer); BCL_tool_register_cmd(OBCT_sec2cycle(time_sec), Cmd_CODE_APP_MAG_SELECTOR_SET_STATE); time_sec += 1; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c new file mode 100644 index 00000000..568fd320 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c @@ -0,0 +1,9 @@ +/** + * @file component_selector_parameters.c + * @brief コンポセレクタに関する衛星固有パラメータを管理する + */ + +#include "../component_selector_parameters.h" + +const APP_MAG_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer = APP_MAG_SELECTOR_STATE_RM_EXT; +const APP_GYRO_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_gyro = APP_GYRO_SELECTOR_STATE_MPU; diff --git a/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h b/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h new file mode 100644 index 00000000..033d3374 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h @@ -0,0 +1,15 @@ +/** + * @file component_selector_parameters.h + * @brief コンポセレクタに関する衛星固有パラメータを管理する + */ + +#ifndef COMPONENT_SELECTOR_PARAMETERS_H_ +#define COMPONENT_SELECTOR_PARAMETERS_H_ + +#include "../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h" +#include "../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h" + +extern const APP_MAG_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer; //!< Initial selected magnetometer +extern const APP_GYRO_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_gyro; //!< Initial selected gyro + +#endif // COMPONENT_SELECTOR_PARAMETERS_H_ From 95d6a4ca603099a65fec4dd0e1940e99d0d84faf Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 28 Jun 2023 19:43:23 +0900 Subject: [PATCH 129/176] [Fix] Remove gyro selector parameter --- .../AOCS/HardwareDependent/SensorSelectors/gyro_selector.c | 5 +---- .../Sample/component_selector_parameters.c | 1 - .../SatelliteParameters/component_selector_parameters.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c index 237b4c62..624cc642 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c @@ -15,9 +15,6 @@ #include "../SensorFilters/stim210_filter.h" #include "../../aocs_manager.h" -// Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/component_selector_parameters.h" - static GyroSelector gyro_selector_; const GyroSelector* const gyro_selector = &gyro_selector_; @@ -34,7 +31,7 @@ AppInfo APP_GYRO_SELECTOR_create_app(void) static void APP_GYRO_SELECTOR_init_(void) { - gyro_selector_.state = COMPONENT_SELECTOR_PARAMETERS_initial_selected_gyro; + gyro_selector_.state = APP_GYRO_SELECTOR_STATE_MPU; gyro_selector_.auto_flag = 0; return; } diff --git a/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c index 568fd320..27da6bb5 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c @@ -6,4 +6,3 @@ #include "../component_selector_parameters.h" const APP_MAG_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer = APP_MAG_SELECTOR_STATE_RM_EXT; -const APP_GYRO_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_gyro = APP_GYRO_SELECTOR_STATE_MPU; diff --git a/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h b/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h index 033d3374..fb1f0181 100644 --- a/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h @@ -10,6 +10,5 @@ #include "../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h" extern const APP_MAG_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer; //!< Initial selected magnetometer -extern const APP_GYRO_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_gyro; //!< Initial selected gyro #endif // COMPONENT_SELECTOR_PARAMETERS_H_ From a2c568325053ca7cf54dd986af248940ca97f7fb Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 11:53:50 +0200 Subject: [PATCH 130/176] Fix ExtLib directory path for CI --- .github/workflows/build.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcd4cf01..255b9afd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,8 @@ jobs: shell: powershell working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | - cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" + $extlib_dir=(pwd).Path + cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR="${extlib_dir}" cmake --build . --clean-first - name: install extlib @@ -77,7 +78,7 @@ jobs: - name: check extlib shell: powershell - working-directory: ./s2e-aobc/ExtLibraries + working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | ls cspice ls cspice/cspice_msvs/lib @@ -94,7 +95,7 @@ jobs: working-directory: ./s2e-aobc/s2e-aocs-core run: | cl.exe - cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -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-aobc/s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON cmake --build . --clean-first build_c2a_with_s2e_linux: @@ -162,7 +163,8 @@ jobs: if: steps.cache-extlib.outputs.cache-hit != 'true' working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | - cmake -DBUILD_64BIT=OFF + $extlib_dir=(pwd).Path + cmake -DBUILD_64BIT=OFF -DEXT_LIB_DIR="${extlib_dir}" cmake --build . --clean-first - name: install extlib @@ -172,7 +174,7 @@ jobs: cmake --install . - name: check extlib - working-directory: ./s2e-aobc/ExtLibraries + working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | ls cspice ls cspice/cspice_unix* @@ -190,5 +192,5 @@ jobs: CC: ${{ steps.compiler.outputs.CC }} CXX: ${{ steps.compiler.outputs.CXX }} run: | - cmake . -DBUILD_64BIT=OFF -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON + cmake . -DBUILD_64BIT=OFF -DEXT_LIB_DIR=../s2e-aobc/s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../../../ -DC2A_NAME=c2a-aobc -DUSE_C2A=ON cmake --build . --clean-first From 7e6b89f111776647e6b363318560e98f1c1b604b Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 12:00:07 +0200 Subject: [PATCH 131/176] Fix small --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 255b9afd..1a37294a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,7 +95,7 @@ jobs: working-directory: ./s2e-aobc/s2e-aocs-core run: | cl.exe - cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=../s2e-aobc/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: @@ -192,5 +192,5 @@ jobs: CC: ${{ steps.compiler.outputs.CC }} CXX: ${{ steps.compiler.outputs.CXX }} run: | - cmake . -DBUILD_64BIT=OFF -DEXT_LIB_DIR=../s2e-aobc/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 From ed18477eab0af466e2f4d8390ca43bc9f7d3b70a Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 12:06:44 +0200 Subject: [PATCH 132/176] Fix path description for linux --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a37294a..048306c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,8 +163,7 @@ jobs: if: steps.cache-extlib.outputs.cache-hit != 'true' working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | - $extlib_dir=(pwd).Path - cmake -DBUILD_64BIT=OFF -DEXT_LIB_DIR="${extlib_dir}" + cmake -DBUILD_64BIT=OFF -DEXT_LIB_DIR="$(pwd)" -DEXT_LIB_DIR="${extlib_dir}" cmake --build . --clean-first - name: install extlib From 0edfa630b62eb4f8203503ec463498342fe7076b Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 12:22:08 +0200 Subject: [PATCH 133/176] Fix small --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 048306c3..c20d021a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,7 +163,7 @@ jobs: if: steps.cache-extlib.outputs.cache-hit != 'true' working-directory: ./s2e-aobc/s2e-core/ExtLibraries run: | - cmake -DBUILD_64BIT=OFF -DEXT_LIB_DIR="$(pwd)" -DEXT_LIB_DIR="${extlib_dir}" + cmake -DBUILD_64BIT=OFF -DEXT_LIB_DIR="$(pwd)" cmake --build . --clean-first - name: install extlib From 6205143dca06ff3bb3fa4d823f45a67a4b4538a5 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 22:05:02 +0200 Subject: [PATCH 134/176] Add SatelliteParameters to Example --- .../attitude_control_parameters.c | 92 +++++++++ .../attitude_determination_parameters.c | 40 ++++ .../attitude_target_parameters.c | 27 +++ .../SatelliteParameters/fdir_parameters.c | 182 ++++++++++++++++++ .../SatelliteParameters/mpu9250_parameters.c | 41 ++++ .../nanossoc_d60_parameters.c | 22 +++ .../SatelliteParameters/orbit_parameters.c | 50 +++++ .../SatelliteParameters/rm3100_parameters.c | 38 ++++ .../structure_parameters.c | 14 ++ 9 files changed, 506 insertions(+) create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/mpu9250_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/rm3100_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/structure_parameters.c diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c new file mode 100644 index 00000000..e5a3d2d3 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c @@ -0,0 +1,92 @@ +/** + * @file attitude_control_parameters.c + * @brief 姿勢制御関連の衛星固有パラメータを管理する + */ + +#include + +// Bdot +const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM] = { -0.1f, -0.1f, -0.1f }; +const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_minimum_time_derivative_step_ms = 100; +const uint32_t ATTITUDE_CONTROL_PARAMETERS_bdot_mtq_output_time_length_ms = 1000; + +// Sun Pointing +const SUN_POINTING_AXIS_ID ATTITUDE_CONTROL_PARAMETERS_sun_pointing_axis_id = SUN_POINTING_AXIS_ID_Z; +// Gain +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_x = { 5.0e-5f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_y = { 10.0e-5f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_gains_body_z = { 0.0f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_x = { 1.0e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y = { 2.0e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z = { 7.0e-3f, 0.0f, 2.0e-2f }; +// MTQ control settings +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_rate_rad_s = 1.6e-3f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_transient = 0.6f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_transient = 0.0f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_stable = 0.8f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_stable = 0.25f; +// Integral control setting +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); +// Spin control setting +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s = 1.4e-2f; +// Low Pass Filter setting +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz = 10.0f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_Hz = 0.10f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_damping_factor = 1.0f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_trq_cutoff_freq_spin_axis_Hz = 0.03f; +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_spin_rate_cutoff_freq_Hz = 5e-4f; + +// Three Axis Control with MTQ +// Gain +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_x = { 1.2e-4f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_y = { 2.0f * 1.2e-4f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_gains_body_z = { 1.5f * 1.2e-4f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_x = { 2.5e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y = { 2.0f * 2.5e-2f, 0.0f, 0.0f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z = { 1.5f * 2.5e-2f, 0.0f, 0.0f }; +// MTQ control settings +// 下記の値はISS軌道を想定した値, 変更時は,HW側の出力最大値にかからない様に留意しながら,ゲインと組み合わせて調整すること. +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(18.0f); +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s = 5.0e-3f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient = 0.6f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient = 0.0f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable = 0.6f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_stable = 0.1f; +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +// Integral control setting +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +// Output torque Low Pass Filter(LPF) setting +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz = 10.0f; +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz = 0.3f; +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_damping_factor = 1.0f; + +// Three Axis Control with MTQ +// Gain +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_x = { 1.0e-3f, 0.0f, 1.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_y = { 2.0f * 1.0e-3f, 0.0f, 2.0f * 1.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_gains_body_z = { 2.0f * 1.0e-3f, 0.0f, 2.0f * 1.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_x = { 7.0e-2f, 0.0f, 2.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; +const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; + +// Unloading +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(-7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(0.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain = -1.0e-7f; +const APP_UNLOADING_EXEC ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable = APP_UNLOADING_EXEC_DISABLE; + +// Control Torques +const AOCS_MANAGER_CONSTANT_TORQUE_PERMISSION ATTITUDE_CONTROL_PARAMETERS_constant_torque_permission = AOCS_MANAGER_CONSTANT_TORQUE_DISABLE; +const float ATTITUDE_CONTROL_PARAMETERS_constant_torque_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 0.0f, 0.0f, 0.0f }; +const float ATTITUDE_CONTROL_PARAMETERS_internal_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 5.0e-3f, 5.0e-3f, 5.0e-3f }; +const float ATTITUDE_CONTROL_PARAMETERS_external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 3.0e-4f, 3.0e-4f, 3.0e-4f }; + +// Target Setting parameters +const float ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s = PHYSICAL_CONST_degree_to_radian(0.8f); +const float ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c new file mode 100644 index 00000000..55ab0951 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c @@ -0,0 +1,40 @@ +/** + * @file attitude_determination_parameters.c + * @brief 姿勢決定系に関する衛星固有パラメータを管理する + */ + +#include +#include +#include + +// Rough Three Axis Determination +const APP_RTAD_METHOD ATTITUDE_DETERMINATION_PARAMETERS_rtad_method = APP_RTAD_METHOD_TRIAD; +const float ATTITUDE_DETERMINATION_PARAMETERS_q_method_sun_vec_weight = 0.5f; + +// Fine Three Axis Determination +const APP_FTAD_METHOD ATTITUDE_DETERMINATION_PARAMETERS_ftad_method = APP_FTAD_METHOD_STT; + +// STT-Gyro Extended Kalman Filter +// STIM210 random noise N = 15deg/sq(h) +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_noise_standard_deviation_compo_rad_s[PHYSICAL_CONST_THREE_DIM] = { 4.363323e-5f, + 4.363323e-5f, + 4.363323e-5f }; +// STIM210 bias stability B = 0.3deg/h, K=3/2*B^2/N +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_standard_deviation_compo_rad_s2[PHYSICAL_CONST_THREE_DIM] = { 7.272205e-8f, + 7.272205e-8f, + 7.272205e-8f }; +// As result of sensor feature measurement, STIM210 noise looks a simple random walk model. +// When ECRV time constant is infinite, the model is same as a simple random walk, so we set very large value here. +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_gyro_random_walk_time_constant_s = 1e9f; + +// STT noise roll direction 10 arcsec, cross direction 2 arcsec +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_rad[PHYSICAL_CONST_THREE_DIM] = { 4.8481e-5f, + 9.6963e-6f, + 9.6963e-6f }; +// Process noise model +// We assume the attitude target is operated to synchronize with orbit. +const float kOrbitPeriodSec = 5700.0f; +const float kEkfComputationCycleSec = 0.1f; +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); +// The attitude rate process noise is not well tuned at this moment +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c new file mode 100644 index 00000000..6c8730cc --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c @@ -0,0 +1,27 @@ +/** + * @file attitude_target_parameters.c + * @brief 姿勢目標の衛星固有パラメータを管理する + */ + +#include + +// Target Calculation Mode +const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_CALC_MODE_MANUAL; + +// Manual mode target +const Quaternion ATTITUDE_TARGET_PARAMETERS_quaternion_target_i2t = { 0.5f, 0.5f, 0.5f, 0.5f }; + +// Target calculation from orbit +// Main target +extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_main_target_direction = APP_TAFO_TARGET_DIRECITON_SUN; +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_main_target_body[PHYSICAL_CONST_THREE_DIM] = { 1.0f, 0.0f, 0.0f }; +// Sub target +extern const APP_TAFO_TARGET_DIRECITON ATTITUDE_TARGET_PARAMETERS_sub_target_direction = APP_TAFO_TARGET_DIRECITON_EARTH_CENTER; +extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body[PHYSICAL_CONST_THREE_DIM] = { 0.0f, 1.0f, 0.0f }; +// Offset angle +extern const MATRIX33_ROTATION_AXIS ATTITUDE_TARGET_PARAMETERS_offset_angle_axis = MATRIX33_ROTATION_AXIS_X; +extern const float ATTITUDE_TARGET_PARAMETERS_offset_angle_rad = 0.0f; +// Target on earth surface +extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM] = { PHYSICAL_CONST_degree_to_radian(35.7130f), + PHYSICAL_CONST_degree_to_radian(139.7596f), + 23.0f }; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c new file mode 100644 index 00000000..5c4966ba --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c @@ -0,0 +1,182 @@ +/** + * @file fdir_parameters.c + * @brief FDIRに関する衛星固有パラメータを管理する + */ + +#include + +// Mode Manager +// Bdot +const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s = 5.0f * 60.0f; +const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s = 200.0f; +const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s = 5 * 60; +// Sun pointing control divergence anomaly +const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); +const float FDIR_PARAMETERS_sun_angle_div_time_limit_s = 50.0f * 60.0f; +const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s = 25 * 60; +// Rough three axis control with MTQ divergence anomaly +const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s = 5.0f * 60.0f; +const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s = 35 * 60; +// Rough three axis control with RW divergence anomaly +const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad = PHYSICAL_CONST_degree_to_radian(10.0f); +const float FDIR_PARAMETERS_rough_three_axis_rw_div_time_limit_s = 1.0f * 60.0f; +const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s = 5 * 60; +// Fine three axis control divergence anomaly +const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(5.0f); +const float FDIR_PARAMETERS_fine_three_axis_div_time_limit_s = 1.0f * 60.0f; +const uint32_t FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s = 5 * 60; +// Sensor invisible anomaly +const float FDIR_PARAMETERS_sun_invisible_time_limit_s = 50.0f * 60.0f; +const float FDIR_PARAMETERS_stt_invisible_time_limit_s = 10.0f * 60.0f; + + +// S/W over current detection +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_pic_mA = 200; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_stim210_mA = 1000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_sagitta_mA = 500; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_oem7600_mA = 1000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rm3100_mA = 200; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_nanossoc_d60_mA = 150; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_mtq_mA = 2000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_x_mA = 2000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_y_mA = 2000; +const uint16_t FDIR_PARAMETERS_sw_oc_threshold_rw0003_z_mA = 2000; +// Event handler settings +// STIM210 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_stim210 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_stim210_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_stim210 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_stim210_ms = 0; +// Sagitta +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_sagitta = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_sagitta_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_sagitta = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_sagitta_ms = 0; +// OEM7600 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_oem7600 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_oem7600_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_oem7600 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_oem7600_ms = 0; +// RM3100 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rm3100 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rm3100_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rm3100 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rm3100_ms = 0; +// nanoSSOC D60 +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_nanossoc_d60 = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_nanossoc_d60_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_nanossoc_d60 = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_nanossoc_d60_ms = 0; +// MTQ +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_mtq = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_mtq_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_mtq = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_mtq_ms = 0; +// RW +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_x = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_x_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_x = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_x_ms = 0; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_y = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_y_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_y = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_y_ms = 0; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_reset_count_threshold_rw0003_z = 10; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_reset_time_threshold_rw0003_z_ms = 5000; +const uint16_t FDIR_PARAMETERS_sw_oc_eh_power_off_count_threshold_rw0003_z = 5; +const uint32_t FDIR_PARAMETERS_sw_oc_eh_power_off_time_threshold_rw0003_z_ms = 0; + + +// H/W over current detection +// If the measured voltage is smaller than the following values, we assume that the H/W OC protection was executed by the INA260. +const float FDIR_PARAMETERS_hw_oc_detection_threshold_pic_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_stim210_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_sagitta_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_oem7600_V = 1.0f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rm3100_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_nanossoc_d60_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_mtq_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_x_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_y_V = 0.5f; +const float FDIR_PARAMETERS_hw_oc_detection_threshold_rw0003_z_V = 0.5f; +// Event handler settings +// STIM210 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_stim210 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_stim210_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_stim210 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_stim210_ms = 0; +// Sagitta +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_sagitta = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_sagitta_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_sagitta = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_sagitta_ms = 0; +// OEM7600 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_oem7600 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_oem7600_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_oem7600 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_oem7600_ms = 0; +// RM3100 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rm3100 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rm3100_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rm3100 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rm3100_ms = 0; +// nanoSSOC D60 +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_nanossoc_d60 = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_nanossoc_d60_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_nanossoc_d60 = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_nanossoc_d60_ms = 0; +// MTQ +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_mtq = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_mtq_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_mtq = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_mtq_ms = 0; +// RW +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_x = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_x_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_x = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_x_ms = 0; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_y = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_y_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_y = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_y_ms = 0; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_reset_count_threshold_rw0003_z = 10; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_reset_time_threshold_rw0003_z_ms = 5000; +const uint16_t FDIR_PARAMETERS_hw_oc_eh_power_off_count_threshold_rw0003_z = 5; +const uint32_t FDIR_PARAMETERS_hw_oc_eh_power_off_time_threshold_rw0003_z_ms = 0; + +// Telemetry anomaly +// MPU9250 +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_mp9250 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_mp9250_ms = 2000; +// RM3100 +// Use same value for all RM3100s (Users can also change the value with command for each RM3100) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rm3100 = 1000; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rm3100_ms = 2000; +const uint16_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_rm3100 = 10; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_rm3100_ms = 0; +// nanoSSOC D60 +// Use same value for all sun sensors (Users can also change the value with command for each sun sensors) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_nanossoc_d60 = 250; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_nanossoc_d60_ms = 2000; +// STIM210 +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_stim210 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_stim210_ms = 2000; +const uint16_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_count_threshold_stim210 = 5; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_switch_sensor_time_threshold_stim210_ms = 0; +// Sagitta +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_sagitta = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_sagitta_ms = 2000; +// OEM7600 +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_oem7600 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_oem7600_ms = 1000; +// RW0003 +// Use same value for all RWs (Users can also change the value with command for each RW) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_rw0003 = 10; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_rw0003_ms = 2000; +// INA260 +// Use same value for all current sensors (Users can also change the value with command for each current sensor) +const uint16_t FDIR_PARAMETERS_tlm_error_eh_reset_count_threshold_ina260 = 100; +const uint32_t FDIR_PARAMETERS_tlm_error_eh_reset_time_threshold_ina260_ms = 5000; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/mpu9250_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/mpu9250_parameters.c new file mode 100644 index 00000000..fede6c2c --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/mpu9250_parameters.c @@ -0,0 +1,41 @@ +/** + * @file mpu9250_parameters.c + * @brief MPU9250に関する衛星固有パラメータを管理する + */ + +#include + +// Communication port + +// Magnetometer bias +// The following parameter should be tuned with magnetic experiment +const float MPU9250_PARAMETERS_mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { -18417.53f, -30423.31f, 20969.18f }; + +// Gyro Bias and scale factor temperature calibration +const float MPU9250_PARAMETERS_temperature_range_high_degC = 60.0f; +const float MPU9250_PARAMETERS_temperature_range_low_degC = -50.0f; +// The following parameters should be tuned with temperature experiment results +const float MPU9250_PARAMETERS_bias_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { -0.024f, 0.0002f }; +const float MPU9250_PARAMETERS_scale_factor_coeff_compo_x[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float MPU9250_PARAMETERS_bias_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 0.0058f, -0.0005f }; +const float MPU9250_PARAMETERS_scale_factor_coeff_compo_y[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float MPU9250_PARAMETERS_bias_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 0.0179f, 0.0001f }; +const float MPU9250_PARAMETERS_scale_factor_coeff_compo_z[MPU9250_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; + +// Magnetometer filter +// 1st order Low Pass Filter +const float MPU9250_PARAMETERS_mag_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.5f, 0.5f, 0.5f }; +// Spike filter +const uint8_t MPU9250_PARAMETERS_mag_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t MPU9250_PARAMETERS_mag_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float MPU9250_PARAMETERS_mag_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM] = { 5000.0f, 5000.0f, 5000.0f }; +const float MPU9250_PARAMETERS_mag_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM] = { 1500.0f, 1500.0f, 1500.0f }; + +// Gyro filter +// 1st order Low Pass Filter +const float MPU9250_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.05f, 0.05f, 0.05f }; +// Spike filter +const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t MPU9250_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float MPU9250_PARAMETERS_gyro_spike_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.01f, 0.01f, 0.01f }; +const float MPU9250_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.005f, 0.005f, 0.005f }; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c new file mode 100644 index 00000000..72d17df6 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c @@ -0,0 +1,22 @@ +/** + * @file nanossoc_d60_parameters.c + * @brief nanossoc-D60に関する衛星固有パラメータを管理する + */ + +#include + +// Frame conversion +const Quaternion NANOSSOC_D60_PARAMETERS_py_quaternion_c2b = { 0.70710665f, 0.0f, 0.0f, 0.70710665f }; +const Quaternion NANOSSOC_D60_PARAMETERS_my_quaternion_c2b = { 0.0f, -0.70710665f, 0.70710665f, 0.0f }; +const Quaternion NANOSSOC_D60_PARAMETERS_pz_quaternion_c2b = { 0.0f, 0.0f, 0.70710665f, 0.70710665f }; +const Quaternion NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b = { -0.707106471f, 0.707106471f, 0.0f, 0.0f }; + +// Spike Filter +uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_accept = 10; +uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning = 60; +float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(3); +float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(180); + +// Sun intensity threshold +float NANOSSOC_D60_PARAMETERS_sun_intensity_lower_threshold_percent = 80.0f; +float NANOSSOC_D60_PARAMETERS_sun_intensity_upper_threshold_percent = 120.0f; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c new file mode 100644 index 00000000..d9c07057 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c @@ -0,0 +1,50 @@ +/** + * @file orbit_parameters.c + * @brief 軌道・時刻関連の衛星固有パラメータを管理する + */ + +#include +#include + +// Time +const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 + +// Orbit Calculator +const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method = APP_ORBIT_CALC_METHOD_KEPLER; + +// Kepler Orbit +const float ORBIT_PARAMETERS_kepler_semi_major_axis_km = 6899.3234f; +const float ORBIT_PARAMETERS_kepler_eccentricity = 4.86396e-4f; +const float ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); +const float ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); +const float ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); +const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; + +// TLE for SGP4 +// 1st line +const uint8_t ORBIT_PARAMETERS_tle_epoch_year = 22; +const double ORBIT_PARAMETERS_tle_epoch_day = 352.00000000; +const float ORBIT_PARAMETERS_tle_b_star = 0.0; +// 2nd line +const float ORBIT_PARAMETERS_tle_inclination_deg = 97.5068f; +const float ORBIT_PARAMETERS_tle_raan_deg = 339.7118f; +const float ORBIT_PARAMETERS_tle_eccentricity = 0.0011775f; +const float ORBIT_PARAMETERS_tle_arg_perigee_deg = 245.9837f; +const float ORBIT_PARAMETERS_tle_mean_anomaly_deg = 114.0163f; +const float ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; + +// GPS-R Orbit Propagator +// Initial orbital elements +const float ORBIT_PARAMETERS_gpsr_semi_major_axis_km = 6899.3234f; +const float ORBIT_PARAMETERS_gpsr_eccentricity = 4.86396e-4f; +const float ORBIT_PARAMETERS_gpsr_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); +const float ORBIT_PARAMETERS_gpsr_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); +const float ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(0.0f); +const double ORBIT_PARAMETERS_gpsr_epoch_jday = 2.459931936719433e6; +// Threshold +const float ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km = 50.0f; +const float ORBIT_PARAMETERS_gpsr_threshold_eccentricity = 0.1f; +const float ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(50.0f); +const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday = 0.1; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/rm3100_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/rm3100_parameters.c new file mode 100644 index 00000000..7439e422 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/rm3100_parameters.c @@ -0,0 +1,38 @@ +/** + * @file rm3100_parameters.c + * @brief RM3100に関する衛星固有パラメータを管理する + */ + +#include + +// AOBC RM3100 +// Magnetometer bias +// The following parameter should be tuned with magnetic experiment +const float RM3100_PARAMETERS_mag_aobc_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { 32808.59f, -79748.68f, 22059.96f }; + +// Magnetometer filter +// 1st order Low Pass Filter +const float RM3100_PARAMETERS_mag_aobc_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.5f, 0.5f, 0.5f }; +// Spike filter +const uint8_t RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t RM3100_PARAMETERS_mag_aobc_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float RM3100_PARAMETERS_mag_aobc_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM] = { 5000.0f, 5000.0f, 5000.0f }; +const float RM3100_PARAMETERS_mag_aobc_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM] = { 1500.0f, 1500.0f, 1500.0f }; + + +// External RM3100 +// Frame conversion +const Quaternion RM3100_PARAMETERS_mag_ext_quaternion_c2b = {-0.707106471, 0.707107127, 0.0f, 0.0f}; + +// Magnetometer bias +// The following parameter should be tuned with magnetic experiment +const float RM3100_PARAMETERS_mag_ext_bias_compo_nT[PHYSICAL_CONST_THREE_DIM] = { 36824.97f, -4596.48f, -1133.40f }; + +// Magnetometer filter +// 1st order Low Pass Filter +const float RM3100_PARAMETERS_mag_ext_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 0.5f, 0.5f, 0.5f }; +// Spike filter +const uint8_t RM3100_PARAMETERS_mag_ext_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t RM3100_PARAMETERS_mag_ext_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float RM3100_PARAMETERS_mag_ext_spike_reject_threshold_nT[PHYSICAL_CONST_THREE_DIM] = { 5000.0f, 5000.0f, 5000.0f }; +const float RM3100_PARAMETERS_mag_ext_spike_amplitude_limit_to_accept_as_step_nT[PHYSICAL_CONST_THREE_DIM] = { 1500.0f, 1500.0f, 1500.0f }; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/structure_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/structure_parameters.c new file mode 100644 index 00000000..3f6d3896 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/structure_parameters.c @@ -0,0 +1,14 @@ +/** + * @file structure_parameters.c + * @brief 衛星構造に関する衛星固有パラメータを管理する + */ + +#include + +const float STRUCTURE_PARAMETERS_mass_sc_kg = 10.0; + +const float STRUCTURE_PARAMETERS_rmm_sc_body_Am2[PHYSICAL_CONST_THREE_DIM] = {0.3f, 0.2f, 0.1f}; + +const float STRUCTURE_PARAMETERS_inertia_tensor_sc_body_kgm2[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM] = {{0.1f, 0.0f, 0.0f}, + {0.0f, 0.2f, 0.0f}, + {0.0f, 0.0f, 0.3f}}; From 5d249c1d3032a33c5b473d2116f21ed6c5f469d0 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 23:06:49 +0200 Subject: [PATCH 135/176] Translate to English --- README.md | 286 +++++++------ settings/MXL795/Board_Data.c | 808 +++++++++++++++++++++++++++++++++++ settings/MXL795/Board_Defs.h | 513 ++++++++++++++++++++++ settings/boards.txt | 45 ++ 4 files changed, 1531 insertions(+), 121 deletions(-) create mode 100644 settings/MXL795/Board_Data.c create mode 100644 settings/MXL795/Board_Defs.h create mode 100755 settings/boards.txt diff --git a/README.md b/README.md index 9c22d019..4bbea864 100644 --- a/README.md +++ b/README.md @@ -1,130 +1,171 @@ # C2A-AOBC -- 姿勢制御を行うOBCであるAOBC用搭載S/Wのレポジトリです。 -- 基本的には次のような構成で使うことを想定しています。 - - 実機 - - vMicro + Visual Studio 2019 - - SILS - - S2E-AOBC: [`develop` branch](https://github.com/ut-issl/s2e-aobc) - - WINGS: 最新の [`develop` branch](https://gitlab.com/ut_issl/wings/wings) - -# clone方法 -- `C2A-CORE` がgit submoduleとして含まれているので,以下で一発. -``` -$ git clone --recursive git@github.com:ut-issl/c2a-aobc.git -``` -- もしくは,以下でもOK. -``` -$ git clone git@github.com:ut-issl/c2a-aobc.git -$ cd c2a-aobc/ -$ git submodule init -$ git submodule update -``` -- clone後, windowsの場合は`RUN_AFTER_CLONE.bat`,macの場合は`RUN_AFTER_CLONE.command`を実行する. - - これで,localのgit環境設定が行われる - - 別ディレクトリなどに新しくcloneし直した場合も,実行し直す - - `Examples`フォルダへのコピーも行われる. - - -# 開発環境構築手順 -1. Arduino IDEのインストール - - [Arduino](https://www.arduino.cc/en/software)をインストールする - - Arduinoプロジェクトを起動する - - ボード設定の追加 - - `メニューバー>ファイル>環境設定` で追加のボードマネージャのURLに下記を入力してOKボタンを閉じる - - https://github.com/chipKIT32/chipKIT-core/raw/master/package_chipkit_index.json - - ChipKITのインストール - - `メニューバー>ツール>ボード>ボードマネージャ`の一番下にある「chipKIT」の「インストール」ボタンをクリック。 - - インストール完了を待つ。 -2. ボード定義ファイルの追加 - - `C:\Users\^^^\AppData\Local\Arduino15\packages\chipKIT\hardware\pic32\2.1.0`ディレクトリを開く - - ディレクトリ名は環境によって変わる可能性があるので注意 - - 上記ディレクトリ内の`board.txt`を開き、一番最後の行に移動する - - `settings\board.txt`を開き、内容をコピーし、上で開いている`2.1.0\board.txt`の最期に貼り付ける - - `2.1.0\board.txt`を保存して閉じる - - `settings\MXL795`ディレクトリをコピーし、`\2.1.0\variants`ディレクトリ内に貼り付ける - -3. Visual StudioとVisual Microをインストールする - - 手順は略 - -4. Visual Microの設定 - - `AOBC_BBM.sln`をダブルクリックして開く - - `拡張機能>vMicro`を選び、次のように設定する + +## Overview + +- `C2A-AOBC` is the flight software for the AOCS module developed by ISSL/UT, Seiren, and JAXA. +- Support environments + - For real AOBC (Attitude On Board Computer) + - [vMicro](https://www.visualmicro.com/) + Visual Studio 2019 + - For SILS/HILS test + - [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) + - [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. + - `General users` of the AOCS module do not need to use and edit this repository directly. They need to create a project-specific repository and define spacecraft-specific parameters within the repository. + +## Release style + +- We use [Semantic Versioning 2.0.0](https://semver.org/) as the versioning style + - Basic version format is `..`(like `4.0.0`) + - Public API is declared in the code itself (currently, there is no definitive list) +- All releases should be tagged as `v`(like `v4.0.0`) + +## For general users +### How to make a project-specific repository + +- We recommend making a project-specific repository named `c2a-aobc-hoge-satellite`. +- Users can refer to the `c2a-aobc/Example` directory to make a directory construction of `c2a-aobc-hoge-satellite`. + - **NOTE** Please rewrite the `example` to your project name. + ``` + TBW + ``` +- To use `git submodule` features, please see the reference [Git Tools Submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). + +### How to build and execute the project-specific repository + +- Please see the [README.md](./Example/README.md) in the `Example` directly. + +### How to join the development of this repository + +- When general users add new features or remove this repository's bugs, please make upstream pull requests from a forked repository. +- Before making PRs, please carefully read the following `Development style`. +- If you have any questions, please feel free to ask us. + + +## For main developers +## How to clone the repository + - This repository includes [c2a-core](https://github.com/ut-issl/c2a-core) with the `git submodule`. Please use the following commands to construct the directory. + ``` + $ git clone git@github.com:ut-issl/c2a-aobc.git + $ cd c2a-aobc/ + $ git submodule init + $ git submodule update + ``` + - Or use the following commands to clone the repository. + ``` + $ git clone --recursive git@github.com:ut-issl/c2a-aobc.git + ``` +- After the clone, please execute the following script file for the local setting of git. + - Windows: `RUN_AFTER_CLONE.bat` + - Mac: `RUN_AFTER_CLONE.command` + + +### How to construct the development environment for real AOBC +1. Install Arduino IDE + - Install [Arduino](https://www.arduino.cc/en/software) + - Launch Arduino project + - Add board setting + - `メニューバー>ファイル>環境設定` + - Add the following description to the additional board manager's URL + - https://github.com/chipKIT32/chipKIT-core/raw/master/package_chipkit_index.json + - Install `ChipKIT` + - `メニューバー>ツール>ボード>ボードマネージャ` + - Click `Install` of `chipKIT` +2. Add board definition file + - Open `C:\Users\^^^\AppData\Local\Arduino15\packages\chipKIT\hardware\pic32\2.1.0` directory + - **NOTE** This directory name is changed by the PC environment + - Open `board.txt`, and move to the end of the line. + - Open `c2a-aobc/settings/board.txt` + - Copy all contents and paste them to the end of the `2.1.0\board.txt`. + - Save and close the `2.1.0\board.txt`. + - Copy `c2a-aobc/settings/MXL795` directory and paste to the `\2.1.0\variants` directory + +3. Install Visual Studio 2019 and [vMicro](https://www.visualmicro.com/) + - TBW + +4. Setting of `vMicro` + - Open `C2A_AOBC.sln` + - Select `拡張機能>vMicro` and set it as follows. - IDE: Arduino 1.6/1.8 - Board: PIC32MX795F512L(80MHz) - - Port: 環境依存 - - -# テレコマ編集方法 -1. テレコマ DB のエクセルを用いて csv を編集 - - [テレコマDBの使い方](https://github.com/ut-issl/tlm-cmd-db) -2. tlm-cmd-generator を実行してソースコードに反映させる - - [tlm-cmd-generatorの使い方](https://github.com/ut-issl/c2a-tlm-cmd-code-generator) - - [ISSL用のブランチ](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/tree/feature/issl) に git checkout すること - - settings.json は AOBC 用に以下のように編集すること -``` -{ - "c2a_root_dir" : "各自の環境でのc2a-aobc/src/への相対パス", - "db_path" : "各自の環境でのc2a-aobc/src/src_user/Settings/TlmCmd/DataBase/への相対パス", - "db_prefix" : "ISSL6U_AOBC", - "tlm_id_range" : ["0x00", "0x100"], - "is_cmd_prefixed_in_db" : 1, - "input_file_encoding" : "utf-8", - "output_file_encoding" : "utf-8", - "is_main_obc" : 0 -} -``` - - -# 開発方針 -+ branch構成 -``` -├── main # 実機での動作保証のある最新版 -├── develop # ビルドが通る最新版 -└── feature/* # 開発途中のソフトウェア群 -└── hotfix/* # mainに対してパッチを当てるソフトウェア群 -``` -+ 機能開発の流れ - 1. developブランチからfeatureブランチを作成する. - 2. featureブランチ内で変更をcommit&pushする. - 3. 実装が完了した時点でdevelopブランチへのマージリクエストを出す. - 4. Maintainerによるレビューを行う.問題があれば 5 へ.なければ 6 へ. - 5. レビューへの回答,及び修正のcommit&pushを行う. 4 へ. - 6. Maintainerがdevelopブランチへのマージを行う. -+ バイナリファイル - - 基本的にコミットしない. - - 目安として.200kBを超えるファイルは怪しいと思おう! - - -# コーディング規則 -- 基本的にCDHが制定している[コーディング規則](https://github.com/ut-issl/c2a-core/blob/042cdfa15b0056880398e857cdd5d5a430562fd1/Docs/General/coding_rule.md)に従う -- その他、AOCSとして特有な下記のことにも気をつける - - 変数、関数命名時に単位がわかるように配慮する - - 搭載S/W内では、系内で意思統一した単位系を用いる - - 地上局での表示などでは人間が直感的に理解しやすい単位系でも良い - - 変数、関数命名時に座標系がわかるように配慮する - - `eci`: ECI - - `body`: 機体固定座標系 - - `compo`: コンポーネント座標系 - - 他にもあれば追記していく - - 略語については、[こちら](https://gitlab.com/ut_issl/c2a/c2a_core_oss/-/issues/77#note_568506174)を見る。 - - C2A Core部はC言語としてビルドされている点に注意 - - C2AのCore機能はC言語としてビルドされているので、C++と組み合わせる時には注意する。 - - 基本的には適切に`Extern "C"`を使えば問題ないはず - -# Tips -- Visual Studioをフィルタではなくフォルダで表示する設定にすると使いやすい -- S2Eと組み合わせた動作検証時のビルドエラーについては,まずは下記の操作を試してみると良い - - `git submodule update`を実施する - - S2Eのcmakeキャッシュを削除する - -# 本リポジトリに対するユーザーサイドリポジトリの設定について -- 衛星固有の設定ファイルなどを含んだユーザーリポジトリを作成する際は、`Examples` のフォルダ構成を参考にすること。 + - Port: depends on your environment + + +### How to edit TLM/CMD (Telemetry/Command) +1. Open TLM/CMD DB + - Please find detailed information on [How to use TLM/CMD DB](https://github.com/ut-issl/tlm-cmd-db). +2. Execute `tlm-cmd-generator` and generate source codes. + - [How to use tlm-cmd-generator](https://github.com/ut-issl/c2a-tlm-cmd-code-generator) + - Edit the `settings.json` as follows. + ``` + { + "c2a_root_dir" : "Relative path to c2a-aobc/src/", + "db_path" : "Relative path to c2a-aobc/src/src_user/Settings/TlmCmd/DataBase/", + "db_prefix" : "ISSL6U_AOBC", + "tlm_id_range" : ["0x00", "0x100"], + "is_cmd_prefixed_in_db" : 1, + "input_file_encoding" : "utf-8", + "output_file_encoding" : "utf-8", + "is_main_obc" : 0 + } + ``` + + +### Development style + +- Repository settings + - Branch structure + ``` + - main # The latest operation guaranteed codes for general users + - develop # The latest buildable codes for S2E primary developers + - feature/* # Developing codes + - hotfix/* # Bug Fix codes + ``` + - Push to `main` and `develop` is prohibited. All developers have to develop with `feature/*` or `hotfix/*` branch and make a pull request. + +- Flow of development + 1. Make a `feature/*` branch from the `develop` branch. + - To fix the small bugs in the latest release codes, please make `hotfix/*` branch from the `main` branch. + 2. Edit, commit, and push in the branch. + - Please check the coding conventions and the `code format` in the next section. + 3. Create a new pull request to the `develop` branch. + - The target branch becomes the `main` branch for the `hotfix/*` branches. + 4. A maintainer reviews the pull request. If some problems are found, the maintainer proposes modifications. + 5. According to the maintainer's proposal, the developer modifies the codes and goes back to 3. + 6. The maintainer merges the `feature/*` branch with the `develop` branch. + 7. The code owners decide to merge the `develop` branch to the `main` branch and release a new version. + +- Binary files + - Binary file commit is prohibited. + - Please write the link to such files, or make a script file to get the files. + - **Exception** + - 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 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 + - `eci`: ECI frame + - `body`: Body-fixed frame + - `compo`: Component frame + - For abbreviations, please see the ISSL internal [document](https://gitlab.com/ut_issl/c2a/c2a_core_oss/-/issues/77#note_568506174). + +### Tips +- When using `vMicro`, setting the `Visual Studio` to display by folders instead of filters makes it easier to use. +- For build errors when SILS test with `S2E`, try the following operations first. + - Perform `git submodule update`. + - Delete cmake cache of S2E. ## Brief history of development -- 21st Jan. 2021: Development start in a private repository at GitLab. -- 03rd Mar. 2023: Move to a private repository at GitHub to prepare publish as OSS +### History +- 21st Jan. 2021: Development started in a private repository at GitLab. +- 03rd Mar. 2023: Move to a private repository at GitHub to prepare to publish as OSS -## Contributors in the GitLab repository +### Contributors in the GitLab repository - ISSL, UT - Satoshi Ikari: 963 commits - Ryo Suzumoto: 367 commits @@ -138,3 +179,6 @@ $ git submodule update - Yoshinari Gyu: 13 commits - ArkEdge Space Inc. - sksat: 8 commits + +## Publications +1. S. Ikari, and et al., "Development of Compact and Highly Capable Integrated AOCS Module for CubeSats", [2022-f-41](https://archive.ists.ne.jp/upload_pdf/F-9-05.pdf), 33rd ISTS, 2022. diff --git a/settings/MXL795/Board_Data.c b/settings/MXL795/Board_Data.c new file mode 100644 index 00000000..f64864ae --- /dev/null +++ b/settings/MXL795/Board_Data.c @@ -0,0 +1,808 @@ +/************************************************************************/ +/* */ +/* Board_Data.c -- Board Customization Data for Digilent chipKIT Max32 */ +/* */ +/************************************************************************/ +/* Author: Gene Apperson */ +/* Copyright 2011, Digilent. All rights reserved */ +/************************************************************************/ +/* File Description: */ +/* */ +/* This file contains the board specific declartions and data structure */ +/* to customize the chipKIT MPIDE for use with the Digilent chipKIT */ +/* Max32 board. */ +/* */ +/* This code is based on earlier work: */ +/* Copyright (c) 2010, 2011 by Mark Sproul */ +/* Copyright (c) 2005, 2006 by David A. Mellis */ +/* */ +/************************************************************************/ +/* Revision History: */ +/* */ +/* 11/28/2011(GeneA): Created by splitting data out of Board_Defs.h */ +/* 03/31/2012(GeneA): added support for second LED on Rev D boards */ +/* 02/12/2013(GeneA): removed dependency on Microchip plib library */ +/* */ +/************************************************************************/ +//* This library is free software; you can redistribute it and/or +//* modify it under the terms of the GNU Lesser General Public +//* License as published by the Free Software Foundation; either +//* version 2.1 of the License, or (at your option) any later version. +//* +//* This library is distributed in the hope that it will be useful, +//* but WITHOUT ANY WARRANTY; without even the implied warranty of +//* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +//* Lesser General Public License for more details. +//* +//* You should have received a copy of the GNU Lesser General +//* Public License along with this library; if not, write to the +//* Free Software Foundation, Inc., 59 Temple Place, Suite 330, +//* Boston, MA 02111-1307 USA +/************************************************************************/ + +#if !defined(BOARD_DATA_C) +#define BOARD_DATA_C + +#include + +/* ------------------------------------------------------------ */ +/* Data Tables */ +/* ------------------------------------------------------------ */ +/* The following declarations define data used in pin mapping. */ +/* ------------------------------------------------------------ */ + +#if defined(OPT_BOARD_DATA) + +/* ------------------------------------------------------------ */ +/* This table is used to map from port number to the address of +** the TRIS register for the port. This is used for setting the +** pin direction. +*/ +const uint32_t port_to_tris_PGM[] = { + NOT_A_PORT, //index value 0 is not used + +#if defined(_PORTA) + (uint32_t)&TRISA, +#else + NOT_A_PORT, +#endif + +#if defined(_PORTB) + (uint32_t)&TRISB, +#else + NOT_A_PORT, +#endif + +#if defined(_PORTC) + (uint32_t)&TRISC, +#else + NOT_A_PORT, +#endif + +#if defined(_PORTD) + (uint32_t)&TRISD, +#else + NOT_A_PORT, +#endif + +#if defined(_PORTE) + (uint32_t)&TRISE, +#else + NOT_A_PORT, +#endif + +#if defined(_PORTF) + (uint32_t)&TRISF, +#else + NOT_A_PORT, +#endif + +#if defined(_PORTG) + (uint32_t)&TRISG, +#else + NOT_A_PORT, +#endif + + NOT_A_PORT, +}; + +/* ------------------------------------------------------------ */ +/* This table is used to map the digital pin number to the port +** containing that pin. +*/ +const uint8_t digital_pin_to_port_PGM[] = { + NOT_A_PORT, //0 + _IOPORT_PG, //1 AERXERR/RG15 + NOT_A_PORT, //2 VDD + _IOPORT_PE, //3 PMD5/RE5 + _IOPORT_PE, //4 PMD6/RE6 + _IOPORT_PE, //5 PMD7/RE7 + _IOPORT_PC, //6 T2CK/RC1 + _IOPORT_PC, //7 T3CK/AC2TX/RC2 + _IOPORT_PC, //8 T4CK/AC2RX/RC3 + _IOPORT_PC, //9 T5CK/SDI1/RC4 + _IOPORT_PG, //10 ECOL/SCK2/U6TX/U3RTS/PMA5/CN8/RG6 + _IOPORT_PG, //11 ECRS/SDA4/SDI2/U3RX/PMA4/CN9/RG7 + _IOPORT_PG, //12 ERXDV/AERXDV/ECRSDV/AECRSDV/SCL4/SDO2/U3TX/PMA3/CN10/RG8 + NOT_A_PORT, //13 //MCLR + _IOPORT_PG, //14 ERXCLK/AERXCLK/EREFCLK/AEREFCLK/SS2/U6RX/U3CTS/PMA2/CN11/RG9 + NOT_A_PORT, //15 //VSS + NOT_A_PORT, //16 //VDD + _IOPORT_PA, //17 TMS/RA0 + _IOPORT_PE, //18 AERXD0/INT1/RE8 + _IOPORT_PE, //19 AERXD1/INT2/RE9 + _IOPORT_PB, //20 AN5/C1IN+/VBUSON/CN7/RB5 + _IOPORT_PB, //21 AN4/C1IN-/CN6/RB4 + _IOPORT_PB, //22 AN3/C2IN+/CN5/RB3 + _IOPORT_PB, //23 AN2/C2IN-/CN4/RB2 + _IOPORT_PB, //24 PGEC1/AN1/CN3/RB1 + _IOPORT_PB, //25 PGED1/AN0/CN2/RB0 + _IOPORT_PB, //26 PGEC2/AN6/OCFA/RB6 + _IOPORT_PB, //27 PGED2/AN7/RB7 + _IOPORT_PA, //28 VREF+/CVREF+/AERXD3/PMA6/RA10 + _IOPORT_PA, //29 VREF-/CVREF-/AERXD2/PMA7/RA9 + NOT_A_PORT, //30 //AVDD + NOT_A_PORT, //31 //AVSS + _IOPORT_PB, //32 AN8/C1OUT/RB8 + _IOPORT_PB, //33 AN9/C2OUT/RB9 + _IOPORT_PB, //34 AN10/CVREFOUT/PMA13/RB10 + _IOPORT_PB, //35 AN11/ERXERR/AETXERR/PMA12/RB11 + NOT_A_PORT, //36 //VSS + NOT_A_PORT, //37 //VDD + _IOPORT_PA, //38 TCK/RA1 + _IOPORT_PF, //39 AC1TX/SCK4/U5TX/U2RTS/RF13 + _IOPORT_PF, //40 AC1RX/SS4/U5RX/U2CTS/RF12 + _IOPORT_PB, //41 AN12/ERXD0/AECRS/PMA11/RB12 + _IOPORT_PB, //42 AN13/ERXD1/AECOL/PMA10/RB13 + _IOPORT_PB, //43 AN14/ERXD2/AETXD3/PMALH/PMA1/RB14 + _IOPORT_PB, //44 AN15/ERXD3/AETXD2/OCFB/PMALL/PMA0/CN12/RB15 + NOT_A_PORT, //45 //VSS + NOT_A_PORT, //46 //VDD + _IOPORT_PD, //47 AETXD0/SS3/U4RX/U1CTS/CN20/RD14 + _IOPORT_PD, //48 AETXD1/SCK3/U4TX/U1RTS/CN21/RD15 + _IOPORT_PF, //49 SDA5/SDI4/U2RX/PMA9/CN17/RF4 + _IOPORT_PF, //50 SCL5/SDO4/U2TX/PMA8/CN18/RF5 + _IOPORT_PF, //51 USBID/RF3 + _IOPORT_PF, //52 SDA3/SDI3/U1RX/RF2 + _IOPORT_PF, //53 SCL3/SDO3/U1TX/RF8 + NOT_A_PORT, //54 //VBUS + NOT_A_PORT, //55 //VUSB3V3 + _IOPORT_PG, //56 D-/RG3 + _IOPORT_PG, //57 D+/RG2 + _IOPORT_PA, //58 SCL2/RA2 + _IOPORT_PA, //59 SDA2/RA3 + _IOPORT_PA, //60 TDI/RA4 + _IOPORT_PA, //61 TDO/RA5 + NOT_A_PORT, //62 //VDD + NOT_A_PORT, //63 //OSC1/CLKI/RC12 + NOT_A_PORT, //64 //OSC2/CLKO/RC15 + NOT_A_PORT, //65 //VSS + _IOPORT_PA, //66 AETXCLK/SCL1/INT3/RA14 + _IOPORT_PA, //67 AETXEN/SDA1/INT4/RA15 + _IOPORT_PD, //68 RTCC/EMDIO/AEMDIO/IC1/RD8 + _IOPORT_PD, //69 SS1/IC2/RD9 + _IOPORT_PD, //70 SCK1/IC3/PMCS2/PMA15/RD10 + _IOPORT_PD, //71 EMDC/AEMDC/IC4/PMCS1/PMA14/RD11 + _IOPORT_PD, //72 SDO1/OC1/INT0/RD0 + _IOPORT_PC, //73 //SOSCI/CN1/RC13 + _IOPORT_PC, //74 //SOSCO/T1CK/CN0/RC14 + NOT_A_PORT, //75 //VSS + _IOPORT_PD, //76 OC2/RD1 + _IOPORT_PD, //77 OC3/RD2 + _IOPORT_PD, //78 OC4/RD3 + _IOPORT_PD, //79 ETXD2/IC5/PMD12/RD12 + _IOPORT_PD, //80 ETXD3/PMD13/CN19/RD13 + _IOPORT_PD, //81 OC5/PMWR/CN13/RD4 + _IOPORT_PD, //82 PMRD/CN14/RD5 + _IOPORT_PD, //83 ETXEN/PMD14/CN15/RD6 + _IOPORT_PD, //84 ETXCLK/PMD15/CN16/RD7 + NOT_A_PORT, //85 //VCAP/VDDCORE + NOT_A_PORT, //86 //VDD + _IOPORT_PF, //87 C1RX/ETXD1/PMD11/RF0 + _IOPORT_PF, //88 C1TX/ETXD0/PMD10/RF1 + _IOPORT_PG, //89 C2TX/ETXERR/PMD9/RG1 + _IOPORT_PG, //90 C2RX/PMD8/RG0 + _IOPORT_PA, //91 TRCLK/RA6 + _IOPORT_PA, //92 TRD3/RA7 + _IOPORT_PE, //93 PMD0/RE0 + _IOPORT_PE, //94 PMD1/RE1 + _IOPORT_PG, //95 TRD2/RG14 + _IOPORT_PG, //96 TRD1/RG12 + _IOPORT_PG, //97 TRD0/RG13 + _IOPORT_PE, //98 PMD2/RE2 + _IOPORT_PE, //99 PMD3/RE3 + _IOPORT_PE, //100 PMD4/RE4 +}; + +/* ------------------------------------------------------------ */ +/* This table is used to map from digital pin number to a bit mask +** for the corresponding bit within the port. +*/ +const uint16_t digital_pin_to_bit_mask_PGM[] = { + NOT_A_PIN, //0 + _BV( 15 ), //AERXERR/RG15 + NOT_A_PIN, //VDD + _BV( 5 ), //PMD5/RE5 + _BV( 6 ), //PMD6/RE6 + _BV( 7 ), //PMD7/RE7 + _BV( 1 ), //T2CK/RC1 + _BV( 2 ), //T3CK/AC2TX/RC2 + _BV( 3 ), //T4CK/AC2RX/RC3 + _BV( 4 ), //T5CK/SDI1/RC4 + _BV( 6 ), //ECOL/SCK2/U6TX/U3RTS/PMA5/CN8/RG6 + _BV( 7 ), //ECRS/SDA4/SDI2/U3RX/PMA4/CN9/RG7 + _BV( 8 ), //ERXDV/AERXDV/ECRSDV/AECRSDV/SCL4/SDO2/U3TX/PMA3/CN10/RG8 + NOT_A_PIN, ////MCLR + _BV( 9 ), //ERXCLK/AERXCLK/EREFCLK/AEREFCLK/SS2/U6RX/U3CTS/PMA2/CN11/RG9 + NOT_A_PIN, ////VSS + NOT_A_PIN, ////VDD + _BV( 0 ), //TMS/RA0 + _BV( 8 ), //AERXD0/INT1/RE8 + _BV( 9 ), //AERXD1/INT2/RE9 + _BV( 5 ), //AN5/C1IN+/VBUSON/CN7/RB5 + _BV( 4 ), //AN4/C1IN-/CN6/RB4 + _BV( 3 ), //AN3/C2IN+/CN5/RB3 + _BV( 2 ), //AN2/C2IN-/CN4/RB2 + _BV( 1 ), //PGEC1/AN1/CN3/RB1 + _BV( 0 ), //PGED1/AN0/CN2/RB0 + _BV( 6 ), //PGEC2/AN6/OCFA/RB6 + _BV( 7 ), //PGED2/AN7/RB7 + _BV( 10 ), //VREF+/CVREF+/AERXD3/PMA6/RA10 + _BV( 9 ), //VREF-/CVREF-/AERXD2/PMA7/RA9 + NOT_A_PIN, ////AVDD + NOT_A_PIN, ////AVSS + _BV( 8 ), //AN8/C1OUT/RB8 + _BV( 9 ), //AN9/C2OUT/RB9 + _BV( 10 ), //AN10/CVREFOUT/PMA13/RB10 + _BV( 11 ), //AN11/ERXERR/AETXERR/PMA12/RB11 + NOT_A_PIN, ////VSS + NOT_A_PIN, ////VDD + _BV( 1 ), //TCK/RA1 + _BV( 13 ), //AC1TX/SCK4/U5TX/U2RTS/RF13 + _BV( 12 ), //AC1RX/SS4/U5RX/U2CTS/RF12 + _BV( 12 ), //AN12/ERXD0/AECRS/PMA11/RB12 + _BV( 13 ), //AN13/ERXD1/AECOL/PMA10/RB13 + _BV( 14 ), //AN14/ERXD2/AETXD3/PMALH/PMA1/RB14 + _BV( 15 ), //AN15/ERXD3/AETXD2/OCFB/PMALL/PMA0/CN12/RB15 + NOT_A_PIN, ////VSS + NOT_A_PIN, ////VDD + _BV( 14 ), //AETXD0/SS3/U4RX/U1CTS/CN20/RD14 + _BV( 15 ), //AETXD1/SCK3/U4TX/U1RTS/CN21/RD15 + _BV( 4 ), //SDA5/SDI4/U2RX/PMA9/CN17/RF4 + _BV( 5 ), //SCL5/SDO4/U2TX/PMA8/CN18/RF5 + _BV( 3 ), //USBID/RF3 + _BV( 2 ), //SDA3/SDI3/U1RX/RF2 + _BV( 8 ), //SCL3/SDO3/U1TX/RF8 + NOT_A_PIN, ////VBUS + NOT_A_PIN, ////VUSB3V3 + _BV( 3 ), //D-/RG3 + _BV( 2 ), //D+/RG2 + _BV( 2 ), //SCL2/RA2 + _BV( 3 ), //SDA2/RA3 + _BV( 4 ), //TDI/RA4 + _BV( 5 ), //TDO/RA5 + NOT_A_PIN, ////VDD + NOT_A_PIN, ////OSC1/CLKI/RC12 + NOT_A_PIN, ////OSC2/CLKO/RC15 + NOT_A_PIN, //VSS + _BV( 14 ), //AETXCLK/SCL1/INT3/RA14 + _BV( 15 ), //AETXEN/SDA1/INT4/RA15 + _BV( 8 ), //RTCC/EMDIO/AEMDIO/IC1/RD8 + _BV( 9 ), //SS1/IC2/RD9 + _BV( 10 ), //SCK1/IC3/PMCS2/PMA15/RD10 + _BV( 11 ), //EMDC/AEMDC/IC4/PMCS1/PMA14/RD11 + _BV( 0 ), //SDO1/OC1/INT0/RD0 + _BV( 13 ), ////SOSCI/CN1/RC13 + _BV( 14 ), ////SOSCO/T1CK/CN0/RC14 + NOT_A_PIN, ////VSS + _BV( 1 ), //OC2/RD1 + _BV( 2 ), //OC3/RD2 + _BV( 3 ), //OC4/RD3 + _BV( 12 ), //ETXD2/IC5/PMD12/RD12 + _BV( 13 ), //ETXD3/PMD13/CN19/RD13 + _BV( 4 ), //OC5/PMWR/CN13/RD4 + _BV( 5 ), //PMRD/CN14/RD5 + _BV( 6 ), //ETXEN/PMD14/CN15/RD6 + _BV( 7 ), //ETXCLK/PMD15/CN16/RD7 + NOT_A_PIN, ////VCAP/VDDCORE + NOT_A_PIN, ////VDD + _BV( 0 ), //C1RX/ETXD1/PMD11/RF0 + _BV( 1 ), //C1TX/ETXD0/PMD10/RF1 + _BV( 1 ), //C2TX/ETXERR/PMD9/RG1 + _BV( 0 ), //C2RX/PMD8/RG0 + _BV( 6 ), //TRCLK/RA6 + _BV( 7 ), //TRD3/RA7 + _BV( 0 ), //PMD0/RE0 + _BV( 1 ), //PMD1/RE1 + _BV( 14 ), //TRD2/RG14 + _BV( 12 ), //TRD1/RG12 + _BV( 13 ), //TRD0/RG13 + _BV( 2 ), //PMD2/RE2 + _BV( 3 ), //PMD3/RE3 + _BV( 4 ), //PMD4/RE4 +}; + +/* ------------------------------------------------------------ */ +/* This table is used to map from digital pin number to the output +** compare number, input capture number, and timer external clock +** input associated with that pin. +*/ +const uint16_t digital_pin_to_timer_PGM[] = { + NOT_ON_TIMER, //0 + NOT_ON_TIMER, //1 AERXERR/RG15 + NOT_ON_TIMER, //2 VDD + NOT_ON_TIMER, //3 PMD5/RE5 + NOT_ON_TIMER, //4 PMD6/RE6 + NOT_ON_TIMER, //5 PMD7/RE7 + _TIMER_TCK2, //6 T2CK/RC1 + _TIMER_TCK3, //7 T3CK/AC2TX/RC2 + _TIMER_TCK4, //8 T4CK/AC2RX/RC3 + _TIMER_TCK5, //9 T5CK/SDI1/RC4 + NOT_ON_TIMER, //10 ECOL/SCK2/U6TX/U3RTS/PMA5/CN8/RG6 + NOT_ON_TIMER, //11 ECRS/SDA4/SDI2/U3RX/PMA4/CN9/RG7 + NOT_ON_TIMER, //12 ERXDV/AERXDV/ECRSDV/AECRSDV/SCL4/SDO2/U3TX/PMA3/CN10/RG8 + NOT_ON_TIMER, //13 //MCLR + NOT_ON_TIMER, //14 ERXCLK/AERXCLK/EREFCLK/AEREFCLK/SS2/U6RX/U3CTS/PMA2/CN11/RG9 + NOT_ON_TIMER, //15 //VSS + NOT_ON_TIMER, //16 //VDD + NOT_ON_TIMER, //17 TMS/RA0 + NOT_ON_TIMER, //18 AERXD0/INT1/RE8 + NOT_ON_TIMER, //19 AERXD1/INT2/RE9 + NOT_ON_TIMER, //20 AN5/C1IN+/VBUSON/CN7/RB5 + NOT_ON_TIMER, //21 AN4/C1IN-/CN6/RB4 + NOT_ON_TIMER, //22 AN3/C2IN+/CN5/RB3 + NOT_ON_TIMER, //23 AN2/C2IN-/CN4/RB2 + NOT_ON_TIMER, //24 PGEC1/AN1/CN3/RB1 + NOT_ON_TIMER, //25 PGED1/AN0/CN2/RB0 + NOT_ON_TIMER, //26 PGEC2/AN6/OCFA/RB6 + NOT_ON_TIMER, //27 PGED2/AN7/RB7 + NOT_ON_TIMER, //28 VREF+/CVREF+/AERXD3/PMA6/RA10 + NOT_ON_TIMER, //29 VREF-/CVREF-/AERXD2/PMA7/RA9 + NOT_ON_TIMER, //30 //AVDD + NOT_ON_TIMER, //31 //AVSS + NOT_ON_TIMER, //32 AN8/C1OUT/RB8 + NOT_ON_TIMER, //33 AN9/C2OUT/RB9 + NOT_ON_TIMER, //34 AN10/CVREFOUT/PMA13/RB10 + NOT_ON_TIMER, //35 AN11/ERXERR/AETXERR/PMA12/RB11 + NOT_ON_TIMER, //36 //VSS + NOT_ON_TIMER, //37 //VDD + NOT_ON_TIMER, //38 TCK/RA1 + NOT_ON_TIMER, //39 AC1TX/SCK4/U5TX/U2RTS/RF13 + NOT_ON_TIMER, //40 AC1RX/SS4/U5RX/U2CTS/RF12 + NOT_ON_TIMER, //41 AN12/ERXD0/AECRS/PMA11/RB12 + NOT_ON_TIMER, //42 AN13/ERXD1/AECOL/PMA10/RB13 + NOT_ON_TIMER, //43 AN14/ERXD2/AETXD3/PMALH/PMA1/RB14 + NOT_ON_TIMER, //44 AN15/ERXD3/AETXD2/OCFB/PMALL/PMA0/CN12/RB15 + NOT_ON_TIMER, //45 //VSS + NOT_ON_TIMER, //46 //VDD + NOT_ON_TIMER, //47 AETXD0/SS3/U4RX/U1CTS/CN20/RD14 + NOT_ON_TIMER, //48 AETXD1/SCK3/U4TX/U1RTS/CN21/RD15 + NOT_ON_TIMER, //49 SDA5/SDI4/U2RX/PMA9/CN17/RF4 + NOT_ON_TIMER, //50 SCL5/SDO4/U2TX/PMA8/CN18/RF5 + NOT_ON_TIMER, //51 USBID/RF3 + NOT_ON_TIMER, //52 SDA3/SDI3/U1RX/RF2 + NOT_ON_TIMER, //53 SCL3/SDO3/U1TX/RF8 + NOT_ON_TIMER, //54 //VBUS + NOT_ON_TIMER, //55 //VUSB3V3 + NOT_ON_TIMER, //56 D-/RG3 + NOT_ON_TIMER, //57 D+/RG2 + NOT_ON_TIMER, //58 SCL2/RA2 + NOT_ON_TIMER, //59 SDA2/RA3 + NOT_ON_TIMER, //60 TDI/RA4 + NOT_ON_TIMER, //61 TDO/RA5 + NOT_ON_TIMER, //62 //VDD + NOT_ON_TIMER, //63 //OSC1/CLKI/RC12 + NOT_ON_TIMER, //64 //OSC2/CLKO/RC15 + NOT_ON_TIMER, //65 //VSS + NOT_ON_TIMER, //66 AETXCLK/SCL1/INT3/RA14 + NOT_ON_TIMER, //67 AETXEN/SDA1/INT4/RA15 + _TIMER_IC1, //68 RTCC/EMDIO/AEMDIO/IC1/RD8 + _TIMER_IC2, //69 SS1/IC2/RD9 + _TIMER_IC3, //70 SCK1/IC3/PMCS2/PMA15/RD10 + _TIMER_IC4, //71 EMDC/AEMDC/IC4/PMCS1/PMA14/RD11 + _TIMER_OC1, //72 SDO1/OC1/INT0/RD0 + NOT_ON_TIMER, //73 //SOSCI/CN1/RC13 + _TIMER_TCK1, //74 //SOSCO/T1CK/CN0/RC14 + NOT_ON_TIMER, //75 //VSS + _TIMER_OC2, //76 OC2/RD1 + _TIMER_OC3, //77 OC3/RD2 + _TIMER_OC4, //78 OC4/RD3 + _TIMER_IC5, //79 ETXD2/IC5/PMD12/RD12 + NOT_ON_TIMER, //80 ETXD3/PMD13/CN19/RD13 + _TIMER_OC5, //81 OC5/PMWR/CN13/RD4 + NOT_ON_TIMER, //82 PMRD/CN14/RD5 + NOT_ON_TIMER, //83 ETXEN/PMD14/CN15/RD6 + NOT_ON_TIMER, //84 ETXCLK/PMD15/CN16/RD7 + NOT_ON_TIMER, //85 //VCAP/VDDCORE + NOT_ON_TIMER, //86 //VDD + NOT_ON_TIMER, //87 C1RX/ETXD1/PMD11/RF0 + NOT_ON_TIMER, //88 C1TX/ETXD0/PMD10/RF1 + NOT_ON_TIMER, //89 C2TX/ETXERR/PMD9/RG1 + NOT_ON_TIMER, //90 C2RX/PMD8/RG0 + NOT_ON_TIMER, //91 TRCLK/RA6 + NOT_ON_TIMER, //92 TRD3/RA7 + NOT_ON_TIMER, //93 PMD0/RE0 + NOT_ON_TIMER, //94 PMD1/RE1 + NOT_ON_TIMER, //95 TRD2/RG14 + NOT_ON_TIMER, //96 TRD1/RG12 + NOT_ON_TIMER, //97 TRD0/RG13 + NOT_ON_TIMER, //98 PMD2/RE2 + NOT_ON_TIMER, //99 PMD3/RE3 + NOT_ON_TIMER, //100 PMD4/RE4 +}; + +const uint32_t digital_pin_to_cn_PGM[] = +{ + NOT_CN_PIN, //0 + NOT_CN_PIN, //1 AERXERR/RG15 + NOT_CN_PIN, //2 VDD + NOT_CN_PIN, //3 PMD5/RE5 + NOT_CN_PIN, //4 PMD6/RE6 + NOT_CN_PIN, //5 PMD7/RE7 + NOT_CN_PIN, //6 T2CK/RC1 + NOT_CN_PIN, //7 T3CK/AC2TX/RC2 + NOT_CN_PIN, //8 T4CK/AC2RX/RC3 + NOT_CN_PIN, //9 T5CK/SDI1/RC4 + _BV(8), //10 ECOL/SCK2/U6TX/U3RTS/PMA5/CN8/RG6 + _BV(9), //11 ECRS/SDA4/SDI2/U3RX/PMA4/CN9/RG7 + _BV(10), //12 ERXDV/AERXDV/ECRSDV/AECRSDV/SCL4/SDO2/U3TX/PMA3/CN10/RG8 + NOT_CN_PIN, //13 //MCLR + _BV(11), //14 ERXCLK/AERXCLK/EREFCLK/AEREFCLK/SS2/U6RX/U3CTS/PMA2/CN11/RG9 + NOT_CN_PIN, //15 //VSS + NOT_CN_PIN, //16 //VDD + NOT_CN_PIN, //17 TMS/RA0 + NOT_CN_PIN, //18 AERXD0/INT1/RE8 + NOT_CN_PIN, //19 AERXD1/INT2/RE9 + NOT_CN_PIN, //20 AN5/C1IN+/VBUSON/CN7/RB5 + _BV(6), //21 AN4/C1IN-/CN6/RB4 + _BV(5), //22 AN3/C2IN+/CN5/RB3 + _BV(4), //23 AN2/C2IN-/CN4/RB2 + _BV(3), //24 PGEC1/AN1/CN3/RB1 + _BV(2), //25 PGED1/AN0/CN2/RB0 + NOT_CN_PIN, //26 PGEC2/AN6/OCFA/RB6 + NOT_CN_PIN, //27 PGED2/AN7/RB7 + NOT_CN_PIN, //28 VREF+/CVREF+/AERXD3/PMA6/RA10 + NOT_CN_PIN, //29 VREF-/CVREF-/AERXD2/PMA7/RA9 + NOT_CN_PIN, //30 //AVDD + NOT_CN_PIN, //31 //AVSS + NOT_CN_PIN, //32 AN8/C1OUT/RB8 + NOT_CN_PIN, //33 AN9/C2OUT/RB9 + NOT_CN_PIN, //34 AN10/CVREFOUT/PMA13/RB10 + NOT_CN_PIN, //35 AN11/ERXERR/AETXERR/PMA12/RB11 + NOT_CN_PIN, //36 //VSS + NOT_CN_PIN, //37 //VDD + NOT_CN_PIN, //38 TCK/RA1 + NOT_CN_PIN, //39 AC1TX/SCK4/U5TX/U2RTS/RF13 + NOT_CN_PIN, //40 AC1RX/SS4/U5RX/U2CTS/RF12 + NOT_CN_PIN, //41 AN12/ERXD0/AECRS/PMA11/RB12 + NOT_CN_PIN, //42 AN13/ERXD1/AECOL/PMA10/RB13 + NOT_CN_PIN, //43 AN14/ERXD2/AETXD3/PMALH/PMA1/RB14 + _BV(12), //44 AN15/ERXD3/AETXD2/OCFB/PMALL/PMA0/CN12/RB15 + NOT_CN_PIN, //45 //VSS + NOT_CN_PIN, //46 //VDD + _BV(20), //47 AETXD0/SS3/U4RX/U1CTS/CN20/RD14 + _BV(21), //48 AETXD1/SCK3/U4TX/U1RTS/CN21/RD15 + _BV(17), //49 SDA5/SDI4/U2RX/PMA9/CN17/RF4 + _BV(18), //50 SCL5/SDO4/U2TX/PMA8/CN18/RF5 + NOT_CN_PIN, //51 USBID/RF3 + NOT_CN_PIN, //52 SDA3/SDI3/U1RX/RF2 + NOT_CN_PIN, //53 SCL3/SDO3/U1TX/RF8 + NOT_CN_PIN, //54 //VBUS + NOT_CN_PIN, //55 //VUSB3V3 + NOT_CN_PIN, //56 D-/RG3 + NOT_CN_PIN, //57 D+/RG2 + NOT_CN_PIN, //58 SCL2/RA2 + NOT_CN_PIN, //59 SDA2/RA3 + NOT_CN_PIN, //60 TDI/RA4 + NOT_CN_PIN, //61 TDO/RA5 + NOT_CN_PIN, //62 //VDD + NOT_CN_PIN, //63 //OSC1/CLKI/RC12 + NOT_CN_PIN, //64 //OSC2/CLKO/RC15 + NOT_CN_PIN, //65 //VSS + NOT_CN_PIN, //66 AETXCLK/SCL1/INT3/RA14 + NOT_CN_PIN, //67 AETXEN/SDA1/INT4/RA15 + NOT_CN_PIN, //68 RTCC/EMDIO/AEMDIO/IC1/RD8 + NOT_CN_PIN, //69 SS1/IC2/RD9 + NOT_CN_PIN, //70 SCK1/IC3/PMCS2/PMA15/RD10 + NOT_CN_PIN, //71 EMDC/AEMDC/IC4/PMCS1/PMA14/RD11 + NOT_CN_PIN, //72 SDO1/OC1/INT0/RD0 + _BV(1), //73 //SOSCI/CN1/RC13 + _BV(0), //74 //SOSCO/T1CK/CN0/RC14 + NOT_CN_PIN, //75 //VSS + NOT_CN_PIN, //76 OC2/RD1 + NOT_CN_PIN, //77 OC3/RD2 + NOT_CN_PIN, //78 OC4/RD3 + NOT_CN_PIN, //79 ETXD2/IC5/PMD12/RD12 + _BV(19), //80 ETXD3/PMD13/CN19/RD13 + _BV(13), //81 OC5/PMWR/CN13/RD4 + _BV(14), //82 PMRD/CN14/RD5 + _BV(15), //83 ETXEN/PMD14/CN15/RD6 + _BV(16), //84 ETXCLK/PMD15/CN16/RD7 + NOT_CN_PIN, //85 //VCAP/VDDCORE + NOT_CN_PIN, //86 //VDD + NOT_CN_PIN, //87 C1RX/ETXD1/PMD11/RF0 + NOT_CN_PIN, //88 C1TX/ETXD0/PMD10/RF1 + NOT_CN_PIN, //89 C2TX/ETXERR/PMD9/RG1 + NOT_CN_PIN, //90 C2RX/PMD8/RG0 + NOT_CN_PIN, //91 TRCLK/RA6 + NOT_CN_PIN, //92 TRD3/RA7 + NOT_CN_PIN, //93 PMD0/RE0 + NOT_CN_PIN, //94 PMD1/RE1 + NOT_CN_PIN, //95 TRD2/RG14 + NOT_CN_PIN, //96 TRD1/RG12 + NOT_CN_PIN, //97 TRD0/RG13 + NOT_CN_PIN, //98 PMD2/RE2 + NOT_CN_PIN, //99 PMD3/RE3 + NOT_CN_PIN, //100 PMD4/RE4 +}; + +/* ------------------------------------------------------------ */ +/* Include Files for Board Customization Functions */ +/* ------------------------------------------------------------ */ + + +/* ------------------------------------------------------------ */ +/* Board Customization Functions */ +/* ------------------------------------------------------------ */ +/* */ +/* The following can be used to customize the behavior of some */ +/* of the core API functions. These provide hooks that can be */ +/* used to extend or replace the default behavior of the core */ +/* functions. To use one of these functions, add the desired */ +/* code to the function skeleton below and then set the value */ +/* of the appropriate compile switch above to 1. This will */ +/* cause the hook function to be compiled into the build and */ +/* to cause the code to call the hook function to be compiled */ +/* into the appropriate core function. */ +/* */ +/* ------------------------------------------------------------ */ +/*** _board_init +** +** Parameters: +** none +** +** Return Value: +** none +** +** Errors: +** none +** +** Description: +** This function is called from the core init() function. +** This can be used to perform any board specific init +** that needs to be done when the processor comes out of +** reset and before the user sketch is run. +*/ +#if (OPT_BOARD_INIT != 0) + +void _board_init(void) { + + /* Turn off Secondary oscillator so pins can be used as GPIO + */ + //OSCCONCLR = _OSCCON_SOSCEN_MASK; + +} + +#endif + +/* ------------------------------------------------------------ */ +/*** _board_pinMode +** +** Parameters: +** pin - digital pin number to configure +** mode - mode to which the pin should be configured +** +** Return Value: +** Returns 0 if not handled, !0 if handled. +** +** Errors: +** none +** +** Description: +** This function is called at the beginning of the pinMode +** function. It can perform any special processing needed +** when setting the pin mode. If this function returns zero, +** control will pass through the normal pinMode code. If +** it returns a non-zero value the normal pinMode code isn't +** executed. +*/ +#if (OPT_BOARD_DIGITAL_IO != 0) + +int _board_pinMode(uint8_t pin, uint8_t mode) { + + return 0; + +} + +#endif + +/* ------------------------------------------------------------ */ +/*** _board_getPinMode +** +** Parameters: +** pin - digital pin number +** mode - pointer to variable to receive mode value +** +** Return Value: +** Returns 0 if not handled, !0 if handled. +** +** Errors: +** none +** +** Description: +** This function is called at the beginning of the getPinMode +** function. It can perform any special processing needed +** when getting the pin mode. If this function returns zero, +** control will pass through the normal getPinMode code. If +** it returns a non-zero value the normal getPinMode code isn't +** executed. +*/ +#if (OPT_BOARD_DIGITAL_IO != 0) + +int _board_getPinMode(uint8_t pin, uint8_t * mode) { + + return 0; + +} + +#endif + +/* ------------------------------------------------------------ */ +/*** _board_digitalWrite +** +** Parameters: +** pin - digital pin number +** val - value to write to the pin +** +** Return Value: +** Returns 0 if not handled, !0 if handled. +** +** Errors: +** none +** +** Description: +** This function is called at the beginning of the digitalWrite +** function. It can perform any special processing needed +** in writing to the pin. If this function returns zero, +** control will pass through the normal digitalWrite code. If +** it returns a non-zero value the normal digitalWrite code isn't +** executed. +*/#if (OPT_BOARD_DIGITAL_IO != 0) + +int _board_digitalWrite(uint8_t pin, uint8_t val) { + + return 0; + +} + +#endif + +/* ------------------------------------------------------------ */ +/*** _board_digitalRead +** +** Parameters: +** pin - digital pin number +** val - pointer to variable to receive pin value +** +** Return Value: +** Returns 0 if not handled, !0 if handled. +** +** Errors: +** none +** +** Description: +** This function is called at the beginning of the digitalRead +** function. It can perform any special processing needed +** in reading from the pin. If this function returns zero, +** control will pass through the normal digitalRead code. If +** it returns a non-zero value the normal digitalRead code isn't +** executed. +*/ +#if (OPT_BOARD_DIGITAL_IO != 0) + +int _board_digitalRead(uint8_t pin, uint8_t * val) { + + return 0; + +} + +#endif + +/* ------------------------------------------------------------ */ +/*** _board_analogRead +** +** Parameters: +** pin - analog channel number +** val - pointer to variable to receive analog value +** +** Return Value: +** Returns 0 if not handled, !0 if handled. +** +** Errors: +** none +** +** Description: +** This function is called at the beginning of the analogRead +** function. It can perform any special processing needed +** in reading from the pin. If this function returns zero, +** control will pass through the normal analogRead code. If +** it returns a non-zero value the normal analogRead code isn't +** executed. +*/ +#if (OPT_BOARD_ANALOG_READ != 0) + +int _board_analogRead(uint8_t pin, int * val) { + + return 0; + +} + +#endif + +/* ------------------------------------------------------------ */ +/*** _board_analogReference +** +** Parameters: +** +** Return Value: +** Returns 0 if not handled, !0 if handled. +** +** Errors: +** none +** +** Description: +** This function is called at the beginning of the analogReference +** function. It can perform any special processing needed +** to set the reference voltage. If this function returns zero, +** control will pass through the normal analogReference code. If +** it returns a non-zero value the normal analogReference code isn't +** executed. +*/ +#if (OPT_BOARD_ANALOG_READ != 0) + +int _board_analogReference(uint8_t mode) { + + return 0; + +} + +#endif + +/* ------------------------------------------------------------ */ +/*** _board_analogWrite +** +** Parameters: +** pin - pin number +** val - analog value to write +** +** Return Value: +** Returns 0 if not handled, !0 if handled. +** +** Errors: +** none +** +** Description: +** This function is called at the beginning of the analogWrite +** function. It can perform any special processing needed +** in writing to the pin. If this function returns zero, +** control will pass through the normal analogWrite code. If +** it returns a non-zero value the normal analogWrite code isn't +** executed. +*/ +#if (OPT_BOARD_ANALOG_WRITE != 0) + +int _board_analogWrite(uint8_t pin, int val) { + + return 0; + +} + +#endif + +#endif // OPT_BOARD_DATA + +/* ------------------------------------------------------------ */ + +#endif // BOARD_DATA_C + +/************************************************************************/ diff --git a/settings/MXL795/Board_Defs.h b/settings/MXL795/Board_Defs.h new file mode 100644 index 00000000..940df2c2 --- /dev/null +++ b/settings/MXL795/Board_Defs.h @@ -0,0 +1,513 @@ +/************************************************************************/ +/* */ +/* Board_Defs.h -- Board Customization for Digilent chipKIT Max32 */ +/* */ +/************************************************************************/ +/* Author: Gene Apperson */ +/* Copyright 2011, Digilent. All rights reserved */ +/************************************************************************/ +/* File Description: */ +/* */ +/* This file contains the board specific declartions and data structure */ +/* to customize the chipKIT MPIDE for use with the Digilent chipKIT */ +/* Max32 board. */ +/* */ +/* This code is based on earlier work: */ +/* Copyright (c) 2010, 2011 by Mark Sproul */ +/* Copyright (c) 2005, 2006 by David A. Mellis */ +/* */ +/************************************************************************/ +/* Revision History: */ +/* */ +/* 10/06/2011(GeneA): Created */ +/* 11/28/2011(GeneA): Moved data definitions and configuration */ +/* functions to Board_Data.c */ +/* 11/29/2011(GeneA): Moved int priority definitions to System_Defs.h */ +/* 03/31/2012(GeneA): added support for second LED on Rev D boards */ +/* */ +/************************************************************************/ +//* This library is free software; you can redistribute it and/or +//* modify it under the terms of the GNU Lesser General Public +//* License as published by the Free Software Foundation; either +//* version 2.1 of the License, or (at your option) any later version. +//* +//* This library is distributed in the hope that it will be useful, +//* but WITHOUT ANY WARRANTY; without even the implied warranty of +//* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +//* Lesser General Public License for more details. +//* +//* You should have received a copy of the GNU Lesser General +//* Public License along with this library; if not, write to the +//* Free Software Foundation, Inc., 59 Temple Place, Suite 330, +//* Boston, MA 02111-1307 USA +/************************************************************************/ + +#if !defined(BOARD_DEFS_H) +#define BOARD_DEFS_H + +#include + +/* ------------------------------------------------------------ */ +/* Public Board Declarations */ +/* ------------------------------------------------------------ */ +/* The following define symbols that can be used in a sketch to +** refer to periperhals on the board generically. +*/ + +#define _BOARD_NAME_ "PIC32MX795F512L(80MHz)" + +/* Define the Microcontroller peripherals available on the board. +*/ +#define NUM_DIGITAL_PINS 101 +#define NUM_ANALOG_PINS 16 +#define NUM_OC_PINS 5 +#define NUM_IC_PINS 5 +#define NUM_TCK_PINS 4 +#define NUM_INT_PINS 5 + +#define NUM_SERIAL_PORTS 6 +#define NUM_SPI_PORTS 1 +#define NUM_I2C_PORTS 1 + +#define NUM_DSPI_PORTS 4 +#define NUM_DTWI_PORTS 5 + +/* Define I/O devices on the board. +*/ +#define NUM_LED 0 +#define NUM_BTN 0 +#define NUM_SWT 0 +#define NUM_SERVO 0 + +/* Define the number of extended i/o pins. These are pins +** that are not native to the microcontroller. This board +** doesn't have any. +*/ +#define NUM_DIGITAL_PINS_EXTENDED NUM_DIGITAL_PINS +#define NUM_ANALOG_PINS_EXTENDED NUM_ANALOG_PINS + +/* ------------------------------------------------------------ */ +/* LED Declarations */ +/* ------------------------------------------------------------ */ + +/* Define the pin numbers for the LEDs +*/ +//#define PIN_LED1 13 +//#define PIN_LED1 96 + +/* ------------------------------------------------------------ */ +/* Button Declarations */ +/* ------------------------------------------------------------ */ + +/* No buttons on this board. +*/ + +/* ------------------------------------------------------------ */ +/* Switch Declarations */ +/* ------------------------------------------------------------ */ + +/* No switches on this board. +*/ + +/* ------------------------------------------------------------ */ +/* Servo Pin Declarations */ +/* ------------------------------------------------------------ */ + +/* No servo connectors on this board. +*/ + +/* ------------------------------------------------------------ */ +/* Timer Pin Declarations */ +/* ------------------------------------------------------------ */ + +#define PIN_OC1 72 +#define PIN_OC2 76 +#define PIN_OC3 77 +#define PIN_OC4 78 +#define PIN_OC5 81 + +#define PIN_IC1 68 +#define PIN_IC2 69 +#define PIN_IC3 70 +#define PIN_IC4 71 +#define PIN_IC5 79 + +#define PIN_TCK1 74 +#define PIN_TCK2 6 +#define PIN_TCK3 7 +#define PIN_TCK4 8 +#define PIN_TCK5 9 + +/* ------------------------------------------------------------ */ +/* Interrupt Pin Declarations */ +/* ------------------------------------------------------------ */ + +#define PIN_INT0 72 +#define PIN_INT1 18 +#define PIN_INT2 19 +#define PIN_INT3 66 +#define PIN_INT4 67 + +/* ------------------------------------------------------------ */ +/* SPI Pin Declarations */ +/* ------------------------------------------------------------ */ +/* These symbols are defined for compatibility with the original +** SPI library and the original pins_arduino.h +*/ +/* ikari edit to suit with AOBC */ +const static uint8_t SS = 69; // PIC32 SS1A +const static uint8_t MOSI = 72; // PIC32 SDO1A +const static uint8_t MISO = 9; // PIC32 SDI1A +const static uint8_t SCK = 70; // PIC32 SCK1A + +/* The Digilent DSPI library uses these ports. +*/ +#define PIN_DSPI0_SS 69 //SPI1 +#define PIN_DSPI1_SS 96 //SPI2 +#define PIN_DSPI2_SS 97 //SPI3 +#define PIN_DSPI3_SS 95 //SPI4 + +/* ------------------------------------------------------------ */ +/* Analog Pins */ +/* ------------------------------------------------------------ */ +/* Define symbols for accessing the analog pins. This table is +** used to map an analog pin number to the corresponding digital +** pin number. +*/ +#define A0 25 +#define A1 24 +#define A2 23 +#define A3 22 +#define A4 21 +#define A5 20 +#define A6 26 +#define A7 27 +#define A8 32 +#define A9 33 +#define A10 34 +#define A11 35 +#define A12 41 +#define A13 42 +#define A14 43 +#define A15 44 + +/* ------------------------------------------------------------ */ +/* Change Notice Pins */ +/* ------------------------------------------------------------ */ +/* These define the pin numbers for the various change notice +** pins. +*/ +#define PIN_CN0 74 +#define PIN_CN1 73 +#define PIN_CN2 25 +#define PIN_CN3 24 +#define PIN_CN4 23 +#define PIN_CN5 22 +#define PIN_CN6 21 +#define PIN_CN7 20 +#define PIN_CN8 10 +#define PIN_CN9 11 +#define PIN_CN10 12 +#define PIN_CN11 14 +#define PIN_CN12 44 +#define PIN_CN13 81 +#define PIN_CN14 82 +#define PIN_CN15 83 +#define PIN_CN16 84 +#define PIN_CN17 49 +#define PIN_CN18 50 +#define PIN_CN19 80 +#define PIN_CN20 47 +#define PIN_CN21 48 + +/* ------------------------------------------------------------ */ +/* Pin Mapping Macros */ +/* ------------------------------------------------------------ */ +/* + This section contains the definitions for pin mapping macros that + are being redefined for this board variant. +*/ + +#undef digitalPinToAnalog +#define digitalPinToAnalog(P) ( (P) < 16 ? (P) : ((P) >= 54) && ((P) < 70) ? (P)-54 : NOT_ANALOG_PIN ) + +/* ------------------------------------------------------------ */ +/* Data Definitions */ +/* ------------------------------------------------------------ */ + +/* The following declare externals to access the pin mapping + tables. These tables are defined in Board_Data.c. +*/ + +#if !defined(OPT_BOARD_DATA) + +extern const uint32_t port_to_tris_PGM[]; +extern const uint8_t digital_pin_to_port_PGM[]; +extern const uint16_t digital_pin_to_bit_mask_PGM[]; +extern const uint16_t digital_pin_to_timer_PGM[]; + +#endif + +/* ------------------------------------------------------------ */ +/* Internal Declarations */ +/* ------------------------------------------------------------ */ +/* The following declarations are used to map peripherals for */ +/* the core and libraries and to provide configuration options */ +/* for the core. They are not normally needed by a user sketch. */ +/* ------------------------------------------------------------ */ + +#if defined(OPT_BOARD_INTERNAL) + +/* ------------------------------------------------------------ */ +/* Core Configuration Declarations */ +/* ------------------------------------------------------------ */ +/* */ +/* These are conditional compilation switches that control the */ +/* board core configuration functions. These functions provide */ +/* hooks that can call from some of the core functions into */ +/* functions defined below that can be used to extend or */ +/* replace the default behavior of the core function. To use */ +/* this, enter the appropriate code into the appropriate */ +/* function skeleton below and then set the appropriate switch */ +/* value to 1. This will cause the configuration function to be */ +/* compiled into the build and will cause the code to call the */ +/* hook function to be compiled into the core function. */ +/* */ +/* This board requires some additional initialization, so it */ +/* sets OPT_BOARD_INIT to 1 to cause the extra init function */ +/* to be included. */ +/* */ +/* ------------------------------------------------------------ */ + +#define OPT_BOARD_INIT 0 //board needs custom init code +#define OPT_BOARD_DIGITAL_IO 0 //board does not extend digital i/o functions +#define OPT_BOARD_ANALOG_READ 0 //board does not extend analogRead +#define OPT_BOARD_ANALOG_WRITE 0 //board does not extend analogWrite + +/* ------------------------------------------------------------ */ +/* Serial Port Declarations */ +/* ------------------------------------------------------------ */ + +/* Serial port 0 uses UART1 +*/ +#define _SER0_BASE _UART1_BASE_ADDRESS +#define _SER0_IRQ _UART1_ERR_IRQ +#define _SER0_VECTOR _UART_1_VECTOR +#define _SER0_IPL_ISR IPL2SOFT +#define _SER0_IPL 2 +#define _SER0_SPL 0 + +/* Serial port 1 uses UART2 +*/ +#define _SER1_BASE _UART2_BASE_ADDRESS +#define _SER1_IRQ _UART2_ERR_IRQ +#define _SER1_VECTOR _UART_2_VECTOR +#define _SER1_IPL_ISR IPL2SOFT +#define _SER1_IPL 2 +#define _SER1_SPL 0 + +/* Serial port 2 uses UART3 +*/ +#define _SER2_BASE _UART3_BASE_ADDRESS +#define _SER2_IRQ _UART3_ERR_IRQ +#define _SER2_VECTOR _UART_3_VECTOR +#define _SER2_IPL_ISR IPL2SOFT +#define _SER2_IPL 2 +#define _SER2_SPL 0 + +/* Serial port 3 uses UART4 +*/ +#define _SER3_BASE _UART4_BASE_ADDRESS +#define _SER3_IRQ _UART4_ERR_IRQ +#define _SER3_VECTOR _UART_4_VECTOR +#define _SER3_IPL_ISR IPL2SOFT +#define _SER3_IPL 2 +#define _SER3_SPL 0 + +/* Serial port 4 uses UART5 +*/ +#define _SER4_BASE _UART5_BASE_ADDRESS +#define _SER4_IRQ _UART5_ERR_IRQ +#define _SER4_VECTOR _UART_5_VECTOR +#define _SER4_IPL_ISR IPL2SOFT +#define _SER4_IPL 2 +#define _SER4_SPL 0 + +/* Serial port 5 uses UART6 +*/ +#define _SER5_BASE _UART6_BASE_ADDRESS +#define _SER5_IRQ _UART6_ERR_IRQ +#define _SER5_VECTOR _UART_6_VECTOR +#define _SER5_IPL_ISR IPL2SOFT +#define _SER5_IPL 2 +#define _SER5_SPL 0 + + +/* ------------------------------------------------------------ */ +/* SPI Port Declarations */ +/* ------------------------------------------------------------ */ + +/* The standard SPI port uses SPI1. +*/ + +#define _SPI_BASE _SPI1_BASE_ADDRESS +#define _SPI_ERR_IRQ _SPI1_ERR_IRQ +#define _SPI_RX_IRQ _SPI1_RX_IRQ +#define _SPI_TX_IRQ _SPI1_TX_IRQ +#define _SPI_VECTOR _SPI_1_VECTOR +#define _SPI_IPL_ISR _SPI1_IPL_ISR +#define _SPI_IPL _SPI1_IPL_IPC +#define _SPI_SPL _SPI1_SPL_IPC + +#define _DSPI0_BASE _SPI1_BASE_ADDRESS +#define _DSPI0_ERR_IRQ _SPI1_ERR_IRQ +#define _DSPI0_RX_IRQ _SPI1_RX_IRQ +#define _DSPI0_TX_IRQ _SPI1_TX_IRQ +#define _DSPI0_VECTOR _SPI_1_VECTOR +#define _DSPI0_IPL_ISR _SPI1_IPL_ISR +#define _DSPI0_IPL _SPI1_IPL_IPC +#define _DSPI0_SPL _SPI1_SPL_IPC + +#define _DSPI1_BASE _SPI2_BASE_ADDRESS +#define _DSPI1_ERR_IRQ _SPI2_ERR_IRQ +#define _DSPI1_RX_IRQ _SPI2_RX_IRQ +#define _DSPI1_TX_IRQ _SPI2_TX_IRQ +#define _DSPI1_VECTOR _SPI_2_VECTOR +#define _DSPI1_IPL_ISR _SPI2_IPL_ISR +#define _DSPI1_IPL _SPI2_IPL_IPC +#define _DSPI1_SPL _SPI2_SPL_IPC + +#define _SPI3_ERR_IRQ _SPI1A_ERR_IRQ //this declaration missing from the + //Microchip header file +#define _DSPI2_BASE _SPI3_BASE_ADDRESS +#define _DSPI2_ERR_IRQ _SPI3_ERR_IRQ +#define _DSPI2_RX_IRQ _SPI3_RX_IRQ +#define _DSPI2_TX_IRQ _SPI3_TX_IRQ +#define _DSPI2_VECTOR _SPI_3_VECTOR +#define _DSPI2_IPL_ISR _SPI3_IPL_ISR +#define _DSPI2_IPL _SPI3_IPL_IPC +#define _DSPI2_SPL _SPI3_SPL_IPC + +#define _DSPI3_BASE _SPI4_BASE_ADDRESS +#define _DSPI3_ERR_IRQ _SPI4_ERR_IRQ +#define _DSPI3_RX_IRQ _SPI4_RX_IRQ +#define _DSPI3_TX_IRQ _SPI4_TX_IRQ +#define _DSPI3_VECTOR _SPI_4_VECTOR +#define _DSPI3_IPL_ISR _SPI4_IPL_ISR +#define _DSPI3_IPL _SPI4_IPL_IPC +#define _DSPI3_SPL _SPI4_SPL_IPC + +/* ------------------------------------------------------------ */ +/* I2C Port Declarations */ +/* ------------------------------------------------------------ */ + +/* The standard I2C port uses I2C1 (SCL1/SDA1). These come to digital +** pins 20 & 21 on the communications connector (J4) +*/ + + +#define _TWI_BASE _I2C1_BASE_ADDRESS +#define _TWI_BUS_IRQ _I2C1_BUS_IRQ +#define _TWI_SLV_IRQ _I2C1_SLAVE_IRQ +#define _TWI_MST_IRQ _I2C1_MASTER_IRQ +#define _TWI_VECTOR _I2C_1_VECTOR +#define _TWI_IPL_ISR _I2C1_IPL_ISR +#define _TWI_IPL _I2C1_IPL_IPC +#define _TWI_SPL _I2C1_SPL_IPC + +/* +#define _TWI_BASE _I2C2_BASE_ADDRESS +#define _TWI_BUS_IRQ _I2C2_BUS_IRQ +#define _TWI_SLV_IRQ _I2C2_SLAVE_IRQ +#define _TWI_MST_IRQ _I2C2_MASTER_IRQ +#define _TWI_VECTOR _I2C_2_VECTOR +#define _TWI_IPL_ISR _I2C2_IPL_ISR +#define _TWI_IPL _I2C2_IPL_IPC +#define _TWI_SPL _I2C2_SPL_IPC +*/ +/* Declarations for Digilent DTWI library. +** DTWI0: SDA pin 67, SCL pin 66 +** DTWI1: SDA pin 59, SCL pin 58 +** DTWI2: SDA pin 52, SCL pin 53 +** DTWI3: SDA pin 11, SCL pin 12 +** DTWI4: SDA pin 49, SCL pin 50 +*/ +/* +#define _DTWI0_BASE _I2C2_BASE_ADDRESS +#define _DTWI0_BUS_IRQ _I2C2_BUS_IRQ +#define _DTWI0_VECTOR _I2C_2_VECTOR +#define _DTWI0_IPL_ISR _I2C2_IPL_ISR +#define _DTWI0_IPL _I2C2_IPL_IPC +#define _DTWI0_SPL _I2C2_SPL_IPC +#define _DTWI0_SCL_PIN 58 +#define _DTWI0_SDA_PIN 59 + +#define _DTWI1_BASE _I2C1_BASE_ADDRESS +#define _DTWI1_BUS_IRQ _I2C1_BUS_IRQ +#define _DTWI1_VECTOR _I2C_1_VECTOR +#define _DTWI1_IPL_ISR _I2C1_IPL_ISR +#define _DTWI1_IPL _I2C1_IPL_IPC +#define _DTWI1_SPL _I2C1_SPL_IPC +#define _DTWI1_SCL_PIN 66 +#define _DTWI1_SDA_PIN 67 +*/ +#define _DTWI0_BASE _I2C1_BASE_ADDRESS +#define _DTWI0_BUS_IRQ _I2C1_BUS_IRQ +#define _DTWI0_VECTOR _I2C_1_VECTOR +#define _DTWI0_IPL_ISR _I2C1_IPL_ISR +#define _DTWI0_IPL _I2C1_IPL_IPC +#define _DTWI0_SPL _I2C1_SPL_IPC +#define _DTWI0_SCL_PIN 66 +#define _DTWI0_SDA_PIN 67 + +#define _DTWI1_BASE _I2C2_BASE_ADDRESS +#define _DTWI1_BUS_IRQ _I2C2_BUS_IRQ +#define _DTWI1_VECTOR _I2C_2_VECTOR +#define _DTWI1_IPL_ISR _I2C2_IPL_ISR +#define _DTWI1_IPL _I2C2_IPL_IPC +#define _DTWI1_SPL _I2C2_SPL_IPC +#define _DTWI1_SCL_PIN 58 +#define _DTWI1_SDA_PIN 59 + +#define _DTWI2_BASE _I2C3_BASE_ADDRESS +#define _DTWI2_BUS_IRQ _I2C3_BUS_IRQ +#define _DTWI2_VECTOR _I2C_3_VECTOR +#define _DTWI2_IPL_ISR _I2C3_IPL_ISR +#define _DTWI2_IPL _I2C3_IPL_IPC +#define _DTWI2_SPL _I2C3_SPL_IPC +#define _DTWI2_SCL_PIN 53 +#define _DTWI2_SDA_PIN 52 + +#define _DTWI3_BASE _I2C4_BASE_ADDRESS +#define _DTWI3_BUS_IRQ _I2C4_BUS_IRQ +#define _DTWI3_VECTOR _I2C_4_VECTOR +#define _DTWI3_IPL_ISR _I2C4_IPL_ISR +#define _DTWI3_IPL _I2C4_IPL_IPC +#define _DTWI3_SPL _I2C4_SPL_IPC +#define _DTWI3_SCL_PIN 12 +#define _DTWI3_SDA_PIN 11 + +#define _DTWI4_BASE _I2C5_BASE_ADDRESS +#define _DTWI4_BUS_IRQ _I2C5_BUS_IRQ +#define _DTWI4_VECTOR _I2C_5_VECTOR +#define _DTWI4_IPL_ISR _I2C5_IPL_ISR +#define _DTWI4_IPL _I2C5_IPL_IPC +#define _DTWI4_SPL _I2C5_SPL_IPC +#define _DTWI4_SCL_PIN 50 +#define _DTWI4_SDA_PIN 49 + + +/* ------------------------------------------------------------ */ +/* A/D Converter Declarations */ +/* ------------------------------------------------------------ */ + + +/* ------------------------------------------------------------ */ + +#endif //OPT_BOARD_INTERNAL + +/* ------------------------------------------------------------ */ + +#endif // BOARD_DEFS_H + +/************************************************************************/ diff --git a/settings/boards.txt b/settings/boards.txt new file mode 100755 index 00000000..6f3c5a4b --- /dev/null +++ b/settings/boards.txt @@ -0,0 +1,45 @@ +############################################################ + +MXL795a.name=PIC32MX795F512L(30MHz) +MXL795a.group=SAT + +# new items +MXL795a.platform=pic32 +MXL795a.board=_BOARD_MEGA_ +MXL795a.ldscript=chipKIT-application-32MX795F512.ld +# end of new items + +MXL795a.upload.protocol=stk500v2 +MXL795a.upload.maximum_size=520192 +MXL795a.upload.maximum_data_size=131072 +MXL795a.upload.speed=115200 +MXL795a.upload.tool=pic32prog + +MXL795a.build.mcu=32MX795F512L +MXL795a.build.f_cpu=30000000L +MXL795a.build.core=pic32 +MXL795a.build.variant=MXL795 + +############################################################ + +MXL795b.name=PIC32MX795F512L(80MHz) +MXL795b.group=SAT + +# new items +MXL795b.platform=pic32 +MXL795b.board=_BOARD_MEGA_ +MXL795b.ldscript=chipKIT-application-32MX795F512.ld +# end of new items + +MXL795b.upload.protocol=stk500v2 +MXL795b.upload.maximum_size=520192 +MXL795b.upload.maximum_data_size=131072 +MXL795b.upload.speed=115200 +MXL795b.upload.tool=pic32prog + +MXL795b.build.mcu=32MX795F512L +MXL795b.build.f_cpu=80000000L +MXL795b.build.core=pic32 +MXL795b.build.variant=MXL795 + +############################################################ From 220788fb7e9eebd199295a057d7b9ec851074a2f Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 23:08:16 +0200 Subject: [PATCH 136/176] Add budge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4bbea864..1d6c3b31 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # C2A-AOBC +[![Build](https://github.com/ut-issl/c2a-aobc/actions/workflows/build.yml/badge.svg)](https://github.com/ut-issl/c2a-aobc/actions/workflows/build.yml) + ## Overview - `C2A-AOBC` is the flight software for the AOCS module developed by ISSL/UT, Seiren, and JAXA. From e8678d25a4a2dc4de3c6befe21de7c7c694e6add Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 23:21:20 +0200 Subject: [PATCH 137/176] Add README in Example --- Examples/README.md | 29 +++++++++++++++++++++++++++++ README.md | 10 ++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 Examples/README.md diff --git a/Examples/README.md b/Examples/README.md new file mode 100644 index 00000000..0bb7f0b8 --- /dev/null +++ b/Examples/README.md @@ -0,0 +1,29 @@ +# C2A-AOBC-EXAMPLE + +## Overview + +- `C2A-AOBC-EXAMPLE` is an example of a project-specific repository of `C2A-AOBC`. +- Users can copy this directory to make their simulation environment. + - **NOTE**: Please rewrite `example` to suit your project in this document after you copy the directory. +- For other detailed descriptions, please also see README of [c2a-aobc](https://github.com/ut-issl/c2a-aobc) + +## How to construct the repository + +- `git submodule` + - This repository includes the [c2a-aobc](https://github.com/ut-issl/c2a-aobc) with the `git submodule`. And the `c2a-aobc` also includes [c2a-core](https://github.com/ut-issl/c2a-core) as a submodule. Please use the following command to clone the repository recursively. + ``` + $ git clone --recursive git@github.com:ut-issl/c2a-aobc-example.git + ``` + +## Build with vMicro for real AOBC (Attitude On Board Computer) development + +- Please see the `README` of [c2a-aobc](./src-aobc/README.md) + +## Build with S2E for SILS test + +- Please see the `README` of `s2e-aobc-example`. + +## How to change the project-specific parameters + +- In the `src_aobc_example/Settings/SatelliteParameters` directory, there are C source files to define the satellite parameters. +- Please modify the parameters to suit your project. diff --git a/README.md b/README.md index 1d6c3b31..225024d7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ - Support environments - For real AOBC (Attitude On Board Computer) - [vMicro](https://www.visualmicro.com/) + Visual Studio 2019 - - For SILS/HILS test + - For SILS test - [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) @@ -32,7 +32,13 @@ - Users can refer to the `c2a-aobc/Example` directory to make a directory construction of `c2a-aobc-hoge-satellite`. - **NOTE** Please rewrite the `example` to your project name. ``` - TBW + - src-aobc (git submodule of c2a-aobc with rename) + - We recommend to use a released version of c2a-aobc. + - Build setting files + - CMake files, Visual Studio files, and others + - others + - git related files + - README.md ``` - To use `git submodule` features, please see the reference [Git Tools Submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). From 38a4288cefce8b216804b8c93ef0a0025fc9534b Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 29 Jun 2023 23:29:14 +0200 Subject: [PATCH 138/176] Add I2C parameters and CMake settings --- Examples/CMakeLists.txt | 2 ++ .../user_defined_i2c_address.h | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Examples/src_aobc_example/user_defined_i2c_address.h diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index 20fa512e..f72c35b8 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -19,6 +19,8 @@ option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) set(C2A_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_core) set(C2A_USER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src_aobc/src/src_user) +set(C2A_SATELLITE_PARAMETERS_DIR ../../../../src_aobc_example/Settings/SatelliteParameters/) # relative path from Settings +add_definitions(-DUSER_DEFINED_I2C_ADDRESS) set(USE_ALL_C2A_CORE_APPS OFF) set(USE_ALL_C2A_CORE_TEST_APPS OFF) diff --git a/Examples/src_aobc_example/user_defined_i2c_address.h b/Examples/src_aobc_example/user_defined_i2c_address.h new file mode 100644 index 00000000..d478f5aa --- /dev/null +++ b/Examples/src_aobc_example/user_defined_i2c_address.h @@ -0,0 +1,32 @@ +#ifndef USER_DEFINED_I2C_ADDRESS_H_ +#define USER_DEFINED_I2C_ADDRESS_H_ + +// Undefined +#undef I2C_DEVICE_ADDR_AOBC_MPU +#undef I2C_DEVICE_ADDR_AOBC_MPU_AK +#undef I2C_DEVICE_ADDR_AOBC_RM +#undef I2C_DEVICE_ADDR_EXT_RM +#undef I2C_DEVICE_ADDR_SS_PY +#undef I2C_DEVICE_ADDR_SS_MY +#undef I2C_DEVICE_ADDR_SS_PZ +#undef I2C_DEVICE_ADDR_SS_MZ +#undef I2C_DEVICE_ADDR_RW_X +#undef I2C_DEVICE_ADDR_RW_Y +#undef I2C_DEVICE_ADDR_RW_Z + +// Sensors +#define I2C_DEVICE_ADDR_AOBC_MPU (0x68) //!< MPU9250 on AOBC board +#define I2C_DEVICE_ADDR_AOBC_MPU_AK (0x0c) //!< AK8963 magnetometer in MPU9250 +#define I2C_DEVICE_ADDR_AOBC_RM (0x20) //!< RM3100 magnetometer on AOBC board +#define I2C_DEVICE_ADDR_EXT_RM (0x23) //!< External RM3100 magnetometer +#define I2C_DEVICE_ADDR_SS_PY (0x70) //!< nanoSSOC-D60 Sun-sensor on PY +#define I2C_DEVICE_ADDR_SS_MY (0x71) //!< nanoSSOC-D60 Sun-sensor on MY +#define I2C_DEVICE_ADDR_SS_PZ (0x72) //!< nanoSSOC-D60 Sun-sensor on PZ +#define I2C_DEVICE_ADDR_SS_MZ (0x7C) //!< nanoSSOC-D60 Sun-sensor on MZ + +// RWs +#define I2C_DEVICE_ADDR_RW_X (0x11) //!< RW on X-axis +#define I2C_DEVICE_ADDR_RW_Y (0x37) //!< RW on Y-axis +#define I2C_DEVICE_ADDR_RW_Z (0x39) //!< RW on Z-axis + +#endif // USER_DEFINED_I2C_ADDRESS_H_ From 5879cfaa49c96ba5b4e5d44ebdab2e2f17d53d5d Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 11:48:20 +0200 Subject: [PATCH 139/176] Fix example descriptions --- Examples/README.md | 4 ++-- README.md | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Examples/README.md b/Examples/README.md index 0bb7f0b8..d60a618a 100644 --- a/Examples/README.md +++ b/Examples/README.md @@ -4,7 +4,7 @@ - `C2A-AOBC-EXAMPLE` is an example of a project-specific repository of `C2A-AOBC`. - Users can copy this directory to make their simulation environment. - - **NOTE**: Please rewrite `example` to suit your project in this document after you copy the directory. + - **NOTE**: Please rewrite all words like `example, EXAMPLE, or Example` to suit your project in this document after you copy the directory. After that, please delete this description. - For other detailed descriptions, please also see README of [c2a-aobc](https://github.com/ut-issl/c2a-aobc) ## How to construct the repository @@ -25,5 +25,5 @@ ## How to change the project-specific parameters -- In the `src_aobc_example/Settings/SatelliteParameters` directory, there are C source files to define the satellite parameters. +- In the `src_aobc_example/Settings/SatelliteParameters` directory, there are C source files to define the initial satellite parameters. - Please modify the parameters to suit your project. diff --git a/README.md b/README.md index 225024d7..b86ce3e1 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ ## For general users ### How to make a project-specific repository -- We recommend making a project-specific repository named `c2a-aobc-hoge-satellite`. -- Users can refer to the `c2a-aobc/Example` directory to make a directory construction of `c2a-aobc-hoge-satellite`. - - **NOTE** Please rewrite the `example` to your project name. +- We recommend making a project-specific repository named `c2a-aobc-project-name`. +- Users can refer to the `c2a-aobc/Examples` directory to make a directory construction of `c2a-aobc-project-name`. + - **NOTE** Please change all words `example, EXAMPLE, or Example` in the files in this directory to suit your project name. ``` - src-aobc (git submodule of c2a-aobc with rename) - We recommend to use a released version of c2a-aobc. @@ -44,12 +44,12 @@ ### How to build and execute the project-specific repository -- Please see the [README.md](./Example/README.md) in the `Example` directly. +- Please see the [README.md](./Examples/README.md) in the `Examples` directly. ### How to join the development of this repository - When general users add new features or remove this repository's bugs, please make upstream pull requests from a forked repository. -- Before making PRs, please carefully read the following `Development style`. +- Before making PRs, please carefully read the following `Development style` for main developers. - If you have any questions, please feel free to ask us. @@ -157,7 +157,7 @@ - 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 - - `eci`: ECI frame + - `eci`: Earth Center Inertia frame - `body`: Body-fixed frame - `compo`: Component frame - For abbreviations, please see the ISSL internal [document](https://gitlab.com/ut_issl/c2a/c2a_core_oss/-/issues/77#note_568506174). @@ -166,7 +166,7 @@ - When using `vMicro`, setting the `Visual Studio` to display by folders instead of filters makes it easier to use. - For build errors when SILS test with `S2E`, try the following operations first. - Perform `git submodule update`. - - Delete cmake cache of S2E. + - Delete CMake cache of S2E. ## Brief history of development ### History From 1dd8a844a7dda70224f8f11f575bd8bd008a4ab2 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 14:02:52 +0200 Subject: [PATCH 140/176] Add code owner --- .github/CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..49932a63 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +@ut-issl/aocs +@sksat +@chutaro \ No newline at end of file From c96ff5fdd6d19a467601ac429175ca5e1887cd15 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 14:09:03 +0200 Subject: [PATCH 141/176] Fix small --- .github/CODEOWNERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 49932a63..2500de7b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,2 @@ -@ut-issl/aocs -@sksat -@chutaro \ No newline at end of file +# AOCS team +* @ut-issl/aocs @sksat @ chutaro \ No newline at end of file From 03ad2db35e03d30359837dcbcd79971efd646bbc Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 14:15:28 +0200 Subject: [PATCH 142/176] Fix small --- .github/CODEOWNERS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2500de7b..00fef5dc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,8 @@ # AOCS team -* @ut-issl/aocs @sksat @ chutaro \ No newline at end of file +* @ut-issl/aocs + +# CDH team +* @chutaro + +# ArkEdge Sapce +* @sksat From 575e62c3f1d368c094edb5788149cfd717e2202b Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 20:01:32 +0200 Subject: [PATCH 143/176] Add git submodule description --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b86ce3e1..d0f7b0ed 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ - git related files - README.md ``` -- To use `git submodule` features, please see the reference [Git Tools Submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). +- To construct the `src-aobc` directory, we recommend to use `git submodule` to take in the `c2a-aobc` repository with renaming to `src-aobc`. + - Reference: [Git Tools Submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). ### How to build and execute the project-specific repository From 9efbdf3233b062509ebccd15c3e7241384b73bfb Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 22:19:45 +0200 Subject: [PATCH 144/176] Fix place of user defined I2C --- .../src_aobc_example/{ => Settings}/user_defined_i2c_address.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Examples/src_aobc_example/{ => Settings}/user_defined_i2c_address.h (100%) diff --git a/Examples/src_aobc_example/user_defined_i2c_address.h b/Examples/src_aobc_example/Settings/user_defined_i2c_address.h similarity index 100% rename from Examples/src_aobc_example/user_defined_i2c_address.h rename to Examples/src_aobc_example/Settings/user_defined_i2c_address.h From e95ab4c808f5d96ea875db70391ed0e295ac5f46 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 22:29:09 +0200 Subject: [PATCH 145/176] Fix with user-defined repository construction test --- .../SatelliteParameters/Sample/component_selector_parameters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c index 27da6bb5..4c87628d 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/component_selector_parameters.c @@ -3,6 +3,6 @@ * @brief コンポセレクタに関する衛星固有パラメータを管理する */ -#include "../component_selector_parameters.h" +#include const APP_MAG_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer = APP_MAG_SELECTOR_STATE_RM_EXT; From 860d4c46e2f2edf9028b292aa118ada065589cd3 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Fri, 30 Jun 2023 22:36:49 +0200 Subject: [PATCH 146/176] Fix Example --- .../component_selector_parameters.c | 8 +++ .../SatelliteParameters/ina260_parameters.c | 66 +++++++++++++++++++ .../SatelliteParameters/oem7600_parameters.c | 19 ++++++ .../SatelliteParameters/rw0003_parameters.c | 12 ++++ .../SatelliteParameters/sagitta_parameters.c | 14 ++++ .../SatelliteParameters/stim210_parameters.c | 30 +++++++++ 6 files changed, 149 insertions(+) create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/component_selector_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/ina260_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/oem7600_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/rw0003_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c create mode 100644 Examples/src_aobc_example/Settings/SatelliteParameters/stim210_parameters.c diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/component_selector_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/component_selector_parameters.c new file mode 100644 index 00000000..4c87628d --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/component_selector_parameters.c @@ -0,0 +1,8 @@ +/** + * @file component_selector_parameters.c + * @brief コンポセレクタに関する衛星固有パラメータを管理する + */ + +#include + +const APP_MAG_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer = APP_MAG_SELECTOR_STATE_RM_EXT; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/ina260_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/ina260_parameters.c new file mode 100644 index 00000000..49dce5a4 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/ina260_parameters.c @@ -0,0 +1,66 @@ +/** + * @file ina260_parameters.c + * @brief INA260に関する衛星固有パラメータを管理する + */ + +#include + +// PIC +const INA260_AVERAGING_MODE INA260_PARAMETERS_pic_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_pic_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_pic_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_pic_hw_over_current_threshold_mA = 200.0f; + +// STIM210 +const INA260_AVERAGING_MODE INA260_PARAMETERS_stim210_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_stim210_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_stim210_current_conversion_time = INA260_CONVERSION_TIME_140US; +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 float INA260_PARAMETERS_sagitta_hw_over_current_threshold_mA = 500.0f; + +// OEM7600 +const INA260_AVERAGING_MODE INA260_PARAMETERS_oem7600_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_oem7600_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_oem7600_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_oem7600_hw_over_current_threshold_mA = 1000.0f; + +// RM3100 +const INA260_AVERAGING_MODE INA260_PARAMETERS_rm3100_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rm3100_voltage_conversion_time = INA260_CONVERSION_TIME_1MS; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rm3100_current_conversion_time = INA260_CONVERSION_TIME_1MS; +const float INA260_PARAMETERS_rm3100_hw_over_current_threshold_mA = 200.0f; + +// NanoSSOC-D60 +const INA260_AVERAGING_MODE INA260_PARAMETERS_nanossoc_d60_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_nanossoc_d60_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_nanossoc_d60_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_nanossoc_d60_hw_over_current_threshold_mA = 150.0f; + +// MTQ +const INA260_AVERAGING_MODE INA260_PARAMETERS_mtq_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_mtq_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_mtq_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_mtq_hw_over_current_threshold_mA = 2000.0f; + +// RW0003 X +const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_x_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_x_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_x_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_rw0003_x_hw_over_current_threshold_mA = 2000.0f; + +// RW0003 Y +const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_y_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_y_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_y_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_rw0003_y_hw_over_current_threshold_mA = 2000.0f; + +// RW0003 Z +const INA260_AVERAGING_MODE INA260_PARAMETERS_rw0003_z_averaging_mode = INA260_AVERAGING_MODE_16; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_z_voltage_conversion_time = INA260_CONVERSION_TIME_140US; +const INA260_CONVERSION_TIME INA260_PARAMETERS_rw0003_z_current_conversion_time = INA260_CONVERSION_TIME_140US; +const float INA260_PARAMETERS_rw0003_z_hw_over_current_threshold_mA = 2000.0f; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/oem7600_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/oem7600_parameters.c new file mode 100644 index 00000000..e14ee8f2 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/oem7600_parameters.c @@ -0,0 +1,19 @@ +/** + * @file oem7600_parameters.c + * @brief OEM7600に関する衛星固有パラメータを管理する + */ + +#include + +// Spike Filter +uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = {3, 3, 3}; +uint8_t OEM7600_PARAMETERS_position_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = {60, 60, 60}; +double OEM7600_PARAMETERS_position_spike_filter_config_reject_threshold_m[PHYSICAL_CONST_THREE_DIM] = {10000.0, 10000.0, 10000.0}; +double OEM7600_PARAMETERS_position_spike_filter_config_amplitude_limit_to_accept_as_step_m[PHYSICAL_CONST_THREE_DIM] = {8000.0, 8000.0, 8000.0}; + +uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = {3, 3, 3}; +uint8_t OEM7600_PARAMETERS_velocity_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = {60, 60, 60}; +double OEM7600_PARAMETERS_velocity_spike_filter_config_reject_threshold_m_s[PHYSICAL_CONST_THREE_DIM] = {1000.0, 1000.0, 1000.0}; +double OEM7600_PARAMETERS_velocity_spike_filter_config_amplitude_limit_to_accept_as_step_m_s[PHYSICAL_CONST_THREE_DIM] = {100.0, 100.0, 100.0}; + +// Sun intensity threshold diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/rw0003_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/rw0003_parameters.c new file mode 100644 index 00000000..61bcfda9 --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/rw0003_parameters.c @@ -0,0 +1,12 @@ +/** + * @file rw0003_parameters.c + * @brief RW.0003に関する衛星固有パラメータを管理する + */ + +#include + +// Spike Filter +uint8_t RW0003_PARAMETERS_spike_filter_config_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = {3, 3, 3}; +uint8_t RW0003_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = {10, 10, 10}; +double RW0003_PARAMETERS_spike_filter_config_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM] = {50.0, 50.0, 50.0}; +double RW0003_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM] = {25.0, 25.0, 25.0}; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c new file mode 100644 index 00000000..e38955fe --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c @@ -0,0 +1,14 @@ +/** + * @file sagitta_parameters.c + * @brief Sagittaに関する衛星固有パラメータを管理する + */ + +#include + +// Spike Filter +uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_accept = 20; +uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_reject_continued_warning = 200; +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(1.0f); +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(0.6f); + +// Sun intensity threshold diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/stim210_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/stim210_parameters.c new file mode 100644 index 00000000..50e0172c --- /dev/null +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/stim210_parameters.c @@ -0,0 +1,30 @@ +/** + * @file stim210_parameters.c + * @brief STIM210に関する衛星固有パラメータを管理する + */ + +#include + +// Gyro constant bias +// The following parameter should be tuned with experiment +const float STIM210_PARAMETERS_ang_vel_bias_compo_rad_s[PHYSICAL_CONST_THREE_DIM] = { -2.27E-04f, 2.80E-04f, -3.37E-04f }; + +// Gyro Bias and scale factor temperature calibration +const float STIM210_PARAMETERS_temperature_range_high_degC = 50.0f; +const float STIM210_PARAMETERS_temperature_range_low_degC = -50.0f; +// The following parameters should be tuned with temperature experiment results +const float STIM210_PARAMETERS_bias_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib] = { -1.698E-04f, 1.309E-06f }; +const float STIM210_PARAMETERS_scale_factor_coeff_compo_x[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float STIM210_PARAMETERS_bias_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 2.990E-04, -6.060E-07f }; +const float STIM210_PARAMETERS_scale_factor_coeff_compo_y[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; +const float STIM210_PARAMETERS_bias_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib] = { -2.306E-04f, -6.303E-07f }; +const float STIM210_PARAMETERS_scale_factor_coeff_compo_z[STIM210_PARAMETERS_kNumCoeffTempCalib] = { 1.0f, 0.0f}; + +// Gyro filter +// 1st order Low Pass Filter +const float STIM210_PARAMETERS_gyro_cut_off_freq_lpf_1st_Hz[PHYSICAL_CONST_THREE_DIM] = { 1.0f, 1.0f, 1.0f }; +// Spike filter +const uint8_t STIM210_PARAMETERS_gyro_spike_count_limit_to_accept[PHYSICAL_CONST_THREE_DIM] = { 3, 3, 3 }; +const uint8_t STIM210_PARAMETERS_gyro_spike_count_limit_to_reject_continued_warning[PHYSICAL_CONST_THREE_DIM] = { 60, 60, 60 }; +const float STIM210_PARAMETERS_gyro_spike_reject_threshold_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.01f, 0.01f, 0.01f }; +const float STIM210_PARAMETERS_gyro_spike_amplitude_limit_to_accept_as_step_rad_s[PHYSICAL_CONST_THREE_DIM] = { 0.002f, 0.002f, 0.002f }; From 3b879396bb3f6bfa6ed8bf882b5a9b8e26fc8d21 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 2 Jul 2023 22:51:23 +0200 Subject: [PATCH 147/176] Add MIT license --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..89f748ff --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Intelligent Space Systems Laboratory, The University of Tokyo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 2afe2b3d21a598d645a532ae4eaed5be9a41867e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 20:33:16 +0200 Subject: [PATCH 148/176] Shorten include for DriverInstances --- .../Applications/DriverInstances/DI_i2c_example.c | 2 +- src/src_user/Applications/DriverInstances/di_fm25v10.c | 4 ++-- src/src_user/Applications/DriverInstances/di_fm25v10.h | 2 +- src/src_user/Applications/DriverInstances/di_ina260.c | 6 +++--- src/src_user/Applications/DriverInstances/di_ina260.h | 2 +- src/src_user/Applications/DriverInstances/di_mobc.c | 4 ++-- src/src_user/Applications/DriverInstances/di_mobc.h | 2 +- src/src_user/Applications/DriverInstances/di_mpu9250.c | 10 +++++----- src/src_user/Applications/DriverInstances/di_mpu9250.h | 4 ++-- .../Applications/DriverInstances/di_mtq_seiren.c | 6 +++--- .../Applications/DriverInstances/di_mtq_seiren.h | 4 ++-- .../Applications/DriverInstances/di_nanossoc_d60.c | 10 +++++----- .../Applications/DriverInstances/di_nanossoc_d60.h | 2 +- src/src_user/Applications/DriverInstances/di_oem7600.c | 8 ++++---- src/src_user/Applications/DriverInstances/di_oem7600.h | 2 +- src/src_user/Applications/DriverInstances/di_rm3100.c | 8 ++++---- src/src_user/Applications/DriverInstances/di_rm3100.h | 2 +- src/src_user/Applications/DriverInstances/di_rw0003.c | 10 +++++----- src/src_user/Applications/DriverInstances/di_rw0003.h | 4 ++-- src/src_user/Applications/DriverInstances/di_sagitta.c | 6 +++--- src/src_user/Applications/DriverInstances/di_sagitta.h | 2 +- src/src_user/Applications/DriverInstances/di_stim210.c | 10 +++++----- src/src_user/Applications/DriverInstances/di_stim210.h | 4 ++-- .../Applications/DriverInstances/uart_example.c | 2 +- 24 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/DI_i2c_example.c b/src/src_user/Applications/DriverInstances/DI_i2c_example.c index 942d0cd9..dd387928 100644 --- a/src/src_user/Applications/DriverInstances/DI_i2c_example.c +++ b/src/src_user/Applications/DriverInstances/DI_i2c_example.c @@ -5,7 +5,7 @@ // user side #include "DI_i2c_example.h" -#include "../../Settings/port_config.h" +#include static I2C_Config I2C_EXAMPLE_port_; diff --git a/src/src_user/Applications/DriverInstances/di_fm25v10.c b/src/src_user/Applications/DriverInstances/di_fm25v10.c index 275bd395..2d07dae7 100644 --- a/src/src_user/Applications/DriverInstances/di_fm25v10.c +++ b/src/src_user/Applications/DriverInstances/di_fm25v10.c @@ -9,8 +9,8 @@ #include #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" +#include +#include #include static void DI_FM25V10_init_(void); diff --git a/src/src_user/Applications/DriverInstances/di_fm25v10.h b/src/src_user/Applications/DriverInstances/di_fm25v10.h index e616382f..0e717265 100644 --- a/src/src_user/Applications/DriverInstances/di_fm25v10.h +++ b/src/src_user/Applications/DriverInstances/di_fm25v10.h @@ -5,7 +5,7 @@ #ifndef DI_FM25V10_H_ #define DI_FM25V10_H_ -#include "../../Drivers/Cdh/fm25v10.h" +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_ina260.c b/src/src_user/Applications/DriverInstances/di_ina260.c index c23d21d4..ad0c08b6 100644 --- a/src/src_user/Applications/DriverInstances/di_ina260.c +++ b/src/src_user/Applications/DriverInstances/di_ina260.c @@ -10,9 +10,9 @@ #include #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/Power/power_switch_control.h" +#include +#include +#include static void DI_INA260_init_(void); diff --git a/src/src_user/Applications/DriverInstances/di_ina260.h b/src/src_user/Applications/DriverInstances/di_ina260.h index 3b8f0810..f8e08817 100644 --- a/src/src_user/Applications/DriverInstances/di_ina260.h +++ b/src/src_user/Applications/DriverInstances/di_ina260.h @@ -5,7 +5,7 @@ #ifndef DI_INA260_H_ #define DI_INA260_H_ -#include "../../Drivers/Power/ina260.h" +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_mobc.c b/src/src_user/Applications/DriverInstances/di_mobc.c index 498d8781..7d0f4391 100644 --- a/src/src_user/Applications/DriverInstances/di_mobc.c +++ b/src/src_user/Applications/DriverInstances/di_mobc.c @@ -7,8 +7,8 @@ #include "di_mobc.h" #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" +#include +#include static void DI_MOBC_init_(void); static void DI_MOBC_update_(void); diff --git a/src/src_user/Applications/DriverInstances/di_mobc.h b/src/src_user/Applications/DriverInstances/di_mobc.h index 7899fe6a..72f84379 100644 --- a/src/src_user/Applications/DriverInstances/di_mobc.h +++ b/src/src_user/Applications/DriverInstances/di_mobc.h @@ -5,7 +5,7 @@ #ifndef DI_MOBC_H_ #define DI_MOBC_H_ -#include "../../Drivers/Etc/mobc.h" +#include #include #include diff --git a/src/src_user/Applications/DriverInstances/di_mpu9250.c b/src/src_user/Applications/DriverInstances/di_mpu9250.c index 1082f0da..be343d2e 100644 --- a/src/src_user/Applications/DriverInstances/di_mpu9250.c +++ b/src/src_user/Applications/DriverInstances/di_mpu9250.c @@ -9,13 +9,13 @@ #include #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/Power/power_switch_control.h" -#include "../../Library/matrix33.h" +#include +#include +#include +#include // Satellite Parameters -#include "../../Settings/SatelliteParameters/mpu9250_parameters.h" +#include static void DI_MPU9250_init_(void); static void DI_MPU9250_update_(void); diff --git a/src/src_user/Applications/DriverInstances/di_mpu9250.h b/src/src_user/Applications/DriverInstances/di_mpu9250.h index 74a8e02b..83ab3bfb 100644 --- a/src/src_user/Applications/DriverInstances/di_mpu9250.h +++ b/src/src_user/Applications/DriverInstances/di_mpu9250.h @@ -5,9 +5,9 @@ #ifndef DI_MPU9250_H_ #define DI_MPU9250_H_ -#include "../../Drivers/Aocs/mpu9250.h" +#include #include -#include "../../Library/SignalProcess/polynomial_approximation.h" +#include /** * @enum MPU9250_IDX diff --git a/src/src_user/Applications/DriverInstances/di_mtq_seiren.c b/src/src_user/Applications/DriverInstances/di_mtq_seiren.c index 324e9cd9..0af5c8b2 100644 --- a/src/src_user/Applications/DriverInstances/di_mtq_seiren.c +++ b/src/src_user/Applications/DriverInstances/di_mtq_seiren.c @@ -9,9 +9,9 @@ #include #include #include -#include "../UserDefined/AOCS/aocs_manager.h" -#include "../../Settings/port_config.h" -#include "../../Library/vector3.h" +#include +#include +#include static MTQ_SEIREN_Driver mtq_seiren_driver_[MTQ_SEIREN_IDX_MAX]; diff --git a/src/src_user/Applications/DriverInstances/di_mtq_seiren.h b/src/src_user/Applications/DriverInstances/di_mtq_seiren.h index ed82b0b6..3009c859 100644 --- a/src/src_user/Applications/DriverInstances/di_mtq_seiren.h +++ b/src/src_user/Applications/DriverInstances/di_mtq_seiren.h @@ -5,8 +5,8 @@ #ifndef DI_MTQ_SEIREN_H_ #define DI_MTQ_SEIREN_H_ -#include "../../Drivers/Aocs/mtq_seiren.h" -#include "../UserDefined/AOCS/aocs_error.h" +#include +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c b/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c index 192fa907..a34f56c9 100644 --- a/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c +++ b/src/src_user/Applications/DriverInstances/di_nanossoc_d60.c @@ -9,13 +9,13 @@ #include #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/Power/power_switch_control.h" -#include "../../IfWrapper/GPIO.h" +#include +#include +#include +#include // Satellite Parameters -#include "../../Settings/SatelliteParameters/nanossoc_d60_parameters.h" +#include static void DI_NANOSSOC_D60_init_(void); static void DI_NANOSSOC_D60_update_(void); diff --git a/src/src_user/Applications/DriverInstances/di_nanossoc_d60.h b/src/src_user/Applications/DriverInstances/di_nanossoc_d60.h index 290e0718..e9f25c34 100644 --- a/src/src_user/Applications/DriverInstances/di_nanossoc_d60.h +++ b/src/src_user/Applications/DriverInstances/di_nanossoc_d60.h @@ -5,7 +5,7 @@ #ifndef DI_NANOSSOC_D60_H_ #define DI_NANOSSOC_D60_H_ -#include "../../Drivers/Aocs/nanossoc_d60.h" +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_oem7600.c b/src/src_user/Applications/DriverInstances/di_oem7600.c index 8ad85cf6..f97ffc47 100644 --- a/src/src_user/Applications/DriverInstances/di_oem7600.c +++ b/src/src_user/Applications/DriverInstances/di_oem7600.c @@ -8,10 +8,10 @@ #include #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/Power/power_switch_control.h" -#include "../UserDefined/AOCS/aocs_manager.h" +#include +#include +#include +#include static void DI_OEM7600_init_(void); static void DI_OEM7600_update_(void); diff --git a/src/src_user/Applications/DriverInstances/di_oem7600.h b/src/src_user/Applications/DriverInstances/di_oem7600.h index e43dc40c..308c1e68 100644 --- a/src/src_user/Applications/DriverInstances/di_oem7600.h +++ b/src/src_user/Applications/DriverInstances/di_oem7600.h @@ -5,7 +5,7 @@ #ifndef DI_OEM7600_H_ #define DI_OEM7600_H_ -#include "../../Drivers/Aocs/oem7600.h" +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_rm3100.c b/src/src_user/Applications/DriverInstances/di_rm3100.c index 5cd13b1e..6ac50124 100644 --- a/src/src_user/Applications/DriverInstances/di_rm3100.c +++ b/src/src_user/Applications/DriverInstances/di_rm3100.c @@ -10,10 +10,10 @@ #include #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/Power/power_switch_control.h" -#include "../../Library/vector3.h" +#include +#include +#include +#include // Satellite Parameters #include "../../Settings/SatelliteParameters/rm3100_parameters.h" diff --git a/src/src_user/Applications/DriverInstances/di_rm3100.h b/src/src_user/Applications/DriverInstances/di_rm3100.h index f8fa86a5..bbc5d8eb 100644 --- a/src/src_user/Applications/DriverInstances/di_rm3100.h +++ b/src/src_user/Applications/DriverInstances/di_rm3100.h @@ -5,7 +5,7 @@ #ifndef DI_RM3100_H_ #define DI_RM3100_H_ -#include "../../Drivers/Aocs/rm3100.h" +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_rw0003.c b/src/src_user/Applications/DriverInstances/di_rw0003.c index c84c4487..69359b36 100644 --- a/src/src_user/Applications/DriverInstances/di_rw0003.c +++ b/src/src_user/Applications/DriverInstances/di_rw0003.c @@ -11,11 +11,11 @@ #include #include -#include "../UserDefined/Power/power_switch_control.h" -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/AOCS/aocs_manager.h" -#include "../../Library/vector3.h" +#include +#include +#include +#include +#include static void DI_RW0003_init_(void); static void DI_RW0003_update_(void); diff --git a/src/src_user/Applications/DriverInstances/di_rw0003.h b/src/src_user/Applications/DriverInstances/di_rw0003.h index 0a2267f8..8d45fb4b 100644 --- a/src/src_user/Applications/DriverInstances/di_rw0003.h +++ b/src/src_user/Applications/DriverInstances/di_rw0003.h @@ -5,8 +5,8 @@ #ifndef DI_RW0003_H_ #define DI_RW0003_H_ -#include "../../Drivers/Aocs/rw0003.h" -#include "../UserDefined/AOCS/aocs_error.h" +#include +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_sagitta.c b/src/src_user/Applications/DriverInstances/di_sagitta.c index 78b6d522..77d60e00 100644 --- a/src/src_user/Applications/DriverInstances/di_sagitta.c +++ b/src/src_user/Applications/DriverInstances/di_sagitta.c @@ -11,9 +11,9 @@ #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/Power/power_switch_control.h" +#include +#include +#include static void DI_SAGITTA_init_(void); static void DI_SAGITTA_update_(void); diff --git a/src/src_user/Applications/DriverInstances/di_sagitta.h b/src/src_user/Applications/DriverInstances/di_sagitta.h index 83c8e529..37c97a21 100644 --- a/src/src_user/Applications/DriverInstances/di_sagitta.h +++ b/src/src_user/Applications/DriverInstances/di_sagitta.h @@ -5,7 +5,7 @@ #ifndef DI_SAGITTA_H_ #define DI_SAGITTA_H_ -#include "../../Drivers/Aocs/sagitta.h" +#include #include /** diff --git a/src/src_user/Applications/DriverInstances/di_stim210.c b/src/src_user/Applications/DriverInstances/di_stim210.c index 39e9f636..2ddc57d6 100644 --- a/src/src_user/Applications/DriverInstances/di_stim210.c +++ b/src/src_user/Applications/DriverInstances/di_stim210.c @@ -9,13 +9,13 @@ #include #include #include -#include "../../Settings/port_config.h" -#include "../../Settings/DriverSuper/driver_buffer_define.h" -#include "../UserDefined/Power/power_switch_control.h" -#include "../../Library/matrix33.h" +#include +#include +#include +#include // Satellite Parameters -#include "../../Settings/SatelliteParameters/stim210_parameters.h" +#include static void DI_STIM210_init_(void); static void DI_STIM210_update_(void); diff --git a/src/src_user/Applications/DriverInstances/di_stim210.h b/src/src_user/Applications/DriverInstances/di_stim210.h index 9ddfdbe2..3d13f819 100644 --- a/src/src_user/Applications/DriverInstances/di_stim210.h +++ b/src/src_user/Applications/DriverInstances/di_stim210.h @@ -5,9 +5,9 @@ #ifndef DI_STIM210_H_ #define DI_STIM210_H_ -#include "../../Drivers/Aocs/stim210.h" +#include #include -#include "../../Library/SignalProcess/polynomial_approximation.h" +#include /** * @enum STIM210_IDX diff --git a/src/src_user/Applications/DriverInstances/uart_example.c b/src/src_user/Applications/DriverInstances/uart_example.c index 026001fd..1e9aad46 100644 --- a/src/src_user/Applications/DriverInstances/uart_example.c +++ b/src/src_user/Applications/DriverInstances/uart_example.c @@ -2,7 +2,7 @@ #include #include -#include "../../Settings/port_config.h" +#include static UART_Config uart_debug_; From 0bd8354bf27c3ff74062571a48f6b3697ac3aecd Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 20:44:09 +0200 Subject: [PATCH 149/176] Shorten include for AttitudeControl --- .../UserDefined/AOCS/AttitudeControl/bdot.c | 12 ++++++------ .../UserDefined/AOCS/AttitudeControl/bdot.h | 6 +++--- .../AOCS/AttitudeControl/sun_pointing.c | 16 ++++++++-------- .../AOCS/AttitudeControl/sun_pointing.h | 10 +++++----- .../AttitudeControl/three_axis_control_mtq.c | 18 +++++++++--------- .../AttitudeControl/three_axis_control_mtq.h | 10 +++++----- .../AttitudeControl/three_axis_control_rw.c | 14 +++++++------- .../AttitudeControl/three_axis_control_rw.h | 6 +++--- .../AOCS/AttitudeControl/unloading.c | 6 +++--- .../AOCS/AttitudeControl/unloading.h | 6 +++--- 10 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c index 672c3cd1..39744bda 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c @@ -7,14 +7,14 @@ #include "bdot.h" #include -#include "../../../../Library/vector3.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/math_constants.h" -#include "../aocs_manager.h" -#include "../../../DriverInstances/di_mtq_seiren.h" +#include +#include +#include +#include +#include // Satellite parameters -#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" +#include static Bdot bdot_; const Bdot* const bdot = &bdot_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h index 52b2b328..7a1f2c17 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.h @@ -8,9 +8,9 @@ #include #include #include -#include -#include "../../../../Library/physical_constants.h" -#include "../../AOCS/aocs_error.h" +#include +#include +#include /** * @struct Bdot diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c index d1aa6e6a..9b583f8e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c @@ -11,20 +11,20 @@ #include #include -#include "../../../../Library/vector3.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/math_constants.h" -#include "../../../../Library/ControlUtility/gyroscopic_effect.h" -#include "../HardwareDependent/ActuatorControllers/mtq_seiren_controller.h" -#include "../../../../Library/ControlUtility/cross_product_control.h" -#include "../aocs_manager.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include // Satellite Parameters -#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" +#include static SunPointing sun_pointing_; const SunPointing* const sun_pointing = &sun_pointing_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h index 83183859..ac7b4c78 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h @@ -8,11 +8,11 @@ #include #include #include -#include "../../../../Library/physical_constants.h" -#include "../../../../Library/ControlUtility/cross_product_control.h"; -#include "../../../../Library/pid_control.h" -#include "../../../../Library/SignalProcess/z_filter.h" -#include "../../AOCS/aocs_error.h" +#include +#include +#include +#include +#include /** * @enum SUN_POINTING_AXIS_ID diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c index 650e026e..e1bb8b50 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c @@ -10,21 +10,21 @@ #include #include -#include "../../../../Library/vector3.h" -#include "../../../../Library/quaternion.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/math_constants.h" -#include "../../../../Library/c2a_math.h" -#include "../../../../Library/ControlUtility/gyroscopic_effect.h" -#include "../HardwareDependent/ActuatorControllers/mtq_seiren_controller.h" -#include "../aocs_manager.h" +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include // Satellite Parameters -#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" +#include static ThreeAxisControlMtq three_axis_control_mtq_; const ThreeAxisControlMtq* const three_axis_control_mtq = &three_axis_control_mtq_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h index 79787e3a..f2dc4bcf 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h @@ -9,11 +9,11 @@ #include #include #include -#include "../../../../Library/physical_constants.h" -#include "../../../../Library/ControlUtility/cross_product_control.h"; -#include "../../../../Library/pid_control.h" -#include "../../../../Library/SignalProcess/z_filter.h" -#include "../../AOCS/aocs_error.h" +#include +#include +#include +#include +#include /** * @struct ThreeAxisControlMtq diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c index 284a9c39..e7604f08 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c @@ -10,18 +10,18 @@ #include #include -#include "../../../../Library/vector3.h" -#include "../../../../Library/quaternion.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/math_constants.h" -#include "../../../../Library/ControlUtility/gyroscopic_effect.h" -#include "../aocs_manager.h" +#include +#include +#include +#include +#include +#include #include #include // Satellite Parameters -#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" +#include static ThreeAxisControlRw three_axis_control_rw_; const ThreeAxisControlRw* const three_axis_control_rw = &three_axis_control_rw_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h index ff497365..25ceb5cd 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.h @@ -9,9 +9,9 @@ #include #include #include -#include "../../../../Library/physical_constants.h" -#include "../../../../Library/pid_control.h" -#include "../../AOCS/aocs_error.h" +#include +#include +#include /** * @struct ThreeAxisControlRw diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c index 388da610..e1e03b96 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c @@ -10,11 +10,11 @@ #include #include -#include "../../../../Library/vector3.h" -#include "../HardwareDependent/ActuatorControllers/mtq_seiren_controller.h" +#include +#include // Satellite Parameters -#include "../../../../Settings/SatelliteParameters/attitude_control_parameters.h" +#include static Unloading unloading_; const Unloading* const unloading = &unloading_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h index 9645086a..c4191f9c 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h @@ -8,9 +8,9 @@ #include #include #include -#include "../../../../Library/physical_constants.h" -#include "../../../../Library/ControlUtility/cross_product_control.h" -#include "../aocs_manager.h" +#include +#include +#include /** * @enum APP_UNLOADING_STATE From ff87eea4b712014b5323837ea35d1ed20e8bd088 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 20:48:55 +0200 Subject: [PATCH 150/176] Shorten include for AttitudeDetermination --- .../fine_three_axis_determination.c | 8 ++++---- .../rough_three_axis_determination.c | 16 ++++++++-------- .../AOCS/AttitudeDetermination/stt_gyro_ekf.c | 16 ++++++++-------- .../AOCS/AttitudeDetermination/stt_gyro_ekf.h | 6 +++--- .../sun_vector_propagator.c | 8 ++++---- .../sun_vector_propagator.h | 6 +++--- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c index 4a89b3ff..688e23f7 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c @@ -10,13 +10,13 @@ #include #include -#include "../aocs_manager.h" -#include "../aocs_error.h" -#include "../../../../Library/quaternion.h" +#include +#include +#include #include "stt_gyro_ekf.h" // Satellite parameters -#include "../../../../Settings/SatelliteParameters/attitude_determination_parameters.h" +#include static FineThreeAxisDetermination fine_three_axis_determination_; const FineThreeAxisDetermination* const fine_three_axis_determination = &fine_three_axis_determination_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c index 89cce836..c94403db 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/rough_three_axis_determination.c @@ -10,16 +10,16 @@ #include #include -#include "../aocs_manager.h" -#include "../aocs_error.h" -#include "../../../../Library/vector3.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/quaternion.h" -#include "../../../../Library/physical_constants.h" -#include "../../../../Library/math_constants.h" +#include +#include +#include +#include +#include +#include +#include // Satellite parameters -#include "../../../../Settings/SatelliteParameters/attitude_determination_parameters.h" +#include static RoughThreeAxisDetermination rough_three_axis_determination_; const RoughThreeAxisDetermination* const rough_three_axis_determination = &rough_three_axis_determination_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c index 8ea16fda..cd4be63b 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c @@ -12,16 +12,16 @@ #include #include "stt_gyro_ekf.h" -#include "../aocs_manager.h" -#include "../../../app_registry.h" -#include "../../../../Library/vector3.h" -#include "../../../DriverInstances/di_stim210.h" -#include "../../../DriverInstances/di_sagitta.h" -#include "../HardwareDependent/SensorFilters/sagitta_filter.h" -#include "../../../../Library/math_constants.h" +#include +#include +#include +#include +#include +#include +#include // Satellite parameters -#include "../../../../Settings/SatelliteParameters/attitude_determination_parameters.h" +#include MATRIX_DEFINE_MATRIX_SRTUCT(6, 3, float); MATRIX_DEFINE_MATRIX_SRTUCT(6, 1, float); diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h index 4ec0cff4..81b0c080 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h @@ -8,9 +8,9 @@ #include #include #include -#include "../../../../Library/quaternion.h" -#include "../../../../Library/matrix.h" -#include "../../../../Library/vector3.h" +#include +#include +#include MATRIX_DEFINE_MATRIX_SRTUCT(6, 6, float); diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.c index 82cb62ec..9929509c 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.c @@ -8,10 +8,10 @@ #include "sun_vector_propagator.h" -#include "../../../../Library/vector3.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/quaternion.h" -#include "../aocs_manager.h" +#include +#include +#include +#include static SunVectorPropagator sun_vector_propagator_; const SunVectorPropagator* const sun_vector_propagator = &sun_vector_propagator_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h index 1f260650..79a527bb 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h @@ -10,9 +10,9 @@ #include #include #include -#include "../../../../Library/quaternion.h" -#include "../../../../Library/physical_constants.h" -#include "../../AOCS/aocs_error.h" +#include +#include +#include /** * @struct SunVectorPropagator From ed6c8ff100ed8ee32aaa7869a62b399c718207d1 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:05:06 +0200 Subject: [PATCH 151/176] Shorten include for HardwareDependent --- .../ActuatorControllers/mtq_seiren_controller.c | 14 +++++++------- .../ActuatorControllers/mtq_seiren_controller.h | 4 ++-- .../ActuatorControllers/rw_controller.c | 10 +++++----- .../ActuatorControllers/rw_controller.h | 4 ++-- .../SensorFilters/mpu9250_filter.c | 8 ++++---- .../SensorFilters/mpu9250_filter.h | 6 +++--- .../SensorFilters/nanossoc_d60_filter.c | 10 +++++----- .../SensorFilters/nanossoc_d60_filter.h | 8 ++++---- .../SensorFilters/oem7600_filter.c | 14 +++++++------- .../SensorFilters/oem7600_filter.h | 4 ++-- .../SensorFilters/rm3100_filter.c | 4 ++-- .../SensorFilters/rm3100_filter.h | 8 ++++---- .../SensorFilters/rw0003_filter.c | 4 ++-- .../SensorFilters/rw0003_filter.h | 6 +++--- .../SensorFilters/sagitta_filter.c | 8 ++++---- .../SensorFilters/sagitta_filter.h | 4 ++-- .../SensorFilters/stim210_filter.c | 6 +++--- .../SensorFilters/stim210_filter.h | 6 +++--- .../SensorMonitors/current_anomaly.c | 4 ++-- .../SensorMonitors/current_anomaly.h | 2 +- .../SensorSelectors/gpsr_selector.c | 4 ++-- .../SensorSelectors/gyro_selector.c | 10 +++++----- .../SensorSelectors/magnetometer_selector.c | 12 ++++++------ .../SensorSelectors/stt_selector.c | 4 ++-- .../SensorSelectors/sun_sensor_selector.c | 6 +++--- 25 files changed, 85 insertions(+), 85 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c index 88e44647..ccea52a8 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c @@ -13,13 +13,13 @@ #include #include -#include "../../../../../Library/vector3.h" -#include "../../../../../Library/matrix33.h" -#include "../../../../../Library/c2a_math.h" -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/math_constants.h" -#include "../../../../DriverInstances/di_mtq_seiren.h" -#include "../../aocs_manager.h" +#include +#include +#include +#include +#include +#include +#include static MtqSeirenController mtq_seiren_controller_; const MtqSeirenController* const mtq_seiren_controller = &mtq_seiren_controller_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h index a9e68c27..0215711f 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.h @@ -14,8 +14,8 @@ #include #include #include -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/ControlUtility/cross_product_control.h" +#include +#include /** * @struct MtqSeirenController diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.c index b23d7fcc..6fd97432 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.c @@ -6,13 +6,13 @@ #include "rw_controller.h" -#include "../../../../../Library/vector3.h" -#include "../../../../../Library/matrix33.h" -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/math_constants.h" +#include +#include +#include +#include #include -#include "../../../../app_registry.h" +#include static void APP_RW_CONTROLLER_init_(void); static void APP_RW_CONTROLLER_exec_(void); diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h index 4d9d54a0..1f16c4a1 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/rw_controller.h @@ -9,8 +9,8 @@ #include #include #include -#include "../../aocs_manager.h" -#include "../../../../DriverInstances/di_rw0003.h" +#include +#include AppInfo APP_RW_CONTROLLER_create_app(void); diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c index 2bd015d0..c47c0373 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c @@ -9,12 +9,12 @@ #include #include #include -#include "../../../../DriverInstances/di_mpu9250.h" -#include "../../aocs_manager.h" -#include "../../../../../Library/vector3.h" +#include +#include +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/mpu9250_parameters.h" +#include static Mpu9250Filter mpu9250_filter_; const Mpu9250Filter* const mpu9250_filter = &mpu9250_filter_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h index b51da4ad..07b63be3 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.h @@ -8,9 +8,9 @@ #include #include #include -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/SignalProcess/z_filter.h" -#include "../../../../../Library/SignalProcess/spike_filter.h" +#include +#include +#include /** * @enum MPU9250_FILTER_SENSOR_ID diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c index f53c68e1..0cdcb5e3 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c @@ -8,13 +8,13 @@ #include #include #include -#include "../../aocs_manager.h" -#include "../../../../../Library/vector3.h" -#include "../../../../../Library/c2a_math.h" -#include "../../../../../Library/math_constants.h" +#include +#include +#include +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/nanossoc_d60_parameters.h" +#include static NanoSsocD60Filter nanossoc_d60_filter_; const NanoSsocD60Filter* const nanossoc_d60_filter = &nanossoc_d60_filter_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h index 454bd6a0..f239ae6b 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.h @@ -8,10 +8,10 @@ #include #include #include -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/SignalProcess/z_filter.h" -#include "../../../../../Library/SignalProcess/spike_filter.h" -#include "../../../../DriverInstances/di_nanossoc_d60.h" +#include +#include +#include +#include /** * @struct NanoSsocD60Filter diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c index 5712b117..83df6cb3 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c @@ -9,15 +9,15 @@ #include #include #include -#include "../../../../DriverInstances/di_oem7600.h" -#include "../../aocs_manager.h" -#include "../../../../../Library/vector3.h" -#include "../../../../../Library/matrix33.h" -#include "../../../../../Library/time_space.h" -#include "../../../../../Library/math_constants.h" +#include +#include +#include +#include +#include +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/oem7600_parameters.h" +#include #define OEM7600_FILTER_POS_VEL_SIX_DIM (6) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h index e1b0599d..0eec082a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.h @@ -8,8 +8,8 @@ #include #include #include -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/SignalProcess/spike_filter.h" +#include +#include /** * @struct Oem7600Filter diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c index 0c2a3a89..62bcb90b 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c @@ -9,10 +9,10 @@ #include #include #include -#include "../../aocs_manager.h" +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/rm3100_parameters.h" +#include static Rm3100Filter rm3100_filter_; const Rm3100Filter* const rm3100_filter = &rm3100_filter_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h index e9f8d102..a6e8a2e2 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.h @@ -8,10 +8,10 @@ #include #include #include -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/SignalProcess/z_filter.h" -#include "../../../../../Library/SignalProcess/spike_filter.h" -#include "../../../../DriverInstances/di_rm3100.h" +#include +#include +#include +#include /** * @struct Rm3100Filter diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c index 34af807e..8f5b7248 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.c @@ -9,10 +9,10 @@ #include #include #include -#include "../../aocs_manager.h" +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/rw0003_parameters.h" +#include static Rw0003Filter rw0003_filter_; const Rw0003Filter* const rw0003_filter = &rw0003_filter_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h index ab871463..ee08f5ed 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rw0003_filter.h @@ -8,9 +8,9 @@ #include #include #include -#include "../../../../DriverInstances/di_rw0003.h" -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/SignalProcess/spike_filter.h" +#include +#include +#include /** * @struct Rw0003Filter diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c index 1b8c6363..10ec4767 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.c @@ -9,12 +9,12 @@ #include #include #include -#include "../../../../DriverInstances/di_sagitta.h" -#include "../../aocs_manager.h" -#include "../../../../../Library/physical_constants.h" +#include +#include +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/sagitta_parameters.h" +#include static SagittaFilter sagitta_filter_; const SagittaFilter* const sagitta_filter = &sagitta_filter_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.h index 14e49e0f..80236cba 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/sagitta_filter.h @@ -7,8 +7,8 @@ #include #include -#include "../../../../../Library/SignalProcess/spike_filter.h" -#include "../../../../../Library/quaternion.h" +#include +#include /** * @struct SagittaFilter diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c index 8e8ee19a..d717f70d 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c @@ -9,11 +9,11 @@ #include #include #include -#include "../../../../DriverInstances/di_stim210.h" -#include "../../../../../Library/vector3.h" +#include +#include //Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/stim210_parameters.h" +#include static Stim210Filter stim210_filter_; const Stim210Filter* const stim210_filter = &stim210_filter_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h index ee9ffafd..e9cca0f9 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.h @@ -8,9 +8,9 @@ #include #include #include -#include "../../../../../Library/physical_constants.h" -#include "../../../../../Library/SignalProcess/z_filter.h" -#include "../../../../../Library/SignalProcess/spike_filter.h" +#include +#include +#include /** * @struct Stim210Filter diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c index e9d19ddb..240ace03 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.c @@ -8,10 +8,10 @@ #include #include -#include "../../../Power/power_switch_control.h" +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/fdir_parameters.h" +#include static CurrentAnomaly current_anomaly_; const CurrentAnomaly* const current_anomaly = ¤t_anomaly_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.h index 4a9b84a8..9dfba53e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorMonitors/current_anomaly.h @@ -7,7 +7,7 @@ #include #include -#include "../../../../DriverInstances/di_ina260.h" +#include /** * @struct CurrentAnomaly diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c index a87e8dba..f08c1205 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c @@ -8,8 +8,8 @@ #include "gpsr_selector.h" #include -#include "../../../../DriverInstances/di_oem7600.h" -#include "../../aocs_manager.h" +#include +#include static GpsrSelector gpsr_selector_; const GpsrSelector* const gpsr_selector = &gpsr_selector_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c index 624cc642..e405cd61 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.c @@ -9,11 +9,11 @@ #include #include -#include "../../../../DriverInstances/di_mpu9250.h" -#include "../../../../DriverInstances/di_stim210.h" -#include "../SensorFilters/mpu9250_filter.h" -#include "../SensorFilters/stim210_filter.h" -#include "../../aocs_manager.h" +#include +#include +#include +#include +#include static GyroSelector gyro_selector_; const GyroSelector* const gyro_selector = &gyro_selector_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c index 2a83cacf..198c203a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.c @@ -8,14 +8,14 @@ #include #include -#include "../../../../DriverInstances/di_mpu9250.h" -#include "../../../../DriverInstances/di_rm3100.h" -#include "../SensorFilters/mpu9250_filter.h" -#include "../SensorFilters/rm3100_filter.h" -#include "../../aocs_manager.h" +#include +#include +#include +#include +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/component_selector_parameters.h" +#include static MagnetometerSelector magnetometer_selector_; const MagnetometerSelector* const magnetometer_selector = &magnetometer_selector_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.c index 0b9d6260..7d625daf 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/stt_selector.c @@ -8,8 +8,8 @@ #include "stt_selector.h" #include -#include "../../../../DriverInstances/di_sagitta.h" -#include "../../aocs_manager.h" +#include +#include static SttSelector stt_selector_; const SttSelector* const stt_selector = &stt_selector_; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c index 4ff954ae..1750cd5b 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c @@ -9,11 +9,11 @@ #include #include #include -#include "../../../../DriverInstances/di_nanossoc_d60.h" -#include "../../aocs_manager.h" +#include +#include // Satellite Parameters -#include "../../../../../Settings/SatelliteParameters/nanossoc_d60_parameters.h" +#include static SunSensorSelector sun_sensor_selector_; const SunSensorSelector* const sun_sensor_selector = &sun_sensor_selector_; From 64bd5887d5d5c228fd1038c8e665b6a1ce5e272e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:07:26 +0200 Subject: [PATCH 152/176] Shorten include for InertialReference --- .../InertialReference/inertial_geomag_calculator.c | 10 +++++----- .../inertial_sun_direction_calculator.c | 4 ++-- .../AOCS/InertialReference/time_space_calculator.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c index 9a085d42..c3472141 100644 --- a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c @@ -5,13 +5,13 @@ */ #include "inertial_geomag_calculator.h" -#include "../aocs_manager.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/time_space.h" -#include "../../../../Library/geomagnetism.h" +#include +#include +#include +#include #include -#include "../../../app_registry.h" +#include static InertialGeomagCalculator inertial_geomag_calulator_; diff --git a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_sun_direction_calculator.c b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_sun_direction_calculator.c index 79aebe8f..46544417 100644 --- a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_sun_direction_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_sun_direction_calculator.c @@ -5,8 +5,8 @@ */ #include "inertial_sun_direction_calculator.h" -#include "../aocs_manager.h" -#include "../../../../Library/time_space.h" +#include +#include static void APP_SUN_DIR_ECI_CALC_init_(void); diff --git a/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c b/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c index f4a86fa7..dfb2ed48 100644 --- a/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/InertialReference/time_space_calculator.c @@ -9,9 +9,9 @@ #include #include #include -#include "../aocs_manager.h" -#include "../../../../Library/time_space.h" -#include "../../../../Library/c2a_math.h" +#include +#include +#include static TimeSpaceCalculator time_space_calculator_; From 7ca414ddb31812692e1ca18aef4e026a1eaf081d Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:11:15 +0200 Subject: [PATCH 153/176] Shorten include for OrbitEstimation --- .../AOCS/OrbitEstimation/gpsr_orbit_propagator.c | 10 +++++----- .../AOCS/OrbitEstimation/gpsr_orbit_propagator.h | 2 +- .../AOCS/OrbitEstimation/kepler_orbit_propagator.c | 8 ++++---- .../AOCS/OrbitEstimation/kepler_orbit_propagator.h | 2 +- .../AOCS/OrbitEstimation/orbit_calculator.c | 12 ++++++------ .../AOCS/OrbitEstimation/orbit_calculator.h | 2 +- .../AOCS/OrbitEstimation/sgp4_orbit_propagator.c | 10 +++++----- .../AOCS/OrbitEstimation/sgp4_orbit_propagator.h | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c index 729e01f9..7bda2c8d 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c @@ -9,14 +9,14 @@ #include #include #include "kepler_orbit_propagator.h" -#include "../aocs_manager.h" -#include "../../../../Library/math_constants.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/time_space.h" +#include +#include +#include +#include #include // SatelliteParameters -#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" +#include static GpsrOrbitPropagator gpsr_orbit_propagator_; const GpsrOrbitPropagator* const gpsr_orbit_propagator = &gpsr_orbit_propagator_; diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.h b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.h index 028971c5..101e0421 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.h +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.h @@ -7,7 +7,7 @@ #include #include -#include "../../../../Library/Orbit/kepler_orbit.h" +#include /** * @struct GpsrOrbitPropagator diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c index 06f9a242..e2db10c0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.c @@ -8,13 +8,13 @@ #include #include #include -#include "../aocs_manager.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/time_space.h" +#include +#include +#include #include // SatelliteParameters -#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" +#include static KeplerOrbitPropagator kepler_orbit_propagator_; const KeplerOrbitPropagator* const kepler_orbit_propagator = &kepler_orbit_propagator_; diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.h b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.h index f04d24ea..148db82a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.h +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/kepler_orbit_propagator.h @@ -7,7 +7,7 @@ #include #include -#include "../../../../Library/Orbit/kepler_orbit.h" +#include /** * @struct KeplerOrbitPropagator diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c index 4f48d657..ac393e40 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.c @@ -14,15 +14,15 @@ #include #include #include -#include "../../../app_registry.h" +#include #include -#include "../aocs_manager.h" -#include "../../../../Library/vector3.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/time_space.h" +#include +#include +#include +#include // SatelliteParameters -#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" +#include static OrbitCalculator orbit_calculator_; const OrbitCalculator* const orbit_calculator = &orbit_calculator_; diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.h b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.h index 3789e0a2..3ce7b6da 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.h +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/orbit_calculator.h @@ -7,7 +7,7 @@ #include #include -#include "../../../../Library/Orbit/kepler_orbit.h" +#include /** * @enum APP_ORBIT_CALC_METHOD diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c index 0efe4489..faff6ff9 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.c @@ -9,14 +9,14 @@ #include #include #include -#include "../../../app_registry.h" -#include "../aocs_manager.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/time_space.h" +#include +#include +#include +#include #include // SatelliteParameters -#include "../../../../Settings/SatelliteParameters/orbit_parameters.h" +#include // #define APP_SGP4_DEBUG_OUTPUT //!< デバッグ出力を表示させたいときに定義する diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.h b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.h index 9e54ff3d..97503b3e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.h +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/sgp4_orbit_propagator.h @@ -7,7 +7,7 @@ #include #include -#include "../../../../Library/Orbit/sgp4.h" +#include /** * @struct Sgp4OrbitPropagator From 95c5a6f26c5a0cccad2dd4bd500777583bf5418f Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:14:15 +0200 Subject: [PATCH 154/176] Shorten include for TargetAttitude --- .../AOCS/TargetAttitude/quaternion_interpolator.c | 4 ++-- .../AOCS/TargetAttitude/quaternion_interpolator.h | 2 +- .../TargetAttitude/target_attitude_calculator.c | 8 ++++---- .../TargetAttitude/target_attitude_calculator.h | 2 +- .../TargetAttitude/target_attitude_from_orbit.c | 14 +++++++------- .../TargetAttitude/target_attitude_from_orbit.h | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c index e0566ab7..ca4cbbcc 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.c @@ -7,10 +7,10 @@ #include #include #include -#include "../../../app_registry.h" +#include #include "quaternion_interpolator.h" -#include "../aocs_manager.h" +#include static QuaternionInterpolator quaternion_interpolator_; const QuaternionInterpolator* const quaternion_interpolator = &quaternion_interpolator_; diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.h b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.h index f7c153cf..fd76fe0e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.h +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/quaternion_interpolator.h @@ -8,7 +8,7 @@ #include #include #include -#include "../../../../Library/quaternion.h" +#include #define APP_QI_TARGET_MAX (20) // 衛星が確保可能な目標Quaternionの数 diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c index 0187a30b..db614ecf 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.c @@ -12,12 +12,12 @@ #include "target_attitude_calculator.h" #include "quaternion_interpolator.h" #include "target_attitude_from_orbit.h" -#include "../aocs_manager.h" -#include "../../../app_registry.h" -#include "../../../../Library/vector3.h" +#include +#include +#include // SatelliteParameters -#include "../../../../Settings/SatelliteParameters/attitude_target_parameters.h" +#include static TargetAttitudeCalculator target_attitude_calculator_; const TargetAttitudeCalculator* const target_attitude_calculator = &target_attitude_calculator_; diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.h b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.h index eee58276..ee05e19a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.h +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_calculator.h @@ -7,7 +7,7 @@ #include #include -#include "../../../../Library/quaternion.h" +#include /** * @enum APP_TARGET_ATT_CALC_MODE diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c index d136036e..42bd445a 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c @@ -6,17 +6,17 @@ #include #include -#include "../../../app_registry.h" +#include #include "target_attitude_from_orbit.h" -#include "../aocs_manager.h" -#include "../../../../Library/math_constants.h" -#include "../../../../Library/c2a_math.h" -#include "../../../../Library/vector3.h" -#include "../../../../Library/time_space.h" +#include +#include +#include +#include +#include // SatelliteParameters -#include "../../../../Settings/SatelliteParameters/attitude_target_parameters.h" +#include static TargetAttitudeFromOrbit target_attitude_from_orbit_; const TargetAttitudeFromOrbit* const target_attitude_from_orbit = &target_attitude_from_orbit_; diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h index aa664cb8..ce21b374 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h @@ -7,9 +7,9 @@ #include #include -#include "../../../../Library/physical_constants.h" -#include "../../../../Library/matrix33.h" -#include "../../../../Library/quaternion.h" +#include +#include +#include /** * @enum APP_TAFO_TARGET_DIRECITON From 620fa128c130b9cc2d2e07d776447160ee986f58 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:17:20 +0200 Subject: [PATCH 155/176] Shorten include for aocs managers --- .../UserDefined/AOCS/aocs_manager.c | 18 +++++++++--------- .../UserDefined/AOCS/aocs_manager.h | 8 ++++---- .../UserDefined/AOCS/aocs_mode_manager.c | 10 +++++----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index 161f1bc7..50d15a30 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -7,20 +7,20 @@ #include "aocs_manager.h" #include #include -#include "../../../Library/c2a_math.h" -#include "../../../Library/math_constants.h" -#include "../../../Library/vector3.h" -#include "../../../Library/matrix33.h" -#include "../../../Library/ControlUtility/gyroscopic_effect.h" +#include +#include +#include +#include +#include #include "AttitudeControl/unloading.h" #include "aocs_mode_manager.h" // SatelliteParameters -#include "../../../Settings/SatelliteParameters/orbit_parameters.h" -#include "../../../Settings/SatelliteParameters/structure_parameters.h" -#include "../../../Settings/SatelliteParameters/attitude_control_parameters.h" -#include "../../../Settings/SatelliteParameters/attitude_target_parameters.h" +#include +#include +#include +#include static AocsManager aocs_manager_; const AocsManager* const aocs_manager = &aocs_manager_; diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h index 6e1c1401..7bd99fc9 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h @@ -8,10 +8,10 @@ #include #include #include -#include "../../../Library/physical_constants.h" -#include "../../../Library/quaternion.h" -#include "../../DriverInstances/di_rw0003.h" -#include "../../DriverInstances/di_mtq_seiren.h" +#include +#include +#include +#include /** * @enum AOCS_MANAGER_ERROR diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c index 9a01c601..e364e211 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_mode_manager.c @@ -13,13 +13,13 @@ #include #include #include -#include "./aocs_manager.h" -#include "../../../Library/vector3.h" -#include "../../../Library/physical_constants.h" -#include "../../../Library/math_constants.h" +#include "aocs_manager.h" +#include +#include +#include // SatelliteParameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include // #define APP_AOCS_MM_TEST_WITH_S2E //!< S2Eでテストするときにコメントを外すと実行後Bdotモードに遷移する #ifdef SILS_FW From 1e8ca95f3a44c00806b2ee74a40cae3bc746507a Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:19:38 +0200 Subject: [PATCH 156/176] Shorten include for Applications/Cdh --- .../Applications/UserDefined/Cdh/aocs_data_recorder.c | 2 +- .../Applications/UserDefined/Cdh/aocs_data_recorder.h | 2 +- .../UserDefined/Cdh/non_volatile_memory_manager.h | 3 ++- .../UserDefined/Cdh/non_volatile_memory_parameter.h | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.c b/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.c index b3c609ee..ed1df353 100644 --- a/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.c +++ b/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.c @@ -11,7 +11,7 @@ #include #include #include -#include "../../../Library/vector3.h" +#include #define APP_AOCS_DR_ALGORITHM_TLM_SIZE (104) //!< テレメトリ構造体サイズ(念のため実機で確認済み) diff --git a/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.h b/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.h index 5060b68c..63a97cee 100644 --- a/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.h +++ b/src/src_user/Applications/UserDefined/Cdh/aocs_data_recorder.h @@ -11,7 +11,7 @@ #include -#include "../AOCS/aocs_manager.h" +#include #include "non_volatile_memory_partition.h" diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h index 49df1177..ea9d9c4b 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h @@ -9,7 +9,8 @@ #include // 下記は使うH/Wによって修正する -#include "../../DriverInstances/di_fm25v10.h" +#include + #define APP_NVM_MANAGER_STOP_ADDRESS (DI_FM25V10_STOP_GLOBAL_ADDRESS) //!< 不揮発メモリ管理アプリで扱う最大アドレス #define APP_NVM_MANAGER_MAX_LENGTH (DI_FM25V10_MAX_LENGTH) //!< 不揮発メモリ管理アプリで扱う最大アドレス diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h index 3e194942..2a439b43 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.h @@ -7,8 +7,8 @@ #include #include "non_volatile_memory_partition.h" -#include "../../../Settings/Applications/NvmParams/non_volatile_memory_normal_parameters.h" -#include "../../../Settings/Applications/NvmParams/non_volatile_memory_redundant_parameters.h" +#include +#include /** * @enum APP_NVM_PARAM_TYPE From d64e013c9812bcac5d99d2acd21fe740b353e8a1 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:21:35 +0200 Subject: [PATCH 157/176] Shorten include for Applications/Thermal --- .../UserDefined/Power/power_switch_control.c | 4 ++-- .../UserDefined/Thermal/temperature_anomaly.c | 12 ++++++------ .../Applications/UserDefined/Thermal/thermo_sensor.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/src_user/Applications/UserDefined/Power/power_switch_control.c b/src/src_user/Applications/UserDefined/Power/power_switch_control.c index 57a8ae4d..fe71f832 100644 --- a/src/src_user/Applications/UserDefined/Power/power_switch_control.c +++ b/src/src_user/Applications/UserDefined/Power/power_switch_control.c @@ -8,8 +8,8 @@ #include #include -#include "../../../IfWrapper/GPIO.h" -#include "../../../Settings/port_config.h" +#include +#include /** * @enum APP_PSC_OUTPUT_LOGIC diff --git a/src/src_user/Applications/UserDefined/Thermal/temperature_anomaly.c b/src/src_user/Applications/UserDefined/Thermal/temperature_anomaly.c index 2067ffa9..7bae4ba5 100644 --- a/src/src_user/Applications/UserDefined/Thermal/temperature_anomaly.c +++ b/src/src_user/Applications/UserDefined/Thermal/temperature_anomaly.c @@ -7,13 +7,13 @@ #include #include -#include "../../../Library/c2a_math.h" +#include #include "thermo_sensor.h" -#include "../../DriverInstances/di_mpu9250.h" -#include "../../DriverInstances/di_stim210.h" -#include "../../DriverInstances/di_sagitta.h" -#include "../../DriverInstances/di_rw0003.h" -#include "../../DriverInstances/di_oem7600.h" +#include +#include +#include +#include +#include static TemperatureAnomaly temperature_anomaly_; diff --git a/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c b/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c index 7cec95ae..3f57dc59 100644 --- a/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c +++ b/src/src_user/Applications/UserDefined/Thermal/thermo_sensor.c @@ -6,9 +6,9 @@ #include "thermo_sensor.h" #include -#include "../../../IfWrapper/ADC.h" -#include "../../../Settings/port_config.h" -#include "../../../Library/physical_constants.h" +#include +#include +#include static ThermoSensor thermo_sensor_; From f658d389b3a6646154004d548d5e5705a1445c8b Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:23:33 +0200 Subject: [PATCH 158/176] Shorten include for Applications --- src/src_user/Applications/UserDefined/AppStatus.c | 4 ++-- src/src_user/Applications/UserDefined/debug_apps.c | 4 ++-- src/src_user/Applications/UserDefined/module_test_bench.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AppStatus.c b/src/src_user/Applications/UserDefined/AppStatus.c index b588d1af..a7f0ee87 100644 --- a/src/src_user/Applications/UserDefined/AppStatus.c +++ b/src/src_user/Applications/UserDefined/AppStatus.c @@ -3,8 +3,8 @@ #include #include -#include "../../Library/vt100.h" -#include "../../TlmCmd/command_definitions.h" +#include +#include #include static ASInfo asi_; diff --git a/src/src_user/Applications/UserDefined/debug_apps.c b/src/src_user/Applications/UserDefined/debug_apps.c index ffb53791..5c67ac37 100644 --- a/src/src_user/Applications/UserDefined/debug_apps.c +++ b/src/src_user/Applications/UserDefined/debug_apps.c @@ -4,12 +4,12 @@ #include // for NULL #include -#include "../../Library/vt100.h" +#include #include #include #include #include -#include "../../TlmCmd/telemetry_definitions.h" +#include #include #include #include diff --git a/src/src_user/Applications/UserDefined/module_test_bench.c b/src/src_user/Applications/UserDefined/module_test_bench.c index d006dc0d..eef33a98 100644 --- a/src/src_user/Applications/UserDefined/module_test_bench.c +++ b/src/src_user/Applications/UserDefined/module_test_bench.c @@ -5,9 +5,9 @@ #include #include #include -#include "../../Library/c2a_math.h" -#include "../../Library/math_constants.h" -#include "../../Library/physical_constants.h" +#include +#include +#include #include "AOCS/aocs_manager.h" // #define RUN_EXAMPLE //!< Enable test of the test bench From 69dfc05529aac901e373ea46e182fd281d4bbbda Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:28:29 +0200 Subject: [PATCH 159/176] Shorten include for Drivers --- src/src_user/Drivers/Aocs/mpu9250.c | 8 ++++---- src/src_user/Drivers/Aocs/mpu9250.h | 4 ++-- src/src_user/Drivers/Aocs/mtq_seiren.c | 4 ++-- src/src_user/Drivers/Aocs/mtq_seiren.h | 6 +++--- src/src_user/Drivers/Aocs/nanossoc_d60.c | 4 ++-- src/src_user/Drivers/Aocs/nanossoc_d60.h | 4 ++-- src/src_user/Drivers/Aocs/oem7600.c | 4 ++-- src/src_user/Drivers/Aocs/oem7600.h | 2 +- src/src_user/Drivers/Aocs/rm3100.c | 8 ++++---- src/src_user/Drivers/Aocs/rm3100.h | 4 ++-- src/src_user/Drivers/Aocs/rw0003.c | 6 +++--- src/src_user/Drivers/Aocs/rw0003.h | 4 ++-- src/src_user/Drivers/Aocs/sagitta.c | 6 +++--- src/src_user/Drivers/Aocs/sagitta.h | 4 ++-- src/src_user/Drivers/Aocs/stim210.c | 8 ++++---- src/src_user/Drivers/Aocs/stim210.h | 6 +++--- src/src_user/Drivers/Cdh/fm25v10.c | 2 +- src/src_user/Drivers/Etc/mobc.c | 2 +- src/src_user/Drivers/Power/ina260.c | 2 +- 19 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/src_user/Drivers/Aocs/mpu9250.c b/src/src_user/Drivers/Aocs/mpu9250.c index c1ce68a1..047c93b4 100644 --- a/src/src_user/Drivers/Aocs/mpu9250.c +++ b/src/src_user/Drivers/Aocs/mpu9250.c @@ -4,11 +4,11 @@ * @brief MPU9250のDriver */ -#include "./mpu9250.h" +#include "mpu9250.h" #include -#include "../../Library/physical_constants.h" -#include "../../Library/vector3.h" -#include "../../Library/matrix33.h" +#include +#include +#include #define MPU9250_STREAM_TLM_CMD (0) //!< テレコマで使うストリーム #define MPU9250_TX_FOR_REC_FRAME_SIZE (1) //!< 観測時の1回の送信データ長(バイト) diff --git a/src/src_user/Drivers/Aocs/mpu9250.h b/src/src_user/Drivers/Aocs/mpu9250.h index 885a4117..daf14a44 100644 --- a/src/src_user/Drivers/Aocs/mpu9250.h +++ b/src/src_user/Drivers/Aocs/mpu9250.h @@ -8,8 +8,8 @@ #include #include -#include "../../Library/quaternion.h" -#include "../../Library/physical_constants.h" +#include +#include /** * @enum MPU9250_ANG_VEL_RANGE diff --git a/src/src_user/Drivers/Aocs/mtq_seiren.c b/src/src_user/Drivers/Aocs/mtq_seiren.c index 175286eb..32a7df10 100644 --- a/src/src_user/Drivers/Aocs/mtq_seiren.c +++ b/src/src_user/Drivers/Aocs/mtq_seiren.c @@ -4,10 +4,10 @@ * @brief MTQ_SEIRENのDriver */ -#include "./mtq_seiren.h" +#include "mtq_seiren.h" #include -#include "../../Library/vector3.h" +#include static uint32_t MTQ_SEIREN_pwm_period_ms_ = 1000; // TODO_L: 今はコマンドで自由に変更が効くようになっているが、const化するかどうか検討が必要 diff --git a/src/src_user/Drivers/Aocs/mtq_seiren.h b/src/src_user/Drivers/Aocs/mtq_seiren.h index ab1f295b..31af36ef 100644 --- a/src/src_user/Drivers/Aocs/mtq_seiren.h +++ b/src/src_user/Drivers/Aocs/mtq_seiren.h @@ -8,9 +8,9 @@ #include #include -#include "../../IfWrapper/GPIO.h" -#include "../../Library/physical_constants.h" -#include "../../Library/c2a_math.h" +#include +#include +#include /** * @struct MTQ_SEIREN_POLARITY diff --git a/src/src_user/Drivers/Aocs/nanossoc_d60.c b/src/src_user/Drivers/Aocs/nanossoc_d60.c index f7e2c2fb..0fa3d07e 100644 --- a/src/src_user/Drivers/Aocs/nanossoc_d60.c +++ b/src/src_user/Drivers/Aocs/nanossoc_d60.c @@ -4,8 +4,8 @@ * @brief nanoSSOC_D60のDriver */ -#include "./nanossoc_d60.h" -#include "../../Library/vector3.h" +#include "nanossoc_d60.h" +#include #include // for memcpy #include diff --git a/src/src_user/Drivers/Aocs/nanossoc_d60.h b/src/src_user/Drivers/Aocs/nanossoc_d60.h index 04844ccc..9986fd89 100644 --- a/src/src_user/Drivers/Aocs/nanossoc_d60.h +++ b/src/src_user/Drivers/Aocs/nanossoc_d60.h @@ -8,8 +8,8 @@ #include #include -#include "../../Library/quaternion.h" -#include "../../Library/physical_constants.h" +#include +#include /** * @enum NANOSSOC_D60_ErrorCode diff --git a/src/src_user/Drivers/Aocs/oem7600.c b/src/src_user/Drivers/Aocs/oem7600.c index ee60e183..2779fec0 100644 --- a/src/src_user/Drivers/Aocs/oem7600.c +++ b/src/src_user/Drivers/Aocs/oem7600.c @@ -4,8 +4,8 @@ * @brief OEM7600のDriver */ -#include "./oem7600.h" -#include "../../Library/physical_constants.h" +#include "oem7600.h" +#include #include // for memcpy #include // for snprintf diff --git a/src/src_user/Drivers/Aocs/oem7600.h b/src/src_user/Drivers/Aocs/oem7600.h index 49d6f574..d2fa4ced 100644 --- a/src/src_user/Drivers/Aocs/oem7600.h +++ b/src/src_user/Drivers/Aocs/oem7600.h @@ -7,7 +7,7 @@ #define OEM7600_H_ #include -#include "../../IfWrapper/GPIO.h" +#include #include #include diff --git a/src/src_user/Drivers/Aocs/rm3100.c b/src/src_user/Drivers/Aocs/rm3100.c index 351e30ec..1cbbf4bb 100644 --- a/src/src_user/Drivers/Aocs/rm3100.c +++ b/src/src_user/Drivers/Aocs/rm3100.c @@ -4,10 +4,10 @@ * @brief RM3100のDriver */ -#include "./rm3100.h" -#include "../../Library/matrix33.h" -#include "../../Library/vector3.h" -#include "../../Library/c2a_math.h" +#include "rm3100.h" +#include +#include +#include #define RM3100_STREAM_TLM_CMD (0) #define RM3100_RX_FRAME_SIZE (9) //!< RM3100の場合この値で固定 diff --git a/src/src_user/Drivers/Aocs/rm3100.h b/src/src_user/Drivers/Aocs/rm3100.h index 4c049324..c037caa3 100644 --- a/src/src_user/Drivers/Aocs/rm3100.h +++ b/src/src_user/Drivers/Aocs/rm3100.h @@ -8,8 +8,8 @@ #include #include -#include "../../Library/quaternion.h" -#include "../../Library/physical_constants.h" +#include +#include extern const uint8_t RM3100_kCmmMode; //!< Continuous Measure Modeに入れるための設定値 diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index 323038c8..e5b59bc8 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -8,13 +8,13 @@ #include #endif -#include "./rw0003.h" +#include "rw0003.h" #include #include #include -#include "../../Library/vector3.h" -#include "../../Library/c2a_math.h" +#include +#include // #define DRIVER_RW0003_DEBUG_SHOW_REC_DATA diff --git a/src/src_user/Drivers/Aocs/rw0003.h b/src/src_user/Drivers/Aocs/rw0003.h index a90b0db8..bfdcfc08 100644 --- a/src/src_user/Drivers/Aocs/rw0003.h +++ b/src/src_user/Drivers/Aocs/rw0003.h @@ -8,8 +8,8 @@ #include #include -#include "../../Library/physical_constants.h" -#include "../../Library/c2a_math.h" +#include +#include extern const float RW0003_kMaxTorqueNm; //!< 出力可能最大トルク [Nm] extern const float RW0003_kMomentOfInertiaKgm2; //!< ホイール慣性モーメント [kgm2] diff --git a/src/src_user/Drivers/Aocs/sagitta.c b/src/src_user/Drivers/Aocs/sagitta.c index b6a72dd3..2cb79bf4 100644 --- a/src/src_user/Drivers/Aocs/sagitta.c +++ b/src/src_user/Drivers/Aocs/sagitta.c @@ -3,14 +3,14 @@ * @file sagitta.c * @brief SAGITTAのDriver */ -#include "./sagitta.h" +#include "sagitta.h" #include #include // for memcpy #include -#include "../../Library/xxhash.h" -#include "../../Library/physical_constants.h" +#include +#include // #define DRIVER_SAGITTA_DEBUG_SHOW_REC_DATA diff --git a/src/src_user/Drivers/Aocs/sagitta.h b/src/src_user/Drivers/Aocs/sagitta.h index e363682b..9e3e0dc3 100644 --- a/src/src_user/Drivers/Aocs/sagitta.h +++ b/src/src_user/Drivers/Aocs/sagitta.h @@ -7,8 +7,8 @@ #include #include -#include "../../Library/physical_constants.h" -#include "../../Library/quaternion.h" +#include +#include #define SAGITTA_PARAMETER_LOG_LEVEL_LENGTH (16) #define SAGITTA_PARAMETER_LIMITS_LENGTH (10) diff --git a/src/src_user/Drivers/Aocs/stim210.c b/src/src_user/Drivers/Aocs/stim210.c index 8b10608f..bb72b613 100644 --- a/src/src_user/Drivers/Aocs/stim210.c +++ b/src/src_user/Drivers/Aocs/stim210.c @@ -4,13 +4,13 @@ * @brief STIM210のDriver */ -#include "./stim210.h" +#include "stim210.h" #include #include #include -#include "../../Library/vector3.h" -#include "../../Library/matrix33.h" -#include "../../Library/crc8.h" +#include +#include +#include #define STIM210_STREAM_TLM_CMD (0) //!< テレコマで使うストリーム diff --git a/src/src_user/Drivers/Aocs/stim210.h b/src/src_user/Drivers/Aocs/stim210.h index 06234661..9ab1fbcd 100644 --- a/src/src_user/Drivers/Aocs/stim210.h +++ b/src/src_user/Drivers/Aocs/stim210.h @@ -9,9 +9,9 @@ #include #include -#include "../../IfWrapper/GPIO.h" -#include "../../Library/physical_constants.h" -#include "../../Library/quaternion.h" +#include +#include +#include /** * @enum STIM210_OPERATION_MODE diff --git a/src/src_user/Drivers/Cdh/fm25v10.c b/src/src_user/Drivers/Cdh/fm25v10.c index 0af66a33..8cbd6492 100644 --- a/src/src_user/Drivers/Cdh/fm25v10.c +++ b/src/src_user/Drivers/Cdh/fm25v10.c @@ -4,7 +4,7 @@ */ #pragma section REPRO -#include "./fm25v10.h" +#include "fm25v10.h" #include #include diff --git a/src/src_user/Drivers/Etc/mobc.c b/src/src_user/Drivers/Etc/mobc.c index d9e4ccf4..23ebf38f 100644 --- a/src/src_user/Drivers/Etc/mobc.c +++ b/src/src_user/Drivers/Etc/mobc.c @@ -6,7 +6,7 @@ // TODO_L: DS側のTCPが整理されたら,TCP関連を撲滅し,CTCPに統一する -#include "./mobc.h" +#include "mobc.h" #include #include #include diff --git a/src/src_user/Drivers/Power/ina260.c b/src/src_user/Drivers/Power/ina260.c index 1057f284..8662f05c 100644 --- a/src/src_user/Drivers/Power/ina260.c +++ b/src/src_user/Drivers/Power/ina260.c @@ -4,7 +4,7 @@ * @brief INA260のDriver */ -#include "./ina260.h" +#include "ina260.h" #include #include From 93cd2d301ea9431e08dabefc06f8822c35eaea21 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:31:02 +0200 Subject: [PATCH 160/176] Shorten include for IfWrappers --- src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.cpp | 2 +- src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.h | 2 +- src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.cpp | 2 +- src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.h | 2 +- src/src_user/IfWrapper/Arduino/CHIPKIT/I2C_CHIPKIT.cpp | 2 +- src/src_user/IfWrapper/Arduino/CHIPKIT/UART_CHIPKIT.cpp | 2 +- src/src_user/IfWrapper/Arduino/CHIPKIT/spi_chipkit.cpp | 4 ++-- src/src_user/IfWrapper/Arduino/UART_ARDUINO.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.cpp b/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.cpp index e8243a14..106ecd86 100644 --- a/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.cpp +++ b/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.cpp @@ -4,7 +4,7 @@ */ #include "./ADC_CHIPKIT.h" -#include "../../../Settings/port_config.h" +#include #include int ADC_CHIPKIT_initialize(unsigned int init_param) diff --git a/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.h b/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.h index efd7f640..c3a75224 100644 --- a/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.h +++ b/src/src_user/IfWrapper/Arduino/CHIPKIT/ADC_CHIPKIT.h @@ -1,7 +1,7 @@ #ifndef ADC_CHIPKIT_H_ #define ADC_CHIPKIT_H_ -#include "../../ADC.h" +#include #ifdef __cplusplus extern "C" { diff --git a/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.cpp b/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.cpp index 049e45e1..799c5e64 100644 --- a/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.cpp +++ b/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.cpp @@ -1,6 +1,6 @@ #include "./GPIO_CHIPKIT.h" -#include "../../../Settings/port_config.h" +#include #include diff --git a/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.h b/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.h index ace079e9..664a3442 100644 --- a/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.h +++ b/src/src_user/IfWrapper/Arduino/CHIPKIT/GPIO_CHIPKIT.h @@ -1,7 +1,7 @@ #ifndef GPIO_CHIPKIT_H_ #define GPIO_CHIPKIT_H_ -#include "../../GPIO.h" +#include #ifdef __cplusplus extern "C" { diff --git a/src/src_user/IfWrapper/Arduino/CHIPKIT/I2C_CHIPKIT.cpp b/src/src_user/IfWrapper/Arduino/CHIPKIT/I2C_CHIPKIT.cpp index fae0dac0..a2c44a87 100644 --- a/src/src_user/IfWrapper/Arduino/CHIPKIT/I2C_CHIPKIT.cpp +++ b/src/src_user/IfWrapper/Arduino/CHIPKIT/I2C_CHIPKIT.cpp @@ -4,7 +4,7 @@ */ #include "./I2C_CHIPKIT.h" -#include "../../../Settings/port_config.h" +#include extern "C" { #include diff --git a/src/src_user/IfWrapper/Arduino/CHIPKIT/UART_CHIPKIT.cpp b/src/src_user/IfWrapper/Arduino/CHIPKIT/UART_CHIPKIT.cpp index 027c37d5..601ff146 100644 --- a/src/src_user/IfWrapper/Arduino/CHIPKIT/UART_CHIPKIT.cpp +++ b/src/src_user/IfWrapper/Arduino/CHIPKIT/UART_CHIPKIT.cpp @@ -2,7 +2,7 @@ // Arduino(C++)のSerialポートををCで使えるようにするためのラッパ関数 #include "./UART_CHIPKIT.h" -#include "../../../Settings/port_config.h" +#include #include diff --git a/src/src_user/IfWrapper/Arduino/CHIPKIT/spi_chipkit.cpp b/src/src_user/IfWrapper/Arduino/CHIPKIT/spi_chipkit.cpp index c438dd8e..8fb26332 100644 --- a/src/src_user/IfWrapper/Arduino/CHIPKIT/spi_chipkit.cpp +++ b/src/src_user/IfWrapper/Arduino/CHIPKIT/spi_chipkit.cpp @@ -5,12 +5,12 @@ */ #include "./spi_chipkit.h" -#include "../../../Settings/port_config.h" +#include extern "C" { #include -#include "../../GPIO.h" +#include } #include diff --git a/src/src_user/IfWrapper/Arduino/UART_ARDUINO.c b/src/src_user/IfWrapper/Arduino/UART_ARDUINO.c index 2406a77a..7d0cc240 100644 --- a/src/src_user/IfWrapper/Arduino/UART_ARDUINO.c +++ b/src/src_user/IfWrapper/Arduino/UART_ARDUINO.c @@ -1,6 +1,6 @@ #include "./CHIPKIT/UART_CHIPKIT.h" -#include "../../Settings/port_config.h" +#include int UART_init(void* my_uart_v) { From 571a0f99cb0093199130e9fc5d6730f8b8d75140 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:34:38 +0200 Subject: [PATCH 161/176] Shorten include for Libraries --- .../Library/ControlUtility/cross_product_control.c | 4 ++-- .../Library/ControlUtility/cross_product_control.h | 4 ++-- src/src_user/Library/ControlUtility/gyroscopic_effect.c | 4 ++-- src/src_user/Library/ControlUtility/gyroscopic_effect.h | 2 +- src/src_user/Library/Orbit/kepler_orbit.c | 6 +++--- src/src_user/Library/Orbit/kepler_orbit.h | 4 ++-- src/src_user/Library/Orbit/sgp4.c | 8 ++++---- src/src_user/Library/Orbit/sgp4.h | 4 ++-- src/src_user/Library/SignalProcess/spike_filter.h | 4 ++-- src/src_user/Library/SignalProcess/z_filter.c | 2 +- src/src_user/Library/SignalProcess/z_filter.h | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/src_user/Library/ControlUtility/cross_product_control.c b/src/src_user/Library/ControlUtility/cross_product_control.c index d5d5d7eb..8c9b48d1 100644 --- a/src/src_user/Library/ControlUtility/cross_product_control.c +++ b/src/src_user/Library/ControlUtility/cross_product_control.c @@ -8,8 +8,8 @@ #include -#include "../vector3.h" -#include "../math_constants.h" +#include +#include void CROSS_PRODUCT_CONTROL_init(CrossProductControl* cross_product_control) diff --git a/src/src_user/Library/ControlUtility/cross_product_control.h b/src/src_user/Library/ControlUtility/cross_product_control.h index 068246dd..454897c1 100644 --- a/src/src_user/Library/ControlUtility/cross_product_control.h +++ b/src/src_user/Library/ControlUtility/cross_product_control.h @@ -5,8 +5,8 @@ #ifndef CROSS_PRODUCT_CONTROL_H_ #define CROSS_PRODUCT_CONTROL_H_ -#include "../physical_constants.h" -#include "../c2a_math.h" +#include +#include /** * @enum CROSS_PRODUCT_CONTROL_ERROR diff --git a/src/src_user/Library/ControlUtility/gyroscopic_effect.c b/src/src_user/Library/ControlUtility/gyroscopic_effect.c index 5cb24517..32d78f87 100644 --- a/src/src_user/Library/ControlUtility/gyroscopic_effect.c +++ b/src/src_user/Library/ControlUtility/gyroscopic_effect.c @@ -6,8 +6,8 @@ #include "gyroscopic_effect.h" -#include "../vector3.h" -#include "../matrix33.h" +#include +#include void GYROSCOPIC_EFFECT_calculate_gyroscopic_torque(float gyroscopic_trq_Nm[PHYSICAL_CONST_THREE_DIM], diff --git a/src/src_user/Library/ControlUtility/gyroscopic_effect.h b/src/src_user/Library/ControlUtility/gyroscopic_effect.h index 88141064..293f7246 100644 --- a/src/src_user/Library/ControlUtility/gyroscopic_effect.h +++ b/src/src_user/Library/ControlUtility/gyroscopic_effect.h @@ -6,7 +6,7 @@ #ifndef GYROSCOPIC_EFFECT_H_ #define GYROSCOPIC_EFFECT_H_ -#include "../physical_constants.h" +#include /** diff --git a/src/src_user/Library/Orbit/kepler_orbit.c b/src/src_user/Library/Orbit/kepler_orbit.c index 075b8eb2..4b9631b7 100644 --- a/src/src_user/Library/Orbit/kepler_orbit.c +++ b/src/src_user/Library/Orbit/kepler_orbit.c @@ -7,9 +7,9 @@ #include "kepler_orbit.h" #include -#include "../matrix33.h" -#include "../vector3.h" -#include "../math_constants.h" +#include +#include +#include #include #define KEPLER_ORBIT_ECCENTRICITY_THRESHOLD (1.0e-5f) //!< 円軌道とみなす離心率閾値 diff --git a/src/src_user/Library/Orbit/kepler_orbit.h b/src/src_user/Library/Orbit/kepler_orbit.h index a2fac0eb..0ccd7df7 100644 --- a/src/src_user/Library/Orbit/kepler_orbit.h +++ b/src/src_user/Library/Orbit/kepler_orbit.h @@ -5,8 +5,8 @@ #ifndef KEPLER_ORBIT_H_ #define KEPLER_ORBIT_H_ -#include "../physical_constants.h" -#include "../c2a_math.h" +#include +#include /** * @struct KeplerOrbitalElements diff --git a/src/src_user/Library/Orbit/sgp4.c b/src/src_user/Library/Orbit/sgp4.c index d2de1c4f..f1145d59 100644 --- a/src/src_user/Library/Orbit/sgp4.c +++ b/src/src_user/Library/Orbit/sgp4.c @@ -9,10 +9,10 @@ #include "sgp4.h" #include -#include "../physical_constants.h" -#include "../math_constants.h" -#include "../matrix33.h" -#include "../vector3.h" +#include +#include +#include +#include #include // SGP4内での使う定数 diff --git a/src/src_user/Library/Orbit/sgp4.h b/src/src_user/Library/Orbit/sgp4.h index 036da371..94f63e77 100644 --- a/src/src_user/Library/Orbit/sgp4.h +++ b/src/src_user/Library/Orbit/sgp4.h @@ -8,8 +8,8 @@ #define SGP4_H_ #include -#include "../physical_constants.h" -#include "../c2a_math.h" +#include +#include #define SGP4_NUM_COEFF_C (5) //!< C係数の要素数 #define SGP4_NUM_COEFF_D (4) //!< D係数の要素数 diff --git a/src/src_user/Library/SignalProcess/spike_filter.h b/src/src_user/Library/SignalProcess/spike_filter.h index 9106b0c8..65929be8 100644 --- a/src/src_user/Library/SignalProcess/spike_filter.h +++ b/src/src_user/Library/SignalProcess/spike_filter.h @@ -7,8 +7,8 @@ #define SPIKE_FILTER_H_ #include -#include "../c2a_math.h" -#include "../physical_constants.h" +#include +#include /** * @struct SpikeFilter_Config diff --git a/src/src_user/Library/SignalProcess/z_filter.c b/src/src_user/Library/SignalProcess/z_filter.c index e1fe0a7f..8abc7bf3 100644 --- a/src/src_user/Library/SignalProcess/z_filter.c +++ b/src/src_user/Library/SignalProcess/z_filter.c @@ -7,7 +7,7 @@ #include "z_filter.h" #include -#include "../math_constants.h" +#include //!< bilinear transformation diff --git a/src/src_user/Library/SignalProcess/z_filter.h b/src/src_user/Library/SignalProcess/z_filter.h index b7152c3b..45f9362d 100644 --- a/src/src_user/Library/SignalProcess/z_filter.h +++ b/src/src_user/Library/SignalProcess/z_filter.h @@ -7,7 +7,7 @@ #define Z_FILTER_H_ #include -#include "../c2a_math.h" +#include #define Z_FILTER_ORDER_MAX 2 //!< 離散フィルタ最高次数 From 7115fc1a889d0bdc3f4728eb0591ecea78b52bef Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 21:58:46 +0200 Subject: [PATCH 162/176] Shorten include for Settings --- .../non_volatile_memory_normal_parameters.c | 2 +- ...non_volatile_memory_redundant_parameters.c | 2 +- .../Elements/tl_elem_basic_sensor_update.c | 4 ++-- .../TaskLists/Elements/tl_elem_cdh_update.c | 4 ++-- .../Elements/tl_elem_debug_display.c | 4 ++-- .../Elements/tl_elem_drivers_update.c | 4 ++-- .../Elements/tl_elem_gs_related_process.c | 4 ++-- .../Elements/tl_elem_inertial_ref_update.c | 4 ++-- .../TaskLists/Elements/tl_elem_mtq_update.c | 4 ++-- .../Elements/tl_elem_oem7600_update.c | 4 ++-- .../Elements/tl_elem_rm3100_update.c | 4 ++-- .../TaskLists/Elements/tl_elem_rw_update.c | 4 ++-- .../Elements/tl_elem_stim210_update.c | 4 ++-- .../TaskLists/Elements/tl_elem_stt_update.c | 4 ++-- .../Elements/tl_elem_sun_vector_update.c | 4 ++-- .../Settings/Modes/TaskLists/tl_bdot.c | 4 ++-- .../Modes/TaskLists/tl_fine_three_axis.c | 4 ++-- .../Modes/TaskLists/tl_gpsr_range_observe.c | 4 ++-- .../Settings/Modes/TaskLists/tl_initial.c | 4 ++-- .../Modes/TaskLists/tl_rough_sun_pointing.c | 4 ++-- .../Modes/TaskLists/tl_rough_three_axis.c | 4 ++-- .../Modes/TaskLists/tl_rough_three_axis_rw.c | 4 ++-- .../Settings/Modes/Transitions/sl_bdot.c | 14 ++++++------ .../Modes/Transitions/sl_fine_three_axis.c | 10 ++++----- .../Settings/Modes/Transitions/sl_initial.c | 8 +++---- .../Modes/Transitions/sl_rough_sun_pointing.c | 8 +++---- .../Modes/Transitions/sl_rough_three_axis.c | 8 +++---- .../Transitions/sl_rough_three_axis_rw.c | 12 +++++----- .../Settings/Modes/mode_definitions.c | 2 +- .../component_selector_parameters.h | 4 ++-- .../event_handler_rule_hw_oc.c | 8 +++---- .../event_handler_rule_sw_oc.c | 8 +++---- .../event_handler_rule_tlmcmd.c | 22 +++++++++---------- 33 files changed, 94 insertions(+), 94 deletions(-) diff --git a/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_normal_parameters.c b/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_normal_parameters.c index f63397ee..c44af906 100644 --- a/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_normal_parameters.c +++ b/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_normal_parameters.c @@ -6,7 +6,7 @@ * https://docs.google.com/spreadsheets/d/1JWxLqdwr3IzQBAkYI4zkRBb0jKZwCUtGaSDt9z3XXPQ/edit#gid=1413802869 */ #include "non_volatile_memory_normal_parameters.h" -#include "../../../Applications/UserDefined/Cdh/non_volatile_memory_parameter.h" +#include void NVM_NORMAL_PARAMS_register(void) { diff --git a/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_redundant_parameters.c b/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_redundant_parameters.c index b274404f..f7554e3d 100644 --- a/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_redundant_parameters.c +++ b/src/src_user/Settings/Applications/NvmParams/non_volatile_memory_redundant_parameters.c @@ -6,7 +6,7 @@ * https://docs.google.com/spreadsheets/d/1JWxLqdwr3IzQBAkYI4zkRBb0jKZwCUtGaSDt9z3XXPQ/edit#gid=1180200168 */ #include "non_volatile_memory_redundant_parameters.h" -#include "../../../Applications/UserDefined/Cdh/non_volatile_memory_parameter.h" +#include void NVM_REDUNDANT_PARAMS_register(void) { diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_basic_sensor_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_basic_sensor_update.c index 7c6f4f56..ddea0cda 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_basic_sensor_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_basic_sensor_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_basic_sensor_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_cdh_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_cdh_update.c index f04e2316..f2423290 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_cdh_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_cdh_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_cdh_update.h" -#include "../../../../TlmCmd/block_command_definitions.h" -#include "../../../../Applications/app_registry.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_debug_display.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_debug_display.c index bc9cdef3..55229adc 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_debug_display.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_debug_display.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_debug_display.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_drivers_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_drivers_update.c index 13f7051e..42700ca5 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_drivers_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_drivers_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_drivers_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_gs_related_process.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_gs_related_process.c index 36e9de5d..39b78267 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_gs_related_process.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_gs_related_process.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_gs_related_process.h" -#include "../../../../TlmCmd/block_command_definitions.h" -#include "../../../../Applications/app_registry.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_inertial_ref_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_inertial_ref_update.c index 0a7bd884..36934bab 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_inertial_ref_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_inertial_ref_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_inertial_ref_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_mtq_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_mtq_update.c index 7296c720..553aacb6 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_mtq_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_mtq_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_mtq_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_oem7600_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_oem7600_update.c index b3c809ae..0d64c648 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_oem7600_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_oem7600_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_oem7600_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rm3100_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rm3100_update.c index cbaf44f8..dd929aa0 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rm3100_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rm3100_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_rm3100_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rw_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rw_update.c index a7f0c5d7..95d09712 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rw_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_rw_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_rw_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stim210_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stim210_update.c index 92646deb..3a836acb 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stim210_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stim210_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_stim210_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stt_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stt_update.c index 27a2229d..80b4b542 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stt_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_stt_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_stt_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_sun_vector_update.c b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_sun_vector_update.c index ce2531a7..0d878c9e 100644 --- a/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_sun_vector_update.c +++ b/src/src_user/Settings/Modes/TaskLists/Elements/tl_elem_sun_vector_update.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_elem_sun_vector_update.h" -#include "../../../../Applications/app_registry.h" -#include "../../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/tl_bdot.c b/src/src_user/Settings/Modes/TaskLists/tl_bdot.c index ee5bf9ac..2c95c9df 100644 --- a/src/src_user/Settings/Modes/TaskLists/tl_bdot.c +++ b/src/src_user/Settings/Modes/TaskLists/tl_bdot.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_bdot.h" -#include "../../../Applications/app_registry.h" -#include "../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/tl_fine_three_axis.c b/src/src_user/Settings/Modes/TaskLists/tl_fine_three_axis.c index 0a684235..1fdf6ee7 100644 --- a/src/src_user/Settings/Modes/TaskLists/tl_fine_three_axis.c +++ b/src/src_user/Settings/Modes/TaskLists/tl_fine_three_axis.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_fine_three_axis.h" -#include "../../../Applications/app_registry.h" -#include "../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/tl_gpsr_range_observe.c b/src/src_user/Settings/Modes/TaskLists/tl_gpsr_range_observe.c index 770a1f45..5e1fe596 100644 --- a/src/src_user/Settings/Modes/TaskLists/tl_gpsr_range_observe.c +++ b/src/src_user/Settings/Modes/TaskLists/tl_gpsr_range_observe.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_gpsr_range_observe.h" -#include "../../../Applications/app_registry.h" -#include "../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/tl_initial.c b/src/src_user/Settings/Modes/TaskLists/tl_initial.c index acab48ae..2431b536 100644 --- a/src/src_user/Settings/Modes/TaskLists/tl_initial.c +++ b/src/src_user/Settings/Modes/TaskLists/tl_initial.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_initial.h" -#include "../../../Applications/app_registry.h" -#include "../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/tl_rough_sun_pointing.c b/src/src_user/Settings/Modes/TaskLists/tl_rough_sun_pointing.c index 3905b595..b43e1848 100644 --- a/src/src_user/Settings/Modes/TaskLists/tl_rough_sun_pointing.c +++ b/src/src_user/Settings/Modes/TaskLists/tl_rough_sun_pointing.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_rough_sun_pointing.h" -#include "../../../Applications/app_registry.h" -#include "../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis.c b/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis.c index e15d253a..9e933045 100644 --- a/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis.c +++ b/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_rough_three_axis.h" -#include "../../../Applications/app_registry.h" -#include "../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis_rw.c b/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis_rw.c index aec12a3d..8c455a3d 100644 --- a/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis_rw.c +++ b/src/src_user/Settings/Modes/TaskLists/tl_rough_three_axis_rw.c @@ -5,8 +5,8 @@ #pragma section REPRO #include "tl_rough_three_axis_rw.h" -#include "../../../Applications/app_registry.h" -#include "../../../TlmCmd/block_command_definitions.h" +#include +#include #include diff --git a/src/src_user/Settings/Modes/Transitions/sl_bdot.c b/src/src_user/Settings/Modes/Transitions/sl_bdot.c index 7249ff8a..074e1b46 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_bdot.c +++ b/src/src_user/Settings/Modes/Transitions/sl_bdot.c @@ -6,19 +6,19 @@ #pragma section REPRO #include "sl_bdot.h" -#include "../../../TlmCmd/block_command_definitions.h" -#include "../../../TlmCmd/command_definitions.h" -#include "../../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../../Applications/DriverInstances/di_rm3100.h" -#include "../../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h" +#include +#include +#include +#include +#include #include #include #include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" -#include "../../../Settings/SatelliteParameters/component_selector_parameters.h" +#include +#include void BCL_load_initial_to_bdot(void) { diff --git a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c index 92cfb49c..dd7f1ab7 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c +++ b/src/src_user/Settings/Modes/Transitions/sl_fine_three_axis.c @@ -6,17 +6,17 @@ #pragma section REPRO #include "sl_fine_three_axis.h" -#include "../../../TlmCmd/block_command_definitions.h" -#include "../../../TlmCmd/command_definitions.h" -#include "../../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h" -#include "../../../Library/physical_constants.h" +#include +#include +#include +#include #include #include #include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include void BCL_load_rough_three_axis_rw_to_fine_three_axis(void) { diff --git a/src/src_user/Settings/Modes/Transitions/sl_initial.c b/src/src_user/Settings/Modes/Transitions/sl_initial.c index ad5b50fd..50fbe362 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_initial.c +++ b/src/src_user/Settings/Modes/Transitions/sl_initial.c @@ -5,10 +5,10 @@ #pragma section REPRO #include "sl_initial.h" -#include "../../../TlmCmd/block_command_definitions.h" -#include "../../../TlmCmd/command_definitions.h" -#include "../../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../../Applications/DriverInstances/di_ina260.h" +#include +#include +#include +#include #include #include diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c b/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c index 49e067cc..70963450 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_sun_pointing.c @@ -6,16 +6,16 @@ #pragma section REPRO #include "sl_rough_sun_pointing.h" -#include "../../../TlmCmd/block_command_definitions.h" -#include "../../../TlmCmd/command_definitions.h" -#include "../../../Applications/UserDefined/Power/power_switch_control.h" +#include +#include +#include #include #include #include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include void BCL_load_bdot_to_rough_sun_pointing(void) { diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c index d6c6f421..dcd9030e 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis.c @@ -6,15 +6,15 @@ #pragma section REPRO #include "sl_rough_three_axis.h" -#include "../../../TlmCmd/block_command_definitions.h" -#include "../../../TlmCmd/command_definitions.h" -#include "../../../Library/physical_constants.h" +#include +#include +#include #include #include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include void BCL_load_rough_sun_pointing_to_rough_three_axis(void) { diff --git a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c index c601eb46..4f8582b0 100644 --- a/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c +++ b/src/src_user/Settings/Modes/Transitions/sl_rough_three_axis_rw.c @@ -6,18 +6,18 @@ #pragma section REPRO #include "sl_rough_three_axis_rw.h" -#include "../../../TlmCmd/block_command_definitions.h" -#include "../../../TlmCmd/command_definitions.h" -#include "../../../Applications/UserDefined/AOCS/aocs_manager.h" -#include "../../../Library/physical_constants.h" -#include "../../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h" +#include +#include +#include +#include +#include #include #include #include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include void BCL_load_rough_three_axis_to_rough_three_axis_rw(void) { diff --git a/src/src_user/Settings/Modes/mode_definitions.c b/src/src_user/Settings/Modes/mode_definitions.c index cb707764..a0df7a5a 100644 --- a/src/src_user/Settings/Modes/mode_definitions.c +++ b/src/src_user/Settings/Modes/mode_definitions.c @@ -7,7 +7,7 @@ #include -#include "../../TlmCmd/block_command_definitions.h" +#include // モードごとのTLを指定 void MD_load_mode_list(void) diff --git a/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h b/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h index fb1f0181..5534688c 100644 --- a/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/component_selector_parameters.h @@ -6,8 +6,8 @@ #ifndef COMPONENT_SELECTOR_PARAMETERS_H_ #define COMPONENT_SELECTOR_PARAMETERS_H_ -#include "../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h" -#include "../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h" +#include +#include extern const APP_MAG_SELECTOR_STATE COMPONENT_SELECTOR_PARAMETERS_initial_selected_magnetometer; //!< Initial selected magnetometer diff --git a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c index f9425f1a..c2438d2c 100644 --- a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c +++ b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_hw_oc.c @@ -5,12 +5,12 @@ */ #include "event_handler_rules.h" #include -#include "../../../TlmCmd/block_command_definitions.h" -#include "../event_logger_group.h" -#include "../../../Applications/DriverInstances/di_ina260.h" +#include +#include +#include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include void EH_load_rule_hw_oc(void) { diff --git a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c index e4441c00..088898e4 100644 --- a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c +++ b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_sw_oc.c @@ -5,12 +5,12 @@ */ #include "event_handler_rules.h" #include -#include "../../../TlmCmd/block_command_definitions.h" -#include "../event_logger_group.h" -#include "../../../Applications/DriverInstances/di_ina260.h" +#include +#include +#include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include void EH_load_rule_sw_oc(void) { diff --git a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c index a363ad25..77273981 100644 --- a/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c +++ b/src/src_user/Settings/System/EventHandlerRules/event_handler_rule_tlmcmd.c @@ -5,19 +5,19 @@ */ #include "event_handler_rules.h" #include -#include "../../../TlmCmd/block_command_definitions.h" -#include "../event_logger_group.h" -#include "../../../Applications/DriverInstances/di_mpu9250.h" -#include "../../../Applications/DriverInstances/di_rm3100.h" -#include "../../../Applications/DriverInstances/di_nanossoc_d60.h" -#include "../../../Applications/DriverInstances/di_stim210.h" -#include "../../../Applications/DriverInstances/di_sagitta.h" -#include "../../../Applications/DriverInstances/di_oem7600.h" -#include "../../../Applications/DriverInstances/di_rw0003.h" -#include "../../../Applications/DriverInstances/di_ina260.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // Satellite Parameters -#include "../../../Settings/SatelliteParameters/fdir_parameters.h" +#include void EH_load_rule_tlmcmd(void) { From 104931154e730eceb62a3bc687f9eb3041b8d6ff Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Tue, 4 Jul 2023 22:14:04 +0200 Subject: [PATCH 163/176] Shorten include for TlmCmd --- .../NormalBlockCommandDefinition/nbc_ina260.c | 16 +++--- .../NormalBlockCommandDefinition/nbc_mtq.c | 14 +++--- .../nbc_nanossoc_d60.c | 16 +++--- .../nbc_oem7600.c | 18 +++---- .../NormalBlockCommandDefinition/nbc_rm3100.c | 18 +++---- .../NormalBlockCommandDefinition/nbc_rw0003.c | 16 +++--- .../nbc_sagitta.c | 18 +++---- .../nbc_start_hk_tlm.c | 6 +-- .../nbc_stim210.c | 20 ++++---- .../TlmCmd/block_command_definitions.c | 50 +++++++++---------- src/src_user/TlmCmd/command_source.h | 2 +- src/src_user/TlmCmd/user_packet_handler.h | 2 +- 12 files changed, 98 insertions(+), 98 deletions(-) diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c index 309b8acc..628b181b 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_ina260.c @@ -1,20 +1,20 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" +#include +#include +#include +#include // Satellite Parameters -#include "../../Settings/SatelliteParameters/ina260_parameters.h" +#include void BCL_load_power_on_ina260() { diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_mtq.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_mtq.c index f2f580c6..d43becbf 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_mtq.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_mtq.c @@ -1,17 +1,17 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" +#include +#include +#include +#include void BCL_load_power_on_mtq(void) { diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c index 9e56ed08..2d939c68 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_nanossoc_d60.c @@ -1,18 +1,18 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Applications/DriverInstances/di_rm3100.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" +#include +#include +#include +#include +#include void BCL_load_power_on_nanossoc_d60(void) { diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_oem7600.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_oem7600.c index 055ea370..a8c06920 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_oem7600.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_oem7600.c @@ -1,19 +1,19 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/DriverInstances/di_oem7600.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Applications/DriverInstances/di_rm3100.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" +#include +#include +#include +#include +#include +#include void BCL_load_power_on_oem7600(void) { diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rm3100.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rm3100.c index cf6581a2..e9bc2787 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rm3100.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rm3100.c @@ -1,19 +1,19 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/DriverInstances/di_rm3100.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" +#include +#include +#include +#include +#include +#include void BCL_load_power_on_rm3100() { diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rw0003.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rw0003.c index b1dcc087..be93318a 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rw0003.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_rw0003.c @@ -1,18 +1,18 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/DriverInstances/di_rw0003.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" +#include +#include +#include +#include +#include void BCL_load_power_on_rwx(void) { diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_sagitta.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_sagitta.c index e7d5a439..40f0a8cb 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_sagitta.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_sagitta.c @@ -1,19 +1,19 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/DriverInstances/di_sagitta.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Applications/DriverInstances/di_rm3100.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" +#include +#include +#include +#include +#include +#include void BCL_load_power_on_sagitta(void) { diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c index c543b007..afb1a157 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c @@ -1,9 +1,9 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include diff --git a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_stim210.c b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_stim210.c index 6223b336..98e39d87 100644 --- a/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_stim210.c +++ b/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_stim210.c @@ -1,21 +1,21 @@ #pragma section REPRO #include "nbc_header.h" -#include "../block_command_definitions.h" -#include "../command_definitions.h" -#include "../telemetry_definitions.h" +#include +#include +#include #include #include #include -#include "../../Applications/UserDefined/Power/power_switch_control.h" -#include "../../Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gyro_selector.h" -#include "../../Applications/DriverInstances/di_ina260.h" -#include "../../Applications/DriverInstances/di_rm3100.h" -#include "../../Settings/System/EventHandlerRules/event_handler_rules.h" -#include "../../Settings/System/event_logger_group.h" -#include "../../Applications/DriverInstances/di_stim210.h" +#include +#include +#include +#include +#include +#include +#include void BCL_load_power_on_stim210(void) diff --git a/src/src_user/TlmCmd/block_command_definitions.c b/src/src_user/TlmCmd/block_command_definitions.c index 030d409d..821a6bd6 100644 --- a/src/src_user/TlmCmd/block_command_definitions.c +++ b/src/src_user/TlmCmd/block_command_definitions.c @@ -5,33 +5,33 @@ #include // for memcpy #include "command_definitions.h" -#include "../Settings/Modes/Transitions/sl_nop.h" -#include "../Settings/Modes/Transitions/sl_initial.h" -#include "../Settings/Modes/Transitions/sl_bdot.h" -#include "../Settings/Modes/Transitions/sl_rough_sun_pointing.h" -#include "../Settings/Modes/Transitions/sl_rough_three_axis.h" -#include "../Settings/Modes/Transitions/sl_rough_three_axis_rw.h" -#include "../Settings/Modes/Transitions/sl_fine_three_axis.h" +#include +#include +#include +#include +#include +#include +#include -#include "../Settings/Modes/TaskLists/tl_initial.h" -#include "../Settings/Modes/TaskLists/tl_bdot.h" -#include "../Settings/Modes/TaskLists/tl_rough_sun_pointing.h" -#include "../Settings/Modes/TaskLists/tl_rough_three_axis.h" -#include "../Settings/Modes/TaskLists/tl_rough_three_axis_rw.h" -#include "../Settings/Modes/TaskLists/tl_fine_three_axis.h" -#include "../Settings/Modes/TaskLists/tl_gpsr_range_observe.h" +#include +#include +#include +#include +#include +#include +#include -#include "../Settings/Modes/TaskLists/Elements/tl_elem_cdh_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_drivers_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_inertial_ref_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_sun_vector_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_mtq_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_basic_sensor_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_rw_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_rm3100_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_stim210_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_oem7600_update.h" -#include "../Settings/Modes/TaskLists/Elements/tl_elem_stt_update.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "./NormalBlockCommandDefinition/nbc_header.h" diff --git a/src/src_user/TlmCmd/command_source.h b/src/src_user/TlmCmd/command_source.h index f083a903..72a3262d 100644 --- a/src/src_user/TlmCmd/command_source.h +++ b/src/src_user/TlmCmd/command_source.h @@ -15,7 +15,7 @@ #include #include #include -#include "../Applications/app_headers.h" +#include // #include "telemetry_definitions.h" #endif diff --git a/src/src_user/TlmCmd/user_packet_handler.h b/src/src_user/TlmCmd/user_packet_handler.h index 31539e0a..2ea03bd0 100644 --- a/src/src_user/TlmCmd/user_packet_handler.h +++ b/src/src_user/TlmCmd/user_packet_handler.h @@ -10,7 +10,7 @@ #include #include #include "telemetry_definitions.h" -#include "../Settings/TlmCmd/Ccsds/apid_define.h" +#include /** * @brief PH のユーザー固有部初期化処理 From 52b20e9b09d8678ccfe2d604aadbad3247e95273 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 5 Jul 2023 08:15:17 +0200 Subject: [PATCH 164/176] Modify label --- .github/labels.yml | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/labels.yml b/.github/labels.yml index ff5dcde8..f0ea8dfd 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,55 +1,55 @@ -- name: "bug" - color: "d73a4a" +- name: ":bug: bug" + color: "F9D0C4" description: "Something isn't working" -- name: "documentation" - color: "0075ca" +- name: ":notebook: documentation" + color: "F0F0F0" description: "Improvements or additions to documentation" -- name: "good first issue" +- name: ":beginner: good first issue" description: "Good for newcomers" - color: "7057ff" + color: "F0F0F0" -- name: "question" +- name: ":question: question" description: "Further information is requested" - color: "d876e3" + color: "F0F0F0" -- name: "priority::high" - description: "priorityg high" - color: "d93f0b" +- name: ":rocket: priority::high" + description: "priority high" + color: "F9D0C4" -- name: "priority::low" +- name: ":car: priority::low" description: "priority low" - color: "9dcce0" + color: "C2E0C6" -- name: "priority::medium" +- name: ":airplane: priority::medium" description: "priority medium" - color: "fbca04" + color: "FEF2C0" -- name: "major update" - color: "B60205" +- name: ":whale: major update" + color: "F9D0C4" description: "Major update" -- name: "minor update" - color: "EFFA85" +- name: ":dolphin: minor update" + color: "FEF2C0" description: "Minor update" -- name: "patch" - color: "08C036" - description: "Patch" +- name: ":fish: patch" + color: "C2E0C6" + description: "Patch Update" -- name: "tools" - description: "" - color: "510f70" +- name: ":wrench: tools" + description: "Tools" + color: "F0F0F0" -- name: "C2A" - description: "" - color: "2a9637" +- name: ":artificial_satellite: C2A" + description: "Command Centric Architecture" + color: "F0F0F0" -- name: "S2E" - description: "" - color: "eef789" +- name: ":ringed_planet: S2E" + description: "Spacecraft Simulation Environment" + color: "F0F0F0" -- name: "WINGS" - description: "" - color: "1503bb" +- name: ":satellite: WINGS" + description: "Web-based INterface Ground-station Software" + color: "F0F0F0" From 563ff1595ac87aa050b6f2cd0a05887791093be2 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 5 Jul 2023 19:01:57 +0900 Subject: [PATCH 165/176] [Fix] Fix array amount definitions from const variable into #define directive --- src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h | 2 +- src/src_user/Settings/SatelliteParameters/stim210_parameters.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h index ea177b68..421adccb 100644 --- a/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/mpu9250_parameters.h @@ -11,7 +11,7 @@ #include // Constant value -const uint8_t MPU9250_PARAMETERS_kNumCoeffTempCalib = 2; //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. +#define MPU9250_PARAMETERS_kNumCoeffTempCalib (2) //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. // Magnetometer bias extern const float MPU9250_PARAMETERS_mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< Magnetic field observation bias @ component frame [nT] diff --git a/src/src_user/Settings/SatelliteParameters/stim210_parameters.h b/src/src_user/Settings/SatelliteParameters/stim210_parameters.h index 1e13a5d1..98772ff2 100644 --- a/src/src_user/Settings/SatelliteParameters/stim210_parameters.h +++ b/src/src_user/Settings/SatelliteParameters/stim210_parameters.h @@ -10,7 +10,7 @@ #include // Constant value -const uint8_t STIM210_PARAMETERS_kNumCoeffTempCalib = 2; //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. +#define STIM210_PARAMETERS_kNumCoeffTempCalib (2) //!< Number of coefficient for calibration. This value cannot be changed since it relates Tlm/Cmd definition. // Gyro Bias and scale factor temperature calibration extern const float STIM210_PARAMETERS_temperature_range_high_degC; //!< Temperature range high [degC] From 61d7ea238919a02e7bec9c1aefe12e8aa4a23b62 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Wed, 5 Jul 2023 19:53:57 +0900 Subject: [PATCH 166/176] [Fix] Fix not to call functions in static parameter initialization --- .../Sample/attitude_control_parameters.c | 29 ++++++++++--------- .../attitude_determination_parameters.c | 10 ++++--- .../Sample/attitude_target_parameters.c | 5 ++-- .../Sample/fdir_parameters.c | 13 +++++---- .../Sample/nanossoc_d60_parameters.c | 5 ++-- .../Sample/orbit_parameters.c | 19 ++++++------ .../Sample/parameter_setting_macro.h | 25 ++++++++++++++++ .../Sample/sagitta_parameters.c | 5 ++-- 8 files changed, 72 insertions(+), 39 deletions(-) create mode 100644 src/src_user/Settings/SatelliteParameters/Sample/parameter_setting_macro.h diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index e5a3d2d3..e8f6e31f 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -4,6 +4,7 @@ */ #include +#include // Bdot const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM] = { -0.1f, -0.1f, -0.1f }; @@ -20,18 +21,18 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y = { 2.0e-2f, 0.0f, 0.0f }; const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z = { 7.0e-3f, 0.0f, 2.0e-2f }; // MTQ control settings -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_rate_rad_s = 1.6e-3f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_transient = 0.6f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_transient = 0.0f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_stable = 0.8f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_stable = 0.25f; // Integral control setting -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(40.0f); // Spin control setting -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s = 1.4e-2f; // Low Pass Filter setting const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz = 10.0f; @@ -50,16 +51,16 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y = const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z = { 1.5f * 2.5e-2f, 0.0f, 0.0f }; // MTQ control settings // 下記の値はISS軌道を想定した値, 変更時は,HW側の出力最大値にかからない様に留意しながら,ゲインと組み合わせて調整すること. -const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(18.0f); +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(18.0f); const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s = 5.0e-3f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient = 0.6f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient = 0.0f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable = 0.6f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_stable = 0.1f; -const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); // Integral control setting -extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); -extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(40.0f); +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); // Output torque Low Pass Filter(LPF) setting extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz = 10.0f; extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz = 0.3f; @@ -75,9 +76,9 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y = { const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; // Unloading -const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(7000.0f); -const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(-7000.0f); -const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(0.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s = PARAMETER_SETTING_MACRO_RPM_TO_RADIAN_SEC(7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s = PARAMETER_SETTING_MACRO_RPM_TO_RADIAN_SEC(-7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s = PARAMETER_SETTING_MACRO_RPM_TO_RADIAN_SEC(0.0f); const float ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain = -1.0e-7f; const APP_UNLOADING_EXEC ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable = APP_UNLOADING_EXEC_DISABLE; @@ -88,5 +89,5 @@ const float ATTITUDE_CONTROL_PARAMETERS_internal_torque_max_body_Nm[PHYSICAL_CON const float ATTITUDE_CONTROL_PARAMETERS_external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 3.0e-4f, 3.0e-4f, 3.0e-4f }; // Target Setting parameters -const float ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s = PHYSICAL_CONST_degree_to_radian(0.8f); -const float ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.8f); +const float ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c index 55ab0951..2c49ada0 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c @@ -33,8 +33,10 @@ const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_r 9.6963e-6f }; // Process noise model // We assume the attitude target is operated to synchronize with orbit. -const float kOrbitPeriodSec = 5700.0f; -const float kEkfComputationCycleSec = 0.1f; -const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); +#define ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC (5700.0f) +#define ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC (0.1f) +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) + * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); // The attitude rate process noise is not well tuned at this moment -const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) + * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c index 6c8730cc..d2da0d8d 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c @@ -4,6 +4,7 @@ */ #include +#include // Target Calculation Mode const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_CALC_MODE_MANUAL; @@ -22,6 +23,6 @@ extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body[PHYSICAL_CO extern const MATRIX33_ROTATION_AXIS ATTITUDE_TARGET_PARAMETERS_offset_angle_axis = MATRIX33_ROTATION_AXIS_X; extern const float ATTITUDE_TARGET_PARAMETERS_offset_angle_rad = 0.0f; // Target on earth surface -extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM] = { PHYSICAL_CONST_degree_to_radian(35.7130f), - PHYSICAL_CONST_degree_to_radian(139.7596f), +extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM] = { PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(35.7130f), + PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(139.7596f), 23.0f }; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c index 5c4966ba..ac13eee9 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -4,28 +4,29 @@ */ #include +#include // Mode Manager // Bdot -const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.5f); const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s = 5.0f * 60.0f; -const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.5f); const float FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s = 200.0f; const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s = 5 * 60; // Sun pointing control divergence anomaly -const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); +const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(45.0f); const float FDIR_PARAMETERS_sun_angle_div_time_limit_s = 50.0f * 60.0f; const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s = 25 * 60; // Rough three axis control with MTQ divergence anomaly -const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); const float FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s = 5.0f * 60.0f; const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s = 35 * 60; // Rough three axis control with RW divergence anomaly -const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad = PHYSICAL_CONST_degree_to_radian(10.0f); +const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(10.0f); const float FDIR_PARAMETERS_rough_three_axis_rw_div_time_limit_s = 1.0f * 60.0f; const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s = 5 * 60; // Fine three axis control divergence anomaly -const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(5.0f); +const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(5.0f); const float FDIR_PARAMETERS_fine_three_axis_div_time_limit_s = 1.0f * 60.0f; const uint32_t FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s = 5 * 60; // Sensor invisible anomaly diff --git a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c index 72d17df6..c4069701 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c @@ -4,6 +4,7 @@ */ #include +#include // Frame conversion const Quaternion NANOSSOC_D60_PARAMETERS_py_quaternion_c2b = { 0.70710665f, 0.0f, 0.0f, 0.70710665f }; @@ -14,8 +15,8 @@ const Quaternion NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b = { -0.707106471f, 0. // Spike Filter uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_accept = 10; uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning = 60; -float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(3); -float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(180); +float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(3); +float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(180); // Sun intensity threshold float NANOSSOC_D60_PARAMETERS_sun_intensity_lower_threshold_percent = 80.0f; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index d9c07057..fcbb271a 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -5,6 +5,7 @@ #include #include +#include // Time const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 @@ -15,9 +16,9 @@ const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method = APP_ORBI // Kepler Orbit const float ORBIT_PARAMETERS_kepler_semi_major_axis_km = 6899.3234f; const float ORBIT_PARAMETERS_kepler_eccentricity = 4.86396e-4f; -const float ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); -const float ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); -const float ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); +const float ORBIT_PARAMETERS_kepler_inclination_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(97.50372f); +const float ORBIT_PARAMETERS_kepler_raan_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(340.20189f); +const float ORBIT_PARAMETERS_kepler_arg_perigee_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(221.60537f); const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; // TLE for SGP4 @@ -37,14 +38,14 @@ const float ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; // Initial orbital elements const float ORBIT_PARAMETERS_gpsr_semi_major_axis_km = 6899.3234f; const float ORBIT_PARAMETERS_gpsr_eccentricity = 4.86396e-4f; -const float ORBIT_PARAMETERS_gpsr_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); -const float ORBIT_PARAMETERS_gpsr_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); -const float ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(0.0f); +const float ORBIT_PARAMETERS_gpsr_inclination_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(97.50372f); +const float ORBIT_PARAMETERS_gpsr_raan_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(340.20189f); +const float ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.0f); const double ORBIT_PARAMETERS_gpsr_epoch_jday = 2.459931936719433e6; // Threshold const float ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km = 50.0f; const float ORBIT_PARAMETERS_gpsr_threshold_eccentricity = 0.1f; -const float ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const float ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const float ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(50.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(50.0f); const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday = 0.1; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/parameter_setting_macro.h b/src/src_user/Settings/SatelliteParameters/Sample/parameter_setting_macro.h new file mode 100644 index 00000000..b4154fc5 --- /dev/null +++ b/src/src_user/Settings/SatelliteParameters/Sample/parameter_setting_macro.h @@ -0,0 +1,25 @@ +/** + * @file parameter_setting_macro.h + * @brief 衛星固有パラメータの数値設定で使われるマクロをまとめたヘッダファイル. + * @note staticな衛星固有パラメータの初期化子は定数式か文字列リテラルである必要があり,ここに関数式を含めることができない. + * 関数式を呼び出した場合,initializer element is not constantビルドエラーとなる. + */ + +#ifndef PARAMETER_SETTING_MACRO_H_ +#define PARAMETER_SETTING_MACRO_H_ + +#include + +/** + * @brief degからradに変換する関数マクロ + * @param[in] deg : 角度[deg] +*/ +#define PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(degree) ((degree) * (MATH_CONST_PI) / 180.0f) + +/** + * @brief RPMからrad/sに変換する関数マクロ + * @param[in] rpm : 回転角速度[rpm] +*/ +#define PARAMETER_SETTING_MACRO_RPM_TO_RADIAN_SEC(rpm) ((rpm) * MATH_CONST_PI / 30.0f) + +#endif // PARAMETER_SETTING_MACRO_H_ diff --git a/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c index e38955fe..66b480e7 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c @@ -4,11 +4,12 @@ */ #include +#include // Spike Filter uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_accept = 20; uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_reject_continued_warning = 200; -double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(1.0f); -double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(0.6f); +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(1.0f); +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.6f); // Sun intensity threshold From 25dd6c38273f4b359364fb4ba3107408e083cd50 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 5 Jul 2023 23:34:53 +0200 Subject: [PATCH 167/176] Remove CDH member --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 00fef5dc..817ff500 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,7 +2,7 @@ * @ut-issl/aocs # CDH team -* @chutaro +# * @chutaro # ArkEdge Sapce * @sksat From 4f71b567b06c885909bf68c75e5a74b1576270ed Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Thu, 6 Jul 2023 10:46:14 +0900 Subject: [PATCH 168/176] [Fix] Add new parameter files into .vcxproj --- C2A_AOBC.vcxproj | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/C2A_AOBC.vcxproj b/C2A_AOBC.vcxproj index 583c7539..86f0a581 100644 --- a/C2A_AOBC.vcxproj +++ b/C2A_AOBC.vcxproj @@ -309,7 +309,20 @@ + + + + + + + + + + + + + From 67f77942683c203e8484ea8322e7b5f281e71177 Mon Sep 17 00:00:00 2001 From: hirotaka_sekine Date: Thu, 6 Jul 2023 12:43:01 +0900 Subject: [PATCH 169/176] =?UTF-8?q?=E9=81=8B=E7=94=A8=E3=81=A7=E3=81=AE?= =?UTF-8?q?=E6=94=B9=E5=96=84=E6=A1=88=E3=82=92=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_user/Applications/DriverInstances/di_sagitta.c | 4 ---- src/src_user/Drivers/Aocs/sagitta.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_sagitta.c b/src/src_user/Applications/DriverInstances/di_sagitta.c index 78b6d522..8e56d7b2 100644 --- a/src/src_user/Applications/DriverInstances/di_sagitta.c +++ b/src/src_user/Applications/DriverInstances/di_sagitta.c @@ -140,8 +140,6 @@ CCP_CmdRet Cmd_DI_SAGITTA_SET_UNIX_TIME_US(const CommonCmdPacket* packet) CCP_CmdRet Cmd_DI_SAGITTA_SET_PARAMETER(const CommonCmdPacket* packet) { - if (!DI_SAGITTA_is_booted_[SAGITTA_IDX_IN_UNIT]) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - uint8_t param_id = CCP_get_param_from_packet(packet, 0, uint8_t); DS_CMD_ERR_CODE ret; @@ -244,8 +242,6 @@ CCP_CmdRet Cmd_DI_SAGITTA_CHANGE_PARAMETER(const CommonCmdPacket* packet) CCP_CmdRet Cmd_DI_SAGITTA_READ_PARAMETER(const CommonCmdPacket* packet) { - if (!DI_SAGITTA_is_booted_[SAGITTA_IDX_IN_UNIT]) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - DS_CMD_ERR_CODE ret; uint8_t param_id = CCP_get_param_from_packet(packet, 0, uint8_t); diff --git a/src/src_user/Drivers/Aocs/sagitta.c b/src/src_user/Drivers/Aocs/sagitta.c index b6a72dd3..d277c8c3 100644 --- a/src/src_user/Drivers/Aocs/sagitta.c +++ b/src/src_user/Drivers/Aocs/sagitta.c @@ -738,7 +738,7 @@ DS_CMD_ERR_CODE SAGITTA_change_camera(SAGITTA_Driver* sagitta_driver, uint8_t pa sagitta_driver->info.set_parameter.camera.interval_s = value; break; case 4: - sagitta_driver->info.set_parameter.camera.offset_pix = (uint16_t)value; + sagitta_driver->info.set_parameter.camera.offset_pix = (int16_t)value; break; case 5: sagitta_driver->info.set_parameter.camera.pga_gain = (uint8_t)value; From 2dcc463ae5020476941acee2ec7ff15c9b8f24c9 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Thu, 6 Jul 2023 13:52:31 +0900 Subject: [PATCH 170/176] [Fix] Fix directory of parameter_setting_macro.h --- .../SatelliteParameters/Sample/attitude_control_parameters.c | 2 +- .../SatelliteParameters/Sample/attitude_target_parameters.c | 2 +- .../Settings/SatelliteParameters/Sample/fdir_parameters.c | 2 +- .../SatelliteParameters/Sample/nanossoc_d60_parameters.c | 2 +- .../Settings/SatelliteParameters/Sample/orbit_parameters.c | 2 +- .../Settings/SatelliteParameters/Sample/sagitta_parameters.c | 2 +- .../SatelliteParameters/{Sample => }/parameter_setting_macro.h | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename src/src_user/Settings/SatelliteParameters/{Sample => }/parameter_setting_macro.h (100%) diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c index e8f6e31f..535dbc05 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_control_parameters.c @@ -4,7 +4,7 @@ */ #include -#include +#include // Bdot const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM] = { -0.1f, -0.1f, -0.1f }; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c index d2da0d8d..8599e62b 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_target_parameters.c @@ -4,7 +4,7 @@ */ #include -#include +#include // Target Calculation Mode const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_CALC_MODE_MANUAL; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c index ac13eee9..e1d326a9 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/fdir_parameters.c @@ -4,7 +4,7 @@ */ #include -#include +#include // Mode Manager // Bdot diff --git a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c index c4069701..fcccd4b6 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/nanossoc_d60_parameters.c @@ -4,7 +4,7 @@ */ #include -#include +#include // Frame conversion const Quaternion NANOSSOC_D60_PARAMETERS_py_quaternion_c2b = { 0.70710665f, 0.0f, 0.0f, 0.70710665f }; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c index fcbb271a..29bc19ee 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/orbit_parameters.c @@ -5,7 +5,7 @@ #include #include -#include +#include // Time const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 diff --git a/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c index 66b480e7..9cd7c3b8 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/sagitta_parameters.c @@ -4,7 +4,7 @@ */ #include -#include +#include // Spike Filter uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_accept = 20; diff --git a/src/src_user/Settings/SatelliteParameters/Sample/parameter_setting_macro.h b/src/src_user/Settings/SatelliteParameters/parameter_setting_macro.h similarity index 100% rename from src/src_user/Settings/SatelliteParameters/Sample/parameter_setting_macro.h rename to src/src_user/Settings/SatelliteParameters/parameter_setting_macro.h From 7a6f33ae59244d38029883976e744ad384823104 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Fri, 7 Jul 2023 12:33:34 +0900 Subject: [PATCH 171/176] [Fix] Fix example parameter initialization using #define directive --- .../attitude_control_parameters.c | 29 ++++++++++--------- .../attitude_determination_parameters.c | 10 ++++--- .../attitude_target_parameters.c | 5 ++-- .../SatelliteParameters/fdir_parameters.c | 13 +++++---- .../nanossoc_d60_parameters.c | 5 ++-- .../SatelliteParameters/orbit_parameters.c | 19 ++++++------ .../SatelliteParameters/sagitta_parameters.c | 5 ++-- .../attitude_determination_parameters.c | 10 +++---- 8 files changed, 52 insertions(+), 44 deletions(-) diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c index e5a3d2d3..535dbc05 100644 --- a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_control_parameters.c @@ -4,6 +4,7 @@ */ #include +#include // Bdot const float ATTITUDE_CONTROL_PARAMETERS_bdot_control_gain[PHYSICAL_CONST_THREE_DIM] = { -0.1f, -0.1f, -0.1f }; @@ -20,18 +21,18 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_y = { 2.0e-2f, 0.0f, 0.0f }; const PidGains ATTITUDE_CONTROL_PARAMETERS_sun_pointing_attitude_rate_gains_body_z = { 7.0e-3f, 0.0f, 2.0e-2f }; // MTQ control settings -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_direct_feedback_rate_rad_s = 1.6e-3f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_transient = 0.6f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_transient = 0.0f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_mtq_allowable_error_ratio_stable = 0.8f; const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_correction_gain_stable = 0.25f; // Integral control setting -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_integral_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_max_angle_to_run_integral_control_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_integral_control_permission_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(40.0f); // Spin control setting -const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_acceptable_angle_error_to_spin_up_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_spin_rate_around_sun_rad_s = 1.4e-2f; // Low Pass Filter setting const float ATTITUDE_CONTROL_PARAMETERS_sun_pointing_lpf_sample_freq_Hz = 10.0f; @@ -50,16 +51,16 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_y = const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_mtq_attitude_rate_gains_body_z = { 1.5f * 2.5e-2f, 0.0f, 0.0f }; // MTQ control settings // 下記の値はISS軌道を想定した値, 変更時は,HW側の出力最大値にかからない様に留意しながら,ゲインと組み合わせて調整すること. -const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad = PHYSICAL_CONST_degree_to_radian(18.0f); +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(18.0f); const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_direct_feedback_rate_rad_s = 5.0e-3f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_transient = 0.6f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_transient = 0.0f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_mtq_allowable_error_ratio_stable = 0.6f; const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_correction_gain_stable = 0.1f; -const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad = PHYSICAL_CONST_degree_to_radian(20.0f); +const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_acceptable_angle_error_as_stable_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); // Integral control setting -extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad = PHYSICAL_CONST_degree_to_radian(40.0f); -extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_integral_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(40.0f); +extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_max_angle_to_run_integral_control_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); // Output torque Low Pass Filter(LPF) setting extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_sample_freq_Hz = 10.0f; extern const float ATTITUDE_CONTROL_PARAMETERS_tac_mtq_lpf_trq_cutoff_freq_Hz = 0.3f; @@ -75,9 +76,9 @@ const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_y = { const PidGains ATTITUDE_CONTROL_PARAMETERS_tac_rw_attitude_rate_gains_body_z = { 2.0f * 7.0e-2f, 0.0f, 2.0f * 2.0e-3f }; // Unloading -const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(7000.0f); -const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(-7000.0f); -const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s = PHYSICAL_CONST_rpm_to_rad_sec(0.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_upper_threshold_rad_s = PARAMETER_SETTING_MACRO_RPM_TO_RADIAN_SEC(7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_lower_threshold_rad_s = PARAMETER_SETTING_MACRO_RPM_TO_RADIAN_SEC(-7000.0f); +const float ATTITUDE_CONTROL_PARAMETERS_unloading_angular_velocity_target_rad_s = PARAMETER_SETTING_MACRO_RPM_TO_RADIAN_SEC(0.0f); const float ATTITUDE_CONTROL_PARAMETERS_unloading_control_gain = -1.0e-7f; const APP_UNLOADING_EXEC ATTITUDE_CONTROL_PARAMETERS_unloading_exec_is_enable = APP_UNLOADING_EXEC_DISABLE; @@ -88,5 +89,5 @@ const float ATTITUDE_CONTROL_PARAMETERS_internal_torque_max_body_Nm[PHYSICAL_CON const float ATTITUDE_CONTROL_PARAMETERS_external_torque_max_body_Nm[PHYSICAL_CONST_THREE_DIM] = { 3.0e-4f, 3.0e-4f, 3.0e-4f }; // Target Setting parameters -const float ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s = PHYSICAL_CONST_degree_to_radian(0.8f); -const float ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float ATTITUDE_CONTROL_PARAMETERS_limit_angular_velocity_rad_s = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.8f); +const float ATTITUDE_CONTROL_PARAMETERS_limit_maneuver_angle_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c index 55ab0951..7e746566 100644 --- a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_determination_parameters.c @@ -33,8 +33,10 @@ const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_r 9.6963e-6f }; // Process noise model // We assume the attitude target is operated to synchronize with orbit. -const float kOrbitPeriodSec = 5700.0f; -const float kEkfComputationCycleSec = 0.1f; -const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); +#define ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC (5700.0f) +#define ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC (0.1f) +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) + * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); // The attitude rate process noise is not well tuned at this moment -const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = powf((MATH_CONST_2PI / kOrbitPeriodSec * kEkfComputationCycleSec), 2.0f); +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) + * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c index 6c8730cc..8599e62b 100644 --- a/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/attitude_target_parameters.c @@ -4,6 +4,7 @@ */ #include +#include // Target Calculation Mode const APP_TARGET_ATT_CALC_MODE ATTITUDE_TARGET_PARAMETERS_mode = APP_TARGET_ATT_CALC_MODE_MANUAL; @@ -22,6 +23,6 @@ extern const float ATTITUDE_TARGET_PARAMETERS_vec_to_sub_target_body[PHYSICAL_CO extern const MATRIX33_ROTATION_AXIS ATTITUDE_TARGET_PARAMETERS_offset_angle_axis = MATRIX33_ROTATION_AXIS_X; extern const float ATTITUDE_TARGET_PARAMETERS_offset_angle_rad = 0.0f; // Target on earth surface -extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM] = { PHYSICAL_CONST_degree_to_radian(35.7130f), - PHYSICAL_CONST_degree_to_radian(139.7596f), +extern const float ATTITUDE_TARGET_PARAMETERS_target_lla_rad_m[PHYSICAL_CONST_THREE_DIM] = { PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(35.7130f), + PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(139.7596f), 23.0f }; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c index 5c4966ba..e1d326a9 100644 --- a/Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/fdir_parameters.c @@ -4,28 +4,29 @@ */ #include +#include // Mode Manager // Bdot -const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_conv_limit_rad_s = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.5f); const float FDIR_PARAMETERS_ang_vel_conv_time_limit_s = 5.0f * 60.0f; -const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s = PHYSICAL_CONST_degree_to_radian(0.5f); +const float FDIR_PARAMETERS_ang_vel_norm_increase_limit_rad_s = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.5f); const float FDIR_PARAMETERS_ang_vel_anomaly_detection_period_s = 200.0f; const uint32_t FDIR_PARAMETERS_bdot_start_mode_manager_time_s = 5 * 60; // Sun pointing control divergence anomaly -const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PHYSICAL_CONST_degree_to_radian(45.0f); +const float FDIR_PARAMETERS_sun_angle_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(45.0f); const float FDIR_PARAMETERS_sun_angle_div_time_limit_s = 50.0f * 60.0f; const uint32_t FDIR_PARAMETERS_sun_pointing_start_mode_manager_time_s = 25 * 60; // Rough three axis control with MTQ divergence anomaly -const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad = PHYSICAL_CONST_degree_to_radian(30.0f); +const float FDIR_PARAMETERS_rough_three_axis_mtq_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(30.0f); const float FDIR_PARAMETERS_rough_three_axis_mtq_div_time_limit_s = 5.0f * 60.0f; const uint32_t FDIR_PARAMETERS_rough_three_axis_mtq_start_mode_manager_time_s = 35 * 60; // Rough three axis control with RW divergence anomaly -const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad = PHYSICAL_CONST_degree_to_radian(10.0f); +const float FDIR_PARAMETERS_rough_three_axis_rw_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(10.0f); const float FDIR_PARAMETERS_rough_three_axis_rw_div_time_limit_s = 1.0f * 60.0f; const uint32_t FDIR_PARAMETERS_rough_three_axis_rw_start_mode_manager_time_s = 5 * 60; // Fine three axis control divergence anomaly -const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad = PHYSICAL_CONST_degree_to_radian(5.0f); +const float FDIR_PARAMETERS_fine_three_axis_div_limit_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(5.0f); const float FDIR_PARAMETERS_fine_three_axis_div_time_limit_s = 1.0f * 60.0f; const uint32_t FDIR_PARAMETERS_fine_three_axis_start_mode_manager_time_s = 5 * 60; // Sensor invisible anomaly diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c index 72d17df6..fcccd4b6 100644 --- a/Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/nanossoc_d60_parameters.c @@ -4,6 +4,7 @@ */ #include +#include // Frame conversion const Quaternion NANOSSOC_D60_PARAMETERS_py_quaternion_c2b = { 0.70710665f, 0.0f, 0.0f, 0.70710665f }; @@ -14,8 +15,8 @@ const Quaternion NANOSSOC_D60_PARAMETERS_mz_quaternion_c2b = { -0.707106471f, 0. // Spike Filter uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_accept = 10; uint8_t NANOSSOC_D60_PARAMETERS_spike_filter_config_count_limit_to_reject_continued_warning = 60; -float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(3); -float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(180); +float NANOSSOC_D60_PARAMETERS_spike_filter_config_reject_threshold_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(3); +float NANOSSOC_D60_PARAMETERS_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(180); // Sun intensity threshold float NANOSSOC_D60_PARAMETERS_sun_intensity_lower_threshold_percent = 80.0f; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c index d9c07057..29bc19ee 100644 --- a/Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/orbit_parameters.c @@ -5,6 +5,7 @@ #include #include +#include // Time const double ORBIT_PARAMETERS_reference_jday = 2459932.000; // 2022/12/18 12:00:00 @@ -15,9 +16,9 @@ const APP_ORBIT_CALC_METHOD ORBIT_PARAMETERS_orbit_calculation_method = APP_ORBI // Kepler Orbit const float ORBIT_PARAMETERS_kepler_semi_major_axis_km = 6899.3234f; const float ORBIT_PARAMETERS_kepler_eccentricity = 4.86396e-4f; -const float ORBIT_PARAMETERS_kepler_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); -const float ORBIT_PARAMETERS_kepler_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); -const float ORBIT_PARAMETERS_kepler_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(221.60537f); +const float ORBIT_PARAMETERS_kepler_inclination_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(97.50372f); +const float ORBIT_PARAMETERS_kepler_raan_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(340.20189f); +const float ORBIT_PARAMETERS_kepler_arg_perigee_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(221.60537f); const double ORBIT_PARAMETERS_kepler_epoch_jday = 2.459931936719433e6; // TLE for SGP4 @@ -37,14 +38,14 @@ const float ORBIT_PARAMETERS_tle_mean_motion_rpd = 15.15782335f; // Initial orbital elements const float ORBIT_PARAMETERS_gpsr_semi_major_axis_km = 6899.3234f; const float ORBIT_PARAMETERS_gpsr_eccentricity = 4.86396e-4f; -const float ORBIT_PARAMETERS_gpsr_inclination_rad = PHYSICAL_CONST_degree_to_radian(97.50372f); -const float ORBIT_PARAMETERS_gpsr_raan_rad = PHYSICAL_CONST_degree_to_radian(340.20189f); -const float ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(0.0f); +const float ORBIT_PARAMETERS_gpsr_inclination_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(97.50372f); +const float ORBIT_PARAMETERS_gpsr_raan_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(340.20189f); +const float ORBIT_PARAMETERS_gpsr_arg_perigee_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.0f); const double ORBIT_PARAMETERS_gpsr_epoch_jday = 2.459931936719433e6; // Threshold const float ORBIT_PARAMETERS_gpsr_threshold_semi_major_axis_km = 50.0f; const float ORBIT_PARAMETERS_gpsr_threshold_eccentricity = 0.1f; -const float ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const float ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PHYSICAL_CONST_degree_to_radian(20.0f); -const float ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PHYSICAL_CONST_degree_to_radian(50.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_inclination_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_raan_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(20.0f); +const float ORBIT_PARAMETERS_gpsr_threshold_arg_perigee_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(50.0f); const double ORBIT_PARAMETERS_gpsr_threshold_epoch_jday = 0.1; diff --git a/Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c b/Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c index e38955fe..9cd7c3b8 100644 --- a/Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c +++ b/Examples/src_aobc_example/Settings/SatelliteParameters/sagitta_parameters.c @@ -4,11 +4,12 @@ */ #include +#include // Spike Filter uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_accept = 20; uint8_t SAGITTA_PARAMETERS_q_i2b_spike_filter_config_count_limit_to_reject_continued_warning = 200; -double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad = PHYSICAL_CONST_degree_to_radian(1.0f); -double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PHYSICAL_CONST_degree_to_radian(0.6f); +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_reject_threshold_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(1.0f); +double SAGITTA_PARAMETERS_q_i2b_spike_filter_config_amplitude_limit_to_accept_as_step_rad = PARAMETER_SETTING_MACRO_DEGREE_TO_RADIAN(0.6f); // Sun intensity threshold diff --git a/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c index 2c49ada0..22799983 100644 --- a/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c +++ b/src/src_user/Settings/SatelliteParameters/Sample/attitude_determination_parameters.c @@ -33,10 +33,10 @@ const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_stt_standard_deviation_compo_r 9.6963e-6f }; // Process noise model // We assume the attitude target is operated to synchronize with orbit. -#define ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC (5700.0f) +#define ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC (5700.0f) #define ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC (0.1f) -const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) - * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) + * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); // The attitude rate process noise is not well tuned at this moment -const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) - * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PARAMETER_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); +const float ATTITUDE_DETERMINATION_PARAMETERS_ekf_process_noise_covariance_attitude_rate = ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)) + * ((MATH_CONST_2PI / ATTITUDE_PARAMETER_ORBIT_PERIOD_SEC * ATTITUDE_PARAMETER_COMPUTATION_CYCLE_SEC)); From b5b866afaa337c1f86049e1b427de4a6d0dddcfa Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Fri, 7 Jul 2023 12:49:23 +0900 Subject: [PATCH 172/176] [Fix] Add example parameter files into .vcxproj --- Examples/C2A_AOBC_EXAMPLE.vcxproj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Examples/C2A_AOBC_EXAMPLE.vcxproj b/Examples/C2A_AOBC_EXAMPLE.vcxproj index e666e395..28a048b5 100644 --- a/Examples/C2A_AOBC_EXAMPLE.vcxproj +++ b/Examples/C2A_AOBC_EXAMPLE.vcxproj @@ -316,6 +316,20 @@ + + + + + + + + + + + + + + From 707d2d55910704728cde0d598dad6d0aeb0aa263 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Mon, 10 Jul 2023 10:32:54 +0900 Subject: [PATCH 173/176] [Fix] Fix include path name --- .../UserDefined/AOCS/AttitudeControl/sun_pointing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c index 9b583f8e..5d6a1893 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include From 3222187c284581301106dac28bd0e07a3b93618f Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Wed, 28 Jun 2023 10:51:29 +0900 Subject: [PATCH 174/176] ignore pragma warning --- src/src_user/common.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/src_user/common.cmake b/src/src_user/common.cmake index cb73636f..9bf81b1c 100644 --- a/src/src_user/common.cmake +++ b/src/src_user/common.cmake @@ -10,6 +10,9 @@ if(MSVC) target_compile_options(${PROJECT_NAME} PUBLIC "/MT") target_compile_options(${PROJECT_NAME} PUBLIC "/TP") #Compile C codes as C++ target_compile_options(${PROJECT_NAME} PUBLIC "/source-charset:utf-8") + # warning + target_compile_options(${PROJECT_NAME} PRIVATE /wd4083) # disable #pragma SECTION REPRO warning + target_compile_options(${PROJECT_NAME} PRIVATE /wd4081) # disable #pragma section (EOF) else() target_compile_options(${PROJECT_NAME} PUBLIC "${CMAKE_CXX_FLAGS}-Wall") set(CMAKE_CXX_FLAGS "-m32 -rdynamic -Wall -g") # SJIS, 32bit From a847612e241cfee40178ed17caecfd31b9686610 Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 8 Jul 2023 20:17:59 +0900 Subject: [PATCH 175/176] =?UTF-8?q?MSVC=E4=BB=A5=E5=A4=96=E3=81=A7?= =?UTF-8?q?=E3=82=82pragma=20warning=20=E3=82=92=E7=84=A1=E8=A6=96?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src_user/common.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/src_user/common.cmake b/src/src_user/common.cmake index 9bf81b1c..829317bb 100644 --- a/src/src_user/common.cmake +++ b/src/src_user/common.cmake @@ -12,9 +12,11 @@ if(MSVC) target_compile_options(${PROJECT_NAME} PUBLIC "/source-charset:utf-8") # warning target_compile_options(${PROJECT_NAME} PRIVATE /wd4083) # disable #pragma SECTION REPRO warning - target_compile_options(${PROJECT_NAME} PRIVATE /wd4081) # disable #pragma section (EOF) + target_compile_options(${PROJECT_NAME} PRIVATE /wd4081) # disable #pragma SECTION (EOF) else() target_compile_options(${PROJECT_NAME} PUBLIC "${CMAKE_CXX_FLAGS}-Wall") set(CMAKE_CXX_FLAGS "-m32 -rdynamic -Wall -g") # SJIS, 32bit set(CMAKE_C_FLAGS "-m32 -rdynamic -Wall -g") # SJIS, 32bit + # warning + target_compile_options(${PROJECT_NAME} PUBLIC "-Wno-unknown-pragmas") endif() From c0d12124cd8fcbdb983e3c53c519ad939a0c672c Mon Sep 17 00:00:00 2001 From: chutaro <35984595+chutaro@users.noreply.github.com> Date: Sat, 8 Jul 2023 20:18:22 +0900 Subject: [PATCH 176/176] =?UTF-8?q?=E4=BA=9B=E7=B4=B0=E3=81=AAwarning?= =?UTF-8?q?=E3=81=9F=E3=81=A1=E3=82=92=E6=B6=88=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Applications/DriverInstances/DI_i2c_example.c | 1 - src/src_user/Applications/DriverInstances/di_sagitta.c | 2 +- .../Applications/DriverInstances/uart_example.c | 1 - .../UserDefined/AOCS/AttitudeControl/sun_pointing.c | 1 - .../UserDefined/AOCS/AttitudeControl/sun_pointing.h | 10 +++++----- .../AOCS/AttitudeControl/three_axis_control_mtq.c | 1 - .../AOCS/AttitudeControl/three_axis_control_mtq.h | 10 +++++----- .../AOCS/AttitudeControl/three_axis_control_rw.c | 1 - .../fine_three_axis_determination.c | 2 -- src/src_user/Library/Orbit/kepler_orbit.c | 1 - src/src_user/Library/SignalProcess/spike_filter.c | 4 ++-- src/src_user/Library/matrix.c | 2 +- 12 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/DI_i2c_example.c b/src/src_user/Applications/DriverInstances/DI_i2c_example.c index dd387928..7d5489e7 100644 --- a/src/src_user/Applications/DriverInstances/DI_i2c_example.c +++ b/src/src_user/Applications/DriverInstances/DI_i2c_example.c @@ -19,7 +19,6 @@ AppInfo I2C_EXAMPLE_update(void) static void I2C_EXAMPLE_init_(void) { - int i_ret = 0; I2C_EXAMPLE_port_.ch = PORT_CH_I2C_SENSORS; I2C_EXAMPLE_port_.frequency_khz = 100; I2C_EXAMPLE_port_.device_address = I2C_DEVICE_ADDR_AOBC_RM; diff --git a/src/src_user/Applications/DriverInstances/di_sagitta.c b/src/src_user/Applications/DriverInstances/di_sagitta.c index bf8a1837..db32c0fe 100644 --- a/src/src_user/Applications/DriverInstances/di_sagitta.c +++ b/src/src_user/Applications/DriverInstances/di_sagitta.c @@ -111,7 +111,7 @@ static void DI_SAGITTA_update_(void) CCP_CmdRet Cmd_DI_SAGITTA_BOOT(const CommonCmdPacket* packet) { DS_CMD_ERR_CODE ret; - const uint8_t* param = CCP_get_param_head(packet); + (void)packet; if (DI_SAGITTA_is_booted_[SAGITTA_IDX_IN_UNIT]) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); diff --git a/src/src_user/Applications/DriverInstances/uart_example.c b/src/src_user/Applications/DriverInstances/uart_example.c index 1e9aad46..11b1bdf8 100644 --- a/src/src_user/Applications/DriverInstances/uart_example.c +++ b/src/src_user/Applications/DriverInstances/uart_example.c @@ -16,7 +16,6 @@ AppInfo DI_uart_example(void) static void DI_uart_example_init_(void) { - int i_ret = 0; uart_debug_.ch = PORT_CH_UART_DEBUG; uart_debug_.baudrate = 115200; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c index 5d6a1893..2f314cf0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.c @@ -308,7 +308,6 @@ CCP_CmdRet Cmd_APP_SUN_POINTING_SET_GAIN(const CommonCmdPacket* packet) ENDIAN_memcpy(&gains.d_gain, param + param_id, sizeof(float)); param_id += (int)sizeof(float); - C2A_MATH_ERROR ret; if (att_omega_flag == 0) { sun_pointing_.gains_omega_cmd_tmp[axis] = gains; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h index ac7b4c78..51e58fc7 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/sun_pointing.h @@ -8,11 +8,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include "../../../../Library/physical_constants.h" +#include "../../../../Library/ControlUtility/cross_product_control.h" +#include "../../../../Library/pid_control.h" +#include "../../../../Library/SignalProcess/z_filter.h" +#include "../../AOCS/aocs_error.h" /** * @enum SUN_POINTING_AXIS_ID diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c index e1bb8b50..bd834431 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.c @@ -225,7 +225,6 @@ CCP_CmdRet Cmd_APP_TAC_MTQ_SET_GAIN(const CommonCmdPacket* packet) ENDIAN_memcpy(&gains.d_gain, param + param_id, sizeof(float)); param_id += (int)sizeof(float); - C2A_MATH_ERROR ret; if (att_omega_flag == 0) { three_axis_control_mtq_.gains_omega_cmd_tmp[axis] = gains; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h index f2dc4bcf..42c3fb22 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_mtq.h @@ -9,11 +9,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include "../../../../Library/physical_constants.h" +#include "../../../../Library/ControlUtility/cross_product_control.h" +#include "../../../../Library/pid_control.h" +#include "../../../../Library/SignalProcess/z_filter.h" +#include "../../AOCS/aocs_error.h" /** * @struct ThreeAxisControlMtq diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c index e7604f08..c2bcd8e7 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/three_axis_control_rw.c @@ -148,7 +148,6 @@ CCP_CmdRet Cmd_APP_TAC_RW_SET_GAIN(const CommonCmdPacket* packet) ENDIAN_memcpy(&gains.d_gain, param + param_id, sizeof(float)); param_id += (int)sizeof(float); - C2A_MATH_ERROR ret; if (att_omega_flag == 0) { three_axis_control_rw_.gains_omega_cmd_tmp[axis] = gains; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c index 688e23f7..b03d777c 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/fine_three_axis_determination.c @@ -52,8 +52,6 @@ static void APP_FTAD_exec_(void) Quaternion q_eci_to_body; switch (fine_three_axis_determination_.method) { - CommonCmdPacket packet; - case APP_FTAD_METHOD_STT: q_eci_to_body = APP_FTAD_stt_direct_(time_step_s); AOCS_MANAGER_set_quaternion_est_i2b(q_eci_to_body); diff --git a/src/src_user/Library/Orbit/kepler_orbit.c b/src/src_user/Library/Orbit/kepler_orbit.c index 4b9631b7..1eb08527 100644 --- a/src/src_user/Library/Orbit/kepler_orbit.c +++ b/src/src_user/Library/Orbit/kepler_orbit.c @@ -136,7 +136,6 @@ C2A_MATH_ERROR KEPLER_ORBIT_calc_oe_from_pos_vel(KeplerOrbitalElements* orbital_ // eccentricity float h[PHYSICAL_CONST_THREE_DIM]; - float h_norm; VECTOR3_outer_product(h, position_eci_km, velocity_eci_km_s); float v_temp1[PHYSICAL_CONST_THREE_DIM]; float v_temp2[PHYSICAL_CONST_THREE_DIM]; diff --git a/src/src_user/Library/SignalProcess/spike_filter.c b/src/src_user/Library/SignalProcess/spike_filter.c index 551d6f46..c313e47e 100644 --- a/src/src_user/Library/SignalProcess/spike_filter.c +++ b/src/src_user/Library/SignalProcess/spike_filter.c @@ -15,8 +15,8 @@ C2A_MATH_ERROR SPIKE_FILTER_init(SpikeFilter* filter, const SpikeFilter_Config f double amplitude_limit_to_accept_as_step_set = filter_setting.amplitude_limit_to_accept_as_step; if ((reject_threshold_set < 0.0) || (amplitude_limit_to_accept_as_step_set < 0.0)) { - double reject_threshold_set = 0.0; - double amplitude_limit_to_accept_as_step_set = 0.0; + reject_threshold_set = 0.0; + amplitude_limit_to_accept_as_step_set = 0.0; param_error = C2A_MATH_ERROR_RANGE_OVER; } diff --git a/src/src_user/Library/matrix.c b/src/src_user/Library/matrix.c index e6be74ee..e24834db 100644 --- a/src/src_user/Library/matrix.c +++ b/src/src_user/Library/matrix.c @@ -738,7 +738,7 @@ MATRIX_ERROR MATRIX_determinant(double* determinant, const void* mat) const MATRIX_Parameter* parameter_mat = (const MATRIX_Parameter*)mat; ret = MATRIX_validate_size_(mat); - if (ret != C2A_MATH_ERROR_OK) return ret; + if (ret != MATRIX_ERROR_OK) return ret; if (parameter_mat->row != parameter_mat->col) return MATRIX_ERROR_SIZE_MISMATCH;