# Converting J2000 to ECEF?

Say I get the orbital elements for the ISS from JPL Horizons.

Say that data is expressed in J2000, an inertial frame. I want to express it in ECEF.

This is a simple rotation transform. All I need is the rotation matrix that would transform J2000 into ECEF.

But I'm not aware of such rotation matrices being published anywhere. No problem. I can build the matrix myself so long as I know the X, Y, Z rotations needed to transform J2000 into ECEF.

If the z axes of J2000 and ECEF are aligned (e.g., if they both coincide with the earth's polar axis), then all I need is the Z rotation from J2000 to ECEF at one moment in time.

I can then integrate earth's rotation to get the Z rotation at any other moment in time. The X and Y angles would be zero if the Z axes are both aligned with the earth's polar axis, so I would know all the elementary rotations needed to build my J2000-ECEF rotation matrix.

The question then is: Where do I find the orientation of ECEF relative to J2000 at any one moment in time? This must be known. And can someone confirm (or dispute) that the z axis of J2000 is aligned with the z axis of ECEF? Because it's a big assumption and I'm really not sure.

Huge thanks if you can help!

• Mar 27, 2021 at 19:46
• The link by @OrganicMarble shows the "Theta GMST" which is the angle you want for this educational frame/ For a better precision, use the "IAU Earth" frame definition from Archinal et al. 2018 or, better yet, the high precision Earth rotation parameters published by the IERS and JPL Mar 27, 2021 at 21:42
• @ChrisR JPL uses a medium precision approximation. JPL barely needs arcminute-level accuracy. Radio astronomers need milliarcsecond-level accuracy. Personally, I prefer to use SOFA over CSPICE primarily because the CSPICE interface is atrocious FORTRAN IV code (or FORTRAN IV code converted to pre-standard C via the long since unsupported f2c program). Mar 28, 2021 at 0:16
• @ChrisR Also note that the International Earth Rotation Reference Systems Service (IERS) and the International Astronomical Union (IAU) have both deprecated the concept of Greenwich Mean Sidereal Time (GMST). The modern concept is the Earth Rotation Angle (ERA). Mar 28, 2021 at 0:26
• Minor point, @user39728 regarding "And can someone confirm (or dispute) that the z axis of J2000 is aligned with the z axis of ECEF?" No, it is not. They were more or less aligned on 1 January 2020. But since it is now 2021, that is no longer a good assumption thanks to the Earth's precession and nutation. Mar 28, 2021 at 0:28

You can get the rotation matrices from J2000 to ECEF using SPICE, specifically SPICE's pxform function. Someone else asked about this same topic in another question here (Is it posible to convert JPL Horizons Vectors to ECEF?) where I showed which SPICE kernels to use in order to calculate ECEF vectors at given times.

JPL has different kernels for different levels of accuracy depending on your application, and some of the binary kernels they provide are accurate to within < 1 microradian if you're looking for that type of accuracy.

pck00010.tpc has good explanations of how they model Earth's orientation, using precession, nutation, polar motion, and true sidereal time. They use euler angles to represent the rotation between the J2000 and ECEF frames. Overall that file is a good read if you're looking for more details on how they do it. It can be found here: https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/pck00010.tpc

• Nice! I did not know! Thanks for sharing!
– user39728
Mar 28, 2021 at 3:46
• What's a kernel :/
– user39728
Mar 28, 2021 at 3:47
• Thats the name they have for the SPICE data files, where the data can be for ephemeris, reference frames, time, spacecraft orientation, etc. They have lots of great documentation on the whole SPICE system here: naif.jpl.nasa.gov/pub/naif/toolkit_docs/Tutorials/pdf/… Mar 28, 2021 at 3:50