Package es.situm.sdk.location
Class RouteAdjustment.Builder
- java.lang.Object
-
- es.situm.sdk.location.RouteAdjustment.Builder
-
- Enclosing class:
- RouteAdjustment
public static final class RouteAdjustment.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(RouteAdjustment copy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RouteAdjustment.Builder
angleDifferenceThreshold(java.lang.Float angleDifferenceThreshold)
(EXPERIMENTAL) Float that defines the angle difference threshold measured in radians between the current location's orientation and the orientation of its projection onto the route.RouteAdjustment
build()
RouteAdjustment.Builder
distanceThreshold(java.lang.Float distanceThreshold)
(EXPERIMENTAL) Float that defines the distance threshold measured in meters from the current location to the route.RouteAdjustment.Builder
useRouteAdjustment(java.lang.Boolean useRouteAdjustment)
(EXPERIMENTAL) Boolean that determines whether the location should be adjusted to the route in both coordinates and bearing.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(RouteAdjustment copy)
-
-
Method Detail
-
useRouteAdjustment
@NonNull public RouteAdjustment.Builder useRouteAdjustment(java.lang.Boolean useRouteAdjustment)
(EXPERIMENTAL) Boolean that determines whether the location should be adjusted to the route in both coordinates and bearing. This adjust will only take place when the conditions defined byRouteAdjustment.distanceThreshold
andRouteAdjustment.angleDifferenceThreshold
are fulfilled.In order to return the location projected in the route this boolean must be set to true, the distance from the estimated coordinates to the route should be below
RouteAdjustment.distanceThreshold
and the angle difference from the current bearing to that of the route should be belowRouteAdjustment.angleDifferenceThreshold
- Parameters:
useRouteAdjustment
- boolean. Default value is false (do not adjust Location to route).
-
distanceThreshold
@NonNull public RouteAdjustment.Builder distanceThreshold(java.lang.Float distanceThreshold)
(EXPERIMENTAL) Float that defines the distance threshold measured in meters from the current location to the route.It is a required condition for projecting the location on the route that the distance between the estimated location and its projection on the route is below this value.
- Parameters:
distanceThreshold
- Float.
-
angleDifferenceThreshold
@NonNull public RouteAdjustment.Builder angleDifferenceThreshold(java.lang.Float angleDifferenceThreshold)
(EXPERIMENTAL) Float that defines the angle difference threshold measured in radians between the current location's orientation and the orientation of its projection onto the route.It is a required condition for projecting the location on the route that the angle difference between the estimated location bearing and its projection on the route is below this value.
- Parameters:
angleDifferenceThreshold
- Float.
-
build
@NonNull public RouteAdjustment build()
-
-