Skip to content

Commit f10055d

Browse files
committed
Revert changes on weight_in_body_frame
1 parent f6729de commit f10055d

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

rocketpy/simulation/flight.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,12 +2649,9 @@ def u_dot_generalized(self, t, u, post_processing=False): # pylint: disable=too
26492649
if hasattr(self.rocket, "roll_control"):
26502650
M3 += self.rocket.roll_control.roll_torque
26512651

2652-
# Calculate weight with buoyancy: F_net = -total_mass * g + rho * V * g
2653-
gravity_accel = self.env.gravity.get_value_opt(z)
2654-
net_gravitational_force = (
2655-
-total_mass * gravity_accel + rho * self.rocket.volume * gravity_accel
2652+
weight_in_body_frame = Kt @ Vector(
2653+
[0, 0, -total_mass * self.env.gravity.get_value_opt(z)]
26562654
)
2657-
weight_in_body_frame = Kt @ Vector([0, 0, net_gravitational_force])
26582655

26592656
T00 = total_mass * r_CM
26602657
T03 = 2 * total_mass_dot * (r_NOZ - r_CM) - 2 * total_mass * r_CM_dot

0 commit comments

Comments
 (0)