Prometheus server is a Windows Service Programmed in Visual Studio.NET using the C# language. It is a large multithreaded application that handles all aspects of hardware integration, flight control, and telemetry. This Prometheus Software is used both in the air to control the aircraft, as well as on the ground to facilitate centralized telemetry management, ground based logging, and off board video processing. First I will discuss the aircraft server.
On the aircraft Prometheus has three primary concerns, Data gathering, Flight Control, and network management. The master process sees that these three sub processes are given all that they need, as well as constantly logging mission parameters for future play back and processing. All data is logged to an XML data source and organized by time and variable type.
The Data gathering modules are individual threads responsible for reading data from each individual device. In addition to reading the data, the threads must process the data using appropriate methods and insert the pertinent data into a shared memory stack. For instance, our 3 axis magnetometer uses the pitch and roll information from the gyro to correct it's reading for the horizontal plane, it then uses the GPS data to find the current position and calculate an IGRF model for what the magnetic constants for true north should be at the current position. With this information it then does a very accurate calculation of the vehicle's heading referenced to true north.
The data module can choose to gather its information from a simulator instead of the actual devices. The software synchronizes with Microsoft Flight Simulator 2002 using the FSUIPC expansion module. This mode is critical to testing the Flight control processes that are used to fly the aircraft, obviously running a simulated plane into the ground is far less expensive then crashing a real one.
The Flight Control Loop is clearly the most critical process as it is responsible for keeping the aircraft in the air. It is split up into inner and outer loops. The inner loop is responsible for basic flight operations. It uses a series of cascading PID controllers in order to maintain heading, altitude, and velocity. An example of the cascading PID is the use of a PID in order to maintain pitch, another PID maintains vertical air speed by controlling the pitch, and finally another PID maintains altitude by controlling the vertical airspeed. Furthermore, the inner loop is controlled by the commands of the outer loop. The outer loop is responsible for feeding heading, altitude and velocity commands to the inner loop based on navigational desires. For instance the outer loop constantly recalculates the heading and altitude the aircraft should be at in order to reach the next waypoint.
The Network Management class is responsible for communicating with the client, and synchronizing with other servers. In order to facilitate centralized telemetry and logging, the aircraft computer synchronizes with another server on the ground, which is running the same software, it is not running the Flight control module. On the ground, the server software gathers information from the camera data, the telemetry link and the DGPS correction information and sends it to the aircraft, as well as processing the aircraft's state, and sending that information to clients running the Hermes Client software.
This layout has proven to be very robust and allowed for rapid development and testing of all modules, without ever leaving the ground. The software suite is laid out in such a manner that it can easily control other autonomous vehicles, such as the Cornell Autonomous Submarine and future projects if so laid out. The modularity of each process lends itself to adapting and growing. This has been a fantastic model for our program.