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 IDtype
(atom) — the type of trip:short_term
fortrips_short_term/2
calls:long_term
fortrips_long_term/2
calls
timestamp
(DateTime
) — the UTC timestamp the trip ended atminutes
(integer) — the duration of the trip, in minutesstart_mileage
(Distance
) — the total vehicle miles travelled prior to this tripend_mileage
(Distance
) — the total vehicle miles travelled at the end of this tripdistance
(Distance
) — the distance travelled during this tripaverage_speed
(Speed
) — the average speed during the trip- This should generally be similar to
distance / minutes
, although there appears to be some rounding.
- This should generally be similar to
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 tripaverage_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() }