Giter Site home page Giter Site logo

lunarlander's Introduction

LanderSim

This is a physics-based simulation of a thrust vectored lunar lander with tons of sliders and stuff to play around with.

To run, clone this repo and run: python landerSim.py

Alt text

What & Why?

Inspired by recent, rather tippy lunar landers, you can play around with different lander geometry, gravity, mass, inertia, etc. in this simplified simulation. Initial conditions for the sim can be set with sliders, and the lander can be steered either by a simple joystick, or individual sliders to directly control thrust and thrust vector direction.

Alt text

The simulation is a simple 3DOF rigid-body dynamics sim while flying around. The sim is driven by real, live equations of motion and is not simply an animation that was tweaked to "feel" right. Once ground contact has been made, the sim assumes a no bounce/slip condition on the landing legs, and linear momentum at touchdown is converted into angular momentum. This inelastic collision assumption is a decent approximation for relatively low-speed touchdowns, but a pretty bad one for high speeds where the lander leg collision with the ground would realistically be more elastic (bouncy).

It is very counter-intuitive, but lower gravity leads to comparatively more "tippy" landers, since mass/momentum at a higher or lower gravity is the same, but the restoring force of gravity when tipping is lower. At touchdown, any linear momentum you have will basically be transferred into angular momentum, so you begin rotating, or tipping. With stronger gravity, the restoring force at touchdown to prevent tipping over is much stronger, wheras lower gravity has a harder time countering all that new angular momentum before it is past the point of no-return. If this hurts your brain, try turning on the CG/force visualization option and playing around with different gravities and touchdown velocities.

Have fun!

lunarlander's People

Contributors

ryanauscoll 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.