Skip to content

Commit

Permalink
Merge pull request #30 from ut-issl/develop
Browse files Browse the repository at this point in the history
Update main (v2.0.0) on 2023-04-09: S2E Core v6.0.0 対応版
  • Loading branch information
meltingrabbit authored Apr 9, 2023
2 parents 3d60759 + d5e8b36 commit 342ccc6
Show file tree
Hide file tree
Showing 32 changed files with 773 additions and 682 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:

env:
S2E_CORE_VERSION: v5.0.0
S2E_CORE_VERSION: v6.0.0
C2A_CORE_VERSION: develop

jobs:
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
shell: cmd
run: |
cl.exe
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../c2a-core -DC2A_NAME=Examples/minimum_user_for_s2e -D${{ matrix.use_c2a }}
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../c2a-core -DC2A_NAME=Examples/minimum_user -D${{ matrix.use_c2a }}
cmake --build . --clean-first
build_s2e_linux:
Expand Down Expand Up @@ -181,5 +181,5 @@ jobs:
- name: build
working-directory: ./s2e-user
run: |
cmake . -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../c2a-core -DC2A_NAME=Examples/minimum_user_for_s2e -D${{ matrix.use_c2a }} -DUSE_SCI_COM_WINGS=OFF
cmake . -DEXT_LIB_DIR=../s2e-core/ExtLibraries -DFLIGHT_SW_DIR=../c2a-core -DC2A_NAME=Examples/minimum_user -D${{ matrix.use_c2a }} -DUSE_SCI_COM_WINGS=OFF
cmake --build .
49 changes: 49 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: check format

on:
push:
branches:
- main
- develop
pull_request:
paths:
- '.github/workflows/check-format.yml'
- '.clang-format'
- 'src/**'

jobs:
clang-format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2

- name: install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format
clang-format --version
- name: check clang-format version
run: |
clang-format --version
md5sum "$(which git-clang-format)"
head "$(which git-clang-format)"
- name: check format(push)
if: github.event_name == 'push'
run: |
git-clang-format --commit HEAD^ --diff | tee format.patch
- name: check format(pull_request)
if: github.event_name == 'pull_request'
run: |
git-clang-format --commit ${{ github.event.pull_request.base.sha }} --diff | tee format.patch
- name: check
run: |
git apply --allow-empty format.patch
git status
git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v3
uses: crazy-max/ghaction-github-labeler@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
Expand Down
81 changes: 18 additions & 63 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_policy(SET CMP0048 NEW)
project(S2E_FOR_C2A_CORE
LANGUAGES CXX
DESCRIPTION "S2E_FOR_C2A_CORE"
VERSION 1.0
VERSION 2.0.0
)

cmake_minimum_required(VERSION 3.13)
Expand Down Expand Up @@ -39,7 +39,6 @@ if(USE_C2A)
add_definitions(-DSILS_FW)
#include_directories of C2A
include_directories(${C2A_DIR}/src)
include_directories(${S2E_CORE_DIR}/src/Interface/SpacecraftInOut)

#add subdirectory
set(BUILD_C2A_AS_CXX ON)
Expand All @@ -62,60 +61,21 @@ set(S2E_DIR ${CMAKE_CURRENT_COURCE_DIR})
include_directories(${CSPICE_DIR}/include)
include_directories(${NRLMSISE00_DIR}/src)
include_directories(${S2E_CORE_DIR}/src)
include_directories(${S2E_CORE_DIR}/src/Library/math)
include_directories(${S2E_CORE_DIR}/src/Library/utils)
include_directories(${S2E_CORE_DIR}/src/Dynamics)
include_directories(${S2E_CORE_DIR}/src/Disturbance)
include_directories(${S2E_CORE_DIR}/src/Interface/InitInput)
include_directories(${S2E_CORE_DIR}/src/Interface/LogOutput)
include_directories(${S2E_CORE_DIR}/src/Interface/SpacecraftInOut/Ports)
include_directories(${S2E_CORE_DIR}/src/Simulation)
include_directories(${S2E_CORE_DIR}/src/Simulation/MCSim)
include_directories(${S2E_CORE_DIR}/src/Simulation/Spacecraft)
include_directories(${S2E_CORE_DIR}/src/Simulation/Spacecraft/Structure)
include_directories(${S2E_CORE_DIR}/src/Simulation/GroundStation)
include_directories(${S2E_CORE_DIR}/src/Simulation/Case)
include_directories(${S2E_CORE_DIR}/src/Disturbance)
include_directories(${S2E_CORE_DIR}/src/Environment/Global)
include_directories(${S2E_CORE_DIR}/src/Environment/Local)
include_directories(${S2E_CORE_DIR}/src/Component)
include_directories(${S2E_CORE_DIR}/src/Component/Abstract)
include_directories(${S2E_CORE_DIR}/src/Component/AOCS)
include_directories(${S2E_CORE_DIR}/src/Component/CDH)
include_directories(${S2E_CORE_DIR}/src/Component/CommGS)
include_directories(${S2E_CORE_DIR}/src/Component/Mission/Telescope)
include_directories(${S2E_CORE_DIR}/src/Component/Power)
include_directories(${S2E_CORE_DIR}/src/Component/Propulsion)
include_directories(${S2E_CORE_DIR}/src/Component/Thermal)

