Skip to content
Snippets Groups Projects
Commit 3bea0765 authored by Andy Snawerdt's avatar Andy Snawerdt
Browse files

Updated model logging verification

parent 8b575b6a
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ fname = '';
% PLOTTING SWITCHES - set them to 0 or 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
plot = 1; % to choose plotting
separatePlot = 0; % to generate separatePlots
separatePlot = 1; % to generate separatePlots
multiPlot = 1; % to generate multiPlot
subPlot = 1; % to generate subPlots
clearFigs = 0; % to close all the plots (needed only by the GUI)
......@@ -93,7 +93,7 @@ expData = parse_log(params.file.pathName, params);
%% plotting routines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% plot the data accoriding to the plotting parameters set
%
%
plot_data(expData, params.plotting);
%% creating the main structure to be stored in the workspace %%%%%%%%%%%%%
%
......
File deleted
temp = 0;
temp = 1;
% Log Analysis Toggle
logAnalysisToggle = 1; % 1 for log analysis, 0 for normal operation
......@@ -181,7 +181,7 @@ elseif logAnalysisToggle == 1 && temp == 1
% window.
%
%fname = 'sampleLogFile.txt';
fname = 'sampleLogFile.txt';
fname = '';
fpath = '';
if(isempty(fname))
......@@ -208,8 +208,8 @@ elseif logAnalysisToggle == 1 && temp == 1
y_error = timeseries(y_setpoint - y_position, time);
% Determine z position error
z_setpoint = dataStruct.Z_Setpoint_Constant.data;
z_position = dataStruct.VRPN_Z_Constant.data;
z_setpoint = dataStruct.Alt_Setpoint_Constant.data;
z_position = dataStruct.VRPN_Alt_Constant.data;
z_error = timeseries(z_setpoint - z_position, time);
% Determine pitch error
......@@ -243,10 +243,10 @@ elseif logAnalysisToggle == 1 && temp == 1
yawrate_error = timeseries(yawrate_setpoint - yawrate_value, time);
% Pull motor commands from log
x_command = dataStruct.Pitch_Rate_PID_Correction;
y_command = dataStruct.Roll_Rate_PID_Correction;
z_command = dataStruct.Altitude_PID_Correction;
yaw_command = dataStruct.Yaw_Rate_PID_Correction;
x_command = dataStruct.Pitch_Rate_PID_Correction.data;
y_command = dataStruct.Roll_Rate_PID_Correction.data;
z_command = dataStruct.Altitude_PID_Correction.data;
yaw_command = dataStruct.Yaw_Rate_PID_Correction.data;
% Determine signal mix PWM values
PWM0 = dataStruct.Signal_Mixer_PWM_0.data;
......
......@@ -43,6 +43,7 @@ identifier = string(1);
if (regexp(identifier,'%'))
foundHeaders = 1;
% this is a line of headers; extract headers:
string = strrep(string,' ', '_');
headers = strsplit(string);
headers{1} = strrep(headers{1},'%', '');
numOfHeaders = length(headers);
......@@ -106,6 +107,5 @@ for i = 1:numOfHeaders
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment