提交 8206429f 编写于 作者: 三月三net's avatar 三月三net

Python超人-宇宙模拟器

上级 8449bb65
...@@ -88,6 +88,7 @@ class SunEarthMoonSim(UniverseSimScenes): ...@@ -88,6 +88,7 @@ class SunEarthMoonSim(UniverseSimScenes):
dt = time_data.get_datetime(self.start_time) dt = time_data.get_datetime(self.start_time)
# if dt.year == self.current_year + 1: # if dt.year == self.current_year + 1:
# TODO: 调试用
if dt.month < 12: if dt.month < 12:
UrsinaConfig.run_speed_factor = 200 * 24 UrsinaConfig.run_speed_factor = 200 * 24
elif UrsinaConfig.run_speed_factor > 20 * 24: elif UrsinaConfig.run_speed_factor > 20 * 24:
...@@ -195,6 +196,9 @@ class SunEarthMoonSim(UniverseSimScenes): ...@@ -195,6 +196,9 @@ class SunEarthMoonSim(UniverseSimScenes):
time_data = TimeData(seconds, "seconds", seconds) time_data = TimeData(seconds, "seconds", seconds)
dt = time_data.get_datetime(self.start_time) dt = time_data.get_datetime(self.start_time)
# 月球围绕地球转一圈的时间,即月球真正的公转周期是一个恒星月,时间是27.5天 。
# 而我们一般用从地球上看,月球完成一次朔望更替为一个月,叫一个朔望月,时间是29.5天。
aspect_ratio = window.aspect_ratio aspect_ratio = window.aspect_ratio
position, origin = (0.5 * aspect_ratio - 0.15, -0.45), (-0.05, 0.1), position, origin = (0.5 * aspect_ratio - 0.15, -0.45), (-0.05, 0.1),
...@@ -208,7 +212,8 @@ class SunEarthMoonSim(UniverseSimScenes): ...@@ -208,7 +212,8 @@ class SunEarthMoonSim(UniverseSimScenes):
# close_time=-1) # close_time=-1)
self.text_panel.text = "\n日期时间:\n" + dt.strftime('%Y-%m-%d %H:%M') + "\n\n" + \ self.text_panel.text = "\n日期时间:\n" + dt.strftime('%Y-%m-%d %H:%M') + "\n\n" + \
"天数:" + str(round(total_days, 3)) "天数:" + str(round(total_days, 2)) + "\n\n" + \
"月数:" + str(round(total_days/29.5, 2))
# "运行速度:" + str(UrsinaConfig.run_speed_factor) + "\n" + \ # "运行速度:" + str(UrsinaConfig.run_speed_factor) + "\n" + \
# "天数:" + str(round(total_days, 3)) # "天数:" + str(round(total_days, 3))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册