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 the SimulatedLocationDataSource.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.9.0
See Also:
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    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 Link icon

    Modifier and Type
    Method
    Description
    double
    Gets the horizontal accuracy to assign to generated locations.
    Gets the date and time of the first location.
    double
    Gets the rate of travel, default value is 10.0.
    double
    Gets the vertical accuracy to assign to generated locations.
    void
    setHorizontalAccuracy(double horizontalAccuracy)
    Sets the horizontal accuracy to assign to generated locations.
    void
    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.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details Link icon

    • SimulationParameters Link icon

      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.9.0
    • SimulationParameters Link icon

      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 negative
      IllegalArgumentException - if horizontalAccuracy or verticalAccuracy is negative
      Since:
      100.9.0
  • Method Details Link icon

    • getStartTime Link icon

      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.9.0
    • setStartTime Link icon

      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 Link icon

      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.9.0
    • getVelocity Link icon

      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.9.0
    • setHorizontalAccuracy Link icon

      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.9.0
    • getHorizontalAccuracy Link icon

      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.9.0
    • setVerticalAccuracy Link icon

      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.9.0
    • getVerticalAccuracy Link icon

      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.9.0