RocketPy-Team / RocketPy

Next generation High-Power Rocketry 6-DOF Trajectory Simulation
https://docs.rocketpy.org/
MIT License
570 stars 137 forks source link

ENH: Use eng files to define additional motor parameters #600

Open chasgior214 opened 1 month ago

chasgior214 commented 1 month ago

Is your feature request related to a problem? Please describe.

It would be nice to not have to write out motor parameters that are already defined in an eng file when using an eng file to supply the thrust curve for a motor.

309 addressed automatically adding the burnout time, but it did not implement that for the GenericMotor class. An additional variable that can be read from an eng file is the dry weight (the first line of an eng file specifies propellant mass and loaded/total mass (source), dry mass being the difference) for any motor class, and the initial mass for the GenericMotor class.

It could make RocketPy an easier tool to use to quickly compare how a rocket would perform using different motors, similar to Thrust Curve's motor guide but with a more advanced flight simulator.

Describe the solution you'd like

1) The GenericMotor class gets the same update that the other motor classes did in #309 2) All motor classes that have a thrust curve defined by an eng file have their dry masses defined by the eng file by default (a user-supplied dry mass would override that value) 3) The GenericMotor class has its propellant_initial_mass parameter defined by the eng file by default (a user-supplied propellant mass would override that value)

Gui-FernandesBR commented 1 month ago

This is a good suggestion. @chasgior214 would you like to participate on the solution too? We can guide you through the implementation.

chasgior214 commented 1 month ago

Sure! I've never used pull requests or contributed to a large project before, so apologies in advance if I mess something up lol. Where should I get started?