Difference between revisions of "Remote Control"

From Silent Wings Wiki
Jump to: navigation, search
(Protocol)
(Protocol)
 
(5 intermediate revisions by 2 users not shown)
Line 26: Line 26:
  
 
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.
 
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.
 +
 +
To test with UDP, you need to use the command:
 +
 +
nc -u localhost 6070
 +
 +
The Netcat (nc) command is also available on Windows, although some virus checkers regard it as a "hacker tool". Do a google search.
  
 
== Protocol ==
 
== Protocol ==
Line 31: Line 37:
 
The following commands are recognized by the server
 
The following commands are recognized by the server
  
  AIL <value>   - Ailerons, [ -1.0 -1.0 ]
+
  AIL <value>               - Ailerons, [ -1.0 -1.0 ]
  ELE <value>   - Elevator, [ -1.0 -1.0 ]
+
  ELE <value>               - Elevator, [ -1.0 -1.0 ]
  ABK <value>   - Airbrakes, [ 0.0 - 1.0 ]
+
  ABK <value>               - Airbrakes, [ 0.0 - 1.0 ]
  FLP <value>   - Flaps, [ 0.0 - 1.0 ]
+
  FLP <value>               - Flaps, [ 0.0 - 1.0 ]
  RUD <value>   - Rudder, [ -1.0 - 1.0 ]
+
  RUD <value>               - Rudder, [ -1.0 - 1.0 ]
  THR <value>   - Throttle, [ 0.0 - 1.0 ]
+
TRM <value>              - Elevator trim, [ -1.0 - 1.0 ]
  PIT <value>   - Propeller pitch, [ 0.0 - 1.0 ]
+
GEAR <value>              - Gear [0,1]
  WBK <value>   - Wheel brakes, [ 0.0 - 1.0 ]
+
WTR <value>              - Water valves (int)
  PBK <value>   - Parking brakes [ 0, 1 ]
+
  THR <value>               - Throttle, [ 0.0 - 1.0 ]
  PRBK <value> - Propeller brake [ 0.0 - 1.0 ]
+
  PIT <value>               - Propeller pitch, [ 0.0 - 1.0 ]
  MIX <value>   - Mixture, [ 0.0 - 1.0 ]
+
  WBK <value>               - Wheel brakes, [ 0.0 - 1.0 ]
  TRM <value>   - Elevator trim, [ -1.0 - 1.0 ]
+
  PBK <value>               - Parking brakes [ 0, 1 ]
  ENST <value> - Engine start [ 0, 1 ]
+
  PRBK <value>             - Propeller brake [ 0.0 - 1.0 ]
  DCMP <value> - Engine decompression [ 0, 1 ]
+
IGN <value>              - Ignition, [0,1]
  PRM <value>   - Fuel primer, [ 0, 1 ]
+
  MIX <value>               - Mixture, [ 0.0 - 1.0 ]
  EEXT <value> - Engine boom extend, [ 0, 1 ]
+
  MAG <value>               - Magnetos, [1,2,3]
  ERET <value> - Engine boom retract, [ 0, 1 ]
+
FUV <value>              - Fuel valve
  TBO <value>   - Engine turbo, [ 0.0 - 1.0 ]
+
FUT <value>              - Fuel tanks
  PANH <value> - Camera pan horizontal (degrees)
+
FUP <value>              - Fuel pump, [0.1]
  PANV <value> - Camera pan vertical (degrees)
+
  ENST <value>             - Engine start [ 0, 1 ]
  ZOOM <value> - Zoom +/-
+
  DCMP <value>             - Engine decompression [ 0, 1 ]
 +
  PRM <value>               - Fuel primer, [ 0, 1 ]
 +
CHT <value>              - Carburetor heat, [0.0 - 1.0]
 +
CWFP <value>              - Cowling flap [0.0 - 1.0]
 +
  EEXT <value>             - Engine boom extend, [ 0, 1 ]
 +
  ERET <value>             - Engine boom retract, [ 0, 1 ]
 +
  TBO <value>               - Engine turbo, [ 0.0 - 1.0 ]
 +
  PANH <value>             - Camera pan horizontal (degrees)
 +
  PANV <value>             - Camera pan vertical (degrees)
 +
  ZOOM <value>             - Zoom +/-
 
  APHDG <enable> <target>  - Auto pilot, heading hold. Enable/disable with 1/0, target in degrees.
 
  APHDG <enable> <target>  - Auto pilot, heading hold. Enable/disable with 1/0, target in degrees.
 
  APSPD <enable> <target>  - Auto pilot, speed hold. Enable/disable with 1/0, target in km/h.
 
  APSPD <enable> <target>  - Auto pilot, speed hold. Enable/disable with 1/0, target in km/h.
Line 57: Line 72:
 
  APRUD <enable>            - Auto pilot, auto rudder enable/disable, [0, 1] (Coordinated flight).
 
  APRUD <enable>            - Auto pilot, auto rudder enable/disable, [0, 1] (Coordinated flight).
 
  APSPDC <enable>          - Auto pilot, speed command enable/disable, [0, 1].
 
  APSPDC <enable>          - Auto pilot, speed command enable/disable, [0, 1].
  HUD <enable>             - Enable/disable HUD, [ 0, 1 ].
