TNTripInfo

@objcMembers
public class TNTripInfo : NSObject, Codable

Trip summary information. Use it after the trip ends.

  • Trip id.

    Declaration

    Swift

    public let tripId: String
  • Local date time of the start of the trip.

    Declaration

    Swift

    public let startTime: Date
  • Local date time of the end of the trip.

    Declaration

    Swift

    public let endTime: Date
  • Location(see {@link TNLocation}) of the start of the trip.

    Declaration

    Swift

    public let startLocation: TNLocation
  • The end location(see {@link TNLocation}) of trip.

    Declaration

    Swift

    public let endLocation: TNLocation
  • The duration of the trip to the present in seconds

    Declaration

    Swift

    public let duration: Int64
  • The distance of the trip in meters

    Declaration

    Swift

    public let distance: Double
  • The type of trip transportation mode marked by user or tagged by SDK

    Declaration

    Swift

    public let transportationMode: TNTransportationMode
  • The maximum speed of trip in meters per second

    Declaration

    Swift

    public let maxSpeed: Double
  • The trip moving duration (gps speed is larger than 0) in seconds

    Declaration

    Swift

    public let movingDuration: Int
  • The trip night duration in seconds (local time 10pm - 4am)

    Declaration

    Swift

    public let nightDuration: Int
  • The trip night distance in meters (local time 10pm - 4am)

    Declaration

    Swift

    public let nightDistance: Double
  • The trip night moving duration (gps speed is larger than 0) in seconds (local time 10pm - 4am)

    Declaration

    Swift

    public let nightMovingDuration: Int
  • Whether trip gps is truncated or not, ‘true’ means truncating

    Declaration

    Swift

    public let isAnonymized: Bool
  • Indicates whether the trip matches the selection criteria.

    Declaration

    Swift

    public let isMatch: Bool
  • Represents the status of the trip selection, which can be either valid or duplicate.

    Declaration

    Swift

    public let tripSelectionStatus: TripSelectionStatus
  • Whether the trip has been uploaded.

    Declaration

    Swift

    public let isUploaded: Bool
  • Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Undocumented

    Declaration

    Swift

    public init(tripId: String, startTime: Date, endTime: Date, startLocation: TNLocation, endLocation: TNLocation, duration: Int64, distance: Double, transportationMode: TNTransportationMode = .DRIVER, maxSpeed: Double = 0.0, movingDuration: Int = 0, nightDuration: Int = 0, nightDistance: Double = 0.0, nightMovingDuration: Int = 0, isAnonymized: Bool = false, isUploaded: Bool = false, isMatch: Bool = true, tripSelectionStatus: TripSelectionStatus = .selected)