diff --git a/+af_tools/nacacamber.m b/+af_tools/nacacamber.m index d073f9400c37f33c7db3798adbbb7c70b8961629..c381eb239918944c7b5ba7f46468f053b0986f36 100644 --- a/+af_tools/nacacamber.m +++ b/+af_tools/nacacamber.m @@ -107,12 +107,14 @@ function [xc, yc, gradY] = camber4digits(digits, nPoints, spacing) % P = Position of the max camber divided by 10 % XX = Maximum thickness divided by 100 +import af_tools.utils.spacedvector; + % Airfoil parameters m = str2double(digits(1)) /100; p = str2double(digits(2)) /10; % Camberline -xc = getxc(spacing, nPoints); +xc = spacedvector(spacing, nPoints); yc = zeros(size(xc)); gradY = zeros(size(xc)); @@ -139,13 +141,15 @@ function [xc, yc, gradY] = camber5digits(digits, nPoints, spacing) % Q = Camber line (0=standard, 1=reflex) % XX = Maximum thickness divided by 100 +import af_tools.utils.spacedvector; + % Airfoil parameters cld = str2double(digits(1)) *3/20; p = str2double(digits(2)) /20; q = str2double(digits(3)); % Camberline -xc = getxc(spacing, nPoints); +xc = spacedvector(spacing, nPoints); yc = zeros(size(xc)); gradY = zeros(size(xc)); @@ -177,24 +181,6 @@ yc = (cld/0.3) * yc; end -% ------------------------------------------------------------------------------ -function xc = getxc(spacing, nPoints) -% GETXC Returns xc vector based on chosen spacing and number of points - -switch spacing - case 'linear' - xc = linspace(0, 1, (nPoints)); - case 'halfcosine' - beta = linspace(0, pi, (nPoints)); - xc = (1-cos(beta))/2; - case 'cosine' - beta = linspace(0, pi/2, (nPoints)); - xc = 1-cos(beta); -end - -end - - % ------------------------------------------------------------------------------ function [r,k1,k2k1] = getcoeffs5digits(q, p) % GETCOEFFS5DIGITS Outputs the value of the various coefficients used in the NACA 5digits formula. diff --git a/CHANGELOG.md b/CHANGELOG.md index 84f9bd2c67ce64321b9aca9303e883cd28221a38..e308b4fa3ab1025ac3798c0c2658d7d98d4efb8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,23 +19,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security +## [1.2.0] - 2022-04-10 + +### Added + +- **uiuccleaner**: Add `refine` option to allow the refining of the original + datafile (spline interpolation to add more points). + +### Changed + +- Refactor of spacing function (**nacacamber**, **uiuccleaner**). + +### Fixed + +- **utils.parsefileinputs**: minor fix in case inputFiles is a cell array + ## [1.1.0] - 2022-04-10 ### Added -- Added `savedat` option for _nacaairfoil_ -- **Added uiuccleaner function** +- **nacaairfoil**: Added `savedat` option +- **Added uiuccleaner function**. ### Changed -- Coordinates outputted by _nacaairfoil_ now start at TE, go along upper side to - LE, then go along lower side back to TE -- Refactor input parsing for xf2mat +- **nacaairfoil**: Coordinates outputted now start at TE, go along upper side to + LE, then go along lower side back to TE. +- **xf2mat**: Refactor input parsing. ## [1.0.0] - 2022-04-08 - Initial release [Unreleased]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...master +[1.2.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.1.0...v1.2.0 [1.1.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...v1.1.0 [1.0.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/releases/v1.0.0