Table of Contents

Class Trip

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

This is a vehicles trip and a summary of the driving activity during that trip. To get more information about stops during a trip please see ExceptionEvent. A complete "trip" is defined as starting at the time in which the vehicle starts and begins being driven. The trip continues after the vehicle has been stopped and ends at the time the vehicle restarts and begins being driven again; which then starts the next trip.

public class Trip : Entity, IEntity, IComparable, IIdentifiable, IDeviceProvider, IDriverProvider, IDateRange, IDateTimeProvider, IDriverChange, IOdometerProvider, IEngineHoursProvider, ITripDistance, IDeletedDateTimeProvider
Inheritance
Trip
Implements
Inherited Members

Constructors

Trip()

Initializes a new instance of the Trip class.

public Trip()

Trip(Id?, float?, TimeSpan?, int?, int?, int?, bool?, bool?, bool?, Device?, Driver?, DateTime?, DateTime?, float?, TimeSpan?, TimeSpan?, float?, TimeSpan?, TimeSpan?, TimeSpan?, TimeSpan?, TimeSpan?, ISimpleCoordinate?, double?, double?, DateTime?)

Initializes a new instance of the Trip class.

public Trip(Id? id, float? maximumSpeed, TimeSpan? idlingTime, int? speedRange1, int? speedRange2, int? speedRange3, bool? afterHoursStart, bool? afterHoursEnd, bool? isSeatBeltOff, Device? device, Driver? driver, DateTime? start, DateTime? stop, float? distance, TimeSpan? drivingDuration, TimeSpan? stopDuration, float? workDistance, TimeSpan? workDrivingDuration, TimeSpan? workStopDuration, TimeSpan? speedRange1Duration, TimeSpan? speedRange2Duration, TimeSpan? speedRange3Duration, ISimpleCoordinate? stopPoint, double? odometer, double? engineHours, DateTime? deleteDateTime = null)

Parameters

id Id

The identifier.

maximumSpeed float?

The maximum speed.

idlingTime TimeSpan?

The idling time.

speedRange1 int?

The speed range1.

speedRange2 int?

The speed range2.

speedRange3 int?

The speed range3.

afterHoursStart bool?

The after hours start.

afterHoursEnd bool?

The after hours end.

isSeatBeltOff bool?

The is seat belt off.

device Device

The device.

driver Driver

The driver.

start DateTime?

The start.

stop DateTime?

The stop.

distance float?

The distance.

drivingDuration TimeSpan?

Duration of the driving.

stopDuration TimeSpan?

Duration of the stop.

workDistance float?

The work distance.

workDrivingDuration TimeSpan?

Duration of the work driving.

workStopDuration TimeSpan?

Duration of the work stop.

speedRange1Duration TimeSpan?

Duration of the speed range1.

speedRange2Duration TimeSpan?

Duration of the speed range2.

speedRange3Duration TimeSpan?

Duration of the speed range3.

stopPoint ISimpleCoordinate

The stop point.

odometer double?

The odometer in meters.

engineHours double?

The engine hours.

deleteDateTime DateTime?

The deleteDateTime

Properties

AfterHoursDistance

Gets or sets the distance the vehicle was driven after work hours (in km).

public float? AfterHoursDistance { get; set; }

Property Value

float?

float

AfterHoursDrivingDuration

Gets or sets the duration the vehicle was driven after work hours.

public TimeSpan? AfterHoursDrivingDuration { get; set; }

Property Value

TimeSpan?

TimeSpan

AfterHoursEnd

Gets or sets whether the trip ends after hours.

public bool? AfterHoursEnd { get; set; }

Property Value

bool?

bool

AfterHoursStart

Gets or sets whether the trip starts after hours.

public bool? AfterHoursStart { get; set; }

Property Value

bool?

bool

AfterHoursStopDuration

Gets or sets the duration the vehicle was stopped after work hours.

public TimeSpan? AfterHoursStopDuration { get; set; }

Property Value

TimeSpan?

TimeSpan

AverageSpeed

Gets or sets the average speed in km/h. This only includes the average speed while driving.

public float? AverageSpeed { get; set; }

Property Value

float?

float

DateTime

Gets the trip date time. false

public DateTime? DateTime { get; }

Property Value

DateTime?

Trip DateTime

DeletedDateTime

An interface for an entity that can be marked as deleted.

public DateTime? DeletedDateTime { get; set; }

Property Value

DateTime?

Device

Gets or sets the Device associated with the trip.

public Device? Device { get; set; }

Property Value

Device

Device

Distance

Gets or sets the distance the vehicle was driven during this trip (in km).

public float? Distance { get; set; }

Property Value

float?

float

Driver

Gets or sets the Driver for the trip.

public Driver? Driver { get; set; }

Property Value

Driver

Driver

DrivingDuration

Gets or sets the duration between the start and stop of the trip.

public TimeSpan? DrivingDuration { get; set; }

Property Value

TimeSpan?

TimeSpan

EngineHours

