A PX4 flight log (ulog) visual analysis tool, inspired by FlightPlot.
pyFlightAnalysis is written in Python, and depends on pyqtgraph (which is based on PyQt), pyOpenGL, pyulog, and a number of other widely used scientific packages including numpy, matplotlib, etc.
For other log analysis tools see dev.px4.io
pyFlightAnalysis only supports Python 3.x. To use pyFlightAnalysis, you can either clone the repository and run the tool directly from source, or you can install pyFlightAnalysis (from source or using the PyPi Python package manager) and then run it. In either case you will first need to install PyQt (as shown below).
PyQt5 can be installed directly from pip:
pip install PyQt5
After installing PyQt, enter the following commands to install other dependencies:
pip install pyqtgraph==0.10.0
And:
pip install pyOpenGL pyulog matplotlib numpy
Once you have installed these packages you can clone the source files:
# In folder where you want put the source code
git clone https://github.com/Marxlp/pyFlightAnalysis.git
Then run the analysis.py source files:
cd pyFlightAnalysis/src python analysis.py
You can install pyFlightAnalysis from either source or PyPi (after first installing PyQt as described above):
# Install from pypi
pip install pyFlightAnalysis
Or
# Install from source
git clone https://github.com/Marxlp/pyFlightAnalysis.git
python setup.py install
After installing pyFlightAnalysis you can run it as shown:
analysis
- Dynamic filter for displaying data
- 3D visulization for attitude and position of drone
- Easily replay with pyqtgraph's ROI (Region Of Interest)
Brief usage tutorial of pyFlightAnalysis
- Open log file (currently only support .ulg format) by clicked .
- Choose data by using filter and double click to add it.
- Change color or toggle visibility .
- Scroll the middle wheel of mouse to zoom, press down and drag to move the curve.
- Click to show 3D viewer ( currently may not be robust).
- Press to play ( you'd better open the 3D viewer to show the animation).
If you have installed PyQt4 and pyqtgraph but get the error below:
ImportError: cannot import name QtOpenGL
try
>>> sudo apt-get install python-qt4-gl