Package: preflightpy
PreflightPyPython module forSimulation andOptimization ofRocketTrajectories,SORTfor short.Altitude predictionState predictionFlight trajectory optimizationFlight plan optimizationQuick Start :vertical_traffic_light:Before we get started, please note that PreflightPy was built withPython 3.xin mind and might not be compatible with older versions.InstallationGetting yourself your very own copy of this module is super simple!
You can get Preflight from pip using your terminal via the following command:pipinstallpreflightThat's it you're set!UsageHere's an example of typical usage of this package:# Importing the moduleimportpreflightpyaspre# The 'Parameters' class collects info about the rocket and environmental conditions etc. from the input file.params=pre.Parameters("path/to/input/file.json")#  The 'Environment' takes care of computing conditions (e.g. atmosphere, gravity) at various altitudes.env=pre.Environment(p.env_variables)# Specify the burn time of your engine in seconds.burn_time=10# The 'System', the core of this module, it takes care of the main simulation and output.s=pre.System(params,env,10)s.launch()# Blast off! Launches the simulation.# The results are outputted in .csv and .log formats and are located in the output folder specified by input fileThe following is the format you'll have to use in your.jsoninput files:{"Engine":{"Specific Impulse (s)":318,"Thrust (N)":500},"Fuel":{"Oxidizer/Fuel Mixture Ratio":15,"Fuel Reserve (%)":5},"Mass":{"Dry Mass (kg)":10},"Aerodynamics":{"Drag Coefficient":0.0556,"Cross-section (m2)":0.0255364},"Environment":{"Elevation (m)":113,"Simulation step (s)":0.01,"Standard gravity (m/s2)":9.80665,"Air molar mass (kg/mol)":0.02896968,"Gas constant (J/(K.mol))":8.314462618,"Air heat capacity ratio":1.4,"Standard Atmospheric pressure @SL (Pa)":101325},"Output":{"Log File Path":"Flight.log","CSV File Path":"Flight.csv"}}Documentation :pencil:Visit ourdocumentationto learn how to usePreflightPyin depth.Contribuitng :earth_americas:If you want to contribute to this project, this set of instructions will get a copy up and running on your local machine for development and testing purposes! Once you're done, check out ourcontribution guidelinesbefore you get started.InstallationTo get a copy of the repository you'll have to clone it.
Through the command line, get to the directory you wish to clone the repository into then run the following command.gitclonehttps://github.com/Oxyde2/Preflight.gitPrerequisitesWe're almost done, next step is to fetch our dependencies.
To install the required python modules just run the following command in the command line at the root of the repository folder.pipinstall-rrequirements.txtConclusionCongratulations, you have successfully obtained your local copy and the dependencies!
Now open the project folder in your desired IDE or text editor and get crackin'!Built With :construction_worker:Matplotlib- To draw the graphs.Versioning :bookmark:The versioning is formatted to Semantic Versioning 2.0.0 standards.SemVer.
The changelog format is based onKeep a ChangelogFor available versions, see thereleases of this project.Authors :floppy_disk:Maxime Djomby-Initial work-Oxyde2License :page_with_curl:This project is licensed under the GNU General Public License v3.0 - see theLICENSE.mdfile for detailsAcknowledgments :trumpet:Early development of Preflight was supported byMix_42.
The websiteRocket & Space Technology, written by Robert A. Braeunig, was used for pressure, density and temperature formulas for the atmospheric model.