Remote Control: Difference between revisions

From Silent Wings Wiki
Jump to navigation Jump to search
No edit summary
Line 31: Line 31:
The following commands are recognized by the server
The following commands are recognized by the server


  AIL <val>  - Ailerons, [ -1.0 -1.0 ]
  AIL <value>  - Ailerons, [ -1.0 -1.0 ]
  ELE <val>  - Elevator, [ -1.0 -1.0 ]
  ELE <value>  - Elevator, [ -1.0 -1.0 ]
  ABK <val>  - Airbrakes, [ 0.0 - 1.0 ]
  ABK <value>  - Airbrakes, [ 0.0 - 1.0 ]
  FLP
  FLP <value>  - Flaps, [ 0.0 - 1.0 ]
  RUD
  RUD <value>  - Rudder, [ -1.0 - 1.0 ]
  THR
  THR <value>  - Throttle, [ 0.0 - 1.0 ]
  PIT
  PIT <value>  - Propeller pitch, [ 0.0 - 1.0 ]
  WBK
  WBK <value>  - Wheel brakes, [ 0.0 - 1.0 ]
  PBK
  PBK <value>  - Parking brakes [ 0, 1 ]
  PRBK
  PRBK <value>  - Propeller brake [ 0.0 - 1.0 ]
  MIX
  MIX <value>  - Mixture, [ 0.0 - 1.0 ]
  TRM
  TRM <value>  - Elevator trim
  ENST
  ENST
  DCMP
  DCMP

Revision as of 22:29, 19 December 2007

Note: This feature is implemented in Silent Wings 1.08. It will not work with earlier versions

Silent Wings contains a built-in server which can be used to control most functions of the simulator. This can be used from external applications to interface certain types of hardware, custom autopilot applications and probably a lot of other interesting uses.

To enable the Remote Control server, add the following lines to options.dat


use_remote_control = true
remote_control_port = 6070
remote_control_mode = UDP

The last variable can be either UDP or TCP.

To test it, set mode to TCP and telnet to the correct port on the computer running Silent Wings, for example:

telnet localhost 6070

You can now enter commands directly in the telnet window, for example:

HELP 0
PAUSE 0
APSPD 1 100
APROL 1 30
VIEW 3

This will close the help window, unpause and put the aircraft in a 30 degrees bank at 100km/h using the autopilot. Finally, it will change view to flyby-mode.

Protocol

The following commands are recognized by the server

AIL <value>   - Ailerons, [ -1.0 -1.0 ]
ELE <value>   - Elevator, [ -1.0 -1.0 ]
ABK <value>   - Airbrakes, [ 0.0 - 1.0 ]
FLP <value>   - Flaps, [ 0.0 - 1.0 ]
RUD <value>   - Rudder, [ -1.0 - 1.0 ]
THR <value>   - Throttle, [ 0.0 - 1.0 ]
PIT <value>   - Propeller pitch, [ 0.0 - 1.0 ]
WBK <value>   - Wheel brakes, [ 0.0 - 1.0 ]
PBK <value>   - Parking brakes [ 0, 1 ]
PRBK <value>  - Propeller brake [ 0.0 - 1.0 ]
MIX <value>   - Mixture, [ 0.0 - 1.0 ]
TRM <value>   - Elevator trim
ENST
DCMP
PRM
EEXT
ERET
TBO
PANH
PANV
ZOOM
APHDG
APSPD
APROL
APRUD
APSPDC
HUD
JOY
VIEW
SRT 
QUIT
RST
PAUSE
CPT
TRK
LAB
PIC
TSK
THM
VEC
CHAT
MAP
FLT
HELP