public function createRandomized($minDistance = -0.005, $maxDistance = 0.005)
    {
        $newCoordinates = Geo::calculateNewCoordinates($this->latitude, $this->longitude, Random::randomFloat($minDistance, $maxDistance), rand(0,360));
        $newAltitude    = $this->altitude + round(Random::randomFloat(-2, 2), 2);
        $newAccuracy    = mt_rand(3, 10);
        return new self($newCoordinates[0], $newCoordinates[1], $newAltitude, $newAccuracy);
    }
public function createRandomized($minDistance = -0.005, $maxDistance = 0.005)
    {
        $newCoordinates = Geo::calculateNewCoordinates($this->latitude, $this->longitude, Random::randomFloat($minDistance, $maxDistance), rand(0,360));
        $newAltitude    = $this->altitude + round(Random::randomFloat(-2, 2), 2);
        $newAccuracy    = mt_rand(3, 10);
        return new self($newCoordinates[0], $newCoordinates[1], $newAltitude, $newAccuracy);
    }
public function createRandomized ( $ minDistance = - 0.005 , $ maxDistance = 0.005 ) { $ newCoordinates = Geo :: calculateNewCoordinates ( $ this -> latitude , $ this -> longitude , Random :: randomFloat ( $ minDistance , $ maxDistance ) , rand ( 0 , 360 ) ) ; $ newAltitude = $ this -> altitude + round ( Random :: randomFloat ( - 2 , 2 ) , 2 ) ; $ newAccuracy = mt_rand ( 3 , 10 ) ; return new self ( $ newCoordinates [ 0 ] , $ newCoordinates [ 1 ] , $ newAltitude , $ newAccuracy ) ; }
Creates a randomized version of this approximate position

@param float $minDistance
@param float $maxDistance

@return Position
Creates a randomized version of this approximate position