diff --git a/.gitmodules b/.gitmodules index d6a9b88132a98d0190d492b46e12f354b9970d44..2846d8845217e1d8f485bbb8ebfa0838604e3737 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "src/libs/matlab_airfoil_toolbox"] path = src/libs/matlab_airfoil_toolbox url = ../../am-dept/matlab_airfoil_toolbox +[submodule "src/libs/octave-atmosisa"] + path = src/libs/octave-atmosisa + url = https://github.com/lentzi90/octave-atmosisa diff --git a/CHANGELOG.md b/CHANGELOG.md index 915ecf59832f705d5e5bbae9c2f980a875cd7563..e81ceaa94416561710b537d9061bd8ea778c17d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,18 +9,48 @@ to [Semantic Versioning][sem_ver]. ### Added +### Changed + +### Deprecated + +### Removed + +### Fixed + +## [0.1.6] - 2024-02-12 + +### Fixed + +- Issue with toolbox check + +## [0.1.5] - 2023-12-14 + +### Changed + +- Add `octave-atmosisa` in libs so we can use it if _Aerospace Toolbox_ is not + installed +- Update `matlab_airfoil_toolbox` lib to remove dependency to the _Signal + Processing Toolbox_ in `findstall`. + +## [0.1.4] - 2023-12-14 + +### Added + - Result summary table - Result plotting function - Result filtering function +- Preliminary support for coaxial rotors ### Changed -### Deprecated - -### Removed +- Implement rotation matrices to remove useless dependency +- Defaults values in polar generator script ### Fixed +- Typo in Caradonna config +- Remove `--fix` flag for miss_hit in the pipeline + ## [0.1.3] - 2023-05-25 ### Added @@ -103,7 +133,10 @@ _Initial commit_: single rotor in hover/axial flows [sem_ver]:<https://semver.org/spec/v2.0.0.html> [keep_chglog]: <https://keepachangelog.com/en/1.0.0/> -[Unreleased]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.3...main +[Unreleased]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.6...main +[0.1.6]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.5...0.1.6 +[0.1.5]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.4...0.1.5 +[0.1.4]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.3...0.1.4 [0.1.3]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.2...0.1.3 [0.1.2]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.1...0.1.2 [0.1.1]: https://gitlab.uliege.be/rotare/rotare/compare/0.1.0...0.1.1 diff --git a/README.md b/README.md index bfd21d98097c1112f6a5362d9bf0ce65e813747f..62a9a889b44992215fbdc1ee05183ca5d25730c7 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,8 @@ name `COMPLETE CODE`. This archive contains all the dependencies needed for the proper use of Rotare. Always download this one and not the automatically generated _source code_ archives. +In theory, no additional toolboxes should be required to work with Rotare. + ## Documentation Rotare comes with a [detailed documentation][rotare-doc]. This documentation is @@ -121,7 +123,7 @@ troubleshooting section of the documentation. If you encounter any other issue with this code, please check [the issue tracker][rotare-issues] and fill a new issue report if applicable. You can also -contact me directly at tlambert@uliege.be. +contact me directly at <tlambert@uliege.be>. ## Other diff --git a/RELEASE.md b/RELEASE.md index d4a2ab4252bcf8b52ae64f8ee5bc16d3521e49bb..4de7f6451c151180f7fc1e6ea4ca0fac94d7f17e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,4 +10,4 @@ automatically generated and do not contain all dependencies. This release features: -- Result output and analysis methods +- Bugfix for toolbox check diff --git a/src/.miss_hit b/src/.miss_hit new file mode 100644 index 0000000000000000000000000000000000000000..d326fead0454f45535432e4551980e43112b1e6a --- /dev/null +++ b/src/.miss_hit @@ -0,0 +1,6 @@ +# miss_hi style checker +# (https://florianschanda.github.io/miss_hit/style_checker.html) +# + +# Exclude libraries directory from style checking +exclude_dir: "libs" diff --git a/src/libs/matlab_airfoil_toolbox b/src/libs/matlab_airfoil_toolbox index 0fd62e40449b0d06c8211d8a7c4ff62373c753c7..9f0fdf8c525b7f1489f89088706830f36c973fbc 160000 --- a/src/libs/matlab_airfoil_toolbox +++ b/src/libs/matlab_airfoil_toolbox @@ -1 +1 @@ -Subproject commit 0fd62e40449b0d06c8211d8a7c4ff62373c753c7 +Subproject commit 9f0fdf8c525b7f1489f89088706830f36c973fbc diff --git a/src/libs/octave-atmosisa b/src/libs/octave-atmosisa new file mode 160000 index 0000000000000000000000000000000000000000..05ed802f013be4dfe86ac0d1c21e141fb702790f --- /dev/null +++ b/src/libs/octave-atmosisa @@ -0,0 +1 @@ +Subproject commit 05ed802f013be4dfe86ac0d1c21e141fb702790f diff --git a/src/rotare.m b/src/rotare.m index 7ef0451e2afc361db4579acf9f108a506fbf04f5..f6fde2c063b9874900aae9838aab6151589c6787 100644 --- a/src/rotare.m +++ b/src/rotare.m @@ -51,11 +51,15 @@ function [Results] = rotare(configFile) % clearvars -except configFile; close all; clc; + % Add everything to path % BUT, only include root of airfoil_data, otherwise issue with aeropy examples in venv addpath(genpath('.')); rmpath(genpath('./airfoil_data/')); addpath('./airfoil_data/'); + if istoolboxinstalled('Aerospace Toolbox') + rmpath('./libs/octave-atmosisa/'); + end verifyinstall; % Check if packages (libs) and required functions are presents on the system diff --git a/src/utils/istoolboxinstalled.m b/src/utils/istoolboxinstalled.m new file mode 100644 index 0000000000000000000000000000000000000000..3f35d71be1c3e9bc0311406ba16a30552239d934 --- /dev/null +++ b/src/utils/istoolboxinstalled.m @@ -0,0 +1,31 @@ +function result = istoolboxinstalled(toolbox) + % ISTOOLBOXINSTALLED Check if a toolbox is installed and available + % ----- + % + % Syntax: + % result = isToolboxInstalled(toolbox) returns true if the toolbox is intalled. + % + % Inputs: + % toolbox: Name of a toolbox, as displayed in `ver` command + % + % Outputs: + % result : boolean that indicates if toolbox is installed + % + % See also: ver. + % + % <a href="https://gitlab.uliege.be/rotare/documentation">Complete documentation (online)</a> + + % ---------------------------------------------------------------------------------------------- + % (c) Copyright 2022-2024 University of Liege + % Author: Thomas Lambert <t.lambert@uliege.be> + % ULiege - Aeroelasticity and Experimental Aerodynamics + % MIT License + % Repo: https://gitlab.uliege.be/rotare/rotare + % Docs: https://gitlab.uliege.be/rotare/documentation + % Issues: https://gitlab.uliege.be/rotare/rotare/-/issues + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + v = ver; + result = any(strcmp(toolbox, {v.Name})); + +end diff --git a/src/utils/rotx.m b/src/utils/rotx.m new file mode 100644 index 0000000000000000000000000000000000000000..e1d221615bb4839d795146949bc5f617e80790eb --- /dev/null +++ b/src/utils/rotx.m @@ -0,0 +1,35 @@ +function rotMat = rotx(angleDeg) + % ROTX Rotation matrix about X-axis + % ----- + % + % Syntax: + % rotMat = rotx(angleDeg) returns the rotation matrix that rotates + % a point of an angle `angleDeg` (in degrees) around the X-axis. + % + % Inputs: + % angleDeg: Angle of rotation, [deg] + % + % Outputs: + % rotMat : 3x3 matrix for the rotation around X-axis + % + % See also: roty, rotz. + % + % <a href="https://gitlab.uliege.be/rotare/documentation">Complete documentation (online)</a> + + % ---------------------------------------------------------------------------------------------- + % (c) Copyright 2022-2023 University of Liege + % Author: Thomas Lambert <t.lambert@uliege.be> + % ULiege - Aeroelasticity and Experimental Aerodynamics + % MIT License + % Repo: https://gitlab.uliege.be/rotare/rotare + % Docs: https://gitlab.uliege.be/rotare/documentation + % Issues: https://gitlab.uliege.be/rotare/rotare/-/issues + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + validateattributes(angleDeg, {'numeric'}, {'scalar'}, mfilename(), 'angleDeg', 1); + + rotMat = [1, 0, 0 + 0, cosd(angleDeg), -sind(angleDeg) + 0, sind(angleDeg), cosd(angleDeg)]; + +end diff --git a/src/utils/roty.m b/src/utils/roty.m new file mode 100644 index 0000000000000000000000000000000000000000..a33e77d602292cbe153268009f87fd6a74a6ee00 --- /dev/null +++ b/src/utils/roty.m @@ -0,0 +1,35 @@ +function rotMat = roty(angleDeg) + % ROTY Rotation matrix about Y-axis + % ----- + % + % Syntax: + % rotMat = roty(angleDeg) returns the rotation matrix that rotates + % a point of an angle `angleDeg` (in degrees) around the Y-axis. + % + % Inputs: + % angleDeg: Angle of rotation, [deg] + % + % Outputs: + % rotMat : 3x3 matrix for the rotation around Y-axis + % + % See also: rotx, rotz. + % + % <a href="https://gitlab.uliege.be/rotare/documentation">Complete documentation (online)</a> + + % ---------------------------------------------------------------------------------------------- + % (c) Copyright 2022-2023 University of Liege + % Author: Thomas Lambert <t.lambert@uliege.be> + % ULiege - Aeroelasticity and Experimental Aerodynamics + % MIT License + % Repo: https://gitlab.uliege.be/rotare/rotare + % Docs: https://gitlab.uliege.be/rotare/documentation + % Issues: https://gitlab.uliege.be/rotare/rotare/-/issues + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + validateattributes(angleDeg, {'numeric'}, {'scalar'}, mfilename(), 'angleDeg', 1); + + rotMat = [cosd(angleDeg), 0, sind(angleDeg) + 0, 1, 0 + -sind(angleDeg), 0, cosd(angleDeg)]; + +end diff --git a/src/utils/rotz.m b/src/utils/rotz.m new file mode 100644 index 0000000000000000000000000000000000000000..11b19be39943c34ec029bda2b94bb847cf7d2861 --- /dev/null +++ b/src/utils/rotz.m @@ -0,0 +1,35 @@ +function rotMat = rotz(angleDeg) + % ROTZ Rotation matrix about Z-axis + % ----- + % + % Syntax: + % rotMat = rotz(angleDeg) returns the rotation matrix that rotates + % a point of an angle `angleDeg` (in degrees) around the Z-axis. + % + % Inputs: + % angleDeg: Angle of rotation, [deg] + % + % Outputs: + % rotMat : 3x3 matrix for the rotation around Z-axis + % + % See also: rotx, roty. + % + % <a href="https://gitlab.uliege.be/rotare/documentation">Complete documentation (online)</a> + + % ---------------------------------------------------------------------------------------------- + % (c) Copyright 2022-2023 University of Liege + % Author: Thomas Lambert <t.lambert@uliege.be> + % ULiege - Aeroelasticity and Experimental Aerodynamics + % MIT License + % Repo: https://gitlab.uliege.be/rotare/rotare + % Docs: https://gitlab.uliege.be/rotare/documentation + % Issues: https://gitlab.uliege.be/rotare/rotare/-/issues + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + validateattributes(angleDeg, {'numeric'}, {'scalar'}, mfilename(), 'angleDeg', 1); + + rotMat = [cosd(angleDeg), -sind(angleDeg), 0 + sind(angleDeg), cosd(angleDeg), 0 + 0, 0, 1]; + +end