-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
ENH: Air Brakes #426
ENH: Air Brakes #426
Conversation
Co-authored-by: Pedro Henrique Marinho Bressan <[email protected]> Co-authored-by: Giovani Hidalgo Ceotto <[email protected]>
Co-authored-by: Pedro Henrique Marinho Bressan <[email protected]> Co-authored-by: Giovani Hidalgo Ceotto <[email protected]>
Co-authored-by: Pedro Henrique Marinho Bressan <[email protected]> Co-authored-by: Giovani Hidalgo Ceotto <[email protected]>
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
This PR looks great. Simple yet powerful implementation of controllers. I was amazed by how such a simple controller could perfectly make the rocket reach the desired apogee.
@phmbressan @brunosorban and I helped in this PR at its infancy, but the example created by @MateusStano is fantastic. Hats off! 🚀
I do have one issue regarding the airbrakes.state_history
attribute. I am not sure storing the state history in the airbrake instance is perfectly appropriate. I see a couple of problems:
airbrakes.state_history
is empty before a Flight instance is created.airbrakes.state_history
may contain the history of multiple flights if various Flight instances are created using it, unless it is manually reset.- Plots related to
airbrakes.state_history
are totally empty before a flight.
That is why I wonder if this should be stored in the Flight class somehow, or if it is ok to have the airbrake instance mutate during flight. I would like a third opinion on this. @phmbressan @Gui-FernandesBR, any quick thoughts?
And a quick note regarding sources. I believe that the airbrake drag curve comes from a European Team. If confirmed, we should ask their permission to use the data and cite them.
*If fast approval is needed, we can go ahead and merge this PR and I'll create an issue to handle what is left afterwards. I hereby state that this PR is fully functional as far as I was able to review and test it. What is still necessary is:
- Tests
- Detailed docs
-
airbrakes.state_history
discussion - Proper citation of data sources
Getting back to this one:
Final comment here is that we are definitely going to be missing the #273 Sensors implementation. I believe improving RocketPy's control capabilities should be our priority from here on out |
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.
Nice changes since the previous reviews. I think we are quite close to conclude this one. I've made some minor comments that I think should contribute to the PR.
Tests could be better (i.e. faster) but I understand it doesn't need to be perfect right now.
The PR already allows users to simulate they airbrakes in RocketPy, which is remarkable!
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.
Amazing pull request, these are truly some of the most interesting graphs I have seen in RocketPy.
Great to see more than 100 comments on this PR request with inputs and suggestion.
Superb work @MateusStano in putting this all together.
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.
LGTM, @MateusStano whenever you feel confortable, please merge it.
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.
A masterpiece.
It is hard to make it 100% future proof, but this is definitely the best that could have been done for now. I am eager to see how control will evolve in RocketPy. Couldn't ask for a better start.
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest --runslow
) have passed locallyNew behavior
A simple implementation of an airbrakes simulation has been added. The added code:
Class Airbrakes
: Inherits fromAeroSurface
. Defines an airbrakes system with a cd curve that is a function of the deployed level and mach number.Class Controller
: Defines a controller that has acontroller_function
. This function is defined by the user and can alter the state of any number ofobserved_objects
. The controller will call thecontroller_function
everysampling_rate
(in simulation time).add_controllers
method inRocket
: Similar toadd_surfaces
add_airbrakes
method toRocket
: Similar to the aero surfacesadd
methods. Simplifies the addition of the air brakes for the userBreaking change