summaryrefslogtreecommitdiffstats
path: root/src/parameters.cpp
diff options
context:
space:
mode:
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