chucre / time-travel Goto Github PK
View Code? Open in Web Editor NEWGiven a GPS tracker data from call a MapMatching and calculate the time take in each edge.
License: GNU General Public License v2.0
Given a GPS tracker data from call a MapMatching and calculate the time take in each edge.
License: GNU General Public License v2.0
To run project you will need install map-matching from https://github.com/chucre/map-matching. $ git clone https://github.com/chucre/map-matching Then you will need download a OpenStreet Map database (I use brazil database): $ cd map-matching $ wget download.geofabrik.de/south-america/brazil-latest.osm.pbf Once you have the databse downloaded, you will need import it into graphhopper internal database $ ./map-matching.sh action=import datasource=./brazil-latest.osm.pbf vehicle=car Now you will start the map-matching server: ./map-matching.sh action=start-server Now you will need open a new terminal and unzip sample file and run project: $ npm install $ gunzip sample/points.txt.gz $ node processFile.js These project is based on Chucre time travel algorithm that fallows: case 1: Link 1 Link 2 Link 3 +---------------------------+------------------------+-------------------------+ | | | | +-----+---+----+----+----+ +-----+---------+------+ +-----------------------+ | | | | point 0 | point x | point n(last) point z (last) case 2: Link 1 Link2 +-------------------------+--------------------------+ | | | +-----------------------+ +------------------------+ | | point 0 point n pseudo code: delta_inicial delta_final t_inicial t_final percurso_percorrido tempo_percorrido_conhecido = t_final-t_inicial tempo_total = tempo_percorrido_conhecido+proporção_percorrida_até a proxima coleta achou_ponto_inicial <- false achou_ponto_final <- false link <- cada line|multiline do link if !achou_ponto_inicial if ponto_inicial lies link delta_inicial += distance_to(link[0], ponto_inicial) persurso_percorrido += distance_to(link[1], ponto_inicial) achou_ponto_inicial=true else delta_inicial += distance_to(link[0], link[1]) end else if !achou_pont_final if ponto_final lies link persurso_percorrido += distance_to(link[0], ponto_final) delta_final += distance_to(link[1], ponto_final) else persurso_percorrido += distance_to(link[0], link[1]) end else delta_final += distance_to(link[0], link[1]) end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.