Nyein Ei Ei Tun
Nyein Ei Ei Tun

Reputation: 168

Detect user's running rate

I would like to implement fitness app for learning purpose. I would like to detect the user's action such as running,walking. According to my research, now I am able to detect the user's activity using motionActivityManager from CoreMotion framework. Now I would like to detect the user's rate. For example, user is running in what kilomiles per hour.

Can anyone give any suggestions to achieve this? Thanks.

Upvotes: 0

Views: 99

Answers (1)

D Bieber
D Bieber

Reputation: 41

I would check out the documentation on core motion here: https://developer.apple.com/documentation/corelocation/cllocation

You can get the devices speed and heading using the speed and course variables. The speed variable is in meters per second, so you can easily convert to km/s from there

Upvotes: 1

Related Questions