diff options
author | 2024-03-07 17:48:56 +0800 | |
---|---|---|
committer | 2024-03-07 17:48:56 +0800 | |
commit | 9b3951efb56b3e1cf3b115c0a2fbfc3b90e28330 (patch) | |
tree | 118d5bfd8e707f4713b9970b265b37d351664cd0 /src/calendar.h | |
parent | 7e85ab6f9e7114ba05264005172e41fb1c47532c (diff) | |
download | calendar-9b3951efb56b3e1cf3b115c0a2fbfc3b90e28330.tar.gz calendar-9b3951efb56b3e1cf3b115c0a2fbfc3b90e28330.zip |
Input time, output sun longitude and latitude
Diffstat (limited to 'src/calendar.h')
-rw-r--r-- | src/calendar.h | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/calendar.h b/src/calendar.h index 73676f5..ef785c0 100644 --- a/src/calendar.h +++ b/src/calendar.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <vector> | 9 | #include <vector> |
10 | using namespace std; | 10 | using namespace std; |
11 | 11 | ||
12 | extern double pi; | ||
13 | extern double delta; | 12 | extern double delta; |
14 | extern char jieqi[25][10]; | 13 | extern char jieqi[25][10]; |
15 | 14 | ||
@@ -67,7 +66,7 @@ class parameter { | |||
67 | // 计算地球日心黄经 | 66 | // 计算地球日心黄经 |
68 | double get_longitude(vector<double> l, double t); | 67 | double get_longitude(vector<double> l, double t); |
69 | 68 | ||
70 | // 计算地球日心黄纬 | 69 | // 计算阳心黄纬 |
71 | double get_latitude(vector<double> b, double t); | 70 | double get_latitude(vector<double> b, double t); |
72 | 71 | ||
73 | double get_R(vector<double> r, double t); | 72 | double get_R(vector<double> r, double t); |
@@ -88,36 +87,9 @@ class parameter { | |||
88 | vector<vector<double>> get_parameters(double t); | 87 | vector<vector<double>> get_parameters(double t); |
89 | 88 | ||
90 | public: | 89 | public: |
91 | double sun_longitude(double t); | 90 | pair<double, double> sun_longitude(double t); |
92 | 91 | ||
93 | double moon_longitude(double t); | 92 | double moon_longitude(double t); |
94 | }; | 93 | }; |
95 | 94 | ||
96 | class List { | ||
97 | private: | ||
98 | point *head, *tail; //链表头尾指针 | ||
99 | |||
100 | bool later(point *a, point *b); | ||
101 | |||
102 | public: | ||
103 | vector<point *> shuori_vec; //记录各朔日的地址 | ||
104 | vector<point *> zhongqi_vec; //记录各中气的地址 | ||
105 | |||
106 | List(); | ||
107 | ~List(); | ||
108 | |||
109 | // 链表尾部插入 | ||
110 | void append(Date *date, bool isShuo, bool isJieqi, bool isZhongqi, | ||
111 | int JieqiIndex, double time); | ||
112 | |||
113 | //对链表进行“排序” | ||
114 | void lunar_sort(); | ||
115 | |||
116 | //置闰月 | ||
117 | void Run(); | ||
118 | |||
119 | //输出链表内容 | ||
120 | void output(); | ||
121 | }; | ||
122 | |||
123 | #endif | 95 | #endif |