summaryrefslogtreecommitdiffstats
path: root/src/Julian.cpp
diff options
context:
space:
mode:
authorWe-unite <3205135446@qq.com>2024-03-08 22:53:11 +0800
committerWe-unite <3205135446@qq.com>2024-03-09 09:39:48 +0800
commitb1be91bc7562571bcb156d20ec3f9c8b69340722 (patch)
treeab72588350a890d06e33a79b730ddd0223bbb828 /src/Julian.cpp
parent6fd843db21af18be0634bac770c6b74ad4e78bb7 (diff)
downloadcalendar-b1be91bc7562571bcb156d20ec3f9c8b69340722.tar.gz
calendar-b1be91bc7562571bcb156d20ec3f9c8b69340722.zip
Calculate sunrise and sunset, showing time and azimuthdev
Add sun trace table, and put all data into file
Diffstat (limited to 'src/Julian.cpp')
-rw-r--r--src/Julian.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Julian.cpp b/src/Julian.cpp
index 5a0522b..ecfe391 100644
--- a/src/Julian.cpp
+++ b/src/Julian.cpp
@@ -86,6 +86,5 @@ double Julian::getJulianKiloYear(time_t time) {
86//儒略千年数转时间戳 86//儒略千年数转时间戳
87time_t Julian::kiloYearToTime(double t, int year) { 87time_t Julian::kiloYearToTime(double t, int year) {
88 double jd = t * 365250.0 + 2451545.0; 88 double jd = t * 365250.0 + 2451545.0;
89 time_t time = (time_t)((jd - 2440587.5) * 86400.0 - delta_t(year)); 89 return (time_t)((jd - 2440587.5) * 86400.0 - delta_t(year));
90 return time;
91} 90}