diff --git a/classes/Component.m b/classes/Component.m index d99c1c59474ca0cf765e0bcca9428f43c96aa5c4..7407018396451bed304a0490b789b80b86a7ec67 100644 --- a/classes/Component.m +++ b/classes/Component.m @@ -77,6 +77,12 @@ classdef Component < Config & matlab.mixin.Copyable end end + methods + function m = getMission(obj) + m = obj.mission; + end + end + methods(Access = protected) function cp = copyElement(obj) fields = obj.getProperties('readable', NonCopyable = 0); diff --git a/classes/Rocket.m b/classes/Rocket.m index 947edb2a17af275aa49df33f9992e15a8da077a7..da1e33e3f621b7b925f4f2fcc1d56d004f927e12 100644 --- a/classes/Rocket.m +++ b/classes/Rocket.m @@ -156,10 +156,10 @@ classdef Rocket < Component end function updateStagesMass(obj) - stage1 = obj.cutoffMass - sum([obj.parachutes(:,1).mass]); + stage1 = obj.cutoffMass - (obj.parachutes(1,2).mass + obj.parachutes(2,2).mass + obj.payload.mass); % Everything at cut off without payload, payload drogue and % payload airfoil - stage2 = sum([obj.parachutes(:,1).mass]); + stage2 = obj.cutoffMass - stage1; % only payload: payload, payload drogue and payload airfoil obj.stagesMass = [stage1 stage2]; end diff --git a/classes/bays/Motor.m b/classes/bays/Motor.m index 7655e60afb10dd5f02c49b92b586f23058e478e4..20d48171c13b4f58e070ede34a767cc17aad07cf 100644 --- a/classes/bays/Motor.m +++ b/classes/bays/Motor.m @@ -44,6 +44,10 @@ classdef Motor < Bay properties(SetAccess = protected) isHRE logical % [-] Flag relateed to the type of motor: true if HRE end + + properties(Access = private) + isBeingUpdated logical = false % [-] Flag used internally when some properties are being updated + end methods function obj = Motor(mission, varIn) @@ -58,14 +62,20 @@ classdef Motor < Bay function set.name(obj, name) obj.name = name; + obj.changeState(); obj.loadData(); obj.updateAll(); + obj.changeState(); end function updateAll(obj) obj.updateMass(); end + function changeState(obj) + obj.isBeingUpdated = not(obj.isBeingUpdated); + end + function updateMass(obj) obj.fuselageXCg = (obj.length - ... obj.tankLength)/2 + obj.tankLength; @@ -89,7 +99,6 @@ classdef Motor < Bay error(strcat('Unable to find engine: ', obj.name)); end - obj.length = chosenMotor.L; [obj.time, iUniqueTime] = unique(chosenMotor.t); obj.thrust = chosenMotor.T(iUniqueTime); obj.propellantMass = chosenMotor.m(iUniqueTime); @@ -98,6 +107,7 @@ classdef Motor < Bay obj.isHRE = contains(obj.name, 'HRE'); if obj.isHRE + obj.length = chosenMotor.L; obj.tankLength = chosenMotor.Ltank; obj.fuelMass = chosenMotor.mFu; obj.oxidizerMass = chosenMotor.mOx; @@ -107,10 +117,12 @@ classdef Motor < Bay obj.pe = chosenMotor.Pe(iUniqueTime); obj.ae = chosenMotor.Ae; obj.fuselageMass = chosenMotor.mFus; + else + obj.length = chosenMotor.L/1000; % lengths are saved in mm for solid motors + obj.xCg = obj.length/2 * ones(1, size(obj.time, 2)); end - - if isempty(obj.cutoffTime) || obj.cutoffTime > obj.time(end) + if isempty(obj.cutoffTime) || obj.cutoffTime > obj.time(end) || obj.isBeingUpdated obj.cutoffTime = obj.time(end); end end diff --git a/functions/miscellaneous/addTransient.m b/functions/miscellaneous/addTransient.m index 95590fb108f5b829d5252dcb2bc964e08260a787..3ad32d2d360da7da10202355d5c30296cfd7c337 100644 --- a/functions/miscellaneous/addTransient.m +++ b/functions/miscellaneous/addTransient.m @@ -25,10 +25,23 @@ end % addpath(commonPath); % ignTrans = 0.3; % ignition transient [s] -% coTrans = 0.3; % cut-off transient [s] +% cutOffTrans = 0.3; % cut-off transient [s] % mission = Mission('2024_Lyra_Portugal_October'); % name = 'HRE_dummy'; -newMotorName = strcat(motorName, '_T0', num2str(ignTrans), '_T0', num2str(cutoffTrans)); +% Please note that transient times must be entered multiplied by 10 +% i.e.: if the ingition transient is 0.15 then the input is 1.5! + +mantIgn = floor(ignTrans); +decIgn = (ignTrans-floor(ignTrans))*10; +mantCut = floor(cutoffTrans); +decCut = (cutoffTrans-floor(cutoffTrans))*10; +if (decIgn == 0) + newMotorName = strcat(motorName, '_T0', num2str(mantIgn*10), '_T0', num2str(cutoffTrans)); +else + newMotorName = strcat(motorName, '_T0', num2str(mantIgn*10+decIgn), '_T0', num2str(cutoffTrans)); +end + +% newMotorName = strcat(motorName, '_T0', num2str(ignTrans), '_T0', num2str(cutoffTrans)); ignTrans = ignTrans/10; cutoffTrans = cutoffTrans/10; diff --git a/functions/miscellaneous/getOdeFcn.m b/functions/miscellaneous/getOdeFcn.m index 691bd9806bd833bd086a809f68e3a1a9f77b5f5d..d2763eca1d9a7027cd4b52986448a75b399597e5 100644 --- a/functions/miscellaneous/getOdeFcn.m +++ b/functions/miscellaneous/getOdeFcn.m @@ -38,6 +38,7 @@ out = wrapper.packageData(data); out.state.time = solution.x; out.state.Y = solution.y; out.state.iEvent = []; +wrapper.reset(); if ~isempty(solution.ie) out.state.iEvent = find(solution.x == solution.xe(1), 1, "first"); diff --git a/functions/miscellaneous/interpCoeffs.m b/functions/miscellaneous/interpCoeffs.m index b70a28e8236785722e6dec95d200bf6f045cce78..145fba5a4d1cbda033d4325bddb499fca94ba76c 100644 --- a/functions/miscellaneous/interpCoeffs.m +++ b/functions/miscellaneous/interpCoeffs.m @@ -31,7 +31,7 @@ if t >= cutoffTime index2 = indexControl + 1; if index2 > num if num == 1 - coeffsValues = coefficients(:, indexAlpha, indexMach, indexBeta, indexAlt, 1, end); + coeffsValues = coefficients.total(:, indexAlpha, indexMach, indexBeta, indexAlt, 1, end); return; else index2 = index2 - 1; @@ -50,6 +50,10 @@ else indexXcg = t >= coefficients.state.xcgTime(1:end-1) & t < coefficients.state.xcgTime(2:end); index1 = num(indexXcg); index2 = index1 + 1; + if length(coefficients.state.xcgTime) == 1 + coeffsValues = coefficients.total(:, indexAlpha, indexMach, indexBeta, indexAlt, 1, 1); + return; + end VF = coefficients.total(:, indexAlpha, indexMach, indexBeta, indexAlt, indexControl, index1); VE = coefficients.total(:, indexAlpha, indexMach, indexBeta, indexAlt, indexControl, index2); diff --git a/functions/miscellaneous/interpN.m b/functions/miscellaneous/interpN.m index 39faad78c7f63b5ab02ab7dab90827447c58c565..ed3fa0264df7793132ef05afecb665cf48986870 100644 --- a/functions/miscellaneous/interpN.m +++ b/functions/miscellaneous/interpN.m @@ -1,33 +1,29 @@ function [val, err] = interpN(MAT, inV, inQ) -%{ - -linear interpolation in N dimensions - -INPUTS: - MAT: double [N-dimensional] matrix containing the coefficients to - interpolate, the first dimension regards the coefficient number, - the others regards the dependencies - inV: cell {1, N-1} each cell contains the vector referred - to the (i+1)th dimension in MAT - inQ: double [1, N] vector containing the points in wich interpolate - -OUTPUTS: - val: double [1,1] result of the interpolation - err: double [1,1] error flag: - -0 no error - -1 extrapolation performed - -REVISIONS: -- 0 01/12/2022, release Riccardo Cadamuro -- 1 17/02/2023, update Riccardo Cadamuro - minor improvement - -Copyright © 2022, Skyward Experimental Rocketry, AFD department -All rights reserved - -SPDX-License-Identifier: GPL-3.0-or-later - -%} +% linear interpolation in N dimensions +% +% INPUTS: +% MAT: double [N-dimensional] matrix containing the coefficients to +% interpolate, the first dimension regards the coefficient number, +% the others regards the dependencies +% inV: cell {1, N-1} each cell contains the vector referred +% to the (i+1)th dimension in MAT +% inQ: double [1, N] vector containing the points in wich interpolate +% +% OUTPUTS: +% val: double [1,1] result of the interpolation +% err: double [1,1] error flag: +% -0 no error +% -1 extrapolation performed +% +% REVISIONS: +% - 0 01/12/2022, release Riccardo Cadamuro +% - 1 17/02/2023, update Riccardo Cadamuro +% minor improvement +% +% Copyright © 2022, Skyward Experimental Rocketry, AFD department +% All rights reserved +% +% SPDX-License-Identifier: GPL-3.0-or-later nV = length(inV); dim0 = size(MAT); @@ -42,7 +38,6 @@ SPDX-License-Identifier: GPL-3.0-or-later flag = false; for j = 1:nEls if inQ(i) <= vec(j) - if j == 1 ind1 = j; ind2 = j + 1; @@ -70,7 +65,6 @@ SPDX-License-Identifier: GPL-3.0-or-later y1 = MAT(:, ind1, :); y2 = MAT(:, ind2, :); - MAT = (inQ(i) - x1)./(x2 - x1) .* (y2 - y1) + y1; MAT = reshape(MAT, dimVec); diff --git a/functions/odeFunctions/descentParafoil.m b/functions/odeFunctions/descentParafoil.m index 17b484b48e25d2dab6537b7731bf9ed66517b034..9deb592eaf5383fcbccc6f99dbdd4365f2cdfed0 100644 --- a/functions/odeFunctions/descentParafoil.m +++ b/functions/odeFunctions/descentParafoil.m @@ -61,7 +61,7 @@ local = environment.local; % vector containing inputs for semiWingSpan = parafoil.semiWingSpan; % [m] wingspan MAC = parafoil.MAC; % [m] mean aero chord surface = parafoil.surface; % [m^2] payload surface -mass = parafoil.mass; % [kg] +mass = rocket.stagesMass(descentData.stage); % [kg] inertia = parafoil.inertia; % 3x3 inertia matrix inverseInertia = parafoil.inverseInertia; % 3x3 inverse inertia matrix diff --git a/functions/simulations/quickApogeeOnly.m b/functions/simulations/quickApogeeOnly.m index 1f34971a3ccc4830a80d8ba55486041e31360d05..7978ed8322cab610e4e6788b5e680b68106fb550 100644 --- a/functions/simulations/quickApogeeOnly.m +++ b/functions/simulations/quickApogeeOnly.m @@ -38,7 +38,7 @@ SPDX-License-Identifier: GPL-3.0-or-later %% ERROR CHECKING if not(rocket.airbrakes.enabled) && length(rocket.airbrakes.extension) > 1 - error('To simulate different airbrakes opening, please set to true settings.multipleAB in config.m'); + error('To simulate different airbrakes opening, please set to true airbrakes.enabled in rocketConfig.m'); end if rocket.airbrakes.enabled && length(rocket.airbrakes.extension) > 1 && length(rocket.airbrakes.deltaTime) < length(rocket.airbrakes.extension) - 2 @@ -66,30 +66,16 @@ Y0a = [X0; V0; W0; Q0; 0]; %% ASCENT t0 = 0; -[Ta, Ya] = ode113(@ballistic, [t0, tf], Y0a, options, ... +solution = ode113(@ballistic, [t0, tf], Y0a, options, ... rocket, environment, wind, [], 0, wrapper); +ascent = getOdeFcn(solution); %% CALCULATE OUTPUT QUANTITIES -apogee = -Ya(end, 3); +apogee = -ascent.state.Y(3, end); if nargout == 2 - - Y = [Ya(:, 1:3) quatrotate(quatconj(Ya(:, 10:13)), Ya(:, 4:6)) Ya(:, 7:13)]; - N = length(Ta); - - % VELOCITIES - u = Y(:,4); - v = Y(:,5); - w = -Y(:,6); - - % ACCELERATIONS - ax = (u(3:N)-u(1:N-2))./(Ta(3:N)-Ta(1:N-2)); - ay = (v(3:N)-v(1:N-2))./(Ta(3:N)-Ta(1:N-2)); - az = (w(3:N)-w(1:N-2))./(Ta(3:N)-Ta(1:N-2)); - A = [ax, ay, az]; - - % MAXIMUM ACCELERATIONS - abs_A = vecnorm(A'); - maxAccel = max(abs_A)/9.80665; - + accelerations = ascent.accelerations.body; + absA = vecnorm(accelerations, 2, 1); + [maxAccel] = max(absA)/9.81; +end end \ No newline at end of file diff --git a/functions/simulations/stdAscent.m b/functions/simulations/stdAscent.m index 520964bb708ae3fbca2ba72d0772bddb766cd78c..cd89849d8125ce4551725c95d4f1c67893c02d34 100644 --- a/functions/simulations/stdAscent.m +++ b/functions/simulations/stdAscent.m @@ -54,7 +54,7 @@ t0 = 0; solution = ode113(@ballistic, [t0, tf], Y0, options, ... rocket, env, wind, [], 0, wrapper); -if settings.simulator.parachute && rocket.parachutes(1, 1).openingTime +if settings.simulator.parachute && ~isempty(rocket.parachutes(1, 1).openingTime) && rocket.parachutes(1, 1).openingTime solution = odextend(solution, [], solution.x(end) + rocket.parachutes(1, 1).openingTime); end diff --git a/functions/simulations/stdDescent.m b/functions/simulations/stdDescent.m index a1c27a0618f83cfaf77360878271cf1253d11f82..5f8a2c8c63ba3ab524ab36760e4f75928749ce92 100644 --- a/functions/simulations/stdDescent.m +++ b/functions/simulations/stdDescent.m @@ -108,7 +108,9 @@ for i = 1:nParachutes for j = 1:nStages descentData.stage = j; if isempty(rocket.parachutes(i, j).name), continue; end - if i ~= 1, prev = descent(i-1, j); end + if i ~= 1 && ~isempty(descent(i-1, j).state) + prev = descent(i-1, j); + end wrapper.reset(); switch class(rocket.parachutes(i, j)) diff --git a/missions/2024_Lyra_Portugal_October/config/environmentConfig.m b/missions/2024_Lyra_Portugal_October/config/environmentConfig.m index 3340023439aa5691acc062ec9d4d3fbf2328df6f..78a48f9be3b82c77948133bfe4a8f6629bd2d180 100644 --- a/missions/2024_Lyra_Portugal_October/config/environmentConfig.m +++ b/missions/2024_Lyra_Portugal_October/config/environmentConfig.m @@ -8,7 +8,7 @@ environment.lat0 = 39.388727; % [deg] Launchpad latitude environment.lon0 = -8.287842; % [deg] Launchpad longitude environment.z0 = 160; % [m] Launchpad Altitude environment.omega = 85; % [deg] Launchpad elevation -environment.phi = 0; % [deg] Launchpad azimuth +environment.phi = 133; % [deg] Launchpad azimuth environment.pin1Length = 0.5603; % [m] Distance from the upper pin to the upper tank cap environment.pin2Length = 0.2055; % [m] Distance from the lower pin to the lower tank cap environment.rampLength = 12; % [m] Total launchpad length diff --git a/missions/2024_Lyra_Portugal_October/config/paraConfig.m b/missions/2024_Lyra_Portugal_October/config/paraConfig.m index 59d2a43b28624c5a62eac263192333b6d293b450..aa0a50ac796b31cba74b8cfdbbfc0fab3bea103d 100644 --- a/missions/2024_Lyra_Portugal_October/config/paraConfig.m +++ b/missions/2024_Lyra_Portugal_October/config/paraConfig.m @@ -4,10 +4,10 @@ para(1, 1) = Parachute(); para(1, 1).name = 'DROGUE chute'; para(1, 1).surface = 0.6; % [m^2] Surface -para(1, 1).mass = 0.15; % [kg] Parachute Mass +para(1, 1).mass = 0.25; % [kg] Parachute Mass para(1, 1).cd = 0.75; % [/] Parachute Drag Coefficient para(1, 1).cl = 0; % [/] Parachute Lift Coefficient -para(1, 1).openingTime = 1.1; % [s] drogue opening delay +para(1, 1).openingTime = 0.1; % [s] drogue opening delay para(1, 1).finalAltitude = 350; % [m] Final altitude of the parachute para(1, 1).cx = 1.4; % [/] Parachute Longitudinal Drag Coefficient para(1, 1).chordLength = 1.5; % [m] Shock Chord Length @@ -23,7 +23,7 @@ para(2, 1) = Parachute(); para(2, 1).name = 'MAIN chute'; para(2, 1).surface = 14; % [m^2] Surface -para(2, 1).mass = 1.05; % [kg] Parachute Mass +para(2, 1).mass = 1.5; % [kg] Parachute Mass para(2, 1).cd = 0.6; % [/] Parachute Drag Coefficient para(2, 1).cl = 0; % [/] Parachute Lift Coefficient para(2, 1).openingTime = 0.9; % [s] drogue opening delay @@ -43,7 +43,7 @@ para(1, 2) = Parachute(); para(1, 2).name = "Payload DROGUE"; para(1, 2).surface = 0.11; % [m^2] Surface -para(1, 2).mass = 0.15; % [kg] Parachute Mass +para(1, 2).mass = 0.1; % [kg] Parachute Mass para(1, 2).cd = 1.2; % [/] Parachute Drag Coefficient para(1, 2).cl = 0; % [/] Parachute Lift Coefficient para(1, 2).openingTime = 1; % [s] drogue opening delay @@ -61,7 +61,7 @@ para(1, 2).forceCoefficient = 0; % [-] Empirical coefficient to obtain para(2, 2) = Parafoil(); para(2, 2).name = "Payload AIRFOIL"; -para(2, 2).mass = 0.50; % [kg] Parafoil Mass +para(2, 2).mass = 0.40; % [kg] Parafoil Mass para(2, 2).openingTime = 0; % [s] Parafoil opening delay para(2, 2).surface = 0.11; % [m^2] Surface diff --git a/missions/2024_Lyra_Portugal_October/config/rocketConfig.m b/missions/2024_Lyra_Portugal_October/config/rocketConfig.m index da1ac41e5a62aa939725bfd0f6ee2fd1d379bcd0..db3043c11d5c3a56dd4655adcf765158d2638d79 100644 --- a/missions/2024_Lyra_Portugal_October/config/rocketConfig.m +++ b/missions/2024_Lyra_Portugal_October/config/rocketConfig.m @@ -51,7 +51,7 @@ airbrakes.xCg = 30.54 * 1e-3; % [m] Cg re airbrakes.enabled = false; % If true, multiple and smooth airbrakes opening will be simulated airbrakes.extension = [1]; % aerobrakes, 1-2-3 for 0%, 50% or 100% opened -airbrakes.deltaTime = [0]; % aerobrakes, configurations usage time +airbrakes.deltaTime = [0]; % aerobrakes, configurations usage time airbrakes.n = 3; % [-] number of brakes airbrakes.height = linspace(0, 0.0363, 3); % [m] Block airbrakes opening coordinate ( First entry must be 0! ) @@ -69,7 +69,56 @@ airbrakes.servoTau = 0.0374588; %% MOTOR motor = Motor(); -motor.name = 'HRE_ARM_SFT5_T03_T03'; % [-] Motor name +% motor.name = 'HRE_ARM_P_40_T015_T03'; +% motor.name = 'HRE_ARM_P_41_T015_T03'; +% motor.name = 'HRE_ARM_P_42_T015_T03'; +% motor.name = 'HRE_ARM_P_43_T015_T03'; +% motor.name = 'HRE_ARM_P_44_T015_T03'; +% motor.name = 'HRE_ARM_P_45_T015_T03'; +% motor.name = 'HRE_ARM_P_46_T015_T03'; +% motor.name = 'HRE_ARM_P_47_T015_T03'; +% motor.name = 'HRE_ARM_P_48_T015_T03'; +% motor.name = 'HRE_ARM_P_49_T015_T03'; +% motor.name = 'HRE_ARM_P_50_T015_T03'; +% motor.name = 'HRE_ARM_P_52_T015_T03'; +% motor.name = 'HRE_ARM_P_53_T015_T03'; +% motor.name = 'HRE_ARM_P_54_T015_T03'; +% motor.name = 'HRE_ARM_P_55_T015_T03'; +% motor.name = 'HRE_ARM_P_56_T015_T03'; +% motor.name = 'HRE_ARM_P_58_T015_T03'; +% motor.name = 'HRE_ARM_P_59_T015_T03'; +% motor.name = 'HRE_ARM_P_60_T015_T03'; +% motor.name = 'HRE_ARM_P_62_T015_T03'; +% motor.name = 'HRE_ARM_P_63_T015_T03'; +% motor.name = 'HRE_ARM_P_64_T015_T03'; +% motor.name = 'HRE_ARM_P_66_T015_T03'; +% motor.name = 'HRE_ARM_P_67_T015_T03'; +% +% motor.name = 'HRE_ARM_P_40_T030_T03'; +motor.name = 'HRE_ARM_P_41_T030_T03'; +% motor.name = 'HRE_ARM_P_42_T030_T03'; +% motor.name = 'HRE_ARM_P_43_T030_T03'; +% motor.name = 'HRE_ARM_P_44_T030_T03'; +% motor.name = 'HRE_ARM_P_45_T030_T03'; +% motor.name = 'HRE_ARM_P_46_T030_T03'; +% motor.name = 'HRE_ARM_P_47_T030_T03'; +% motor.name = 'HRE_ARM_P_48_T030_T03'; +% motor.name = 'HRE_ARM_P_49_T030_T03'; +% motor.name = 'HRE_ARM_P_50_T030_T03'; +% motor.name = 'HRE_ARM_P_52_T030_T03'; +% motor.name = 'HRE_ARM_P_53_T030_T03'; +% motor.name = 'HRE_ARM_P_54_T030_T03'; +% motor.name = 'HRE_ARM_P_55_T030_T03'; +% motor.name = 'HRE_ARM_P_56_T030_T03'; +% motor.name = 'HRE_ARM_P_58_T030_T03'; +% motor.name = 'HRE_ARM_P_59_T030_T03'; +% motor.name = 'HRE_ARM_P_60_T030_T03'; +% motor.name = 'HRE_ARM_P_62_T030_T03'; +% motor.name = 'HRE_ARM_P_63_T030_T03'; +% motor.name = 'HRE_ARM_P_64_T030_T03'; +% motor.name = 'HRE_ARM_P_66_T030_T03'; +% motor.name = 'HRE_ARM_P_67_T030_T03'; + motor.cutoffTime = []; % [s] OVERRIDE Cutoff time motor.ignitionTransient = 0.3; % [s] Ignition transient motor.cutoffTransient = 0.3; % [s] Cut-off transient diff --git a/missions/2024_Lyra_Portugal_October/config/windConfig.m b/missions/2024_Lyra_Portugal_October/config/windConfig.m index 07f38b2b123a014037634ba2d44c4b8bc6e86542..32bd11ee5e83b92402b84277be0e5e943e2dca34 100644 --- a/missions/2024_Lyra_Portugal_October/config/windConfig.m +++ b/missions/2024_Lyra_Portugal_October/config/windConfig.m @@ -11,12 +11,19 @@ windCustom = WindCustom(); -windCustom.altitudes = [0 4500]; % [m] Altitudes at which a distribution change occurs -windCustom.magnitudeDistribution = ["u", "u"]; % [-] Distribution type: "u" - uniform, "g" - gaussian -windCustom.magnitudeParameters = [0 0; 9 9]; % [m/s] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] -windCustom.azimuthDistribution = ["u", "u"]; % [-] Distribution type: "u" - uniform, "g" - gaussian -windCustom.azimuthParameters = [0 0; 359 359]*pi/180; % [deg] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] +windCustom.altitudes = [0 140 500 1000 1500 2000 2500 3000 3500 4000]; % [m] Altitudes at which a distribution change occurs +windCustom.magnitudeDistribution = ["u", "g", "g", "g", "g", "g", "g", "g", "g", "g"]; % [-] Distribution type: "u" - uniform, "g" - gaussian +windCustom.magnitudeParameters = [0 7 12 13 13 14 14 15 15 15; + 8.7 1.5 3 3 3 3 3 3 3 3]; % [m/s] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] +windCustom.azimuthDistribution = ["u", "u", "u", "u", "u", "u", "u", "u", "u", "u"]; % [-] Distribution type: "u" - uniform, "g" - gaussian +windCustom.azimuthParameters = [270 270 270 280 270 260 260 240 240 240; + 290 290 290 300 290 280 280 280 280 280]*pi/180; % [deg] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] +% windCustom.altitudes = [0 4500]; +% windCustom.magnitudeDistribution = ["u", "u"]; +% windCustom.magnitudeParameters = [0 0; 15 15]; +% windCustom.azimuthDistribution = ["u", "u"]; +% windCustom.azimuthParameters = [0 0; 359 359]; %% MATLAB WIND MODEL windMatlab = WindMatlab(); diff --git a/missions/2024_Lyra_Portugal_October/data/CAinterpCoeffsCFD.mat b/missions/2024_Lyra_Portugal_October/data/CAinterpCoeffsCFD.mat new file mode 100644 index 0000000000000000000000000000000000000000..09fb87f1a98fcc15153b8f625efa0d15d0060513 --- /dev/null +++ b/missions/2024_Lyra_Portugal_October/data/CAinterpCoeffsCFD.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9221aed0db8ff77094a51666398ae6022e5f872a4b2237db251a820e940d9820 +size 401 diff --git a/missions/2024_Lyra_Portugal_October/data/aeroCoefficients.mat b/missions/2024_Lyra_Portugal_October/data/aeroCoefficients.mat index 92f4308b883f053d539d101f92b86ba157dd54d8..cb08e7caae117a9b093e6bf16ebff263f28a0a22 100644 --- a/missions/2024_Lyra_Portugal_October/data/aeroCoefficients.mat +++ b/missions/2024_Lyra_Portugal_October/data/aeroCoefficients.mat @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a73904d22cc3d6e733b357fbadfd18596d4f43a32978e8718e591ab6a67101ab -size 36219479 +oid sha256:f4067a6efdc402fc246e7d936654eeecfd198a849959357e39b83e01a435ba0f +size 36220522 diff --git a/missions/2024_Lyra_Portugal_October/data/aeroCoefficientsHighAOA.mat b/missions/2024_Lyra_Portugal_October/data/aeroCoefficientsHighAOA.mat index 1d045725b3897678e6d17e13560fcdc747acba28..5220550e968edbdbbd03e0afcdfc43236c9d0fd5 100644 --- a/missions/2024_Lyra_Portugal_October/data/aeroCoefficientsHighAOA.mat +++ b/missions/2024_Lyra_Portugal_October/data/aeroCoefficientsHighAOA.mat @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:477f611187d7a70525ede0d6a78254332163ef8db97d2ca306df9fe93773a6a5 -size 5777844 +oid sha256:9deb0d6cb2d344ddd2be49b95d2393484357ed1e5a947247ad1de51fa43da67b +size 5777781 diff --git a/missions/2024_Lyra_Portugal_October/data/motors.mat b/missions/2024_Lyra_Portugal_October/data/motors.mat index fbad2d9fa76d068810d415d028c5213f4277a325..55a755a3d7d13c2264888f3cf2a8599fda88d9b2 100644 --- a/missions/2024_Lyra_Portugal_October/data/motors.mat +++ b/missions/2024_Lyra_Portugal_October/data/motors.mat @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6b54a264d9ae4628a203d7bcca2a4db3e6853835d5d1a403d4f8d999d2a0d08 -size 5458716 +oid sha256:626138baa91a9d2772b1560cd9961dae68e535d21fe7bb58f1582d9aded7d1fa +size 11314751 diff --git a/missions/2024_Lyra_Roccaraso_September/config/environmentConfig.m b/missions/2024_Lyra_Roccaraso_September/config/environmentConfig.m index 8edb7d17db4bd37dcaef213a78c9b66eeedd4357..c028315ed9d95392e7af87cc36456fffc11f562c 100644 --- a/missions/2024_Lyra_Roccaraso_September/config/environmentConfig.m +++ b/missions/2024_Lyra_Roccaraso_September/config/environmentConfig.m @@ -7,8 +7,8 @@ environment = Environment(); environment.lat0 = 41.8084579; % [deg] Launchpad latitude environment.lon0 = 14.0546408; % [deg] Launchpad longitude environment.z0 = 1414; % [m] Launchpad Altitude -environment.omega = 85; % [deg] Launchpad Elevation -environment.phi = 170; % [deg] Launchpad Azimuth +environment.omega = 83; % [deg] Launchpad Elevation +environment.phi = 165; % [deg] Launchpad Azimuth environment.pin1Length = 0.5603; % [m] Distance from the upper pin to the upper tank cap environment.pin2Length = 0.2055; % [m] Distance from the lower pin to the lower tank cap environment.rampLength = 10; % [m] Total launchpad length diff --git a/missions/2024_Lyra_Roccaraso_September/config/paraConfig.m b/missions/2024_Lyra_Roccaraso_September/config/paraConfig.m index 6c8e9277f399c7d1e2dc20c9446d8db419ada0ae..80f10dae397f28bea09650adb0ab541f5f1d2090 100644 --- a/missions/2024_Lyra_Roccaraso_September/config/paraConfig.m +++ b/missions/2024_Lyra_Roccaraso_September/config/paraConfig.m @@ -1,29 +1,30 @@ % CONFIG - This script contains information about the parachutes onboard +%% MAIN CHUTES % parachute 1 -para(1, 1) = Parachute(); - -para(1, 1).name = 'DROGUE chute'; -para(1, 1).surface = 0.6; % [m^2] Surface -para(1, 1).mass = 0.15; % [kg] Parachute Mass -para(1, 1).cd = 0.75; % [/] Parachute Drag Coefficient -para(1, 1).cl = 0; % [/] Parachute Lift Coefficient -para(1, 1).openingTime = 1.1; % [s] drogue opening delay -para(1, 1).finalAltitude = 350; % [m] Final altitude of the parachute -para(1, 1).cx = 1.4; % [/] Parachute Longitudinal Drag Coefficient -para(1, 1).chordLength = 1.5; % [m] Shock Chord Length -para(1, 1).chordK = 7200; % [N/m^2] Shock Chord Elastic Constant -para(1, 1).chordC = 0; % [Ns/m] Shock Chord Dynamic Coefficient -para(1, 1).m = 1; % [m^2/s] Coefficient of the surface vs. time opening model -para(1, 1).nf = 12; % [/] Adimensional Opening Time -para(1, 1).expulsionSpeed = 5; % [m/s] Expulsion Speed -para(1, 1).forceCoefficient = 1.8; % [-] Empirical coefficient to obtain correct peak force at deployment +% para(1, 1) = Parachute(); +% +% para(1, 1).name = 'DROGUE chute'; +% para(1, 1).surface = 0.6; % [m^2] Surface +% para(1, 1).mass = 0.25; % [kg] Parachute Mass +% para(1, 1).cd = 0.75; % [/] Parachute Drag Coefficient +% para(1, 1).cl = 0; % [/] Parachute Lift Coefficient +% para(1, 1).openingTime = 0.1; % [s] drogue opening delay +% para(1, 1).finalAltitude = 350; % [m] Final altitude of the parachute +% para(1, 1).cx = 1.4; % [/] Parachute Longitudinal Drag Coefficient +% para(1, 1).chordLength = 1.5; % [m] Shock Chord Length +% para(1, 1).chordK = 7200; % [N/m^2] Shock Chord Elastic Constant +% para(1, 1).chordC = 0; % [Ns/m] Shock Chord Dynamic Coefficient +% para(1, 1).m = 1; % [m^2/s] Coefficient of the surface vs. time opening model +% para(1, 1).nf = 12; % [/] Adimensional Opening Time +% para(1, 1).expulsionSpeed = 5; % [m/s] Expulsion Speed +% para(1, 1).forceCoefficient = 1.8; % [-] Empirical coefficient to obtain correct peak force at deployment % parachute 2 para(2, 1) = Parachute(); para(2, 1).name = 'MAIN chute'; para(2, 1).surface = 14; % [m^2] Surface -para(2, 1).mass = 1.05; % [kg] Parachute Mass +para(2, 1).mass = 1.5; % [kg] Parachute Mass para(2, 1).cd = 0.6; % [/] Parachute Drag Coefficient para(2, 1).cl = 0; % [/] Parachute Lift Coefficient para(2, 1).openingTime = 0.9; % [s] drogue opening delay @@ -43,7 +44,7 @@ para(1, 2) = Parachute(); para(1, 2).name = "Payload DROGUE"; para(1, 2).surface = 0.11; % [m^2] Surface -para(1, 2).mass = 0.15; % [kg] Parachute Mass +para(1, 2).mass = 0.1; % [kg] Parachute Mass para(1, 2).cd = 1.2; % [/] Parachute Drag Coefficient para(1, 2).cl = 0; % [/] Parachute Lift Coefficient para(1, 2).openingTime = 1; % [s] drogue opening delay @@ -61,18 +62,12 @@ para(1, 2).forceCoefficient = 0; % [-] Empirical coefficient to obtain para(2, 2) = Parafoil(); para(2, 2).name = "Payload AIRFOIL"; -para(2, 2).mass = 0.50; % [kg] Parafoil Mass +para(2, 2).mass = 0.40; % [kg] Parafoil Mass para(2, 2).openingTime = 0; % [s] Parafoil opening delay para(2, 2).surface = 0.11; % [m^2] Surface para(2, 2).deltaSMax = 0.1; % max value -uMax = 0; -uMin = 0; -identification = 0; -deltaATau = 0; -maxSpeed = 0; - para(2, 2).semiWingSpan = 2.55/2; % [m] settings.para(2, 2).b: semiwingspan - vela nuova: 2.55/2; - vela vecchia: 2.06/2; para(2, 2).MAC = 0.8; % [m] mean aero chord para(2, 2).surface = 2.04; % [m^2] parafoil surface - vela nuova 2.04; - vela vecchia: 1.64; diff --git a/missions/2024_Lyra_Roccaraso_September/config/rocketConfig.m b/missions/2024_Lyra_Roccaraso_September/config/rocketConfig.m index f48ddbedc81a0cee762de69a1c6c2f05d32a1a11..bcc3bb6fcdf2897a46ea8920d80f6cc3ad9fdee6 100644 --- a/missions/2024_Lyra_Roccaraso_September/config/rocketConfig.m +++ b/missions/2024_Lyra_Roccaraso_September/config/rocketConfig.m @@ -4,7 +4,7 @@ rocket = Rocket(); rocket.diameter = 0.15; % [m] Rocket diameter -rocket.massNoMotor = []; % [kg] OVERRIDE mass without motor +rocket.massNoMotor = 14.0376; % [kg] OVERRIDE mass without motor rocket.inertiaNoMotor = []; % [kg*m^2] OVERRIDE inertia without motor - body axes reference rocket.xCgNoMotor = []; % [m] OVERRIDE xCg without motor rocket.lengthCenterNoMot = []; % [m] OVERRIDE Center length - no nose, no motor @@ -48,34 +48,37 @@ electronics.xCg = 229.9 * 1e-3; % [m] Cg rel %% ARB airbrakes = Airbrakes(); +airbrakes.identification = false; % Control parameter for airbrakes - GNC + airbrakes.length = 54.8 * 1e-3; % [m] Total bay length airbrakes.mass = 0.936; % [kg] Total bay mass airbrakes.inertia = 1e-9*[3086650; 1931082; 1889047]; % [kg*m^2] Total bay inertia (Body reference) airbrakes.xCg = 30.54 * 1e-3; % [m] Cg relative to bay upper side -airbrakes.enabled = false; % If true, multiple and smooth airbrakes opening will be simulated +airbrakes.enabled = true; % If true, multiple and smooth airbrakes opening will be simulated airbrakes.extension = [1]; % aerobrakes, 1-2-3 for 0%, 50% or 100% opened airbrakes.deltaTime = [0]; % aerobrakes, configurations usage time airbrakes.n = 3; % [-] number of brakes airbrakes.height = linspace(0, 0.0363, 3); % [m] Block airbrakes opening coordinate ( First entry must be 0! ) airbrakes.angleFunction = ... - @(x) 1*x^4 + 2*x^3 + 3*x^2 + 4*x; % [-] Relation between angle and extension height -airbrakes.angleFunction = ... - @(x) 1*x^4 + 2*x^3 + 3*x^2 + 4*x; % [-] Relation between angle and extension height + @(x) -0.009083*x^4 + 0.02473*x^3 + ... + -0.01677*x^2 + 0.03129*x; % [-] Relation between angle and extension height airbrakes.width = 0.1002754821; % [m] brakes width (normal) airbrakes.thickness = 0.008; % [m] brakes thickness airbrakes.xDistance = 1.517; airbrakes.maxMach = 0.8; % [-] Maximum Mach at which airbrakes can be used -airbrakes.servoOmega = 150*pi/180; % [rad/s] Servo-motor angular velocity +airbrakes.servoOmega = 300*pi/180; % [rad/s] Servo-motor angular velocity +airbrakes.servoTau = 0.0374588; %% MOTOR motor = Motor(); -motor.name = 'HRE_ARM_RU60SFT5'; % [-] Motor name +motor.name = 'HRE_ARM_Rocc_PTank_T015_T02'; + motor.cutoffTime = []; % [s] OVERRIDE Cutoff time -motor.ignitionTransient = 0.3; % [s] Ignition transient +motor.ignitionTransient = 0.15; % [s] Ignition transient motor.cutoffTransient = 0.3; % [s] Cut-off transient %% REAR - Includes Fincan + Boat diff --git a/missions/2024_Lyra_Roccaraso_September/config/windConfig.m b/missions/2024_Lyra_Roccaraso_September/config/windConfig.m index 5392f93f8ed19534df9dcfabec177d43b7344bfb..cd274dacf5d5590e4e3c49b00f0b63d47a2edf5d 100644 --- a/missions/2024_Lyra_Roccaraso_September/config/windConfig.m +++ b/missions/2024_Lyra_Roccaraso_September/config/windConfig.m @@ -11,12 +11,13 @@ windCustom = WindCustom(); -windCustom.altitudes = [0 200 2000]; % [m] Altitudes at which a distribution change occurs -windCustom.magnitudeDistribution = ["g", "u", "u"]; % [-] Distribution type: "u" - uniform, "g" - gaussian -windCustom.magnitudeParameters = [7 2 10; % [m/s] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] - 0.5 9 20]; -windCustom.azimuthDistribution = ["u", "u", "u"]; % [-] Distribution type: "u" - uniform, "g" - gaussian -windCustom.azimuthParameters = 90*pi/180 * ones(2,3); % [deg] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] +windCustom.altitudes = [0 500 900 1200]; % [m] Altitudes at which a distribution change occurs +windCustom.magnitudeDistribution = ["g", "g", "g", "g"]; % [-] Distribution type: "u" - uniform, "g" - gaussian +windCustom.magnitudeParameters = [4 5 5 4; % [m/s] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] + 0.25 0.83 0.83 0.83]; +windCustom.azimuthDistribution = ["u", "u", "u", "u"]; % [-] Distribution type: "u" - uniform, "g" - gaussian +windCustom.azimuthParameters = [350 320 320 320; + 370 370 370 370]*pi/180; % [deg] Distribution parameters: "u" - [min; max], "g" - [mu; sigma] %% MATLAB WIND MODEL diff --git a/missions/2024_Lyra_Roccaraso_September/data/CAinterpCoeffsCFD.mat b/missions/2024_Lyra_Roccaraso_September/data/CAinterpCoeffsCFD.mat new file mode 100644 index 0000000000000000000000000000000000000000..09fb87f1a98fcc15153b8f625efa0d15d0060513 --- /dev/null +++ b/missions/2024_Lyra_Roccaraso_September/data/CAinterpCoeffsCFD.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9221aed0db8ff77094a51666398ae6022e5f872a4b2237db251a820e940d9820 +size 401 diff --git a/missions/2024_Lyra_Roccaraso_September/data/RoccarasoEngineData.mat b/missions/2024_Lyra_Roccaraso_September/data/RoccarasoEngineData.mat new file mode 100644 index 0000000000000000000000000000000000000000..423e8ab4c5b0ca1f456a42b9620b66db39e77b13 --- /dev/null +++ b/missions/2024_Lyra_Roccaraso_September/data/RoccarasoEngineData.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:500cfe17986d4164fe7f8a315f13a0dc76c85f68103c148271fd7de4d77efcbb +size 7457 diff --git a/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficients.mat b/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficients.mat index ee8588c84c3f4a8127c4aa5058f97f6723ebe8c2..fdff8eca182197966866ab16a2da4fdb949534d1 100644 --- a/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficients.mat +++ b/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficients.mat @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00f23dc3e81516ead03d5840020c94bad7ff99a6998982acd8d26038f0efdc89 -size 36220998 +oid sha256:5d82a35bf673e0e33613384102d303aa84af3cdfaa153410681666c4b88b5080 +size 44347284 diff --git a/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficientsHighAOA.mat b/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficientsHighAOA.mat index 3c156770dafae9e11cd4cf7200b7eb0109cb8d3e..b737cf0ae9660af47606005e430870ae9b0a35d4 100644 --- a/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficientsHighAOA.mat +++ b/missions/2024_Lyra_Roccaraso_September/data/aeroCoefficientsHighAOA.mat @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96b0144c90ee0857ac40f58e86674eabedf649668a9fca2dc1143f5c991f15a9 -size 5778093 +oid sha256:c7b7433b4b996539ffe5d399f48429385843aa0813b563976215e549d1022776 +size 5781680 diff --git a/missions/2024_Lyra_Roccaraso_September/data/cfdData.mat b/missions/2024_Lyra_Roccaraso_September/data/cfdData.mat new file mode 100644 index 0000000000000000000000000000000000000000..43fd1dec2ebacce7e59bd6c91cb6fe2125fa45b3 --- /dev/null +++ b/missions/2024_Lyra_Roccaraso_September/data/cfdData.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cbd320ae24ed070f7e77e4e81a9e195c0c5f58ddb2d49496b52408df62436ef +size 281 diff --git a/missions/2024_Lyra_Roccaraso_September/data/motors.mat b/missions/2024_Lyra_Roccaraso_September/data/motors.mat index 3254997629ea09995547781d24d4d43e57c96ce7..85d4fea3cfac8799af6e0e24c83315da603288bd 100644 --- a/missions/2024_Lyra_Roccaraso_September/data/motors.mat +++ b/missions/2024_Lyra_Roccaraso_September/data/motors.mat @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:584452c61d40dbe54a0cc3e0026c514fc2922c9fe577dc96806fe41dee78a917 -size 234651 +oid sha256:312a942802711eadaa2bbeb680228b028118e5deccf46c10f6a36719778f09e2 +size 5523706 diff --git a/missions/2024_Lyra_Roccaraso_September/data/satelliteData.mat b/missions/2024_Lyra_Roccaraso_September/data/satelliteData.mat new file mode 100644 index 0000000000000000000000000000000000000000..086bc4c8ac2583f89a6b6ffe2e98d55e65925f7d --- /dev/null +++ b/missions/2024_Lyra_Roccaraso_September/data/satelliteData.mat @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01301b7d1248be552e296924c120f66094b8b2770f9499e4befd6a277ced75c9 +size 197 diff --git a/missions/2024_Lyra_Roccaraso_September/data/satelliteMap.tif b/missions/2024_Lyra_Roccaraso_September/data/satelliteMap.tif new file mode 100644 index 0000000000000000000000000000000000000000..804387bbb68ec22b082b7496ba1928f45e9fc375 Binary files /dev/null and b/missions/2024_Lyra_Roccaraso_September/data/satelliteMap.tif differ