Я новичок в использовании skyfield
, есть ли какой-либо документ или файл справки, который может показать мне, как получить орбиту Солнца и Луны в эклиптических координатах для определенной даты и времени. Это дополнительный вопрос этого вопроса
Я не могу помочь вам со скайфилдом, но я обычно использую веб-интерфейс JPL Horizons. Установка не требуется, вы также можете распечатать его в текстовом файле, если хотите:
https://ssd.jpl.nasa.gov/horizons.cgi
В противном случае я нашел документацию для Skyfield: https://rhodesmill.org/skyfield/toc.html
И если ничего из этого не работает, я сделал для вас небольшой скрипт для астропсии.
from astropy import units as u
from astropy.coordinates import SkyCoord, EarthLocation, AltAz, get_body
from astropy.time import Time
import numpy as np
# Create 1000 Timepoints between Time 1 and Time 2 (one year later)
t = np.linspace(2451545, 2451545+365, 1000)
pointlist = []
#Loop through this times
for tn in t:
# For every timepoint, create an astropy_time object
astropy_time = Time(tn, format="jd")
# Get Planet (as string, "earth", "moon", "mercury" etc. in aequatorial coordinates
planet_aequatorial = get_body("moon", time = astropy_time)
#Transform to Barycentric True Ecliptic (relative to the center of mass of the solar system).
planet_ecliptic = planet_aequatorial.transform_to("barycentrictrueecliptic")
# Add a point to the orbit. Every point is described as (longitude [deg], latitude (ecliptic coords), distance (km))
pointlist.append([planet_ecliptic.lon.deg, planet_ecliptic.lat.deg, planet_ecliptic.distance.km])
print(planet_ecliptic.distance.km)
# So pointslist is a 2D array. The rows are all the 1000 points of the orbit
# In every point there is 3 columns for [Long, Lat, Distance]
print(pointlist)
# You can also save the result with
pointlist = np.array(pointlist)
np.save("results.npy", список точек)
номер пользователя
Расика
skyfield