Rocket Orientation GUI
Summer After Freshman Year, 2017
Summer After Freshman Year, 2017
I put together a GUI using Processing that takes in data from an Arduino over a USB serial port. It then takes this data and uses it to find the rocket's orientation in respect to gravity and magnetic north. The goal is to eventually be able to recreate a rocket's flight path and map it out using computer software. We plan to add a GPS and barometer to do so. For now, I just have a simple GUI that tracks the rockets orientation.
My brother and one of our neighbors likes to build rockets and asked if I could help him with the avionics. This is a smaller part of a bigger project that is still ongoing. We want to be able to track orientation and position, so I started testing orientation
Software on GitHub:
https://github.com/igneousstar/rocketOrientation
Hardware:
I used the SparkFun LSM9DS1, but I would not recommend it. You have to invert an axis or two to get it to work properly, but this is an easy fix in the software. However, it has a few performance issues. If you check the datasheet, you will notice that there is a large amount of error on the magnetometer. It has little trouble finding magnetic north when the rocket is lying flat, but when it changes orientation the accuracy for heading goes out the window. It is only accurate within plus or minus 0.14 gause, which is huge when trying to measure the Earth's magnetic field. The sensor works as a proof of concept, but I would recommend a different one for actual use.
Using the GUI
First, you need to upload the .ino in the git folder onto the Arduino. Download Processing and then run the processing code. You need to select a com port. After the arduino is connected, you have to shake the sensor around to calibrate the magnetometer. Once it is calibrated, you can then track the orientation as you spin the sensor around.
Selecting a com port
Keeping track of orientation. The red line points to magnetic north
and the black line points in the direction of gravity.