From 72220707bf8c11219db1cdb9c6c4a68d486c694e Mon Sep 17 00:00:00 2001 From: Tomoki Date: Wed, 17 Jan 2024 16:28:02 +0900 Subject: [PATCH 1/4] [hotfix] fix force_generator --- src/components/ideal/force_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ideal/force_generator.cpp b/src/components/ideal/force_generator.cpp index 9490b1c2f..8e7a610b9 100644 --- a/src/components/ideal/force_generator.cpp +++ b/src/components/ideal/force_generator.cpp @@ -31,7 +31,7 @@ void ForceGenerator::MainRoutine(const int time_count) { // Add noise only when the force is generated libra::Vector<3> true_direction = generated_force_b_N_.CalcNormalizedVector(); libra::Quaternion error_quaternion = GenerateDirectionNoiseQuaternion(true_direction, direction_error_standard_deviation_rad_); - libra::Vector<3> converted_direction = error_quaternion.FrameConversion(generated_force_b_N_); + libra::Vector<3> converted_direction = error_quaternion.FrameConversion(true_direction); double force_norm_with_error = norm_ordered_force + magnitude_noise_; generated_force_b_N_ = force_norm_with_error * converted_direction; } From cb704682bef95c5d5d6c835d5ef013a565081dac Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 17 Jan 2024 09:15:14 +0100 Subject: [PATCH 2/4] Fix error direction calculation --- src/components/ideal/torque_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ideal/torque_generator.cpp b/src/components/ideal/torque_generator.cpp index 4eba2adf8..5965fdc4e 100644 --- a/src/components/ideal/torque_generator.cpp +++ b/src/components/ideal/torque_generator.cpp @@ -31,7 +31,7 @@ void TorqueGenerator::MainRoutine(const int time_count) { // Add noise only when the torque is generated libra::Vector<3> true_direction = generated_torque_b_Nm_.CalcNormalizedVector(); libra::Quaternion error_quaternion = GenerateDirectionNoiseQuaternion(true_direction, direction_error_standard_deviation_rad_); - libra::Vector<3> converted_direction = error_quaternion.FrameConversion(generated_torque_b_Nm_); + libra::Vector<3> converted_direction = error_quaternion.FrameConversion(true_direction); double torque_norm_with_error = norm_ordered_torque + magnitude_noise_; generated_torque_b_Nm_ = torque_norm_with_error * converted_direction; } From f43bad26041c075a4ee02b95f2f28dc87dcd8b92 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 17 Jan 2024 09:16:51 +0100 Subject: [PATCH 3/4] Fix test codes --- src/simulation_sample/spacecraft/sample_components.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulation_sample/spacecraft/sample_components.cpp b/src/simulation_sample/spacecraft/sample_components.cpp index 80b1d0fa0..d529d040a 100644 --- a/src/simulation_sample/spacecraft/sample_components.cpp +++ b/src/simulation_sample/spacecraft/sample_components.cpp @@ -152,10 +152,10 @@ SampleComponents::SampleComponents(const Dynamics* dynamics, Structure* structur // torque generator debug output // libra::Vector<3> torque_Nm; - // torque_Nm[0] = 1.0; + // torque_Nm[0] = 0.1; // torque_Nm[1] = 0.0; // torque_Nm[2] = 0.0; - // torque_generator_->SetTorque_b_Nm_Nm(torque_Nm); + // torque_generator_->SetTorque_b_Nm(torque_Nm); } SampleComponents::~SampleComponents() { From 6e5fc4a4b5c50a5ad4f3be8a97fcddf1ef53c8f7 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Wed, 17 Jan 2024 09:59:04 +0100 Subject: [PATCH 4/4] Update version info in CMake to v7.2.2 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e04316ab..34829f627 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) project(S2E LANGUAGES CXX DESCRIPTION "S2E: Spacecraft Simulation Environment" - VERSION 7.2.1 + VERSION 7.2.2 ) # build config