From 0061c26889a42cc9ed7434a2ee5da295fb85a056 Mon Sep 17 00:00:00 2001 From: TomokiMochizuki Date: Wed, 5 Jun 2024 19:02:49 +0900 Subject: [PATCH] change order to define variables --- .../ode_attitude_with_cantilever_vibration.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dynamics/attitude/ode_attitude_with_cantilever_vibration.hpp b/src/dynamics/attitude/ode_attitude_with_cantilever_vibration.hpp index 36a04a691..cabadaacc 100644 --- a/src/dynamics/attitude/ode_attitude_with_cantilever_vibration.hpp +++ b/src/dynamics/attitude/ode_attitude_with_cantilever_vibration.hpp @@ -34,6 +34,11 @@ class AttitudeWithCantileverVibrationOde : public InterfaceOde<13> { omega_cantilever_rad_s[i] = state[i + 3]; } + libra::Vector<4> quaternion_i2b; + for (size_t i = 0; i < 4; i++) { + quaternion_i2b[i] = state[i + 6]; + } + libra::Vector<3> euler_angle_cantilever_rad; for (size_t i = 0; i < 3; i++) { euler_angle_cantilever_rad[i] = state[i + 10]; @@ -57,11 +62,6 @@ class AttitudeWithCantileverVibrationOde : public InterfaceOde<13> { output[i + 3] = angular_accelaration_cantilever_rad_s2[i]; } - libra::Vector<4> quaternion_i2b; - for (size_t i = 0; i < 4; i++) { - quaternion_i2b[i] = state[i + 6]; - } - libra::Vector<4> d_quaternion = 0.5 * CalcAngularVelocityMatrix(omega_b_rad_s) * quaternion_i2b; for (size_t i = 0; i < 4; i++) {