summaryrefslogtreecommitdiffstats
path: root/src/calendar.h
diff options
context:
space:
mode:
authorWe-unite <3205135446@qq.com>2024-03-07 17:48:56 +0800
committerWe-unite <3205135446@qq.com>2024-03-07 17:48:56 +0800
commit9b3951efb56b3e1cf3b115c0a2fbfc3b90e28330 (patch)
tree118d5bfd8e707f4713b9970b265b37d351664cd0 /src/calendar.h
parent7e85ab6f9e7114ba05264005172e41fb1c47532c (diff)
downloadcalendar-9b3951efb56b3e1cf3b115c0a2fbfc3b90e28330.tar.gz
calendar-9b3951efb56b3e1cf3b115c0a2fbfc3b90e28330.zip
Input time, output sun longitude and latitude
Diffstat (limited to 'src/calendar.h')
-rw-r--r--src/calendar.h32
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>
10using namespace std; 10using namespace std;
11 11
12extern double pi;
13extern double delta; 12extern double delta;
14extern char jieqi[25][10]; 13extern 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
96class 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