Skip to content

Commit

Permalink
Merge pull request #572 from ut-issl/hotfix/fix-torque-generator
Browse files Browse the repository at this point in the history
[Hotfix] Fix torque generator
  • Loading branch information
200km authored Jan 17, 2024
2 parents d6d2a62 + 6e5fc4a commit 5d273de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/ideal/torque_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/simulation_sample/spacecraft/sample_components.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 5d273de

Please sign in to comment.