From 6dffefce330b6d6aa91f52b327d91c7c17ef354c Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Thu, 12 Oct 2023 18:26:20 +0200 Subject: [PATCH] Add MTQ magnetometer interference --- src/simulation/spacecraft/aocs_module_components.cpp | 6 ++++++ src/simulation/spacecraft/aocs_module_components.hpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/simulation/spacecraft/aocs_module_components.cpp b/src/simulation/spacecraft/aocs_module_components.cpp index eb19b75..93012da 100644 --- a/src/simulation/spacecraft/aocs_module_components.cpp +++ b/src/simulation/spacecraft/aocs_module_components.cpp @@ -170,6 +170,12 @@ AocsModuleComponents::AocsModuleComponents(const Dynamics *dynamics, Structure * rw0003_z_ = new Rw0003(InitReactionWheel(clock_generator, power_controller_->GetPowerPort((int)PowerPortIdx::RWZ), 3, rw_ini_path, compo_step_sec), 1, rw0003_z_hils_port_id, i2c_address_z, aobc_, hils_port_manager_); + + // Component interference + const std::string interference_file_path = ini_access.ReadString("COMPONENTS_FILES", "component_interference_file"); + configuration_->main_logger_->CopyFileToLogDirectory(interference_file_path); + mtq_magnetometer_interference_ = new MtqMagnetometerInterference(interference_file_path, *rm3100_external_, *mtq_seiren_); + // Thruster const std::string thruster_ini_path = ini_access.ReadString("COMPONENTS_FILE", "thruster_file"); thruster_ = new SimpleThruster(InitSimpleThruster(clock_generator, 1, thruster_ini_path, structure_, dynamics_)); diff --git a/src/simulation/spacecraft/aocs_module_components.hpp b/src/simulation/spacecraft/aocs_module_components.hpp index be2690b..3e6d1eb 100644 --- a/src/simulation/spacecraft/aocs_module_components.hpp +++ b/src/simulation/spacecraft/aocs_module_components.hpp @@ -25,6 +25,7 @@ #include "../../component/aocs/rw0003.hpp" #include "../../component/aocs/sagitta.hpp" #include "../../component/aocs/stim210.hpp" +#include // Propulsion #include // Mission @@ -97,6 +98,8 @@ class AocsModuleComponents : public InstalledComponents { Rw0003 *rw0003_x_; //!< RW00003 Reaction wheel X axis Rw0003 *rw0003_y_; //!< RW00003 Reaction wheel Y axis Rw0003 *rw0003_z_; //!< RW00003 Reaction wheel Z axis + // Component Interference + MtqMagnetometerInterference* mtq_magnetometer_interference_; //!< Additional Bias noise by MTQ-Magnetometer interference // Thruster SimpleThruster *thruster_; //!< Thruster // Mission