From a2e17ddf31f82791e2036148792a3c3ef94b809a Mon Sep 17 00:00:00 2001
From: Mauco03 <marco.gaibotti@skywarder.eu>
Date: Mon, 21 Apr 2025 12:31:51 +0200
Subject: [PATCH] [coeff-transport] Applied suggestions for MR

---
 classes/@Rocket/Rocket.m        | 27 +++++++++++++++++++++++++--
 classes/@Rocket/checkGeometry.m |  4 ++--
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/classes/@Rocket/Rocket.m b/classes/@Rocket/Rocket.m
index 019b137..825e836 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 6608a6d..d07a5cf 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;
 
-- 
GitLab