Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Rotor database
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
Rotare
Rotor database
Compare revisions
c55c6311bf0e4cc1065ee21123d25bf56f535cdf to bafadead8329f955bc8dfd676a996315d9b9b000
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
rotare/rotor-db
Select target project
No results found
bafadead8329f955bc8dfd676a996315d9b9b000
Select Git revision
Swap
Target
rotare/rotor-db
Select target project
rotare/rotor-db
1 result
c55c6311bf0e4cc1065ee21123d25bf56f535cdf
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
refact(data): reorder metadata
· 3dbf074c
Thomas Lambert
authored
2 years ago
3dbf074c
feat(scripts): matlab importer
· bafadead
Thomas Lambert
authored
2 years ago
bafadead
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+3
-1
3 additions, 1 deletion
CHANGELOG.md
database/Caradonna1981_data.csv
+1
-1
1 addition, 1 deletion
database/Caradonna1981_data.csv
database/Knight1937_data.csv
+1
-1
1 addition, 1 deletion
database/Knight1937_data.csv
scripts/csv2mat.m
+74
-0
74 additions, 0 deletions
scripts/csv2mat.m
with
79 additions
and
3 deletions
CHANGELOG.md
View file @
bafadead
...
...
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
][
keep_chglog
]
, and this project adheres
to
[
Semantic Versioning
][
sem_ver
]
. In the context of this repo, the semantic
versioning is based mainly on the CSV files. Major releases indicate a breaking
change in the formatting of the CSV files (column rorder, renaming, etc). Minor
change in the formatting of the CSV files (column r
e
order, renaming, etc). Minor
versions indicate addition of new data.
## [Unreleased]
...
...
@@ -19,6 +19,8 @@ format to use for the geometry files.
-
Caradonna1981: Geometry and (partial) data
-
Landgrebe1971: Geometry and data
-
csv2mat: Script to load csv files into Matlab tables
### Changed
### Deprecated
...
...
This diff is collapsed.
Click to expand it.
database/Caradonna1981_data.csv
View file @
bafadead
# Caradonna & Tung, Experimental and Analytical Studies of a Model Helicopter Rotor in Hover, 1981 (NASA-TM-81232)
# Tags: hover, incomplete
# deg, rpm, -, -, -, -, -, -, -
collective pitch, rpm, CL@0.5, CL@0.68, CL@0.80, CL@0.89, CL@0.96, CT, notes
deg, rpm, -, -, -, -, -, -, -
2, 1250, 0.0394, 0.0389, 0.0631, 0.0346, 0.0471, ,
2, 1500, 0.0374, 0.0503, 0.0651, 0.0319, 0.0481, ,
2, 1750, 0.0352, 0.0571, 0.0631, 0.0333, 0.0496, ,
...
...
This diff is collapsed.
Click to expand it.
database/Knight1937_data.csv
View file @
bafadead
# Knight & Hefner, Static Thrust Analysis of the Lifting Airscrew, 1937 (NACA-TN-626)
# Tags: hover
# -, -, fps, -, -, deg, -, -, -, -, rc/R, -
number of blades, solidity, tip speed, tip reynolds, tip mach, collective pitch, CT, CP, CT/sigma, CP/sigma, root cutout, notes
-, -, fps, -, -, deg, -, -, -, -, rc/R, -
2, 0.04244, 251.3, 267825, 0.22511, 0.0, 0.000000, 0.0000540, 0.00000, 0.001272, 0.150,
2, 0.04244, 251.3, 267825, 0.22511, 1.0, 0.000140, 0.0000555, 0.00330, 0.001308, 0.150,
2, 0.04244, 251.3, 267825, 0.22511, 2.0, 0.000437, 0.0000625, 0.01028, 0.001473, 0.150,
...
...
This diff is collapsed.
Click to expand it.
scripts/csv2mat.m
0 → 100644
View file @
bafadead
function
RawTable
=
csv2mat
(
datafile
,
autosave
)
% csv2mat Import a CSV file into a Matlab Table (and save it as a MAT-file).
% This function loads CSV data files into a Matlab Table and add some useful metadata whenever
% possible to add more context.
% The resulting table is then returned and saved as a MAT-file automatically (if the users
% choses to).
% -----
%
% Notes:
% The input CSV file <strong>must</strong> be formatted as follow:
% # Title
% # Tags: tags
% heading1, heading2, heading3, ...
% unit1 , unit2 , unit3, ...
% data , data , data , ...
% data , data , data , ...
% ... , ... , ... , ...
% -----
%
% Syntax:
% RawTable = csv2mat(datafile) loads the file `datafile` into the table `RawTable`.
% RawTable = csv2mat(datafile, 'save') loads the file `datafile` into the table `RawTable` and
% save the table in a MAT-file automatically.
%
% Inputs:
% datafile : Name of the csv or txt file containing the data (ex: 'mydata.csv')
% autosave : (optional) If false (default), table will not be saved. If anything else than
% 'false', the table will be saved to a MAT-file.
%
% Outputs:
% RawTable : A Table corresponding to the CSV data provided in input.
%
% Examples:
% ExpDataTable = csv2mat('experiment1.csv')
% ExpDataTable = csv2mat('experiment1.csv', true)
% ExpDataTable = csv2mat('experiment1.csv', 'save')
% -----------------------------------------
% (c) Copyright 2022 University of Liege
% Author: Thomas Lambert <t.lambert@uliege.be>
% ULiege - Aeroelasticity and Experimental Aerodynamics
% MIT License
% Repo: https://gitlab.uliege.be/thlamb/rotare
% Docs: https://gitlab.uliege.be/thlamb/rotare-doc
% Issues: https://gitlab.uliege.be/thlamb/rotare/-/issues
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Input checks
if
~
exist
(
datafile
,
'file'
)
error
(
'csv2mat:FileNotFound'
,
'The file
''
%s
''
was not found in Matlab
''
s PATH.'
,
datafile
);
end
if
nargin
<
2
autosave
=
false
;
end
% Keep file path and name for MAT-file
[
filepath
,
filename
,
~
]
=
fileparts
(
datafile
);
savefile
=
fullfile
(
filepath
,
filename
);
% -----------------------------------------
% Load CSV table
opts
=
detectImportOptions
(
datafile
);
opts
.
VariableNamesLine
=
3
;
opts
.
VariableUnitsLine
=
4
;
opts
.
DataLines
=
[
5
Inf
];
RawTable
=
readtable
(
datafile
,
opts
);
% -----------------------------------------
% Save data
if
autosave
~=
false
save
(
savefile
,
'RawTable'
);
end
end
This diff is collapsed.
Click to expand it.