Skip to content
Snippets Groups Projects
Verified Commit c8a4d095 authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

chore(Oper): add input check for advanceratio

parent 767f4b0b
No related branches found
No related tags found
No related merge requests found
......@@ -30,13 +30,16 @@ function advRatio = advanceratio(self, diam, app)
% Issues: https://gitlab.uliege.be/rotare/rotare/-/issues
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ALLOWED_APP = {'propeller', 'helicopter', 'windturbine'};
app = validatestring(app, ALLOWED_APP, mfilename(), 'app');
switch app
case 'propeller'
advRatio = self.speed / (self.rps * diam);
case {'helicopter', 'windturbine'}
advRatio = self.speed / (self.omega * diam / 2);
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment