Commit 9587b08d authored by Philip Levis's avatar Philip Levis
Browse files

A bit more detail on the simualtor.

parent 926f606a
......@@ -3,18 +3,9 @@
This directory stores all of FLIGHT's software.
The directory structure:
- firmware: code that runs on a FractalFlyer, providing a Python interface over a flash drive and USB tty
- FlightGui: [Processing](https://processing.org) sketches for the FLIGHT GUI.
- scripts: python scripts that run on the firmware
- simulator: a graphical simulator of FLIGHT, which you can program just like the real installation (using Python)
- ui: The user interface to controlling FLIGHT both in real-time and using predefined playlists
- [firmware](firmware): code that runs on a FractalFlyer, providing a Python interface over a flash drive and USB tty
- [FlightGui](FlightGui): [Processing](https://processing.org) sketches for the FLIGHT GUI.
- [scripts](scripts): python scripts that run on the firmware
- [simulator](simulator): a graphical simulator of FLIGHT, which you can program just like the real installation (using Python)
- [ui](ui): The user interface to controlling FLIGHT both in real-time and using predefined playlists
Simulator (High Level)
The simulator consists of a four step pipeline; first, it reads generated
python commands from the Engine. Then, it spawns the desired number of
processes (corresponding to the number of fliers being invoked in the model)
and starts a python interpreter. It opens a socket to the main simulator
process through a C binding (which will eventually be responsible for generating and
updating the simulated graphical interface) and transmits the commands, updating the
state of the simulator, on a per-flier basis.
......@@ -9,16 +9,20 @@ follows:
state of FLIGHT.
- [client](client): a simple test client for interacting with the simulator.
Splits API for simulator into two parts; the interpreter/data_processing side
(in interpreter/) and the client side/main simulator process (server.c)
The intended use of the simulator is to test and visualize what the
[FlightGui](../FlightGui) UI is doing. It allows you to test its
output without requiring a full FLIGHT installation. This lets you
test whether the UI is producing correct scripts and debug more easily.
## Operation
Normally, each Fractal Flyer in FLIGHT is plugged into a computer with
USB and appears in two ways, as a serial port presenting a Python
read-eval-print-loop and as a removeable USB drive that you can store
Python code on. When the FLIGHT simulator boots, it creates 76 entries
in the local file system that act like serial ports and 76 directories
that you can copy Python code into. It starts up 76 Python
interpreters which receive Python scripting commands from the
in the local file system (named FIFOs) that act like serial ports and
76 directories that you can copy Python code into. It starts up 76
Python interpreters which receive Python scripting commands from the
simulated serial ports. These 76 interpreters send commands to a
server process, which simulates the lights and motion of the Fractal
Flyers and displays them graphically.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment