화성에서 계절이 시작하고 끝나는시기를 결정하려고합니다. 이 점은 0º, 90º, 180º 및 270ºLS (태양 경도)에 있습니다.pyephem에서 태양 경도?
PyEphem은 Heliocentric 경도와 위도를 제공합니다.
http://www.planetary.org/explore/space-topics/mars/mars-calendar.html
화성에서 계절이 시작하고 끝나는시기를 결정하려고합니다. 이 점은 0º, 90º, 180º 및 270ºLS (태양 경도)에 있습니다.pyephem에서 태양 경도?
PyEphem은 Heliocentric 경도와 위도를 제공합니다.
http://www.planetary.org/explore/space-topics/mars/mars-calendar.html
내가 두 수량이 동일한 각도 있다고 생각하지만 다른 시작 지점에서 측정 : 어떻게이 태양 경도가 여기에 표시 상관 될 수 있습니다. 이 가정을 사용하면 PyEphem을 사용하여 2 ~ 3 일 내에 화성 계절을 예측할 수 있습니다.하지만 실제로 더 나은 결과를 기대할 수 있으며 합의가 더 이상 이루어지지 않은 이유는 확실하지 않습니다.
그러나 이것은 적어도 시작됩니다. 이 예측이 링크 된 사이트의 예상과 약간 다른 이유를 알면 알려 주시기 바랍니다. 어느 시점에서 NASA Horizons의 출력과 개선 된 PyEphem으로 구축하고있는 Skyfield 프로젝트를 비교해야합니다.
# The angle that we call "the longitude of the Sun, as
# seen from Mars" should grow at the same rate as the
# "longitude of Mars as seen from the Sun" (since the
# two are the same line but viewed in opposite
# directions).
#
# The only problem is knowing what point to name "zero",
# so we have to learn what .hlon was when the first
# Martian year started:
from ephem import Mars, Date, degrees, newton
m = Mars()
m.compute('1955/4/11 23:00')
Ls0 = m.hlon
def Ls(date):
m.compute(date)
return degrees(m.hlon - Ls0).norm
# There! Ls() should give Martian solar latitude.
# So the first round of seasons listed at the page
# http://www.planetary.org/explore/space-topics/mars/mars-calendar.html
# should give 90 degrees, 180 degrees, and 270 degrees:
for date in '1955/10/27', '1956/4/27', '1956/9/21':
print Ls(date)
# The output is close to what we would expect:
#
# 90:11:58.3
# 179:57:32.2
# 270:13:22.6
#
# Great! So what if we want to know, say, the date
# of the upcoming Spring Equinox or Summer Solstice?
# We need functions that are smooth, well-behaved,
# and cross zero at those two times, so that we can
# unleash Newton's Method upon them:
def spring_equinox(date):
return Ls(date).znorm
def summer_solstice(date):
return Ls(date) - degrees('90:00:00')
def find_spring_equinox(start_date):
start_date = Date(start_date)
y0 = Ls(start_date)
y1 = Ls(start_date + 1)
rate = y1 - y0
angle_to_go = degrees(0.0 - y0).norm
closer_date = start_date + angle_to_go/rate
d = newton(spring_equinox, closer_date, closer_date + 1)
return Date(d)
def find_summer_solstice(start_date):
start_date = Date(start_date)
y0 = Ls(start_date)
y1 = Ls(start_date + 1)
rate = y1 - y0
angle_to_go = degrees(degrees('90:00:00') - y0).norm
closer_date = start_date + angle_to_go/rate
d = newton(summer_solstice, closer_date, closer_date + 1)
return Date(d)
d = find_spring_equinox('2015/1/22')
print d, Ls(d)
d = find_summer_solstice('2015/1/22')
print d, Ls(d)
# Output:
# 2015/6/16 15:03:15 0:00:00.0
# 2015/12/31 21:12:07 90:00:00.0
: 어떤 경우에
는 LS를 계산하고 그것을 사용하는 몇 가지 코드는 화성의 계절를 찾을 수