In the winter semester 2014/2015, students from the Hochschule Bochum developed an Analysis Service for the enviroCar project. The service calculates vehicle consumption values for track sections. A simple map matching method – which assigned the enviroCar data to road segments in a network – was used to calculate the consumption values. It was implemented using the free open source software solutions OpenStreetMap (OSM) street data, PostGIS, GeoServer and the enviroCar API to access the project’s consumption values.
A team of 5 students worked on a follow up project in the summer semester 2015. This project’s goal was to improve the existing calculation method. This entailed implementing a map matching method which fulfills the enviroCar Analyse Service‘s requirements. In addition, there was a need for a method to calculate undistorted energy consumption according to the time of day and the route driven.
Implementation of a Map Matching Method for Floating Car Data
The project team chose the ST-Matching algorithm as its map matching method. It is one of the few algorithms that exclusively uses GPS measurements for matching (in contrast to the many algorithms which use dead reckoning) and guarantees great accuracy when discovering the road segments.
The algorithm was implemented in Java. To ensure a modular design and extensibility, a Data Access Object (DAO) pattern was implemented for access to the street network. Access to the individual road segments is defined in the interface provided. The Factory method provides the DAO for the various data sources. The advantage of an encapsulated access function is that only one class that implements the interface must be created for each data source used. The rest of the code remains unaffected and the map matching algorithm can be easily integrated in other projects.
Figure 1 shows the DAO patterns, as well as an implementation of the interfaces for access to a PostGIS data base containing OSM street data. The ST-Matching algorithm[1] requires a calculation of the shortest route between two points. The project team used osm2po[2] to establish the OSM data set’s routing capability. They calculated the shortest route with the PostGIS extension pgRouting[3].
Several tests showed that the algorithm delivered partially implausible road segments for GPS points at critical places, e.g. intersections. In addition, run-time performance is not optimal due to the large number of data base hits. This requires a revision of the algorithm implementation.
Consumption data calculation based on historical traffic data
The project’s second goal was to develop a calculation method to identify energy consumption which deviates from the norm as a result of the time of day and the route driven. In addition, road segments should be weighted for use for efficient routing. Typical driving and vehicle characteristics, as well as historical traffic data were used to categorize consumption according to traffic volume.
Since the project received the historical data shortly before the end of the project, the team was not able to satisfactorily test the calculation method. In theory, the following steps should be carried out (and tested):
- The first step is to calculate the median consumption of a driver and vehicle type for the segments of the different road types with regards to the time of day.
- The average consumption during free flowing traffic for each road type must be calculated for each driver. We assume the driven speed is the speed limit.
- The next step is to calculate the deviation from normal consumption for each road segment and time of day. These must be related to the traffic conditions so that the deviations can be categorized.
- The last step focuses on attaining the mean deviation per road segment. We suggest to first conduct a cluster analysis to divide the calculated deviations into groups and then derive the mean value of the deviation within each group.
The historical data was processed such that a connection between the speed values collected and the road network was established.
A Java routine queries the tracks of user friends, enabling access to personal data. For this, a new account „AnalyseTeam_HSBO“ was set up. The request https://envirocar.org/api/stable/users/<username>/tracks retrieves tracks of friends of this account. The following parameters „X-User:<name>“ und „X-Token:<password>“ (i.e. the user’s own login data for his/her enviroCar account) must be included as a header.
Future work
Once the Map Matching Process has been implemented and tested, it should be combined with the consumption data calculation method.
[1] Microsoft Research: Map-Matching for Low-Sampling-Rate GPS Trajectories, in: ACM SIGSPATIAL GIS 2009
[2] http://www.osm2po.de
[3] http://www.pgRouting.org
Leave a Reply