<-- Back
sendCTRL
Send position and orientation update command to X-Plane over UDP. This requires the X-Plane Connect Plugin to be running
Inputs
- ctrl: Array of 6 values where:
- ctrl(1) Latitudinal Stick [-1,1]
- ctrl(2) Longitudinal Stick [-1,1]
- ctrl(3) Pedal [-1, 1]
- ctrl(4) Throttle [-1, 1]
- ctrl(5) Gear (0=up, 1=down)
- ctrl(6) Flaps [0, 1]
- aircraft number (optional): 0=own aircraft
- IP Address (optional): IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)
- port (optional): Port on the receiving machine where the data will be sent. Default is 49009 (XPlaneConnect). In general use 49009 to send to the plugin and 49005 to send to the x-plane udp
Outputs
- status: If there was an error. status<0 means there was an error.
Use
1. import XPlaneConnect.*;
2. ctrl = [0, 0, 0, 0.8, 0, 0];
3. status = sendCTRL(ctrl); % Set position of own aircraft
4. status2 = sendCTRL(ctrl,1); % Set position of aircraft 1
Change Log
10/02/14: [CT] V0.9 Updated to use new xpcPlugin
09/26/14: [CT] Code created
<-- Back