summaryrefslogtreecommitdiffstats
path: root/src/parameters.cpp
diff options
context:
space:
mode:
authorWe-unite <3205135446@qq.com>2024-03-07 21:50:22 +0800
committerWe-unite <3205135446@qq.com>2024-03-07 21:50:22 +0800
commit505d07a7abccfc707e2d27c2deb2fe460854e751 (patch)
treed1bd801021deaa99dd18b9027c39d11076d74a46 /src/parameters.cpp
parent9b3951efb56b3e1cf3b115c0a2fbfc3b90e28330 (diff)
downloadcalendar-505d07a7abccfc707e2d27c2deb2fe460854e751.tar.gz
calendar-505d07a7abccfc707e2d27c2deb2fe460854e751.zip
Confused about hourAngle
Diffstat (limited to 'src/parameters.cpp')
-rw-r--r--src/parameters.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/parameters.cpp b/src/parameters.cpp
index 2e2758a..f08736b 100644
--- a/src/parameters.cpp
+++ b/src/parameters.cpp
@@ -1,5 +1,5 @@
1#include "calendar.h"
2#include "parameters.h" 1#include "parameters.h"
2#include "calendar.h"
3#include <utility> 3#include <utility>
4using namespace std; 4using namespace std;
5 5
@@ -221,3 +221,14 @@ double parameter::moon_longitude(double t) {
221 L -= 360; 221 L -= 360;
222 return L; 222 return L;
223} 223}
224
225double parameter::getHourAngle(double julianKiloTime, double longitude,
226 double latitude, double alpha) {
227 double t = 100 * 365.25 * julianKiloTime;
228 // 该时刻的格林尼治恒星时
229 double GST = 6.697374558 + 2400.051336 * t + 0.000025862333 * t * t -
230 0.000000001722222 * t * t * t;
231 return GST * M_PI / 12 + longitude - alpha;
232 // double GST = 241.654320 + 360.9856473840 * t * 1000 * 36525;
233 // return GST * M_PI / 180 + longitude - alpha;
234} \ No newline at end of file