开发者

CoreLocation accuracy

Using CoreLocation I need to measure how far I drive. I don't care if I get the distance every 100 meters, 500 meters or 1k meters - I just need it to be as accurate as possible.

Is startMonitoringSignificantLocationChanges accurate enough for my purpose?

Thank开发者_Python百科s! Mojo


Are you guys kidding. SignificantLocation uses your Cell Tower or WiFi and accuracy is 200m to 2km and not more than that. I have been testing SignificantLocation for the past few days for background monitoring and I am sure it is not reliable in India. Probably because of the poor Cell ID data that Apple has for India.


Came across this question as Im working on a project which makes use of the GPS.

I walked for 4 minutes, in an open area, with an iPhone 4s. Distance filter was set to 1 meter, desired accuracy was set to kCLLocationAccuracyBestForNavigation. The path I walked reassembles a perfect square. I collected the accuracy of the data and create the below graphical representation of it.

Horizontal is the horizontal accuracy in meters, Vertical is the vertical accuracy. Number is the percentage of samples. Based on my data, the GPS seams to be accurate to about 5 meters horizontally and 4 meters vertically.

CoreLocation accuracy

And the RAW data. The phone is very inaccurate in the beginning. I did not put that into the graphical representation. The values are properties of CLLocation, namely horizontalAccuracy, verticalAccuracy, speed, and the last on is the runtime of the data collector in seconds. Only the first two fields are in the graph.

