This program allows to evaluate the rocket static stability at launchpad exit in various atmospheric conditions.
In particular the stability margin is computed using different models:
## What Does This Tool Do?
* Classical longitudinal: `XCPlon`
* Classical lateral: `XCPlat`
* Longitudinal in the alpha total plane: `XCPlonATOT`
* Directional in the alpha total plan: `XCPlatATOT`
* With total normal moment and total normal force: `XCPtotSTD`
* With total normal moment and normal force perpendicular to the moment: `XCPtotMOD`
* With Open Rocket: `XCPor`
Different quality indices are also computed:
* Angle between aerodynamic force and aerodynamic moment
* Angle between normal aerodynamic force and normal aerodynamic moment
* Angle between normal aerodynamic force and normal wind velocity
* Error index T
* Magnitude of normal force parallel to the normal moment
This tool is designed to analyze the stability of a rocket during launch, specifically at launchpad exit. It evaluates the rocket's stability margin under various wind conditions (magnitude and azimuth) to ensure safe launch.
# Usage
---
The analysis type and its features can be set in the script `configSensitivity.m`.
It is possibile to set a range of wind magnidute values and a range of wind azimuth values through the variables `vars.windMag` and `vars.windAz` while the launchpad setup is considered fixed. It is possible to select which quanitites to plot through the set of variables in the section `PLOT SETTINGS`.
The program computes the stability according to the different models, the aerodiynamic coefficients and the quality index in each point of the mesh defined in terms of magnitude and azimuth of the external wind.
It is possible to save the launchpad exit velocity for further analysis enabling the flag `vars.saveRes`.
## How to use it
# Output
If the mesh contains a single value of wind magnitude (or azimuth) the output consists in 2D plots of the stability, quality indices and coefficients along the different value selected, also a data printing in the command window will be present. If instead a full 2D mesh is submitted, the data printing and coefficients plot will be suppressed while stability results and quality indices are shown in 3D plots.
In any case, all data are saved in the struct `data_stability`.
1.**Configure the Settings:** The script `stabilityAnalysisConfig.m` is where you tell the tool what to analyze. You can set things like:
***Wind Scenarios:** Choose the wind speeds and directions you want to test.
***Output Preferences:** Decide if you want charts, text summaries, or to save the detailed results.
2.**Run Script** Run the script `mainStabilityAnalysis`. This starts the whole stability analysis process.
3.**Check Out the Results:** Once it's done running, you'll get:
***Charts:** The tool makes graphs (using `stabilityPlots.m`) that show you the stability margin, cool "quality scores," and aerodynamic stuff.
***Text Summary:** The function `stabilityPrints.m` prints the cases used to evaluate the stability margins.
***Save Data (Optional):** If you set it up in the settings, you can load a file called `stabilityRes.mat` to get all the raw data for even more detailed analysis later.
---
## Key Files
***`mainStabilityAnalysis.m`:** It's the script you run to start everything. It:
* Gets all the settings and data ready (rocket info, wind).
* Does a quick simulation of the launch to see the rocket dynamics as it leaves the pad.
* Run `computeStability.m` a function that computes the launchpad stability data.
* Makes the charts, prints the text, and saves the results based on your settings.
***`stabilityAnalysisConfig.m`:** It's where you set up everything for the stability analysis. Key things to set here are:
***Wind:** Tell it what wind directions (`stability.windAz`) and speeds (`stability.windMag`) to test.
***Output Choices:** Pick if you want charts (`stability.plots`), text summaries (`stability.prints`), and if you want to save the data (`stability.saveRes`).
***Chart Options:** Customize which charts to make (like `stability.plotXCPlonATOT`, `stability.plotQINDEX`, `stability.plotCoeffs`).