## add_subdirectories
add_subdirectory(${S2E_CORE_DIR}/src/Component S2E_CORE/Component)
add_subdirectory(${S2E_CORE_DIR}/src/Disturbance S2E_CORE/Disturbance)
add_subdirectory(${S2E_CORE_DIR}/src/Dynamics S2E_CORE/Dynamics)
add_subdirectory(${S2E_CORE_DIR}/src/Environment/Global S2E_CORE/Environment/Global)
add_subdirectory(${S2E_CORE_DIR}/src/Environment/Local S2E_CORE/Environment/Local)
add_subdirectory(${S2E_CORE_DIR}/src/RelativeInformation S2E_CORE/RelativeInformation)
add_subdirectory(${S2E_CORE_DIR}/src/Interface/InitInput S2E_CORE/InitInput)
add_subdirectory(${S2E_CORE_DIR}/src/Interface/LogOutput S2E_CORE/LogOutput)
add_subdirectory(${S2E_CORE_DIR}/src/Interface/SpacecraftInOut S2E_CORE/SpacecraftInOut)
add_subdirectory(${S2E_CORE_DIR}/src/Interface/HilsInOut S2E_CORE/HilsInOut)
add_subdirectory(${S2E_CORE_DIR}/src/Library/igrf S2E_CORE/igrf)
add_subdirectory(${S2E_CORE_DIR}/src/Library/inih S2E_CORE/inih)
add_subdirectory(${S2E_CORE_DIR}/src/Library/math S2E_CORE/math)
add_subdirectory(${S2E_CORE_DIR}/src/Library/nrlmsise00 S2E_CORE/nrlmsise00)
add_subdirectory(${S2E_CORE_DIR}/src/Library/sgp4 S2E_CORE/sgp4)
add_subdirectory(${S2E_CORE_DIR}/src/Library/utils S2E_CORE/utils)
add_subdirectory(${S2E_CORE_DIR}/src/Library/optics S2E_CORE/optics)
add_subdirectory(${S2E_CORE_DIR}/src/Library/RelativeOrbit S2E_CORE/RelativeOrbit)
add_subdirectory(${S2E_CORE_DIR}/src/Library/Orbit S2E_CORE/Orbit)
add_subdirectory(${S2E_CORE_DIR}/src/Library/Geodesy S2E_CORE/Geodesy)
add_subdirectory(${S2E_CORE_DIR}/src/Simulation S2E_CORE/Simulation)
add_subdirectory(${S2E_CORE_DIR}/src/components s2e_core/components)
add_subdirectory(${S2E_CORE_DIR}/src/disturbances s2e_core/disturbances)
add_subdirectory(${S2E_CORE_DIR}/src/dynamics s2e_core/dynamics)
add_subdirectory(${S2E_CORE_DIR}/src/environment/global s2e_core/environment/global)
add_subdirectory(${S2E_CORE_DIR}/src/environment/local s2e_core/environment/local)
add_subdirectory(${S2E_CORE_DIR}/src/library s2e_core/library)
add_subdirectory(${S2E_CORE_DIR}/src/simulation s2e_core/simulation)

set(SOURCE_FILES
src/s2e_for_c2a_core.cpp
src/Simulation/Case/c2a_core_sample_case.cpp
src/Simulation/Spacecraft/c2a_core_sample_sat.cpp
src/Simulation/Spacecraft/c2a_core_sample_components.cpp
src/simulation/case/c2a_core_sample_case.cpp
src/simulation/spacecraft/c2a_core_sample_satellite.cpp
src/simulation/spacecraft/c2a_core_sample_components.cpp
)
# Create executable file
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
Expand Down Expand Up @@ -171,22 +131,19 @@ set(S2E_LIBRARIES
IGRF WRAPPER_NRLMSISE00 INIH SGP4 UTIL OPTICS RELATIVE_ORBIT_MODELS ORBIT_MODELS GEODESY MATH
)
# Initialize link
target_link_libraries(COMPONENT DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT SC_IO RELATIVE_INFO ${S2E_LIBRARIES})
target_link_libraries(DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT SIMULATION ${S2E_LIBRARIES})
target_link_libraries(DISTURBANCE DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT ${S2E_LIBRARIES})
target_link_libraries(SIMULATION DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT DISTURBANCE ${S2E_LIBRARIES})
target_link_libraries(GLOBAL_ENVIRONMENT ${CSPICE_LIB} ${S2E_LIBRARIES})
target_link_libraries(LOCAL_ENVIRONMENT GLOBAL_ENVIRONMENT ${CSPICE_LIB} ${S2E_LIBRARIES})
target_link_libraries(WRAPPER_NRLMSISE00 ${NRLMSISE00_LIB})
target_link_libraries(COMPONENT DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT LIBRARY)
target_link_libraries(DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT SIMULATION LIBRARY)
target_link_libraries(DISTURBANCE DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT LIBRARY)
target_link_libraries(SIMULATION DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT DISTURBANCE LIBRARY)
target_link_libraries(GLOBAL_ENVIRONMENT ${CSPICE_LIB} LIBRARY)
target_link_libraries(LOCAL_ENVIRONMENT GLOBAL_ENVIRONMENT ${CSPICE_LIB} LIBRARY)
target_link_libraries(LIBRARY ${NRLMSISE00_LIB})

