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 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; } 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; } 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() {