This app calculates the center of gravity of a given rocket, and eventually, probably, a portion of that rocket.
You can use this to optimally place RCS engines.
That's...pretty much it.
A Python webapp using the Bottle framework.
Bottle is a very basic framework with minimal requirements. To get
up and running, you just need Python installed, with the
package installed. For this app, you will also need
order to handle getting the ship files. Everything else should be
included in a standard Python install.
To set these up, just install via your favorite Python package installer, such as:
pip install bottle pip install requests
And then to get started, just use the included debug server:
The server should start up, and you should be able to access the app on your computer at http://localhost:54321
A quick overview of the structure of things:
the web app that handles the requests and the actual app
simplerockets.py contains all the logic for
parsing and handling the ship files and their data. It in turn
uses the included
polyfunc.py in order to handle some polygon
evaluate.js handles the interaction and UI setup,
rocket.js has the logic specific to the rocket logic.
It also uses
transform-tracker.js as a wrapper around the
Canvas Transform to keep track of transforms in a cross-platform
The CSS uses the Sass pre-processor. If you're working with the CSS, you should use the Sass processor of your choice.
I used Bottle becuase I try to use a new framework whenever I make a little app like this, I'm currently on a Python kick, and have heard good things. It was this or Flask, and I liked Bottle's docs better. Flask will get its day I'm sure.
Suggestions and especially pull requests are welcome!