Hi, Orekit users,

It seems that a frame conversion would be the most popular topic nowadays.

I also have a question about the conversion, especially, between ITRF and EME2000.

Here is what I’m usually using for converting position and velocity vectors from EME2000 to ITRF:

```
inertial_frame = FramesFactory.getEME2000()
earth_frame = FramesFactory.getITRF(IERSConventions.IERS_2010, False)
t_epoch = AbsoluteDate(int(t0[0]), int(t0[1]), int(t0[2]), int(t0[3]), int(t0[4]), float(t0[5]), TimeScalesFactory.getUTC())
position = Vector3D([2127263.8228368093, 5718032.172429709, 3480933.682526727])
velocity = Vector3D([-154.1568002046, -3894.204237608, 6449.7773756905])
pv = PVCoordinates(position, velocity)
pv_itrf = inertial_frame.getTransformTo(earth_frame, t_epoch).transformPVCoordinates(pv)
```

And what I’m doing now is if it is possible to use a ‘rotation matrix between ITRF and EME2000.’ Followings are what I’m trying for that.

```
inertial_frame = FramesFactory.getEME2000()
earth_frame = FramesFactory.getITRF(IERSConventions.IERS_2010, False)
t_epoch = AbsoluteDate(int(t0[0]), int(t0[1]), int(t0[2]), int(t0[3]), int(t0[4]), float(t0[5]), TimeScalesFactory.getUTC())
position = Vector3D([2127263.8228368093, 5718032.172429709, 3480933.682526727])
velocity = Vector3D([-154.1568002046, -3894.204237608, 6449.7773756905])
pv = PVCoordinates(position, velocity)
R_eme2000_to_itrf_JArray = eme2000.getTransformTo(earth_frame, t_epoch).getRotation().getMatrix()
R_eme2000_to_itrf_components = [orekit.pyhelpers.JArray('double').cast_(x) for x in R_eme2000_to_itrf_JArray]
R_eme2000_to_itrf = np.array([
[R_eme2000_to_itrf_components[0][0], R_eme2000_to_itrf_components[0][1], R_eme2000_to_itrf_components[0][2]],
[R_eme2000_to_itrf_components[1][0], R_eme2000_to_itrf_components[1][1], R_eme2000_to_itrf_components[1][2]],
[R_eme2000_to_itrf_components[2][0], R_eme2000_to_itrf_components[2][1], R_eme2000_to_itrf_components[2][2]]
])
rotated_pos_itrf = np.matmul(rot_matrix_eme2000_to_itrf, np.array([position.getX(), position.getY(), position.getZ()]))
rotated_vel_itrf = np.matmul(rot_matrix_eme2000_to_itrf, np.array([velocity.getX(), velocity.getY(), velocity.getZ()]))
```

I expected I could get the same position and velocity in ITRF frame, but it was not true for the velocity.

Here are differences in position and velocity components w.r.t. the first conversion.

```
dposition = rotated_pos_itrf-(position from 'pv_itrf')
dvelocity = rotated_vel_itrf-(velocity from 'pv_itrf')
('dposition: ', array([ 0.00000000e+00, 9.31322575e-10, -4.65661287e-10]))
('dvelocity: ', array([ 4.24467562e+02, -1.32768188e+02, -5.92213273e-04]))
```

As shown above, the rotation matrix seems to work for the position, but velocity.

Does anyone have ideas or suggestions or advice?

Hope I can find the way to use the matrix for the conversion.

Thank you in advance for your concern and help.

Have a great day.

Best,

:: inkwan