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
88009f4e
Verified
Commit
88009f4e
authored
2 years ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
feat(loadtunnel): remove trim from loadtunnel
parent
058a531c
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
utils/loadtunnel.m
+1
-26
1 addition, 26 deletions
utils/loadtunnel.m
with
1 addition
and
26 deletions
utils/loadtunnel.m
+
1
−
26
View file @
88009f4e
...
@@ -2,7 +2,6 @@ function tunnelData = loadtunnel(tunnelFile, cutoff)
...
@@ -2,7 +2,6 @@ function tunnelData = loadtunnel(tunnelFile, cutoff)
% LOADTUNNEL Load the Wind Tunnel data and clean it.
% LOADTUNNEL Load the Wind Tunnel data and clean it.
% This function loads the WindTunnel data. Then it:
% This function loads the WindTunnel data. Then it:
% - applies a low-pass filter to clean the signal
% - applies a low-pass filter to clean the signal
% - trim the instants before the flapping starts
% -----
% -----
% Output format:
% Output format:
% The output array has one row per timestep. The columns are ordered as follows:
% The output array has one row per timestep. The columns are ordered as follows:
...
@@ -48,12 +47,8 @@ function tunnelData = loadtunnel(tunnelFile, cutoff)
...
@@ -48,12 +47,8 @@ function tunnelData = loadtunnel(tunnelFile, cutoff)
% Calibrate
% Calibrate
calibrated
=
calibrate
(
filtered
);
calibrated
=
calibrate
(
filtered
);
% Trim
trimmed
=
trim
(
calibrated
,
SAMPLING
);
% TODO
% Return cleaned data
% Return cleaned data
tunnelData
=
trimmed
;
tunnelData
=
calibrated
;
end
end
function
rawTable
=
loadcsv
(
file
)
function
rawTable
=
loadcsv
(
file
)
...
@@ -99,23 +94,3 @@ function filtered = filterwt(raw, cutoff, sampling)
...
@@ -99,23 +94,3 @@ function filtered = filterwt(raw, cutoff, sampling)
% Apply filter
% Apply filter
filtered
=
filtfilt
(
bb
,
aa
,
raw
(:,
:));
filtered
=
filtfilt
(
bb
,
aa
,
raw
(:,
:));
end
end
function
trimmed
=
trim
(
raw
,
sampling
)
% TRIM Trim the raw data so they begin when motion is starting
% First we find the peaks in Fz. Then we cut everything up until un time the sampling rate
% before the first peak is found.
trimmed
=
raw
;
maximums
=
max
(
raw
);
for
i
=
[
3
,
3
+
6
]
[
peaks
{
i
},
locs
{
i
}]
=
findpeaks
(
trimmed
(:,
i
),
'MinPeakHeight'
,
0.05
*
maximums
(
i
));
end
firstPeakLoc
=
min
(
locs
{
3
}(
1
),
locs
{
3
+
6
}(
1
));
% Trim
trimmed
(
1
:
max
(
firstPeakLoc
-
sampling
,
0
)
+
1
)
=
[];
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