Giter VIP home page Giter VIP logo

fcs's Introduction

fcs - Flight Control System

This will be a flight control system for flying robots.

What it does

  • Controls an X-Plane flight simulation over UDP
  • Receives UDP packets from X-Plane containing position, accelleration, and attitude data
  • Sends UDP packets to X-Plane containing aileron, elevator, rudder, throttle data
  • Output system state over UDP to an external glass cockpit application
  • Update system state over UDP base on commands from external high-level flight planner
  • Controller capabilities
    • Fly lists of waypoints (JSON over UDP)
    • Automatic turn coordinator
    • Total energy controller (altitude, speed, angle-of-attack)

What it will do

  • Autonomous landing
  • Will eventually control a real model:
    • Recieve signals from a GPS and plus 9DoF sensor. Likely the CHR UM6.
    • Send commands to PWM output hardware, hence to servos.

Design

Written C to leverage the LLVM toolchain and target embedded systems. Higher level applications (glass cockpit, flight planner) will be writ in Clojure.

System maintains a state singleton in memory that can be read or written to over UDP. At the start of the loop the system reads values from the network, updates the state as necessary. Then the control phase steps its algorithm forward in time according to the values read from the system state. Finally, any selected output values are broadcast.

Setting system state

The system listens on UDP port 46864, and broadcasts on port 46865

Huck UDP packets of JSON at that port. For example, you could just hook a joystick to it:

{
  "state.effector.aileron": .12,
  "state.effector.elevator": .21,
  "state.effector.rudder": .11,
  "state.effector.throttle": .42
}

Getting system values

There is a special key that allows specifies which values should be sent over UDP.

{
  "state.output.values": [ "state.sensor.latitude", "state.sensor.longitude" ]
}

For a list of names see state.h. Each broadcast packet is a 32-bit float representing a value named in state.output.values, in corresponding order.

fcs's People

Contributors

bvanderveen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ahk

fcs's Issues

trajectory planning

other ideas

  • way point sequences/linger
  • save GPS location to return home/mission destination/etc
  • maintain pattern w.r.t. ground despite wind
    ย - transitioning between trajectories/modes

stability control

Correct upsets in pitch, roll, yaw due to turbulence/wind. PID loop?

Deploy sim into a given xplane situation

Likely to be used in a tight development feedback loop, needs to be quick and easy. Probably a separate tooling daemon (not a part of the main fcs binary) for kicking xplane into doing various common things.

trajectory following capability

or something? seems like flying to waypoints and flying in arbitrary circles is pretty much the same problem. pick a power setting and go for it.

also fly the tail. no lateral g's! perfect turns.

Improve feedback loop

Current feedback:

  • Build
  • Kill old process
  • Optionally reset X-Plane (home runway, at-altitude, other scenario)
  • Unlock the brake if on runway, extend flaps, deal with gear
  • Start new process

Meanwhile X-Plane chews my CPU.

Need to get it down to one command to unpause X-Plane process, launch control process, reset scenario, etc.

Energy management

  • altitude/airspeed adjustment
  • how does this relate to high bank angles?

3d smoke line art

Could do all manner of cool stuff using crazy functions and Frenet-Serret coordinates.

Procure IMU

SparkFun 9-DoF stick looks cool. $100-ish.

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.