image thumbnail

XCFRAME – Coordinate Transformation

version (267 KB) by Patrik Forssén
Transforms position between a number of geo- and heliocentric coordinate frames


Updated 26 Jul 2017

View License

XCFRAME transforms position between a number of geo- and heliocentric coordinate frames used in space physics and aerospace applications. For ECEF <-> ECI transformations, velocity and acceleration is also supported. The position might be given, and returned, in Cartesian (x, y, z) or spherical (azimuth, elevation, distance) coordinates. For the ECEF frame, geodetic coordinates (latitude, longitude, altitude) is also supported (WGS72 or WGS84).
Currently the following 12 coordinate frames are supported: Geographic (ECEF, GRC, EFG), Geocentric Equatorial Inertial (ECI, TOD, GCI), Geocentric Equatorial Inertial for epoch J2000.0, Geomagnetic, Geocentric Solar Ecliptic, Geocentric Solar Magnetospheric, Solar Magnetic, Radial Tangential Normal, Geocentric Solar Equatorial, Heliocentric Earth Ecliptic, Heliocentric Aries Ecliptic and Heliocentric Earth Equatorial.

Detailed help is available in the program and examples are included. The implementation is based on the CXFORM C-code written by Ed Santiago (LANL) and Ryan Boller (NASA/GSFC). The coordinate transformations are based on Mike Hapgood's work in: Planet. Space Sci. Vol. 40, No. 5. pp. 71l-717, 1992.

Cite As

Patrik Forssén (2021). XCFRAME – Coordinate Transformation (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!