-
- All Implemented Interfaces:
public class AutoZoomControllerUtilsUtils for an AutoZoomController
-
-
Field Summary
Fields Modifier and Type Field Description private final DoublefeetToMetersprivate final FloatdefaultToleranceprivate final FloatspeedToleranceprivate final DoublempsToMphMultiplierprivate final FloathoursMultiplierprivate final Set<Integer>veryHighRangeRoadTypesprivate final Set<Integer>highRangeRoadTypesprivate final Set<Integer>midRangeRoadTypesprivate final Set<Integer>lowRangeRoadTypespublic final static AutoZoomControllerUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleancompareFloat(Float val1, Float val2, Float tolerance)final BooleanisHighSpeedTurn(Integer turnAction)final FloatspeedValueToMetersPerSecond(Float value)final FloatconvertSpeedFromMetersPerSecond(Float value)Converts speed in meters per second to KPH or MPH final IntegercomputeCurrentLad(ThresholdDistances thresholdDistances, Integer distanceToNext)Computes LAD value corresponding with the distance traveled between the current thresholds. final IntegergetLookAheadDistanceForFreeDrive(AutoZoomRange range, AutoZoomConfiguration config)Retrieves look ahead distance from config final ActiveNavStatuscomputeActiveNavStatus(StepInfo nextManeuver, RenderMode renderMode, AutoZoomConfiguration config)Retrieves autozoom state and desired LAD when approaching maneuver during navigation final ThresholdDistancescomputeThresholdDistancesAndLAD(StepInfo nextManeuver, AutoZoomState state, AutoZoomConfiguration config)Retrieves the distance threshold and look ahead distance final AutoZoomRangecomputeAutoZoomRangeForRoadType(SpeedInfo speedInfo, AutoZoomConfiguration config, Boolean considerSpeedLimit)Computes range based on the current road type final AutoZoomRangecomputeAutoZoomRangeForSpeedLimit(SpeedInfo speedInfo, AutoZoomConfiguration config)Computes range based on speed final FloatgetSpeedLimitValueFromConfig(SpeedLimitLevel level, AutoZoomConfiguration config)Retrieves speed value from config considering unit and level. final BooleanisSpeedLimitValid(Float speedLimit)Verifies that the speed value is within valid range final AutoZoomRangepickHigherRangeOf(AutoZoomRange range1, AutoZoomRange range2)Get higher range of 2 values final AutoZoomRangenextRangeTo(AutoZoomRange range)Get higher range to provided final AutoZoomRangepreviousRangeTo(AutoZoomRange range)Get lower range to provided final DoublegetFeetToMeters()Feet to meters conversion constant. final FloatgetDefaultTolerance()Tolerance for comparing float values final FloatgetSpeedTolerance()Tolerance for comparing float values final DoublegetMpsToMphMultiplier()Multiplier for conversion of meters per second to miles per hour final FloatgetHoursMultiplier()Multiplier for conversion of meters per second speed values final Set<Integer>getVeryHighRangeRoadTypes()Define free drive very high range road types final Set<Integer>getHighRangeRoadTypes()Define free drive high range road types final Set<Integer>getMidRangeRoadTypes()Define free drive mid range road types final Set<Integer>getLowRangeRoadTypes()Define free drive low range road types -
-
Method Detail
-
compareFloat
final Boolean compareFloat(Float val1, Float val2, Float tolerance)
-
isHighSpeedTurn
final Boolean isHighSpeedTurn(Integer turnAction)
-
speedValueToMetersPerSecond
final Float speedValueToMetersPerSecond(Float value)
-
convertSpeedFromMetersPerSecond
final Float convertSpeedFromMetersPerSecond(Float value)
Converts speed in meters per second to KPH or MPH
-
computeCurrentLad
final Integer computeCurrentLad(ThresholdDistances thresholdDistances, Integer distanceToNext)
Computes LAD value corresponding with the distance traveled between the current thresholds.
- Parameters:
thresholdDistances-input threshold distances
distanceToNext-distance to the next threshold
-
getLookAheadDistanceForFreeDrive
final Integer getLookAheadDistanceForFreeDrive(AutoZoomRange range, AutoZoomConfiguration config)
Retrieves look ahead distance from config
- Parameters:
range-input range
config-input config
-
computeActiveNavStatus
final ActiveNavStatus computeActiveNavStatus(StepInfo nextManeuver, RenderMode renderMode, AutoZoomConfiguration config)
Retrieves autozoom state and desired LAD when approaching maneuver during navigation
- Parameters:
nextManeuver-input next maneuver
renderMode-input rendering mode
config-input config
-
computeThresholdDistancesAndLAD
final ThresholdDistances computeThresholdDistancesAndLAD(StepInfo nextManeuver, AutoZoomState state, AutoZoomConfiguration config)
Retrieves the distance threshold and look ahead distance
- Parameters:
nextManeuver-input next maneuver
state-input state
config-input config
-
computeAutoZoomRangeForRoadType
final AutoZoomRange computeAutoZoomRangeForRoadType(SpeedInfo speedInfo, AutoZoomConfiguration config, Boolean considerSpeedLimit)
Computes range based on the current road type
- Parameters:
speedInfo-speed info of current road type
config-input config
considerSpeedLimit-input consider speed limit option
-
computeAutoZoomRangeForSpeedLimit
final AutoZoomRange computeAutoZoomRangeForSpeedLimit(SpeedInfo speedInfo, AutoZoomConfiguration config)
Computes range based on speed
- Parameters:
config-input config
-
getSpeedLimitValueFromConfig
final Float getSpeedLimitValueFromConfig(SpeedLimitLevel level, AutoZoomConfiguration config)
Retrieves speed value from config considering unit and level.
- Parameters:
level-input level
config-input config
-
isSpeedLimitValid
final Boolean isSpeedLimitValid(Float speedLimit)
Verifies that the speed value is within valid range
- Parameters:
speedLimit-the speed limit, can be both KPH and MPH
-
pickHigherRangeOf
final AutoZoomRange pickHigherRangeOf(AutoZoomRange range1, AutoZoomRange range2)
Get higher range of 2 values
-
nextRangeTo
final AutoZoomRange nextRangeTo(AutoZoomRange range)
Get higher range to provided
-
previousRangeTo
final AutoZoomRange previousRangeTo(AutoZoomRange range)
Get lower range to provided
-
getFeetToMeters
final Double getFeetToMeters()
Feet to meters conversion constant.
-
getDefaultTolerance
final Float getDefaultTolerance()
Tolerance for comparing float values
-
getSpeedTolerance
final Float getSpeedTolerance()
Tolerance for comparing float values
-
getMpsToMphMultiplier
final Double getMpsToMphMultiplier()
Multiplier for conversion of meters per second to miles per hour
-
getHoursMultiplier
final Float getHoursMultiplier()
Multiplier for conversion of meters per second speed values
-
getVeryHighRangeRoadTypes
final Set<Integer> getVeryHighRangeRoadTypes()
Define free drive very high range road types
-
getHighRangeRoadTypes
final Set<Integer> getHighRangeRoadTypes()
Define free drive high range road types
-
getMidRangeRoadTypes
final Set<Integer> getMidRangeRoadTypes()
Define free drive mid range road types
-
getLowRangeRoadTypes
final Set<Integer> getLowRangeRoadTypes()
Define free drive low range road types
-
-
-
-