Skip to content
/ libeicgr Public

C++ library for parsing log files fromEI's CGR-30 products.

Notifications You must be signed in to change notification settings

hoche/libeicgr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libeicgr

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.

Features

  • Streaming callback interface (FlightFile::processFile) compatible with the metadata / header / record flow from libjpiedm.
  • Iterator API (FlightFile::flights) that exposes FlightRange and FlightView for range-based loops.
  • Lightweight detectFlights() helper (returns a single flight for EI files).
  • FlightMetricsRecord exposes raw string metrics plus helpers for numeric conversion.
  • Tested against the real EI CSV payload supplied in this repository.

Building

cd /home/hoche/src/jpi/libeicgr
cmake -S . -B build
cmake --build build -j

Running the tests

cmake --build build -t libeicgr_tests
ctest --test-dir build

The tests look for Flt0175_20250713F.csv in the parent directory. If the file is missing, the integration test is skipped.

Using the library

#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.

About

C++ library for parsing log files fromEI's CGR-30 products.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published