GithubHelp home page GithubHelp logo

wrg1t / g-fold Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.19 MB

G-FOLD (Guidance for Fuel-Optimal Large Diverts) algorithm implementation in Python 3

License: MIT License

Python 100.00%
convex-optimization cvxpy optimization optimization-algorithms g-fold planetary-science kerbal-space-program kerbalspaceprogram ksp

g-fold's Introduction

demo

G-FOLD
├─ demo.png
├─ demo_data.html
├─ demo_traj.html
├─ LICENSE
├─ README.md
├─ requirements.txt
├─ src
│  ├─ plot.py
│  ├─ gfold_util.py
│  └─ lcvx_optimizer.py
├─ vessel_parameters_earth.json
└─ vessel_parameters_mars.json

G-FOLD

G-FOLD (Guidance for Fuel-Optimal Large Diverts) algorithm implementation in Python 3. This code first solves a minimum-landing-error guidance problem for a closest landing point and then solves a minimum-fuel guidance problem to reach the landing point.

Table of Contents

Installation

It's recommended to use venv to set up the environment.

python3 -m venv env
source env/bin/activate
(or for windows, double click "Activate.ps1" in env/Scripts/)
pip install -r requirements.txt

And there you go! We are good to go.

Usage

python3 src/gfold_util.py 
   -h, --help           show this help message and exit
   -f JSON              path to JSON file containing vessel parameters
   -n Positive Integer  number of intervals (default: 20)

There are two vessel parameters provided already, you can change some of it to see how the trajectory changes accordingly.
Higher N values lead to greater accuracy at the cost of performance, though generally, 20 to 60 suffices.

Features

Utilizes a Golden-section search to determine the optimal flight time.
(Since it's Python, it could be a bit of slow).

TODO

  • Implement Successive Convexification.
  • Generate C code for a better performance.
  • Build a control module to run test in Kerbal Space Program.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or feedback, please create issues!

Reference

[1] Acikmese, B., & Ploen, S. R. (2007). Convex programming approach to powered descent guidance for Mars Landing. Journal of Guidance, Control, and Dynamics, 30(5), 1353–1366. https://doi.org/10.2514/1.27553

[2] Blackmore, L., Açikmeşe, B., & Scharf, D. P. (2010). Minimum-landing-error powered-descent guidance for Mars landing using convex optimization. Journal of Guidance, Control, and Dynamics, 33(4), 1161–1171. https://doi.org/10.2514/1.47202

[3] Acikmese, B., Carson, J. M., & Blackmore, L. (2013). Lossless convexification of nonconvex control bound and pointing constraints of the Soft Landing Optimal Control Problem. IEEE Transactions on Control Systems Technology, 21(6), 2104–2113. https://doi.org/10.1109/tcst.2012.2237346

g-fold's People

Contributors

wrg1t avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.