问题出现在没有考虑到时差和地球形状。可以使用以下代码解决问题:
from astropy import units as u
from astropy.coordinates import EarthLocation, ICRS, SkyCoord
from astropy.time import Time
# Define the J2000 coordinates
ra = 10 * u.deg
dec = 20 * u.deg
distance = 1 * u.pc
coord_j2000 = SkyCoord(ra, dec, distance, frame='icrs')
# Define the time and Earth location
time = Time('2010-01-01T00:00:00.000')
location = EarthLocation(lon=0 * u.deg, lat=50 * u.deg, height=0 * u.m)
# Transform the J2000 coordinates to the Earth Location frame
coord_earth = coord_j2000.transform_to(ICRS(obstime=time)).transform_to(location.get_gcrs(time)).transform_to(location.get_itrs())
# Print the transformed coordinates
print(coord_earth.ra, coord_earth.dec, coord_earth.distance)
这会输出地球坐标系下的正确坐标。