$LastChangedDate: 2009-11-07 22:56:33 -0500 (Sat, 07 Nov 2009) $

Summary of the control module:
- Defines the "current" Craft.
- Controls the current Craft by joystick (if enabled).
- Defers processing of joystick button events to listeners
  (asymmetrically, control handles joystick axis events).
- Has joystick configuration.
- Command classes that encapsulate control of a Craft.
  Command can read/write itself to a C++ stream (serialization).
- Replay animation of a Craft (using container of Command objects).

+----------------+
|   application  |
+----------------+
| control module |
+----------------+
|   input module |
+----------------+
| device drivers |
+----------------+

The "control" module is higher-level code built over the lower-level "input" module.
control module has the joystick configuration.  If the joystick is enabled,
control will manipulate the current Craft in response to joystick events.

Lua scripting and input devices:
--------------------------------
[2008/05]
The control module used to have keyboard code, but was eliminated after
keyboard handlers were implemented by Lua scripts which use input::KeyboardDevice.
The joystick C++ code in the control module survives because
it's faster than Lua and its handling of axis events remains appropriate.
But handling of button events is mission-specific, so the lua_bind module
(sim.Joystick in Lua) registers a listener and provides an interface
for Lua scripts to poll for button events.
In summary, the control::Joystick interface remains the same as in
previous versions but is used differently for Lua scripting.

Logical joystick axises:
------------------------
The higher-level joystick code is based on 4 logical axises.

0 = roll  (left/right)  joy X by convention
1 = pitch (up/down)     joy Y by convention
2 = yaw
3 = throttle            

Replay:
-------
Replay is factored as these classes:
- Replay
- ReplayRecorder
- ReplayPlayer
- ReplayPath (data class)
- ReplayPath::Step (Command with time-stamp)
- ReplayPath::Cursor (tracks current set of steps in animation path)
- Command (affects a Craft)

The class Replay is the interface.
ReplayRecorder and ReplayPlayer both contain shared pointer to a ReplayPath.
After recording, the player is given the shared pointer to the recorded path.

ReplayPath::Cursor naturally tracks the current step in the animation path.
But it also will lookahead to future steps that control position/rotation.
Cursor maintains a pair of position/rotation steps that the player will interpolate
to smooth animation across timer-ticks that occur late (if program is running slow).
