Parser for the Electronics International CGR single–flight CSV export from their
CGR-30 products. The project mirrors the high–level APIs provided by
libjpiedm so that existing tooling can be adapted with minimal changes.
- Streaming callback interface (
FlightFile::processFile) compatible with the metadata / header / record flow fromlibjpiedm. - Iterator API (
FlightFile::flights) that exposesFlightRangeandFlightViewfor range-based loops. - Lightweight
detectFlights()helper (returns a single flight for EI files). FlightMetricsRecordexposes raw string metrics plus helpers for numeric conversion.- Tested against the real EI CSV payload supplied in this repository.
cd /home/hoche/src/jpi/libeicgr
cmake -S . -B build
cmake --build build -jcmake --build build -t libeicgr_tests
ctest --test-dir buildThe tests look for Flt0175_20250713F.csv in the parent directory. If the file
is missing, the integration test is skipped.
#include <libeicgr/FlightFile.hpp>
ei_cgr::FlightFile parser;
parser.setMetadataCompletionCb([](auto metadata) {
std::cout << "Tail number: " << metadata->aircraftId << "\n";
});
std::ifstream csv("Flt0175_20250713F.csv");
parser.processFile(csv);
csv.clear();
csv.seekg(0);
for (const auto &flight : parser.flights(csv)) {
for (const auto &record : flight) {
if (auto gph = record->valueAsDouble("FLOW;GPH")) {
// ...
}
}
}See include/libeicgr/FlightFile.hpp for the full API surface.