An orbit simulator for the solar system in real scale with Newtonian dynamics, which can be manipulated like amazing game Kerbal Space Program.
Try it now on your browser!
https://msakuta.github.io/WebGL-Orbiter/index.html
The simulation state is automatically saved to your browser's localStorage. When you exit the application and load it again, you will continue from where you left off. If you want to reset state, choose "Earth orbit" from the scenarios.
This icon is shown on the periapsis of current orbit.
This icon is shown on the apoapsis of current orbit.
On the bottom of the screen is the navigation ball and throttle bar.
The navigation ball on the right indicates the orientation of the vehicle in relation to currently orbiting body.
Pointing mouse cursor or holding touch on the navigation ball shows a set of arrows indicating rotation directions.
Pressing keyboard keys corresponding to the rotation direction or pressing the arrows by the mouse or finger on touch screen will rotate the rocket in the designated direction. Note that the rotation has inertia; the longer you hold pressing, the faster the spin will be and takes longer time to stop.
These icons on the navigation ball indicates which direction the rocket is going, in relation to the vehicle's orientation.
The left icon is called prograde, meaning the direction the vehicle is going. Accelerating in this direction will put more energy on the orbit and push it wider.
The right icon is retrograde, meaning the direction opposite to the vehicle is going. Accelerating in this direction will reduce the energy from the orbit and make it narrower.
This icon indicates horizontal line in the vehicle's orientation. The navigation ball is oriented in a way that the watermark is fixed.
It is common to see this kind of instrument in actual aerospace vehicle. I guess this is useful for aerial vehicles, but not so much in space.
On top left corner of the screen is a widget for controlling the speed of the simulation, from real-time to a million times faster than reality.
Clicking on one of the green triangles sets the speed to that scale. Leftmost is slowest and it gets faster as you go right. Each triangle means 10 times faster than the previous one. You can also change the speed by '+' and '-' keys.
Note that you cannot turn or accelerate the vehicle unless you're in real-time scale.
You'll need it to travel distances between planets.
On top right corner of the screen is a little icon.
Clicking it will show a list of predefined scenarios.
Clicking one of these items will teleport the rocket to specific location in the solar system.
On the 2nd from right top corner is an icon for saving simulation state.
Clicking it will show a list of saved states.
Saved states are like scenarios but you can create whenever and as many as you would like to.
You can either type a new save name or overwrite existing one by clicking on its name. You can delete a saved state by clicking on the trash can icon .
On the 3rd from right top corner is an icon for loading simulation state.
Clicking on it will show a list of saved states.
You can click on one of the items to load it. You can delete a saved state by clicking on the trash can icon .
Just below the Speed control is a little icon for toggling orbital elements display.
If you click on it, a little table shows up like below.
These are parameters that uniquely define the orbit, given an orbital plane as a reference frame. In this application, reference frame is ecliptic plane. If you're not familiar with orbital mechanics, Wikipedia is a good place to start learning.
Below the Orbital Elements control is Celestial Bodies button.
If you click on it, a little table shows up like below.
Currently focused celestial body is highlighted. Clicking on a name of a body will make the focus move to that body.
On the 4th from right top corner is an icon for statistics.
Clicking on it will toggle the display of statistics of the whole mission.
Mission time
Quite obvious, but it's the (in-simulation) elapsed time since the simulation has started.
Delta-V
The total Delta-V exerted by burning the rocket engine. Basically all rockets have limited Delta-V, which is determined by amount of fuel and weight of the rocket, among other factors. However, in this simulation, our rocket has infinite Delta-V.
Ignition Count
If you throttle up from zero, it's counted as an ignition. The number of ignition matters because re-igniting liquid fuel engine in zero-g is not a trivial work.
Just below the Statistics icon is an icon for toggling setting display.
Clicking on it will toggle the display of a panel for settings. Characters in parentheses indicate shortcut keys.
Use npm to build or debug the project.
npm i
npm run start
http://localhost:8080
with a browsermsjsdiag.debugger-for-chrome
) to debug the appnpm run build
to make a static website in dist/
subdirectory.RungeKuttaMethod.ipynb
A jupyter notebook for formulation of methods used for simulation steps.Euler method and Runge-Kutta method are presented.
This project uses: