Git Product home page Git Product logo

drone-tracking-simulator's Introduction

travis-ci Go Report Card

Drone Tracking Simulator

🚨🚨🚨This Heroku button uses the paid Kafka add-on 🚨🚨🚨

Deploy

Purpose

This app simulates the tracking of a fleet of drones performing air-drop deliveries in a specified region.

  1. As the drones fly to their destinations they send location updates as GPS coordinates once per second.
  2. Drones travel about 5 meters per second.
  3. The "base" writes all the updates to a Kafka stream for processing.

Usage

To deploy this app outside of Heroku please refer to the initVariables() function and provide the necessary env vars.

The main configuration to consider is the json string defined in the FRYAN_AIRPORTS env var. Each one of these JSON objects (notice it's an array) represents a drone port where drones will take-off from. Drones will choose a number of delivery destinations at random between MinDel and MaxDel and the addresses for each delivery are completely random within the boundaries defined by the NE and SW coordinates.

Explanation for each key:

  1. Name = Every drone flying from this droneport will be emit an event identifying itself as drone number N from airport X. So if name="air1" then drone2 is called air1-2.
  2. NE = This is the top left boundary of the location in the world of where the drones are allowed to fly, expressed as Lat and Lon. For example -33.8561, 151.2153 roughly the Sydney Opera House.
  3. SW = Conversely this is the bottom right boundary. For example 33.8949, 151.2743 roughly Bondi Icebergs. Drones will fly within this quadrant or square.
  4. Drones = How many drones to fly and therefore track. The larger the number the more messages to Kafka, the more to process, the more load, etc.
  5. MinDel = Minimum amount of deliveries each drone will perform, this adds some randomness to the simulation.
  6. MaxDel = Maximum amount of deliveries each drone will perform, this adds some randomness to the simulation.

Example

[{
    "name":"air1", 
    "NE":{"lat":-33.8073, "lon":151.1606},  
    "SW":{"lat":-33.8972, "lon":151.2738},
    "drones": 10,
    "minDel": 5,
    "maxDel":20
}]

Kafka message example:

{"CurrentPosition":{"Lat":3,"Lon":3},"Destinations":[{"Lat":9,"Lon":5}],"NextDestination":0,"Speed":5,"Name":"drone-1"}

To do:

  1. Replace trigo implementation with linearInterpolation. πŸ˜€
  2. Re-architecture so each dyno takes care of a different group of airports. πŸ˜•
  3. Come up with a visualisation of what is going on. 😳

drone-tracking-simulator's People

Contributors

feliperyan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

hucmaggie

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.