Giter Club home page Giter Club logo

openxc-vehicle-simulator's Introduction

openxc-vehicle-simulator

Vehicle simultator generate sensor data over opencx specification. The project works using node/way/relation of OpenStreetMap project. You can download a map portion from: http://www.openstreetmap.org/

Usage

The following example is stored into examples/florence-station.tar.gz.

From the OpenStreetMap file 'florence-station-osm.xml' we can create a table of way and latitude/longitude point mapping.

groovy osmToCsv.groovy ./examples/florence-station-osm.xml > examples/florence-station.csv

To simulate vehicle's movements you have to extract some paths from the existing ones.

osmToPaths.groovy converts all xml data into a structured json file.

groovy osmToPaths.groovy examples/florence-station-osm.xml > examples/florence-station-paths.json

Now you have to choise one o more paths e copy (by hand) into another file (path_single.json in the example).

For each paths you have to set 2 attributes:

"vehicle_count": 5,
"max_speed": 50,

"vehicle_count" is the number of vehicles you want to create.

"max_speed" is the maximum speed in km/h for a single vehicle.

To create a blockage you have to create a file like this:

[
    {
	"lat": 43.781966249999996,
	"lon": 11.237302949999998,
	"deltaTime": 600
    }
]

"deltaTime" is how long (in seconds) a vehicle stays in that point.

So, now's the time to generate the vechicle's data.

cd examples/
mkdir data
groovy ../vehicleSimulator.groovy path_single.json blockage.json 

It creates into "data" directory some CSV files with sensor's data.

openxc-vehicle-simulator's People

Contributors

omarlarus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.