DynamicSpeedInfo (API Reference)
Package com.here.sdk.routing
Class DynamicSpeedInfo
java.lang.Object
com.here.sdk.routing.DynamicSpeedInfo
Provides estimated speed information.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe speed in meters per second without taking traffic into consideration.doubleThe speed in meters per second considering traffic.intThe time it takes to make a turn, represented in seconds. -
Constructor Summary
ConstructorsConstructorDescriptionDynamicSpeedInfo(double baseSpeedInMetersPerSecond, double trafficSpeedInMetersPerSecond, int turnTimeInSeconds) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculates the traffic jam factor that shows the traffic condition in a numeric way.booleaninthashCode()
-
Field Details
-
baseSpeedInMetersPerSecond
public double baseSpeedInMetersPerSecondThe speed in meters per second without taking traffic into consideration.
-
trafficSpeedInMetersPerSecond
public double trafficSpeedInMetersPerSecondThe speed in meters per second considering traffic.
-
turnTimeInSeconds
public int turnTimeInSecondsThe 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
-
hashCode
public int hashCode() -
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.
-