wiki/ software

PSAS Software

Our code is on github!

  1. PSAS Software
    1. Software at PSAS
      1. The Problems With Spaceflight
      2. Current Design Philosophy at PSAS
      3. Major Softwares
  2. Flight Computer (FC)
    1. Flight Computer Code: psas/av3-fc https://github.com/psas/av3-fc
    2. FC Environment: psas/fc-environment https://github.com/psas/fc-environment
    3. FCF - Flight Computer Framework: psas/elderberry https://github.com/psas/elderberry
    4. FCFTF - Flight Computer Framework Test Framework: psas/fc-test https://github.com/psas/fc-test
  3. Launch Tower
    1. Launch Tower Computer (LTC): https://github.com/psas/launch-tower
    2. Launch control: psas/launch-tower-comm https://github.com/psas/launch-tower-comm
  4. Ground Software
    1. Telemetry Viewer: psas/telemetry https://github.com/psas/telemetry
  5. Miscellaneous
  6. Software History

Software at PSAS

Our biggest challenge at PSAS is making a rocket, in theory, steerable. This requires a monumental effort in all the major engineering fields. In addition to having an actual rocket one needs excellent electronics to provide sensor measurements and to actuate controls, and the software to run all of it. In order to write software like this you also need testing frameworks and some kind of simulation of flights to debug the main flight software. These layers of complexity make up the software project at PSAS.

The Problems With Spaceflight

Why are rockets hard? One of the most interesting things about building a space program from scratch is finding out that the problem often isn't where you think it is. Could you just build a giant rocket motor and light it? Yes, you could. But it won't do what you want. Instead of going up will arc in an unpredictable direction. The parachutes wont fire at the right time, and you'll never find it again because you won't be able to track it.

The hard part about rockets is often everything around the rocket

This is a truth of building a space program. How are you going to handle communication? Sensors? What are you going to program? How are you going to test that? How are you going to test your test framework?

Current Design Philosophy at PSAS

We've been attacking all these problems and more in different ways for years. We're now starting to bring this experience together into a cohesive design.

Testing

We spend 98% of our time on the ground. That is, not actually launching a rocket (launches are expensive and only happen once a year). But we still want to be able to run all of our software as if we're actually above the ground. This means we spend a lot of energy trying to design a good, usable test framework. We also need a simulator for almost every aspect of the rocket. We also like to be able to run as much software as possible on generic hardware so people can work on ideas on their laptops or test boards and do not need the expensive, one-of-a-kind, flight computer to get work done.

Launch Operation

When it's time for a launch we have to disable all the testing bits, and make sure we're in a good launch configuration. We can drop all the simulation and testing work and boot the real flight computer. We need logs of everything during a launch so we know what happened after the fact and can plan better for future launches.

Therefore, most PSAS software has some kind of production switch.

Major Softwares

This is the list of major software and what it's used for. Items in bold are written by PSAS.

The high level view of programs running in the two modes look like this:

Testing

testing software layout_

Launch Operation

Compile everything for flight. Set all flags to flight, watch data in real time on telemetry viewer.

Flight Computer (FC)

AV4 is an Intel Atom based flight computer, connected via Ethernet to Cortex M4-based sensor nodes. Wireless 802.11 telemetry to the ground during flight.

Flight Computer Code: psas/av3-fc https://github.com/psas/av3-fc

The PSAS portion of the flight computer code is written by us in C. This is what is running during flight. It culls data from various sensors and sends live telemetry to the ground. This is where all real-time state estimation and control algorithms are contained.

FC Environment: psas/fc-environment https://github.com/psas/fc-environment

The flight hardware is running debian based linux. Kernel config, custom udev rules and other environment info are here.

FCF - Flight Computer Framework: psas/elderberry https://github.com/psas/elderberry

The main flight computer uses a framework that was developed by the 2013 CS Capstone group.

The main flight computer has code for each task, and each piece is highly modular. For example arm.c only has code for handling the arm/safe state. 'Elderberry' is a python code generator that with the help of some config files creates an event based main that calls the modules. This way we can hand someone one piece of functionality to develop without worrying about integration into the rest of the code. This is handled automagically!

FCFTF - Flight Computer Framework Test Framework: psas/fc-test https://github.com/psas/fc-test

Because there are lots of moving parts, a test framework has also been built to help run the FC locally.

Our previous avionics experiments were with CAN (not developer-friendly) and USB (bad latency).

Event-driven flight computer simulator is for experimenting with control algorithms, like Bayesian Particle Filtering

Launch Tower

The rocket is placed on a guiding rail for launch. There is a small embedded computer at the base of the tower that is control of the ignition of the rocket motor. We also have an umbilical cable that attaches the rocket for power and data up until the launch.

Launch Tower Computer (LTC): https://github.com/psas/launch-tower

Launch tower computer uses Phidgets for sensor nodes and a Beagle board to serve them. Unlike previously, there will be direct ethernet connection between the launch tower computer and rocket while on the pad, used for bringing up and controlling the avionics pre-flight. Wireless 802.11n/g between launch tower computer and telemetry consoles and launch control consoles.

This repo has mostly hardware specs.

Launch control: psas/launch-tower-comm https://github.com/psas/launch-tower-comm

Console software written in Python 2.7 with Kivy UI framework http://kivy.org. Phidgets python drivers also required. Linux recommended.

This runs on a laptop in mission control. It has a screen that can read and update the sensors and switches in the launch tower computer.

i.e., this is the big red launch button.

Helpful links:

Ground Software

Telemetry Viewer: psas/telemetry https://github.com/psas/telemetry

A summer 2013 CS Capstone group helped us build a real time telemetry viewer. This software is designed to run on one machine on the mission control network and then allow multiple clients to view custom telemetry pages in near real time via a web interface.

Miscellaneous

PSAS Admin Tasks (plz ignore)

Software History

Old version of this page: Software Team History.

This has lots and lots of very, extremely out of date information and ideas! However the previous requirements, communications protocols, and UI designs could be instructive for current projects.