{{65., 19.8544, -1., 0.}, {1177.85, 19.8544, -1., 26.6677}, {1177.85, 19.8544, -1., 26.6791}, {65., 39.5525, -1., 26.9195}, {65., 18.1997, -1., 27.3025}, {10., 12., -1., 29.1924}, {5., 6., 1.48, 30.161}, {5., 4., 1.51042, 31.1635}, {5., 4., 1.52081, 32.3889}, {5., 3., 1.526, 33.1003}, {5., 3., 1.53159, 34.2526}, {5., 3., 1.52718, 35.1116}, {5., 3., 1.50695, 36.1193}, {5., 3., 1.46969, 37.2138}, {5., 3., 1.43727, 38.1436}, {5., 3., 1.41118, 39.1386}, {5., 3., 1.38665, 40.1272}, {5., 3., 1.34893, 41.0978}, {5., 3., 1.26958, 43.2087}, {5., 3., 1.28408, 44.4033}, {5., 3., 1.31837, 45.4142}, {5., 3., 1.35047, 46.1249}, {5., 3., 1.37808, 47.192}, {5., 3., 1.39821, 48.1282}, {5., 3., 1.41069, 49.1005}, {5., 3., 1.39049, 50.177}, {5., 3., 1.36868, 51.2146}, {5., 3., 1.34984, 52.4076}, {5., 3., 1.33409, 53.4195}, {5., 3., 1.34706, 54.1323}, {5., 3., 1.35823, 55.1978}, {5., 4., 1.36166, 56.3982}, {5., 4., 1.34632, 57.1174}, {5., 4., 1.33283, 58.3385}, {5., 4., 1.33698, 59.1953}, {5., 4., 1.35478, 60.408}, {5., 4., 1.37818, 61.1204}, {5., 4., 1.39841, 62.206}, {5., 4., 1.40633, 63.1981}, {5., 4., 1.4133, 64.4903}, {5., 4., 1.41897, 65.3133}, {5., 4., 1.44195, 66.1993}, {5., 4., 1.47834, 67.2066}, {5., 4., 1.51321, 68.41}, {5., 4., 1.55784, 69.1085}, {5., 4., 1.59744, 70.386}, {5., 4., 1.62682, 71.2037}, {5., 4., 1.64299, 72.3861}, {5., 4., 1.63002, 73.3987}, {5., 4., 1.59679, 74.1683}, {5., 4., 1.55959, 75.1096}, {5., 4., 1.52659, 76.3932}, {5., 3., 1.50991, 77.394}, {5., 3., 1.50992, 78.4058}, {5., 3., 1.51448, 79.2112}, {5., 3., 1.52315, 80.3967}, {5., 3., 1.53165, 81.099}, {5., 3., 1.55175, 82.3809}, {5., 3., 1.57432, 83.2006}, {5., 3., 1.60285, 84.2428}, {5., 3., 1.6404, 85.1482}, {5., 3., 1.67276, 86.2387}, {5., 3., 1.69996, 87.1938}, {5., 3., 1.7173, 88.3868}, {5., 3., 1.71301, 89.4043}, {5., 3., 1.69603, 90.1136}, {5., 3., 1.66907, 91.1997}, {5., 3., 1.64484, 92.144}, {5., 3., 1.62351, 93.4083}, {5., 3., 1.61194, 94.4215}, {5., 3., 1.61467, 95.1381}, {5., 3., 1.61707, 96.3949}, {5., 3., 1.613, 97.1026}, {5., 3., 1.60152, 98.3981}, {5., 3., 1.583, 99.201}, {5., 3., 1.56432, 100.144}, {5., 3., 1.54791, 101.386}, {5., 3., 1.56198, 102.207}, {5., 3., 1.57695, 103.177}, {5., 3., 1.61523, 104.398}, {5., 3., 1.64606, 105.099}, {5., 3., 1.6782, 106.398}, {5., 3., 1.69512, 107.134}, {5., 3., 1.70196, 108.142}, {5., 3., 1.69533, 109.393}, {5., 3., 1.68349, 110.412}, {5., 3., 1.64534, 111.121}, {5., 3., 1.58547, 112.115}, {5., 3., 1.5269, 113.101}, {5., 3., 1.47652, 114.177}, {5., 3., 1.47551, 115.184}, {5., 3., 1.4857, 116.372}, {5., 3., 1.49429, 117.427}, {5., 3., 1.48303, 118.154}, {5., 3., 1.47338, 119.197}, {5., 3., 1.46183, 120.397}, {5., 3., 1.45251, 121.111}, {5., 3., 1.44897, 122.386}, {5., 3., 1.45065, 123.205}, {5., 3., 1.46466, 124.383}, {5., 3., 1.47647, 125.419}, {5., 3., 1.50515, 126.431}, {5., 3., 1.52838, 127.149}, {5., 3., 1.54112, 128.392}, {5., 3., 1.55181, 129.378}, {5., 2., 1.56082, 130.372}, {5., 3., 1.56976, 131.191}, {5., 3., 1.59007, 132.39}, {5., 3., 1.60718, 133.399}, {5., 3., 1.61208, 134.108}, {5., 3., 1.60263, 135.18}, {5., 3., 1.58807, 136.401}, {5., 3., 1.57634, 137.1}, {5., 3., 1.57377, 138.378}, {5., 3., 1.58541, 139.2}, {5., 3., 1.59553, 140.377}, {5., 3., 1.60403, 141.388}, {5., 3., 1.5956, 142.41}, {5., 3., 1.58877, 143.125}, {5., 3., 1.58583, 144.397}, {5., 3., 1.58346, 145.108}, {5., 3., 1.59824, 146.202}, {5., 3., 1.61379, 147.173}, {5., 3., 1.62705, 148.198}, {5., 3., 1.61684, 149.113}, {5., 3., 1.60808, 150.183}, {5., 3., 1.54565, 151.124}, {5., 4., 1.49231, 152.171}, {5., 3., 1.43237, 153.098}, {5., 4., 1.37945, 154.398}, {5., 4., 1.35217, 155.112}, {5., 4., 1.32855, 156.239}, {5., 4., 1.32404, 157.387}, {5., 4., 1.32812, 158.393}, {5., 4., 1.34046, 159.123}, {5., 4., 1.35109, 160.175}, {10., 4., 1.37234, 161.168}, {10., 4., 1.40575, 162.173}, {10., 6., 1.45416, 163.19}, {10., 6., 1.52063, 164.112}, {10., 6., 1.57774, 165.192}, {10., 6., 1.67989, 166.419}, {10., 6., 1.79388, 167.135}, {10., 6., 1.89198, 168.215}, {10., 6., 1.96164, 169.109}, {10., 6., 2.02152, 170.184}, {5., 6., 2.05208, 171.17}, {5., 6., 2.07496, 172.203}, {5., 6., 2.09431, 173.213}, {5., 6., 2.09518, 174.12}, {5., 4., 2.09592, 175.177}, {5., 4., 2.05371, 176.399}, {5., 4., 2.01943, 177.189}, {5., 4., 1.97178, 178.213}, {5., 4., 1.92845, 179.2}, {5., 4., 1.88765, 180.397}, {5., 4., 1.85345, 181.412}, {5., 4., 1.83188, 182.116}, {5., 4., 1.81322, 183.2}, {5., 4., 1.80169, 184.401}, {5., 4., 1.80144, 185.104}, {5., 4., 1.80121, 186.397}, {5., 4., 1.7995, 187.215}, {5., 4., 1.798, 188.415}, {5., 4., 1.79518, 189.436}, {5., 4., 1.76444, 190.125}, {5., 4., 1.72563, 191.198}, {5., 4., 1.66823, 192.396}, {5., 4., 1.6174, 193.102}, {5., 4., 1.57248, 194.345}, {5., 4., 1.54636, 195.136}, {5., 4., 1.53001, 196.205}, {5., 6., 1.5237, 197.397}, {10., 6., 1.53231, 198.205}, {10., 8., 1.54286, 199.339}, {10., 8., 1.55149, 200.119}, {10., 8., 1.55911, 201.379}, {10., 12., 1.5653, 202.132}, {10., 12., 1.55687, 203.148}, {10., 12., 1.5313, 204.162}, {10., 8., 1.38404, 209.819}, {10., 8., 1.46957, 210.162}, {10., 8., 1.59993, 211.219}, {5., 8., 1.70924, 212.174}, {5., 6., 1.78042, 213.197}, {10., 6., 1.78344, 214.178}, {10., 6., 1.78602, 215.272}, {10., 6., 1.73121, 216.197}, {10., 8., 1.66812, 217.166}, {5., 6., 1.59293, 218.185}, {5., 8., 1.49352, 219.211}, {10., 8., 1.28344, 221.205}, {5., 8., 1.18608, 222.201}, {10., 8., 1.02548, 224.186}, {10., 8., 0.989337, 225.166}, {5., 8., 1.00523, 226.374}, {5., 8., 1.07274, 227.123}, {10., 8., 1.1809, 228.146}, {5., 6., 1.27313, 229.178}, {5., 6., 1.36816, 230.179}, {5., 6., 1.44855, 231.177}, {5., 6., 1.49983, 232.207}, {5., 6., 1.53464, 233.383}, {5., 6., 1.56375, 234.388}, {5., 6., 1.59063, 235.198}, {5., 6., 1.63125, 236.381}, {5., 6., 1.66458, 237.202}, {5., 6., 1.71713, 238.165}, {5., 6., 1.78476, 239.164}, {5., 6., 1.85008, 240.187}, {10., 6., 1.91145, 241.172}, {10., 6., 1.97741, 242.183}, {10., 8., 2.03327, 243.186}, {10., 8., 2.09449, 244.196}, {10., 8., 2.1587, 245.207}, {10., 8., 2.21291, 246.202}, {10., 12., 2.23866, 247.192}, {10., 12., 2.1976, 248.423}, {10., 12., 2.12589, 249.218}, {10., 12., 2.05035, 250.155}, {10., 12., 1.98164, 251.141}, {10., 12., 1.91989, 252.175}, {5., 12., 1.86774, 253.153}, {5., 12., 1.82346, 254.164}, {10., 12., 1.78597, 255.165}, {10., 12., 1.76352, 256.151}, {5., 12., 1.75371, 257.177}, {5., 12., 1.74542, 258.175}, {5., 12., 1.73996, 259.17}, {5., 8., 1.73533, 260.184}, {5., 8., 1.72364, 261.22}, {5., 8., 1.70243, 262.412}, {5., 8., 1.68517, 263.22}, {5., 8., 1.67648, 264.401}, {5., 8., 1.68002, 265.105}, {5., 8., 1.68316, 266.376}, {5., 8., 1.68421, 267.21}, {5., 8., 1.66691, 268.121}, {5., 8., 1.652, 269.198}, {5., 6., 1.6311, 270.418}, {5., 6., 1.61424, 271.149}, {5., 6., 1.6026, 272.369}, {5., 6., 1.59316, 273.1}, {5., 6., 1.58964, 274.123}, {5., 6., 1.58817, 275.111}, {5., 6., 1.58691, 276.196}, {5., 6., 1.60167, 277.394}, {5., 6., 1.62983, 278.426}, {5., 6., 1.66466, 279.15}, {5., 6., 1.69525, 280.37}, {5., 6., 1.71401, 281.097}, {5., 6., 1.721, 282.125}, {5., 6., 1.7085, 283.207}, {5., 6., 1.68519, 284.341}, {5., 6., 1.66553, 285.385}, {5., 6., 1.66771, 286.113}, {5., 6., 1.66959, 287.179}, {5., 6., 1.71982, 288.11}, {5., 4., 1.76288, 289.162}, {5., 4., 1.79179, 290.194}, {5., 4., 1.80223, 291.124}, {5., 4., 1.8112, 292.217}, {5., 4., 1.77427, 293.124}, {5., 4., 1.74262, 294.201}, {5., 4., 1.68039, 295.192}, {5., 4., 1.62587, 296.249}, {5., 3., 1.58055, 297.147}, {5., 3., 1.54659, 298.173}, {5., 3., 1.51781, 299.18}, {5., 3., 1.4834, 300.37}, {5., 3., 1.45536, 301.169}, {5., 3., 1.43614, 302.171}, {5., 4., 1.41982, 303.181}, {5., 4., 1.38753, 304.179}, {5., 4., 1.35942, 305.399}, {5., 4., 1.34135, 306.108}, {5., 4., 1.37035, 307.186}, {5., 6., 1.42207, 308.108}, {5., 6., 1.4723, 309.364}, {5., 6., 1.52104, 310.191}, {5., 6., 1.60087, 311.2}, {5., 6., 1.67488, 312.39}, {5., 6., 1.73605, 313.104}, {5., 6., 1.79016, 314.373}, {5., 6., 1.77941, 315.216}, {5., 6., 1.76694, 316.39}, {5., 6., 1.74863, 317.408}, {5., 6., 1.72478, 318.13}, {5., 6., 1.66749, 319.202}, {5., 6., 1.61745, 320.419}, {5., 6., 1.61483, 321.111}}


There are 2 parts to what you mentioned. 1) frequency of update 2) accuracy

(1) For frequency of update, significant location change is not very frequent. It depends on density of cell tower, so it can be between 500m to 10km. I wrote an app to test this, and plotted a chart. It maxes around 2km where I am. If you are not concerned about frequency of updates, you can use this. If you are, try using continuous location update instead.

(2) Accuracy depends on the amount of time the app has when it is active, to get accurate location. You will get better accuracy with continuous location update because the app stays active and have enough time to get good location. Usually, accuracy wih significant location update is bad because the app is woken up momentarily and does not have much time to get accurate location until it sleeps. If you want to improve accuracy when using significant location change, use task completion API to keep the app awake until you can your desired accuracy. But you also need to bear in mind that you should terminate the task if you can't get an accurate result after sometime. If user is in a building or underground, you don't want the app to keep trying and uses up battery.


I don't have actual numbers, but my experience working with the Significant Change location service is that it is reasonably accurate (within 10 meters or so), but only updates every few hundred meters, depending on where I am. So it probably is accurate enough for you, but you really need to test it to be sure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