A C++ telemetry parser that processes SpaceX launch data to extract the horizontal and vertical velocity. DSP techniques are used to filter the data.
This project is very similar to my other project,
caojohnny/liftoff
and even uses the same data. However, this project takes a
slightly different approach and is not as comprehensive.
Rather than simulating physical dynamics, telem-filter
parses data and attempts to derive the horizontal and
vertical velocity components verbatim from the data rather
than using curve fitting.
The data is processed in a 3 step manner: in the first step, the altitude telemetry is interpolated and the initial horizontal and vertical velocities are extracted by "pitching" over when the velocity is greater than that needed to reach the current altitude. In the second step, this data is then passed through a Parks-McClellan low-pass filter with a cutoff-frequency of 1 Hz. In the final step, the filtered velocities are then adjusted to account for velocity error by absorbing the error into the horizontal velocity.
While this produces a surprisingly good result, this is
inferior to curve fitting because anything beyond the
derivative of position is not accounted for. It is clear
from the velocity plots that the acceleration and jerk will
not be realistic (will be much higher than in the real-
world). However, with further processing and curve-fitting
used in caojohnny/liftoff
, this data can be salvaged
into very good data.
This is a toy. This is not meant to be functional code. It exists because I thought it would be fun demo code to show that some idea I had somewhat works. It is not meant to be deployed to production.
This project requires MathGL development headers to be installed on your system with PThreads and FLTK enabled.
git clone https://github.com/caojohnny/telem-plotter
cd telem-plotter
mkdir build && cd build
cmake .. && make
cd ..
./build/telem_filter
I have included along with the C++ code some MATLAB code that I used to prototype the low-pass filter. This is not used in the C++ program, but is here for documentation purposes.
This project is extensively documented. The HTML version of the documentation comments can be generated by running Doxygen in the root folder of this project:
doxygen
This produces the output in the doc
directory. You can
open the doc/html/index.html
file in your preferred web
browser to view it.
Built with CLion
Utilizes: