Skip to main content
ClaudeWave
Skill996 repo starsupdated 9d ago

matlab-compute-aerospace-environment

>

Install in Claude Code
Copy
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-environment
Then start a new Claude Code session; the skill loads automatically.

SKILL.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
matlab-train-networkSkill

>

matlab-driving-data-importerSkill

Import recorded driving sensor data (GPS, camera, lidar, actor tracks, lanes) into scenariobuilder.* objects (GPSData, CameraData, LidarData, ActorTrackData, Trajectory, laneData) and run preprocessing — synchronize, offset correction, crop, normalizeTimestamps, convertTimestamps. Also: compute actor tracks from lidar when no annotations exist, attach camera/lidar mounting + intrinsics, export to MAT/workspace/timetable/script. Use for raw driving dataset files (KITTI, nuScenes, Waymo, Pandaset, ROS/ROS2 bags, .mat, .csv, .mp4) or driving/vehicle/sensor logs that need wrapping. drivingLogAnalyzer (DLA) is OPT-IN ONLY — invoke only on explicit user request ('DLA', 'open in DLA', 'inspect/explore/analyze the recording') or reported sensor problem (sync drift, timestamp mismatch, overlay misalignment). NEVER auto-launch DLA after wrapping (Rule 0). For 'build scenario / export to RoadRunner / drivingScenario / OpenSCENARIO / Unreal / simulate', hand off to matlab-scenario-builder.

matlab-scenario-builderSkill

Generate driving scenes, scenarios, road surfaces, and 3D content from already-wrapped scenariobuilder.* sensor data (GPS, camera, lidar, actor tracks) using Scenario Builder for Automated Driving Toolbox. Use to BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRIVE, OpenCRG, OpenSCENARIO, or Unreal Engine. Also: log-to-scenario, scenario harvesting, accident/near-miss reconstruction, SOTIF (ISO 21448) and ISO 26262 scenario coverage, USGS-aerial-lidar scene augmentation, traffic-sign placement from camera+lidar logs. NOT for raw-data import or multi-sensor sync/crop/offset/timestamp normalization — route those to matlab-driving-data-importer.

roadrunner-asset-mappingSkill

>

roadrunner-convert-lanelet2-to-rrhdSkill

>

roadrunner-import-sceneSkill

>

roadrunner-rrhd-authoringSkill

>

matlab-build-simbiology-modelSkill

Build, modify, and diagram SimBiology models — API reference, helper functions, and layout patterns. Use when constructing or editing models programmatically or visually.