matlab-compute-aerospace-environment
>
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-compute-aerospace-environment && cp -r /tmp/matlab-compute-aerospace-environment/skills-catalog/aerospace/matlab-compute-aerospace-environment ~/.claude/skills/matlab-compute-aerospace-environmentSKILL.md
# Compute Aerospace Environment
Calculate environment properties for aerospace vehicle analysis: atmosphere, gravity, wind, magnetic field, geoid, space weather, planetary ephemeris, and Earth orientation using Aerospace Toolbox functions.
## When to Use
- Computing atmospheric properties (temperature, pressure, density, speed of sound)
- Calculating gravity vectors or acceleration for any planet
- Modeling horizontal wind at altitude
- Getting magnetic field components for navigation or compass correction
- Computing geoid height or geocentric radius
- Reading space weather data for NRLMSISE-00 inputs
- Computing planet or Moon positions (ephemeris)
- Getting Earth orientation parameters (polar motion, nutation, UT1-UTC, CIP)
- Any prompt mentioning: atmosphere model, ISA, COESA, NRLMSISE, pressure, temperature, density, speed of sound, gravity model, WGS84, wind model, HWM, magnetic model, WMM, IGRF, geoid, space weather, solar flux, F10.7, Ap index, planet ephemeris, Moon position, Earth nutation, polar motion, UT1, IERS
## When NOT to Use
- Coordinate frame conversions or rotations — use `matlab-convert-aerospace-coordinates`
- Orbital mechanics or trajectory propagation (use ephemeris for positions, not orbit propagation)
- Aerodynamic coefficient calculations
- Simulink environment model blocks — use Aerospace Blockset
## Workflow
1. **Identify the quantity needed** — use the decision table below
2. **Call the function** — follow the patterns in this skill for correct syntax
3. **Verify results** — check units and magnitude are physically reasonable
## Decision Table
| Need | Function | Key Input |
|------|----------|-----------|
| Standard atmosphere (quick) | `atmosisa` | altitude (m) |
| 1976 COESA atmosphere | `atmoscoesa` | altitude (m) |
| NRLMSISE-00 (detailed upper atmosphere) | `atmosnrlmsise00` | alt, lat, lon, year, day, UTsec |
| Non-standard atmosphere (MIL-STD) | `atmosnonstd` | alt + positional string args |
| CIRA 1986 reference atmosphere | `atmoscira` | lat, ctype, coord, month |
| Lapse rate atmosphere (custom) | `atmoslapse` | altitude (m) + 9 physical params |
| Pressure altitude | `atmospalt` | pressure (Pa) |
| Horizontal wind (HWM07/14) | `atmoshwm` | lat, lon, alt + name-value |
| Spherical harmonic gravity (any planet) | `gravitysphericalharmonic` | PCPF [x,y,z] (m) |
| WGS84 gravity (Earth, geodetic) | `gravitywgs84` | h, lat (+ lon, method, flags) |
| Zonal harmonic gravity (any planet) | `gravityzonal` | PCPF [x,y,z] (m) |
| Centrifugal acceleration | `gravitycentrifugal` | PCPF [x,y,z] (m) |
| WMM magnetic field | `wrldmagm` | height(m), lat, lon, decimalYear |
| IGRF magnetic field | `igrfmagm` | height(m), lat, lon, decimalYear, generation |
| Geoid height (undulation) | `geoidheight` | lat, lon |
| Geocentric radius | `geocradius` | geocentric lat (deg) |
| Read space weather CSV | `aeroReadSpaceWeatherData` | CSV file path |
| Extract solar flux / Ap indices | `fluxSolarAndGeomagnetic` | datetime or [year,day,UTCsec], MAT file |
| Planet/Moon position and velocity | `planetEphemeris` | Julian date, center, target |
| Earth nutation angles | `earthNutation` | Julian date |
| Moon libration angles | `moonLibration` | Julian date |
| Earth polar motion | `polarMotion` | UTC (Julian date) |
| Celestial Intermediate Pole adjustment | `deltaCIP` | UTC (Julian date) |
| Difference between UT1 and UTC | `deltaUT1` | UTC (Julian date) |
| Read IERS Earth orientation data | `aeroReadIERSData` | folder path |
## Patterns
### Standard and COESA Atmosphere
```matlab
% International Standard Atmosphere
[T, a, P, rho] = atmosisa(1000);
% 1976 COESA (valid 0-1000 km)
[T, a, P, rho] = atmoscoesa(1000);
```
### Pressure Altitude (atmospalt)
Converts pressure (Pa) to altitude (m) using the International Standard Atmosphere.
```matlab
% Pressure altitude at standard sea-level pressure
alt = atmospalt(101325); % returns 0 m
% Pressure altitude at multiple pressures
alt = atmospalt([101325, 79501, 54048, 26500]);
% Typical use: convert measured pressure to altitude
measuredPressure_Pa = 75000;
pressureAltitude_m = atmospalt(measuredPressure_Pa);
```
Input: pressure in **Pascals**. Output: geometric altitude in **meters** based on 1976 COESA.
### Non-Standard Atmosphere (atmosnonstd)
Uses **positional string arguments** — not name-value pairs.
**Profile type** (single altitude extreme):
```matlab
[T, a, P, rho] = atmosnonstd(height, 'Profile', extremeParam, frequency, extremeAltitude)
```
**Envelope type** (altitude range extreme — NO extremeAltitude argument):
```matlab
[T, a, P, rho] = atmosnonstd(height, 'Envelope', extremeParam, frequency)
```
Optional trailing args: `action` ('Warning'|'Error'|'None'), `specification` ('310'|'210c').
```matlab
% Profile: high density, 1% of time, at 5 km altitude (extremeAltitude is NUMERIC)
[T, a, P, rho] = atmosnonstd(5000, 'Profile', 'High density', '1%', 5);
% Envelope: high pressure, 20% of time, MIL-STD-210C
[T, a, P, rho] = atmosnonstd([1000; 11000; 20000], 'Envelope', ...
'High pressure', '20%', 'None', '210c');
```
Valid `extremeParam`: 'High temperature', 'Low temperature', 'High density', 'Low density', 'High pressure', 'Low pressure'
Valid `frequency`: 'Extreme values', '1%', '5%', '10%', '20%'
Valid `extremeAltitude` (Profile only, **numeric**): 5, 10, 20, 30, 40
### CIRA 1986 Model
```matlab
% By geopotential height, monthly mean, October
[T, P, zonalWind] = atmoscira(45, 'GPHeight', 20000, 'Monthly', 10);
% By pressure level
[T, alt, zonalWind] = atmoscira(45, 'Pressure', 101300, 'Monthly', 1);
```
Arguments: `(latitude, ctype, coord, mtype, month)` where `ctype` is 'Pressure' or 'GPHeight'.
### NRLMSISE-00
```matlab
% Basic call (uses default flux values)
[T, rho] = atmosnrlmsise00(altitude, latitude, longitude, year, dayOfYear, UTseconds);
% With flux data and no anomalous oxygen
[T, rho] = atmosnrlmsise00(altitude, lat, lon, year, dayOfYear, UTsec, ...
f107Average, f10>
Analyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.
Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.
Analyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.
S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).
Analyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.
PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).
Calculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.