|
240 | 240 | "id": "576c2b91", |
241 | 241 | "metadata": {}, |
242 | 242 | "source": [ |
243 | | - "## Prepare and launch the map matching process" |
| 243 | + "## Prepare, launch the map matching process and compute few stats" |
244 | 244 | ] |
245 | 245 | }, |
246 | 246 | { |
|
299 | 299 | "name": "stdout", |
300 | 300 | "output_type": "stream", |
301 | 301 | "text": [ |
302 | | - "Launching Map-matching\n", |
| 302 | + "Launching Map-matching\n" |
| 303 | + ] |
| 304 | + } |
| 305 | + ], |
| 306 | + "source": [ |
| 307 | + "print ('Launching Map-matching')\n", |
| 308 | + "# Map track on network\n", |
| 309 | + "trk.mapOnNetwork(trace, network, search_radius=25, debug=False)" |
| 310 | + ] |
| 311 | + }, |
| 312 | + { |
| 313 | + "cell_type": "code", |
| 314 | + "execution_count": 8, |
| 315 | + "id": "4bc88a31-adc6-41e7-a513-b443d16b6fea", |
| 316 | + "metadata": {}, |
| 317 | + "outputs": [ |
| 318 | + { |
| 319 | + "name": "stdout", |
| 320 | + "output_type": "stream", |
| 321 | + "text": [ |
303 | 322 | "\n", |
304 | 323 | "Few statistics results:\n", |
305 | 324 | " Number of points = 52\n", |
|
310 | 329 | } |
311 | 330 | ], |
312 | 331 | "source": [ |
313 | | - "print ('Launching Map-matching')\n", |
314 | | - "# Map track on network\n", |
315 | | - "trk.mapOnNetwork(trace, network, search_radius=25, debug=False)\n", |
316 | | - "\n", |
317 | 332 | "# Few statistics:\n", |
318 | 333 | "print ('')\n", |
319 | 334 | "print ('Few statistics results:')\n", |
|
341 | 356 | "\n", |
342 | 357 | "# Calcul du RMSE\n", |
343 | 358 | "rmse = round(math.sqrt(d/nbmm),2)\n", |
344 | | - "print (' GPS standard error = ' + str(rmse) + ' m')\n" |
| 359 | + "print (' GPS standard error = ' + str(rmse) + ' m')" |
345 | 360 | ] |
346 | 361 | }, |
347 | 362 | { |
|
354 | 369 | }, |
355 | 370 | { |
356 | 371 | "cell_type": "code", |
357 | | - "execution_count": 8, |
| 372 | + "execution_count": 9, |
358 | 373 | "id": "3c91f16c", |
359 | 374 | "metadata": { |
360 | 375 | "editable": true, |
|
369 | 384 | { |
370 | 385 | "data": { |
371 | 386 | "text/plain": [ |
372 | | - "<matplotlib.legend.Legend at 0x7206914bf1f0>" |
| 387 | + "<matplotlib.legend.Legend at 0x7f6035b53fa0>" |
373 | 388 | ] |
374 | 389 | }, |
375 | | - "execution_count": 8, |
| 390 | + "execution_count": 9, |
376 | 391 | "metadata": {}, |
377 | 392 | "output_type": "execute_result" |
378 | 393 | }, |
|
432 | 447 | "id": "39cd99c3-5757-4254-bfbb-a74e6e712418", |
433 | 448 | "metadata": {}, |
434 | 449 | "source": [ |
435 | | - "As expected, **observation 37** is not map-matched: the index of the edge onto which the point is projected has value *\"-1\"" |
| 450 | + "As expected, **observation 37** is not map-matched: the index of the edge onto which the point is projected has value **\"-1\"**" |
436 | 451 | ] |
437 | 452 | }, |
438 | 453 | { |
439 | 454 | "cell_type": "code", |
440 | | - "execution_count": 9, |
| 455 | + "execution_count": 10, |
441 | 456 | "id": "80d388c4-5c02-4938-b6d8-4b33a6a36b9b", |
442 | 457 | "metadata": {}, |
443 | 458 | "outputs": [ |
|
453 | 468 | ], |
454 | 469 | "source": [ |
455 | 470 | "print ('')\n", |
456 | | - "print ('Index of the edge onto which the point is projected: ', trace[\"hmm_inference\", 37][1])\n", |
| 471 | + "print ('Index of the edge onto which the point is projected: ', \n", |
| 472 | + " trace[\"hmm_inference\", 37][1])\n", |
457 | 473 | "\n", |
458 | 474 | "# Distance to the raw observation is 0\n", |
459 | 475 | "p = trace[\"hmm_inference\", 37][0]\n", |
|
474 | 490 | "id": "d14d0113-0cb0-4d9c-a496-40455cf79f28", |
475 | 491 | "metadata": {}, |
476 | 492 | "source": [ |
477 | | - "Note that **observation 40** is map-matched on a node if the network and not on an edge. " |
| 493 | + "Note that **observation 40** is map-matched on a node and not on an edge of the network. " |
478 | 494 | ] |
479 | 495 | }, |
480 | 496 | { |
481 | 497 | "cell_type": "code", |
482 | | - "execution_count": 10, |
| 498 | + "execution_count": 11, |
483 | 499 | "id": "6ed8bc41-bcb8-4ca2-b1a3-47982477b4a5", |
484 | 500 | "metadata": {}, |
485 | 501 | "outputs": [ |
|
0 commit comments