matlab-compute-aerospace-environment

Compute atmosphere, gravity, wind, magnetic field, and ephemeris properties using Aerospace Toolbox functions.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-compute-aerospace-environment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-compute-aerospace-environment
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/aerospace/matlab-compute-aerospace-environment
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-compute-aerospace-environment

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Aerospace engineers need accurate environment models (atmosphere, gravity, wind, magnetic field, ephemeris) for vehicle analysis and navigation, but Aerospace Toolbox functions have subtle calling conventions—PCPF coordinates versus geodetic, positional strings versus name-value pairs—that are easy to get wrong.

Core Features & Use Cases

  • Atmosphere Models: Compute ISA, COESA, NRLMSISE-00, non-standard MIL-STD, CIRA, and lapse-rate atmospheric properties including temperature, pressure, density, and speed of sound.
  • Gravity and Magnetic Field: Calculate spherical harmonic, WGS84, zonal, and centrifugal gravity plus WMM and IGRF magnetic field components for navigation corrections.
  • Ephemeris and Earth Orientation: Retrieve planet and Moon positions, polar motion, nutation, delta-UT1, and CIP adjustments from IERS data.
  • Use Case: Model atmospheric density at 400 km altitude for a satellite drag analysis by reading space weather data, extracting F10.7 and Ap indices, and feeding them into atmosnrlmsise00.

Quick Start

Ask your AI agent to compute the International Standard Atmosphere temperature, pressure, and density at 10,000 meters altitude in MATLAB.

Frequently Asked Questions about matlab-compute-aerospace-environment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute atmospheric density at altitude in MATLAB?

Use atmosisa for the International Standard Atmosphere or atmoscoesa for the 1976 COESA model, passing altitude in meters. For detailed upper-atmosphere density, use atmosnrlmsise00 with latitude, longitude, date, and solar flux inputs.

What is the difference between gravitywgs84 and gravitysphericalharmonic?

gravitywgs84 takes geodetic coordinates (height in meters, latitude in degrees) and computes WGS84 gravity. gravitysphericalharmonic takes planet-centered planet-fixed [x,y,z] coordinates in meters and supports multiple planetary models like EGM2008 and GMM2B.

How do I get magnetic field components from the WMM model in MATLAB?

Call wrldmagm with height in meters, latitude and longitude in degrees, and decimal year from decyear. It returns XYZ field components in nanotesla plus horizontal intensity, declination, inclination, and total intensity.

Why does gravitysphericalharmonic give wrong results with latitude and longitude?

The function expects planet-centered planet-fixed Cartesian coordinates in meters, not geodetic latitude, longitude, and altitude. Convert positions first: equator surface is [Re, 0, 0] and the pole is [0, 0, Rp].

Does atmosnonstd accept name-value pair arguments?

No, atmosnonstd uses positional string arguments, not name-value pairs. Call it as atmosnonstd(height, 'Profile', extremeParam, frequency, extremeAltitude) or use the Envelope form without the extreme altitude argument.

When should I not use this aerospace environment skill?

Avoid it for coordinate frame conversions, orbital trajectory propagation, and aerodynamic coefficient calculations, which are separate workflows. Simulink environment blocks require Aerospace Blockset rather than these MATLAB functions.