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
4a825834
Verified
Commit
4a825834
authored
2 years ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
fix(analysis): bugs in coeff calc
parent
14dab9d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resultsanalysis.m
+8
-5
8 additions, 5 deletions
resultsanalysis.m
utils/analysis/findwingphase.m
+5
-0
5 additions, 0 deletions
utils/analysis/findwingphase.m
utils/analysis/removeinertia.m
+3
-3
3 additions, 3 deletions
utils/analysis/removeinertia.m
with
16 additions
and
8 deletions
resultsanalysis.m
+
8
−
5
View file @
4a825834
...
...
@@ -83,7 +83,6 @@ function ResData = getmeancoefficients(ResData)
% Transform forces/moments into coefficients
ResData
(
i
,
j
)
=
calccoeff
(
ResData
(
i
,
j
));
end
end
end
...
...
@@ -93,18 +92,22 @@ function ResData = calccoeff(ResData)
POSITIONS
=
{
'Front'
,
'Aft'
};
CHORD
=
0.05
;
SPAN
=
2
*
0.2
;
C_TO_K
=
273.15
;
if
~
isempty
(
ResData
.
Phase
.
idx
)
for
i
=
1
:
length
(
ResData
.
Phase
.
idx
)
for
i
=
1
:
length
(
ResData
.
Phase
)
if
~
isempty
(
ResData
.
Phase
(
i
)
.
idx
)
for
j
=
1
:
length
(
POSITIONS
)
dens
=
airdensity
(
ResData
.
Testcase
.
temp
,
ResData
.
Testcase
.
press
);
dens
=
airdensity
(
ResData
.
Testcase
.
temp
+
C_TO_K
,
ResData
.
Testcase
.
press
);
speed
=
ResData
.
Testcase
.
airspeed
;
coeffF
=
forcetocoeff
(
ResData
.
Phase
(
i
)
.
(
POSITIONS
{
j
})
.
forces
,
...
dens
,
speed
,
CHORD
,
SPAN
,
'force'
);
coeffM
=
forcetocoeff
(
ResData
.
Phase
(
i
)
.
(
POSITIONS
{
j
})
.
moments
,
...
dens
,
speed
,
CHORD
,
SPAN
,
'moment'
);
ResData
.
Phase
(
i
)
.
(
POSITIONS
{
j
})
.
cF
=
coeffF
;
ResData
.
Phase
(
i
)
.
(
POSITIONS
{
j
})
.
cM
=
coeffM
;
end
end
end
end
This diff is collapsed.
Click to expand it.
utils/analysis/findwingphase.m
+
5
−
0
View file @
4a825834
...
...
@@ -126,6 +126,11 @@ function signalRange = findsyncedpeaks(signal1, signal2, nPeriodIdx, offset, nPe
% Signal ranges where it is properly synchronized
signalRange
=
peakLocs1
([
offsetIdx
-
1
,
offsetIdx
+
1
]);
% FIXME: Hackyway to make it work
if
numel
(
signalRange
)
==
2
signalRange
=
signalRange
'
;
end
if
DEBUG
peakLocs
=
peakLocs1
(
offsetIdx
);
% Location of the peaks
figure
;
...
...
This diff is collapsed.
Click to expand it.
utils/analysis/removeinertia.m
+
3
−
3
View file @
4a825834
...
...
@@ -17,9 +17,9 @@ function ResData = removeinertia(ResData, ResDataWO, field)
for
i
=
1
:
length
(
ResData
.
Phase
)
if
~
isempty
(
ResData
.
Phase
(
i
)
.
idx
)
for
j
=
1
:
size
(
ResData
.
Phase
(
i
)
.
idx
,
1
)
syncedRange
=
ResData
.
Phase
(
i
)
.
idx
(
1
):
ResData
.
Phase
(
i
)
.
idx
(
2
);
meanF
(
j
,
:)
=
mean
(
ResData
WO
.
(
field
)
.
forces
(
syncedRange
));
meanM
(
j
,
:)
=
mean
(
ResData
WO
.
(
field
)
.
moments
(
syncedRange
));
syncedRange
=
ResData
.
Phase
(
i
)
.
idx
(
j
,
1
):
ResData
.
Phase
(
i
)
.
idx
(
j
,
2
);
meanF
(
j
,
:)
=
mean
(
ResData
.
(
field
)
.
forces
(
syncedRange
,
:
));
meanM
(
j
,
:)
=
mean
(
ResData
.
(
field
)
.
moments
(
syncedRange
,
:
));
end
ResData
.
Phase
(
i
)
.
(
field
)
.
rawF
=
mean
(
meanF
);
ResData
.
Phase
(
i
)
.
(
field
)
.
rawM
=
mean
(
meanM
);
...
...
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