Code Monkey home page Code Monkey logo

api's Introduction

FlyByWire Simulations FlyByWire Simulations

FlyByWire Simulations API

This repo contains the source code to our API which is used in all our products from the A32NX mod all the way to the website. The documentation can be found at https://api.flybywiresim.com/api.

Developing

Please make sure you have:

NodeJS 14 - Homepage

# install all dependencies
$ npm install

# start MySQL and Redis using docker-compose
$ npm run compose

# watch mode
$ npm run start:dev

api's People

Contributors

benjozork avatar ericksharp avatar foxtrotsierra6829 avatar mszekiel avatar nathaninnes avatar nistei avatar pepperoni505 avatar svengcz avatar tracernz avatar wpine215 avatar zerokaa avatar zigtag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api's Issues

VATSIM ATIS with Suffix Not Working

VATSIM sometimes have a suffix on the ATIS now if arrival/departure ATIS are separated so e.g. instead of KATL_ATIS that we expect, it can be KATL_A_ATIS and KATL_D_ATIS.

[TRACKING] Data persistency

Not all data is being written to a volume currently.

Can the directories in /var/lib/docker/volumes just be renamed?

  • External Volume
    Should all Docker volumes should be stored on a DO volume?
  • Grafana
    • Find what needs to be persisted
    • Create a transition strategy
    • Use a Compose volume to persist the data
    • Add compose logging config
  • MySQL
    • Create a transition strategy (Maybe to managed?)
    • Use Compose to either move to managed or persist data
    • Add compose logging config if not managed

Releases API

For flybywiresim/installer, we need an API that can retrieve and cache mod releases and latest versions from GitHub.

To be elaborated further

What is this?

What is this API repo? Is it something that I as a simmer can use? (I'm web programmer)

The Readme should say what it is and who it is for.

[TRACKING] Monitoring

  • Host Prometheus with compose
    • What needs to be persisted
    • Use Compose for volumes
    • Autodiscovery of other containers
    • Integrate into Grafana
  • Prometheus Node Exporter
    • Run the Node Exporter with Compose
    • Integrate Grafana Dashboards
  • API Prometheus Exporter
    • Find useful metrics to export
    • Integrate Exporter into API
  • Nginx Prometheus
    • Possible with Proxy variant?
    • Enable Plugin
  • Blackbox exporter
    • Monitor availability
    • Container or different VM
  • Alerting
    • Enable alerts in Grafana which get sent to Discord

Use case example: findmyplane.live

Hello, I wanted to first thank you for this API which I have found really useful and had a lot of fun playing with today.

Second, I wanted to flag to you that I have used this in an example project called https://FindMyPlane.live. This is a client which users can run on their own computers which sends their location sim data to my server which then displays it in a pretty nice graphical web interface viewable anywhere via a browser. I have used your api to include traffic of where other players are as well.

You can view an example of my flight tracking at https://findmyplane.live/view/DUMMY and all the traffic at https://findmyplane.live/view_world. The github repo is https://github.com/hankhank10/findmyplane-server

Finally, I have two feature suggestions if I may?

Option to strip out planes on the ground
The first is, as you can see from the below screenshot many of the planes displayed are in fact on the ground at airports.

This may be useful to some users but I think most would prefer to have the option to exclude from the view planes which are stationary on the ground. This would be particularly helpful given for performance reasons (and the fact that the API caps for a single request) I display only the first 100 planes in the map bounds. Given the altitude returned by the API is altitude above sea level (I presume?) there's no straightforward way to strip these out other than running each lat/lon to see if it's near an airport, pulling the altitude of that airport and comparing - which is a lot to run on the client side.

Could I suggest including a field in the JSON output called "stationary_on_ground" which returns true if the landing gear is down and speed is 0? And allowing users of the API to query against that field?

Ability for users to find their plane
I would love to give your users the option to follow their own flight in the same way that people running my client software can. At the moment there doesn't seem to be an easy way for users to identify their flight other than the id (which given it's long I presume is not meant to be user facing) or the "flight" field which doesn't necessarily seem to be unique and seems can be empty. Would you consider adding a user-friendly ident or code which they could use to identify their flight? For my client I use a random 5 character alpha/numerical code but you will of course have your own ideas about how best to implement this.

Thanks again for this great project!

TELEX as non-plane

Currently one has to connect to TELEX as though they are a plane with coordinates, alt, heading, etc. Would be great for other services to be able to connect as a non-plane without needing that info to send/receive TELEX messages to planes.

some ideas are automated company messages to send to the plane while in route...

Cursor based pagination

Our current pagination is not stable. A cursor-based approach would solve this issue. Our cursor would be the firstContact column since it is ordered and indexed.

Cursors at Slack

[TRACKING] Additional AC metrics + flight path

Storing of Pings for a full flight path:

  • Separate Connection and Status
  • Add new API endpoints (versioned)
  • A32NX implementation
  • Grafana Dashboard showing usage per Commithash

Report additional metrics

  • Only report changed values
  • Add additional metrics
    • Speed
    • Flight Phase
    • Squawk code
    • Registration
    • Estimated time of arrival
    • Commithash

MySQL logs getting too big

The binlog_expire_logs_seconds value is set to 30 days. 7-day logs are already at 600MB.
For now, I will update this value manually to 7 days.

image

The value should be configured when starting the container.

GET /txcxn should be paginated

Currently, the endpoint returns all users connected to the TELEX system. At the moment we have around 40 connections. This might increase a lot when it gets released. To still efficiently query the connections API pagination will be needed.

Something like GET /txcxn?limit=20&offset=100 with a set maximum limit.

DB or API is overloaded

With around 320 active connections, our API in connection with our non-managed DB gives up.

image
The Trying to logs are just before the DB calls.

[REQUEST] Endpoint for listing PRs in plane repos

For QA functionality in flybywiresim/installer, we need to have an endpoint that returns a list of open PRs in a repo.

For now, the following info is needed for each PR:

  • Title
  • Author username
  • Labels
  • Draft/Open state
  • Number

It should also allow downloading of artifacts (by allowing to pass a GitHub personal token)

Caching should be very low at about 1 min max

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.