Git Product home page Git Product logo

logflights's Introduction

log.flights

log.flights drone flight planning and logging service

Overview

log.flights is an open source web service for planning, logging, and reporting on drone flights. In the interest of promoting a safety culture in drone aviation, log.flights provides open reporting tools for public transparency in operations. Drone operators can jointly see planned and completed flights, understanding who else is operating in the area and learning from each other's operations.

Running log.flights

To run the log.flights code on your local development machine, you'll need to install the requirements and then set up the Django application.

Requirements

You will need Python and related tools installed:

  • Python 3.6 (pyenv is useful if you need to run multiple versions, Python2 is not supported)
  • PIP
  • VirtualEnv: pip install virtualenv

Libraries:

  • Libmagic

And services:

  • Redis
  • SQLite
  • PostgreSQL (optional)

Uploads and documents are stored with Google Cloud Storage. See the section below for setting local settings

Running locally for development

Enter a new virtualenv and install application dependencies.

virtualenv <name>
<name>/bin/pip install -r requirements.txt

You'll need credentials for a Google Cloud service account stored in a JSON file. Store the JSON file somewhere securely on your system, such as ~/.google.

Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to the JSON file.

export GOOGLE_APPLICATION_CREDENTIALS=~/.google/creds.json

Settings that are specific to your deployment should be set in logflights/local_settings.py. This file will not exist, you should create it. It is imported as a standard python file. Common things to include in this file are:

SITE_NAME='log.flights'
GOOGLE_MAPS_API_KEY = 'YOUR_GMAPS_KEY'
SENDGRID_API_KEY='YOUR_KEY'

You'll also need to know the name of the GCS bucket to use for development. The app includes a default test bucket, logflights_data_test. To use a different bucket, also set environment variable GS_BUCKET_NAME.

Set up the database by running migrations, adding fixtures for default data, and collecting static files:

<name>/bin/python manage.py migrate
<name>/bin/python manage.py loaddata --app planner manufacturers missions
<name>/bin/python manage.py collectstatic

Add an admin user:

<name>/bin/python manage.py createsuperuser

Then run the development server:

<name>/bin/python manage.py runserver

In a separate window, run celery to process asynchronous tasks:

<name>/bin/celery -A logflights worker -l info

Log into the admin console and set up default fields:

http://127.0.0.1:8000/_/admin/

Running log.flights Frontend

Installing Dependencies

cd frontend/ && yarn

Running the application

cd frontend/ && yarn run dev

App will run at:

http://127.0.0.1:3000

Google Analytics

Update the files in frontend/.env.production and frontend/env.local with your Google Analytics tracking ID.

Example:

GOOGLE_ANALYTICS_TRACKING_ID=UA-Example-1

Lint before commit

cd frontend/ && yarn run lint

or lint staged files only

cd frontend/ && yarn run lint:staged

Running Tests

cd frontend/ && yarn run test

Note on static files

  • terms-of-service.md and privacy-policy.md are loaded by webpack markdown loader from frontend/app/static

Supported file formats

log.flights allows the upload of flight plans (waypoints) and flight telemetry.

Waypoints

Supported formats:

  • QGroundControl/MissionPlanner TEXT waypoint files ending in .waypoints
  • QGroundControl JSON waypoint files ending in .plan
  • Keyhole Markup Language / Google Earth documents .kml and .kmz

Telemetry

Supported formats:

NOTE: We highly discourage using .kml/.kmz documents for telemetry logs. They lack much of the critical information found in telemetry logs. Only .kml/.kmz files with TimeSpan elements supplied are accepted; .kml/.kmz files without TimeSpan elements will be rejected as unsupported file types.

License

log.flights is licensed under the BSD 3-clause license.

This project was started by Altiscope, part of A³ by Airbus.

logflights's People

Contributors

fc avatar sventech avatar polastre avatar

Watchers

Tyrone Miles 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.