Initial Version
This commit is contained in:
37
MATLAB/pages/clearUDPBuffer.html
Normal file
37
MATLAB/pages/clearUDPBuffer.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-ClearUDPBuffer</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>clearUDPBuffer</h1>
|
||||
Script that clears an UDP Socket Buffer
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>Socket:</b> UDP Socket to be cleared</li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>Socket:</b> UDP Socket</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. Socket = openUDP(49005); <br />
|
||||
3. Socket = clearUDPBuffer(Socket);<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
09/12/13: [CT] Add optional arguments<br />
|
||||
09/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
36
MATLAB/pages/closeUDP.html
Normal file
36
MATLAB/pages/closeUDP.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-closeUDP</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>closeUDP</h1>
|
||||
Script that closes a UDP Socket
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>Socket:</b> UDP Socket to be closed</li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>Status:</b> Integer indicating the success of socket closing. 1 = Success 0 = Failure</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*; <br />
|
||||
2. Socket = openUDP(49005); <br />
|
||||
3. Status = closeUDP(Socket);<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
09/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
MATLAB/pages/openUDP.html
Normal file
39
MATLAB/pages/openUDP.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-openUDP</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>openUDP</h1>
|
||||
Script that opens a UDP Socket
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>port:</b> UDP Port for socket</li>
|
||||
<li><b>timeout (optional):</b> Optional parameter for time to UDP timeout (in ms)-Default 0.1 seconds</li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>Socket:</b> UDP Socket</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. Socket = openUDP(49005);%Open socket at port 49005 with timeout of 0.1 seconds <br /><br />
|
||||
or<br/><br/>
|
||||
2. Socket = openUDP(49005,200);%Open socket at port 49005 with timeout of 0.2 seconds<br /><br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
09/12/13: [CT] Added optional timeout input argument<br />
|
||||
09/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
36
MATLAB/pages/pauseSim.html
Normal file
36
MATLAB/pages/pauseSim.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-pauseSim</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>pauseSim</h1>
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>Pause:</b> binary value 0=run, 1=pause</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. status = pauseSim(1);<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
06/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
59
MATLAB/pages/readDATA.html
Normal file
59
MATLAB/pages/readDATA.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-readDATA</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>readDATA</h1>
|
||||
Reads UDP Socket and interprets data
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>location:</b> Either an opened UDP Socket or integer port number</li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
If data is X-Plane data format:
|
||||
<ul>
|
||||
<li><b>data:</b> Matlab X-Plane DATA Structure<ul>
|
||||
<li>.h: Header array containing header numbers corresponding to values in the X-Plane UDP Data screen. </li>
|
||||
<li>.d: 2-D Data array. Each row contains eight values corresponding to the header value (.h(1) corresponds to .d(1,:))</li>
|
||||
<li>.raw: raw UDP data array received by readUDP</li></ul></li>
|
||||
</ul>
|
||||
If data is matlab structure:
|
||||
<ul>
|
||||
<li><b>data:</b> Matlab Structure. Raw udp data saved to data.raw</li>
|
||||
</ul>
|
||||
If data is any other format:
|
||||
<ul>
|
||||
<li><b>data:</b> Matlab Structure containing one field <ul>
|
||||
<li>.raw & .d: raw UDP data array received by readUDP</li></ul></li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. socket = openUDP(49005); <br />
|
||||
3. data = readDATA(socket); <br />
|
||||
4. status = closeUDP(socket); <br /><br />
|
||||
|
||||
or <br /> <br />
|
||||
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. data = readDATA(49005);
|
||||
|
||||
<h2>Note</h2>
|
||||
NOTE: sending in a port number instead of an opened socket clears the UDP buffer. This only works if the data is being sent at a fast rate. Sending in a UDP Socket reads the first packet in the buffer. <br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
09/10/13: [CT] Updated to receive UDP socket or port number<br />
|
||||
06/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
43
MATLAB/pages/readUDP.html
Normal file
43
MATLAB/pages/readUDP.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-readUDP</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>readUDP</h1>
|
||||
Read Array from UDP Socket
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>location:</b> Either an opened UDP Socket or integer port number</li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>data:</b> UDP uint8 Array. Equal to -998 in the case of an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. socket = openUDP(49005); <br />
|
||||
3. data = readUDP(socket); <br />
|
||||
4. status = closeUDP(socket); <br /><br />
|
||||
|
||||
or <br /> <br />
|
||||
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. data = readUDP(49005); <br />
|
||||
|
||||
<h2>Note</h2>
|
||||
NOTE: sending in a port number instead of an opened socket clears the UDP buffer. This only works if the data is being sent at a fast rate. Sending in a UDP Socket reads the first packet in the buffer.
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
09/08/13: [CT] Added option for either UDP Socket or port number input <br/>
|
||||
06/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
37
MATLAB/pages/requestDREF.html
Normal file
37
MATLAB/pages/requestDREF.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-requestDREF</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>requestDREF</h1>
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>DREFArray:</b> Cell Array of DataRefs to be requested</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> Port on the receiving machine where the data will be sent. Default is 49009 (XPlaneConnect). In general use 49009 to send to the plugin </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*; <br />
|
||||
2. DREFArray = {'sim/cockpit2/controls/yoke_heading_ratio','sim/cockpit2/controls/yoke_roll_ratio'}; <br />
|
||||
3. status = requestDREF( DREFArray, '172.0.100.54' );<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
06/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
MATLAB/pages/selectDATA.html
Normal file
39
MATLAB/pages/selectDATA.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-selectDATA</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>selectDATA</h1>
|
||||
Choose specific X-Plane parameters to be send over UDP
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>index:</b> An array of the values that to be sent. Corresponds to the numbers on the XPlane Output screen (ACTUAL NAME?)</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. Status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. values = [1, 2, 3, 27, 40];
|
||||
3. status = selectDATA(values,'127.0.0.1',49005);<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
04/18/14: [CT] V0.2: Added Versioning<br />
|
||||
06/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
48
MATLAB/pages/sendCTRL.html
Normal file
48
MATLAB/pages/sendCTRL.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-sendCTRL</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>sendCTRL</h1>
|
||||
Send position and orientation update command to X-Plane over UDP. This requires the X-Plane Connect Plugin to be running
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>ctrl:</b> Array of 6 values where:
|
||||
<ul>
|
||||
<li>ctrl(1) Latitudinal Stick [-1,1] </li>
|
||||
<li>ctrl(2) Longitudinal Stick [-1,1] </li>
|
||||
<li>ctrl(3) Pedal [-1, 1] </li>
|
||||
<li>ctrl(4) Throttle [-1, 1] </li>
|
||||
<li>ctrl(5) Gear (0=up, 1=down) </li>
|
||||
<li>ctrl(6) Flaps [0, 1] </li>
|
||||
</ul>
|
||||
<li><b>aircraft number (optional):</b> 0=own aircraft</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. ctrl = [0, 0, 0, 0.8, 0, 0];
|
||||
3. status = sendCTRL(ctrl); % Set position of own aircraft<br />
|
||||
4. status2 = sendCTRL(ctrl,1); % Set position of aircraft 1<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9 Updated to use new xpcPlugin<br />
|
||||
09/26/14: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
46
MATLAB/pages/sendDATA.html
Normal file
46
MATLAB/pages/sendDATA.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-sendDATA</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation%20(MATLAB).html"><-- Back</a><br />
|
||||
<h1>sendDATA</h1>
|
||||
Send X-Plane formatted DATA over UDP. This function is used to change one of the parameters listed in the x-plane udp data screen (see http://www.nuclearprojects.com/xplane/images/xp_datainout.jpg)
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>data:</b> X-Plane formatted data. Is a matlab structure with the following fields:
|
||||
<ul>
|
||||
<li>.h: Header array containing header numbers corresponding to values in the X-Plane UDP Data screen. </li>
|
||||
<li>.d: 2-D Data array. Each row contains eight values corresponding to the header value (.h(1) corresponds to .d(1,:))</li>
|
||||
</ul></li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. Status=1 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. data = struct('h',14,'d',[1,-998,-998,-998,-998,-998,-998,-998]); %Set Gear<br />
|
||||
3. %Send the data array to port 49005 on the computer at IP address 172.0.100.54.<br />
|
||||
4. status = sendDATA(data, '172.0.100.54', 49005);
|
||||
|
||||
<h2>note</h2>
|
||||
Note: send the value -998 to not overwrite that parameter. That is, if -998 is sent, the parameter will stay at the current X-Plane value<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/01/14: [CT] V0.9: updated to function with new xpcPlugin<br />
|
||||
06/10/13: [CT] First created<br /><br />
|
||||
<a href="../Documentation%20(MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
48
MATLAB/pages/sendDREF.html
Normal file
48
MATLAB/pages/sendDREF.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-sendCTRL</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>sendCTRL</h1>
|
||||
Send position and orientation update command to X-Plane over UDP. This requires the X-Plane Connect Plugin to be running
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<ul>
|
||||
<li>data(1) Latitudinal Stick [-1,1] </li>
|
||||
<li>data(2) Longitudinal Stick [-1,1] </li>
|
||||
<li>data(3) Pedal [-1, 1] </li>
|
||||
<li>data(4) Throttle [-1, 1] </li>
|
||||
<li>data(5) Gear (0=up, 1=down) </li>
|
||||
<li>data(6) Flaps [0, 1] </li>
|
||||
</ul>
|
||||
<li><b>aircraft number (optional):</b> 0=own aircraft</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.* <br />
|
||||
2. dataRef = 'sim/aircraft/parts/acf_gear_deploy'; // Landing Gear <br />
|
||||
3. Value = 0; <br />
|
||||
4. status = sendDREF(dataRef, Value); <br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to use new xpcPlugin
|
||||
06/10/13: [CT] Code created<br /><br />
|
||||
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
50
MATLAB/pages/sendPOSI.html
Normal file
50
MATLAB/pages/sendPOSI.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-sendDREF</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>sendPosition</h1>
|
||||
Send position and orientation update command to X-Plane over UDP. This requires the X-Plane Connect Plugin to be running
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>data:</b> Array of 6 values where:
|
||||
<ul>
|
||||
<li>data(1) is the aircraft's Latitude (degrees) </li>
|
||||
<li>data(2) is the aircraft's Longitude (degrees) </li>
|
||||
<li>data(3) is the aircraft's altitude (meters above sea level)</li>
|
||||
<li>data(4) is the aircraft's roll angle (degrees)</li>
|
||||
<li>data(5) is the aircraft's pitch angle (degrees)</li>
|
||||
<li>data(6) is the aircraft's heading/yaw angle (degrees)</li>
|
||||
</ul>
|
||||
<li><b>aircraft number (optional):</b> 0=own aircraft</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. latlon = [37.4185718,-121.935565]; %Lat,lon of NASA Ames Research Center<br />
|
||||
3. alt = 500; %meters above sea level<br />
|
||||
4. orient = [0,20,180]; %Orientation (roll,pitch,yaw/heading). 20 degrees yaw, heading south<br />
|
||||
5. status = sendPOSI([latlon,alt,orient]); % Set position of own aircraft<br />
|
||||
6. status2 = sendPOSI([[latlon(1)+0.005,latlon(2)],alt,orient],1); % Set position of aircraft 1<br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9 Updated to use new xpcPlugin<br />
|
||||
06/10/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
MATLAB/pages/sendSTRU.html
Normal file
39
MATLAB/pages/sendSTRU.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-sendSTRU</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>sendSTRU</h1>
|
||||
Send a MATLAB structure over UDP
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>stru:</b> A MATLAB structure</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> Port on the receiving machine where the data will be sent. Default is 49009 (XPlaneConnect). In general use 49009 to send to the plugin </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. Status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. data = struct('a',[1:20],'b',1.853,'name','Example Structure');<br />
|
||||
3. #Send the data structure to port 49005 on the computer at IP address 172.0.100.54<br />
|
||||
4. status = sendSTRU( data, '172.0.100.54', 49005 ); <br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
08/01/13: [CT] Code created<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
MATLAB/pages/sendUDP.html
Normal file
39
MATLAB/pages/sendUDP.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-sendUDP</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>sendUDP</h1>
|
||||
Send an one dimensional array of type uint8 data over an UDP connection
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>data:</b> 1-D array of type uint8 data to be sent</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. Status=1 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.*;<br />
|
||||
2. data = uint8([1:20]);<br />
|
||||
3. #Send the data array to port 49005 on the computer at IP address 172.0.100.54.<br />
|
||||
4. status = sendUDP( data, '172.0.100.54', 49005 ); <br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
06/10/13: [CT] Code created <br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
37
MATLAB/pages/setConn.html
Normal file
37
MATLAB/pages/setConn.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>XPlaneConnect Toolbox-setConn</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
<h1>setConn</h1>
|
||||
Send a command to set up the port where you will receive data on this computer.
|
||||
|
||||
<h2>Inputs</h2>
|
||||
<ul>
|
||||
<li><b>Receiving Port:</b> Port that data will be sent to in the future for this connection</li>
|
||||
<li><b>IP Address (optional):</b> IP Address of the machine that will receive the data as a character array. Default is '127.0.0.1' (local machine)</li>
|
||||
<li><b>port (optional):</b> 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 </li>
|
||||
</ul>
|
||||
|
||||
<h2>Outputs</h2>
|
||||
<ul>
|
||||
<li><b>status:</b> If there was an error. status<0 means there was an error.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Use</h2>
|
||||
1. import XPlaneConnect.* <br />
|
||||
2. status = setConn(49011); <br />
|
||||
|
||||
<h2>Change Log</h2>
|
||||
10/02/14: [CT] V0.9: Updated to work with updated xpcPlugin<br />
|
||||
04/21/14: [CT] V0.2: First Version<br /><br />
|
||||
<a href="../Documentation (MATLAB).html"><-- Back</a><br />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user