Giter VIP home page Giter VIP logo

dronecomm's Introduction

dronecomm

This project contains the dronecomm application which consists of a backend (nodejs) application "dronecomm" which receives and processes drone geo location data and a frontend (react) application "dashboard" which displays the drones last location and inactivity status (i.e drones which haven't moved more than 1 meter during 10 sec.)

Dependencies

All dependencies for this project are contained within the accompanying docker image. For running anything outside the container, the only needed dependency is yarn.

Getting started

Build docker image:

docker build . -t dronecomm

Run docker container:

docker run -d --name dronecomm -p 8080:80 -p 5001:5001 -p 5000:5000 dronecomm:latest

This runs the docker container, in detached mode, named as "dronecomm", and at which -p 8080:80 exposes the "dashboard" (react) application on localhost:8080; -p 5000:5000 is needed for socket.io communication between "dashboard" (client) app and "dronecomm" (server) application (over this connection the drone data is send from backend to frontend); -p 5001:5001 is needed for communication between drones and "dronecomm" (server) appication (over this connection drones send data to the server).

We can now browse to localhost:8080 to see the dashboard application. In order to see things in action we can spin up a 10k drone simulation as follows:

docker exec -it dronecomm node /app/simulator/src/app.js

Nginx Tips

Nginx

  • Stop nginx application server (iow send stop signal): nginx -s stop
  • Test nginx configuration: nginx -t
  • Start nginx in background: nginx

Drone / Server Communication API

Protocol

Drone communication MUST be based on the socket.io protocol.

Messages

The first message a drone sends MUST be a drone registration message:

  • message string: "r"
  • message value type: Buffer

All subsequent messages MUST be geo location update messages:

  • message string: "g"
  • message value type: Buffer

For both registration and update messages the Buffer (a.k.a transmission buffer) contents MUST bet he following:

  • Byte 0..17: (string) unique drone identifier
  • Byte 0..17: (float32) latitude in degrees
  • Byte 0..17: (float32) longitude in degrees
  • Byte 0..17: (float32) flight time / duration (starting at 0), in seconds

All buffer values are in LE (Little Endian) format.

dronecomm's People

Contributors

macciocu avatar

Watchers

 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.