Skip to content

Instantly share code, notes, and snippets.

View SjoerdPerfors's full-sized avatar

Sjoerd Perfors SjoerdPerfors

View GitHub Profile
@SjoerdPerfors
SjoerdPerfors / TestMaxspeedBelgie.swift
Created November 14, 2017 10:47
Tests voor maxspeed in Belgie bij Bemobile server moet 120 terug geven.
func testMaxSpeedsForE19WithMaxSpeed30() {
//User got maxSpeed 100 which is incorrect.
let locationABefore = CLLocation.init(latitude: 51.01262, longitude: 4.45174)
var locationBBefore = CLLocation.init(latitude: 51.01008, longitude: 4.45346)
var course = locationABefore.headingForDirection(to: locationBBefore)
locationBBefore = CLLocation.init(coordinate: locationBBefore.coordinate, altitude: 0, horizontalAccuracy: 5, verticalAccuracy: 5, course: course, speed: 20, timestamp: Date.init())
let locationCBefore = CLLocation.init(coordinate: CLLocation.init(latitude: 51.00784, longitude: 4.45479).coordinate, altitude: 0, horizontalAccuracy: 5, verticalAccuracy: 5, course: course, speed: 20, timestamp: Date.init())
let locationDBefore = CLLocation.init(coordinate: CLLocation.init(latitude: 51.00611, longitude: 4.45612).coordinate, altitude: 0, horizontalAccuracy: 5, verticalAccuracy: 5, course: course, speed: 20, timestamp: Date.init())
@SjoerdPerfors
SjoerdPerfors / CITSManager.swift
Created November 13, 2017 12:52
Example how I did the speedchange testing
//
// CITSManager.swift
// Flitsmeister
//
// Created by Sebastiaan de Weert on 20-03-17.
// Copyright © 2017 Flitsmeister B.V. All rights reserved.
//
import UIKit
import CITS