-
-
Notifications
You must be signed in to change notification settings - Fork 214
Env/flight axial aceleration #876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,14 +1,14 @@ | ||||||||
| # pylint: disable=too-many-lines | ||||||||
| import json | ||||||||
| import math | ||||||||
| import warnings | ||||||||
| from copy import deepcopy | ||||||||
| from functools import cached_property | ||||||||
|
|
||||||||
| import numpy as np | ||||||||
| import simplekml | ||||||||
| from scipy.integrate import BDF, DOP853, LSODA, RK23, RK45, OdeSolver, Radau | ||||||||
|
|
||||||||
| from rocketpy.simulation.flight_data_exporter import FlightDataExporter | ||||||||
|
|
||||||||
| from ..mathutils.function import Function, funcify_method | ||||||||
| from ..mathutils.vector_matrix import Matrix, Vector | ||||||||
| from ..motors.point_mass_motor import PointMassMotor | ||||||||
|
|
@@ -17,7 +17,6 @@ | |||||||
| from ..rocket import PointMassRocket | ||||||||
| from ..tools import ( | ||||||||
| calculate_cubic_hermite_coefficients, | ||||||||
| deprecated, | ||||||||
| euler313_to_quaternions, | ||||||||
|
Comment on lines
18
to
20
|
||||||||
| find_closest, | ||||||||
| find_root_linear_interpolation, | ||||||||
|
|
@@ -1136,7 +1135,6 @@ def __init_solution_monitors(self): | |||||||
| self.out_of_rail_time_index = 0 | ||||||||
| self.out_of_rail_state = np.array([0]) | ||||||||
| self.apogee_state = np.array([0]) | ||||||||
| self.apogee = 0 | ||||||||
| self.apogee_time = 0 | ||||||||
|
||||||||
| self.apogee_time = 0 | |
| self.apogee_time = 0 | |
| self.apogee = 0 |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace detected. This line should end immediately after the closing brace without extra spaces.
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The axial_acceleration property is missing the @funcify_method decorator that other similar properties use. This decorator is used throughout the codebase to define the output labels and interpolation methods for Function objects. It should include appropriate labels with units.
Suggested fix:
@funcify_method("Time (s)", "Axial Acceleration (m/s²)", "spline", "zero")
def axial_acceleration(self):
"""Axial acceleration magnitude as a function of time, in m/s²."""
return (
self.ax * self.attitude_vector_x
+ self.ay * self.attitude_vector_y
+ self.az * self.attitude_vector_z
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of
import jsonandimport simplekmlat the module level, along with the removal of theFlightDataExporterimport and thedeprecatedimport from tools, appears to be unrelated to the stated purpose of this PR (adding axial acceleration calculation).These changes seem to be reverting the refactoring that moved export methods to
FlightDataExporter, as the methodsexport_pressures,export_data,export_sensor_data, andexport_kmlhave been restored to the Flight class with their full implementations (lines 3276-3539).This significantly expands the scope of the PR beyond what is described and should be addressed in a separate PR or the PR description should be updated to reflect these additional changes.