Opened 7 years ago

Last modified 15 months ago

#570 new enhancement/feature request

Traffic included in the routing

Reported by: www.google.com/accounts/o8/id?id=aitoawm-dibaa_pzfqwtdgn-ruv8nxiqyta1aoy Owned by: mvglasow (2)
Priority: major Milestone: version 0.6.0
Component: core Version: git master
Severity: hardcore Keywords: tmc, traffic, FCD
Cc: alexandre.filimonov@…, http://wiki.navit-project.org/index.php/user:mvglasow, (2)

Description

is anything planned about including traffic when calculating the route, eg as in trafficdroid?

Attachments (1)

Screen Shot 2014-10-17 at 4.45.42 PM.png (138.5 KB) - added by kazer 2 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 7 years ago by kazer

TMC has already been discussed. The main difficulty is to find a reliable source for traffic informations. Do you have more informations about that?

comment:2 Changed 7 years ago by www.google.com/accounts/o8/id?id=aitoawm-dibaa_pzfqwtdgn-ruv8nxiqyta1aoy

I have been in contact with dradio for german tmc as they have the traffic on their website. they referred me to wdr where I found: http://www.wdr.de/verkehrslage/tmc I have asked them if they might want to set something up we could use in navit. If anyone has more information or can point me to a site where I find what input data navit would need to include tmc that would be great. In this way I could ask better questions to the radio guys who might be willing to provide us with the proper data.

comment:3 Changed 7 years ago by kazer

  • Milestone set to want patch / contribution

Well, technically TMC has a standardized protocol, so navit doesn't need anything really particular. You just need to attach a TMC receiver, and code a gateway between the informations, and the traffic distorsion feature which is already present in navit.

Usually you have free informations (in france, it's around tolled highways for example) and commercially available informations. The difficulty with commercial informations is that they have some way to obfuscate the datas (TMC is a clear text protocol) and this obfuscation is probably different for each provider. That's where having some basic informations from your source could help.

Work could begin without needing a particular support using the free informations. So i'll set the ticket as want patch, for now.

comment:4 Changed 6 years ago by mineque

By dirk205, #711

'''TMC support would be great'''
I.e., for Win Mobile there is the "Hyper GPS" freeware available to pass TMC data from radio to the navigation system.

comment:5 Changed 6 years ago by niehausbert

We could consider to use navit for reporting traffic Information.

  1. Traffic is reported with a "Report Begin Traffic jam" Button in the navit map view. Configuration via navit.xml.
  2. Press on this button will create a http-request like in an HTML-form a to webserver with the current GPS position as a submitted input value. The current request changes the "report.Begin" button into an report end button.
  3. The time and date stamp of each report determines the validity of the user Reports. The validity is depending on the Nummer of reports.In navit the threshold of reports determines if reported records are used by navit for routing.Outdated records can be deleted automatically from the server.

4.A statistical analysis of submitted traffic reports can be used for time and location dependent traffic hotspot warnings 5.Furthermore it should be possible to cancel and withdraw my own submissions of the last n hours.

To Do:

  • Finding a webserver for the online report system.
  • Writing a few php-scripts for reporting traffic Infos to the server via a Smartphone with installed navit and Internet connection.
  • A Login for navit to report traffic Infos,speed control cameras Clients.Rad Blocks.
  • If a navit user on a Smartphone drives with normal speed overhead a reported traffic jam,then an reported traffic jam can be automatically removed from the traffic Information System on the webserver for. If the traffic Information are collected with Open Content License than these infos can be used from TMC information providers as well supporting navit project with server infrastructure

Last edited 6 years ago by niehausbert (previous) (diff)

comment:6 Changed 6 years ago by robin seidel

this sounds like a great idea, and in my opinion is one of the major advantages of a community driven project: no map provider will have such freshly updated traffic jam data! I wonder if it would also be a good idea to include road works as well. The osm community doesn't seem to have a strict rule on how they should be marked best. But I think navit should go forward to tell navit users how to tag streets with roadworks so this information can be included in the routing process. Does anyone know if there are "diffs" for the osm.bin file, so one doesn't always have to download the whole bit?

comment:7 Changed 4 years ago by usul

  • Keywords tmc traffic FCD added
  • Resolution set to Incomplete/Missing infos
  • Status changed from new to closed

This ticket needs more informations, a specific usecase would be great:

  • Which traffic provider should be used? How can the data been received? How is the data licensed?
  • What basic geodata are needed in this case? (e.g. TMC refers to specific object IDs)
  • How this should be embedded in Navit? Visualisation and Routing affected in which way?

comment:8 Changed 4 years ago by alexandre filimonov

Hello, guys,

Bing Maps API has a REST service that returns traffic info http://msdn.microsoft.com/en-us/library/hh441725 Its coverage is very large.

  • Which traffic provider should be used? How can the data been received? How is the data licensed?

So use Bing or Google for example

  • What basic geodata are needed in this case? (e.g. TMC refers to specific object IDs)

your position, I think. You don't need to load the data everywhere.

  • How this should be embedded in Navit? Visualisation and Routing affected in which way?

Color roads as they appear in Bing map. And include this info in route calculation (weight roads with traffic info - red = better not to choose, green = ok to ride)

Kind regards, Alexander Filimonov

comment:9 Changed 4 years ago by alexandre filimonov

  • Cc alexandre.filimonov@… added
  • Resolution Incomplete/Missing infos deleted
  • Status changed from closed to reopened

comment:10 Changed 3 years ago by usul

  • Severity set to hardcore

comment:11 Changed 3 years ago by xenos1984

  • Milestone changed from want patch / contribution to version 0.6.0

comment:12 Changed 3 years ago by usul

If we want to add the support, this talk might be interesting:

The author decodes RDS and so also TMC. She also decryptes the TMC data and has a demo app.

comment:13 Changed 2 years ago by kazer

  • Milestone changed from version 0.6.0 to version 0.5.0

I really like this feature, and wasn't aware that Bing had an API for that. Will give it a try.

Changed 2 years ago by kazer

comment:14 Changed 2 years ago by kazer

I gave a try at the Bing api and here's what i found :

Here is an example result from the API:

{
                    "__type": "TrafficIncident:http://schemas.microsoft.com/search/local/ws/rest/v1",
                    "point": {
                        "type": "Point",
                        "coordinates": [
                            37.85978,
                            -121.21823
                        ]
                    },
                    "description": "at French Camp Rd/Exit 246 - Exit ramp closed.",
                    "end": "/Date(1413592641000)/",
                    "incidentId": 2824205489601928000,
                    "lastModified": "/Date(1412268782000)/",
                    "roadClosed": false,
                    "severity": 4,
                    "start": "/Date(1412268782000)/",
                    "toPoint": {
                        "type": "Point",
                        "coordinates": [
                            37.86031,
                            -121.21855
                        ]
                    },
                    "type": 5,
                    "verified": true
                },

There's two issues : 1) the precision of the event does not allow to match a map item easily. This is the above mentioned item on a map: Here, the event is slightly off, and in the case of a more dense area it would be extremely difficult to match the correct item. An option could be to find the items in a bounding box betwwn the point and toPoint items.

2) i was not able to find the traffic informations items in the API. The api reports items like roadwork,

