Fitness and Navigations apps commonly use what is called the "Kalman Filter" for positional updates over time.
In summary, you can use GPS to determine your position in 2D or 3D coordinate space. For the x and y position use case, you then use velocity, and acceleration to account for error in your sampling. CLLocation has a speed value, but it isn't to be used other than for informational.
So the idea here is to use CoreLocation + CMDeviceMotion data to get a better location fix. Will it get the accuracy you're looking for? No promises there.
For discussion purposes, is your iOS device free body or fixed body? I.e. in someone's hand, or on a robot where the axis won't change. If the latter where the orientation will always be the same respective to the x/y plane, you could look into using linear acceleration data with accumulation.
Topic:
Programming Languages
SubTopic:
Swift
Tags: