index1.html 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <link type="text/css" rel="stylesheet" href="../pcdl/css/font.css" />
  7. <link type="text/css" rel="stylesheet" href="../pcdl/css/basic_style.css" />
  8. <link type="text/css" rel="stylesheet" href="../pcdl/css/style.css" />
  9. <link type="text/css" rel="stylesheet" href="../pcdl/css/color_day.css" id="colorchange" />
  10. <link
  11. type="text/css"
  12. rel="stylesheet"
  13. href="../pcdl/css/style_mobile.css"
  14. media="screen and (max-width:800px)"
  15. />
  16. <script src="../public/js/jquery.js"></script>
  17. <script src="../public/js/comm.js"></script>
  18. <script src="jquery-3.3.1.min.js"></script>
  19. <script src="julian.js"></script>
  20. <script src="lune.js"></script>
  21. <script src="suncalc.js"></script>
  22. <script src="./planet_position/js/planet-positions.js"></script>
  23. <script src="../studio/js/fixedsticky.js"></script>
  24. <script src="../guide/guide.js"></script>
  25. <link type="text/css" rel="stylesheet" href="../guide/guide.css" />
  26. <script src="../public/js/marked.js"></script>
  27. <!--获取语言-->
  28. <script>
  29. var g_language = "en";
  30. var g_currLink = "";
  31. function lang_init(strPage) {
  32. g_currLink = strPage;
  33. }
  34. function setLang(strLang) {
  35. g_language = strLang;
  36. setCookie("language", g_language, 365);
  37. window.location.assign(location.pathname + "?language=" + g_language);
  38. }
  39. </script>
  40. <script>
  41. var localString = new Array();
  42. localString["zh-cn"] = {
  43. and_another: "又 ",
  44. atitude: "纬度",
  45. BE: "佛历",
  46. bhumma: "周二",
  47. budha: "周三",
  48. canda: "周一",
  49. confirm: "确认",
  50. date: "日期",
  51. day: "日",
  52. days: "天 ",
  53. departure_in_detail: "起飞详情",
  54. dhamma_time: "会延续五千年的教法 ",
  55. eat: "进餐",
  56. gama_entry: "入村",
  57. guru: "周四",
  58. hori_ref_time: "蒙气差修正 ",
  59. kala: "适当的时间",
  60. language_select: "选择语言",
  61. left: "还剩下",
  62. loading: "载入中……",
  63. longitude: "经度",
  64. māsa: "月",
  65. mins: "分钟",
  66. month: "月 ",
  67. month_1: "月 ",
  68. months: "个月 ",
  69. my_loc: "我的位置",
  70. need_inform: "未告知其他比库",
  71. no_string: "不能",
  72. noon_time: "正午",
  73. noon_time: "正午",
  74. note: "注释",
  75. now_time: "现在",
  76. pacchā_māsa: "下个月",
  77. pakkha: "月相变化 ",
  78. past: "已过去",
  79. pubba_māsa: "上个月",
  80. ravi: "周日",
  81. saṃvacchara: "年",
  82. season: "季节 ",
  83. sec: "秒",
  84. sora: "周六",
  85. sukka: "周五",
  86. sun_height_degree: "正午太阳高度 ",
  87. time: "时间",
  88. twilight_time: "曙光",
  89. twilight_time: "曙光",
  90. vikala: "不适当的时间",
  91. week_day: "星期",
  92. year_0: "年",
  93. year_1: "年 ",
  94. years: "年 ",
  95. yes_string: "可以",
  96. };
  97. localString["zh-tw"] = {
  98. and_another: "又 ",
  99. atitude: "緯度",
  100. BE: "佛曆",
  101. bhumma: "週二",
  102. budha: "週三",
  103. canda: "週一",
  104. confirm: "確認",
  105. date: "日期",
  106. day: "日",
  107. days: "天 ",
  108. departure_in_detail: "起飛詳情",
  109. dhamma_time: "會延續五千年的教法 ",
  110. eat: "進餐",
  111. gama_entry: "入村",
  112. guru: "週四",
  113. hori_ref_time: "蒙氣差修正 ",
  114. kala: "適當的時間",
  115. language_select: "選擇語言",
  116. left: "還剩下",
  117. loading: "載入中……",
  118. longitude: "經度",
  119. māsa: "月",
  120. mins: "分鐘",
  121. month: "月 ",
  122. month_1: "月 ",
  123. months: "個月 ",
  124. my_loc: "我的位置",
  125. need_inform: "未告知其他比庫",
  126. no_string: "不能",
  127. noon_time: "正午",
  128. noon_time: "正午",
  129. note: "註釋",
  130. now_time: "現在",
  131. pacchā_māsa: "下個月",
  132. pakkha: "月相變化 ",
  133. past: "已過去",
  134. pubba_māsa: "上個月",
  135. ravi: "週日",
  136. saṃvacchara: "年",
  137. season: "季節 ",
  138. sec: "秒",
  139. sora: "週六",
  140. sukka: "週五",
  141. sun_height_degree: "正午太陽高度 ",
  142. time: "時間",
  143. twilight_time: "曙光",
  144. twilight_time: "曙光",
  145. vikala: "不適當的時間",
  146. week_day: "星期",
  147. year_0: "年",
  148. year_1: "年 ",
  149. years: "年 ",
  150. yes_string: "可以",
  151. };
  152. localString["default"] = {
  153. and_another: " and ",
  154. atitude: "Atitude",
  155. BE: "Buddhist Era ",
  156. bhumma: "Bhumma",
  157. budha: "Budha",
  158. canda: "Canda",
  159. confirm: "Confirm",
  160. date: "Date ",
  161. day: " day(s) ",
  162. days: " day(s) ",
  163. departure_in_detail: "departure in detail",
  164. dhamma_time: "5000 Years of the Buddha’s Dispensation ",
  165. eat: "eat",
  166. gama_entry: "entry the village",
  167. guru: "Guru",
  168. hori_ref_time: "horizontal refraction correct ",
  169. kala: "suitable time",
  170. language_select: "bhāsā",
  171. left: "Remains ",
  172. loading: "loading…",
  173. longitude: "Longitude",
  174. māsa: "māsa",
  175. mins: "(min)",
  176. month: "Month ",
  177. month_1: "- ",
  178. months: " month(s) ",
  179. my_loc: "attasmiṃ",
  180. need_inform: "without informing other Bhikkhu ",
  181. no_string: "cannot ",
  182. noon_time: "NOON",
  183. noon_time: "NOON",
  184. note: "Note",
  185. now_time: "NOW",
  186. pacchā_māsa: "pacchā-māsa",
  187. pakkha: "Lunar Phases ",
  188. past: "Passed ",
  189. pubba_māsa: "pubba-māsa",
  190. ravi: "Ravi",
  191. saṃvacchara: "saṃvacchara",
  192. season: "Season ",
  193. sec: "sec ",
  194. sora: "Sora",
  195. sukka: "Sukka",
  196. sun_height_degree: "Max solar altitude ",
  197. time: "Time",
  198. twilight_time: "dawn",
  199. twilight_time: "dawn",
  200. vikala: "unsuitable time",
  201. week_day: "Day",
  202. year_0: "saṃvacchara",
  203. year_1: "- ",
  204. years: " year(s) ",
  205. yes_string: "can ",
  206. };
  207. localString["en"] = {
  208. and_another: " and ",
  209. atitude: "Atitude",
  210. BE: "Buddhist Era ",
  211. bhumma: "Bhumma",
  212. budha: "Budha",
  213. canda: "Canda",
  214. confirm: "Confirm",
  215. date: "Date",
  216. day: " day(s) ",
  217. days: " day(s) ",
  218. departure_in_detail: "departure in detail",
  219. dhamma_time: "5000 Years of the Buddha’s Dispensation ",
  220. eat: "eat",
  221. gama_entry: "entry the village",
  222. guru: "Guru",
  223. hori_ref_time: "horizontal refraction correct ",
  224. kala: "suitable time",
  225. language_select: "Language",
  226. left: "Remains ",
  227. loading: "loading…",
  228. longitude: "Longitude",
  229. māsa: "māsa",
  230. mins: "(min)",
  231. month: "Month ",
  232. month_1: "- ",
  233. months: " month(s) ",
  234. my_loc: "my location",
  235. need_inform: "without informing other Bhikkhu ",
  236. no_string: "cannot ",
  237. noon_time: "NOON",
  238. noon_time: "NOON",
  239. note: "Note",
  240. now_time: "NOW",
  241. pacchā_māsa: "pacchā-māsa",
  242. pakkha: "Lunar Phases ",
  243. past: "Passed ",
  244. pubba_māsa: "pubba-māsa",
  245. ravi: "Ravi",
  246. saṃvacchara: "saṃvacchara",
  247. season: "Season ",
  248. sec: "sec",
  249. sora: "Sora",
  250. sukka: "Sukka",
  251. sun_height_degree: "Max solar altitude ",
  252. time: "time",
  253. twilight_time: "dawn",
  254. twilight_time: "dawn",
  255. vikala: "unsuitable time",
  256. week_day: "Day",
  257. year_0: "year",
  258. year_1: "- ",
  259. years: " year(s) ",
  260. yes_string: "can ",
  261. };
  262. localString["my"] = {
  263. and_another: " and ",
  264. atitude: "Atitude",
  265. BE: "Buddhist Era ",
  266. bhumma: "ဘုမ္မ",
  267. budha: "ဗုဓ",
  268. canda: "စန္ဒ",
  269. confirm: "Confirm",
  270. date: "Date ",
  271. day: " day(s) ",
  272. days: " day(s) ",
  273. departure_in_detail: "departure in detail",
  274. dhamma_time: "5000 Years of the Buddha’s Dispensation ",
  275. eat: "eat",
  276. gama_entry: "entry the village",
  277. guru: "ဂုရု",
  278. hori_ref_time: "horizontal refraction correct ",
  279. kala: "ကာလ",
  280. language_select: "ဘာသာ",
  281. left: "Remains ",
  282. loading: "loading…",
  283. longitude: "Longitude",
  284. māsa: "မာသ",
  285. mins: "(min)",
  286. month: "Month ",
  287. month_1: "- ",
  288. months: " month(s) ",
  289. my_loc: "အတ္တသ္မိံ",
  290. need_inform: "without informing other Bhikkhu ",
  291. no_string: "cannot ",
  292. noon_time: "မဇ္ဈန္ဟိက",
  293. noon_time: "မဇ္ဈန္ဟိက",
  294. note: "Note",
  295. now_time: "ပစ္စုပ္ပန္န",
  296. pacchā_māsa: "ပစ္ဆာ-မာသ",
  297. pakkha: "Lunar Phases ",
  298. past: "Passed ",
  299. pubba_māsa: "ပုဗ္ဗ-မာသ",
  300. ravi: "ရဝိ",
  301. saṃvacchara: "သံဝစ္ဆရ",
  302. season: "Season ",
  303. sec: "sec ",
  304. sora: "သောရ",
  305. sukka: "သုက္က",
  306. sun_height_degree: "Max solar altitude ",
  307. time: "Time",
  308. twilight_time: "အရုဏုဂ္ဂမန",
  309. twilight_time: "အရုဏုဂ္ဂမန",
  310. vikala: "ဝိကာလ",
  311. week_day: "Day",
  312. year_0: "year",
  313. year_1: "- ",
  314. years: " year(s) ",
  315. yes_string: "can ",
  316. };
  317. localString["si"] = {
  318. and_another: " ච ",
  319. atitude: "Atitude",
  320. BE: "බුද්ධ වර්ෂය ",
  321. bhumma: "භුම්ම",
  322. budha: "බුධ",
  323. canda: "චන්ද",
  324. confirm: "Confirm",
  325. date: "දිවස ",
  326. day: " දිවසා(නි) ",
  327. days: " දිවසා(නි) ",
  328. departure_in_detail: "departure in detail",
  329. dhamma_time: "සම්මා සම්බුද්ධස්ස සාසනං පට්ච-වස්ස-සහස්සානි පවත්තිස්සති ",
  330. eat: "eat",
  331. gama_entry: "entry the village",
  332. guru: "ගු‍රු",
  333. hori_ref_time: "horizontal refraction correct ",
  334. kala: "කාල",
  335. language_select: "භාෂාව",
  336. left: "අවසිට්ඨ ",
  337. loading: "ප්‍රවේශනය වෙනවා ",
  338. longitude: "Longitude",
  339. māsa: "මාස",
  340. mins: "(min)",
  341. month: "මාස ",
  342. month_1: "- ",
  343. months: " මාසා(නි) ",
  344. my_loc: "අත‍්තස‍්මිං",
  345. need_inform: "without informing other Bhikkhu ",
  346. no_string: "cannot ",
  347. noon_time: "මජ්ඣන්හික",
  348. noon_time: "මජ්ඣන්හික",
  349. note: "නෝට්ටුව ",
  350. now_time: "පච්චුප්පන්න",
  351. pacchā_māsa: "පච්ඡා-මාස",
  352. pakkha: "පක්ඛ ",
  353. past: "අතික්කන්ත ",
  354. pubba_māsa: "පුබ්බ-මාස",
  355. ravi: "රවි",
  356. saṃvacchara: "සංවච්ඡ‍ර",
  357. season: "උතු ",
  358. sec: "sec",
  359. sora: "සො‍ර",
  360. sukka: "සුක්ක",
  361. sun_height_degree: "Max solar altitude ",
  362. time: "time",
  363. twilight_time: "අ‍රුණුග්ගමන",
  364. twilight_time: "අ‍රුණුග්ගමන",
  365. vikala: "විකාල",
  366. week_day: "වා‍ර ",
  367. year_0: "සංවච්ඡ‍ර",
  368. year_1: "- ",
  369. years: " සංවච්ඡ‍රා(නි) ",
  370. yes_string: "can ",
  371. };
  372. var pali_month_name = [
  373. { id: "1", value: "jeṭṭha", season: "gimhāna", season_icon: "☀" }, //5.X-四-十五-心
  374. { id: "2", value: "asāḷha", season: "gimhāna", season_icon: "☀" }, //6.X-五-十五、十六-箕、斗
  375. { id: "3", value: "sāvana", season: "vassāna", season_icon: "☔" }, //7.X-六-十五-女
  376. { id: "4", value: "poṭṭhapāda", season: "vassāna", season_icon: "☔" }, //8.x-七-十五、十六-室、壁
  377. { id: "5", value: "assajuja", season: "vassāna", season_icon: "☔" }, //9.X-八-十五-樓
  378. { id: "6", value: "kattika", season: "vassāna", season_icon: "☔" }, //10.X-九-十五-昂
  379. { id: "7", value: "māgasira", season: "hemanta", season_icon: "❄" }, //11.X-十-十五-觜
  380. { id: "8", value: "phussa", season: "hemanta", season_icon: "❄" }, //12.X-十一-十五-鬼
  381. { id: "9", value: "māgha", season: "hemanta", season_icon: "❄" }, //1.X-十二-十五-星
  382. { id: "10", value: "phagguna", season: "hemanta", season_icon: "❄" }, //2.X-正月-十四、十五-張、異
  383. { id: "11", value: "citta", season: "gimhāna", season_icon: "☀" }, //3.X-二月-十五-角
  384. { id: "12", value: "vesākha", season: "gimhāna", season_icon: "☀" }, //4.X-三月-十五-氐
  385. ];
  386. var pali_nakkhatta_name = [
  387. { id: "0", value: "assayuja", name_zh: "娄宿" },
  388. { id: "1", value: "bharaṇī", name_zh: "胃宿" },
  389. { id: "2", value: "Kattikā", name_zh: "昂宿" },
  390. { id: "3", value: "rohiṇī", name_zh: "毕宿" },
  391. { id: "4", value: "magasira", name_zh: "觜宿" },
  392. { id: "5", value: "Addā", name_zh: "参宿" },
  393. { id: "6", value: "punabbasu", name_zh: "井宿" },
  394. { id: "7", value: "phussa", name_zh: "鬼宿" },
  395. { id: "8", value: "Asilesā", name_zh: "柳宿" },
  396. { id: "9", value: "maghā", name_zh: "星宿" },
  397. { id: "10", value: "pubbaphagguṇī", name_zh: "张宿" },
  398. { id: "11", value: "uttaraphagguṇī", name_zh: "翼宿" },
  399. { id: "12", value: "hattha", name_zh: "轸宿" },
  400. { id: "13", value: "cittā", name_zh: "角宿" },
  401. { id: "14", value: "sāti", name_zh: "亢宿" },
  402. { id: "15", value: "visākhā", name_zh: "氐宿" },
  403. { id: "16", value: "anurādhā", name_zh: "房宿" },
  404. { id: "17", value: "jeṭṭha", name_zh: "心宿" },
  405. { id: "18", value: "mūlā", name_zh: "尾宿" },
  406. { id: "19", value: "pubbāsāḷha", name_zh: "箕宿" },
  407. { id: "20", value: "uttarāsāḷha", name_zh: "斗宿" },
  408. { id: "21", value: "savaṇa", name_zh: "女宿" },
  409. { id: "22", value: "dhaniṭṭhā", name_zh: "虚宿" },
  410. { id: "23", value: "satabhisaja", name_zh: "危宿" },
  411. { id: "24", value: "pubbabhaddapadā", name_zh: "室宿" },
  412. { id: "25", value: "uttarabhaddapadā", name_zh: "壁宿" },
  413. { id: "26", value: "revatī", name_zh: "奎宿" },
  414. ];
  415. var horoscope_name = [
  416. { id: "0", value: "Aries", name_zh: "白羊", icon: "♈" },
  417. { id: "1", value: "Taurus", name_zh: "金牛", icon: "♉" },
  418. { id: "2", value: "Gemini", name_zh: "双子", icon: "♊" },
  419. { id: "3", value: "Cancer", name_zh: "巨蟹", icon: "♋" },
  420. { id: "4", value: "Leo", name_zh: "狮子", icon: "♌" },
  421. { id: "5", value: "Virgo", name_zh: "处女", icon: "♍" },
  422. { id: "6", value: "Libra", name_zh: "天秤", icon: "♎" },
  423. { id: "7", value: "Scorpio", name_zh: "天蝎", icon: "♏" },
  424. { id: "8", value: "Sagittarius", name_zh: "射手", icon: "♐" },
  425. { id: "9", value: "Capricornus", name_zh: "摩羯", icon: "♑" },
  426. { id: "10", value: "Aquarius", name_zh: "水瓶", icon: "♒" },
  427. { id: "11", value: "Pisces", name_zh: "双鱼", icon: "♓" },
  428. ];
  429. </script>
  430. <style>
  431. .card {
  432. box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  433. font-size: 1em;
  434. line-height: 1.3;
  435. }
  436. .card > .title > a,
  437. .card > .title > a:link {
  438. color: var(--main-color);
  439. }
  440. .card a:hover {
  441. color: var(--tool-link-hover-color);
  442. }
  443. .index_inner {
  444. width: 960px;
  445. margin-left: auto;
  446. margin-right: auto;
  447. }
  448. .table_line {
  449. display: flex;
  450. border-bottom: solid;
  451. }
  452. .table_column {
  453. flex: 1;
  454. }
  455. .correct {
  456. background-color: gold;
  457. }
  458. #position_input {
  459. width: fit-content;
  460. background: #dfdfdf;
  461. padding: 1em;
  462. border: solid 2px #7d7d7d;
  463. border-radius: 0.5em;
  464. position: absolute;
  465. left: 5em;
  466. top: 10em;
  467. }
  468. #position_input input[type="number" i] {
  469. width: 4em;
  470. }
  471. #position_input span {
  472. }
  473. #position_input select {
  474. width: 3.5em;
  475. }
  476. </style>
  477. <title id="title_text"> </title>
  478. </head>
  479. <body>
  480. <!--多语言范例
  481. <script>
  482. document.write(localString[g_language].XXXX);
  483. </script>
  484. -->
  485. <div id="position_change">
  486. <span id="selected_position_string" onclick="input_position()">
  487. <script>
  488. document.write(localString[g_language].loading);
  489. //localString[g_language].loading;
  490. </script>
  491. </span>
  492. <!--自动定位-->
  493. <button onclick="getLocation()" style="font-size: 100%; padding: 2px 6px">
  494. <svg class="icon" style="min-width: 1.8em; min-height: 1.8em">
  495. <path
  496. d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"
  497. />
  498. </svg>
  499. <script>
  500. document.write(localString[g_language].my_loc);
  501. //localString[g_language].my_loc
  502. </script>
  503. </button>
  504. <div id="position_input" style="display: none">
  505. <div style="display: flex">
  506. <span style="flex: 3; justify-content: flex-end; display: flex; margin: auto 1em auto 0">
  507. <script>
  508. document.write(localString[g_language].atitude);
  509. </script></span
  510. ><span style="flex: 7; white-space: nowrap">
  511. <input id="AT_°" type="number" min="0" max="90" /> °
  512. <input id="AT_’" type="number" min="0" max="60" /> ’
  513. <input id="AT_”" type="number" min="0" max="60" /> ”
  514. <select id="NS">
  515. <option value="+">N</option>
  516. <option value="-">S</option>
  517. </select></span
  518. >
  519. </div>
  520. <div style="display: flex">
  521. <span style="flex: 3; justify-content: flex-end; display: flex; margin: auto 1em auto 0"
  522. ><script>
  523. document.write(localString[g_language].longitude);
  524. </script></span
  525. ><span style="flex: 7; white-space: nowrap">
  526. <input id="LT_°" type="number" min="0" max="180" /> °
  527. <input id="LT_’" type="number" min="0" max="60" /> ’
  528. <input id="LT_”" type="number" min="0" max="60" /> ”
  529. <select id="WE">
  530. <option value="+">E</option>
  531. <option value="-">W</option>
  532. </select></span
  533. >
  534. </div>
  535. <div id="position_selected"></div>
  536. <div style="display: flex">
  537. <button onclick="getLocation()" style="margin: 0 auto">
  538. <script>
  539. document.write(localString[g_language].confirm);
  540. </script>
  541. </button>
  542. </div>
  543. </div>
  544. <input id="input_time" type="datetime-local" />
  545. </div>
  546. <div>
  547. <div onclick="show_time()">Sun time table</div>
  548. <div>破晓<span id="today_dawn"></span></div>
  549. <div>正午<span id="today_solarNoon"></span></div>
  550. <div>日落<span id="today_sunset"></span></div>
  551. <div>月相<span id="today_moon_phase"></span></div>
  552. <div>圆满度<span id="today_moon_percent"></span></div>
  553. <div>太阳相位于南偏西<span id="today_sun_azimuth"></span></div>
  554. <div>月亮相位于北偏东<span id="today_moon_azimuth"></span></div>
  555. <div>日月角<span id="angle_sun_e_moon"></span></div>
  556. <div>月相角<span id="today_moon_angle"></span></div>
  557. <div>当前时间<span id="curr_time"></span></div>
  558. <div>现在时间<span id="now_time"></span></div>
  559. <div>当前時間戳<span id="curr_time_unix"></span></div>
  560. <div>地球角度<span id="earth_angle"></span></div>
  561. <div>月亮角度<span id="moon_angle"></span></div>
  562. <div>月亮角度2<span id="moon_angle2"></span></div>
  563. <div>
  564. <span>精准月相时间及星宿(强化戒德之日)</span>
  565. <table id="lunar_phase_list" style="max-width: 70vw; width: -webkit-fill-available"></table>
  566. </div>
  567. </div>
  568. <script>
  569. var current_phase = phase();
  570. console.log(current_phase); //输出到控制台
  571. $("#title_text").html(localString[g_language].BE);
  572. var new_list = new Array(); //新月列表
  573. var first_list = new Array(); //上弦月列表
  574. var full_list = new Array(); //满月列表
  575. var last_list = new Array(); //下弦月列表
  576. var planets = new Array(); //
  577. var lunar_position = new Object();
  578. var g_coordinate_this = new Object();
  579. var g_now_date = new Date();
  580. var today = new Date();
  581. var start_day = new Date();
  582. var next_year = new Date();
  583. var sun_times = new Object();
  584. var curr_position = localStorage.getItem("local_position");
  585. if (curr_position) {
  586. g_coordinate_this.AT = curr_position.split("#")[0];
  587. g_coordinate_this.LT = curr_position.split("#")[1];
  588. g_coordinate_this.height = curr_position.split("#")[2];
  589. if (g_coordinate_this.AT >= 0) {
  590. var AT_string = angle_trans(g_coordinate_this.AT) + "N";
  591. } else {
  592. var AT_string = angle_trans(g_coordinate_this.AT) + "S";
  593. }
  594. if (g_coordinate_this.LT >= 0) {
  595. var LT_string = angle_trans(g_coordinate_this.LT) + "E";
  596. } else {
  597. var LT_string = angle_trans(g_coordinate_this.LT) + "W";
  598. }
  599. let height_string = g_coordinate_this.height + "M";
  600. $("#selected_position_string").html(AT_string + " " + LT_string + " " + height_string);
  601. } else {
  602. getLocation();
  603. }
  604. function show_time() {
  605. if ($("#input_time").val()) {
  606. today = new Date($("#input_time").val());
  607. } else {
  608. today = g_now_date;
  609. }
  610. if (phase(today).phase <= 0.5) {
  611. start_day.setDate(today.getDate() - 16); //退到本月的新月之前
  612. start_day = phaseHunt(start_day).full_date; //得到之前最近的满月日
  613. start_day.setDate(start_day.getDate() + 1);
  614. } else {
  615. start_day.setDate(today.getDate() - 31); //退到本月的新月之前
  616. start_day = phaseHunt(start_day).full_date; //得到之前最近的满月日
  617. start_day.setDate(start_day.getDate() + 1);
  618. }
  619. next_year.setDate(start_day.getDate() + 360);
  620. last_list = phaseRange(start_day, next_year, LAST); //获取下弦月列表
  621. new_list = phaseRange(start_day, next_year, NEW); //获取新月列表
  622. first_list = phaseRange(start_day, next_year, FIRST); //获取上弦月列表
  623. full_list = phaseRange(start_day, next_year, FULL); //获取满月列表
  624. console.log(last_list); //输出到控制台
  625. console.log(new_list); //输出到控制台
  626. console.log(first_list); //输出到控制台
  627. console.log(full_list); //输出到控制台
  628. lunar_phase_list_refresh();
  629. get_position(today);
  630. let d_earth_to_moon =
  631. lunar_position.position.x ^
  632. (2 + lunar_position.position.y) ^
  633. (2 + lunar_position.position.z) ^
  634. 2 ^
  635. 0.5;
  636. let d_earth_to_moon_0 = phase(today).distance;
  637. sun_times = SunCalc.getTimes(
  638. today,
  639. g_coordinate_this.AT,
  640. g_coordinate_this.LT,
  641. g_coordinate_this.height / 1000
  642. );
  643. sun_position = SunCalc.getPosition(today, g_coordinate_this.AT, g_coordinate_this.LT);
  644. moon_position = SunCalc.getMoonPosition(today, g_coordinate_this.AT, g_coordinate_this.LT);
  645. moon_Illumination = SunCalc.getMoonIllumination(today);
  646. $("#today_dawn").html(sun_times.dawn.toLocaleTimeString()); //破晓
  647. $("#today_solarNoon").html(sun_times.solarNoon.toLocaleTimeString()); //正午
  648. $("#today_sunset").html(sun_times.sunset.toLocaleTimeString()); //日落
  649. $("#today_sun_azimuth").html(angle_trans((sun_position.azimuth / Math.PI) * 180)); //太阳水平弧度
  650. $("#today_moon_azimuth").html(angle_trans((moon_position.azimuth / Math.PI) * 180)); //月亮水平弧度
  651. $("#today_moon_phase").html(phase(today).phase); //月相值
  652. $("#today_moon_percent").html(phase(today).illuminated); //月照度
  653. $("#today_moon_angle").html(angle_trans((moon_Illumination.angle / Math.PI) * 180)); //月相角
  654. $("#angle_sun_e_moon").html(
  655. angle_trans((Math.abs(Math.PI + sun_position.azimuth - moon_position.azimuth) / Math.PI) * 180)
  656. ); //月亮水平弧度
  657. $("#curr_time").html(today.toLocaleTimeString()); //当前时间
  658. $("#now_time").html(g_now_date.toLocaleTimeString()); //现在
  659. $("#curr_time_unix").html(today.getTime()); //時間戳
  660. let earth_angle_string = "";
  661. earth_angle_string += get_position(today).solar_position_angle + "——";
  662. earth_angle_string += get_position(today).solar_position_angle_round + "——";
  663. earth_angle_string += get_position(today).solar_station + "——";
  664. earth_angle_string += get_station_name(today).solar.icon;
  665. $("#earth_angle").html(earth_angle_string); //地球角度
  666. let moon_angle_string = "";
  667. moon_angle_string += get_position(today).lunar_position_angle + "——";
  668. moon_angle_string += get_position(today).lunar_position_angle_round + "——";
  669. moon_angle_string += get_position(today).lunar_station + "——";
  670. moon_angle_string += get_station_name(today).lunar.value;
  671. $("#moon_angle").html(moon_angle_string); //月亮角度——角度差算法
  672. let moon_angle_string2 = "";
  673. moon_angle_string2 += get_position(today).lunar_position_angle2 + "——";
  674. moon_angle_string2 += get_position(today).lunar_position_angle_round2 + "——";
  675. moon_angle_string2 += get_position(today).lunar_station2 + "——";
  676. moon_angle_string2 += get_station_name(today).lunar.value;
  677. $("#moon_angle2").html(moon_angle_string2); //月亮角度——向量差算法
  678. }
  679. //根据时间计算偏角,输出
  680. function get_position(date_time) {
  681. let planets_position = new Object();
  682. planets = window.lagrange.planet_positions.getPositions(date_time);
  683. //planets = global.planet_positions.getPositions(today);
  684. //console.log(planets)//输出到控制台
  685. earth_position = window.lagrange.planet_positions.getPositions(date_time)[3];
  686. lunar_position = window.lagrange.planet_positions.getPositions(date_time)[11];
  687. let lunar_position_angle = 0;
  688. let lunar_station = 0;
  689. let earth_position_angle = 0;
  690. let earth_station = 0;
  691. let earth_position_angle_round = 0;
  692. let lunar_position_angle_round = 0;
  693. //太阳相对地球的黄道偏角
  694. if (earth_position.position.y >= 0) {
  695. earth_position_angle = Math.atan2(earth_position.position.y, earth_position.position.x);
  696. } else {
  697. earth_position_angle =
  698. Math.PI * 2 + Math.atan2(earth_position.position.y, earth_position.position.x);
  699. }
  700. earth_position_angle_round = earth_position_angle / Math.PI / 2 + 0.5;
  701. earth_position_angle_round = earth_position_angle_round - Math.floor(earth_position_angle_round);
  702. earth_station = earth_position_angle_round * 12;
  703. planets_position.solar_station = earth_station;
  704. planets_position.solar_position_angle = earth_position_angle_round * Math.PI * 2;
  705. planets_position.solar_position_angle_round = earth_position_angle_round;
  706. //月球相对地球的黄道偏角——角度差算法
  707. lunar_position_angle_round = earth_position_angle_round + phase(date_time).phase;
  708. lunar_position_angle_round = lunar_position_angle_round - Math.floor(lunar_position_angle_round);
  709. lunar_position_angle = lunar_position_angle_round * Math.PI * 2;
  710. lunar_station = lunar_position_angle_round * 27;
  711. //月球相对地球的黄道偏角算法——向量差算法
  712. let lunar_to_earth = new Object();
  713. lunar_to_earth.y = lunar_position.position.y - earth_position.position.y;
  714. lunar_to_earth.x = lunar_position.position.x - earth_position.position.x;
  715. if (lunar_to_earth.y >= 0) {
  716. lunar_position_angle2 = Math.atan2(lunar_to_earth.y, lunar_to_earth.x);
  717. } else {
  718. lunar_position_angle2 = Math.PI * 2 + Math.atan2(lunar_to_earth.y, lunar_to_earth.x);
  719. }
  720. lunar_position_angle_round2 = lunar_position_angle2 / Math.PI / 2;
  721. //lunar_position_angle_round = lunar_position_angle_round - Math.floor(lunar_position_angle_round)
  722. lunar_position_angle2 = lunar_position_angle_round2 * Math.PI * 2;
  723. lunar_station2 = lunar_position_angle_round2 * 27;
  724. planets_position.lunar_station = lunar_station; //月站值【角度差算夹角】
  725. planets_position.lunar_position_angle = lunar_position_angle; //月站角【角度差算夹角】
  726. planets_position.lunar_position_angle_round = lunar_position_angle_round; //月站圆周比率【角度差算夹角】
  727. planets_position.lunar_station2 = lunar_station2; //月站值【矢量差算夹角】
  728. planets_position.lunar_position_angle2 = lunar_position_angle2; //月站角【矢量差算夹角】
  729. planets_position.lunar_position_angle_round2 = lunar_position_angle_round2; //月站圆周比率【矢量差算夹角】
  730. return planets_position;
  731. }
  732. 根据;
  733. function get_station_name(data_time) {
  734. //获取星象信息
  735. let solar_num = 0;
  736. let lunar_num = 0;
  737. solar_num = get_position(data_time).solar_station;
  738. solar_num = Math.floor(solar_num);
  739. lunar_num = get_position(data_time).lunar_station;
  740. lunar_num = Math.floor(lunar_num);
  741. let result = new Object();
  742. result.solar = horoscope_name[solar_num]; //黄道十二宫星象名称
  743. result.lunar = pali_nakkhatta_name[lunar_num]; //27星宿月站名称
  744. return result;
  745. }
  746. function lunar_phase_list_refresh() {
  747. let output = "";
  748. //画表头
  749. output += "<tr class='table_line'>";
  750. output += "<th class='table_column'>月份</th>";
  751. output += "<th class='table_column'>下弦</th>";
  752. output += "<th class='table_column'>新月(诵戒)</th>";
  753. output += "<th class='table_column'>上弦</th>";
  754. output += "<th class='table_column'>满月(诵戒)</th>";
  755. output += "</tr>";
  756. //画内容
  757. let month_num = Math.min(last_list.length, new_list.length, first_list.length, full_list.length);
  758. for (let i_month = 0; i_month < month_num; i_month++) {
  759. output += "<tr class='table_line'>";
  760. output += "<td class='table_column'>";
  761. output += Math.round(get_position(full_list[i_month]).solar_station * 100) / 100;
  762. //output += "—"
  763. //output += get_station_name(full_list[i_month]).lunar.value
  764. //output += "—"
  765. //output += get_station_name(full_list[i_month]).solar.name_zh
  766. //output += "—"
  767. //output += get_station_name(full_list[i_month]).solar.icon
  768. output += "</td>";
  769. //下弦月
  770. if (
  771. SunCalc.getTimes(
  772. last_list[i_month],
  773. g_coordinate_this.AT,
  774. g_coordinate_this.LT,
  775. g_coordinate_this.height / 1000
  776. ).dawn -
  777. last_list[i_month] <=
  778. 0
  779. ) {
  780. //如果在破晓之后,不修正
  781. output += "<td class='table_column' title='" + last_list[i_month].toLocaleTimeString() + "'>";
  782. output += last_list[i_month].toLocaleDateString();
  783. output += "<br />";
  784. output += get_station_name(last_list[i_month]).lunar.value;
  785. //output += Math.round(get_position(last_list[i_month]).lunar_station * 100) / 100
  786. output += "</td>";
  787. } else {
  788. //如果在破晓之前,修正提前一天
  789. output +=
  790. "<td class='table_column correct' title='" + last_list[i_month].toLocaleString() + "'>";
  791. let temp_date = last_list[i_month];
  792. temp_date.setDate(temp_date.getDate() - 1);
  793. output += temp_date.toLocaleDateString();
  794. output += "<br />";
  795. output += get_station_name(last_list[i_month]).lunar.value;
  796. //output += Math.round(get_position(last_list[i_month]).lunar_station * 100) / 100
  797. output += "</td>";
  798. }
  799. //新月
  800. if (
  801. SunCalc.getTimes(
  802. new_list[i_month],
  803. g_coordinate_this.AT,
  804. g_coordinate_this.LT,
  805. g_coordinate_this.height / 1000
  806. ).dawn -
  807. new_list[i_month] <=
  808. 0
  809. ) {
  810. //如果在破晓之后,不修正
  811. output += "<td class='table_column' title='" + new_list[i_month].toLocaleTimeString() + "'>";
  812. output += new_list[i_month].toLocaleDateString();
  813. output += "<br />";
  814. output += get_station_name(new_list[i_month]).lunar.value;
  815. //output += Math.round(get_position(new_list[i_month]).lunar_station * 100) / 100
  816. output += "</td>";
  817. } else {
  818. //如果在破晓之前,修正提前一天
  819. output +=
  820. "<td class='table_column correct' title='" + new_list[i_month].toLocaleString() + "'>";
  821. let temp_date = new_list[i_month];
  822. temp_date.setDate(temp_date.getDate() - 1);
  823. output += temp_date.toLocaleDateString();
  824. output += "<br />";
  825. output += get_station_name(new_list[i_month]).lunar.value;
  826. //output += Math.round(get_position(new_list[i_month]).lunar_station * 100) / 100
  827. output += "</td>";
  828. }
  829. //上弦月
  830. if (
  831. SunCalc.getTimes(
  832. first_list[i_month],
  833. g_coordinate_this.AT,
  834. g_coordinate_this.LT,
  835. g_coordinate_this.height / 1000
  836. ).dawn -
  837. first_list[i_month] <=
  838. 0
  839. ) {
  840. //如果在破晓之后,不修正
  841. output += "<td class='table_column' title='" + first_list[i_month].toLocaleTimeString() + "'>";
  842. output += first_list[i_month].toLocaleDateString();
  843. output += "<br />";
  844. output += get_station_name(first_list[i_month]).lunar.value;
  845. //output += Math.round(get_position(first_list[i_month]).lunar_station * 100) / 100
  846. output += "</td>";
  847. } else {
  848. //如果在破晓之前,修正提前一天
  849. output +=
  850. "<td class='table_column correct' title='" + first_list[i_month].toLocaleString() + "'>";
  851. let temp_date = first_list[i_month];
  852. temp_date.setDate(temp_date.getDate() - 1);
  853. output += temp_date.toLocaleDateString();
  854. output += "<br />";
  855. output += get_station_name(first_list[i_month]).lunar.value;
  856. //output += Math.round(get_position(first_list[i_month]).lunar_station * 100) / 100
  857. output += "</td>";
  858. }
  859. //满月
  860. if (
  861. SunCalc.getTimes(
  862. full_list[i_month],
  863. g_coordinate_this.AT,
  864. g_coordinate_this.LT,
  865. g_coordinate_this.height / 1000
  866. ).dawn -
  867. full_list[i_month] <=
  868. 0
  869. ) {
  870. //如果在破晓之后,不修正
  871. output += "<td class='table_column' title='" + full_list[i_month].toLocaleTimeString() + "'>";
  872. output += full_list[i_month].toLocaleDateString();
  873. output += "<br />";
  874. output += get_station_name(full_list[i_month]).lunar.value;
  875. //output += Math.round(get_position(full_list[i_month]).lunar_station * 100) / 100
  876. output += "</td>";
  877. } else {
  878. //如果在破晓之前,修正提前一天
  879. output +=
  880. "<td class='table_column correct' title='" + full_list[i_month].toLocaleString() + "'>";
  881. let temp_date = full_list[i_month];
  882. temp_date.setDate(temp_date.getDate() - 1);
  883. output += temp_date.toLocaleDateString();
  884. output += "<br />";
  885. output += get_station_name(full_list[i_month]).lunar.value;
  886. //output += Math.round(get_position(full_list[i_month]).lunar_station * 100) / 100
  887. output += "</td>";
  888. }
  889. output += "</tr>";
  890. }
  891. $("#lunar_phase_list").html(output);
  892. }
  893. function getLocation() {
  894. //自动定位
  895. if (navigator.geolocation) {
  896. navigator.geolocation.getCurrentPosition(showPosition, showError);
  897. } else {
  898. $("#selected_position_string").html("Geolocation is not supported by this browser.");
  899. }
  900. }
  901. function showPosition(position) {
  902. alert("get cordinate success");
  903. g_coordinate_this.AT = position.coords.latitude; //纬度
  904. g_coordinate_this.LT = position.coords.longitude; //经度
  905. g_coordinate_this.height = position.coords.altitude; //海拔高度
  906. //手动输入
  907. var LT = Number($("#LT_°")[0].value);
  908. LT += Number($("#LT_’")[0].value) / 60;
  909. LT += Number($("#LT_”")[0].value) / 3600;
  910. LT = Number($("#WE")[0].value + LT);
  911. var AT = Number($("#AT_°")[0].value);
  912. AT += Number($("#AT_’")[0].value) / 60;
  913. AT += Number($("#AT_”")[0].value) / 3600;
  914. AT = Number($("#NS")[0].value + AT);
  915. if (AT != 0) {
  916. g_coordinate_this.LT = LT;
  917. g_coordinate_this.AT = AT;
  918. }
  919. let position_string =
  920. g_coordinate_this.AT + "#" + g_coordinate_this.LT + "#" + g_coordinate_this.height;
  921. localStorage.setItem("local_position", position_string);
  922. if (g_coordinate_this.AT >= 0) {
  923. var AT_string = angle_trans(g_coordinate_this.AT) + "N";
  924. } else {
  925. var AT_string = angle_trans(g_coordinate_this.AT) + "S";
  926. }
  927. if (g_coordinate_this.LT >= 0) {
  928. var LT_string = angle_trans(g_coordinate_this.LT) + "E";
  929. } else {
  930. var LT_string = angle_trans(g_coordinate_this.LT) + "W";
  931. }
  932. let height_string = g_coordinate_this.height + "M";
  933. $("#selected_position_string").html(AT_string + " " + LT_string + " " + height_string);
  934. $("#position_input").hide();
  935. }
  936. function showError(error) {
  937. switch (error.code) {
  938. case error.PERMISSION_DENIED:
  939. alert("定位失败,用户拒绝请求地理定位");
  940. break;
  941. case error.POSITION_UNAVAILABLE:
  942. alert("定位失败,位置信息是不可用");
  943. break;
  944. case error.TIMEOUT:
  945. alert("定位失败,请求获取用户位置超时");
  946. break;
  947. case error.UNKNOWN_ERROR:
  948. alert("定位失败,定位系统失效");
  949. break;
  950. }
  951. }
  952. function angle_trans(angle) {
  953. var angle_str = "";
  954. var num_d = Math.floor(angle);
  955. var num_m = Math.floor((angle - num_d) * 60);
  956. var num_s = Math.round((angle - num_d) * 60 - num_m);
  957. if (num_d != 0) {
  958. angle_str += num_d + "°";
  959. }
  960. if (num_m != 0) {
  961. angle_str += num_m + "’";
  962. }
  963. if (num_s != 0) {
  964. angle_str += num_s + "”";
  965. }
  966. return angle_str;
  967. }
  968. function input_position() {
  969. $("#position_input").show();
  970. }
  971. </script>
  972. </body>
  973. </html>