Skip to content

Commit

Permalink
ENH: calculate u_dot only once for all sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusStano committed Apr 2, 2024
1 parent 943542a commit 28ebc46
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rocketpy/simulation/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,12 @@ def __init__(
for callback in node.callbacks:
callback(self)

# calculate u_dot for sensors
u_dot = phase.derivative(self.t, self.y_sol)
for sensor, position in node._component_sensors:
relative_position = position - self.rocket._csys * Vector(
[0, 0, self.rocket.center_of_dry_mass_position]
)
u_dot = phase.derivative(
self.t, self.y_sol
) # calling udot for each sensor. Not optimal
sensor.measure(
self.t,
self.y_sol,
Expand Down

0 comments on commit 28ebc46

Please sign in to comment.