Coder Social home page Coder Social logo

xpacars's Introduction

xpacars

WIP

X-Plane 11 plugin to feed data to myACARS (a smartCARS-alike plugin for Linux).

This plugin only works on Linux!

How to build and use?

After installing the dependencies (libcurl), run:

$ wget http://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK301.zip
$ unzip XPSDK301.zip
$ ./autogen.sh  # (if running from Git, depends on GNU autotools)
$ ./configure
$ make plugin

To install the plugin, run:

$ export XPLANE_DIR=...   # use the directory where you installed X-Plane 11
$ unzip xpacars-plugin-0.1.zip -d "${XPLANE_DIR}/Resources/plugins/"

Edit the ${XPLANE_DIR}/Resources/plugins/xpacars.txt file, to point to the URL of the endpoint you want to POST your position data to. This endpoint should be served through HTTPS for production environment, and include basic auth support. The user and password should be provided in the URL.

Protocol

/**
 * xpacars protocol, version 0
 *
 * This is the definition of our protocol. All the fields are separated with
 * a newline '\n' character.
 *
 * We have 2 types of requests, that are defined by the Content-Type header.
 */

/**
 * Content-Type: application/vnd.xpacars.flight
 *
 * This request registers a new flight in the server. It just contains the
 * aircraft data for now, but information about origin airport and destination
 * aiport should be added in a new version of the protocol.
 *
 * The server should return 201 to notify that the new flight was registered,
 * and the ID of the flight, that will be used by the upcoming requests.
 */
const char *flight_format =
    "1\n"   // protocol version
    "%s\n"  // aircraft icao
    "%s\n"  // aircraft tailnum
    "%s\n"  // aircraft description
    "";

/**
 * Content-Type: application/vnd.xpacars.position
 *
 * This request send information about the current status of the aircraft to
 * the server.
 *
 * The server should return 202 to notify that accepted the data. When a
 * request is not accepted, the client may take some action to recover, like
 * stop sending for a while, or increase the send intervals.
 *
 * There's no guarantee that the data was processed by the server right after
 * the request. The server can do the processing asyncronously.
 */
const char *position_format =
    "1\n"     // protocol version
    "%lld\n"  // flight id
    "%f\n"    // latitude in degrees
    "%f\n"    // longitude in degrees
    "%f\n"    // altitude in meters (not feets!)
    "%f\n"    // track in degrees
    "%f\n"    // ground speed in meters per second (not knots!)
    "%f\n"    // air speed in meters per second (not knots!)
    "%f\n"    // vertical speed meters per second (not feets per minute!)
    "";

xpacars's People

Contributors

rafaelmartins avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.