Package com.esri.arcgisruntime.location
Class SimulationParameters
- java.lang.Object
-
- com.esri.arcgisruntime.location.SimulationParameters
-
public final class SimulationParameters extends Object
Parameters to control how locations are created from a simulated route of travel (Polyline). This can be provided as an input to theSimulatedLocationDataSource.setLocations(Polyline, SimulationParameters)
method to specify the start time for the first location, travel velocity (meters per second), and horizontal and vertical accuracy of locations.- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
- See Also:
SimulatedLocationDataSource.setLocations(Polyline, SimulationParameters)
-
-
Constructor Summary
Constructors Constructor Description SimulationParameters()
Creates a SimulationParameters object with default values: zero Unix timestamp as start time velocity 10.0 (meters/second) horizontal accuracy 0.0 (meter) vertical accuracy 0.0 (meter)SimulationParameters(Calendar startTime, double velocity, double horizontalAccuracy, double verticalAccuracy)
Constructs a SimulationParameters with the given arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getHorizontalAccuracy()
Gets the horizontal accuracy to assign to generated locations.Calendar
getStartTime()
Gets the date and time of the first location.double
getVelocity()
Gets the rate of travel, default value is 10.0.double
getVerticalAccuracy()
Gets the vertical accuracy to assign to generated locations.void
setHorizontalAccuracy(double horizontalAccuracy)
Sets the horizontal accuracy to assign to generated locations.void
setStartTime(Calendar startTime)
Sets the date and time of the first location.void
setVelocity(double velocity)
Sets the velocity.void
setVerticalAccuracy(double verticalAccuracy)
Sets the vertical accuracy to assign to generated locations.
-
-
-
Constructor Detail
-
SimulationParameters
public SimulationParameters()
Creates a SimulationParameters object with default values:- zero Unix timestamp as start time
- velocity 10.0 (meters/second)
- horizontal accuracy 0.0 (meter)
- vertical accuracy 0.0 (meter)
- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
SimulationParameters
public SimulationParameters(Calendar startTime, double velocity, double horizontalAccuracy, double verticalAccuracy)
Constructs a SimulationParameters with the given arguments.- Parameters:
startTime
- date and time of the first location. Each subsequent location will increment its timestamp by one second. If it is null, zero Unix timestamp will be used.velocity
- Rate of travel, in meters per second. The default value is 10.0. Note that very small values for velocity may greatly increase the number of locations created.horizontalAccuracy
- the horizontal accuracy to assign to generated locations. The default value is 0.0.verticalAccuracy
- the vertical accuracy to assign to generated locations. The default is 0.0.- Throws:
IllegalArgumentException
- if velocity is zero or negativeIllegalArgumentException
- if horizontalAccuracy or verticalAccuracy is negative- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
-
Method Detail
-
getStartTime
public Calendar getStartTime()
Gets the date and time of the first location. Each subsequent location will increment its timestamp by one second.- Returns:
- date and time of the first location
- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
setStartTime
public void setStartTime(Calendar startTime)
Sets the date and time of the first location. Each subsequent location will increment its timestamp by one second.- Parameters:
startTime
- date and time of the first location. If it is null, zero Unix timestamp will be used- Since:
- 100.8.0
-
setVelocity
public void setVelocity(double velocity)
Sets the velocity. The default value is 10.0.- Parameters:
velocity
- rate of travel, in meters per second- Throws:
IllegalArgumentException
- if velocity is zero or negative- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
getVelocity
public double getVelocity()
Gets the rate of travel, default value is 10.0. Note that very small values for velocity may greatly increase the number of locations created.- Returns:
- rate of travel, in meters per second
- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
setHorizontalAccuracy
public void setHorizontalAccuracy(double horizontalAccuracy)
Sets the horizontal accuracy to assign to generated locations. The default value is 0.0.- Parameters:
horizontalAccuracy
- the horizontal accuracy- Throws:
IllegalArgumentException
- if horizontalAccuracy is negative- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
getHorizontalAccuracy
public double getHorizontalAccuracy()
Gets the horizontal accuracy to assign to generated locations. The default value is 0.0.- Returns:
- the horizontal accuracy to assign to generated locations
- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
setVerticalAccuracy
public void setVerticalAccuracy(double verticalAccuracy)
Sets the vertical accuracy to assign to generated locations. The default value is 0.0.- Parameters:
verticalAccuracy
- the vertical accuracy- Throws:
IllegalArgumentException
- if verticalAccuracy is negative- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
getVerticalAccuracy
public double getVerticalAccuracy()
Gets the vertical accuracy to assign to generated locations. The default value is 0.0.- Returns:
- the vertical accuracy to assign to generated locations
- Since:
- 100.8.0 for Android and 100.9.0 for Java SE
-
-