The standalone model driver may be controlled from a remote host over TCP/IP. The driver listens for connections on TCP port 25200, and accepts commands using a simple text-based protocol.
Commands are plaintext strings, terminated by a newline (ASCII LF (0x0A), '\n' in C).
After the command has completed, the driver will respond with a line containing a single period (".\n"). If there was an error, it will respond with a question mark ("?\n").
Lines beginning with a '-' contain error messages in response to the currently executing command. Lines beginning with a '+' contain a normal (non-error) response.
Lines beginning with an exclamation point ("!...") indicate an asynchronous message from the driver to the controlling host. The driver may produce asynchronous notifications at any time. Notifications include:
Other asynchronous notifications may also be sent, described elsewhere.
Commands may also be sent on UDP port 25200. The driver does not send a response to commands received over UDP, so commands like model.get are not useful in this mode, but for cases where the host does not need a reply using UDP is often simpler.
You can communicate with the driver directly with the Unix shell command:
telnet localhost 25200
Or from a different machine, substitute 'localhost' with the name of the host on which the driver is running.
The following commands are available:
The model.trim remote control command initiates the trim process. This will try to find a set of control positions which will hold the aircraft at a given flight path.
By default, the aircraft is trimmed to level flight at the current airspeed. Additional arguments to model.trim may be supplied as follows:
model.trim speed climbrate turnrate
The trim process may take up to 10 seconds. The status of the trim is reported via the following asynchronous notifications: