Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/technical/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ References
.. [Chou] Chou, P.-C., et al. *Tip-off effect analysis of a vehicle moving along an inclined guideway by considering dynamic interactions*.

.. [Hosken] Hosken, R. W., et al. *Analysis of missile launchers, part Q: tip-off effects in helical rail launchers*.

.. [Peng] Peng, W., Zhang, Q., Yang, T., and Feng, Z. (2017). *A high-precision dynamic model of a sounding rocket and rapid wind compensation method research*. Advances in Mechanical Engineering, 9(7).
198 changes: 122 additions & 76 deletions docs/technical/tip_off.rst

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions rocketpy/_encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def set_minimal_flight_attributes(flight, obj):
"name",
"solution",
"out_of_rail_time",
"tip_off_end_time",
"apogee_time",
"apogee",
"parachute_events",
Expand Down Expand Up @@ -238,7 +239,12 @@ def set_minimal_flight_attributes(flight, obj):
if attribute == "net_thrust":
flight.net_thrust = obj["rocket"].motor.thrust
flight.net_thrust.set_discrete_based_on_model(flight.speed)
elif attribute == "tip_off_end_time":
# Saved before the tip-off phase existed: there was no window
flight.tip_off_end_time = flight.out_of_rail_time

# Lower button forces of the tip-off phase, absent from older files
flight._tip_off_button_forces = obj.get("tip_off_button_forces", [])
flight.t_initial = flight.initial_solution[0]


Expand Down
9 changes: 3 additions & 6 deletions rocketpy/plots/flight_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2524,8 +2524,7 @@ def _mark_tip_off_window(self, ax):

The window runs from the upper rail button leaving the rail to the
lower one leaving it, which is when the rocket pivots about the lower
button. It is a no-op unless the flight was run with
``use_udot_rail2=True``, since otherwise the phase never runs.
button. Nothing is drawn when the tip-off phase did not run.

Parameters
----------
Expand All @@ -2536,13 +2535,11 @@ def _mark_tip_off_window(self, ax):
-------
None
"""
if not self.flight.use_udot_rail2:
return
if self.flight.between_rails_time <= self.flight.out_of_rail_time:
if self.flight.tip_off_duration <= 0:
return
ax.axvspan(
self.flight.out_of_rail_time,
self.flight.between_rails_time,
self.flight.tip_off_end_time,
color="0.5",
alpha=0.25,
zorder=0,
Expand Down
12 changes: 5 additions & 7 deletions rocketpy/prints/flight_prints.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,26 +166,24 @@ def out_of_rail_conditions(self):
def tip_off_conditions(self):
"""Prints out the tip-off window, i.e. the interval during which the
rocket pivots about the lower rail button after the upper one has left
the rail. Only printed when the flight was run with
``use_udot_rail2=True``; otherwise the phase never runs and there is
nothing to report.
the rail. Nothing is printed when the tip-off phase did not run.

Returns
-------
None
"""
if not self.flight.use_udot_rail2:
if self.flight.tip_off_duration <= 0:
return
print("\nTip-Off State\n")
print(f"Tip-Off Duration: {self.flight.tip_off_duration:.3f} s")
print(f"Lower Button Departure Time: {self.flight.between_rails_time:.3f} s")
print(f"Lower Button Departure Time: {self.flight.tip_off_end_time:.3f} s")
print(
"Lower Button Departure Velocity: "
f"{self.flight.between_rails_velocity:.3f} m/s"
f"{self.flight.tip_off_end_velocity:.3f} m/s"
)
print(
"Tip-Off Angle of Attack: "
f"{self.flight.angle_of_attack(self.flight.between_rails_time):.3f}°"
f"{self.flight.angle_of_attack(self.flight.tip_off_end_time):.3f}°"
)

def burn_out_conditions(self):
Expand Down
Loading
Loading