404 lines
49 KiB
C
404 lines
49 KiB
C
/**
|
|
* @preserve Copyright (c) 2018 T. F. Raaion, www.sublunar.space
|
|
* License MIT: http://www.opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#define ONLINE 1
|
|
#define OFFLINE 2
|
|
|
|
#ifndef USECASE
|
|
#error "USECASE needs to be set"
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <time.h>
|
|
#include <math.h>
|
|
#include "swephexp.h"
|
|
|
|
#if USECASE == OFFLINE
|
|
#include <emscripten.h>
|
|
#endif
|
|
|
|
/**
|
|
* converts Julian Day to UNIX epoch
|
|
*/
|
|
long jul_to_epoch(double jd)
|
|
{
|
|
struct tm ts;
|
|
int32 year, month, day, hour, minute, second;
|
|
double hours;
|
|
time_t epoch;
|
|
|
|
// JD to year, month, day, hours fraction
|
|
swe_revjul(jd, SE_GREG_CAL, &year, &month, &day, &hours);
|
|
|
|
// convert hours fraction to full hour, minute, second
|
|
hour = floor(hours);
|
|
minute = floor((hours - hour) * 60.0);
|
|
second = floor((((hours - hour) * 60.0) - minute) * 60.0);
|
|
|
|
// fill tm struct and covert to time_t
|
|
ts.tm_year = year - 1900;
|
|
ts.tm_mon = month - 1;
|
|
ts.tm_mday = day;
|
|
ts.tm_hour = hour;
|
|
ts.tm_min = minute;
|
|
ts.tm_sec = second;
|
|
ts.tm_isdst = -1;
|
|
epoch = timegm(&ts);
|
|
|
|
return (long) epoch;
|
|
}
|
|
|
|
/**
|
|
* converts year, month, day, hour, minute, second to UNIX epoch
|
|
*/
|
|
long time_to_epoch(int32 year, int32 month, int32 day, int32 hour, int32 minute, int32 second)
|
|
{
|
|
struct tm ts;
|
|
time_t epoch;
|
|
|
|
// fill tm struct and convert
|
|
ts.tm_year = year - 1900;
|
|
ts.tm_mon = month - 1;
|
|
ts.tm_mday = day;
|
|
ts.tm_hour = hour;
|
|
ts.tm_min = minute;
|
|
ts.tm_sec = second;
|
|
ts.tm_isdst = -1;
|
|
epoch = timegm(&ts);
|
|
|
|
return (long) epoch;
|
|
}
|
|
|
|
/**
|
|
* converts UNIX epoch to time array
|
|
*/
|
|
int * epoch_to_time(long ts, int *time)
|
|
{
|
|
time_t timestamp;
|
|
struct tm *tmp;
|
|
|
|
// convert timestamp to tm struct
|
|
timestamp = ts;
|
|
tmp = gmtime(×tamp);
|
|
|
|
// read the data
|
|
time[0] = tmp->tm_year+1900;
|
|
time[1] = tmp->tm_mon+1;
|
|
time[2] = tmp->tm_mday;
|
|
time[3] = tmp->tm_hour;
|
|
time[4] = tmp->tm_min;
|
|
time[5] = tmp->tm_sec;
|
|
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* converts UNIX epoch to JD
|
|
*/
|
|
double epoch_to_jul(long ts)
|
|
{
|
|
int32 time[6];
|
|
double hours;
|
|
|
|
epoch_to_time(ts, time);
|
|
hours = (double) time[3] + (double) time[4] / 60 + (double) time[5] / 3600;
|
|
|
|
// return JD
|
|
return swe_julday(time[0],time[1],time[2],hours,SE_GREG_CAL);
|
|
}
|
|
|
|
/**
|
|
* calculates planetary ephemeris data for a moment and loads it into arrays
|
|
*/
|
|
int * planetary_moment(double lat, double lon, long unixtime, double *lunar, double *planets) {
|
|
|
|
// double lunar[0] = lunar day
|
|
// double lunar[1] = lunar phase angle
|
|
// double lunar[2] = lunar phase
|
|
// double planet[0] = ecliptic longitude sun
|
|
// double planet[1] = ecliptic longitude moon
|
|
// double planet[2] = ecliptic longitude mercury
|
|
// double planet[3] = ecliptic longitude venus
|
|
// double planet[4] = ecliptic longitude mars
|
|
// double planet[5] = ecliptic longitude jupiter
|
|
// double planet[6] = ecliptic longitude saturn
|
|
|
|
double latitude = 0.0;
|
|
double longitude = 0.0;
|
|
long epoch = 0;
|
|
struct tm *tmp;
|
|
time_t timestamp = 0;
|
|
int32 year, month, day, hour, minute, second, iflag, iflgret;
|
|
int pl, ipl, rsmi, return_code, dl, lhour, nm;
|
|
double hours, tjd_ts, te, lastnew;
|
|
double x2[6], datm[2], geopos[3], moon[20], llp[20], lunarday[31], data[13], datb[10];
|
|
char serr[AS_MAXCH], starname[255];
|
|
|
|
datm[0] = 1013.25; // atmospheric pressure
|
|
datm[1] = 15; // atmospheric temperature;
|
|
|
|
// exact new moon occurances taken from Steve Mosiher's website (moshier.org)
|
|
// new moon moments from 1.1.1970 until 31.12.2100
|
|
// replaced a formula for speed reasons
|
|
double newmoons[2474] = {2415021.07774, 2415050.55740, 2415079.97593, 2415109.35449, 2415138.72449, 2415168.11786, 2415197.56062, 2415227.07140, 2415256.66155, 2415286.33129, 2415316.06058, 2415345.80353, 2415375.50085, 2415405.10821, 2415434.61475, 2415464.03679, 2415493.40102, 2415522.73438, 2415552.06442, 2415581.42396, 2415610.85238, 2415640.38793, 2415670.04948, 2415699.81533, 2415729.62018, 2415759.38510, 2415789.05661, 2415818.61816, 2415848.07638, 2415877.44794, 2415906.75758, 2415936.04107, 2415965.34522, 2415994.72177, 2416024.21468, 2416053.84272, 2416083.58638, 2416113.39218, 2416143.19346, 2416172.93024, 2416202.55976, 2416232.06343, 2416261.45109, 2416290.75750, 2416320.03204, 2416349.32707, 2416378.68798, 2416408.14604, 2416437.71530, 2416467.39295, 2416497.15739, 2416526.96159, 2416556.73555, 2416586.41167, 2416615.95688, 2416645.38211, 2416674.72728, 2416704.04034, 2416733.36298, 2416762.72560, 2416792.15042, 2416821.65722, 2416851.26199, 2416880.96246, 2416910.72175, 2416940.47452, 2416970.15949, 2416999.74751, 2417029.24295, 2417058.66842, 2417088.05091, 2417117.41625, 2417146.79006, 2417176.19928, 2417205.66922, 2417235.21484, 2417264.83141, 2417294.49436, 2417324.17114, 2417353.83384, 2417383.46221, 2417413.04100, 2417442.56066, 2417472.02320, 2417501.44624, 2417530.85857, 2417560.28773, 2417589.74789, 2417619.23816, 2417648.75333, 2417678.29571, 2417707.87445, 2417737.49296, 2417767.13683, 2417796.77527, 2417826.37758, 2417855.93089, 2417885.44356, 2417914.93218, 2417944.40512, 2417973.85863, 2418003.28949, 2418032.70982, 2418062.14798, 2418091.63512, 2418121.18852, 2418150.80329, 2418180.45739, 2418210.12440, 2418239.78220, 2418269.41172, 2418298.99289, 2418328.50815, 2418357.95279, 2418387.34109, 2418416.70227, 2418446.07085, 2418475.47801, 2418504.94768, 2418534.49623, 2418564.13090, 2418593.84254, 2418623.59595, 2418653.33241, 2418682.99374, 2418712.55062, 2418742.00847, 2418771.39228, 2418800.73110, 2418830.05311, 2418859.38895, 2418888.77559, 2418918.25390, 2418947.85546, 2418977.58056, 2419007.38242, 2419037.18135, 2419066.90588, 2419096.52147, 2419126.02619, 2419155.43402, 2419184.76677, 2419214.05534, 2419243.34176, 2419272.67651, 2419302.10926, 2419331.67317, 2419361.36764, 2419391.15295, 2419420.96509, 2419450.73883, 2419480.42262, 2419509.98619, 2419539.42612, 2419568.76638, 2419598.05082, 2419627.33169, 2419656.65866, 2419686.06989, 2419715.58669, 2419745.21301, 2419774.93634, 2419804.72339, 2419834.51552, 2419864.24170, 2419893.85018, 2419923.33116, 2419952.71255, 2419982.04024, 2420011.35972, 2420040.70612, 2420070.10344, 2420099.57032, 2420129.12411, 2420158.77358, 2420188.50140, 2420218.25629, 2420247.97336, 2420277.60746, 2420307.14796, 2420336.60993, 2420366.01833, 2420395.39825, 2420424.77336, 2420454.16809, 2420483.60766, 2420513.11242, 2420542.68825, 2420572.32107, 2420601.98321, 2420631.64656, 2420661.28971, 2420690.89629, 2420720.45296, 2420749.95323, 2420779.40428, 2420808.82806, 2420838.25257, 2420867.69829, 2420897.17053, 2420926.66506, 2420956.18130, 2420985.72845, 2421015.31756, 2421044.94675, 2421074.59394, 2421104.22541, 2421133.81538, 2421163.35910, 2421192.86835, 2421222.35497, 2421251.81942, 2421281.25628, 2421310.67021, 2421340.08430, 2421369.53251, 2421399.04315, 2421428.62497, 2421458.26455, 2421487.93575, 2421517.61184, 2421547.26979, 2421576.88707, 2421606.44147, 2421635.91991, 2421665.32807, 2421694.69054, 2421724.04227, 2421753.41859, 2421782.84870, 2421812.35387, 2421841.94710, 2421871.62865, 2421901.37607, 2421931.13835, 2421960.85012, 2421990.46317, 2422019.96634, 2422049.37837, 2422078.72945, 2422108.04995, 2422137.36993, 2422166.72355, 2422196.15080, 2422225.69027, 2422255.36071, 2422285.13866, 2422314.95506, 2422344.72704, 2422374.39917, 2422403.95545, 2422433.40494, 2422462.76745, 2422492.07034, 2422521.35070, 2422550.65550, 2422580.03599, 2422609.53519, 2422639.17025, 2422668.91936, 2422698.72695, 2422728.52564, 2422758.25640, 2422787.87858, 2422817.37598, 2422846.76019, 2422876.06683, 2422905.34546, 2422934.64796, 2422964.01833, 2422993.48527, 2423023.05953, 2423052.73574, 2423082.49187, 2423112.28319, 2423142.04402, 2423171.71091, 2423201.25274, 2423230.68032, 2423260.03270, 2423289.35693, 2423318.69330, 2423348.06962, 2423377.50446, 2423407.01398, 2423436.61198, 2423466.29681, 2423496.03573, 2423525.76988, 2423555.44344, 2423585.02934, 2423614.53128, 2423643.97002, 2423673.37001, 2423702.75397, 2423732.14388, 2423761.56295, 2423791.03331, 2423820.56848, 2423850.16522, 2423879.80382, 2423909.45842, 2423939.10704, 2423968.73284, 2423998.32092, 2424027.85904, 2424057.34446, 2424086.78972, 2424116.21922, 2424145.65695, 2424175.11478, 2424204.59179, 2424234.08550, 2424263.60287, 2424293.15862, 2424322.76189, 2424352.40289, 2424382.05204, 2424411.67541, 2424441.25411, 2424470.79022, 2424500.29527, 2424529.77426, 2424559.22264, 2424588.63912, 2424618.03928, 2424647.45531, 2424676.92255, 2424706.46296, 2424736.07559, 2424765.73958, 2424795.42599, 2424825.10737, 2424854.75821, 2424884.35290, 2424913.87114, 2424943.30894, 2424972.68356, 2425002.02773, 2425031.37927, 2425060.77241, 2425090.23377, 2425119.78172, 2425149.42429, 2425179.15115, 2425208.92325, 2425238.67609, 2425268.34650, 2425297.90347, 2425327.35382, 2425356.72567, 2425386.05162, 2425415.36276, 2425444.69151, 2425474.07554, 2425503.55594, 2425533.16425, 2425562.89973, 2425592.71277, 2425622.51979, 2425652.24675, 2425681.85888, 2425711.35609, 2425740.75526, 2425770.08106, 2425799.36614, 2425828.65296, 2425857.99145, 2425887.43022, 2425917.00082, 2425946.70051, 2425976.48751, 2426006.29696, 2426036.06450, 2426065.74072, 2426095.29774, 2426124.73398, 2426154.07427, 2426183.36259, 2426212.65079, 2426241.98738, 2426271.40828, 2426300.93161, 2426330.55838, 2426360.27488, 2426390.04932, 2426419.82700, 2426449.54167, 2426479.14461, 2426508.62644, 2426538.01406, 2426567.35224, 2426596.68521, 2426626.04602, 2426655.45536, 2426684.92801, 2426714.47843, 2426744.11483, 2426773.82264, 2426803.55655, 2426833.25824, 2426862.88634, 2426892.43054, 2426921.90422, 2426951.32980, 2426980.72925, 2427010.12256, 2427039.53028, 2427068.97411, 2427098.47219, 2427128.03071, 2427157.63936, 2427187.27685, 2427216.92175, 2427246.55736, 2427276.16904, 2427305.74180, 2427335.26477, 2427364.73965, 2427394.18344, 2427423.62020, 2427453.06766, 2427482.53039, 2427512.00606, 2427541.49821, 2427571.02120, 2427600.59159, 2427630.21268, 2427659.86525, 2427689.51426, 2427719.12869, 2427748.69723, 2427778.22591, 2427807.72255, 2427837.18591, 2427866.61167, 2427896.00762, 2427925.40051, 2427954.82807, 2427984.32281, 2428013.89777, 2428043.54216, 2428073.22910, 2428102.92767, 2428132.60854, 2428162.24292, 2428191.80448, 2428221.27961, 2428250.67637, 2428280.02288, 2428309.35751, 2428338.71863, 2428368.13819, 2428397.63967, 2428427.23733, 2428456.93117, 2428486.69607, 2428516.47587, 2428546.19955, 2428575.81581, 2428605.31396, 2428634.71549, 2428664.05411, 2428693.36342, 2428722.67564, 2428752.02585, 2428781.45411, 2428810.99878, 2428840.67790, 2428870.46600, 2428900.29070, 2428930.06622, 2428959.73635, 2428989.28636, 2429018.72781, 2429048.08329, 2429077.38220, 2429106.66244, 2429135.97064, 2429165.35698, 2429194.86291, 2429224.50352, 2429254.25491, 2429284.06039, 2429313.85318, 2429343.57620, 2429373.19127, 2429402.68418, 2429432.06754, 2429461.37715, 2429490.66226, 2429519.97397, 2429549.35451, 2429578.82964, 2429608.40678, 2429638.07845, 2429667.82311, 2429697.59933, 2429727.34634, 2429757.00488, 2429786.54535, 2429815.97781, 2429845.33992, 2429874.67743, 2429904.02881, 2429933.41899, 2429962.86267, 2429992.37244, 2430021.96048, 2430051.62662, 2430081.34313, 2430111.05817, 2430140.72136, 2430170.30740, 2430199.81884, 2430229.27385, 2430258.69367, 2430288.09730, 2430317.50275, 2430346.92956, 2430376.39723, 2430405.91870, 2430435.49326, 2430465.10671, 2430494.73991, 2430524.37643, 2430554.00247, 2430583.60284, 2430613.16187, 2430642.67139, 2430672.13846, 2430701.58312, 2430731.02636, 2430760.47871, 2430789.94027, 2430819.41192, 2430848.90523, 2430878.44004, 2430908.03065, 2430937.67131, 2430967.33325, 2430996.97891, 2431026.58301, 2431056.14119, 2431085.66008, 2431115.14210, 2431144.58284, 2431173.98365, 2431203.36374, 2431232.75892, 2431262.20833, 2431291.73809, 2431321.35072, 2431351.02618, 2431380.73272, 2431410.43723, 2431440.10766, 2431469.71320, 2431499.23164, 2431528.66061, 2431558.02078, 2431587.34852, 2431616.68477, 2431646.06644, 2431675.52233, 2431705.07215, 2431734.72405, 2431764.46598, 2431794.25488, 2431824.02089, 2431853.69688, 2431883.25120, 2431912.69279, 2431942.05306, 2431971.36790, 2432000.67094, 2432029.99581, 2432059.38031, 2432088.86502, 2432118.48071, 2432148.22515, 2432178.04617, 2432207.85743, 2432237.58360, 2432267.19059, 2432296.68033, 2432326.07231, 2432355.39343, 2432384.67758, 2432413.96722, 2432443.31144, 2432472.75731, 2432502.33429, 2432532.03730, 2432561.82293, 2432591.62651, 2432621.38559, 2432651.05344, 2432680.60458, 2432710.03884, 2432739.38135, 2432768.67580, 2432797.97333, 2432827.32099, 2432856.75210, 2432886.28122, 2432915.90629, 2432945.61289, 2432975.37160, 2433005.13269, 2433034.83522, 2433064.43356, 2433093.91836, 2433123.31493, 2433152.66628, 2433182.01487, 2433211.39117, 2433240.81221, 2433270.28894, 2433299.83330, 2433329.45368, 2433359.13922, 2433388.85126, 2433418.53812, 2433448.16199, 2433477.71243, 2433507.20050, 2433536.64538, 2433566.06534, 2433595.47635, 2433624.89516, 2433654.34055, 2433683.82928, 2433713.36875, 2433742.95289, 2433772.56674, 2433802.19504, 2433831.82531, 2433861.44421, 2433891.03477, 2433920.58138, 2433950.07992, 2433979.54223, 2434008.98877, 2434038.43527, 2434067.88643, 2434097.34244, 2434126.81102, 2434156.31133, 2434185.86496, 2434215.47989, 2434245.13947, 2434274.80715, 2434304.44641, 2434334.03908, 2434363.58537, 2434393.08943, 2434422.54915, 2434451.96217, 2434481.33987, 2434510.71265, 2434540.12168, 2434569.60321, 2434599.17392, 2434628.82508, 2434658.52853, 2434688.24879, 2434717.95032, 2434747.59850, 2434777.16383, 2434806.63320, 2434836.01774, 2434865.34916, 2434894.66901, 2434924.01819, 2434953.43072, 2434982.93154, 2435012.53538, 2435042.24133, 2435072.02146, 2435101.81504, 2435131.54663, 2435161.16308, 2435190.65488, 2435220.04633, 2435249.37434, 2435278.67518, 2435307.98268, 2435337.33233, 2435366.76375, 2435396.31450, 2435426.00141, 2435455.79692, 2435485.62608, 2435515.40158, 2435545.06747, 2435574.61067, 2435604.04507, 2435633.39559, 2435662.69316, 2435691.97602, 2435721.29010, 2435750.68409, 2435780.19734, 2435809.84239, 2435839.59312, 2435869.39249, 2435899.17561, 2435928.88854, 2435958.49605, 2435987.98578, 2436017.37083, 2436046.68654, 2436075.98132, 2436105.30488, 2436134.69714, 2436164.18041, 2436193.75858, 2436223.42246, 2436253.15190, 2436282.90994, 2436312.64166, 2436342.29227, 2436371.83334, 2436401.27355, 2436430.64848, 2436460.00184, 2436489.36976, 2436518.77381, 2436548.22476, 2436577.73217, 2436607.30738, 2436636.95252, 2436666.64551, 2436696.34165, 2436725.99577, 2436755.58399, 2436785.10724, 2436814.58066, 2436844.02181, 2436873.44552, 2436902.86564, 2436932.29826, 2436961.76090, 2436991.26669, 2437020.81795, 2437050.40611, 2437080.01850, 2437109.64405, 2437139.27173, 2437168.88598, 2437198.46739, 2437228.00195, 2437257.49079, 2437286.94944, 2437316.39618, 2437345.84090, 2437375.28552, 2437404.73470, 2437434.20464, 2437463.71995, 2437493.29971, 2437522.94188, 2437552.61810, 2437582.28681, 2437611.91594, 2437641.49461, 2437671.02488, 2437700.50726, 2437729.93847, 2437759.32311, 2437788.68412, 2437818.06061, 2437847.49496, 2437877.01683, 2437906.63156, 2437936.31935, 2437966.04535, 2437995.77086, 2438025.45783, 2438055.07115, 2438084.58764, 2438114.00707, 2438143.35362, 2438172.66690, 2438201.99049, 2438231.36339, 2438260.81601, 2438290.36892, 2438320.03000, 2438349.78530, 2438379.58808, 2438409.36393, 2438439.04285, 2438468.59327, 2438498.02635, 2438527.37652, 2438556.68255, 2438585.98011, 2438615.30365, 2438644.69063, 2438674.18069, 2438703.80337, 2438733.55471, 2438763.38017, 2438793.19173, 2438822.91409, 2438852.51463, 2438881.99740, 2438911.38411, 2438940.70343, 2438969.98988, 2438999.28540, 2439028.63762, 2439058.09151, 2439087.67393, 2439117.37736, 2439147.15745, 2439176.95107, 2439206.69905, 2439236.35801, 2439265.90476, 2439295.33987, 2439324.68802, 2439353.99187, 2439383.30126, 2439412.66124, 2439442.10205, 2439471.63464, 2439501.25451, 2439530.94749, 2439560.68769, 2439590.43105, 2439620.12218, 2439649.71812, 2439679.20880, 2439708.61732, 2439737.98440, 2439767.35025, 2439796.74233, 2439826.17383, 2439855.65210, 2439885.18734, 2439914.78896, 2439944.45042, 2439974.14001, 2440003.81274, 2440033.43408, 2440062.99307, 2440092.49802, 2440121.96440, 2440151.40617, 2440180.83487, 2440210.26335, 2440239.70782, 2440269.18449, 2440298.70277, 2440328.26139, 2440357.85180, 2440387.46473, 2440417.09165, 2440446.72018, 2440476.33087, 2440505.90268, 2440535.42506, 2440564.90461, 2440594.35842, 2440623.80104, 2440653.23828, 2440682.67365, 2440712.11918, 2440741.59855, 2440771.13782, 2440800.74915, 2440830.41798, 2440860.10571, 2440889.76988, 2440919.38532, 2440948.94677, 2440978.45542, 2441007.90920, 2441037.30847, 2441066.66833, 2441096.02257, 2441125.41528, 2441154.88587, 2441184.45420, 2441214.11316, 2441243.83311, 2441273.57397, 2441303.29408, 2441332.95353, 2441362.52047, 2441391.98294, 2441421.35528, 2441450.67273, 2441479.97962, 2441509.31908, 2441538.72676, 2441568.22860, 2441597.83938, 2441627.55697, 2441657.35053, 2441687.15500, 2441716.89136, 2441746.50567, 2441775.99015, 2441805.37197, 2441834.69096, 2441863.98575, 2441893.29134, 2441922.64310, 2441952.07959, 2441981.63699, 2442011.33045, 2442041.13039, 2442070.96017, 2442100.73230, 2442130.39217, 2442159.92864, 2442189.35765, 2442218.70584, 2442248.00504, 2442277.29329, 2442306.61529, 2442336.01775, 2442365.53748, 2442395.18437, 2442424.93081, 2442454.72058, 2442484.49182, 2442514.19428, 2442543.79559, 2442573.28463, 2442602.67423, 2442631.99871, 2442661.30519, 2442690.64171, 2442720.04551, 2442749.53528, 2442779.11168, 2442808.76455, 2442838.47608, 2442868.21439, 2442897.93074, 2442927.57469, 2442957.11856, 2442986.56911, 2443015.95927, 2443045.33032, 2443074.71557, 2443104.13293, 2443133.58928, 2443163.09158, 2443192.65116, 2443222.27322, 2443251.94182, 2443281.61956, 2443311.26632, 2443340.85923, 2443370.39709, 2443399.89137, 2443429.35520, 2443458.79873, 2443488.23162, 2443517.66703, 2443547.12140, 2443576.60905, 2443606.13608, 2443635.69966, 2443665.29324, 2443694.91051, 2443724.54274, 2443754.17341, 2443783.77879, 2443813.33843, 2443842.84740, 2443872.31717, 2443901.76414, 2443931.19865, 2443960.62521, 2443990.05247, 2444019.50084, 2444048.99908, 2444078.57046, 2444108.21616, 2444137.90793, 2444167.59991, 2444197.25310, 2444226.85015, 2444256.38905, 2444285.86925, 2444315.28939, 2444344.65769, 2444374.00072, 2444403.36052, 2444432.78230, 2444462.29871, 2444491.91738, 2444521.61838, 2444551.36346, 2444581.10826, 2444610.80893, 2444640.42682, 2444669.93877, 2444699.34742, 2444728.68057, 2444757.98094, 2444787.29442, 2444816.66168, 2444846.11408, 2444875.67226, 2444905.34314, 2444935.11056, 2444964.92422, 2444994.70612, 2445024.38470, 2445053.92940, 2445083.35384, 2445112.69526, 2445141.99489, 2445171.28994, 2445200.61510, 2445230.00691, 2445259.50345, 2445289.13248, 2445318.88815, 2445348.71435, 2445378.52270, 2445408.23909, 2445437.83276, 2445467.30970, 2445496.69334, 2445526.01346, 2445555.30473, 2445584.60822, 2445613.96981, 2445643.43195, 2445673.01858, 2445702.71982, 2445732.49118, 2445762.27204, 2445792.00724, 2445821.65707, 2445851.20052, 2445880.63844, 2445909.99453, 2445939.30999, 2445968.63299, 2445998.00628, 2446027.45665, 2446056.99132, 2446086.60358, 2446116.28025, 2446145.99970, 2446175.72420, 2446205.40419, 2446234.99920, 2446264.49809, 2446293.92111, 2446323.30611, 2446352.69042, 2446382.09810, 2446411.53844, 2446441.01569, 2446470.53903, 2446500.11975, 2446529.75628, 2446559.42398, 2446589.08425, 2446618.70537, 2446648.27544, 2446677.79950, 2446707.28866, 2446736.75212, 2446766.19690, 2446795.63243, 2446825.07321, 2446854.53579, 2446884.03227, 2446913.56619, 2446943.13492, 2446972.73455, 2447002.36002, 2447031.99967, 2447061.63135, 2447091.22835, 2447120.77349, 2447150.26819, 2447179.72675, 2447209.16332, 2447238.58560, 2447268.00066, 2447297.42465, 2447326.88524, 2447356.41247, 2447386.02215, 2447415.70144, 2447445.40946, 2447475.09771, 2447504.73398, 2447534.30774, 2447563.81798, 2447593.26362, 2447622.64837, 2447651.99120, 2447681.32897, 2447710.70832, 2447740.17120, 2447769.73991, 2447799.40821, 2447829.14446, 2447858.90391, 2447888.63926, 2447918.30624, 2447947.87178, 2447977.32590, 2448006.68641, 2448035.99172, 2448065.28857, 2448094.62170, 2448124.02775, 2448153.53287, 2448183.15116, 2448212.87885, 2448242.68238, 2448272.49348, 2448302.23103, 2448331.84130, 2448361.31847, 2448390.69221, 2448420.00478, 2448449.29657, 2448478.60324, 2448507.95958, 2448537.40264, 2448566.96666, 2448596.66477, 2448626.46566, 2448656.29210, 2448686.05773, 2448715.71003, 2448745.23988, 2448774.66497, 2448804.01319, 2448833.31677, 2448862.61310, 2448891.94523, 2448921.35746, 2448950.88353, 2448980.53044, 2449010.26935, 2449040.04589, 2449069.80237, 2449099.49303, 2449129.08855, 2449158.57878, 2449187.97572, 2449217.31200, 2449246.63283, 2449275.98398, 2449305.39954, 2449334.89437, 2449364.46621, 2449394.10479, 2449423.79556, 2449453.51257, 2449483.21359, 2449512.85241, 2449542.40160, 2449571.86538, 2449601.27345, 2449630.66399, 2449660.06702, 2449689.49657, 2449718.95600, 2449748.45051, 2449777.99221, 2449807.59002, 2449837.23426, 2449866.89454, 2449896.53539, 2449926.13469, 2449955.68887, 2449985.20539, 2450014.69252, 2450044.15544, 2450073.59961, 2450103.03575, 2450132.47997, 2450161.94844, 2450191.45125, 2450220.99113, 2450250.56724, 2450280.17769, 2450309.81586, 2450339.46411, 2450369.09408, 2450398.67860, 2450428.20648, 2450457.68524, 2450487.13006, 2450516.55251, 2450545.96037, 2450575.36637, 2450604.79486, 2450634.27833, 2450663.84371, 2450693.49487, 2450723.20317, 2450752.91814, 2450782.59379, 2450812.20665, 2450841.75131, 2450871.22706, 2450900.63520, 2450929.98780, 2450959.31479, 2450988.66065, 2451018.07280, 2451047.58621, 2451077.21011, 2451106.92393, 2451136.68599, 2451166.44681, 2451196.15773, 2451225.77761, 2451255.28403, 2451284.68254, 2451314.00423, 2451343.29439, 2451372.60071, 2451401.96497, 2451431.41898, 2451460.98298, 2451490.66257, 2451520.43937, 2451550.26021, 2451580.04468, 2451609.72068, 2451639.25908, 2451668.67579, 2451698.01043, 2451727.30624, 2451756.60154, 2451785.93081, 2451815.32919, 2451844.83270, 2451874.46693, 2451904.22409, 2451934.04715, 2451963.84873, 2451993.55700, 2452023.14353, 2452052.61604, 2452081.99918, 2452111.32325, 2452140.62246, 2452169.93641, 2452199.30860, 2452228.77851, 2452258.36698, 2452288.06227, 2452317.82080, 2452347.58583, 2452377.30709, 2452406.94872, 2452436.49138, 2452465.93548, 2452495.30295, 2452524.63290, 2452553.97127, 2452583.35799, 2452612.81628, 2452642.34993, 2452671.95101, 2452701.60836, 2452731.30540, 2452761.01102, 2452790.68122, 2452820.27760, 2452849.78735, 2452879.22737, 2452908.63212, 2452938.03568, 2452967.45835, 2452996.90560, 2453026.37914, 2453055.88802, 2453085.44612, 2453115.05713, 2453144.70348, 2453174.35268, 2453203.97558, 2453233.55900, 2453263.10424, 2453292.61759, 2453322.10295, 2453351.56257, 2453381.00270, 2453410.43688, 2453439.88293, 2453469.35631, 2453498.86564, 2453528.41401, 2453558.00248, 2453587.62904, 2453617.28228, 2453646.93677, 2453676.55950, 2453706.12640, 2453735.63390, 2453765.09424, 2453794.52212, 2453823.92801, 2453853.32290, 2453882.72687, 2453912.17108, 2453941.68889, 2453971.29920, 2454000.99038, 2454030.71886, 2454060.42992, 2454090.08463, 2454119.66790, 2454149.17735, 2454178.61365, 2454207.98410, 2454237.31134, 2454266.63489, 2454296.00338, 2454325.46083, 2454355.03147, 2454384.70956, 2454414.46123, 2454444.23715, 2454473.98490, 2454503.65667, 2454533.21897, 2454562.66416, 2454592.01342, 2454621.30810, 2454650.59700, 2454679.92615, 2454709.33273, 2454738.84260, 2454768.46871, 2454798.20533, 2454828.01630, 2454857.83082, 2454887.56678, 2454917.17155, 2454946.64143, 2454976.00840, 2455005.31671, 2455034.60813, 2455063.91853, 2455093.28154, 2455122.73207, 2455152.30196, 2455182.00222, 2455211.80033, 2455241.61973, 2455271.37652, 2455301.02084, 2455330.54548, 2455359.96922, 2455389.32053, 2455418.63143, 2455447.93814, 2455477.28165, 2455506.70339, 2455536.23390, 2455565.87758, 2455595.60538, 2455625.36594, 2455655.10654, 2455684.78597, 2455714.37758, 2455743.87155, 2455773.27840, 2455802.62860, 2455831.96512, 2455861.33117, 2455890.75749, 2455920.25521, 2455949.81971, 2455979.44144, 2456009.10986, 2456038.80521, 2456068.49176, 2456098.12724, 2456127.68412, 2456157.16356, 2456186.59147, 2456216.00251, 2456245.42300, 2456274.86301, 2456304.32273, 2456333.80639, 2456363.32785, 2456392.90028, 2456422.52049, 2456452.16491, 2456481.80236, 2456511.41097, 2456540.98419, 2456570.52474, 2456600.03547, 2456629.51632, 2456658.96895, 2456688.40252, 2456717.83386, 2456747.28180, 2456776.76075, 2456806.27872, 2456835.83999, 2456865.44643, 2456895.09296, 2456924.76033, 2456954.41513, 2456984.02319, 2457013.56734, 2457043.05195, 2457072.49192, 2457101.90090, 2457131.29027, 2457160.67665, 2457190.08783, 2457219.55935, 2457249.12118, 2457278.77944, 2457308.50477, 2457338.24187, 2457367.93788, 2457397.56365, 2457427.11114, 2457456.58029, 2457485.97556, 2457515.31296, 2457544.62551, 2457573.95982, 2457603.36505, 2457632.87794, 2457662.50870, 2457692.23566, 2457722.01346, 2457751.78772, 2457781.50567, 2457811.12467, 2457840.62387, 2457870.01202, 2457899.32335, 2457928.60545, 2457957.90744, 2457987.27176, 2458016.72989, 2458046.30086, 2458075.98840, 2458105.77192, 2458135.59610, 2458165.37942, 2458195.05052, 2458224.58216, 2458253.99232, 2458283.32249, 2458312.61737, 2458341.91590, 2458371.25183, 2458400.65835, 2458430.16890, 2458459.80660, 2458489.56204, 2458519.37829, 2458549.17025, 2458578.86921, 2458608.44908, 2458637.91882, 2458667.30372, 2458696.63408, 2458725.94327, 2458755.26912, 2458784.65253, 2458814.12969, 2458843.71825, 2458873.40497, 2458903.14805, 2458932.89541, 2458962.60210, 2458992.23613, 2459021.77959, 2459051.23203, 2459080.61308, 2459109.95929, 2459139.31404, 2459168.71413, 2459198.17898, 2459227.70926, 2459257.29642, 2459286.93218, 2459316.60557, 2459346.29233, 2459375.95403, 2459405.55402, 2459435.07729, 2459464.53676, 2459493.96289, 2459523.38595, 2459552.82235, 2459582.27407, 2459611.74110, 2459641.23330, 2459670.76776, 2459700.35365, 2459729.98017, 2459759.62044, 2459789.24736, 2459818.84604, 2459848.41370, 2459877.95129, 2459907.45721, 2459936.92919, 2459966.37112, 2459995.79653, 2460025.22521, 2460054.67617, 2460084.16280, 2460113.69327, 2460143.27291, 2460172.90232, 2460202.57012, 2460232.24744, 2460261.89483, 2460291.48138, 2460320.99900, 2460350.45857, 2460379.87611, 2460409.26529, 2460438.64103, 2460468.02701, 2460497.45733, 2460526.96821, 2460556.58107, 2460586.28502, 2460616.03354, 2460645.76568, 2460675.43608, 2460705.02579, 2460734.53193, 2460763.95763, 2460793.31410, 2460822.62743, 2460851.93942, 2460881.30025, 2460910.75535, 2460940.33006, 2460970.01828, 2460999.78362, 2461029.57257, 2461059.32857, 2461089.00160, 2461118.55877, 2461147.99510, 2461177.33486, 2461206.62175, 2461235.90609, 2461265.23466, 2461294.64455, 2461324.16058, 2461353.79393, 2461383.53681, 2461413.35107, 2461443.16477, 2461472.89627, 2461502.49465, 2461531.95818, 2461561.32049, 2461590.62725, 2461619.92111, 2461649.23773, 2461678.60918, 2461708.06785, 2461737.64277, 2461767.34270, 2461797.13449, 2461826.94345, 2461856.68921, 2461886.32505, 2461915.84546, 2461945.26994, 2461974.62699, 2462003.94792, 2462033.26729, 2462062.62358, 2462092.05498, 2462121.58853, 2462151.22616, 2462180.93935, 2462210.68082, 2462240.40369, 2462270.07173, 2462299.66091, 2462329.16127, 2462358.58120, 2462387.94827, 2462417.30256, 2462446.68422, 2462476.12034, 2462505.61855, 2462535.17268, 2462564.77486, 2462594.41921, 2462624.09257, 2462653.76563, 2462683.39975, 2462712.96677, 2462742.46423, 2462771.91375, 2462801.34593, 2462830.78309, 2462860.23152, 2462889.68899, 2462919.15971, 2462948.65987, 2462978.20711, 2463007.80443, 2463037.43463, 2463067.07041, 2463096.68988, 2463126.28334, 2463155.84853, 2463185.38250, 2463214.87985, 2463244.33880, 2463273.76764, 2463303.18459, 2463332.61157, 2463362.06730, 2463391.56479, 2463421.11297, 2463450.71713, 2463480.37344, 2463510.06078, 2463539.74037, 2463569.37088, 2463598.92930, 2463628.41737, 2463657.85047, 2463687.24501, 2463716.61624, 2463745.98454, 2463775.38071, 2463804.84286, 2463834.40344, 2463864.07010, 2463893.81224, 2463923.56967, 2463953.28310, 2463982.91854, 2464012.46625, 2464041.92761, 2464071.31049, 2464100.63458, 2464129.93550, 2464159.26141, 2464188.66265, 2464218.17708, 2464247.81519, 2464277.55380, 2464307.34418, 2464337.12796, 2464366.84951, 2464396.46574, 2464425.95766, 2464455.33690, 2464484.64023, 2464513.91702, 2464543.21735, 2464572.58385, 2464602.04726, 2464631.62497, 2464661.31863, 2464691.10564, 2464720.92942, 2464750.70867, 2464780.37360, 2464809.89894, 2464839.30430, 2464868.63252, 2464897.92930, 2464927.23372, 2464956.57835, 2464985.99393, 2465015.51093, 2465045.14977, 2465074.89972, 2465104.70507, 2465134.48436, 2465164.17289, 2465193.74694, 2465223.21630, 2465252.60625, 2465281.94639, 2465311.26856, 2465340.60818, 2465370.00303, 2465399.48581, 2465429.07122, 2465458.74542, 2465488.46962, 2465518.19740, 2465547.88951, 2465577.51767, 2465607.06484, 2465636.52886, 2465665.92640, 2465695.29087, 2465724.66257, 2465754.07496, 2465783.54387, 2465813.06759, 2465842.63804, 2465872.25053, 2465901.90000, 2465931.56892, 2465961.22406, 2465990.83008, 2466020.36930, 2466049.85019, 2466079.29879, 2466108.74119, 2466138.18976, 2466167.64339, 2466197.10117, 2466226.57455, 2466256.08434, 2466285.64520, 2466315.25297, 2466344.88608, 2466374.51920, 2466404.13537, 2466433.72718, 2466463.28973, 2466492.81553, 2466522.29791, 2466551.73899, 2466581.15316, 2466610.56297, 2466639.99136, 2466669.45638, 2466698.97091, 2466728.54413, 2466758.17875, 2466787.86285, 2466817.56356, 2466847.23467, 2466876.83860, 2466906.36342, 2466935.81955, 2466965.22517, 2466994.59759, 2467023.95559, 2467053.32596, 2467082.74521, 2467112.25177, 2467141.86904, 2467171.58635, 2467201.35391, 2467231.10478, 2467260.78785, 2467290.38122, 2467319.88232, 2467349.29712, 2467378.64058, 2467407.94186, 2467437.24457, 2467466.59999, 2467496.05457, 2467525.63430, 2467555.33240, 2467585.10985, 2467614.90924, 2467644.67067, 2467674.34278, 2467703.89390, 2467733.32176, 2467762.65335, 2467791.93443, 2467821.21649, 2467850.54670, 2467879.96160, 2467909.48448, 2467939.12432, 2467968.87111, 2467998.68524, 2468028.49471, 2468058.21951, 2468087.81105, 2468117.26933, 2468146.62921, 2468175.93725, 2468205.23646, 2468234.56178, 2468263.94312, 2468293.40983, 2468322.98793, 2468352.68423, 2468382.46594, 2468412.26151, 2468441.99505, 2468471.62312, 2468501.14145, 2468530.56955, 2468559.93523, 2468589.26852, 2468618.60190, 2468647.97101, 2468677.41065, 2468706.94455, 2468736.57293, 2468766.26882, 2468795.98985, 2468825.69516, 2468855.35332, 2468884.94242, 2468914.45179, 2468943.88713, 2468973.27266, 2469002.64525, 2469032.04179, 2469061.48576, 2469090.98172, 2469120.52273, 2469150.10337, 2469179.72285, 2469209.37459, 2469239.03555, 2469268.67044, 2469298.25009, 2469327.76789, 2469357.24056, 2469386.69415, 2469416.14678, 2469445.60120, 2469475.05351, 2469504.50883, 2469533.98638, 2469563.50850, 2469593.08428, 2469622.70247, 2469652.33920, 2469681.97210, 2469711.58768, 2469741.17801, 2469770.73400, 2469800.24515, 2469829.70706, 2469859.12826, 2469888.52924, 2469917.93540, 2469947.36963, 2469976.84936, 2470006.38751, 2470035.99210, 2470065.66006, 2470095.36793, 2470125.07128, 2470154.72176, 2470184.29121, 2470213.77971, 2470243.20400, 2470272.58368, 2470301.93782, 2470331.29017, 2470360.67396, 2470390.12932, 2470419.69065, 2470449.36674, 2470479.12542, 2470508.90154, 2470538.62972, 2470568.27189, 2470597.81746, 2470627.26980, 2470656.64044, 2470685.95253, 2470715.24397, 2470744.56409, 2470773.96399, 2470803.48201, 2470833.12831, 2470862.87769, 2470892.67806, 2470922.46776, 2470952.18943, 2470981.80056, 2471011.28458, 2471040.65586, 2471069.95332, 2471099.22765, 2471128.52947, 2471157.90103, 2471187.37159, 2471216.95621, 2471246.65413, 2471276.44115, 2471306.26060, 2471336.03273, 2471365.69024, 2471395.20988, 2471424.61238, 2471453.94127, 2471483.24270, 2471512.55540, 2471541.91035, 2471571.33543, 2471600.85781, 2471630.49534, 2471660.23661, 2471690.02819, 2471719.79322, 2471749.47128, 2471779.04080, 2471808.51192, 2471837.90932, 2471867.26138, 2471896.59808, 2471925.95218, 2471955.35814, 2471984.84510, 2472014.42508, 2472044.08421, 2472073.78745, 2472103.49454, 2472133.17210, 2472162.79548, 2472192.34827, 2472221.82619, 2472251.24235, 2472280.62648, 2472310.01549, 2472339.43928, 2472368.91030, 2472398.42502, 2472427.97661, 2472457.56460, 2472487.19004, 2472516.84206, 2472546.49239, 2472576.10667, 2472605.66410, 2472635.16803, 2472664.63946, 2472694.10004, 2472723.55835, 2472753.01099, 2472782.45717, 2472811.91072, 2472841.39631, 2472870.93394, 2472900.52539, 2472930.15381, 2472959.79515, 2472989.43009, 2473019.04626, 2473048.63264, 2473078.17598, 2473107.66581, 2473137.10347, 2473166.50504, 2473195.89610, 2473225.30338, 2473254.74910, 2473284.25019, 2473313.81904, 2473343.46011, 2473373.16076, 2473402.88404, 2473432.57701, 2473462.19575, 2473491.72514, 2473521.17592, 2473550.56896, 2473579.92533, 2473609.26742, 2473638.62473, 2473668.03566, 2473697.54028, 2473727.16338, 2473756.89398, 2473786.67886, 2473816.44534, 2473846.13745, 2473875.73136, 2473905.22563, 2473934.62945, 2473963.96144, 2473993.25334, 2474022.55010, 2474051.90358, 2474081.36050, 2474110.94666, 2474140.65389, 2474170.44045, 2474200.24595, 2474230.00859, 2474259.67700, 2474289.22135, 2474318.64193, 2474347.96789, 2474377.24630, 2474406.52933, 2474435.86398, 2474465.28571, 2474494.81561, 2474524.46016, 2474554.20742, 2474584.01726, 2474613.81909, 2474643.53560, 2474673.12064, 2474702.57554, 2474731.93566, 2474761.24788, 2474790.55511, 2474819.89114, 2474849.28337, 2474878.75778, 2474908.33724, 2474938.02686, 2474967.79492, 2474997.57416, 2475027.29400, 2475056.91444, 2475086.43224, 2475115.86645, 2475145.24370, 2475174.59207, 2475203.94140, 2475233.32406, 2475262.77119, 2475292.30330, 2475321.91942, 2475351.59504, 2475381.29350, 2475410.98053, 2475440.62952, 2475470.22048, 2475499.74161, 2475529.19521, 2475558.60139, 2475587.99320, 2475617.40393, 2475646.85362, 2475676.34446, 2475705.86976, 2475735.42734, 2475765.02177, 2475794.65288, 2475824.30354, 2475853.94142, 2475883.53592, 2475913.07585, 2475942.57255, 2475972.04716, 2476001.51355, 2476030.97142, 2476060.41618, 2476089.85468, 2476119.30946, 2476148.80737, 2476178.36312, 2476207.97094, 2476237.61008, 2476267.25748, 2476296.89576, 2476326.51108, 2476356.08804, 2476385.61114, 2476415.07392, 2476444.48587, 2476473.87029, 2476503.25616, 2476532.67033, 2476562.13426, 2476591.66436, 2476621.27101, 2476650.95150, 2476680.67982, 2476710.40566, 2476740.07380, 2476769.65153, 2476799.13807, 2476828.55219, 2476857.91707, 2476887.25556, 2476916.59439, 2476945.96872, 2476975.42012, 2477004.98426, 2477034.67037, 2477064.44428, 2477094.23612, 2477123.97537, 2477153.62105, 2477183.16259, 2477212.60580, 2477241.96567, 2477271.26831, 2477300.55327, 2477329.87051, 2477359.27134, 2477388.79401, 2477418.44778, 2477448.20538, 2477478.01200, 2477507.80390, 2477537.52320, 2477567.12863, 2477596.60586, 2477625.97146, 2477655.26584, 2477684.54052, 2477713.84626, 2477743.22448, 2477772.70255, 2477802.29289, 2477831.99236, 2477861.77573, 2477891.58720, 2477921.34977, 2477950.99927, 2477980.51429, 2478009.91618, 2478039.24862, 2478068.55769, 2478097.88126, 2478127.24812, 2478156.68284, 2478186.20911, 2478215.84236, 2478245.57121, 2478275.34563, 2478305.09447, 2478334.76205, 2478364.32873, 2478393.80444, 2478423.21260, 2478452.57970, 2478481.93305, 2478511.30223, 2478540.71813, 2478570.20653, 2478599.77748, 2478629.41825, 2478659.09852, 2478688.78459, 2478718.44886, 2478748.06990, 2478777.63133, 2478807.12610, 2478836.56313, 2478865.96797, 2478895.37378, 2478924.80695, 2478954.27708, 2478983.77985, 2479013.31063, 2479042.87349, 2479072.47544, 2479102.11196, 2479131.75939, 2479161.38403, 2479190.96155, 2479220.48983, 2479249.98444, 2479279.46232, 2479308.92839, 2479338.37757, 2479367.81009, 2479397.24272, 2479426.70418, 2479456.21957, 2479485.79636, 2479515.42204, 2479545.07356, 2479574.72880, 2479604.37000, 2479633.97962, 2479663.53856, 2479693.03312, 2479722.46472, 2479751.85196, 2479781.22393, 2479810.61115, 2479840.03970, 2479869.53001, 2479899.09715, 2479928.74672, 2479958.46482, 2479988.21000, 2480017.92262, 2480047.55313, 2480077.08423, 2480106.52779, 2480135.90781, 2480165.24916, 2480194.57747, 2480223.92437, 2480253.32955, 2480282.83422, 2480312.46402, 2480342.20729, 2480372.00735, 2480401.78645, 2480431.48472, 2480461.07724, 2480490.56418, 2480519.95787, 2480549.28018, 2480578.56501, 2480607.85821, 2480637.21181, 2480666.67243, 2480696.26521, 2480725.98034, 2480755.77349, 2480785.58195, 2480815.34291, 2480845.00589, 2480874.54322, 2480903.95758, 2480933.27980, 2480962.55793, 2480991.84439, 2481021.18566, 2481050.61551, 2481080.15240, 2481109.80003, 2481139.54480, 2481169.34692, 2481199.13830, 2481228.84529, 2481258.42441, 2481287.87781, 2481317.24080, 2481346.56005, 2481375.87784, 2481405.22620, 2481434.62951, 2481464.11016, 2481493.68807, 2481523.36742, 2481553.11875, 2481582.88008, 2481612.58648, 2481642.20113, 2481671.72116, 2481701.16449, 2481730.55591, 2481759.92106, 2481789.28678, 2481818.68195, 2481848.13422, 2481877.66144, 2481907.26244, 2481936.91603, 2481966.59163, 2481996.26128, 2482025.90287, 2482055.49797, 2482085.03312, 2482114.50679, 2482143.93457, 2482173.34541, 2482202.76894, 2482232.22199, 2482261.70509, 2482291.21268, 2482320.74632, 2482350.31599, 2482379.92770, 2482409.56994, 2482439.21304, 2482468.82457, 2482498.38821, 2482527.90938, 2482557.40397, 2482586.88166, 2482616.33983, 2482645.77421, 2482675.19423, 2482704.62615, 2482734.10125, 2482763.63940, 2482793.23977, 2482822.88408, 2482852.54811, 2482882.20995, 2482911.84950, 2482941.44500, 2482970.97670, 2483000.43719, 2483029.83787, 2483059.20535, 2483088.57217, 2483117.96876, 2483147.41988, 2483176.94474, 2483206.55544, 2483236.24925, 2483265.99728, 2483295.74341, 2483325.42612, 2483355.00908, 2483384.49154, 2483413.89477, 2483443.24559, 2483472.57034, 2483501.89826, 2483531.26591, 2483560.71576, 2483590.28423, 2483619.98053, 2483649.76827, 2483679.57312, 2483709.32017, 2483738.96644, 2483768.50212, 2483797.93578, 2483827.28578, 2483856.58089, 2483885.86196, 2483915.17919, 2483944.58356, 2483974.11256, 2484003.77386, 2484033.53783, 2484063.34742, 2484093.13783, 2484122.85185, 2484152.45025, 2484181.92112, 2484211.28278, 2484240.57665, 2484269.85460, 2484299.16702, 2484328.55394, 2484358.04014, 2484387.63494, 2484417.33302, 2484447.10893, 2484476.90909, 2484506.66035, 2484536.30200, 2484565.81413, 2484595.21799, 2484624.55682, 2484653.87608, 2484683.21237, 2484712.59189, 2484742.03566, 2484771.56389, 2484801.19003, 2484830.90356, 2484860.65881, 2484890.39074, 2484920.04839, 2484949.61374, 2484979.09609, 2485008.51714, 2485037.90099, 2485067.27201, 2485096.65630, 2485126.08116, 2485155.56915, 2485185.12889, 2485214.74944, 2485244.40572, 2485274.07069, 2485303.72244, 2485333.34266, 2485362.91473, 2485392.42837, 2485421.88773, 2485451.31368, 2485480.73539, 2485510.17586, 2485539.64244, 2485569.13096, 2485598.63965, 2485628.17744, 2485657.75713, 2485687.38012, 2485717.02699, 2485746.66424, 2485776.26359, 2485805.81685, 2485835.33380, 2485864.82674, 2485894.29753, 2485923.74056, 2485953.15797, 2485982.56982, 2486012.00875, 2486041.50442, 2486071.06921, 2486100.69429, 2486130.35721, 2486160.03290, 2486189.69807, 2486219.32872, 2486248.90038, 2486278.39699, 2486307.82092, 2486337.19367, 2486366.54782, 2486395.91734, 2486425.33154, 2486454.81371, 2486484.38098, 2486514.03973, 2486543.77461, 2486573.53970, 2486603.26909, 2486632.90825, 2486662.43852, 2486691.87351, 2486721.24062, 2486750.56837, 2486779.88533, 2486809.22480, 2486838.62725, 2486868.13435, 2486897.77184, 2486927.52686, 2486957.33932, 2486987.12719, 2487016.82792, 2487046.41654, 2487075.89537, 2487105.27994, 2487134.59490, 2487163.87577, 2487193.16878, 2487222.52556, 2487251.99187, 2487281.59138, 2487311.31218, 2487341.10786, 2487370.91471, 2487400.67048, 2487430.32656, 2487459.85759, 2487489.26804, 2487518.58969, 2487547.87088, 2487577.16380, 2487606.51393, 2487635.95282, 2487665.49588, 2487695.14396, 2487724.88239, 2487754.67290, 2487784.45121, 2487814.14790, 2487843.72198, 2487873.17595, 2487902.54448, 2487931.87346, 2487961.20409, 2487990.56626, 2488019.98098, 2488049.46684};
|
|
|
|
latitude = lat;
|
|
longitude = lon;
|
|
epoch = unixtime;
|
|
timestamp = unixtime;
|
|
|
|
// take timestamp, convert it to year, month, day, decimal hour
|
|
tmp = gmtime(×tamp);
|
|
year = tmp->tm_year+1900;
|
|
month = tmp->tm_mon+1;
|
|
day = tmp->tm_mday;
|
|
hour = tmp->tm_hour;
|
|
minute = tmp->tm_min;
|
|
second = tmp->tm_sec;
|
|
hours = (double) hour + (double) minute / 60 + (double) second / 3600;
|
|
|
|
// set ephemeris path and flags
|
|
swe_set_ephe_path("lib");
|
|
iflag = SEFLG_SPEED;
|
|
ipl = SE_MOON;
|
|
rsmi = SE_CALC_RISE;
|
|
|
|
// set julian day and calculate ephemeris time
|
|
tjd_ts = epoch_to_jul(epoch);
|
|
te = tjd_ts + swe_deltat(tjd_ts);
|
|
|
|
// calculate geocentric ecliptic longitudes for planets
|
|
for (pl = SE_SUN; pl <= SE_SATURN; pl++) {
|
|
iflgret = swe_calc(te, pl, iflag, x2, serr);
|
|
planets[pl] = x2[0];
|
|
planets[pl+7] = x2[3];
|
|
}
|
|
|
|
// calculate house cusps, ascendant and mc
|
|
swe_houses_ex(tjd_ts, 0, latitude, longitude, 'P', data, datb);
|
|
planets[14] = datb[0]; // asc
|
|
planets[15] = datb[1]; // mc
|
|
|
|
// calculate moon phase
|
|
return_code = swe_pheno(te, SE_MOON, iflag, &moon, serr);
|
|
if (return_code == ERR) printf("%s\n", serr);
|
|
lunar[1] = moon[0];
|
|
lunar[2] = moon[1];
|
|
|
|
// calculate last New Moon from array data
|
|
for (nm = 0; nm <= 2474; nm++) {
|
|
if (newmoons[nm] > tjd_ts ) {
|
|
lastnew = newmoons[nm-1];
|
|
break;
|
|
}
|
|
}
|
|
|
|
// calculate lunar day counting moonrises from last new moon
|
|
while ( tjd_ts - lastnew > 29.530588853 ) lastnew += 29.530588853;
|
|
lunarday[0] = lastnew;
|
|
for (dl = 0; lunarday[0]+dl < lunarday[0]+29.530588853 && tjd_ts > lunarday[0]+dl; dl++) {
|
|
swe_rise_trans(lunarday[0]+dl, ipl, starname, iflag, rsmi, geopos, datm[0], datm[1], &lunarday[dl+1], serr);
|
|
lhour = dl+1;
|
|
}
|
|
lunar[0] = (double) lhour;
|
|
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* calculates sunrise and sunset times to determine planetary day and hour
|
|
*/
|
|
int * solar_moment(double lat, double lon, long unixtime, long *solar) {
|
|
|
|
long epoch = 0;
|
|
struct tm *tmp;
|
|
time_t timestamp = 0;
|
|
int32 year, month, day, hour, minute, second, iflag, pday = 0;
|
|
int ipl, rsmi, hourlength[3];
|
|
double hours, tjd, td;
|
|
double datm[2], geopos[3], lastset, lastrise, nextset, nextrise, onextrise, onextset;
|
|
char serr[AS_MAXCH], starname[255], pds[80];
|
|
|
|
datm[0] = 1013.25; // atmospheric pressure
|
|
datm[1] = 15; // atmospheric temperature;
|
|
|
|
// take timestamp, convert it to year, month, day, decimal hour
|
|
epoch = unixtime;
|
|
timestamp = unixtime;
|
|
tmp = gmtime(×tamp);
|
|
year = tmp->tm_year+1900;
|
|
month = tmp->tm_mon+1;
|
|
day = tmp->tm_mday;
|
|
hour = tmp->tm_hour;
|
|
minute = tmp->tm_min;
|
|
second = tmp->tm_sec;
|
|
hours = (double) hour + (double) minute / 60 + (double) second / 3600;
|
|
pday = tmp->tm_wday;
|
|
|
|
// prepare variables for rise and set calculations
|
|
geopos[0] = lon;
|
|
geopos[1] = lat;
|
|
geopos[2] = 0;
|
|
swe_set_topo(geopos[0], geopos[1], geopos[2]);
|
|
tjd = swe_julday(year,month,day,0.0,SE_GREG_CAL);
|
|
|
|
if ( lon > 70.0 ) tjd = tjd - 1;
|
|
|
|
// calculate sunrise and sunset of the day and the days before and after tomorrow
|
|
ipl = SE_SUN;
|
|
|
|
// next rise and set
|
|
swe_rise_trans(tjd, ipl, starname, iflag, SE_CALC_RISE, geopos, datm[0], datm[1], &nextrise, serr);
|
|
swe_rise_trans(tjd, ipl, starname, iflag, SE_CALC_SET, geopos, datm[0], datm[1], &nextset, serr);
|
|
|
|
// previous rise and set
|
|
swe_rise_trans(tjd-1, ipl, starname, iflag, SE_CALC_RISE, geopos, datm[0], datm[1], &lastrise, serr);
|
|
swe_rise_trans(tjd-1, ipl, starname, iflag, SE_CALC_SET, geopos, datm[0], datm[1], &lastset, serr);
|
|
|
|
// next rise after next rise
|
|
swe_rise_trans(tjd+1, ipl, starname, iflag, SE_CALC_RISE, geopos, datm[0], datm[1], &onextrise, serr);
|
|
swe_rise_trans(tjd+1, ipl, starname, iflag, SE_CALC_SET, geopos, datm[0], datm[1], &onextset, serr);
|
|
|
|
|
|
if ( nextset < nextrise ) {
|
|
lastset = nextset;
|
|
nextset = onextset;
|
|
}
|
|
|
|
hourlength[0] = (jul_to_epoch(nextrise) - jul_to_epoch(lastset)) / 12; // length of night hours yesterday
|
|
hourlength[1] = (jul_to_epoch(nextset) - jul_to_epoch(nextrise)) / 12; // length of day hours today
|
|
hourlength[2] = (jul_to_epoch(onextrise) - jul_to_epoch(nextset)) / 12; // length of night hours today
|
|
|
|
// calculate planetary hour
|
|
solar[0] = jul_to_epoch(lastset); // set yesterday
|
|
solar[1] = jul_to_epoch(nextrise); // rise today
|
|
solar[2] = jul_to_epoch(nextset); // set today
|
|
solar[3] = jul_to_epoch(onextrise); // rise tomorrow
|
|
solar[4] = hourlength[0]; // night hour length yesterday
|
|
solar[5] = hourlength[1]; // day hour length today
|
|
solar[6] = hourlength[2]; // night hour length today
|
|
solar[7] = pday; // planetary day
|
|
|
|
return 0;
|
|
}
|
|
|
|
/**
|
|
* calculates JSON Ephemeris Object
|
|
*/
|
|
const char * pmom(int days, long epoch, double latitude, double longitude, int buflen) // days, timestamp, latitude, longitude
|
|
{
|
|
long queryday;
|
|
struct tm *tmp;
|
|
time_t timestamp = 0;
|
|
int32 year, month, day, hour, minute, second, j, h, m, interval, start, hm, time[6];
|
|
double hours;
|
|
long solar[9] = {0};
|
|
double lunar[3] = {0.0}, planet[16] = {0.0};
|
|
char* Buffer = malloc(buflen);
|
|
int length = 0;
|
|
|
|
timestamp = epoch;
|
|
|
|
// take timestamp, convert it to year, month, day, decimal hour
|
|
tmp = gmtime(×tamp);
|
|
year = tmp->tm_year+1900;
|
|
month = tmp->tm_mon+1;
|
|
day = tmp->tm_mday;
|
|
hour = tmp->tm_hour;
|
|
minute = tmp->tm_min;
|
|
second = tmp->tm_sec;
|
|
hours = (double) hour + (double) minute / 60 + (double) second / 3600;
|
|
|
|
// start of Almanac
|
|
queryday = time_to_epoch(year, month, day, 0, 0, 0);
|
|
j = 0;
|
|
length += snprintf(Buffer+length, buflen-length, "{ \"query\":[");
|
|
|
|
// calculate all hours for all days
|
|
while ( j <= days ) {
|
|
solar_moment(latitude, longitude, queryday, solar);
|
|
h = interval = start = m = 0;
|
|
while ( h < 24 ) {
|
|
if ( h < 12 ) {
|
|
interval = solar[5];
|
|
start = solar[1];
|
|
m = h;
|
|
} else {
|
|
interval = solar[6];
|
|
start = solar[2];
|
|
m = h - 12;
|
|
}
|
|
hm = start + m * interval;
|
|
|
|
planetary_moment(latitude, longitude, hm, lunar, planet);
|
|
|
|
length += snprintf(Buffer+length, buflen-length, "{ \"ts\": %d, \"lunar\": { \"day\": %d, \"angle\": %f, \"phase\": %f }, \"planetary\": { \"day\": { \"no\": %d, \"start\": %d, \"end\": %d }, \"night\": { \"start\": %d, \"end\": %d }, \"hour\": { \"no\": %d, \"start\": %d, \"end\": %d, \"length\": { \"day\": %d, \"night\": %d } } }, \"ephemeris\": { \"sun\": { \"deg\": %f, \"speed\": %f }, \"moon\": { \"deg\": %f, \"speed\": %f }, \"mercury\": { \"deg\": %f, \"speed\": %f }, \"venus\": { \"deg\": %f, \"speed\": %f }, \"mars\": { \"deg\": %f, \"speed\": %f }, \"jupiter\": { \"deg\": %f, \"speed\": %f }, \"saturn\": { \"deg\": %f, \"speed\": %f }, \"asc\": { \"deg\": %f }, \"mc\": { \"deg\": %f } } }", hm, (int) lunar[0], lunar[1], lunar[2], solar[7], solar[1], solar[2]-1, solar[2], solar[3]-1, h, hm, hm+interval-1, solar[5], solar[6], planet[0], planet[7], planet[1], planet[8], planet[2], planet[9], planet[3], planet[10], planet[4], planet[11], planet[5], planet[12], planet[6], planet[13], planet[14], planet[15] );
|
|
|
|
//length += snprintf(Buffer+length, buflen-length, "%d setyes %d risetod %d settod %d risetom %d nhly %d dhlt %d nhlt %d pday %d\n", hm, solar[0], solar[1], solar[2], solar[3], solar[4], solar[5], solar[6], solar[7]);
|
|
|
|
|
|
if(j == days && h == 23) length += snprintf(Buffer+length, buflen-length, "");
|
|
else length += snprintf(Buffer+length, buflen-length, ", ");
|
|
|
|
h++;
|
|
}
|
|
queryday += 86400;
|
|
j++;
|
|
#if USECASE == OFFLINE
|
|
EM_ASM_({
|
|
NProgress.set($0/$1);
|
|
}, j, days*2);
|
|
#endif
|
|
};
|
|
length += snprintf(Buffer+length, buflen-length, "]}");
|
|
return Buffer;
|
|
}
|
|
|
|
#if USECASE == ONLINE
|
|
int main(int argc,char* argv[]) // days, timestamp, latitude, longitude
|
|
{
|
|
double latitude = 0.0;
|
|
double longitude = 0.0;
|
|
long epoch = 0;
|
|
time_t timestamp = 0;
|
|
int32 days = 1, buflen;
|
|
|
|
// read and assign commandline arguments
|
|
if ( argc > 1 ) {
|
|
days = atof(argv[1]);
|
|
}
|
|
if ( argc > 3 ) {
|
|
latitude = atof(argv[3]);
|
|
longitude = atof(argv[4]);
|
|
}
|
|
if ( argc > 2 ) {
|
|
sscanf(argv[2], "%lu", &epoch);
|
|
timestamp = epoch;
|
|
}
|
|
else {
|
|
time(×tamp);
|
|
epoch = (int) timestamp;
|
|
}
|
|
|
|
timestamp = epoch;
|
|
buflen = days * 100000;
|
|
printf(pmom( days, epoch, latitude, longitude, buflen));
|
|
|
|
}
|
|
#endif
|
|
|
|
#if USECASE == OFFLINE
|
|
EMSCRIPTEN_KEEPALIVE
|
|
const char * get(int days, long epoch, double latitude, double longitude) // days, timestamp, latitude, longitude
|
|
{
|
|
time_t timestamp = 0;
|
|
int32 buflen;
|
|
|
|
timestamp = epoch;
|
|
buflen = days * 100000;
|
|
return pmom( days, epoch, latitude, longitude, buflen);
|
|
}
|
|
#endif
|