accidents, but i was unable to find things like traffic jams.

comment:15 Changed 2 years ago by kazer

I stumbled upon this today : https://github.com/motokokusanagi/tnav

It seems to be a plugin to push traffic updates via json over dbus. Might worth investigating this code some more.

comment:16 Changed 20 months ago by kazer

I also contacted the folks from http://opentraffic.io/ to see if we could use their service. No answer so far.

comment:17 Changed 17 months ago by mvglasow (2)

  • Owner changed from KaZeR to mvglasow (2)
  • Status changed from reopened to new

I've been working on something over the past few months. My idea is the following:

  • A generic abstraction layer for traffic services, so that it doesn't matter whether we're using a web API, a TMC dongle or you-name-it. This could be implemented as a map provider plugin. The map would consist of ways representing traffic events (closures, delays, reduced speed) on these ways.
  • One or more backends connecting to traffic services. The backend I have in mind would use TMC:
    • A lot of work on decoding TMC data from a number of sources has already been done by Christope Jacquet for his project: http://rds-surveyor.sourceforge.net/.
    • I have since added full location parsing as well as extra backend support (in part building upon Oona's work, whose talk was mentioned by usul earlier in this ticket). This part is functional by now.
    • What's next is converting the app into a backend service which collects traffic reports in the background, keeping track of messages (including deleting messages when a cancellation report is received or the message expires without being renewed). The service will get an interface (TBD, probably something like DBus on Linux and broadcasts on Android) with a frontend that any app can connect to and get notified about traffic messages.
    • Finally we'd have to add the abstraction layer to Navit, as well as a backend that talks to the service.
  • Routing would need to query the traffic map and convert the reports into traffic distortions, which would then be considered for routing. If a traffic report for a route segment changes, this would trigger recalculation of the route.

The beauty of a map provider for traffic information is that traffic data could easily be displayed as an overlay on the map.

The actual TMC backend would be a an independent service, which can also be used by other applications. This also means Navit wouldn't be concerned with hardware support for TMC dongles, or with obtaining location tables (needed for decoding locatios from TMC messages, each country has its own).

The poor accuracy that kazer mentioned is similar in TMC. However, TMC location information also has road names/numbers and directional information, which should make it possible to precisely identify the point on the mapset used.

There's just a decent amount of coding ahead...

comment:18 Changed 15 months ago by kazer

"There's just a decent amount of coding ahead..."

Haha :)

You mention having some functional code already. Maybe we should create a new project under the navit-gps org ? I do agree that it would be a good idea to have this part off of Navit's core.

https://github.com/Nimrod007/waze-api could be an interesting backend too.

comment:19 Changed 15 months ago by kazer

  • Milestone changed from version 0.5.0 to version 0.6.0

comment:20 Changed 15 months ago by mvglasow (2)

  • Cc http://wiki.navit-project.org/index.php/user:mvglasow (2) added
Note: See TracTickets for help on using tickets.