|
15 | 15 | "source": [ |
16 | 16 | "First, configure your start and end point by entering landmarks or addresses.\n", |
17 | 17 | "\n", |
18 | | - "**Important:** Both the start and end locations must be recognizable **landmarks** (e.g., a well‑known building or attraction) or **exact addresses**. OpenStreetMap resolves these names to geographic coordinates, so ambiguous or non‑existent names will cause the routing request to fail or to result in the wrong location.\n", |
| 18 | + "**Important:** Both the start and end locations must be recognizable **landmarks** (e.g., a well‑known building or attraction) or **exact addresses**. Puma uses OpenStreetMap for route planning to perform location spoofing, so OpenStreetMaps needs to resolve these names to geographic coordinates. Ambiguous or non‑existent addresses will cause the routing request to fail or to result in the wrong location, and no location spoofing can then be performened by Puma.\n", |
19 | 19 | "\n", |
20 | | - "This is important because Puma will do a lookup in OpenStreetMaps in the background to perform location spoofing. If the given locations cannot be found on OSM, no route can be spoofed. Any of the following should work landmarks/buildings\n", |
| 20 | + "Any of the following should work landmarks/buildings\n", |
21 | 21 | " * Amsterdam Schiphol P1\n", |
22 | 22 | " * Netherlands Forensic Institute\n", |
23 | 23 | " * De Leeuwenhorst Noordwijk\n", |
24 | 24 | " * Eiffel Tower\n", |
25 | 25 | " * Your own work place\n", |
26 | 26 | " * Any exact address (street + number + city)\n", |
27 | 27 | "\n", |
28 | | - "Once the start and destination locations are set, the script will request a route from the OpenStreetMap **OSRM** service, parse the returned geometry, and feed it to the Puma `RouteSimulator`. This component will spoof the location of the device in such a way the device moves along the route at the desired speed.\n", |
| 28 | + "Once the start and end locations are set, the script will request a route from the OpenStreetMap **OSRM** service, parse the returned geometry, and feed it to the Puma `RouteSimulator`. This component will spoof the location of the device in such a way the device moves along the route at the desired speed.\n", |
29 | 29 | "\n", |
30 | 30 | "Feel free to experiment with different start/end combinations to see how the simulated navigation behaves. Or think of an ambiguous name and see if you get the location you expected. Enter your location in the `search()` below to check if the location can be correctly found." |
31 | 31 | ], |
|
35 | 35 | "metadata": {}, |
36 | 36 | "cell_type": "code", |
37 | 37 | "source": [ |
38 | | - "import urllib3\n", |
39 | | - "\n", |
40 | 38 | "from puma.apps.android.google_maps.google_maps import GoogleMapsActions\n", |
41 | 39 | "maps = GoogleMapsActions(device_udid=\"emulator-5554\")" |
42 | 40 | ], |
|
122 | 120 | "cell_type": "markdown", |
123 | 121 | "source": [ |
124 | 122 | "## ℹ️ How the navigation works\n", |
125 | | - "Puma’s navigation feature works by first asking the OpenStreetMap routing service for a path between the two places you provide. The service returns a series of latitude‑longitude coordinates that describe the road network between the start and end points. Puma stores this list of points in a small simulator component that can feed them to the device as if they were real GPS readings.\n", |
126 | | - "Once the route data is ready, Puma drives the Google Maps user interface: it opens the app, enters the destination, and taps the “Start” button to launch turn‑by‑turn navigation. At this moment Google Maps begins showing the route and navigation instructions, but because the device itself is stationary, nothing moves on the map.\n", |
127 | | - "The simulator then takes over. It repeatedly injects the stored coordinates into the device’s location provider, spacing the updates so that the virtual vehicle travels at the speed you specify. The speed value is converted into a time interval between successive points, and optional variance can be added to make the motion look more realistic. While the navigation UI continues to run, you can change the speed at any time; the simulator instantly adjusts the interval, allowing the vehicle to accelerate, decelerate, or stop without restarting.\n", |
| 123 | + "Puma’s navigation feature works by first asking the OpenStreetMap routing service for a path between the two places you provide. The service returns a series of latitude‑longitude coordinates describing the route between the start and end points. Puma stores this list of points in a small simulator component that can feed them to the device as if they were real GPS readings.\n", |
| 124 | + "Once the route data is ready, Puma drives the Google Maps user interface: it opens the app, enters the end location, and taps the “Start” button to launch turn‑by‑turn navigation. At this moment Google Maps begins showing the route and navigation instructions, but because the device itself is stationary, nothing moves on the map.\n", |
| 125 | + "The simulator then start spoofing the location in the background. It repeatedly injects the stored coordinates into the device’s location provider, spacing the updates so that the virtual vehicle travels at the speed you specify. The speed value is converted into a time interval between successive points, and optional variance can be added to make the motion look more realistic. While the navigation UI continues to run, you can change the speed at any time; the simulator instantly adjusts the interval, allowing the vehicle to accelerate, decelerate, or stop without restarting.\n", |
128 | 126 | "\n", |
129 | 127 | "When the sudden speed change is very big, you can see that the speed does not change instantly, but seems to smooth out. This is because Google Maps corrects for temporary loss of connection, for example when you are in a tunnel." |
130 | 128 | ], |
|
0 commit comments