ECEF to ECI conversion

How to perform the conversion of (r,v) vector from ECEF to ECI (J2000) coordinate frame?

What I tried

I multiplied the matrix ([cosA -sinA 0] [sinA cosA 0] [0 0 1]) by the state vector, where A is Greenwitch mean sidereal time.

This equation shows that the Z axis doesn't change. However, I have the ephemeris of a real satellite in both coordinate frames, and there Z axis differs! Where is the issue?

• If I understand correctly, your question is equivalent to: in the J2000 frame, is the line from the Earth's center to the Earth's North Pole coincident with the z axis. The answer, as @DavidHammen notes, is no, though it's pretty close since we're only 18 years out from 2000. If you just need it for a fixed time, you can cheat and use HORIZONS. If you want the formula for the North Pole's J2000 direction, that's a bit trickier. – barrycarter Mar 16 '18 at 16:37