ios - What's the difference between distance from CLLocationManager and CMPedometer -


i'm writing running app according online tutorial on http://www.raywenderlich.com/97944/make-app-like-runkeeper-swift-part-1. in tutorial,the distance user has run since start calculated 2 latest recorded locations using "distancefromlocation" method in cllocation. in cmpedometer there's distance data can retrieved directly. 1 should use , why?

thanks

cmpedometer relies on motion tracking chips built modern iphones measure steps , distance travelled owner of device. able estimate number of steps taken using motion data, , extrapolate distance traveled user using step counts , estimated stride length. if distance estimate enough purposes, cmpedometer easy, power efficient solution tracking distance travelled.

on other hand, if reported distance accurate possible, should use cllocation , calculate distance between each location user travels through on workout. requires more complex code , accurate gps signal. added benefit, you'll able use location data to, instance, draw map of user ran on workout.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -