Giter Site home page Giter Site logo

ats-pilot's Introduction

ATS Pilot

A prototype for building a Flight Management System in ATS. We wish to make convincing use of the ATS2 template system and abstract types as a method to write embedded software.

Running

  1. Install the FlightGear Simulator for your platform. On Windows and Mac there are installers you can use but on Linux you should look for it on your distribution's package manager.

  2. FlightGear supports controlling the simulation through external programs over sockets. The state of a flight at any point is controlled through a Property Tree in FlightGear. In order to receive these properties at some rate, we outline a protocol in an XML file that describes which properties we want and in what format FlightGear should send them. Refer to input_protocol.xml for this example. We can read this information as text over a UDP socket across a network or even on the same machine. In this system, we receive sensor readings from the aircraft 40 times per second. To send control data back to FlightGear, we outline a protocol as we did for input in an XML file. The file, output_protocol.xml, serves this purpose. In order for the simulator to read these files, copy them to your FlightGear protocol directory. This is located in

    /path/to/flightgear/data/Protocol/

If you would like to see a full list of properties available, go to the following page with a web browser after you start FlightGear with the included shell script.

http://localhost:5500

This will display the whole property tree. Any property listed here may be specified in either the input or output protocol you provide to FlightGear.

  1. Compile the control program with make. Note, a working ATS2 compiler is required.

  2. Run the simulator with

    ./fgfs.sh

and then when you want the control software to take over, run

./control

The shell script starts the aircraft at a few thousand feet so you don't have to worry about lift off. Just start the engine by pressing "s" and then adjusting the throttle with Page Up/Page Down. You can press "Tab" to adjust the controls so that your mouse will control the elevators, ailerons, and rudders.

Control Laws

What makes a control law?

  • A target value
  • A transfer function : (input, parameters) -> output
  • A model for each plant or process we wish to control

The template system allows us to define a typekind which can identify each plant that is controlled.

abst@ype pcontrol (tk:tkind)

fun{tk:tkind} make_pcontrol (target: double, p: double): pcontrol (tk)

fun{tk:tkind} update: (pcontrol(tk), reference: double): double

In this example we only wish to control the roll and pitch of the aircraft.

Demo

As the project continues, we'll have some videos to post to demonstrate our system.

http://www.youtube.com/embed/1qbjSViBSco

ats-pilot's People

Contributors

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