Doc Dingle's Website
Brent M. Dingle, Ph.D.

Auto Landing Rocket

This project required a couple subprojects. The intent was to demonstrate the viability of using HTML5, WebGL, and JavaScript to visualize complicated sets of data. The first step was to create a simulation to generate the data, allowing for changes in parameters to change the results of the outcome. The second step was to output this data to a file. The third step was to visualize this data as a set of graphs. The fourth, and final step was to visualize the data as an animation. The first 3 steps are done in simulation, the fourth is done separately as a viewer.

Total time was less than 3 months from ideation to completion of all the projects

The Simulation

Screen image of GNU Octave and Simulation code

The simulation was written in GNU Octave. It should also function in Matlab but has not been tested there.

The program simulates a simple rocket launch using several data structures and Eulerian integration. The desire is to create a rocket that can take-off and land - gently, underline its own control, i.e. the landing is automated with no human involvement.

The version of the program captured here will perform an initial burn for a specified time. Once the rocket begins to descend from that burn a landing controller will be activated. The landing controller will attempt to achieve a 0 velocity at a specified height. If all goes well the rocket will hover at that height until fuel is gone. This can simulate a landing if a height of near 0 is specified. The simulation will end when the rocket's height is zero. The velocity at that time should indicate a successful landing or not.

This zip file contains all the .m files necessary to run the simulation. It requires you to install GNU Octave. To run this: Open the launcher.m file using the Octave GUI. While looking at the file, in the editor tab, press F5 to "save and run." A few seconds might pass and then a window will pop up showing the graphs for Acceleration, Thrust, Velocity, Height, Fuel.

Running the simulation will also generate 5 text files:
LH_combo*, LH_fuel*, LH_height*, LH_meta*, LH_thrust*
The one of most interest is the LH_combo*.txt
You may want to rename it with the extension .csv.

Reference files:

The Viewer

Animation of rocket launch and landing

The viewer was created using HTML5, WebGL, and some JavaScript. This is an early example of the viewer. More advanced and fancier versions exist, but this is the easiest to build new versions. You will need to 'upload' the LH_combo*.csv (.txt) file from the simulation. Note while the button says 'upload' it really just loads the file into local memory and runs the animation. Everything stays on your computer - check the javascript to see.