Fixed data structure, display, and control bug

This commit is contained in:
Chris Teubert
2015-03-30 14:45:49 -07:00
parent 85fdcbe3dc
commit 87c66cafdf

View File

@@ -8,7 +8,8 @@ import XPlaneConnect.*
%% Setup %% Setup
% Create variables and open connection to X-Plane % Create variables and open connection to X-Plane
disp('xplaneconnect Example Script\n- Setting up Simulation'); disp('xplaneconnect Example Script-');
disp('Setting up Simulation');
Socket = openUDP(49005); Socket = openUDP(49005);
%% Set position of the player aircraft %% Set position of the player aircraft
disp('Setting position'); disp('Setting position');
@@ -25,12 +26,12 @@ disp('Setting rates');
% Alpha Velocity PQR % Alpha Velocity PQR
data = struct('h',[18, 3, 16],... data = struct('h',[18, 3, 16],...
'd',[0,-999,0,-999,-999,-999,-999,-999;... % Alpha data 'd',[0,-999,0,-999,-999,-999,-999,-999;... % Alpha data
3,130,130,130,130,-999,-999,-999;... % Velocity data 130,130,130,130,-999,-999,-999,-999;... % Velocity data
16,0,0,0,-999,-999,-999,-999]); % PQR data 0,0,0,-999,-999,-999,-999,-999]); % PQR data
sendDATA(data); sendDATA(data);
%% Set CTRL %% Set CTRL
% Throttle % Throttle
CTRL = [0,0,0.8]; CTRL = [0,0,0,0.8];
sendCTRL(CTRL); sendCTRL(CTRL);
pause(5); pause(5);
pauseSim(0); pauseSim(0);