Skip to content

Commit

Permalink
ENH: Flight.altitude attribute created
Browse files Browse the repository at this point in the history
  • Loading branch information
Gui-FernandesBR committed Nov 20, 2023
1 parent 5f01df9 commit 32a8c3d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rocketpy/simulation/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,11 @@ def z(self):
"""Rocket z position as a Function of time."""
return self.solution_array[:, [0, 3]]

@funcify_method("Time (s)", "Altitude AGL (m)", "spline", "constant")
def altitude(self):
"""Rocket altitude above ground level as a Function of time."""
return self.z - self.env.elevation

@funcify_method("Time (s)", "Vx (m/s)", "spline", "zero")
def vx(self):
"""Rocket x velocity as a Function of time."""
Expand Down

0 comments on commit 32a8c3d

Please sign in to comment.