Gets or sets a value indicating the engine hours as of the end of the trip.

public double? EngineHours { get; set; }

Property Value

double?

double

From

Gets the "From" Date.

public DateTime? From { get; }

Property Value

DateTime?

Nullable<T>

IdlingDuration

Gets or sets total end of trip idling (idling is defined as speed is 0 and ignition on). It is calculated from the beginning of this trip to beginning of next trip.

public TimeSpan? IdlingDuration { get; set; }

Property Value

TimeSpan?

TimeSpan

IsSeatBeltOff

Gets or sets a value indicating if this trip have a seat belt off incident.

[Obsolete("Legacy property, seatbelt incidents should be derived from rules and exceptions.")]
public bool? IsSeatBeltOff { get; set; }

Property Value

bool?

bool

MaximumSpeed

Gets or sets the maximum speed of the vehicle during this trip (in km/h).

public float? MaximumSpeed { get; set; }

Property Value

float?

float

NextTripStart

Gets or sets the start date of the next trip, as well as the end of the current trip session.

public DateTime? NextTripStart { get; set; }

Property Value

DateTime?

DateTime

Odometer

Gets or sets a value indicating the vehicle odometer value as of the end of the trip (in meters).

public double? Odometer { get; set; }

Property Value

double?

double

SpeedRange1

Gets or sets the number of incidents where the vehicle reached the first range of speeding triggers.

public int? SpeedRange1 { get; set; }

Property Value

int?

int

SpeedRange1Duration

Gets or sets the duration where the vehicle drove in the first range of speeding triggers.

public TimeSpan? SpeedRange1Duration { get; set; }

Property Value

TimeSpan?

TimeSpan

SpeedRange2

Gets or sets the number of incidents where the vehicle reached the second range of speeding triggers.

public int? SpeedRange2 { get; set; }

Property Value

int?

int

SpeedRange2Duration

Gets or sets the duration where the vehicle drove in the second range of speeding triggers.

public TimeSpan? SpeedRange2Duration { get; set; }

Property Value

TimeSpan?

TimeSpan

SpeedRange3

Gets or sets the number of incidents where the vehicle reached the third range of speeding triggers.

public int? SpeedRange3 { get; set; }

Property Value

int?

int

SpeedRange3Duration

Gets or sets the duration where the vehicle drove in the third range of speeding triggers.

public TimeSpan? SpeedRange3Duration { get; set; }

Property Value

TimeSpan?

TimeSpan

Start

Gets or sets the date and time that the drive session started. This also signals the start of the trip.

public DateTime? Start { get; set; }

Property Value

DateTime?

DateTime

Stop

Gets or sets the date and time the trip drive session ended, and the vehicle stopped moving. Note that this doesn't correspond to end of the trip session.

public DateTime? Stop { get; set; }

Property Value

DateTime?

DateTime

StopDuration

Gets or sets the duration the vehicle was stopped at the end of the trip. This also includes any idling done at the end of a trip.

public TimeSpan? StopDuration { get; set; }

Property Value

TimeSpan?

TimeSpan

StopPoint

Gets or sets the Coordinate associated with this Trip's stop.

public ISimpleCoordinate? StopPoint { get; set; }

Property Value

ISimpleCoordinate

ISimpleCoordinate

To

Gets the "To" Date.

public DateTime? To { get; }

Property Value

DateTime?

Nullable<T>

WorkDistance

Gets or sets the distance the vehicle was driven during work hours.

public float? WorkDistance { get; set; }

Property Value

float?

float

WorkDrivingDuration

Gets or sets the duration the vehicle was driven during work hours.

public TimeSpan? WorkDrivingDuration { get; set; }

Property Value

TimeSpan?

TimeSpan

WorkStopDuration

Gets or sets the duration the vehicle was stopped during work hours.

public TimeSpan? WorkStopDuration { get; set; }

Property Value

TimeSpan?

TimeSpan

Methods

Clone()

Creates a new object that is a copy of the current instance.

public override IEntity Clone()

Returns

IEntity

A new object that is a copy of this instance.

GetChangeDateTime()

Gets the date.

public DateTime? GetChangeDateTime()

Returns

DateTime?

DateTime

GetDriverId()

The Driver Id.

public Id? GetDriverId()

Returns

Id

Id.

PopulateAfterHoursDistance()

Populates the AfterHoursDistance property.

public void PopulateAfterHoursDistance()

PopulateAfterHoursDrivingDuration()

Populates the AfterHoursDrivingDuration property.

public void PopulateAfterHoursDrivingDuration()

PopulateAfterHoursStopDuration()

Populates the AfterHoursStopDuration property.

public void PopulateAfterHoursStopDuration()

PopulateAllCalculatedProperties()

Attempts to populate all of the calculated properties.

public void PopulateAllCalculatedProperties()

PopulateAverageSpeed()

Populates the AverageSpeed property.

public void PopulateAverageSpeed()

PopulateNextTripStart()

Populates the NextTripStart property.

public void PopulateNextTripStart()

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.