Hi,
I have been working on a private project regarding to development of an Apple watch traning app via Swift programming language (Xcode).
I have done some researches to be able to obtain small distance displacement of an apple watch( in cm ) in a short time period( in seconds), but the only libraries which i found were cllocationmanager or cmmotionmanager,
but as i see none of them were suitable for a small distance calculation (in cm) and as fast as (in seconds) required in my app.
I have found some complex formulas with accelerometer datas to calculate a concrete distance displacement, but unfortunately i could not realize them in Swift.
https://www.nxp.com/files-static/sensors/doc/app_note/AN3397.pdf
I would be grateful, if you could suggest any available libraries in Swift or inform me if it is possible to make concrete calculations for small distance displacements (in cm) in a short time (seconds) or not.
Coding Ex:
->Click button to detect first location
locationManagerInCm.startUpdatingLocation
latestLocation = (x=0cm, y=0cm, z=0cm) ->calculated by Apple watch
locationManagerInCm.stopUpdatingLocation
->Apple watch moves 3 sec
->Click button to detect second location
latestLocation2 = (x=30cm, y=20cm, z=0) >calculated by Apple watch
locationManagerInCm.stopUpdatingLocation
->Calculate and show displacementX.text = String(format: "%.2f", latestLocation.x - latestLocation2.x)
Y.text = String(format: "%.2f", latestLocation.y - latestLocation2.y)
Z.text = String(format: "%.2f", latestLocation.z - latestLocation2.z)
Thank you very much in advance.
Best Regards
Emre