Class SimulationParameters

    • 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 negative
        IllegalArgumentException - 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