Skip to content

Add vehicle-aware emissions and cost comparison for routes #304

Description

@Medformatik

Problem

Users cannot consistently compare the energy, emissions, and monetary cost of route alternatives or choose an environmentally preferable route. A trustworthy implementation needs vehicle context and sourced assumptions; generic distance multipliers are not sufficient for ranking routes.

Current state

  • Driving cards can show a generic estimate based on 170 g CO₂/km.
  • Entur transit results can expose provider CO₂ data and the UI can identify the lowest result.
  • The EV planner models consumption and supports presets plus one locally stored custom EV profile.
  • There is no unified cost/impact contract, multi-vehicle garage, toll/fuel/electricity model, or eco-aware routing preference.

Proposed solution

First build a provenance-aware route impact/cost comparison layer. Use a selected vehicle plus route attributes to estimate energy, operational emissions, tolls, and fuel/electricity cost. Only expose an eco/cost routing preference after evaluation shows alternative ranking is materially reliable.

Acceptance criteria

  • A shared route-impact contract distinguishes provider-reported, calculated, defaulted, and unknown values.
  • Vehicle inputs cover relevant EV, combustion, hybrid, motorcycle, and bicycle parameters without requiring excessive setup.
  • Emission/energy factors are versioned, region-aware where necessary, cited, and display their assumptions.
  • Fuel/electricity prices and currency have an explicit source/timestamp or user override.
  • Tolls, fares, parking, and other components remain separately identifiable rather than hidden in one number.
  • Calculations account for distance, speed/elevation when available, vehicle efficiency, occupancy, and uncertainty.
  • Comparisons never equate operational emissions with full lifecycle emissions unless lifecycle data is explicitly modeled.
  • Unknown inputs degrade to ranges or “not available,” not false precision.
  • A benchmark compares calculated results with provider/known-route references and defines when ranking is allowed.
  • Route cards explain why an alternative is cheaper/lower impact and allow users to change assumptions.
  • Caching, localization, units, currency conversion, and privacy are tested.
  • Eco/cost preference remains behind a quality gate and always offers the normal routing result.

Alternatives considered

A universal grams-per-kilometre number is simple but can mis-rank EVs, hybrids, traffic conditions, and transit. Delegating everything to providers produces inconsistent or missing values.

Area

Routing, EV planning, personal vehicles, route comparison UI.

Dependencies

Coordinate the user-facing vehicle model with the personal-vehicles issue (#305).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageNeeds initial review and categorization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions