Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • skyward/matlab-dependencies/common
1 result
Select Git revision
Show changes
Commits on Source (20)
# data # Common
This folder contains all the engines and the list of the rockets which are available within the repository.
Common is a **submodule** of msa-toolkit repository.
## Gemini_Portugal_October_2023 ![](https://img.shields.io/badge/-work%20in%20progress-green) A **submodule** is a separate repo, with its own commits and history, of your main project. It is shown as a subdirectory of the main repo, but technically is not just a subdirectory. This is due to the fact that the submodule and the repo are treated separately.
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Gemini <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2023 <br />
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pont de Sor (POR) <br />
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TBD <br />
<br /><br />
For example, the main repo we are going to use is `msa-toolkit`. This repo has a submodule which is `common` where all the common files, data, and functions are stored.
## Gemini_Roccaraso_September_2023 ![](https://img.shields.io/badge/-work%20in%20progress-green)
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Gemini <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2023 <br />
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; Roccaraso (ITA) <br />
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TBD <br />
<br /><br />
<div style="border-left: 4px solid #ffa500; padding: 10px;">
<strong style="color: #ffa500;">⚠ Warning:</strong> When working on main repo msa-toolkit be sure which branch/commit your submodule is checked out on. Data and results may be different in simulation if submodule is not updated to latest version!
</div>
## Pyxis_Portugal_October_2022
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pyxis <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2022 <br />
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pont de Sor (POR) <br />
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;13/10/2022 <br />
<br /><br />
## Submodule architecture
## Pyxis_Roccaraso_September_2022 The submodule is divided into four main folders:
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pyxis <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2022 <br />
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Roccaraso (ITA) <br />
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 17/09/2022 <br />
<br /><br />
* **classes**: in this folder you can find the classes over which are defined methods and variables. They are the "kernel" of the toolkit.
* **functions**: here you can find all the functions to make msa toolkits working; there are plenty of functions, from ode functions to functions which generates standardized plots for reports.
* **missions**: here all the missions together with all data are stored. By opening `missionConfig.m` you can choose the mission.
## Lynx_Portugal_October_2021 ```matlab
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Lynx <br /> mission = Mission();
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2021 <br /> mission.name = '2025_Orion_Portugal_October';
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pont de Sor (POR) <br /> ```
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 13/10/2021 <br /> * **settings**: this folder only contains `odeConfig.m`, which contains ODE settings.
<br /><br />
<div style="border-left: 4px solid rgb(229, 77, 92); padding: 10px;"><strong style="color:rgb(229, 77, 92)">! Caution:</strong> Don't touch `odeConfig.m` if you don't know what you're doing, from this configuration file depend ODE-based script, such ad `ballistic.m`, and so do all the toolkits!.
</div>
## Lynx_Roccaraso_September_2021 Inside the mission folder, you can find all the missions and their data and configurations file. Each folder has the name of the mission in a specific format/order. This format is the one you have to use when specifying the mission in `missionConfig.m`.
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Lynx <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2021 <br />
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Roccaraso (ITA) <br />
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18/09/2021 <br />
<br /><br />
```matlab
% YEAR_ROCKETNAME_LOCATION_MONTH
mission.name = '2025_Orion_Portugal_October';
```
Inside this folder you will find:
## HermesV1_Roccaraso_November_2019 * config: there are four files of config:
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Lynx <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2019 <br />
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Roccaraso (ITA) <br />
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15/11/2019 <br /> <br /> <br /> <br />
* `environmentConfig.m`: it sets environmental variables for the launch and they are independent from the rocket itself (latitude, longitude, ...)
* `paraConfig.m`: configs for all parachutes onboard, including both the main and parafoil
* `rocketConfig.m`: general parameters of the rocket divided for each bay (nose, parafoil, recovery, ...)
* `windConfig.m`: wind custom and wind matlab configs
* data: all the `.mat` files are stored; they collect all the data which will be used by toolkits
<div style="border-left: 4px solid rgb(30, 139, 255); padding: 10px;"><strong style="color:rgb(30, 139, 255)">ℹ️ Note:</strong> Classes were introduced during the 2024 refactoring of the toolkit! This new architecture enhances robustness, automation, and includes auto-generated documentation for classes.
</div>
## R2A_Sardinia_July_2017
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; R2A <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2017 <br />
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sardinia (ITA) <br />
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;07/2017 <br /> <br /> <br /> <br />
# Projects
## Constellation programme
### 2025
| **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------- | ------------------------------------------------------------ |
| Orion | ![](https://img.shields.io/badge/Hybrid-blue) ![](https://img.shields.io/badge/Armored-darkgreen) ![](https://img.shields.io/badge/Pressurized-lightblue) | Pont de Sor (POR) | TBD | ![](https://img.shields.io/badge/-work%20in%20progress-blue) |
| Orion | ![](https://img.shields.io/badge/Hybrid-blue) ![](https://img.shields.io/badge/Armored-darkgreen) ![](https://img.shields.io/badge/Pressurized-lightblue) | Roccaraso (ITA) | TBD | ![](https://img.shields.io/badge/-work%20in%20progress-blue) |
## R1X_Roccaraso_July_2014 ---
**Project name:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; R1X <br />
**Year of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2014 <br /> ### 2024
**Location of Launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Roccaraso (ITA) <br /> | **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
**Date of launch:** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 07/2014 <br /> <br /> <br /> <br /> | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------- | ------------------------------------------------------------------ |
| Lyra | ![](https://img.shields.io/badge/Hybrid-blue) ![](https://img.shields.io/badge/Armored-darkgreen) ![](https://img.shields.io/badge/N20-orange) | Pont de Sor (POR) | 12/10/2024 | ![](https://img.shields.io/badge/completed%20with%20success-green) |
| Lyra | ![](https://img.shields.io/badge/Hybrid-blue) ![](https://img.shields.io/badge/Armored-darkgreen) ![](https://img.shields.io/badge/N20-orange) | Roccaraso (ITA) | 14/09/2024 | ![](https://img.shields.io/badge/completed%20with%20success-green) |
---
### 2023
| **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------- | ------------------------------------------------------------------ |
| Gemini | ![](https://img.shields.io/badge/Hybrid-blue) ![](https://img.shields.io/badge/ABS-grey) ![](https://img.shields.io/badge/N20-orange) | Pont de Sor (POR) | 17/10/2023 | ![](https://img.shields.io/badge/not%20launched-red) |
| Gemini | ![](https://img.shields.io/badge/Hybrid-blue) ![](https://img.shields.io/badge/ABS-grey) ![](https://img.shields.io/badge/N20-orange) | Roccaraso (ITA) | 19/09/2023 | ![](https://img.shields.io/badge/completed%20with%20success-green) |
---
### 2022
| **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
| ----------- | ---------------------------------------------- | ----------------- | ---------- | ------------------------------------------------------------------ |
| Pyxis | ![](https://img.shields.io/badge/Solid-8A2BE2) | Pont de Sor (POR) | 13/10/2022 | ![](https://img.shields.io/badge/completed%20with%20success-green) |
| Pyxis | ![](https://img.shields.io/badge/Solid-8A2BE2) | Roccaraso (ITA) | 17/09/2022 | ![](https://img.shields.io/badge/completed%20with%20success-green) |
---
### 2021
| **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
| ----------- | ---------------------------------------------- | ----------------- | ---------- | ------------------------------------------------------------------ |
| Lynx | ![](https://img.shields.io/badge/Solid-8A2BE2) | Pont de Sor (POR) | 13/10/2021 | ![](https://img.shields.io/badge/completed%20with%20success-green) |
| Lynx | ![](https://img.shields.io/badge/Solid-8A2BE2) | Roccaraso (ITA) | 18/09/2021 | ![](https://img.shields.io/badge/completed%20with%20success-green) |
---
## Previous projects
### 2019
| **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
| ----------- | --------------- | --------------- | ---------- | ---------- |
| HermesV1 | tbd | Roccaraso (ITA) | 15/11/2019 | |
---
### 2017
| **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
| ----------- | --------------- | --------------- | -------- | ---------- |
| R2A | tbd | Sardinia (ITA) | 07/2017 | |
---
### 2014
| **Project** | **Engine type** | **Launch site** | **Date** | **Status** |
| ----------- | --------------- | --------------- | -------- | ---------- |
| R1X | tbd | Roccaraso (ITA) | 07/2014 | |
...@@ -24,12 +24,14 @@ classdef Mission < Config ...@@ -24,12 +24,14 @@ classdef Mission < Config
properties(Access = protected) properties(Access = protected)
configName = 'missionConfig.m' configName = 'missionConfig.m'
variableName = '' variableName = ''
changeMatlabPath (1,1) logical
end end
methods methods
function obj = Mission(mission) function obj = Mission(mission, options)
arguments arguments
mission {mustBeA(mission, {'logical', 'string', 'char'})} = false mission {mustBeA(mission, {'logical', 'string', 'char'})} = false
options.changeMatlabPath = true;
end end
if nargin == 0 if nargin == 0
...@@ -39,6 +41,7 @@ classdef Mission < Config ...@@ -39,6 +41,7 @@ classdef Mission < Config
filePath = fullfile(fileparts(mfilename("fullpath")), '..', 'missions'); filePath = fullfile(fileparts(mfilename("fullpath")), '..', 'missions');
filePath = trimPath(filePath); filePath = trimPath(filePath);
obj.changeMatlabPath = options.changeMatlabPath;
obj.currentPath = filePath; obj.currentPath = filePath;
if isa(mission, 'char') || isa(mission, 'string') if isa(mission, 'char') || isa(mission, 'string')
obj.name = mission; obj.name = mission;
...@@ -70,20 +73,11 @@ classdef Mission < Config ...@@ -70,20 +73,11 @@ classdef Mission < Config
obj.name = name; obj.name = name;
end end
obj.updatePath(); obj.updatePath();
obj.updateMatlabPath();
end end
end end
methods(Access = protected) methods(Access = protected)
function updatePath(obj)
if isempty(obj.name) || isempty(obj.currentPath), return; end
obj.configPath = fullfile(obj.currentPath, obj.name, 'config');
obj.dataPath = fullfile(obj.currentPath, obj.name, 'data');
obj.msaPath = trimPath( ...
fullfile(obj.currentPath, '..', '..', '..', 'msa-toolkit') ...
);
end
function loadConfig(obj) function loadConfig(obj)
fileName = obj.configName; fileName = obj.configName;
filePath = obj.currentPath; filePath = obj.currentPath;
...@@ -97,6 +91,39 @@ classdef Mission < Config ...@@ -97,6 +91,39 @@ classdef Mission < Config
configObj = eval(varName); configObj = eval(varName);
obj.name = configObj.name; obj.name = configObj.name;
end end
function updatePath(obj)
if isempty(obj.name) || isempty(obj.currentPath), return; end
obj.configPath = fullfile(obj.currentPath, obj.name, 'config');
obj.dataPath = fullfile(obj.currentPath, obj.name, 'data');
obj.msaPath = trimPath( ...
fullfile(obj.currentPath, '..', '..', '..', 'msa-toolkit') ...
);
end
function updateMatlabPath(obj)
if isempty(obj.name) || isempty(obj.currentPath), return; end
if ~obj.changeMatlabPath, return; end
matlabPath = path;
% Checking if other missions are in path
pattern = 'missions\\[^\\/]*;'; % Matches any config folder under mission in path
missionsInPath = regexp(matlabPath, pattern);
% Checking if right mission is in path
pattern = strcat('missions[\\/]', obj.name,';');
missionInPath = regexp(matlabPath, pattern, 'once');
if length(missionsInPath) > 1 || isempty(missionInPath)
warning('off');
rmpath( ...
genpath(obj.currentPath));
addpath( ...
obj.currentPath, ...
genpath( ...
fullfile(obj.currentPath, obj.name)));
warning('on');
end
end
end end
methods(Static, Access = protected) methods(Static, Access = protected)
......
...@@ -71,8 +71,13 @@ classdef Rocket < Component ...@@ -71,8 +71,13 @@ classdef Rocket < Component
overrides = ~cellfun(@isempty, {b.position}); overrides = ~cellfun(@isempty, {b.position});
overridesShift = logical([overrides(2:end), 0]); overridesShift = logical([overrides(2:end), 0]);
if any(overrides)
shift(overridesShift) = b(overrides).position; shift(overridesShift) = b(overrides).position;
end
if any(~overrides)
shift(~overridesShift) = [b(~overridesShift).length]; shift(~overridesShift) = [b(~overridesShift).length];
end
absPositions = cumsum([-shift(1); shift(1:end-1)]); absPositions = cumsum([-shift(1); shift(1:end-1)]);
absPositions = absPositions + ... absPositions = absPositions + ...
...@@ -84,8 +89,8 @@ classdef Rocket < Component ...@@ -84,8 +89,8 @@ classdef Rocket < Component
if ~isempty(obj.lengthCenterNoMot) if ~isempty(obj.lengthCenterNoMot)
obj.length = obj.lengthCenterNoMot + obj.motor.length + obj.parafoil.noseLength; obj.length = obj.lengthCenterNoMot + obj.motor.length + obj.parafoil.noseLength;
else else
obj.length = (obj.absolutePositions("rear") + obj.bays("rear").length ... obj.length = (obj.absolutePositions("rear") + obj.bays("rear").length) + ...
+ obj.bays("rear").finsDeltaXFreeChord) + obj.bays("parafoil").noseLength; obj.bays("parafoil").noseLength;
obj.lengthCenterNoMot = obj.absolutePositions("motor"); obj.lengthCenterNoMot = obj.absolutePositions("motor");
end end
if isempty(obj.crossSection) if isempty(obj.crossSection)
......
...@@ -25,6 +25,7 @@ classdef Motor < Bay ...@@ -25,6 +25,7 @@ classdef Motor < Bay
propellantMass double % [Kg] Propellant Mass (in time) propellantMass double % [Kg] Propellant Mass (in time)
structureMass double % [kg] Engine Structural Mass structureMass double % [kg] Engine Structural Mass
fuselageMass double % [kg] Fuselage of the engine only fuselageMass double % [kg] Fuselage of the engine only
chamberPressure double % [Pa] Pressure inside combustion chamber
xCg % [m] Engine xcg from tank tip xCg % [m] Engine xcg from tank tip
pe double % [Pa] Eflux pressure pe double % [Pa] Eflux pressure
ae double % [Pa] Eflux Area ae double % [Pa] Eflux Area
...@@ -109,6 +110,9 @@ classdef Motor < Bay ...@@ -109,6 +110,9 @@ classdef Motor < Bay
if obj.isHRE if obj.isHRE
obj.length = chosenMotor.L; obj.length = chosenMotor.L;
obj.tankLength = chosenMotor.Ltank; obj.tankLength = chosenMotor.Ltank;
if isempty(obj.tankLength)
obj.tankLength = chosenMotor.LtankPr + chosenMotor.LtankOx;
end
obj.fuelMass = chosenMotor.mFu; obj.fuelMass = chosenMotor.mFu;
obj.oxidizerMass = chosenMotor.mOx; obj.oxidizerMass = chosenMotor.mOx;
inertiaRaw = [chosenMotor.Ixx;chosenMotor.Iyy;chosenMotor.Izz]; inertiaRaw = [chosenMotor.Ixx;chosenMotor.Iyy;chosenMotor.Izz];
...@@ -117,6 +121,7 @@ classdef Motor < Bay ...@@ -117,6 +121,7 @@ classdef Motor < Bay
obj.pe = chosenMotor.Pe(iUniqueTime); obj.pe = chosenMotor.Pe(iUniqueTime);
obj.ae = chosenMotor.Ae; obj.ae = chosenMotor.Ae;
obj.fuselageMass = chosenMotor.mFus; obj.fuselageMass = chosenMotor.mFus;
obj.chamberPressure = chosenMotor.Pc;
else else
obj.length = chosenMotor.L/1000; % lengths are saved in mm for solid motors obj.length = chosenMotor.L/1000; % lengths are saved in mm for solid motors
obj.xCg = obj.length/2 * ones(1, size(obj.time, 2)); obj.xCg = obj.length/2 * ones(1, size(obj.time, 2));
......
...@@ -25,6 +25,7 @@ classdef Environment < Component ...@@ -25,6 +25,7 @@ classdef Environment < Component
pressure double % [Pa] Ground pressure pressure double % [Pa] Ground pressure
rho double % [Kg/m^3] Ground air density rho double % [Kg/m^3] Ground air density
gamma double = 1.4 % [-] Gas constant gamma double = 1.4 % [-] Gas constant
R double = 287 % [-] Gas constant
end end
properties(SetAccess = private) properties(SetAccess = private)
......
...@@ -20,11 +20,12 @@ classdef Parachute < Para ...@@ -20,11 +20,12 @@ classdef Parachute < Para
chordK double % [N/m^2] Shock Chord Elastic Constant chordK double % [N/m^2] Shock Chord Elastic Constant
chordC double % [Ns/m] Shock Chord Dynamic Coefficient chordC double % [Ns/m] Shock Chord Dynamic Coefficient
expulsionSpeed double expulsionSpeed double
cx double % [/] Parachute Longitudinal Drag Coefficient cx double % [-] Parachute Longitudinal Drag Coefficient
cd double % [/] Parachute Drag Coefficient cd double % [-] Parachute Drag Coefficient
cl double % [/] Parachute Lift Coefficient cl double % [-] Parachute Lift Coefficient
cq double % [-] Parachute Deviance Coefficient
m double % [m^2/s] Coefficient of the surface vs. time opening model m double % [m^2/s] Coefficient of the surface vs. time opening model
nf double % [/] Adimensional Opening Time nf double % [-] Adimensional Opening Time
forceCoefficient double % [-] Empirical coefficient to obtain correct peak force at deployment forceCoefficient double % [-] Empirical coefficient to obtain correct peak force at deployment
end end
......
...@@ -13,7 +13,7 @@ rocket.lengthCenterNoMot = []; % [m] ...@@ -13,7 +13,7 @@ rocket.lengthCenterNoMot = []; % [m]
parafoil = Parafoil(); parafoil = Parafoil();
parafoil.length = 646.2 * 1e-3; % [m] Total bay length parafoil.length = 646.2 * 1e-3; % [m] Total bay length
parafoil.mass = 5.2; % [kg] Total bay mass parafoil.mass = 5; % [kg] Total bay mass
parafoil.inertia = 1e-9*[10514313; 92235828; 92322682]; % [kg*m^2] Total bay inertia (Body reference) parafoil.inertia = 1e-9*[10514313; 92235828; 92322682]; % [kg*m^2] Total bay inertia (Body reference)
parafoil.xCg = 453.55 * 1e-3; % [m] Cg relative to bay upper side parafoil.xCg = 453.55 * 1e-3; % [m] Cg relative to bay upper side
...@@ -27,15 +27,15 @@ parafoil.noseCMod = 1.799127e-01; % [-] C ...@@ -27,15 +27,15 @@ parafoil.noseCMod = 1.799127e-01; % [-] C
recovery = Recovery(); recovery = Recovery();
recovery.length = 826 * 1e-3; % [m] Total bay length recovery.length = 826 * 1e-3; % [m] Total bay length
recovery.mass = 4.42; % [kg] Total bay mass recovery.mass = 4.452; % [kg] Total bay mass
recovery.inertia = 1e-9*[11870797; 264801282; 265519904]; % [kg*m^2] Total bay inertia (Body reference) recovery.inertia = 1e-9*[11889636; 274548189; 275245205]; % [kg*m^2] Total bay inertia (Body reference)
recovery.xCg = 459 * 1e-3; % [m] Cg relative to bay upper side recovery.xCg = 459 * 1e-3; % [m] Cg relative to bay upper side
%% ELC %% ELC
electronics = Electronics(); electronics = Electronics();
electronics.length = 422.5 * 1e-3; % [m] Total bay length electronics.length = 422.5 * 1e-3; % [m] Total bay length
electronics.mass = 3.5; % [kg] Total bay mass electronics.mass = 3.3271; % [kg] Total bay mass
electronics.inertia = 1e-9*[10041478; 49742634; 50292878]; % [kg*m^2] Total bay inertia (Body reference) electronics.inertia = 1e-9*[10041478; 49742634; 50292878]; % [kg*m^2] Total bay inertia (Body reference)
electronics.xCg = 221.11 * 1e-3; % [m] Cg relative to bay upper side electronics.xCg = 221.11 * 1e-3; % [m] Cg relative to bay upper side
...@@ -69,7 +69,7 @@ airbrakes.servoTau = 0.0374588; ...@@ -69,7 +69,7 @@ airbrakes.servoTau = 0.0374588;
%% MOTOR %% MOTOR
motor = Motor(); motor = Motor();
motor.name = 'HRE_ARM_OPT_2_Venturi'; motor.name = 'HRE_ARM_OPT_3_Update';
motor.cutoffTime = []; % [s] OVERRIDE Cutoff time motor.cutoffTime = []; % [s] OVERRIDE Cutoff time
motor.ignitionTransient = 0.3; % [s] Ignition transient motor.ignitionTransient = 0.3; % [s] Ignition transient
...@@ -78,11 +78,11 @@ motor.cutoffTransient = 0.3; % [s] Cut-o ...@@ -78,11 +78,11 @@ motor.cutoffTransient = 0.3; % [s] Cut-o
%% REAR - Includes Fincan + Boat %% REAR - Includes Fincan + Boat
rear = Rear(); rear = Rear();
rear.position = 1.2468; % [m] offset from rear.position = []; % [m] offset from
rear.length = 547 * 1e-3; % [m] Total bay length rear.length = 477 * 1e-3; % [m] Total bay length
rear.mass = 1.71; % [kg] Total bay mass rear.mass = 1736.32 *1e-3; % [kg] Total bay mass
rear.inertia = 1e-9*[13074201; 44271226; 44270124]; % [kg*m^2] Total bay inertia (Body reference) rear.inertia = 1e-9*[13662070; 47529495; 47528846]; % [kg*m^2] Total bay inertia (Body reference)
rear.xCg = 276.98 * 1e-3; % [m] Cg relative to bay upper side rear.xCg = 236.82 * 1e-3; % [m] Cg relative to bay upper side
rear.boatType = 'OGIVE'; % [-] Boat type rear.boatType = 'OGIVE'; % [-] Boat type
rear.boatLength = 0.240; % [m] Boat length rear.boatLength = 0.240; % [m] Boat length
......
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.