{"id":15018054,"url":"https://github.com/henrystoldt/mapleaf","last_synced_at":"2025-10-23T15:30:29.979Z","repository":{"id":49956461,"uuid":"294119991","full_name":"henrystoldt/MAPLEAF","owner":"henrystoldt","description":"6-DOF Rocket Flight Simulation Framework","archived":false,"fork":false,"pushed_at":"2023-12-27T20:51:09.000Z","size":66790,"stargazers_count":54,"open_issues_count":3,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-30T19:07:43.887Z","etag":null,"topics":["aerodynamics","cython","montecarlo","physics","python","rocket","simulator"],"latest_commit_sha":null,"homepage":"https://henrystoldt.github.io/MAPLEAF/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/henrystoldt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-09-09T13:22:29.000Z","updated_at":"2025-01-29T21:29:29.000Z","dependencies_parsed_at":"2024-01-05T11:13:51.728Z","dependency_job_id":null,"html_url":"https://github.com/henrystoldt/MAPLEAF","commit_stats":{"total_commits":406,"total_committers":8,"mean_commits":50.75,"dds":"0.24630541871921185","last_synced_commit":"af970d3e8200832f5e70d537b15ad38dd74fa551"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrystoldt%2FMAPLEAF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrystoldt%2FMAPLEAF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrystoldt%2FMAPLEAF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrystoldt%2FMAPLEAF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henrystoldt","download_url":"https://codeload.github.com/henrystoldt/MAPLEAF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237843768,"owners_count":19375201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aerodynamics","cython","montecarlo","physics","python","rocket","simulator"],"created_at":"2024-09-24T19:51:22.450Z","updated_at":"2025-10-23T15:30:24.936Z","avatar_url":"https://github.com/henrystoldt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/Draft2Logo.png\" alt=\"Logo\"\n    title=\"MAPLEAF\" height=150 style=\"padding-right: 10px;\"/\u003e\n  \u003ch1 align=\"center\"\u003eModular Aerospace Prediction Lab for Engines and Aero Forces\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca align=\"center\" href=\"https://github.com/henrystoldt/mapleaf/actions\"\u003e\u003cimg alt=\"Tests\" src=\"https://github.com/henrystoldt/mapleaf/workflows/Tests/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca align=\"center\" href=\"https://github.com/henrystoldt/mapleaf/actions\"\u003e\u003cimg alt=\"Linting\" src=\"https://github.com/henrystoldt/mapleaf/workflows/Linting/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca align=\"center\" href=\"https://henrystoldt.github.io/MAPLEAF/\"\u003e\u003cimg alt=\"Docs\" src=\"https://github.com/henrystoldt/mapleaf/workflows/Docs/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca align=\"center\" href=\"https://codecov.io/gh/henrystoldt/mapleaf\"\u003e\u003cimg alt=\"Coverage\" src=\"https://codecov.io/gh/henrystoldt/mapleaf/branch/master/graph/badge.svg\"\u003e\u003c/a\u003e\n  \u003cimg alt=\"Python3\" src=\"https://img.shields.io/badge/python-3.6+-brightgreen\"\u003e\n  \u003ca align=\"center\" href=\"https://lbesson.mit-license.org/\"\u003e\u003cimg alt=\"MIT License\" src=\"https://img.shields.io/badge/License-MIT-blue.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Install:\nPrerequisites:\n\n- [Python 3.6+](https://www.python.org/downloads/) (**[64-bit](https://stackoverflow.com/questions/1842544/how-do-i-detect-if-python-is-running-as-a-64-bit-application)**)\n  - Linux/WSL: install python3.X-dev package (includes python header files for Cython)\n- C/C++ compilers OR an existing installation of [Cython](https://cython.readthedocs.io/en/latest/src/quickstart/install.html)\n  - Windows: install visual studio build tools or MinGW\n- (Recommended) A Python [virtual environment](https://towardsdatascience.com/virtual-environments-104c62d48c54). See [README_Dev.md](https://github.com/henrystoldt/MAPLEAF/blob/master/README_Dev.md#create-python-virtual-environment-with-virtualenvwrapper)\n\n`$ pip install MAPLEAF`\n\nThe (optional) dependencies used to enable 3D flight path renders (mayavi) and parallelization (ray) are not installed by default because they're often tricky to get running. Run the [installOptionalPackages.py](https://github.com/henrystoldt/MAPLEAF/blob/master/installOptionalPackages.py) script to try installing them if you want to use those capabilities. See ray and mayavi github pages/documentation for more help getting them installed.\n\n### Test your installation\nUnit tests:  \n`$ python -m unittest -v`  \nRegression tests:  \n`$ mapleaf-batch`  \n\nSee [README_Dev.md](https://github.com/henrystoldt/MAPLEAF/blob/master/README_Dev.md) for more information, or the [verification and validation section](https://henrystoldt.github.io/MAPLEAF/V\u0026V/index.html) of the code documentation for the expected results of the regression tests.\n\n## Developers\nContributions are welcome.\nTo learn about the code, have a look at [README_Dev.md](https://github.com/henrystoldt/MAPLEAF/blob/master/README_Dev.md), and the [code documentation website](https://henrystoldt.github.io/MAPLEAF/)\n\n## Running a Simulation\n`$ mapleaf path/to/SimDefinitionFile.mapleaf`  \n\nSample simulation definitions: [MAPLEAF/Examples/Simulations](https://github.com/henrystoldt/MAPLEAF/tree/master/MAPLEAF/Examples/Simulations)  \nExample cases be run with just the case name: `$ mapleaf NASATwoStageOrbitalRocket`  \nThis is the same as running: `$ mapleaf MAPLEAF/Examples/Simulations/NASATwoStageOrbitalRocket.mapleaf` from MAPLEAF's install location\n\nHelp: `$ mapleaf -h`\n\n### Simulation Definition Files\nBrief overview below. **More info, and definitions of all possible options in:** [SimDefinitionTemplate.mapleaf](https://github.com/henrystoldt/MAPLEAF/blob/master/SimDefinitionTemplate.mapleaf)\n\nFormat is a simple key-value syntax similar to JSON or YAML.  \nDictionaries can be nested arbitrarily deeply and are brace-delimited.  \nKeys and values in a dictionary are separated by the first whitespace in their line  \nNo multiline values\n\nExample:\n```  \nSimControl{\n  timeDiscretization    RK45Adaptive\n\n  TimeStepAdaptation{\n    controller          PID\n    PID.coefficients    -0.01 -0.001 0\n    targetError         0.0001\n  }\n}\n```\n\n[Code folding](https://code.visualstudio.com/docs/editor/codebasics#_folding) and [syntax highlighting](https://marketplace.visualstudio.com/items?itemName=MAPLEAF.MAPLEAF) are helpful in maintaining a file overview:\n\n![Folded Sim Definition](https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/SimDefinitionFile_Folded.PNG?raw=true)\n\nThe possible top level dictionaries are 'Optimization', 'MonteCarlo', 'SimControl', 'Environment', and 'Rocket'.\nOf these, only the 'Rocket' dictionary is strictly required to run a simulation, and defines the rocket's initial position/velocity and the inertial/aerodynamic/control models used to simulate it.  \nThe rocket is defined by nested subdictionaries, where the first level of nesting defines the rocket's stage(s) and the second level defines the component(s) in each stage:\n\n![Rocket Definition](https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/SimDefinitionFile_Rocket.PNG?raw=true)\n\nDefault values from the defaultConfigValues dictionary in [MAPLEAF/IO/SimDefinition.py](https://github.com/henrystoldt/MAPLEAF/blob/master/MAPLEAF/IO/SimDefinition.py) will fill in for omitted keys.\nMost defaults match the values in [SimDefinitionTemplate.mapleaf](https://github.com/henrystoldt/MAPLEAF/blob/master/SimDefinitionTemplate.mapleaf).\n\n## Simulation Outputs\nDepending on the options specified in the `SimControl` dictionary, MAPLEAF will output:\n- Detailed tabulated simulation position, component force, aerodynamic coefficient and control logs (see SimControl.loggingLevel):\n![Sample section of log file](https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/LogSample.PNG?raw=true)\n\n- Flight animations (see SimControl.plot)  \n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/FlightAnimation.gif?raw=true\" alt=\"Flight Animation\"\n  title=\"MAPLEAF\" height=225 style=\"padding-right: 10px;\"/\u003e\n\n- Flight path visualizations (see SimControl.plot - [Mayavi](https://github.com/enthought/mayavi) is required to render these ones showing the Earth)  \n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/EarthOrbit.png?raw=true\" alt=\"Earth Orbit\"\n  title=\"MAPLEAF\" height=300 style=\"padding-right: 10px;\"/\u003e\n\n- Plots of any logged parameter (see SimControl.plot or --plotFromLog command line option)  \n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/PlottingFromLogs.png?raw=true\" alt=\"Plotting from logs\"\n  title=\"MAPLEAF\" height=300 style=\"padding-right: 10px;\"/\u003e\n\n## Monte Carlo Simulations\nMonte Carlo simulations propagate uncertainties in simulation inputs through to simulation outputs.  \nAny scalar or vector parameter in simulation definition files can be made probabilistic by adding a second parameter with `_stdDev` appended to the name:\n\n![Monte Carlo Parameter](https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/SimDefinition_MonteCarlo.png?raw=true)\n\nTo execute a batch run of this now-probabilistic simulation, create the top-level 'Monte Carlo' dictionary (see [SimDefinitionTemplate.mapleaf](https://github.com/henrystoldt/MAPLEAF/blob/master/SimDefinitionTemplate.mapleaf))\n\nThen, MAPLEAF can produce distributions of outputs like landing locations:  \n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/LandingLocationPlot.png?raw=true\" alt=\"Landing Location Plot\"\n  title=\"MAPLEAF\" height=300 style=\"padding-right: 10px;\"/\u003e\n\n## Design Optimization\nMAPLEAF uses [pyswarms](https://github.com/ljvmiranda921/pyswarms) to optimize arbitrary scalar parameters according to arbitrary cost functions using Particle Swarm Optimization.\nTo define an optimization problem, include the top-level 'Optimization' dictionary (see [SimDefinitionTemplate.mapleaf](https://github.com/henrystoldt/MAPLEAF/blob/master/SimDefinitionTemplate.mapleaf)):\n\n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/SimDefinition_Optimization.PNG?raw=true\" alt=\"Optimization Dict\"\n  title=\"MAPLEAF\" height=300 style=\"padding-right: 10px;\"/\u003e\n\nPyswarms will produce a plot of the optimization results after completion:\n\n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/OptimizationResult.png?raw=true\" alt=\"Optimization Result\"\n  title=\"MAPLEAF\" height=300 style=\"padding-right: 10px;\"/\u003e\n\n## Batch Simulations\nAutomates running and post-processing groups of cases.  \nTo run: `$ mapleaf-batch path/to/batchDefinitionFile`  \nFor help: `$ mapleaf-batch -h`\n\n![Batch Definition](Resources/BatchDefinition.png)\n\nProvides ability to automate production of detailed plots of MAPLEAF's results compared to verification/validation data, and to run Wind-Tunnel style aero-sweep simulations:\n\n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/CantedFinRocketPlot.png?raw=true\" alt=\"Canted Fin Roll Rate\"\n  title=\"MAPLEAF\" height=300 style=\"padding-right: 10px;\"/\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/henrystoldt/MAPLEAF/master/Resources/ParametricFin5CAvsMach.png?raw=true\" alt=\"Wind Tunnel Comparison\"\n  title=\"MAPLEAF\" height=300 style=\"padding-right: 10px;\"/\u003e\n\nUsed for regression and verification/validation testing in MAPLEAF.  \nSee [batchRunTemplate.mapleaf](https://github.com/henrystoldt/MAPLEAF/blob/master/batchRunTemplate.mapleaf) for complete batch interface definition and [regressionTests.mapleaf](https://github.com/henrystoldt/MAPLEAF/blob/master/MAPLEAF/Examples/BatchSims/regressionTests.mapleaf) for examples.\n\nTo run the regression/verification/validation test suite, check out [README_Dev.md](https://github.com/henrystoldt/MAPLEAF/blob/master/README_Dev.md)\n\n## Parallelization\nTo run **Monte Carlo** or **Optimization** simulations in parallel:\n`mapleaf --parallel MonteCarlo.mapleaf`\n\nMAPLEAF's parallelization is implemented using [ray](https://github.com/ray-project/ray).\n\n## Cite MAPLEAF\n[Stoldt, H., Quinn, D., Kavanagh, J., Johansen, C. (2021). MAPLEAF: A Compact, Extensible, Open-Source, 6-\nDegrees-of-Freedom Rocket Flight Simulation Framework. In 2021 AIAA Propulsion \u0026 Energy Forum.](https://arc.aiaa.org/doi/abs/10.2514/6.2021-3267)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrystoldt%2Fmapleaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenrystoldt%2Fmapleaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrystoldt%2Fmapleaf/lists"}