From 6337cf9aca7147f8c3a9ed3edd512387d5d78b39 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 10 May 2021 11:58:36 +0100 Subject: [PATCH] Tidying --- media.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/media.py b/media.py index ecbb986fa..a84d5daaf 100644 --- a/media.py +++ b/media.py @@ -158,19 +158,19 @@ def spoofGeolocation(baseDir: str, (distanceFromCityCenter, angleRadians) = \ _getCityPulse(currTimeAdjusted, doppelgangerSeed) # Get the position within the city, with some randomness added - fraction = randint(0, 100000) / 100000 latitude += \ distanceFromCityCenter * cityRadius * math.cos(angleRadians) # add a small amount of variance around the location + fraction = randint(0, 100000) / 100000 latitude += (fraction * fraction * variance) - (variance / 2.0) # gps locations aren't transcendental, so round to a fixed # number of decimal places latitude = int(latitude * 10000) / 10000.0 - fraction = randint(0, 100000) / 100000 longitude += \ distanceFromCityCenter * cityRadius * math.sin(angleRadians) # add a small amount of variance around the location + fraction = randint(0, 100000) / 100000 longitude += (fraction * fraction * variance) - (variance / 2.0) # gps locations aren't transcendental, so round to a fixed # number of decimal places