diff --git a/functions/odeFunctions/descentParachute.m b/functions/odeFunctions/descentParachute.m index 83720d05df43a664ccb0899d69dacb15a95c6849..6e3e77d4bbd4be50f691c853ab626f926bac6614 100644 --- a/functions/odeFunctions/descentParachute.m +++ b/functions/odeFunctions/descentParachute.m @@ -1,4 +1,4 @@ -function [dY, parout] = descentParachute(~, Y, rocket, environment, wind, descentData, wrapper) +function [dY, parout] = descentParachute(~, Y, rocket, environment, wind, descentData, wrapper, Q) arguments ~ Y @@ -7,6 +7,7 @@ arguments wind % WindCustom {mustBeA(wind, {'WindCustom', 'WindMatlab'})} descentData struct wrapper = [] %DataWrapper = DataWrapper.empty + Q = [1 0 0 0] end % descentParachute - ode function of the 3DOF parachute model % @@ -111,6 +112,7 @@ L = 0.5*rho*V_norm^2*S*CL*n_vers'; % [N] Lift vector Fg = m*g*[0 0 1]'; % [N] Gravitational Force vector F = L + Fg + D; % [N] total forces vector +F_acc = F - Fg; %% STATE DERIVATIVES % velocity du = F(1)/m; @@ -142,6 +144,7 @@ if nargout == 2 || ~isempty(wrapper) parout.air.P = P; parout.accelerations.body = [du; dv; dw]; + parout.accelerometer.body_acc = quatrotate(Q,(F_acc/m)'); parout.coeff = []; parout.uncertanty = [];