Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MechaRaptor - Data Processing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
tlambert
MechaRaptor - Data Processing
Commits
e38fee5c
Verified
Commit
e38fee5c
authored
2 years ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
chore: remove unused function
parent
e1f53159
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
process_wt.m
+0
-130
0 additions, 130 deletions
process_wt.m
with
0 additions
and
130 deletions
process_wt.m
deleted
100644 → 0
+
0
−
130
View file @
e1f53159
function
res
=
process
_
wt
(
idFile
,
inputFiles
)
%
PROCESS
_
WT
Processing
of
Wind
Tunnel
data
.
%
This
code
pareses
processes
and
filters
the
raw
wind
tunnel
data
.
If
multiple
files
are
%
loaded
,
it
compares
their
mean
measurements
.
%
-----
%
%
Syntax
:
%
rotare
()
prompts
the
user
to
select
a
configuration
file
and
then
execute
Rotare
based
on
%
the
loaded
file
.
%
%
rotare
(
configFile
)
runs
Rotare
directly
based
on
the
parameters
specified
in
the
file
%
`configFile`
.
%
%
Inputs
:
%
resDir
:
Base
directory
for
results
(
typically
<
YYYY
>-
Series
<
X
>
)
.
%
subDir
:
Subdirectory
(
'
calibration
',
'
runs
'
)
.
Can
be
left
empty
([])
%
filebase
:
Base
filename
to
look
for
%
%
See
also
:
readdata
.
%
----------------------------------------------------------------------------------------------
%
TODO
:
%
1.
Load
identification
table
%
2.
Loop
for
all
files
specified
in
input
%
3.
Look
into
table
to
associate
the
correct
data
%
4.
Analyze
,
plot
,
etc
.
%
%
----------------------------------------------------------------------------------------------
%
(
c
)
Copyright
2022
University
of
Liege
%
Author
:
Thomas
Lambert
<
t
.
lambert
@
uliege
.
be
>
%
ULiege
-
Aeroelasticity
and
Experimental
Aerodynamics
%
MIT
License
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close
all
;
clc
;
%
Defaults
and
constants
DT
=
1
/
1000
;
%
Acquisition
step
(
acquisition
@
1
kHz
)
,
[
s
]
SURFACE
=
2
*
0.2
*
0.050
;
%
Total
wing
surface
(
per
module
)
,
[
m
^
2
]
WING
_
SEP
=
0.03
;
%
Wing
separation
distance
(
from
TE1
to
LE2
)
,
[
m
]
%
==============================================================================================
%
=====================================
Input
checks
===========================================
%
==============================================================================================
%
Get
filenames
if
nargin
<
2
[
filenames
,
filepaths
]
=
uigetfile
({
'*.
txt
;
*.
csv
',
'
Text
Files
(*.txt, *.csv)'}, ...
'Select all wind tunnel test-files to load', ...
'MultiSelect', 'on');
filepaths = repmat(string(filepaths), 1, length(filenames));
else
fullFiles = string(inputFiles);
% Look for files
allFiles = [];
for i = 1:numel(fullFiles)
dummy = dir(fullFiles(i)); % List files properly
if isempty(dummy)
warning('MATLAB:process_wt:FileNotFound', ...
'Could not find file %s.', fullFiles(i));
end
allFiles = [allFiles; dummy];
end
if isempty(allFiles)
error('MATLAB:parsefileinputs:noFilesFound', ...
'Impossible to find ANY file matching the input arguments.');
end
% Output the proper file names and path
filenames = cell(1, length(allFiles));
filepaths = cell(1, length(allFiles));
for i = 1:length(allFiles)
filenames{i} = allFiles(i).name;
filepaths{i} = allFiles(i).folder;
end
end
allFiles = fullfile(filepaths, filenames);
% clearvars -except allFiles idFile DT SURFACE;
% Load identification table
opts = detectImportOptions(idFile);
opts.VariableNamesLine = 3;
opts.VariableUnitsLine = 4;
opts.DataLines = [5 Inf];
idTable = readtable(idFile, opts);
% Read and parse all files,
res(length(allFiles)) = struct;
for iFile = 1:length(allFiles)
[res(iFile).forces, res(iFile).moments] = readdata(allFiles(iFile), idTable);
res(iFile).meanFor = mean(res(iFile).forces);
res(iFile).meanMom = mean(res(iFile).moments);
res(iFile).cFor = mean(res(iFile).forces);
res(iFile).cMom = mean(res(iFile).moments);
end
% Plot
for iFile = 1:length(allFiles)
nts = size(res(iFile).forces, 1);
time = linspace(0, DT * nts, nts);
size(res(iFile).forces(:, 1, 1));
figure;
subplot(211);
hold on;
plot(time, res(iFile).forces(:, 1, 1));
plot(time, res(iFile).forces(:, 2, 1));
plot(time, res(iFile).forces(:, 3, 1));
hold off;
legend('Fx1', 'Fy1', 'Fz1');
Vinf = 0; % FIXME
title(['Vitesse = ', Vinf, ' m/s']);
% ylim([-5 50])
subplot(212);
hold on;
plot(time, res(iFile).forces(:, 1, 2));
plot(time, res(iFile).forces(:, 2, 2));
plot(time, res(iFile).forces(:, 3, 2));
hold off;
legend('Fx2', 'Fy2', 'Fz2');
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment