From 92f253493595d4b3db80c7576bd765cdf442fed8 Mon Sep 17 00:00:00 2001 From: Mauco03 <marco.gaibotti@skywarder.eu> Date: Tue, 5 Mar 2024 18:22:25 +0100 Subject: [PATCH] [msa-refactoring][classes] Added Parachute, Wind --- classes/bays/Motor.m | 4 ++-- classes/{old => components}/Environment.m | 14 ++------------ classes/components/Parachute.m | 23 +++++++++++++++++++++++ classes/components/Wind.m | 23 +++++++++++++++++++++++ 4 files changed, 50 insertions(+), 14 deletions(-) rename classes/{old => components}/Environment.m (82%) create mode 100644 classes/components/Parachute.m create mode 100644 classes/components/Wind.m diff --git a/classes/bays/Motor.m b/classes/bays/Motor.m index f07892b..7226780 100644 --- a/classes/bays/Motor.m +++ b/classes/bays/Motor.m @@ -28,8 +28,8 @@ classdef Motor < Bay end properties(Access = protected) - configName = 'motorConfig.m' - variableName = '' + configName = 'rocketConfig.m' + variableName = 'motor' mission Mission = Mission() end diff --git a/classes/old/Environment.m b/classes/components/Environment.m similarity index 82% rename from classes/old/Environment.m rename to classes/components/Environment.m index 6c503a6..35c2c91 100644 --- a/classes/old/Environment.m +++ b/classes/components/Environment.m @@ -1,4 +1,4 @@ -classdef Environment < Config +classdef Environment < Component %ENVIRONMENT Summary of this class goes here % Detailed explanation goes here @@ -22,22 +22,12 @@ classdef Environment < Config properties(Access = protected) configName = 'environmentConfig.m' + variableName = '' mission Mission motor Motor end methods - function obj = Environment(mission, motor) - arguments - mission Mission = Mission() - motor Motor = Motor() - end - obj.mission = mission; - obj.motor = motor; - if nargin == 0, return; end - obj.loadConfig(); - end - function g0 = get.g0(obj) g0 = gravitywgs84(obj.z0, obj.lat0); end diff --git a/classes/components/Parachute.m b/classes/components/Parachute.m new file mode 100644 index 0000000..b2d0575 --- /dev/null +++ b/classes/components/Parachute.m @@ -0,0 +1,23 @@ +classdef Parachute + %PARACHUTE Summary of this class goes here + % Detailed explanation goes here + + properties + Property1 + end + + methods + function obj = Parachute(inputArg1,inputArg2) + %PARACHUTE Construct an instance of this class + % Detailed explanation goes here + obj.Property1 = inputArg1 + inputArg2; + end + + function outputArg = method1(obj,inputArg) + %METHOD1 Summary of this method goes here + % Detailed explanation goes here + outputArg = obj.Property1 + inputArg; + end + end +end + diff --git a/classes/components/Wind.m b/classes/components/Wind.m new file mode 100644 index 0000000..54ab2c3 --- /dev/null +++ b/classes/components/Wind.m @@ -0,0 +1,23 @@ +classdef untitled + %UNTITLED Summary of this class goes here + % Detailed explanation goes here + + properties + Property1 + end + + methods + function obj = untitled(inputArg1,inputArg2) + %UNTITLED Construct an instance of this class + % Detailed explanation goes here + obj.Property1 = inputArg1 + inputArg2; + end + + function outputArg = method1(obj,inputArg) + %METHOD1 Summary of this method goes here + % Detailed explanation goes here + outputArg = obj.Property1 + inputArg; + end + end +end + -- GitLab