# Advanced Smartphone-Based Identification of Transport Modes: Resilience under GNSS-Based Attacks
## 3 Deceiving the Ticketing System
### Multisensor-Based Transport Mode Identification
#### 3.1.2 Map Matching  
For the map-matching subsystem depicted in Figure 9, we use an only-GNSS-based map-matching algorithm to identify the currently used transport mode. The map-matching algorithm is an algorithm that matches geographic coordinates to a logical model of the real world, e.g., a map. As depicted in Figure 9, the map-matching algorithm uses only the GNSS position and GNSS velocity. We use the OpenStreetMap to match the current position with the surrounding types of path, i.e., railway, road and sidewalk. In case of ambiguities because many types of path are at the same location, we use the velocity averaged over the last 5 s to distinguish between different possibilities. There is rarely only one type of path, since it is a common urban design that the sidewalks and roads and even the rails of the tram are deployed at the same spot in parallel, as shown in Figure 6.  
The limiting factor of only using the GNSS position and the GNSS velocity is that the identification of all transport modes detected with the multisensor approach is not possible. For example, in scenarios of no satellite reception, such as in stations or subways, no detection is possible. This approach is heavily influenced by the map as well, in this case the OpenStreetMap. Sometimes the information of all bicycle lanes is not included; therefore, we excluded the transport mode of the bicycle. Figure 13 shows the block diagram of our map-matching algorithm.  
Figure 14 shows the output of the identification of transport modes based on GNSSs corresponding to the journey recorded in Munich shown in Figure 2. This figure shows confusion mainly between the tram and bus due to their very close and parallel tracks and similar velocities. From the minute 16 until the minute 26, the passenger was in the bus; however, the bus did not start the journey until minute 23. The fact that the bus is detected with the multisensor approach in Figure 11 is due to the fact that the motor of the bus was on while waiting at the initial bus stop and the vibration was detected. However, the velocity is zero, since the bus is still at the bus stop; therefore, the only-GNSS-based approach detects standing.  
Figure 15 shows the output of the identification of transport modes based on GNSSs corresponding to the journey recorded in Paris shown in Figure 3. This figure shows that during a great part of the journey there was no satellite reception. After minute 5, the passenger enters the station to catch the subway; thus, the reception is lost. The walking part missing from minute 16 until minute 30 occurs in the station as well. However, the subway line travels for some stations at a ground level; thus, there is again satellite reception from minute 31 until minute 37.  
Figure 12: This figure shows the representation over time of the transport modes used during the journey in Paris in blue and the transport modes identified by the convolutional neural network in orange.  
Figure 14: This figure shows the representation over time of the transport modes used during the journey in Munich in blue and the transport modes identified with the GNSS-based map matching.  
Figure 13: This figure presents the block diagram of the map-matching GNSS-based identification of transport modes.