target_link_libraries(${PROJECT_NAME} DYNAMICS)
target_link_libraries(${PROJECT_NAME} DISTURBANCE)
target_link_libraries(${PROJECT_NAME} SIMULATION)
target_link_libraries(${PROJECT_NAME} GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT)
target_link_libraries(${PROJECT_NAME} RELATIVE_INFO)
target_link_libraries(${PROJECT_NAME} INI_ACC LOG_OUT SC_IO)
target_link_libraries(${PROJECT_NAME} COMPONENT)
target_link_libraries(${PROJECT_NAME} HILS_IO)

## C2A integration
if(USE_C2A)
Expand All @@ -203,8 +160,6 @@ if(USE_HILS)
set_target_properties(SIMULATION PROPERTIES COMMON_LANGUAGE_RUNTIME "")
set_target_properties(GLOBAL_ENVIRONMENT PROPERTIES COMMON_LANGUAGE_RUNTIME "")
set_target_properties(LOCAL_ENVIRONMENT PROPERTIES COMMON_LANGUAGE_RUNTIME "")
set_target_properties(HILS_IO PROPERTIES COMMON_LANGUAGE_RUNTIME "")
set_target_properties(RELATIVE_INFO PROPERTIES COMMON_LANGUAGE_RUNTIME "")
endif()

## Cmake debug
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# S2E User for C2A Core

## Overview
- This repository is an example of S2E User to execute a sample of [minimum C2A](https://github.com/ut-issl/c2a-core/tree/develop/Examples/minimum_user_for_s2e) and to support an operation with WINGS (TBA).
- This repository is an example of S2E User to execute a sample of [minimum C2A](https://github.com/ut-issl/c2a-core/tree/develop/Examples/minimum_user) and to support an operation with WINGS (TBA).
- The CI system for c2a-core are using this repository.
- This is also an example of SILS/HILS test for C2A development.


## Notes
- Details are described [S2E Document: How to integrate C2A](https://github.com/ut-issl/s2e-documents/blob/main/Tutorials/HowToIntegrateC2A.md).
- s2e-core [v5.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v5.0.0) is used.
- Details are described [S2E Document: How to integrate C2A](https://github.com/ut-issl/s2e-documents/blob/develop/Tutorials/HowToIntegrateC2A.md).
- s2e-core [v6.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v6.0.0) is used.


## Related repositories
Expand All @@ -17,14 +17,14 @@


## 概要
- C2A Core に含まれる [最小限のC2A サンプル](https://github.com/ut-issl/c2a-core/tree/develop/Examples/minimum_user_for_s2e) を SILS で動かし,かつ, WINGS (TBA) によって運用(コマンド操作とテレメトリ受信)できるようにするための最低限の S2E User.
- C2A Core に含まれる [最小限のC2A サンプル](https://github.com/ut-issl/c2a-core/tree/develop/Examples/minimum_user) を SILS で動かし,かつ, WINGS (TBA) によって運用(コマンド操作とテレメトリ受信)できるようにするための最低限の S2E User.
- C2A Core の CI にもこの S2E を使っている.
- C2A 開発を始める際につかう SILS/HILS の雛形にもなりうる.


## C2A in S2E について
- 詳細は [S2E Document: How to integrate C2A](https://github.com/ut-issl/s2e-documents/blob/main/Tutorials/HowToIntegrateC2A.md) を参照のこと.
- ここでは,S2E Core のバージョンは [v5.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v5.0.0) を用いる.
- 詳細は [S2E Document: How to integrate C2A](https://github.com/ut-issl/s2e-documents/blob/develop/Tutorials/HowToIntegrateC2A.md) を参照のこと.
- ここでは,S2E Core のバージョンは [v6.0.0](https://github.com/ut-issl/s2e-core/releases/tag/v6.0.0) を用いる.


## 関連リポジトリ
Expand Down
42 changes: 0 additions & 42 deletions data/ini/c2a_core_disturbance.ini

This file was deleted.

34 changes: 0 additions & 34 deletions data/ini/c2a_core_local_environment.ini

This file was deleted.

Loading

0 comments on commit 342ccc6

Please sign in to comment.