Post Processing
Checking the performance of the aircraft was critical for debugging and perfecting the control system. The system would generate around a megabyte of data every 15 secs therefore it was impossible to wirelessly transmit that amount of data over the XBee in real time without data loss. Addition of an SD-card to store the crucial flight data solved this problem. The data was stored in binary format to maximize the speed of data storage in to the card. This stored data (binary), after a few successive runs, is parsed using mlogger to extract string and DLM files. The string file is color coded and can be opened in HTML to debug. This can be very easily done in any HTML browser by looking for key words and color codes of the parsed data.
Figure: (Left) Parsed file showing color coded messages for the flight. (Right) Parsed file showing warnings.
MATLAB Analysis
The data from the intertial measurement unit, sonar, motor, aileron signals and GPS was parsed into a DLM file from the SD-card. Used MATLAB and it's plotting tools to generate various different plots from this data. This was very convinient as a single .txt file could contain all the information for the plots. This can be editted to add a new plot or file to be plotted as well as edit the configurations of the existing plots. The addition of a GUI and use an executable to plot the DLM files made plotting very convinient.
Figure: Config file for MATLAB plots
Figure: MATLAB plots showing GUI (right).