|
QGroundControl
Ground Control Station for MAVLink Drones
|
Unified log file parser for both DataFlash (.bin/.log) and PX4 ULog (.ulg) files. More...
#include <LogFileParser.h>
Inheritance diagram for LogFileParser:
Collaboration diagram for LogFileParser:Signals | |
| void | parseCompleteChanged () |
| void | parseErrorChanged () |
| void | availableFieldsChanged () |
| void | parametersChanged () |
| void | eventsChanged () |
| void | messagesChanged () |
| void | plottableFieldsChanged () |
| void | modeSegmentsChanged () |
| void | modeNamesChanged () |
| void | dropoutsChanged () |
| void | detectedVehicleTypeChanged () |
| void | timeRangeChanged () |
| void | sampleCountChanged () |
| void | startTimeChanged () |
| void | parsingChanged () |
| void | parseProgressChanged () |
| void | parseFileFinished (const QString &filePath, bool ok, const QString &errorMessage) |
Public Member Functions | |
| LogFileParser (QObject *parent=nullptr) | |
| ~LogFileParser () | |
| bool | parseComplete () const |
| QString | parseError () const |
| QStringList | availableFields () const |
| QVariantList | parameters () const |
| QVariantList | events () const |
| QVariantList | messages () const |
| QStringList | plottableFields () const |
| QVariantList | modeSegments () const |
| QStringList | modeNames () const |
| QVariantList | dropouts () const |
| QString | detectedVehicleType () const |
| double | minTimestamp () const |
| double | maxTimestamp () const |
| int | sampleCount () const |
| QDateTime | startTime () const |
| bool | parsing () const |
| float | parseProgress () const |
| Q_INVOKABLE bool | parseFile (const QString &filePath) |
| Q_INVOKABLE void | startParsingAsync (const QString &filePath) |
| Q_INVOKABLE void | clear () |
| Q_INVOKABLE QVariantList | fieldSamples (const QString &fieldName) const |
| Q_INVOKABLE QVariantList | fieldSamplesFiltered (const QString &fieldName, double minX, double maxX, int pixelWidth) const |
| Q_INVOKABLE QVariantMap | fieldMinMax (const QString &fieldName) const |
| Q_INVOKABLE double | fieldValueAt (const QString &fieldName, double timestampSeconds) const |
| Q_INVOKABLE QString | modeAt (double timestampSeconds) const |
| Q_INVOKABLE QString | modeColor (const QString &modeName) const |
| Q_INVOKABLE QVariantList | eventsNear (double timestampSeconds, double thresholdSeconds) const |
| Q_INVOKABLE QVariantList | gpsPath () const |
| Q_INVOKABLE QString | gpsAltitudeFieldName () const |
| Q_INVOKABLE QVariantMap | gpsCoordAt (double timestampSeconds) const |
Unified log file parser for both DataFlash (.bin/.log) and PX4 ULog (.ulg) files.
Dispatches by file extension, verifies the header magic bytes match the expected format, then parses the file into a canonical set of properties that the log viewer UI consumes identically for both formats:
Definition at line 32 of file LogFileParser.h.
|
explicit |
Definition at line 51 of file LogFileParser.cc.
| LogFileParser::~LogFileParser | ( | ) |
Definition at line 57 of file LogFileParser.cc.
|
inline |
Definition at line 61 of file LogFileParser.h.
|
signal |
Referenced by clear().
| void LogFileParser::clear | ( | ) |
Definition at line 192 of file LogFileParser.cc.
References availableFieldsChanged(), detectedVehicleTypeChanged(), dropoutsChanged(), eventsChanged(), messagesChanged(), modeNamesChanged(), modeSegmentsChanged(), parametersChanged(), parseCompleteChanged(), parseErrorChanged(), parseProgressChanged(), parsingChanged(), plottableFieldsChanged(), sampleCountChanged(), startTimeChanged(), and timeRangeChanged().
Referenced by parseFile(), and startParsingAsync().
|
inline |
Definition at line 69 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 68 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 63 of file LogFileParser.h.
|
signal |
Referenced by clear().
| QVariantList LogFileParser::eventsNear | ( | double | timestampSeconds, |
| double | thresholdSeconds | ||
| ) | const |
Definition at line 386 of file LogFileParser.cc.
| QVariantMap LogFileParser::fieldMinMax | ( | const QString & | fieldName | ) | const |
Definition at line 243 of file LogFileParser.cc.
| QVariantList LogFileParser::fieldSamples | ( | const QString & | fieldName | ) | const |
Definition at line 232 of file LogFileParser.cc.
| QVariantList LogFileParser::fieldSamplesFiltered | ( | const QString & | fieldName, |
| double | minX, | ||
| double | maxX, | ||
| int | pixelWidth | ||
| ) | const |
Definition at line 257 of file LogFileParser.cc.
| double LogFileParser::fieldValueAt | ( | const QString & | fieldName, |
| double | timestampSeconds | ||
| ) | const |
Definition at line 331 of file LogFileParser.cc.
| QString LogFileParser::gpsAltitudeFieldName | ( | ) | const |
Returns the field name used for altitude data paired with the GPS path source, e.g. "vehicle_global_position.alt". Returns empty string if no GPS data was found. Must be called after gpsPath() has been evaluated.
Definition at line 411 of file LogFileParser.cc.
| QVariantMap LogFileParser::gpsCoordAt | ( | double | timestampSeconds | ) | const |
Returns {latitude, longitude} for the GPS position nearest to timestampSeconds. Returns an empty map if GPS data is not available.
Definition at line 416 of file LogFileParser.cc.
| QVariantList LogFileParser::gpsPath | ( | ) | const |
Returns a list of GPS path points as QVariantMap entries with latitude and longitude keys (compatible with QML MapPolyline.path via implicit coordinate coercion). Tries known field name patterns for both PX4 ULog and APM DataFlash. Returns an empty list if no GPS data is found.
Definition at line 461 of file LogFileParser.cc.
|
inline |
Definition at line 71 of file LogFileParser.h.
|
inline |
Definition at line 64 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 70 of file LogFileParser.h.
| QString LogFileParser::modeAt | ( | double | timestampSeconds | ) | const |
Definition at line 373 of file LogFileParser.cc.
| QString LogFileParser::modeColor | ( | const QString & | modeName | ) | const |
Definition at line 349 of file LogFileParser.cc.
|
inline |
Definition at line 67 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 66 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 62 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 59 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 60 of file LogFileParser.h.
|
signal |
Referenced by clear().
| bool LogFileParser::parseFile | ( | const QString & | filePath | ) |
Definition at line 62 of file LogFileParser.cc.
References clear(), LogParseResult::errorMessage, and LogParseResult::ok.
|
signal |
Referenced by startParsingAsync().
|
inline |
Definition at line 75 of file LogFileParser.h.
|
signal |
Referenced by clear(), and startParsingAsync().
|
inline |
Definition at line 74 of file LogFileParser.h.
|
signal |
Referenced by clear(), and startParsingAsync().
|
inline |
Definition at line 65 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
inline |
Definition at line 72 of file LogFileParser.h.
|
signal |
Referenced by clear().
| void LogFileParser::startParsingAsync | ( | const QString & | filePath | ) |
Definition at line 78 of file LogFileParser.cc.
References clear(), LogParseResult::errorMessage, LogParseResult::ok, parseFileFinished(), parseProgressChanged(), and parsingChanged().
|
inline |
Definition at line 73 of file LogFileParser.h.
|
signal |
Referenced by clear().
|
signal |
Referenced by clear().