Transform Commands¶
Convert between coordinate systems and reference frames.
Overview¶
The transform command group provides conversions between: - Reference frames: ECI (Earth-Centered Inertial) ↔ ECEF (Earth-Centered Earth-Fixed) - Coordinate systems: Keplerian, Cartesian, Geodetic, Geocentric - Attitude representations: Quaternions, Euler angles, rotation matrices (planned)
Commands¶
frame¶
Transform state vectors between ECI and ECEF reference frames.
Syntax:
Arguments: - FROM_FRAME - Source reference frame: ECI or ECEF - TO_FRAME - Target reference frame: ECI or ECEF - EPOCH - Epoch for the transformation (ISO-8601 format with timezone) - x y z vx vy vz - State vector [m, m, m, m/s, m/s, m/s]
Options: - --format <fmt> - Output format string (default: f)
Examples:
Convert ECI state to ECEF at a specific epoch:
Convert ECEF back to ECI:
Low-precision output:
coordinates¶
Convert between coordinate system representations.
Syntax:
Arguments: - FROM_SYSTEM - Source coordinate system (see below) - TO_SYSTEM - Target coordinate system (see below) - EPOCH - Epoch (ISO-8601 format). Use "" if not needed for the conversion - x1 x2 x3 x4 x5 x6 - Coordinate values (interpretation depends on system)
Coordinate Systems: - keplerian - Keplerian orbital elements [a, e, i, Ω, ω, ν] - cartesian - Cartesian state [x, y, z, vx, vy, vz] - geodetic - Geodetic coordinates [lon, lat, alt, 0, 0, 0] - geocentric - Geocentric spherical [lat, lon, radius, 0, 0, 0]
Options: - --from-frame [ECI|ECEF] - Reference frame for cartesian input (default: ECI) - --to-frame [ECI|ECEF] - Reference frame for cartesian output (default: ECI) - --as-degrees / --no-as-degrees - Interpret/output angles in degrees (default: --as-degrees) - --format <fmt> - Output format string (default: f)
Examples:
Keplerian to Cartesian (ECI)¶
Convert orbital elements to ECI state (no epoch required):
With different true anomaly (45°):
Cartesian to Keplerian¶
Convert ECI state back to orbital elements:
Geodetic to Cartesian (ECEF)¶
Convert geodetic coordinates (New York City) to ECEF:
Note: Order is [lon, lat, alt]. Longitude 286° = -74° (use positive east longitude, or handle negative with --)
ECEF Cartesian to Geodetic¶
Keplerian to Geodetic (via ECEF)¶
Convert satellite orbital elements to ground track position at epoch:
Cartesian ECI to ECEF (frame change)¶
Alternative: Use brahe transform frame for dedicated ECI↔ECEF transformations.
Coordinate System Details¶
Keplerian Elements¶
Format: [a, e, i, Ω, ω, M]
a- Semi-major axis (meters)e- Eccentricity (dimensionless, 0 ≤ e < 1)i- Inclination (degrees or radians)Ω- Right Ascension of Ascending Node / RAAN (degrees or radians)ω- Argument of periapsis (degrees or radians)M- Mean anomaly (degrees or radians)
Standard orbits: - LEO (500km): a = R_EARTH + 500e3 = 6878137 m - GEO (35786km): a = R_EARTH + 35786e3 = 42164137 m - SSO inclination: ~97.8° (for 500km altitude)
Example:
Cartesian (ECI/ECEF)¶
Format: [x, y, z, vx, vy, vz]
x, y, z- Position (meters)vx, vy, vz- Velocity (meters/second)
ECI (Earth-Centered Inertial): - Inertial reference frame - Z-axis aligned with Earth's rotation axis - X-axis points to vernal equinox
ECEF (Earth-Centered Earth-Fixed): - Rotating with Earth - Z-axis aligned with Earth's rotation axis - X-axis through 0° latitude, 0° longitude
Example:
Geodetic Coordinates¶
Format: [lon, lat, alt, 0, 0, 0]
lon- Longitude (degrees or radians, positive east)lat- Geodetic latitude (degrees or radians)alt- Altitude above WGS84 ellipsoid (meters)- Last 3 values unused (set to 0)
Geodetic vs Geocentric: - Geodetic: Perpendicular to WGS84 ellipsoid - Geocentric: Angle from Earth's center
Geocentric Coordinates¶
Format: [lat, lon, radius, 0, 0, 0]
lat- Geocentric latitude (degrees or radians)lon- Longitude (degrees or radians, positive east)radius- Distance from Earth center (meters)- Last 3 values unused (set to 0)
See Also¶
- Coordinate Systems - Conceptual overview
- Reference Frames - ECI/ECEF details
- Coordinates API - Python API
- Frames API - Frame conversion functions
- Orbits API - Orbital elements
- Time CLI - Time conversions
- Orbits CLI - Orbital mechanics calculations