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
-
Declaration
Swift
public required init(from decoder: Decoder) throws
-
init(tripId:
startTime: endTime: startLocation: endLocation: duration: distance: transportationMode: maxSpeed: movingDuration: nightDuration: nightDistance: nightMovingDuration: ) 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)