Giter Club home page Giter Club logo

dump1090-to-db's Introduction

Export to db from dump1090

Store in database dump1090 captures.

Repository https://gitlab.com/fryntiz/dump1090-to-db.git

Author

Features

  • Autoinstaller DB, create db and table
  • Airflight model
  • Get data from dump1090 json
  • Autoinstaller php dependencies
  • Vars from .env
  • Save data to postgresql DB
  • Api upload
  • Create Daemon Service

Dependencias

  • php >= 8.0
  • postgresql
  • composer >= 2.0.11

Json Updates

  • hex → ICAO 24 bits (6 dígitos hexadecimales)
  • squawk → Código de transpondedor seleccionado (Señal squawk en representación octal)
  • flight → Nombre del vuelo
  • lat, lon → latitud y longitud con decimales
  • nucp → the NUCp (navigational uncertainty category) reported for the position
  • seen_pos → Tiempo en segundos (antes de ahora) desde el que fue visto por última vez
  • altitude → Altitud en pies, o "ground" si está en tierra
  • vert_rate → Velocidad vertical en pies/minuto
  • track: track verdadero sobre el suelo en grados (0-359)
  • speed: velocidad informada en kt. esto suele ser la velocidad sobre el suelo
  • messages: número total de mensajes de modo s recibidos desde esta aeronave
  • seen: cuánto tiempo (en segundos antes de "ahora") se recibió un mensaje de este avión por última vez
  • rssi: rssi promedio reciente (potencia de señal), en dbfs; esto siempre será negativo.

Environment Variables

  • DB_CONNECTION → Type of SGBD (default psql)
  • DB_HOST → IP to database HOST
  • DB_PORT → DB port
  • DB_DATABASE → DB Name of database
  • DB_USERNAME → DB Username
  • DB_PASSWORD → DB Password
  • API_URL → Api Endpoint
  • API_TOKEN → Api Token
  • DEBUG → Debug Enabled
  • T_INTERVAL_CHECK → Interval in seconds between checks for new records
  • T_INTERVAL_UPLOAD_API → Interval in seconds between uploads to the api

Installation

First, you need set environment vars and software dependencies (sections above).

Next step is execute script installer.sh. This script create db, tables and resolve composer dependencies.

./installer.sh

Manual Start

Method prefer from script:

./start_dump1090_exporter.sh

Manual php script execution:

php dump1090_exporter.php

Automatic start

Cron job

Edit /etc/crontab

sudo nano /etc/crontab

Modify path and add the next line:

@reboot pi sleep 40 && cd /home/pi/git/dump1090-to-db && . /start_dump1090_exporter.sh >> /tmp/dump1090.log 2>> /tmp/dump1090.log

Daemon

Work in progress!

dump1090-to-db's People

Contributors

raupulus avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dheia

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.