diff options
Diffstat (limited to 'src/calendar.h')
-rw-r--r-- | src/calendar.h | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/src/calendar.h b/src/calendar.h index 248026f..87ca413 100644 --- a/src/calendar.h +++ b/src/calendar.h | |||
@@ -10,43 +10,13 @@ | |||
10 | using namespace std; | 10 | using namespace std; |
11 | 11 | ||
12 | // 哈尔滨南岗地方经纬度 | 12 | // 哈尔滨南岗地方经纬度 |
13 | #define LONGITUDE 126.533 * M_PI / 180 | 13 | #define M_PI 3.14159265358979323846 |
14 | #define LATITUDE 45.800 * M_PI / 180 | 14 | #define LONGITUDE 126.66854 * M_PI / 180 |
15 | 15 | #define LATITUDE 45.75996 * M_PI / 180 | |
16 | extern double delta; | ||
17 | extern char jieqi[25][10]; | ||
18 | 16 | ||
19 | typedef struct tm Date; | 17 | typedef struct tm Date; |
20 | struct point { | ||
21 | int year, mon, day, hour, min, sec; | ||
22 | bool isShuo, isJieqi, isZhongqi; | ||
23 | int JieqiIndex, MonthIndex; | ||
24 | bool RunYue; | ||
25 | double time; | ||
26 | point *next; | ||
27 | |||
28 | point(int year, int mon, int day, int hour, int min, int sec, bool isShuo, | ||
29 | bool isJieqi, bool isZhongqi, int JieqiIndex, int MonthIndex, | ||
30 | bool RunYue, double time) { | ||
31 | this->year = year; | ||
32 | this->mon = mon; | ||
33 | this->day = day; | ||
34 | this->hour = hour; | ||
35 | this->min = min; | ||
36 | this->sec = sec; | ||
37 | this->isShuo = isShuo; | ||
38 | this->isJieqi = isJieqi; | ||
39 | this->isZhongqi = isZhongqi; | ||
40 | this->JieqiIndex = JieqiIndex; | ||
41 | this->MonthIndex = MonthIndex; | ||
42 | this->RunYue = RunYue; | ||
43 | this->time = time; | ||
44 | this->next = NULL; | ||
45 | } | ||
46 | }; | ||
47 | 18 | ||
48 | void radToDMS(const char *message, int lowerBound, int upperBound, | 19 | string radToDMS(int lowerBound, int upperBound, double radians); |
49 | double radians); | ||
50 | 20 | ||
51 | class Julian { | 21 | class Julian { |
52 | private: | 22 | private: |
@@ -96,8 +66,6 @@ class parameter { | |||
96 | public: | 66 | public: |
97 | pair<double, double> sun_longitude(double t); | 67 | pair<double, double> sun_longitude(double t); |
98 | 68 | ||
99 | double moon_longitude(double t); | ||
100 | |||
101 | double get_epsilon(double T); | 69 | double get_epsilon(double T); |
102 | 70 | ||
103 | // 计算时角,返回弧度制 | 71 | // 计算时角,返回弧度制 |
@@ -107,4 +75,6 @@ class parameter { | |||
107 | 75 | ||
108 | extern Julian julian; | 76 | extern Julian julian; |
109 | extern parameter p; | 77 | extern parameter p; |
78 | extern double epsilon; | ||
79 | |||
110 | #endif \ No newline at end of file | 80 | #endif \ No newline at end of file |