Class 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​(java.util.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.
      java.util.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​(java.util.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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​(java.util.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:
        java.lang.IllegalArgumentException - if velocity is zero or negative
        java.lang.IllegalArgumentException - if horizontalAccuracy or verticalAccuracy is negative
        Since:
        100.8.0 for Android and 100.9.0 for Java SE
    • Method Detail

      • getStartTime

        public java.util.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​(java.util.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:
        java.lang.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:
        java.lang.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:
        java.lang.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