Skip to content
Merged
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
13 changes: 5 additions & 8 deletions rocketpy/simulation/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class Flight:
Flight.heading : int, float
Launch heading angle relative to north given in degrees.
Flight.initial_solution : list
List defines initial condition - [tInit, x_init,
List defines initial condition - [t_initial, x_init,
y_init, z_init, vx_init, vy_init, vz_init, e0_init, e1_init,
e2_init, e3_init, w1_init, w2_init, w3_init]
Flight.t_initial : int, float
Expand All @@ -155,10 +155,6 @@ class Flight:
Current integration time.
Flight.y : list
Current integration state vector u.
Flight.initial_solution : list
List defines initial condition - [tInit, x_init,
y_init, z_init, vx_init, vy_init, vz_init, e0_init, e1_init,
e2_init, e3_init, w1_init, w2_init, w3_init]
Flight.out_of_rail_time : int, float
Time, in seconds, in which the rocket completely leaves the
rail.
Expand Down Expand Up @@ -544,7 +540,7 @@ def __init__( # pylint: disable=too-many-arguments,too-many-statements
rtol : float, array, optional
Maximum relative error tolerance to be tolerated in the
integration scheme. Can be given as array for each
state space variable. Default is 1e-3.
state space variable. Default is 1e-6.
atol : float, optional
Maximum absolute error tolerance to be tolerated in the
integration scheme. Can be given as array for each
Expand Down Expand Up @@ -1168,6 +1164,7 @@ def __init_flight_state(self):
self.out_of_rail_state = self.initial_solution[1:]
self.out_of_rail_time = self.initial_solution[0]
self.out_of_rail_time_index = 0
self.t_initial = self.initial_solution[0]
self.initial_derivative = self.u_dot_generalized
if self._controllers or self.sensors:
# Handle post process during simulation, get initial accel/forces
Expand Down Expand Up @@ -2080,7 +2077,7 @@ def x(self):

@funcify_method("Time (s)", "Y (m)", "spline", "constant")
def y(self):
"""Rocket y position relative to the lauch pad as a Function of
"""Rocket y position relative to the launch pad as a Function of
time."""
return self.solution_array[:, [0, 2]]

Expand Down Expand Up @@ -2976,7 +2973,7 @@ def max_rail_button2_shear_force(self):
"Time (s)", "Horizontal Distance to Launch Point (m)", "spline", "constant"
)
def drift(self):
"""Rocket horizontal distance to tha launch point, in meters, as a
"""Rocket horizontal distance to the launch point, in meters, as a
Function of time."""
return np.column_stack(
(self.time, (self.x[:, 1] ** 2 + self.y[:, 1] ** 2) ** 0.5)
Expand Down
Loading