Class DynamicSpeedInfo

java.lang.Object
com.here.sdk.routing.DynamicSpeedInfo

public final class DynamicSpeedInfo extends Object

Provides estimated speed information.

  • Field Details

    • baseSpeedInMetersPerSecond

      public double baseSpeedInMetersPerSecond

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

    • trafficSpeedInMetersPerSecond

      public double trafficSpeedInMetersPerSecond

      The speed in meters per second considering traffic.

    • turnTimeInSeconds

      public int turnTimeInSeconds

      The time it takes to make a turn, represented in seconds.

  • Constructor Details

    • DynamicSpeedInfo

      public DynamicSpeedInfo(double baseSpeedInMetersPerSecond, double trafficSpeedInMetersPerSecond, int turnTimeInSeconds)

      Creates a new instance.

      Parameters:
      baseSpeedInMetersPerSecond -

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

      trafficSpeedInMetersPerSecond -

      The speed in meters per second considering traffic.

      turnTimeInSeconds -

      The time it takes to make a turn, represented in seconds.

  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • calculateJamFactor

      public double calculateJamFactor()

      Calculates the traffic jam factor that shows the traffic condition in a numeric way.

      Returns:

      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.