I have an image (floor plan) where I have attached my current position. c CMPedometerI can find the number of steps, but could not find the direction in which I am moving.
if(CMPedometer.isStepCountingAvailable()){
self.pedoMeter.startUpdates(from: midnightOfToday) { (data: CMPedometerData?, error) -> Void in
DispatchQueue.main.async(execute: { () -> Void in
if(error == nil) {
self.stepsLabel.text = "Moved \(data!.numberOfSteps) steps"
}
})
}
}
Is there a way to find the direction I'm moving (as applied to my point OR to E, W, S, N)?
Steve source
share