Skip to content

Commit 950265c

Browse files
author
MateusStano
committed
ENH: remove unecessary frame rotation
1 parent 1c577e8 commit 950265c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

rocketpy/simulation/flight.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,10 +1925,6 @@ def u_dot_generalized(self, t, u, post_processing=False): # pylint: disable=too
19251925
# Angular velocity derivative
19261926
w_dot = I_CM.inverse @ (T21 + (T20 ^ r_CM))
19271927

1928-
# Velocity vector derivative + Coriolis acceleration
1929-
w_earth = Kt @ Vector(self.env.earth_rotation_vector)
1930-
v_dot = K @ (T20 / total_mass - (r_CM ^ w_dot)) - 2 * (w_earth ^ v)
1931-
19321928
# Euler parameters derivative
19331929
e_dot = [
19341930
0.5 * (-omega1 * e1 - omega2 * e2 - omega3 * e3),
@@ -1937,6 +1933,10 @@ def u_dot_generalized(self, t, u, post_processing=False): # pylint: disable=too
19371933
0.5 * (omega3 * e0 + omega2 * e1 - omega1 * e2),
19381934
]
19391935

1936+
# Velocity vector derivative + Coriolis acceleration
1937+
w_earth = Vector(self.env.earth_rotation_vector)
1938+
v_dot = K @ (T20 / total_mass - (r_CM ^ w_dot)) - 2 * (w_earth ^ v)
1939+
19401940
# Position vector derivative
19411941
r_dot = [vx, vy, vz]
19421942

0 commit comments

Comments
 (0)