TransportSegment

A segment is a section of the trip where the user was using the same VehicleMode for the specified time range. When the mode is VehicleMode.VEHICLE, certain transport metrics can be accessed using the methods below.

TransportSegment API

getAverageSpeed()

public Double getAverageSpeed()

Returns the average speed travelled in m/s.

getDistance()

public VehicleMode getDistance()

Returns the cumulative distance covered in this segment in meters.

getEndTime()

public long getEndTime()

Returns the segment's end time, in UTC milliseconds since January 1, 1970.

getHardEvents()

Returns a list of HardEvent objects for all the times the device has experienced an unusual amount of force while in VehicleMode.VEHICLE. Otherwise returns null.

getPercentOfTimeSpeeding()

Returns the percent of time the user was speeding.

getStartTime()

Returns the segment's start time, in UTC milliseconds since January 1, 1970.

getTopSpeed()

Returns the top speed travelled in m/s.

getVehicleMode()

Returns the vehicle mode of this segment. See VehicleMode for more details.

Last updated