diff --git a/classes/@Rocket/update.m b/classes/@Rocket/update.m index ae246b7ba4aef47fe361667779210b34848682a5..2685b088cf65d6127205911558f02de37d819e7e 100644 --- a/classes/@Rocket/update.m +++ b/classes/@Rocket/update.m @@ -27,8 +27,9 @@ if ~override('INERTIA') % [3xN] Ix, Iy, Iz % Assumption: xCgs are close to rocket axis motorInertia = obj.motor.inertia(2:3, :) + ... - (obj.xcg - (obj.motor.position + obj.motor.xcg)).^2 .* obj.motor.mass; - baysInertia = obj.inertiaNoMotor(2:3, :); + (obj.xcg - (obj.motor.position + obj.motor.xcg)).^2 .* obj.motor.mass; + baysInertia = obj.inertiaNoMotor(2:3, :) + ... + (obj.xcg - obj.xcgNoMotor).^2 .* obj.massNoMotor; obj.inertia = [obj.motor.inertia(1, :) + obj.inertiaNoMotor(1, :); motorInertia + baysInertia]; diff --git a/classes/@Rocket/updateBay.m b/classes/@Rocket/updateBay.m index 4fb11c5f836abec619d623cb3da2045213d89b61..e5355e9ad450158c90f9103a6816cea1c34aadd7 100644 --- a/classes/@Rocket/updateBay.m +++ b/classes/@Rocket/updateBay.m @@ -6,7 +6,8 @@ if ~all(values(obj.bayStatus)), return; end bays = obj.bays; %% Update positions -obj.(bays(1)).position = 0; +% The only contribution is the offset +obj.(bays(1)).position = obj.(bays(1)).offset; for i = 2:length(bays) bay = bays(i); prevBay = bays(i-1); diff --git a/classes/bays/Parafoil.m b/classes/bays/Parafoil.m index f87d709d87937f566beb4ae0d21bda9a230e4855..b6d7f5937a66633e4796d56d71c1095a534fc215 100644 --- a/classes/bays/Parafoil.m +++ b/classes/bays/Parafoil.m @@ -45,6 +45,11 @@ classdef Parafoil < Bay end obj@Bay(mission, varIn); end + + function obj = set.noseLength(obj, value) + obj.noseLength = value; + obj.offset = -value; + end end % methods diff --git a/missions/2025_Orion_Portugal_October/config/environmentConfig.m b/missions/2025_Orion_Portugal_October/config/environmentConfig.m index 78a48f9be3b82c77948133bfe4a8f6629bd2d180..fa1d51fd601e18023ec78bb59f60441aa9c108ab 100644 --- a/missions/2025_Orion_Portugal_October/config/environmentConfig.m +++ b/missions/2025_Orion_Portugal_October/config/environmentConfig.m @@ -13,7 +13,7 @@ environment.pin1Length = 0.5603; % [m] Distance from the upper pin to the environment.pin2Length = 0.2055; % [m] Distance from the lower pin to the lower tank cap environment.rampLength = 12; % [m] Total launchpad length -environment.temperature = []; % [K] Ground temperature correction -environment.pressure = []; % [Pa] Ground pressure correction -environment.rho = []; % [Kg/m^3] Gorund air density correction -environment.gamma = 1.4; % [-] Gas constant \ No newline at end of file +% environment.temperature = []; % [K] Ground temperature correction +% environment.pressure = []; % [Pa] Ground pressure correction +% environment.rho = []; % [Kg/m^3] Gorund air density correction +% environment.gamma = 1.4; % [-] Gas constant \ No newline at end of file diff --git a/missions/2025_Orion_Portugal_October/config/rocketConfig.m b/missions/2025_Orion_Portugal_October/config/rocketConfig.m index 543b878d8b90c5266590fe71241850d3d447284d..c8791602b6261e955857793796d59d896bd004bc 100644 --- a/missions/2025_Orion_Portugal_October/config/rocketConfig.m +++ b/missions/2025_Orion_Portugal_October/config/rocketConfig.m @@ -78,7 +78,8 @@ motor.cutoffTransient = 0.3; % [s] Cut-o %% REAR - Includes Fincan + Boat rear = Rear(); -rear.length = 477 * 1e-3; % [m] Total bay length +rear.offset = -0.6936; % [m] offset from +rear.length = 477 * 1e-3; % [m] Total bay length rear.mass = 1736.32 *1e-3; % [kg] Total bay mass rear.inertia = 1e-9*[13662070; 47529495; 47528846]; % [kg*m^2] Total bay inertia (Body reference) rear.xcg = 236.82 * 1e-3; % [m] Cg relative to bay upper side