Skip to content

Conversation

@hogatata
Copy link

Pull request type

  • Code changes (bugfix, features)
  • Code maintenance (refactoring, formatting, tests)

Checklist

  • Tests for the changes have been added (if needed)
  • All tests (pytest tests -m slow --runslow) have passed locally

Current behavior

Currently, the Flight class calculates various kinematic properties, but it does not explicitly expose the axial acceleration (acceleration along the rocket's longitudinal axis) as a direct property or method. Users have to calculate it manually from other components.

New behavior

This PR adds the calculation of the axial acceleration to the Flight class:

  • Implemented axial_acceleration calculation.
  • Added a corresponding unit test to verify the correctness of the values against expected physical behavior.

Breaking change

  • Yes
  • No

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to add axial acceleration calculation to the Flight class, which represents the acceleration along the rocket's longitudinal axis. However, the PR includes several unrelated changes that significantly expand its scope beyond the stated purpose.

Key Changes:

  • Added axial_acceleration property to calculate acceleration along rocket's axis
  • Added corresponding unit test using dot product verification
  • Unexpectedly restored previously deprecated export methods (export_pressures, export_data, export_sensor_data, export_kml) with full implementations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
rocketpy/simulation/flight.py Added axial_acceleration cached property; restored export methods that were previously moved to FlightDataExporter; removed self.apogee initialization; added json and simplekml imports; removed deprecated import
tests/unit/simulation/test_flight.py Added parameterized test to verify axial_acceleration calculation against manual dot product computation at key flight times

@Gui-FernandesBR Gui-FernandesBR changed the base branch from master to develop November 27, 2025 12:39
@Gui-FernandesBR Gui-FernandesBR force-pushed the env/flight-axial_aceleration branch from c5a1258 to 47e5b61 Compare November 27, 2025 12:39
@Gui-FernandesBR
Copy link
Member

@hogatata are you still willing to work on this one? Tests are not passing, we need that fixed before starting our review

@Gui-FernandesBR Gui-FernandesBR marked this pull request as draft November 27, 2025 12:55
@Gui-FernandesBR Gui-FernandesBR linked an issue Nov 27, 2025 that may be closed by this pull request
@hogatata
Copy link
Author

I am still working on this. I will look into the errors and fix the failing tests as soon as possible. @Gui-FernandesBR

@hogatata hogatata force-pushed the env/flight-axial_aceleration branch from 47e5b61 to 660a2df Compare November 29, 2025 15:05
@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.78%. Comparing base (9cf3dd4) to head (202a69b).
⚠️ Report is 16 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #876      +/-   ##
===========================================
+ Coverage    80.27%   80.78%   +0.50%     
===========================================
  Files          104      107       +3     
  Lines        12769    13377     +608     
===========================================
+ Hits         10250    10806     +556     
- Misses        2519     2571      +52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hogatata hogatata force-pushed the env/flight-axial_aceleration branch 2 times, most recently from 234d494 to 51ea94b Compare November 29, 2025 18:50
@Gui-FernandesBR
Copy link
Member

@hogatata is this PR ready for review again? Please mark it as ready for review, and solve all the comments above

@hogatata hogatata marked this pull request as ready for review December 1, 2025 16:58
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hogatata please update the CHANGELOG.md file so we can approve and merge this PR.

Everything is looking good to me!

@hogatata hogatata force-pushed the env/flight-axial_aceleration branch from 51ea94b to 3a41c22 Compare December 2, 2025 01:58
@hogatata
Copy link
Author

hogatata commented Dec 2, 2025

@Gui-FernandesBR Done! I've updated the CHANGELOG.md file.

Copy link
Member

@Gui-FernandesBR Gui-FernandesBR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from Backlog to Next Version in LibDev Roadmap Dec 3, 2025
@Gui-FernandesBR Gui-FernandesBR merged commit afb3e3e into RocketPy-Team:develop Dec 3, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from Next Version to Closed in LibDev Roadmap Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Closed

Development

Successfully merging this pull request may close these issues.

ENH: adds axial_acceleration attribute to the Flight class

2 participants