Closed shfxia closed 11 months ago
Those results look very close — try two things:
https://rhodesmill.org/skyfield/time.html#ut1-and-downloading-iers-data
@brandon-rhodes Thanks for your advice.
Finally, I found the few meters of difference
is caused by polar motion
. Because I didn't load polar motion data in skyfield. After I made the following changes,
with load.open("tests\\finals2000A.all") as f:
finals_data = iers.parse_x_y_dut1_from_finals_all(f)
ts = load.timescale()
iers.install_polar_motion_table(ts, finals_data)
the results difference is quite small.
astropy : [-5187390.74533245 3367000.53859377 2337202.2840885 ]
skyfield: [-5187390.74414268 3367000.5410562 2337202.28318177]
astropy - skyfield: [9.04944e-05 " 3.02421e-05 " 3.72529e-09 m]
By, the way without load polar motion data, the spherical difference is :
astropy - skyfield: [0.110905 " 0.242116 " 3.72529e-09 m]
Excellent, I'm glad you found the source of the difference you were seeing.
@brandon-rhodes
I found ITRF_to_GCRS2
in positionlib.py and ITRF_to_GCRS2_fast
in sgp4_parallel.py didn't apply polar motion too. While in ITRF_to_GCRS
in position.lib the polar motion is applied.
def rotation_at(t):
R = mxm(rot_z(-t.gast * tau / 24.0), t.M)
if t.ts.polar_motion_table is not None:
R = mxm(t.polar_motion_matrix(), R)
return R
Correct; several old deprecated routines indeed did not account for polar motion, which is why they are no longer used, and are not mentioned in Skyfield's documentation.
I compare the transform results from GCRS to ITRS between astropy and skyfield. There is a considerable difference in the results.
Results,
I'd like to know if I'm using the feature incorrectly, or if there are any other differences in details that need to be considered.