matlab-convert-aerospace-coordinates

Convert aerospace units, time systems, coordinate frames, and rotation representations using Aerospace Toolbox.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Aerospace engineers frequently need to convert between unit systems, time standards, coordinate frames (ECEF, ECI, LLA, NED, body, wind), and rotation representations (Euler angles, DCMs, quaternions, Rodrigues vectors), and mistakes in conventions like radians vs degrees or scalar-first quaternions cause subtle, costly errors.

Core Features & Use Cases

  • Unit and Time Conversions: Convert length, velocity, angle, acceleration, force, mass, pressure, temperature, and density with the convXXX function family, plus Julian dates, decimal years, and sidereal time.
  • Coordinate Frame Transformations: Transform positions between LLA, ECEF, ECI, flat Earth, and NED frames, and convert between ECI state vectors and Keplerian orbital elements.
  • Rotation Representations: Convert between Euler angles, DCMs, quaternions, and Rodrigues vectors, with guidance on gimbal lock, quaternion normalization, and SLERP interpolation.
  • Use Case: Given a satellite's ECI position and a ground station's LLA coordinates, compute azimuth, elevation, and slant range with eci2aer, then verify the result by round-tripping through eci2lla.

Quick Start

Ask your AI agent to convert a position from LLA coordinates [40, -74, 1000] to ECEF and then to ECI at a given UTC time using Aerospace Toolbox functions.

Frequently Asked Questions about matlab-convert-aerospace-coordinates

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

FAQPage Schema
How do I convert between ECEF and ECI coordinates in MATLAB?

Use ecef2eci and eci2ecef from Aerospace Toolbox, which transform position, velocity, and acceleration between the frames. Both require a UTC time input because ECI orientation depends on Earth's rotation at that instant.

How do I convert Euler angles to a quaternion in MATLAB?

Use angle2quat with angles in radians and an explicit rotation sequence like 'ZYX', or create a quaternion object with quaternion([yaw pitch roll], 'eulerd', 'ZYX', 'frame') for degree inputs. Aerospace Toolbox quaternions use scalar-first [w x y z] format.

Does angle2dcm accept degrees or radians?

angle2dcm expects radians, not degrees. Convert degree values first with deg2rad or convang(value, 'deg', 'rad'), and always specify the rotation sequence explicitly since the default is 'ZYX'.

What is the difference between geodetic and geocentric latitude?

Geodetic latitude is measured from the surface normal of the reference ellipsoid, while geocentric latitude is measured from Earth's center, differing by up to about 0.19 degrees. Convert between them with geod2geoc and geoc2geod, which expect radians.

When should I use quaternions instead of Euler angles?

Use quaternions for computation and interpolation because Euler angles suffer gimbal lock when the second rotation reaches plus or minus 90 degrees. Convert to Euler angles only for display, and normalize quaternions after accumulated arithmetic.

What are the limitations of Rodrigues rotation vectors?

Rodrigues vectors are singular at 180-degree rotations because they encode rotation as axis times tan(theta/2). They suit small-angle optimization with three parameters, but use quaternions for arbitrary rotations, interpolation, or long integrations.