Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

高速SILS時のコマンド送信機能の追加 #66

Merged
merged 7 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200km marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

200km marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.# ===== SILS Test =====
.#
.#
.AOBC_RT.Cmd_APP_AOCS_MANAGER_SET_MASS 12.6
wait_sec 15
AOBC_RT.Cmd_MM_START_TRANSITION 2
wait_sec 3
check_value AOBC_ANOMALY.TEMPERATURE.THRESHOLD.PIC_UPPER_DEGC == 90 # check_valueは今は使えない
check_value AOBC_ANOMALY.TEMPERATURE.THRESHOLD.PIC_LOWER_DEGC == -40 # check_valueは今は使えない
let mode_id = 2 # letはいまはつかえない
AOBC_RT.Cmd_MM_START_TRANSITION {mode_id} # letを前提とした{}付きの引数があるとコマンドは送信されない
.# 変更反映を確認
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[WINGS_COMMAND_SENDER_TO_C2A]
command_send_enable = ENABLE
prescaler = 1
c2a_command_database_file = ../../data/initialize_files/components/wings_command_sender_to_c2a/ISSL6U_AOBC_CMD_DB_CMD_DB.csv
wings_operation_file = ../../data/initialize_files/components/wings_command_sender_to_c2a/example.ops
2 changes: 2 additions & 0 deletions data/initialize_files/satellite.ini
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ sap_file = ../../data/initialize_files/components/solar_array_panel.ini
ant_gs_file = ../../data/initialize_files/components/ground_station_antenna.ini
ant_sc_file = ../../data/initialize_files/components/spacecraft_antenna.ini
gscalculator_file = ../../data/initialize_files/components/ground_station_calculator.ini
command_sender_file = ../../data/initialize_files/components/wings_command_sender_to_c2a/wings_command_sender_to_c2a.ini

// Mission
telescope_file = ../../data/initialize_files/components/telescope.ini

Expand Down
2 changes: 1 addition & 1 deletion s2e-core
Submodule s2e-core updated 122 files
12 changes: 5 additions & 7 deletions src/simulation/spacecraft/aocs_module_components.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@

#include "aocs_module_components.h"

#include <components/real/aocs/initialize_gnss_receiver.hpp>
#include <components/real/aocs/initialize_gyro_sensor.hpp>
#include <components/real/aocs/initialize_magnetometer.hpp>
#include <components/real/aocs/initialize_magnetorquer.hpp>
#include <components/real/aocs/initialize_reaction_wheel.hpp>
#include <components/real/aocs/initialize_star_sensor.hpp>
#include <components/real/aocs/initialize_sun_sensor.hpp>
#include <components/real/power/csv_scenario_interface.hpp>
#include <library/initialize/initialize_file_access.hpp>
#include <vector>
Expand Down Expand Up @@ -188,6 +181,10 @@ AocsModuleComponents::AocsModuleComponents(const Dynamics *dynamics, Structure *
telescope_ = new Telescope(InitTelescope(clock_generator, 1, telescope_ini_path, &(dynamics_->GetAttitude()),
&(global_environment_->GetHipparcosCatalog()), &(local_environment_->GetCelestialInformation())));

// Communication
const std::string command_sender_ini_path = iniAccess.ReadString("COMPONENTS_FILE", "command_sender_file");
wings_command_sender_to_c2a_ = new WingsCommandSenderToC2a(InitWingsCommandSenderToC2a(clock_generator, compo_step_sec, command_sender_ini_path));

// HILS IF Board
#ifdef USE_HILS
const unsigned int hils_if_hils_port_id = iniAccess.ReadInt("COM_PORT", "hils_if_hils_port_id");
Expand All @@ -197,6 +194,7 @@ AocsModuleComponents::AocsModuleComponents(const Dynamics *dynamics, Structure *
}

AocsModuleComponents::~AocsModuleComponents() {
delete wings_command_sender_to_c2a_;
delete telescope_;
delete sagitta_;
delete stim210_;
Expand Down
12 changes: 8 additions & 4 deletions src/simulation/spacecraft/aocs_module_components.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
#include "../../component/aocs/sagitta.hpp"
#include "../../component/aocs/stim210.hpp"
// Propulsion
#include <components/real/propulsion/initialize_simple_thruster.hpp>
#include <components/real/propulsion/simple_thruster.hpp>
// Mission
#include <components/real/mission/initialize_telescope.hpp>
#include <components/real/mission/telescope.hpp>
// HILS IF
#include "../../interface/hils/hils_if_driver.hpp"
// Communication
#include <components/real/communication/wings_command_sender_to_c2a.hpp>

using libra::Vector;

Expand Down Expand Up @@ -110,8 +112,10 @@ class AocsModuleComponents : public InstalledComponents {
// Mission
Telescope *telescope_; //!< Telescope
// HILS
HilsPortManager *hils_port_manager_; //!< HILS port manager
HilsIfDriver *hils_if_driver_; //!< HILS Interface driver
HilsPortManager *hils_port_manager_;
HilsIfDriver *hils_if_driver_;
// Communication
WingsCommandSenderToC2a *wings_command_sender_to_c2a_;

// States
const Dynamics *dynamics_; //!< Dynamics information of the spacecraft
Expand Down