diff --git a/classes/@Rocket/Rocket.m b/classes/@Rocket/Rocket.m index 019b1377061a0a6c30efa744bed452d0c4b019ce..825e8360ef8caa2d09ce9628731c6f6616e89d73 100644 --- a/classes/@Rocket/Rocket.m +++ b/classes/@Rocket/Rocket.m @@ -140,8 +140,10 @@ classdef Rocket < Config obj.parachutes = paraLoader.parachutes; if options.loadCoefficients - if obj.dynamicDerivatives, coeffName = obj.motor.name; - else, coeffName = 'generic'; + if obj.dynamicDerivatives + coeffName = obj.motor.name; + else + coeffName = 'generic'; end obj.coefficients = Coefficient( ... @@ -169,6 +171,27 @@ classdef Rocket < Config switch answer case 'Yes' + % Check for required tools + isMsa = exist(mission.msaPath, "file"); + isDissile = exist(mission.dissilePath, "file"); + + if ~all([isMsa, isDissile]) + msg = 'The following toolkits are required to update coefficients:'; + + if ~isMsa + msg = sprintf(... + '%s\n - <a href="https://git.skywarder.eu/afd/msa/msa-toolkit">msa-toolkit</a>:\n\t In %s\n', ... + msg, mission.msaPath); + end + + if ~isDissile + msg = sprintf('%s\n - <a href="https://git.skywarder.eu/afd/msa/dissilematcom">dissilematcom</a>:\n\t In %s\n', ... + msg, mission.dissilePath); + end + error(msg); + end + + % Start coefficient creation parserPath = fullfile(mission.msaPath, 'autoMatricesProtub'); addpath(genpath(parserPath)); [obj.coefficients, obj.coefficientsHighAOA] = ... diff --git a/classes/@Rocket/checkGeometry.m b/classes/@Rocket/checkGeometry.m index 6608a6d88e94e0d213cf9eab3eb05862dea02cf6..d07a5cf08a494897f485a498a731819234d28d9e 100644 --- a/classes/@Rocket/checkGeometry.m +++ b/classes/@Rocket/checkGeometry.m @@ -75,8 +75,8 @@ function [checks, summary] = checkGeometry(obj) ogiveType = ["CONE", "OGIVE", "POWER", "HAACK", "KARMAN", "MHAACK"]; boatType = ["CONE", "OGIVE"]; - % Convert text to DATCOM standard. !TODO: Si farebbe meglio con un - % enum + % Convert text to DATCOM standard. !TODO: Would be more robust if + % enums were used boatRocket = find(strcmp(obj.rear.boatType, boatType), 1, 'first') - 1; boatTest = find(strcmp(obj.coefficients.geometry.boatType, boatType), 1, 'first') - 1;