Deleted out of date user guides. The GitHub wiki now provides the information previously contained in these guides.
This commit is contained in:
@@ -1,192 +0,0 @@
|
||||
X-Plane Connect-C (XPC-C) Readme
|
||||
|
||||
DESCRIPTION
|
||||
XPC-C is a series of C functions that facilitate communication with X-Plane.
|
||||
|
||||
-----------------------------------
|
||||
SETUP
|
||||
Before using XPC Functions you must
|
||||
1. Copy the folder "[XPC Directory]/xpcPlugin/XPlaneConnect" to the "[X-Plane Directory]/Resources/plugins" directory.
|
||||
2. Put in X-Plane CD 1 or X-Plane USB Key.
|
||||
3. Start X-Plane.
|
||||
4. #include "xplaneConnect.h"
|
||||
|
||||
-----------------------------------
|
||||
BASIC FUNCTIONS
|
||||
1. openUDP opens a UDP Socket for communication. This is used to send data or receive.
|
||||
INPUT:
|
||||
port (unsigned short): Port Number (ex:49067)
|
||||
xpIP (char *): IP Address of the computer running x-plane
|
||||
xpPort (unsigned short): Port number that the X-Plane/ xpcPlugin Receives on (send -1 for default (49009), Typically xpcPlugin is 49009)
|
||||
|
||||
OUTPUT:
|
||||
socket (xpcSocket): The Opened Socket
|
||||
|
||||
USE:
|
||||
unsigned short portNumber = 49067;
|
||||
struct xpcSocket theSocket = openUDP(portNumber, “127.0.0.1”, 49009);
|
||||
|
||||
2. closeUDP closes an opened UDP Socket for communication. This is to be done after the program has finished using that socket. Use opedUDP to open socket.
|
||||
INPUT:
|
||||
socket (xpcSocket): The Opened Socket
|
||||
|
||||
USE:
|
||||
closeUDP(theSocket);
|
||||
|
||||
3. setCONN sets the return port for requested datarefs.
|
||||
INPUT:
|
||||
socket (xpcSocket): Socket to use to send the command
|
||||
recPort (unsigned Short): Port number for requested dataref values to be sent to
|
||||
|
||||
OUTPUT:
|
||||
status (short): 0 if successful
|
||||
|
||||
USE:
|
||||
char IP[16] = "127.0.0.1";
|
||||
struct xpcSocket theSocket = openUDP(49067);
|
||||
setCONN(theSocket,IP,49009,49022); // Sets receive address to 49022;
|
||||
|
||||
4. pauseSim pauses/resumes the x-plane simulation
|
||||
INPUT:
|
||||
socket (xpcSocket): Socket to use to send the command
|
||||
pause (short): 1=Pause, 0=Resume
|
||||
|
||||
OUTPUT:
|
||||
status (short): 0 if successful
|
||||
|
||||
USE:
|
||||
char IP[16] = "127.0.0.1";
|
||||
struct xpcSocket theSocket = openUDP(49067);
|
||||
pauseSim(theSocket, IP, 49009, 1);
|
||||
|
||||
5. sendDATA set the value of a state in the "DATA Input & Output" Table
|
||||
INPUT:
|
||||
socket (xpcSocket): Socket to use to send the command
|
||||
dataArray (float[][9]): Array of data to be sent. The first element of each row is the item # (corresponding to the number on the X-Plane "DATA Input & Output" Screen). Send -999 to leave the value unchanged.
|
||||
rows (unsigned short): Number of rows of data being sent
|
||||
|
||||
OUTPUT:
|
||||
status (short): 0 if successful
|
||||
|
||||
USE:
|
||||
char IP[16] = "127.0.0.1";
|
||||
struct xpcSocket theSocket = openUDP(49067);
|
||||
float data[] = {{14, 1, -999, -999, -999, -999, -999, -999, -999},{25, 0.8, 0.8, -999, -999, -999, -999, -999, -999}}; // Gear and Throttle
|
||||
sendDATA(theSocket,IP,49009,data,2);
|
||||
|
||||
6. sendPOSI set the position of an aircraft
|
||||
INPUT:
|
||||
socket (xpcSocket): Socket to use to send the command
|
||||
ACNum (short): Number of aircraft to be moved, use 0 for main aircraft (ownPlane).
|
||||
numArgs (short): Number of Arguments to be sent (size of position array)
|
||||
position (float []): Arguments corresponding to aircrafts position
|
||||
position[0] = Latitude
|
||||
position[1] = Longitude
|
||||
position[2] = Altitude (m MSL)
|
||||
position[3] = Roll (deg)
|
||||
position[4] = Pitch (deg)
|
||||
position[5] = True Heading (deg)
|
||||
position[6] = Gear (0=up, 1=down)
|
||||
|
||||
OUTPUT:
|
||||
status (short): 0 if successful
|
||||
|
||||
USE:
|
||||
char IP[16] = "127.0.0.1";
|
||||
struct xpcSocket theSocket = openUDP(49067);
|
||||
float posit[] = {37.5242422, -122.06899, 2500, 0, 0, 0, 1};
|
||||
sendPOSI(theSocket, IP, 49009, 7, posit);
|
||||
|
||||
7. sendCTRL send control commands to the aircraft
|
||||
INPUT:
|
||||
socket (xpcSocket): Socket to use to send the command
|
||||
numArgs (short): Number of Arguments to be sent (size of control array)
|
||||
control (float []): Arguments corresponding to aircraft control command
|
||||
control[0] = Latitudinal Stick [-1,1]
|
||||
control[1] = Longitudinal Stick [-1,1]
|
||||
control[2] = Pedal [-1, 1]
|
||||
control[3] = Throttle [-1, 1]
|
||||
control[4] = Gear (0=up, 1=down)
|
||||
control[5] = Flaps [0, 1]
|
||||
|
||||
OUTPUT:
|
||||
status (short): 0 if successful
|
||||
|
||||
USE:
|
||||
char IP[16] = "127.0.0.1";
|
||||
struct xpcSocket theSocket = openUDP(49067);
|
||||
float ctrl[] = {0, 0, 0, 0.8, 0, 1};
|
||||
sendCTRL(theSocket, IP, 49009, 6, ctrl);
|
||||
|
||||
8. sendDREF set the value of a specific dataref. Dataref list found at http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html
|
||||
INPUT:
|
||||
socket (xpcSocket): Socket to use to send the command
|
||||
dataRef (char *): Dataref to be set (with or without "sim/" preceeding it)
|
||||
length (short): length of dataref string
|
||||
values (float *): Array of values to be sent
|
||||
length2 (short): Number of values in values array
|
||||
|
||||
OUTPUT:
|
||||
status (short): 0 if successful
|
||||
|
||||
USE:
|
||||
char IP[16] = "127.0.0.1";
|
||||
struct xpcSocket theSocket = openUDP(49067);
|
||||
char theDREF[] = "cockpit/switches/gear_handle_status";
|
||||
float value = 1;
|
||||
sendDREF(theSocket, IP, 49009, theDREF, strlen(theDREF), &value, 1);
|
||||
|
||||
9. requestDREF Request the value of specific dref(s). Dataref list found at http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html
|
||||
INPUT:
|
||||
outSocket (xpcSocket): Socket to use to send the command
|
||||
inSocket (xpcSocket): Socket to use to receive the result
|
||||
DREFArray (char[][100]): Array of DataRefs to be requested
|
||||
DREFSizes (int[]): Array of string lengths for each DataRef in DREFArray
|
||||
listLength (short): Number of DataRefs in DREFArray
|
||||
result (*float[]): Array of pointers to the values returned
|
||||
arrayLen (short[]): Array where each element corresponds to the number of elements in the float array.
|
||||
|
||||
OUTPUT:
|
||||
length (short): Number of Values Returned
|
||||
|
||||
USE:
|
||||
char IP[16] = "127.0.0.1";
|
||||
struct xpcSocket theSocket = openUDP(49067);
|
||||
char DREFArray[][100] = {"sim/cockpit/switches/gear_handle_status"};
|
||||
requestDREF(theSocket, IP, 49009, DREFArray, strlen(DREFArray[0]),1);
|
||||
|
||||
10. sendTEXT write some text to the screen.
|
||||
INPUT:
|
||||
outSocket (xpcSocket): Socket to use to send the command
|
||||
message (char*): The string to be wrote to the screen
|
||||
x (int): The x position where the text will be written. Set to -1 to use default position.
|
||||
y (int): The y position where the text will be written. Set to -1 to use default position.
|
||||
|
||||
-----------------------------------
|
||||
ADVANCED FUNCTIONS (These are mostly used by the xpcPlugin to read requests)
|
||||
1. sendUDP
|
||||
2. readUDP
|
||||
3. readDATA
|
||||
4. parseDATA
|
||||
5. readPOSI
|
||||
6. parsePOSI
|
||||
7. readCTRL
|
||||
8. parseCTRL
|
||||
9. readRequest
|
||||
10. parseRequest
|
||||
11. parseDREF
|
||||
12. readDREF
|
||||
|
||||
-----------------------------------
|
||||
PLANNED FUNCTIONS
|
||||
1. sendVIEW
|
||||
2. parseVIEW
|
||||
3. readVIEW
|
||||
4. sendWYPT
|
||||
5. parseWYPT
|
||||
6. readWYPT
|
||||
7. selectDATA
|
||||
|
||||
-----------------------------------
|
||||
CONTACT
|
||||
Email Christopher Teubert (christopher.a.teubert@nasa.gov) with any questions.
|
||||
@@ -1,115 +0,0 @@
|
||||
<!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</title>
|
||||
<meta name="Generator" content="Cocoa HTML Writer">
|
||||
<meta name="CocoaVersion" content="1138.51">
|
||||
</head>
|
||||
<body>
|
||||
<h1>XPC-MATLAB</h1>
|
||||
Chris Teubert (Christopher.A.Teubert@nasa.gov)<br />
|
||||
|
||||
<h2>Summary</h2>
|
||||
XPC-MATLAB is a series of MATLAB functions that facilitate communication with X-Plane. This toolbox allows for the real-time application of active control to an XPlane simulation, flight visualization, record state during a flight, or interact with a mission using UDP.
|
||||
|
||||
<h2>Table of Contents</h2>
|
||||
<ol>
|
||||
<li><a href="#Func">Functions</a></li>
|
||||
<li><a href="#Setup">Setup</a>
|
||||
<li><a href="#Use">Use</a></li>
|
||||
<li><a href="#Example">Example</a></li>
|
||||
<li><a href="#Future">Future Work</a></li>
|
||||
<li><a href="#Notice">Notices and Disclaimers</a></li>
|
||||
<li><a href="#Changes">Change Log</a></li>
|
||||
</ol>
|
||||
|
||||
<a id="Func"><h2>Functions</h2></a>
|
||||
<h3>Basic Package</h3>
|
||||
|
||||
<table><tr><td width="150px">
|
||||
- <a href="pages/sendDATA.html"><b>sendDATA:</b></a></td><td>
|
||||
Send X-Plane Formatted DATA over UDP</td></tr><tr><td>
|
||||
- <a href="pages/sendPOSI.html"><b>sendPOSI:</b></a></td><td>
|
||||
Send Position and orientation update command to X-Plane over UDP for any aircraft (own or traffic)</td></tr><tr><td>
|
||||
- <a href="pages/sendCTRL.html"><b>sendCTRL:</b></a></td><td>
|
||||
Send control commands to X-Plane over UDP for any aircraft (own or traffic)</td></tr><tr><td>
|
||||
- <a href="pages/sendDREF.html"><b>sendDREF:</b></a></td><td>
|
||||
Set any X-Plane internal variable (dataref) over UDP </td></tr><tr><td>
|
||||
- <a href="pages/selectDATA.html"><b>selectDATA:</b></a></td><td>
|
||||
Choose specific X-Plane DATA parameters to be sent by X-Plane over UDP</td></tr><tr><td>
|
||||
- <a href="pages/setConn.html"><b>setConn:</b></a></td><td>
|
||||
Sets the return port for requested datarefs.</td></tr><tr><td>
|
||||
- <a href="pages/pauseSim.html"><b>pauseSim:</b></a></td><td>
|
||||
Pause simulation</td></tr><tr><td>
|
||||
- <a href="pages/openUDP.html"><b>openUDP:</b></a></td><td>
|
||||
Script that opens an UDP Socket</td></tr><tr><td>
|
||||
- <a href="pages/closeUDP.html"><b> closeUDP:</b></a></td><td>
|
||||
Script that closes an UDP Socket</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Advanced/Special-Use Functions</h3>
|
||||
<table><tr><td width="150px">
|
||||
- <a href="pages/clearUDPBuffer.html"><b> clearUDPBuffer:</b></a></td><td>
|
||||
Script that clears an UDP Socket Buffer</td></tr><tr><td>
|
||||
- <a href="pages/readDATA.html"><b>readDATA:</b></a></td><td>
|
||||
Read X-Plane Formatted Data from UDP Socket</td></tr><tr><td>
|
||||
- <a href="pages/readUDP.html"><b>readUDP:</b></a></td><td>
|
||||
Read Array from UDP Socket</td></tr><tr><td>
|
||||
- <a href="pages/sendSTRU.html"><b>sendSTRU:</b></a></td><td>
|
||||
Send a MATLAB structure over UDP</td></tr><tr><td>
|
||||
- <a href="pages/sendUDP.html"><b>sendUDP:</b></a></td><td>
|
||||
Send array over UDP</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Future</h3>
|
||||
<table><tr><td width="150px">
|
||||
- <a href="pages/requestDREF.html"><b>requestDREF:</b></a></td><td>
|
||||
Request the value of a specific data ref</td></tr><tr><td>
|
||||
- <b>drawWaypoint:</b></td><td>
|
||||
NOT FUNCTIONAL</td></tr>
|
||||
</table>
|
||||
|
||||
<a id="Setup"><h2>Setup</h2></a>
|
||||
Before using XPC Functions you must
|
||||
1. Install X-Plane (http://www.x-plane.com)
|
||||
2. Copy the file xpcPlugin.xpl to the "[X-Plane Directory]/Resources/plugins" directory.
|
||||
a. For Mac xpcPlugin can be found in the "[XPlaneConnect]/xpcPlugin/Mac" directory.
|
||||
a. For Windows xpcPlugin can be found in the "[XPlaneConnect]/xpcPlugin/Win" directory.
|
||||
3. Insert X-Plane CD 1 or X-Plane USB Key.
|
||||
4. Start X-Plane.
|
||||
5. import XPlaneConnect.*
|
||||
|
||||
<a id="Example"><h2>Examples</h2></a>
|
||||
<h3>Files</h3>
|
||||
TO BE ADDED
|
||||
<h3>Description</h3>
|
||||
|
||||
<a id="Future"><h2>Future Work</h2></a>
|
||||
<ul>
|
||||
<li> </li>
|
||||
</ul>
|
||||
|
||||
<a id="Notice"><h2>Notices and Disclaimers</h2></a>
|
||||
<b>Notices:</b><br />
|
||||
Copyright ©2013-2014 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.<br />
|
||||
|
||||
<br/><b>Disclaimers:</b>
|
||||
|
||||
<p><b>No Warranty:</b> THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, AND DISTRIBUTES IT "AS IS."</p>
|
||||
|
||||
<p><b>Waiver and Indemnity:</b> RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT.</p>
|
||||
|
||||
<br /><b>X-Plane API</b><br/>
|
||||
Copyright (c) 2008, Sandy Barbour and Ben Supnik All rights reserved.<br/>
|
||||
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
||||
<ul>
|
||||
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
|
||||
<li>Neither the names of the authors nor that of X-Plane or Laminar Research may be used to endorse or promote products derived from this software without specific prior written permission from the authors or Laminar Research, respectively.</li>
|
||||
</ul>
|
||||
|
||||
<p>X-Plane API SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,37 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,36 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,39 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,36 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,59 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,43 +0,0 @@
|
||||
<!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 />
|
||||
@@ -1,37 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,39 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,48 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,46 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,48 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,50 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,39 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,39 +0,0 @@
|
||||
<!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>
|
||||
@@ -1,37 +0,0 @@
|
||||
<!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