DynamicSpeedInfo

public struct DynamicSpeedInfo : Hashable

Provides estimated speed information.

  • The speed in meters per second without taking traffic into consideration.

    Declaration

    Swift

    public var baseSpeedInMetersPerSecond: Double
  • The speed in meters per second considering traffic.

    Declaration

    Swift

    public var trafficSpeedInMetersPerSecond: Double
  • The time it takes to make a turn, represented in seconds.

    Declaration

    Swift

    public var turnTimeInSeconds: Int32
  • Creates a new instance.

    Declaration

    Swift

    public init(baseSpeedInMetersPerSecond: Double, trafficSpeedInMetersPerSecond: Double, turnTimeInSeconds: Int32)
  • Calculates the traffic jam factor that shows the traffic condition in a numeric way.

    Declaration

    Swift

    public func calculateJamFactor() -> Double

    Return Value

    Returns calculated jam factor in the range [0.0, 10.0]. A large jamFactor value means more traffic jam in general. Specifically, 0.0 means free traffic and 10.0 means stationary traffic.