 
         locationManager = CLLocationManager()
         locationManager.delegate = self
-        locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation
-        locationManager.distanceFilter = 0.1
+        locationManager.desiredAccuracy = kCLLocationAccuracyBest
+        locationManager.distanceFilter = 1
         locationManager.allowsBackgroundLocationUpdates = true
         locationManager.requestAlwaysAuthorization()
         locationManager.startMonitoringSignificantLocationChanges()

        }
        locationsMarkersArr.append(jsonData)
        lastLocationTime = Date.init()
    }

    func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        updateLocation()
        locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers
        locationManager.distanceFilter = 999999
    }

    func applicationWillResignActive(_ application: UIApplication) {


let CLOUD_URL: String = "https://steptracker.tw1.ru/track.php"
let LOCATIONS_QUEUE_LIMIT: Int = 99
let LOCATION_UPDATE_INTERVAL: Double = 20
let MIN_GPS_ACCURACY: Double = 300;

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate {
