View Source PorscheConnEx.Struct.Trip (porsche_conn_ex v0.1.0)

Structure containing trip data — distance, speed, efficiency, etc.

This is the structure returned by PorscheConnEx.Client.trips_short_term/2 and PorscheConnEx.Client.trips_long_term/2.

Fields

  • id (integer) — the internal trip ID
  • type (atom) — the type of trip
    • :short_term for trips_short_term/2 calls
    • :long_term for trips_long_term/2 calls
  • timestamp (DateTime) — the UTC timestamp the trip ended at
  • minutes (integer) — the duration of the trip, in minutes
  • start_mileage (Distance) — the total vehicle miles travelled prior to this trip
  • end_mileage (Distance) — the total vehicle miles travelled at the end of this trip
  • distance (Distance) — the distance travelled during this trip
  • average_speed (Speed) — the average speed during the trip
    • This should generally be similar to distance / minutes, although there appears to be some rounding.
  • zero_emission_distance (Distance) — distanc travelled using a zero-emission energy source (e.g. battery)
  • average_fuel_consumption (Consumption.Fuel) — average fuel efficiency during the trip
  • average_energy_consumption (Consumption.Energy) — average energy efficiency during the trip

Summary

Types

@type t() :: %PorscheConnEx.Struct.Trip{
  average_energy_consumption: PorscheConnEx.Struct.Unit.Consumption.Energy.t(),
  average_fuel_consumption: PorscheConnEx.Struct.Unit.Consumption.Fuel.t(),
  average_speed: PorscheConnEx.Struct.Unit.Speed.t(),
  distance: PorscheConnEx.Struct.Unit.Distance.t(),
  end_mileage: PorscheConnEx.Struct.Unit.Distance.t(),
  id: integer(),
  minutes: integer(),
  start_mileage: PorscheConnEx.Struct.Unit.Distance.t(),
  timestamp: DateTime.t(),
  type: atom(),
  zero_emission_distance: PorscheConnEx.Struct.Unit.Distance.t()
}