GithubHelp home page GithubHelp logo

turbo87 / ogn-web-gateway Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 4.0 705 KB

OpenGliderNet Web-Gateway

Home Page: https://ogn.cloud/api/status

License: Apache License 2.0

Rust 95.12% HTML 4.88%
openglidernet ogn aprs websocket actix

ogn-web-gateway's Introduction

ogn-web-gateway

Build Status

OpenGliderNet Web-Gateway

This project contains a webserver that connects to the OpenGliderNet, saves the received records to a database for 24 hours and relays all data to any connected WebSocket clients.

Installation & Usage

ogn-web-gateway is using the in-memory database Redis as the data store for the History API. Before attempting to install ogn-web-gateway make sure to have a working Redis server running.

Next, you should clone this repository using git:

git clone https://github.com/Turbo87/ogn-web-gateway.git

Before continuing make sure to set the REDIS_URL environment variable so that ogn-web-gateway known what Redis server it should try to connect to:

export REDIS_URL=redis://localhost

Finally we can use cargo to download all necessary dependencies, compile the application and then run it:

cargo run --release

By default ogn-web-gateway does not produce any console output when running, so don't be surprised. Once it is running you should be able to visit http://127.0.0.1:8080/api/status to verify that everything runs correctly.

API Documentation

For the API documentation please have a look at the docs folder.

License

This project is licensed under either of

at your option.

ogn-web-gateway's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar estk avatar renovate-bot avatar renovate[bot] avatar turbo87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ogn-web-gateway's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • actix 0.10.0
  • actix-cors 0.3.0
  • actix-files 0.3.0
  • actix-ogn 0.4.0
  • actix-web 3.3.3
  • actix-web-actors 3.0.0
  • anyhow 1.0.75
  • bincode 1.3.3
  • chrono 0.4.24
  • clap 2.34.0
  • itertools 0.10
  • lazy_static 1.4.0
  • log 0.4
  • pretty_env_logger 0.4
  • r2d2_redis 0.13
  • regex 1
  • sentry 0.20
  • serde 1.0.156
  • serde_json 1.0
  • systemstat 0.1.11
  • approx 0.5.1
github-actions
.github/workflows/ci.yml
  • actions/checkout v2
  • actions-rs/toolchain v1
  • actions-rs/cargo v1
  • actions-rs/cargo v1
  • actions-rs/cargo v1
  • actions-rs/cargo v1

  • Check this box to trigger a request for Renovate to run again on this repository

Add Documentation

This project should at least have a README describing the project, and a description of the APIs it provides.

  • Add README file
  • Add LICENSE file(s)
  • Add HTTP API description
  • Add WebSocket API description

API: Add `/api/latest` route

This route should show the latest OGN records for all OGN IDs that were active in the last ~30 min. It should accept (possible require) a bounding box parameter either as query param or path param that scopes the request.

History API returns timestamps outside of requested window

The History API currently has a bug where it returns records with timestamps outside of the requested time window. It only uses the time window to figure out which redis buckets to query, but it is missing the final filtering step, as the buckets may include more records then requested.

WebSocket: Improve record serialization format

Messages received from the websocket at /api/live are prefixed with $ followed by the message type. Since OGN position records are most common those are explicitly not prefixed and don't carry the message type to save bytes.

The fields in an OGN position records are separated by the | character and are sent in the following order:

  • APRS sender ID (e.g. FLRDD87AC)
  • Unix timestamp (in seconds)
  • WGS84 longitude (in degrees)
  • WGS84 latitude (in degrees)
  • Course (in degrees from North)
  • Altitude (in meters)

Example:

FLRC04EFE|1531605102|-75.117233|45.493900|16|743

API: Improve `/api/records` route

The /api/{id}/positions route should be renamed and improved:

  • rename to /api/records/{id}
  • add before and after query parameters corresponding to UNIX timestamps scoping the request
  • find a better output format...

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.