Skip to content

Commit

Permalink
change order to define variables
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMochizuki committed Jun 5, 2024
1 parent 6016ffb commit 0061c26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dynamics/attitude/ode_attitude_with_cantilever_vibration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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++) {
Expand Down

0 comments on commit 0061c26

Please sign in to comment.