FC Monogram Crest
Francesco Castaldi
PILLAR II • AUTOMOTIVEFOLIO ID: benzatracker-fuel-analytics

BenzaTracker · Multi-Interface Automotive Fuel & Cost Analytics

Comprehensive vehicle fuel consumption and Total Cost of Ownership (TCO) analytics system written in Python. Features a shared SQLite relational backend accessible simultaneously through an interactive Command-Line Interface, a native Desktop GUI, and a responsive Flask web dashboard, with automated executive PDF report generation via ReportLab.

PythonSQLiteFlaskReportLabAutomotiveData Analysis
BenzaTracker multi-interface Python architecture connecting SQLite fuel telemetry engine to Flask Web, Desktop GUI, CLI, and PDF reporting

Real-World Automotive Fuel Economy & Cost Telemetry

On-board vehicle trip computers routinely overestimate fuel efficiency by 5% to 9% compared to physical pump measurements. [BenzaTracker](https://github.com/FrancescoCastaldi/BenzaTracker) was engineered to maintain an exact full-to-full refueling ledger, computing real-world `km/L`, `L/100km`, rolling average fuel prices (`€/L`), and kilometric operating costs.

ARCHIVAL EXCERPT
[!TIP] > Designed around a decoupled Core Engine pattern: a single transactional SQLite data layer serves three distinct user interfaces (CLI, Desktop GUI, and Flask Web Server) plus a vectorized ReportLab PDF exporter.

Multi-Interface Architecture Matrix

Subsystem LayerTechnology StackPrimary Use CaseKey Output
Core Storage & AnalyticsPython 3, SQLite3, PandasACID refueling ledger & full-to-full delta mathRolling `km/L`, seasonal thermal variance, `€/km`
Web DashboardFlask, Jinja2, Chart.jsMobile & LAN browser logging at the fuel stationInteractive consumption & fuel price time-series
Desktop & CLI InterfacesTkinter GUI & Rich CLIRapid workstation inspection and batch CSV importInstant terminal summaries and anomaly flags
Executive ReportingReportLab & MatplotlibAnnual tax/accounting & fleet audit exportMulti-page vector PDF dossier with embedded charts

*Table 1: BenzaTracker Multi-Interface Architectural Layers*

# Python: Full-to-full refueling efficiency and kilometric cost calculation
def compute_refuel_metrics(prev_odometer_km: float, curr_odometer_km: float, liters: float, total_euro: float) -> dict:
    delta_km = curr_odometer_km - prev_odometer_km
    if delta_km <= 0 or liters <= 0:
        raise ValueError("Invalid odometer delta or fuel volume")
    km_per_liter = delta_km / liters
    liters_per_100km = (liters / delta_km) * 100.0
    cost_per_km = total_euro / delta_km
    return {
        "delta_km": round(delta_km, 1),
        "km_per_l": round(km_per_liter, 2),
        "l_100km": round(liters_per_100km, 2),
        "euro_per_km": round(cost_per_km, 4),
    }

Key Takeaways

- Thermal Efficiency Correlation: Tracks seasonal hybrid efficiency variations (winter cold-start enrichment vs summer optimal hybrid battery operation). - Automated PDF Dossiers: Generates publication-ready statistical reports with a single command.

LINKED COMPETENCIES & ARCHIVAL TRACEABILITY

Automotive Systems & Kinematics↗Data Science & Analytics↗
Examine Upstream Repository
Return to Selected Work