+
  HUD <mode>               - Set HUD: 0 = Off, 1 = Flight mode, 2 = Competition mod.
 
  JOY <enable>              - Enable/disable Joystick control, [0,1].
 
  JOY <enable>              - Enable/disable Joystick control, [0,1].
 
  VIEW <mode>              - Set view mode: 0 = Cockpit, 1 = Spot, 2 = Fixed, 3 = Flyby, 4 = Free flight, 5 = Chase, 6 = Overview
 
  VIEW <mode>              - Set view mode: 0 = Cockpit, 1 = Spot, 2 = Fixed, 3 = Flyby, 4 = Free flight, 5 = Chase, 6 = Overview
Line 64: Line 79:
 
  RST                      - Restart simulation
 
  RST                      - Restart simulation
 
  PAUSE <enable>            - Enable/disable pause
 
  PAUSE <enable>            - Enable/disable pause
  CPT
+
  CPT <enable>              - Enable/disable cockpit graphics, [0,1]
  TRK
+
  TRK <enable>              - Enable/disable track ribbons, [0.1]
  LAB
+
  LAB <enable>              - Enable/disable labels, [0,1]
  PIC
+
  PIC                       - Grab screenshot
  TSK
+
  TSK <enable>              - Enable/disable task graphics, [0,1]
  THM
+
  THM <enable>              - Enable/disable thermal visuals, [0,1]
  VEC
+
  VEC <enable>              - Enable/disable force vectors, [0,1]
  CHAT
+
  CHAT <message>            - Send chat message       
  MAP
+
  MAP                       - Switch to map screen
  FLT
+
  FLT                       - Switch to flight screen
  HELP
+
  HELP <enable>            - Enable/disable help window, [0,1]
 +
PLB <enable>              - Enable/disable playback controls (Viewer only)
 +
RSLT <enable>            - Enable/disable results window [0,1]
 +
SPLT <enable>            - Enable/disable standings plot window [0,1]
 +
AC <number>              - Set current aircraft [1, n]
 +
OFS <seconds>            - Offset current time by <seconds> (Viewer only).
  
  
 
[[Category:Interfaces]]
 
[[Category:Interfaces]]

Latest revision as of 22:25, 26 August 2008

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.

To test with UDP, you need to use the command:

nc -u localhost 6070

The Netcat (nc) command is also available on Windows, although some virus checkers regard it as a "hacker tool". Do a google search.

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 ]
TRM <value>               - Elevator trim, [ -1.0 - 1.0 ]
GEAR <value>              - Gear [0,1]
WTR <value>               - Water valves (int)
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 ]
IGN <value>               - Ignition, [0,1]
MIX <value>               - Mixture, [ 0.0 - 1.0 ]
MAG <value>               - Magnetos, [1,2,3]
FUV <value>               - Fuel valve
FUT <value>               - Fuel tanks
FUP <value>               - Fuel pump, [0.1]
ENST <value>              - Engine start [ 0, 1 ]
DCMP <value>              - Engine decompression [ 0, 1 ]
PRM <value>               - Fuel primer, [ 0, 1 ]
CHT <value>               - Carburetor heat, [0.0 - 1.0]
CWFP <value>              - Cowling flap [0.0 - 1.0]
EEXT <value>              - Engine boom extend, [ 0, 1 ]
ERET <value>              - Engine boom retract, [ 0, 1 ]
TBO <value>               - Engine turbo, [ 0.0 - 1.0 ]
PANH <value>              - Camera pan horizontal (degrees)
PANV <value>              - Camera pan vertical (degrees)
ZOOM <value>              - Zoom +/-
APHDG <enable> <target>   - Auto pilot, heading hold. Enable/disable with 1/0, target in degrees.
APSPD <enable> <target>   - Auto pilot, speed hold. Enable/disable with 1/0, target in km/h.
APROL <enable> <target>   - Auto pilot, auto bank. Enable/disable with 1/0, target in degrees. 
APRUD <enable>            - Auto pilot, auto rudder enable/disable, [0, 1] (Coordinated flight).
APSPDC <enable>           - Auto pilot, speed command enable/disable, [0, 1].
HUD <mode>                - Set HUD: 0 = Off, 1 = Flight mode, 2 = Competition mod.
JOY <enable>              - Enable/disable Joystick control, [0,1].
VIEW <mode>               - Set view mode: 0 = Cockpit, 1 = Spot, 2 = Fixed, 3 = Flyby, 4 = Free flight, 5 = Chase, 6 = Overview
SRT <val>                 - Simulation rate: < 0.0 - 64.0 ]
QUIT                      - Quit simulation
RST                       - Restart simulation
PAUSE <enable>            - Enable/disable pause
CPT <enable>              - Enable/disable cockpit graphics, [0,1]
TRK <enable>              - Enable/disable track ribbons, [0.1]
LAB <enable>              - Enable/disable labels, [0,1]
PIC                       - Grab screenshot
TSK <enable>              - Enable/disable task graphics, [0,1]
THM <enable>              - Enable/disable thermal visuals, [0,1]
VEC <enable>              - Enable/disable force vectors, [0,1]
CHAT <message>            - Send chat message        
MAP                       - Switch to map screen
FLT                       - Switch to flight screen
HELP <enable>             - Enable/disable help window, [0,1]
PLB <enable>              - Enable/disable playback controls (Viewer only)
RSLT <enable>             - Enable/disable results window [0,1]
SPLT <enable>             - Enable/disable standings plot window [0,1]
AC <number>               - Set current aircraft [1, n]
OFS <seconds>             - Offset current time by <seconds> (Viewer only).