nautic-1.5/0000755000175000017500000000000012041100330012502 5ustar moellermoellernautic-1.5/spa.h0000644000175000017500000001603111556005075013463 0ustar moellermoeller ///////////////////////////////////////////// //HEADER FILE for SPA.C // // // //Solar Position Algorithm (SPA) // //for Solar Radiation Application // // // //May 12, 2003 // // // //Filename: SPA.H // //Afshin Michael Andreas // //afshin_andreas@nrel.gov (303)384-6383 // // //Measurement & Instrumentation Team //Solar Radiation Research Laboratory // //National Renewable Energy Laboratory // //1617 Cole Blvd, Golden, CO 80401 // ///////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // // // Usage: // // // //1) In calling program, include this header file, // //by adding this line to the top of file: // //#include "spa.h" //2) In calling program, declare the SPA structure: // //spa_data spa; // // //3) Enter the required input values into SPA structure // //(input values listed in comments below) // // // //4) Call the SPA calculate function and pass the SPA structure // //(prototype is declared at the end of this header file): // //spa_calculate(&spa); // // // //Selected output values (listed in comments below) will be // //computed and returned in the passed SPA structure. Output ////will based on function code selected from enumeration below. // //// //Note: A non-zero return code from spa_calculate() indicates that // //one of the input values did not pass simple bounds tests. // //The valid input ranges and return error codes are also ///listed below. // //////////////////////////////////////////////////////////////////////// #ifndef __solar_position_algorithm_header #define __solar_position_algorithm_header #define PI 3.141592653589793238462643 //enumeration for function codes to select desired final outputs from SPA enum { SPA_ZA,//calculate zenith and azimuth SPA_ZA_INC,//calculate zenith, azimuth, and incidence SPA_ZA_RTS,//calculate zenith, azimuth, and sun rise/transit/set values SPA_ALL,//calculate all SPA output values }; typedef struct { //----------------------INPUT VALUES------------------------ int year; //4-digit year,valid range: -2000 to 6000, error code: 1 int month; //2-digit month,valid range: 1 to 12, error code: 2 int day; //2-digit day, valid range: 1 to 31, error code: 3 int hour; //Observer local hour, valid range: 0 to 24, error code: 4 int minute; //Observer local minute, valid range: 0 to 59, error code: 5 int second; //Observer local second, valid range: 0 to 59, error code: 6 double delta_t; //Difference between earth rotation time and terrestrial time // It is derived from observation only and is reported in this // bulletin: http://maia.usno.navy.mil/ser7/ser7.dat, // where delta_t = 32.184 + (TAI-UTC) + DUT1 // valid range: -8000 to 8000 seconds, error code: 7 double timezone;// Observer time zone (negative west of Greenwich) // valid range: -12 to 12 hours,error code: 8 double longitude;// Observer longitude (negative west of Greenwich) valid range: -180 to 180 degrees, error code: 9 double latitude; // Observer latitude (negative south of equator) valid range: -90 //to 90 degrees, error code: 10 double elevation; //Observer elevation [meters] valid range: -6500000 or higher meters,error code: 11 double pressure; //Annual average local pressure [millibars] //valid range:0 to 5000 millibars, error code: 12 double temperature; //Annual average local temperature [degrees Celsius] //valid range: -273 to 6000 degrees Celsius, error code; 13 double slope; //Surface slope (measured from the horizontal plane) //valid range: -360 to 360 degrees, error code: 14 double azm_rotation; //Surface azimuth rotation (measured from south to projection of //surface normal on horizontal plane, negative west) //valid range: -360 to 360 degrees, error code: 15 double atmos_refract;//Atmospheric refraction at sunrise and sunset (0.5667 deg is typical) //valid range: -5 to 5 degrees, error code: 16 int function; //Switch to choose functions for desired output (from enumeration) //-----------------Intermediate OUTPUT VALUES-------------------- double jd;//Julian day double jc;//Julian century double jde;//Julian ephemeris day double jce;//Julian ephemeris century double jme;//Julian ephemeris millennium double l;//earth heliocentric longitude [degrees] double b;//earth heliocentric latitude [degrees] double r;//earth radius vector [Astronomical Units, AU] double theta;//geocentric longitude [degrees] double beta;//geocentric latitude [degrees] double x0;//mean elongation (moon-sun) [degrees] double x1;//mean anomaly (sun) [degrees] double x2;//mean anomaly (moon) [degrees] double x3;//argument latitude (moon) [degrees] double x4;//ascending longitude (moon) [degrees] double del_psi;//nutation longitude [degrees] double del_epsilon;//nutation obliquity [degrees] double epsilon0;//ecliptic mean obliquity [arc seconds] double epsilon;//ecliptic true obliquity [degrees] double del_tau;//aberration correction [degrees] double lamda;//apparent sun longitude [degrees] double nu0;//Greenwich mean sidereal time [degrees] double nu;//Greenwich sidereal time [degrees] double alpha;//geocentric sun right ascension [degrees] double delta;//geocentric sun declination [degrees] double h;//observer hour angle [degrees] double xi;//sun equatorial horizontal parallax [degrees] double del_alpha;//sun right ascension parallax [degrees] double delta_prime;//topocentric sun declination [degrees] double alpha_prime;//topocentric sun right ascension [degrees] double h_prime;//topocentric local hour angle [degrees] double e0;//topocentric elevation angle (uncorrected) [degrees] double del_e;//atmospheric refraction correction [degrees] double e;//topocentric elevation angle (corrected) [degrees] double eot;//equation of time [minutes] double srha;//sunrise hour angle [degrees] double ssha;//sunset hour angle [degrees] double sta;//sun transit altitude [degrees] //---------------------Final OUTPUT VALUES------------------------ double zenith;//topocentric zenith angle [degrees] double azimuth180;//topocentric azimuth angle (westward from south) [-180 to 180 degrees] double azimuth;//topocentric azimuth angle (eastward from north) [0 to 360 degrees] double incidence;//surface incidence angle [degrees] double suntransit;//local sun transit time (or solar noon) [fractional hour] double sunrise;//local sunrise time (+/- 30 seconds) [fractional hour] double sunset;//local sunset time (+/- 30 seconds) [fractional hour] } spa_data; //Calculate SPA output values (in structure) based on input values passed in structure int spa_calculate(spa_data *spa); void calculate_geocentric_sun_right_ascension_and_declination(spa_data *spa); double julian_day (int year, int month, int day, int hour, int minute, int second, double tz); double julian_century(double jd); double julian_ephemeris_millennium(double jce); double julian_ephemeris_century(double jde); double ecliptic_mean_obliquity(double jme); double ecliptic_true_obliquity(double delta_epsilon, double epsilon0); #endif nautic-1.5/fund_args.h0000644000175000017500000000260611556005075014653 0ustar moellermoeller/* * fund_args.c - Implementation of fundamental planetary/lunisolar arguments * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * Reference : US Naval Observatory Circular 179 (2005) * */ #ifndef _FUND_ARGS_H_ #define _FUND_ARGS_H_ enum fund_argument { ARG_LONGITUDE_MERCURY = 0, ARG_LONGITUDE_VENUS , ARG_LONGITUDE_EARTH, ARG_LONGITUDE_MARS, ARG_LONGITUDE_JUPITER, ARG_LONGITUDE_SATURN, ARG_LONGITUDE_URANUS, ARG_LONGITUDE_NEPTUNE, ARG_PRECESSION, ARG_ANOMALY_MOON, ARG_ANOMALY_SUN, ARG_LATITUDE_MOON, ARG_ELONGATION_MOON, ARG_LONGITUDE_NODE, ARG_LONGITUDE_MOON }; double fundamental_argument(enum fund_argument arg, double t); #endif nautic-1.5/icon/0000755000175000017500000000000011750006215013447 5ustar moellermoellernautic-1.5/icon/Makefile.am0000644000175000017500000000006411554101241015500 0ustar moellermoellericonsdir = $(datadir)/pixmaps icons_DATA = sext.xpm nautic-1.5/icon/sext.xpm0000644000175000017500000001435111554101241015161 0ustar moellermoeller/* XPM */ static char *sext__[] = { /* columns rows colors chars-per-pixel */ "32 32 256 2", " c #050100", ". c #141619", "X c #523412", "o c #4E3E32", "O c #6B4D1D", "+ c #794B23", "@ c #454F7D", "# c #4E5966", "$ c #705E62", "% c #7F777D", "& c #636D78", "* c #9A4F11", "= c #804E26", "- c #8B622E", "; c #8F7032", ": c #A46F3F", "> c #D47F1E", ", c #D7610A", "< c #E27C1E", "1 c #D57F33", "2 c #C1782F", "3 c #E17C21", "4 c #B87A4A", "5 c #987566", "6 c #867679", "7 c #BF8F3F", "8 c #AC883D", "9 c #E6821C", "0 c #CD8329", "q c #D88529", "w c #DE912D", "e c #CD8B3E", "r c #D78E35", "t c #D4933C", "y c #E48725", "u c #E08D2A", "i c #E19939", "p c #EE9C38", "a c #E89732", "s c #F39B2A", "d c #ECA434", "f c #E8A23C", "g c #F3A234", "h c #F1A43B", "j c #F3AC3D", "k c #F9B43E", "l c #BD8C51", "z c #BD9E50", "x c #B38D45", "c c #A68866", "v c #A88A72", "b c #B99B7D", "n c #C48449", "m c #CF9044", "M c #DA9B45", "N c #CA9450", "B c #DF9F51", "V c #CFA549", "C c #CCA35B", "Z c #DFA555", "A c #DAAA49", "S c #E7AA47", "D c #FCB542", "F c #F5B94B", "G c #F7B548", "H c #E2A753", "J c #E4A95F", "K c #E7BA57", "L c #F5BF52", "P c #C5A46F", "I c #D6AB65", "U c #C8AC7E", "Y c #DDAF73", "T c #D6B87A", "R c #E1B464", "E c #E9B76B", "W c #F1BF74", "Q c #FFC24E", "! c #EAC25F", "~ c #FAC553", "^ c #F3C45B", "/ c #FCC459", "( c #FDC95A", ") c #F9C657", "_ c #EAC768", "` c #FCC464", "' c #F3CD65", "] c #F9CB63", "[ c #F5C869", "{ c #F6D166", "} c #FDD364", "| c #FCDA6F", " . c #F6D46B", ".. c #F2C674", "X. c #EED672", "o. c #FAD374", "O. c #F6DC73", "+. c #FBDC74", "@. c #F6D679", "#. c #EDC579", "$. c #FEE275", "%. c #FDE67A", "&. c #FDE97D", "*. c #224D9F", "=. c #27509F", "-. c #38579F", ";. c #364881", ":. c #2651A2", ">. c #2A54A3", ",. c #2D5BAB", "<. c #325AA5", "1. c #325EAA", "2. c #315FB0", "3. c #3361AE", "4. c #3E66AD", "5. c #2F62B1", "6. c #3463B1", "7. c #3669B6", "8. c #3A6BB9", "9. c #3B6AB5", "0. c #3B70BD", "q. c #727E8E", "w. c #4B6CAE", "e. c #4668AA", "r. c #426EB9", "t. c #4371BB", "y. c #4973BA", "u. c #4B75B8", "i. c #5679B6", "p. c #5B79B4", "a. c #5477B8", "s. c #547AB9", "d. c #3D74C0", "f. c #4576C2", "g. c #4479C3", "h. c #4D7DC5", "j. c #457EC9", "k. c #4E7FC8", "l. c #537CC4", "z. c #867882", "x. c #6887BF", "c. c #7F85A7", "v. c #4B81C9", "b. c #4980C7", "n. c #5C86C4", "m. c #5284C9", "M. c #5C8BCD", "N. c #5889CB", "B. c #5687D2", "V. c #5E90DE", "C. c #5E90D2", "Z. c #6D8DC3", "A. c #628DCB", "S. c #698DC7", "D. c #6C92C9", "F. c #7391C4", "G. c #7C9ACB", "H. c #6594D2", "J. c #6B99D9", "K. c #749CD4", "L. c #789AD3", "P. c #759DDA", "I. c #7BA0D6", "U. c #7CA5DC", "Y. c #75A3DB", "T. c #4F8CEC", "R. c #538DE8", "E. c #5C95EC", "W. c #5691EB", "Q. c #639AEC", "!. c #669AE7", "~. c #739EE2", "^. c #6A9FF0", "/. c #6CA0EC", "(. c #73A6EF", "). c #7AAAEF", "_. c #7CA7E2", "`. c #7CABF1", "'. c #75A6F0", "]. c #999B9D", "[. c #998988", "{. c #BC9E83", "}. c #AB9D95", "|. c #AE9B84", " X c #B6A48D", ".X c #8A99AB", "XX c #92A3BE", "oX c #A4A6BA", "OX c #C4AA84", "+X c #C7AA87", "@X c #D8BC85", "#X c #C3B3AC", "$X c #E9CF81", "%X c #FDDC84", "&X c #FDED83", "*X c #FAE599", "=X c #E3DBA2", "-X c #829BC8", ";X c #89A3CA", ":X c #96ABCA", ">X c #85AADB", ",X c #8CADDB", ".>.3.w.K.UXUXUXUXUXUXUXUXUXUX", "UXUXUXlXlXnX9XY.cXZXBXxXdXY.M.h.8.,.>.=.-.A.yXUXUXUXUXUXUXUXUXUX", "UXUXnXvXlXnXbXdXXpXMXAXHXHXSXSXGXmXB W s a D ].T.R.(.9XUXUXUXUXUXUX", "X>X,XcXvXoXJ s 9 q q M ^ ^ *X{ j F UXUXUXUXUX", "UXG.a.r.J.l.8.h.N.A.S.7XvXiXc.i g < y D r H *X+.~ d UXUXUXUXUXUX", "UX-Xx.l.`.).f.2.r.y.y.7XiX2Xv h ` h 2 S S v U ~ f UXUXUXUXUXUXUX", "UX1XF.D.`.(.~.2.,.2.<.l.L.{.D ` *X) % N F 6 5 w 0 UXUXUXUXUXUXUX", "UXUX-XZ.P.`.^.V.2.*.*.*.@ J D a p R p.5 ( c z.4 S ) UXUXUXUXUXUX", "UXUX3X-XZ.~.tX'.!.<.>.=.;.m D y , 4 B.% ` U >X|.H @.{ UXUXUXUXUX", "UXUXUX3X-XL.tX`.~.w.w.e.-.$ i g 3 1 b v #._ T ' ^ E +.UXUXUXUXUX", "UXUXUXUX:X1XrXyXL.p.p.p.w.-.5 G p a D ( %X} ( ^ UX2 E $.UXUXUXUX", "UXUXUXUXUX:XpXjX w #.&X&.O.", "UXUXUXUXUXUXUXUXUXUX. o Z ~ / L O UXUXUXM .UXUXUXK ' M X.&XO.", "UXUXUXUXUXUXUXUXUXUXUX+ W ( ~ ( ! V 8 ; UXe ' ! ! O.%.&XK r X.UX", "UXUXUXUXUXUXUXUXUXUXUXUXn E ] } ( } } } } .| $.&.&.&.O.n * UXUX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXn I _ o.| $.$.$.%.%.$._ z UXUXUXUXUX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX= : l C I I C x - X UXUXUXUXUXUX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX" }; nautic-1.5/plant.h0000644000175000017500000102413511556005075014023 0ustar moellermoeller /* plant.h planet structures derived from Shiva Iyer Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef PLANT_H #define PLANT_H #define NARGS 18 struct plantbl { char maxargs; char max_harmonic[NARGS]; char max_power_of_t; char *arg_tbl; void *lon_tbl; void *lat_tbl; void *rad_tbl; double distance; double timescale; double trunclvl; }; static long tabl[] = { -242809, -178223, -6154, -6547, 15526, -79460, 66185, -19531, -12754, 4389, 3153, -1151, 768, 1750, -248, 657, -80, 0, -4, -29, -3020, 301, -360, 412, -1463, 2266, -41, 30, -39868, -14275, -25052, 1583, 15695, 10018, -113, -122, -243, 18, -33, 31, -134, -171, 243, -115, 18, 148, -120, -129, 19, -220, -30, 19, 8, 23, -162, -124, 189, -315, 73, 77, 32006, -11295, 11595, 5629, -838, 1728, 0, 4, 38, 15, 142, -228, 92, 32, -2274, -1500, -2277, 3143, 3204, 127, -20, -11, 5186, 1054, 996, 1769, -231, 163, -88, -19, -2, -145, -27, 48, -8, 421, -7, 148, -16, -2, -3964, 4259, -11192, -8385, 11513, -13415, 103, -43, -289, -79, -29, 163, -117, 559, -190, -15, 7108, 5345, 12933, -7709, 3485, -26023, 11, -5, 311, 78, 22, 76, 2846, -3922, 2329, 43, 34, 442, 3, -245, -5, -3, -17, 5, 318, 15963, 2520, 7115, 2548, -9836, -7063, 1950, -4471, -8326, 4964, -3101, 563, -80, -1444, -472, 8, -22, 1558, -88, 235, 359, 293, -16, 144, 209, -13, -7, 812, -744, 150, -740, -2569, -956, 69, -2475, 1009, -55, -1707, -2525, 1071, -1761, 550, 279, -14, 36, -10442, 3344, -6759, -21551, 24737, -434, 504, -385, 191, 96, -2760, -1068, 85, -2617, 1062, -43, 192, -16, 30, 42, -2446, 588, -1522, -2933, 1746, -1070, 511, -1401, 139, 729, -12, 29, -2618, -2076, 2079, -3711, -21, -2727, -80, -19, 113, 2420, 325, 1058, 379, -1478, 296, -251, -265, -409, -10, 20, 15, -15, 11, 143, -83, 19, 266, -17, 40, 59, 19, -105, 5, 48331, 21, -16, -97, -318, 158, -171, 456, -351, 168, 85, 12, -2, 20, -15, 15, 2, 385, -1125, 521, -23, -815, -2088, 1644, -1329, 7, 14, -582, 234, -67, -467, -167, -51, -684, -2302, 1315, -797, 6, -70, -118, -406, 67, -63, -4848, 3713, -8483, -8776, 13049, -9404, -23, 34, -12, 1, -24, -10, -21, 0, -1, 24, -3, 28, -3032, -2494, 2498, -4342, -6538, 1899, -4414, -13249, 15540, -292, -228, 176, -40, -161, -20, -36, -800, -172, -36, -208, -249, -374, -1410, -72118, -745, 213, -23, 196, -14, -2, -239, -341, 1015, -291, 33, -94, 90, -20431, 4, -39, 75, 216, -23, 41, 116, 24, 5, 26, -45, -4178, -9, -23, 12, 18, 68, -2, 36, -19, 42, -8, 6, -106, 4, -38, -73, 259, 107, -293, -12, -44, 37, 13, 73, -46, 17, 8, 5832, 1989, -1404, 4469, -1619, -743, -1796, -2206, 461, -291, 153, 1104, 19195, 652503, 5587, -5252787, 47, -17340051, -32, 68926621, 1054, -230, -1601, 356, -562, -998, 124, -446, -171, 66, 26, 60, -7, 0, -88, -43, 65, -400, 4, 183, -1014, 2043, -1076, 126, -41, -205, -127, -85, -15, 68, 0, 0, -320, 75, -42, 285, -303, 771, 616, 400, -470, 48, -76, -103, -190, -11, -139, -5, -48, -87, -22, -362, -271, 1233, -392, 353, -154, -71, -109, 112, 17, 8, 1, -17, -170, 623, -279, 21, 139, -151, -107, -55199, 588, -188, 397, 674, -406, 269, 166, -207, 585, 333, -386, 754, 29, -65, 35, 10, 63, 1291, 62, 8, 239, 1323, -1434, 53, 19, -1, 34, 82, -15, -16, 265, -338, -729, -207, 3, 17, 697, 399, 274, 760, -12, 2, -48, -9, 3, 64, 147, 36, 9, 46, 77, 144, -76, 65, 2329, 1763, 987, 5506, 66, -123, -41, -24, -12, 1, -19, 94, 19, 8, -1, -18, 142, 77, -78, 187, 6, 18, 607, 163, 17, 158, 27, -208, 154, 27317, 587, -143, 22, -153, 5, -34, 75, 330, 98, -128, -67, -6542, -115, -236, 217, -12, 10, -6, -250, 653, 1611, -209, 4, 1072, -129, 216, 402, 81, 117, 11, 0, 20, 24, -28, 245, 437, -16, 59, 527952, -74895, 169682, 177186, -376, -362869, -60, 719658, -151, -382, -22, -43, 5, -5, 14, 5, -9, 13, 83, 296, -369, -1, -14, -6, 42, 8, -31, 7, -354, 634, 1132, 243, -38, 42, -14, 68, -6, 31, -36, -13, 7, -2104, 16, 67, 9, -4, 174, 144, 58, 438, -15, 5, -16, 19, -135, 1642, -140, -11, -4, 27, 253, -382, -651, -221, 11, 1, -12, -6, 136, 23, -1, 43, 3, 38, -26, -5, 17864, -4244, 5704, 7754, -36, -7891, -3, 10418, 2, -844, -1, 126, -7, 32, -67, -5, 39, 10, 5, 52, -13, 159, -49, -21, 1, -394, 7, -15, -4, -245, 1, 172, -36, -3, 13, 5, 0, 1, -1, 0, 0, -202, -2, 19, -20, -2, 5, 3, 0, -110, -12, -1, 0, -62, 0, -36, 0, -22, -13, 3, }; static long tabb[] = { -428091, -488399, 746850, 6, 210, -93, 32, 1, -365, 332, -105, 76, -7, 2, -8, 14, -1, 2, 0, 0, -65, 12, -17, 7, -1, 1, 0, 0, -15, 65, -4, 26, -2, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, -1, -3, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, -1, 0, -30, 28, -6, 10, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, -16, 20, -6, -41, -9, -3, 0, 0, -6, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -96, 33, -12, 228, -23, -21, 0, 0, -12, -2, -4, 4, -1, 0, 1, 0, -329, -22, -34, -726, -147, -21, 0, 0, -2, 4, -1, 0, 2, -7, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 36, 88, -162, -19, -11, 21, 31, 37, -31, 53, -5, -15, -3, -11, 9, 3, 0, 0, -2, 0, 1, 0, 2, -1, 0, 0, 0, 0, -162, -102, -37, 30, 19, 23, -18, 9, 1, -6, -6, 22, -2, 3, 1, -2, 0, -1, 26, -25, 66, 52, -641, -153, -13, -9, 2, -3, -29, 8, -6, -2, 0, -6, 2, -4, 1, 0, -26, -11, -1, -10, -6, -13, 66, -1337, -879, -207, 1, -1, 8, -30, -24, -18, -16, 1, 9, 1, -24, -8, 9, -17, -13, 75, 19, -8, -29, 24, 0, 0, -1, 1, -25, 36, -7, -22, 0, -3, 1, -1, 187, -46, -6, 74, 5, -10, -5, -4, -16, 10, -5, -5, 2, -4, 5, -2, -2, 1, -1, 0, -16, -12, 1, -13, -17, -111, -186, 73, -1, -2, -277, -77, -27, 106, 16, 5, -12, -15, -13, -30, -1, 1, 0, 36, -10, 4, 607, 262, 533, -1530, -1630, 304, 8, -6, 1, 1, 0, -1, 5, -2, 0, -1, -1, -4, -44, -22, -64, -46, 537, 430, 268, -1553, -2040, -486, -3, -23, 20, 41, -1, 2, -21, -4, -1, -3, -84, 50, -177, 26, 5, -12, 2, -4, 7, 1, -115, -305, -310, 138, -186, 246, -96, 17, 0, 0, 4, -2, 1, 1, -3, 2, -1, 0, -15, 68, 0, 2, -3, 0, -5, 0, -1, 1, -5, 6, 0, 0, 0, 0, -235, -98, -2, 2, 9, -40, -1, -2, -33, -9, -5, -4, 5662, -3849, 1941, -124, 210, 160, -24721, -72945, 4099, -21914, 1345, -555, 23637393, -5516830, 17737677, 43330654, -44668315, 14540723, -824, -2086, -4423, -41801, 5562, -11664, 960, -125, 2001, -149, 587, -350, 23, -52, -3, 3, -248, -148, -40, 86, 2, 0, 21, -82, 11, 8, -8, 0, -30, -33, -22, 46, 0, -191, -168, -135, 27, -85, 14, 232, 217, 59, 5, 12, -5, 2, -24, -26, -52, 13, -3, 18, 26, 45, 32, -169, 14, -6, -3, 4, -5, 2, 6, 2, -2, 3, 20, -15, 0, 10, -486, -8, 4, -114, 102, -188, 23, -67, 6, 12, -43, -1, -32, 2, 15, 9, 16, -36, -6, -2, 14, -5, 17, -15, -28, 307, 289, 69, 2, -7, 3, -1, -1, 1, -16, -811, 287, -68, 0, 0, 0, -1, 16, -7, 0, 0, 0, 2, 0, 0, 0, -1, 1, 0, -3, -4, 2, 3, -29, 34, 59, -15, -3, -3, -1, 0, -2, -3, 3, -19, 0, 0, 0, 0, -15, 1, 5, 2, 0, 0, -1, -5, 0, -1, -120, 84, 7, -30, -7, -3, -1, 0, 0, -1, 9, -6, -186, -11, 13, -57, 1, 4, 1, -1, 0, 0, -5, 796, 46, 5, -1, -6, -10, 228, 5, -6, 1, -5, 0, 0, -6, -2, 148, 137, 10, 28, 430546, -279834, 488902, 664558, -746515, 243112, -39, -37, -13, -174, 6, -25, 2, -3, -4, -2, 0, 4, -5, 70, 82, 20, 0, 1, 1, 1, 0, 1, -27, 430, 226, -53, 1, 1, 0, 1, 1, -7, 2, 1, -3, -8, 1, 0, -1, 12, -2, -5, 4, 0, 0, 1, 1, 1, 1, 9, 33, 4, 0, 0, 0, -321, 4, 1, 0, 0, 1, 0, 106, -22, 0, 0, 4, 0, 0, 2, 7006, -9443, 12833, 11137, -14037, 4575, -2, 0, -1, -6, 1, 1, 4, 6, 16, 2, 55, -10, 1, 0, 0, 1, 0, 2, 0, -4, -2, 0, -351, 24, 0, 0, 8, 1, 30, -5, -12, 10, -4, 1, -1, -2, 0, 0, 4, 0, 17, -3, 0, -2, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0, }; static long tabr[] = { 14575, -26192, -144864, 2, -22, 15, -8, -21, -148, -104, -14, -75, 15, 2, -5, -3, -1, 0, 0, 0, 0, 21, -2, 7, -5, -3, 0, 0, 83, -94, 9, -67, -29, 50, 1, -1, 3, 2, 0, 0, 4, 3, 1, 1, -1, -1, 0, -1, 2, -1, 0, 1, 0, 0, -2, 3, -5, -2, -1, 1, 197, 511, -82, 189, -28, -12, 0, 0, 0, -1, 6, -1, 0, 1, 30, -30, -37, -25, 6, 21, 0, 0, 16, -139, 43, -28, 4, 6, 0, 3, 4, 0, 1, 1, -13, 0, -4, 0, 0, 1, 150, 135, -291, 436, -560, -343, 1, 3, 8, -15, -13, -5, -17, -3, 1, -6, -314, 428, 606, 758, 1230, -411, 0, -1, 11, -14, 4, 1, 221, 157, 1, 132, -25, 3, 12, 0, 0, 0, 0, -1, 1487, -108, 707, -79, -950, -190, 177, 582, -676, 399, -281, -396, 0, 52, 39, -130, 2, 1, 12, 148, -34, 23, 1, 27, -20, 13, 1, -1, 198, -34, -21, -80, -99, 332, -307, 9, -15, -125, 330, -231, 236, 139, -36, 74, 7, 3, -588, -1722, 3623, -1245, 187, 4366, -72, -75, 11, -33, 174, -467, 444, 9, 11, 180, -6, -39, 8, -7, -126, -500, 599, -317, 224, 355, -590, -39, 134, -379, -7, -3, 494, -628, 893, 490, 712, -7, -7, 35, -720, 50, -321, 72, 443, 106, 74, 82, 112, -84, -6, -3, 5, 4, 58, 7, -2, 38, 6, 92, -20, 14, 33, 13, -11189, -2, -11, -8, 106, -35, 58, 52, 132, 170, -32, 63, -2, -6, 6, 7, -1, 6, 452, 155, 9, 209, 788, -318, 511, 616, -5, 3, 142, 303, -280, 32, 21, -69, 984, -291, 340, 562, 30, 2, 171, -51, 27, 28, -1570, -2053, 3702, -3593, 4012, 5467, -14, -9, -1, -6, 4, -11, 0, -9, -11, 0, 15, 2, 1133, -1366, 1961, 1134, -867, -3010, 6041, -2049, 142, 7138, -79, -103, 73, -18, 17, -9, 79, -372, 97, -17, 182, -118, 33577, -675, -99, -347, -91, -11, 1, -7, 158, -111, 136, 474, 50, 16, 9739, 51, 19, 2, -105, 36, -20, -11, -12, 56, -13, 2, 2030, -22, 11, -4, 9, -6, 1, 33, 10, 18, 4, 21, 53, 3, 19, 2, 130, 37, -147, -54, -22, 6, 7, -19, 22, 36, -4, 8, -949, 2911, -2221, -697, 371, -808, 1203, -1117, 191, 189, -549, 77, -321201, 19788, 2622593, 5990, 8667033, 114, -34455835, 86, -92, -493, 179, 807, -499, 281, 225, 51, -34, -88, -30, 13, 0, -3, 20, -43, 201, 33, -93, 2, -1034, -518, -63, -545, 104, -20, 43, -64, -34, -7, 0, 0, -61, -159, -143, -8, -392, -157, -204, 309, -24, -248, 55, -40, -6, 91, -16, 57, -41, 18, 197, -20, -668, -150, -192, -216, 39, -84, -62, -59, -4, 8, -7, -1, -352, -100, -10, -158, 61, 55, 32493, -49, 107, 344, -395, 227, -154, -238, 123, 104, -205, 348, -449, -236, -54, -19, -6, 21, -790, 27, -5, 30, -846, 154, -26, -920, 0, 12, -54, 21, 11, -10, 137, 132, 109, -337, -11, 2, -272, 467, -511, 179, -1, -8, 7, -32, -44, 2, -26, 101, -32, 6, -98, 48, -42, -53, -1222, 1601, -3775, 656, 83, 46, 16, -28, 0, 7, -66, -14, -6, 13, 12, 0, -58, 91, -123, -58, -12, 4, -114, 423, -111, 12, 112, 27, -19072, 71, 100, 410, 107, 15, 24, 3, -214, 30, 49, 44, 5017, -27, 167, -80, 8, 153, 4, 7, -219, -35, 244, 694, -762, 2, -84, -49, -28, 158, -4, 56, -14, 0, 9, 12, 7, 18, 2, -7, -15426, 91, 25800, -15, 144767, -53, -287824, -24, 19, -9, 6, 7, 0, 0, -3, 8, -5, -3, -232, 53, -1, -271, 4, -12, -8, 30, -8, -25, -253, -150, -105, 470, -37, -29, -59, -6, -24, -5, 9, -18, 1784, 3, -54, 13, -12, 7, -116, 144, -353, 52, -4, -12, -17, -14, -1340, -64, 10, -116, -24, -2, 190, 131, 130, -307, -1, 9, 5, -7, -10, 56, -33, 0, -14, 3, 2, -12, -635, -160, 64, -44, 2712, -3, -3606, -1, 774, 1, 133, -1, -19, 0, 5, -59, -5, 14, -45, 5, -140, -8, 15, -28, 379, 1, 6, 3, 55, 0, -54, 0, 3, -33, -3, 4, 0, -4, 0, -1, 200, 0, -17, -1, 2, -20, -2, 0, 111, 0, 1, -12, 64, 0, 38, 0, 23, 0, 3, 13, }; static char args[] = { 0, 3, 3, 4, 3, -8, 4, 3, 5, 1, 2, 2, 5, -5, 6, 2, 4, 4, 3, -8, 4, 5, 5, -5, 6, 1, 3, 2, 2, 1, 3, -8, 4, 0, 3, 3, 2, -7, 3, 4, 4, 2, 3, 7, 3,-13, 4, -1, 5, 0, 2, 8, 2,-13, 3, 2, 3, 1, 3, -2, 4, 2, 6, 0, 3, 1, 2, -8, 3, 12, 4, 1, 3, 6, 2,-10, 3, 3, 5, 1, 1, 1, 7, 0, 2, 1, 5, -2, 6, 1, 2, 1, 5, -3, 6, 0, 3, 1, 3, -2, 4, 1, 5, 0, 3, 3, 3, -6, 4, 2, 5, 1, 3, 1, 1, -5, 2, 4, 3, 0, 2, 8, 3,-15, 4, 2, 3, 4, 3, -7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, 4, 3, 5, 1, 1, 2, 12, 3, 3, 2, 3, -8, 4, 3, 5, 1, 3, 2, 3, -2, 5, 5, 6, 0, 2, 8, 2,-11, 3, 0, 2, 2, 3, 1, 5, 0, 2, 5, 2, -6, 3, 1, 2, 8, 3,-11, 4, 0, 2, 1, 1, -2, 3, 0, 2, 7, 3, -9, 4, 0, 2, 2, 2, -1, 3, 1, 2, 6, 3, -7, 4, 0, 2, 5, 3, -5, 4, 0, 2, 7, 2, -9, 3, 0, 2, 4, 3, -3, 4, 0, 2, 4, 2, -4, 3, 0, 2, 3, 3, -5, 5, 0, 2, 1, 2, 1, 3, 0, 2, 3, 3, -4, 5, 1, 2, 8, 3,-10, 4, 0, 2, 7, 3, -8, 4, 0, 2, 3, 3, -3, 5, 0, 2, 6, 2, -7, 3, 0, 2, 6, 3, -6, 4, 0, 2, 3, 3, -2, 5, 1, 2, 3, 3, -4, 6, 0, 2, 5, 3, -4, 4, 0, 2, 3, 2, -2, 3, 0, 2, 3, 3, -3, 6, 0, 2, 3, 3, -1, 5, 0, 2, 3, 3, -2, 6, 0, 1, 3, 12, 3, 2, 5, 2, -5, 3, 0, 2, 1, 1, -1, 3, 0, 1, 2, 2, 0, 2, 7, 2, -8, 3, 0, 2, 4, 2, -3, 3, 0, 2, 4, 3, -5, 5, 0, 2, 4, 3, -4, 5, 0, 2, 4, 3, -3, 5, 0, 2, 6, 2, -6, 3, 0, 2, 4, 3, -2, 5, 0, 1, 4, 12, 1, 2, 8, 2, -9, 3, 0, 2, 5, 2, -4, 3, 0, 1, 1, 1, 0, 2, 7, 2, -7, 3, 1, 2, 5, 3, -5, 5, 0, 2, 9, 2,-10, 3, 0, 2, 6, 2, -5, 3, 0, 2, 8, 2, -8, 3, 0, 2, 10, 2,-11, 3, 0, 2, 9, 2, -9, 3, 0, 2, 10, 2,-10, 3, 0, 2, 11, 2,-11, 3, 0, 2, 2, 1, -1, 3, 0, -1 }; /* geocentric moon polar coordinates re mean equinox and ecliptic of date For latitude coefficients, see mlat404.c. S. L. Moshier December, 1996 Residuals against JPL ephemeris DE404 (arc seconds) First date in file = 1221000.5 Number of samples = 1053099 Sampling interval = 1.515625 days Peak excursions from these mostly different test points were consolidated with the above. They added .01" to a few of the peak readings. First date in file = 1221000.50 Number of samples = 524290.0 Sampling interval = 3.0 days Julian Years Longitude Latitude Distance 1 = 1.9 km Peak RMS Ave Peak RMS Ave Peak RMS Ave -1369.0 to -1000.0: 0.43 0.07 0.00 0.33 0.05 -0.00 0.18 0.03 0.00 -1000.0 to -500.0: 0.49 0.06 -0.00 0.33 0.04 -0.00 0.18 0.03 0.00 -500.0 to 0.0: 0.48 0.06 0.00 0.32 0.04 0.00 0.15 0.03 0.00 0.0 to 500.0: 0.45 0.05 0.00 0.30 0.04 -0.00 0.17 0.03 -0.00 500.0 to 1000.0: 0.48 0.05 -0.00 0.29 0.04 0.00 0.17 0.03 -0.00 1000.0 to 1500.0: 0.42 0.05 -0.00 0.28 0.04 -0.00 0.16 0.03 0.00 1500.0 to 2000.0: 0.35 0.05 -0.00 0.26 0.04 0.00 0.15 0.03 0.00 2000.0 to 2500.0: 0.39 0.06 0.00 0.25 0.04 -0.00 0.15 0.03 -0.00 2500.0 to 3000.0: 0.44 0.07 -0.00 0.30 0.05 -0.00 0.19 0.03 -0.00 3000.0 to 3000.8: 0.23 0.08 -0.04 0.11 0.04 -0.00 0.08 0.03 -0.00 */ static long tablm[] = { 175667, 66453, 5249, -42, 20057, 403, -2360, 6148, -7644, 24646, -1273, 9127, -1395, 1958, 232, -289, -97, 553, 69, 130, -80, 6, 129, -868, 26, -89, 1042, 1172, 194, -112, -47433, -241666, 224626, -103752, 63419, 127606, 2294, -691, -1827, -1254, -1, -119, 1057, 324, 505, -195, 254, -641, -36, 1008, -1082, -3, -87, 122, 161, 11, 2, -106, 29, -123, -32, 41, -524, -35, 133, -595, 225, 837, -108, -191, -2294, 841, -340, -394, -351, -1039, 238, -108, -66, 21, 1405, 869, 520, 2776, -174, 71, 425, 652, -1260, -80, 249, 77, -192, -17, -97, 134, -7, -54, -802, -7436, -2824, 70869, -35, 2481, 1865, 1749, -2166, 2415, 33, -183, -835, 283, 27, -45, 56, 235, 2, 718, -1206, 275, -87, -158, -7, -2534, 0, 10774, 1, -324, -208, 821, 281, 1340, -797, 440, 224, 72, -65, -5, -7, -44, -48, 66, -151, -40, -41, -45, 76, -108, -18, 1202, 0, -2501, 1438, -595, 900, 3040, -3435, -5, -100, -26, 0, -13714, -183, 68, 453, -83, -228, 325, 97, 13, 2, 105, -61, 257, 0, 57, 88, -11, -1, -8220, 0, 275, -43, -10, -199, 105, 1, -5849, 2, 24887, -128, 48, 712, 970, -1407, 845, -266, 378, 311, 1526, -1751, 27, 0, -185858, 133, 6383, -108, 25, -7, 1944, 5, 390, -11, 31, 277, -384, 158, 72, -81, -41, -13, -111, -2332, -65804, -698, 505812, 34, 1676716, -72, -6664384, 154, -57, 52, 95, -4, -5, -7, 37, -63, -32, 4, 3349, 1, -14370, 16, -83, 0, -401, 13, 3013, 48, -20, 0, 250, 51, -79, -7, -146, 148, 9, 0, -64, -17, -59, -67, -492, -2, 2116601, -12, -1848, 8, -436, -6, 324, 0, -1363, -163, 9, 0, -74, 63, 8167, -29, 37587, -22, -74501, -71, 497, -1, 551747, -87, -22, 0, -51, -1, -463, 0, -444, 3, 89, 15, -84, -36, -6829, -5, -21663, 0, 86058, 0, -298, -2, 751, -2, -1015, 0, 69, 1, -4989, 0, 21458, 0, -330, 0, -7, 0, -226, 0, -1407, 0, 2942, 0, 66, 0, 667, 0, -155, 0, 105, 0, -107, 0, -74, 0, -52, 0, 91, 0, 59, 0, 235, -1, -1819, 0, 2470, 71, 13, 0, 1026, 14, -54, 0, -174, -121, -19, 0, -200, 0, 3008, -16, -8043, -10, -37136, -3, 73724, -157, -5, 0, -854, 8, 147, -13, -893, 0, 11869, -23, -172, 89, 14, -1, 872, 0, -3744, 11, 1606, 0, -559, -1, -2530, 0, 454, 0, -193, -60, -10, -82, -13, -75, 6, 36, 81, 354, -162836, 148, -516569, 4, 2054441, 4, -94, 39, 38, 61, -30, 2, 121, -11, 590, 62, 2108, 0, -12242, -476, -42, -84, 113, -394, 236, 0, 276, -49, 31, 0, 86, 1, -1313, 1, 69, -60, 88, -46, 18, 0, -63818, 14, -93, 113, 547, -618, 17, -7, 12290, -1, -25679, 0, 92, -115, 50, -48, 233, 4, 1311, 1, -5567, 3, 1251, 29, 548, -244, 257, -2, 1825, 42, 637, -46, 68, -62, 8, 3, 110, 445, -100, -316, -202, 2925, -621, 763, 1495, -169, -184, 20, -76, -475, -138, 8, -141, -197, 1351, -1284, 422, -129, 1879, -102, 8382, -9, 45864958, -215, 1350, -1285, 422, -481, -136, 8, -140, 40, -53, 2622, -543, 700, 1406, 402, -95, -318, -194, 122, 13, -30, 147, -121, -902, 61, -23, -63, 7, 69, 479, -224, 228, -7, 500, 0, -429, -42, 193, -92, 37, 67, 5, -350, -31, 0, 67, -55, -5, 0, 47, -36, 53, 5, 561, 0, -126, 0, 871, -52, 4, -201, 116922, -22, 371352, -12, -1473285, 0, 87, -164, 84, -3, 422, 30, 1434, -26, 38, 2, -1249943, -404, -34, -57, 79, 5, 509, 1, 131, -344, 168, 112, 22540, 30, 71218, 18, -283983, 0, -851, 0, -1538, 0, 1360, -12, 51, -48, 68, 88, -20, 1, 63, 0, -568, 303, 25, 0, -122, 87, 586, -606, -14, 0, -100, -85, 8, -165, 54, -45, 140, 0, -54, 4, -831, 1, 3495, 31, 116, -46, -11, -371, 190, -507, 399, -2, 57, -60, 36, -198, -1174, -613, 4988, -87, -4, 141, 560, -276, 187, 1876, 1379, 778, 4386, 24, -15, 167, -774, -71, -9, -62, 90, 98, 580, -663, -7, 34, -112, 57, 15, -355, -214, -3240, -13605, 12229, -5723, 3496, 7063, 33, -51, 1908, 1160, -226, 715, 964, 1170, -1264, 623, 14071, 5280, 5614, 3026, 488, 1576, -2, 226395859, 824, 1106, -1287, 617, 1917, 1156, -214, 718, 90, -97, 12078, -2366, 3282, 6668, -219, 9179, 593, 2015, -282, -186, 57, 25, 31, -102, -77, -4, -268, -341, -7, -45, -3, 74, 15, -615, -88, -7, 234, -353, 1, -119, -163, -1159, -601, 4969, 22, -58, -17, -11434, 17, 54, 348, 348, -460, 434, -371, 175, -11, -204, 4, -6440, -5, -53, -4, -14388, -37, -45231, -7, 179562, -44, 136, -160, 49, -101, 81, -1, -188, 0, 2, -4, 12124, -11, -25217, 71, 543, -557, -14, -75, 526, 0, 395274, -233, -16, 93, -20, -43, 61, 0, -1275, 0, -824, 1, -415, 0, 1762, -261, 131, -45, 64, -297, -25, 0, -17533, -6, -56, 21, 1100, 1, 327, 1, 66, 23, -217, -83, -7, 83, 86847, 49, 275754, -4, -1093857, -46, 2, 0, -24, 0, -419, 0, -5833, 1, 506, 0, -827, -1, -377, -11, -78, 0, 131945, -2, -334, 1, -75, 0, -72, 0, -213, -6, 5564, -2, -11618, 0, 1790, 0, -131, 0, 6, 0, -76, 0, -130, 0, -1115, 0, 4783, 0, -195, 0, -627, 0, -55, 0, -83, 0, 163, 0, -54, 0, 82, 0, 149, 0, -754, 0, 1578, 0, 138, 0, 68, 2, -2506, 0, 3399, 0, -125, 86, 16, 0, -6350, 0, 27316, 18, -63, 0, -169, -1, 46, -136, -21, 0, -239, -30, -8788, -15, -40549, -4, 80514, -46, -8, -168, -6, -1, 536, 0, -2314, 9, 148, -13, -842, -1, 307713, -23, -175, 95, 15, 0, -297, 11, 1341, 0, -106, 0, 5, -4, 68, -114, 10, 32, 75, 159, -130487, 98, -413967, 2, 1647339, -4, -85, 100, -46, 2, 95, -11, 461, 51, 1647, 0, -32090, -375, -33, -65, 86, -300, 180, 0, 836, 0, -3576, 0, -222, 0, -993, -41, 60, 0, -4537, -431, -34, 2, 927, 0, -1931, -79, 33, -31, 144, -1, 284, 0, -1207, 0, 88, -11, 315, -178, 177, -1, 144, -58, 986, 11, 86, -228, -110, 2636, -494, 718, 1474, 28, -35, -24, 782, -797, 277, 2142, -1231, 856, 1853, 74, 10797, 0, 23699298, -21, 786, -796, 277, 27, -34, 2615, -494, 712, 1461, -226, -109, -11, 663, 0, -123, -169, 157, -54, 266, 0, -76, 1, -634, 0, 2738, -25, 106, -63, 24, 0, -372, -221, -24, 0, -5356, 0, -219, 0, 91, -28, 7684, -6, 24391, -1, -96795, -77, 43, 2, 95, -47, -3, 0, -84530, 2, 310, 1, 88, 111, 19331, 32, 61306, 4, -243595, 0, 770, 0, -103, 0, 160, 0, 356, 0, 236, -41, 354, 39, 303, 12, -56, 873, -143, 238, 482, -28, 35, -93, 31, -3, 7690211, -91, 33, -34, 43, 824, -130, 226, 450, -39, 341, -1, -687, 0, -303, 11, -2935, 1, 12618, 121, 924, 9, -1836, -268, -1144, -678, 3685, -69, -261, 0, -4115951, -69, -261, 5, -151, 0, -88, 0, 91, 0, 187, 0, -1281, 1, 77, 1, 6059, 3, 19238, 0, -76305, 0, -90, 0, -238, 0, -962, 0, 4133, 0, 96, 0, 9483, 0, 85, 0, -688, 0, -5607, 0, 55, 0, -752, 0, 71, 0, 303, 0, -288, 0, 57, 0, 45, 0, 189, 0, 401, 0, -1474, 0, 3087, 0, -71, 0, 2925, 0, -75, 0, 359, 0, 55, 1, -10155, 0, 43735, 0, -572, 0, -49, 0, -660, 0, -3591, 0, 7516, 0, 668, -1, -53, -2, 384259, 0, -163, 0, -93, 1, 112, -95, -11528, -22, -36505, -1, 145308, 5, 145, 0, 4047, 1, 1483, 0, -6352, 0, 991, 0, -4262, 0, -93, 0, -334, 0, -160, 0, -153, -10, 127, 51, 185, -77, 18, 56, 1217, 6, 1919574, -74, 17, 50, 180, -5, 93, 0, -104, 0, -58, -3, -353, -1, 1499, 0, -229, -15, 86, 0, -93657, 0, 1561, 0, -6693, 0, -5839, 1, 6791, 0, -29143, 1, -701, 0, 3015, 0, 2543, 0, 693, -1, 361233, 0, -50, 0, 946, -1, -140, -70, 407, 0, -450995, 0, -368, 0, 54, 0, -802, 0, -96, 0, 1274, 0, -5459, 0, -614, 0, 2633, 0, 685, 0, -915, 0, -85, 0, 88, 0, 106, 0, 928, 0, -726, 0, 1523, 0, 5715, 0, -4338, 0, 18706, 0, -135, 0, -132, 0, -158, 0, -98, 0, 680, -1, 138968, 0, -192, 0, -1698, 0, -2734, 0, 11769, 0, 4, 0, 673, 0, -2891, 0, 889, 0, -3821, 0, 121, -1, 143783, 0, 231, -9, 51, 0, -57413, 0, -483, 0, -407, 0, 676, 0, -2902, 0, 531, 0, 445, 0, 672, 0, 19336, 0, 70, 0, -39976, 0, -68, 0, 4203, 0, -406, 0, 446, 0, -108, 0, 79, 0, 84, 0, 734, 0, 255, 0, 3944, 0, -655, 0, 2825, 0, -109, 0, -234, 0, 57, 0, 19773, 0, -2013, 0, 958, 0, -521, 0, -757, 0, 10594, 0, -9901, 0, 199, 0, -275, 0, 64, 0, 54, 0, 165, 0, 1110, 0, -3286, 0, 909, 0, 54, 0, 87, 0, 258, 0, 1261, 0, -51, 0, 336, 0, -114, 0, 2185, 0, -850, 0, 75, 0, -69, 0, -103, 0, 776, 0, -1238, 0, 137, 0, 67, 0, -260, 0, 130, 0, 49, 0, 228, 0, 215, 0, -178, 0, 57, 0, -133, }; static long tabbm[] = {-1}; static long tabrm[] = { -5422, -2120, 1077, 772, 39, 75, 3, 10, -468, -326, -113, -78, -4, -2, 1, 3, 29, 24, 4, 2, 1, 0, -9, 7, -2, 0, -32, -13, -3, -3, 233, 126, 89, 77, -33, 16, 3, -3, 0, -1, 2, 0, 0, 1, 4, 9, 1, 1, 16, -1, 0, 18, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -22, -5, 10, 3, 1, 1, -15, 7, -2, 1, -8, -11, -1, -2, -1, 1, 46, -58, 126, -23, 4, 8, 35, 8, 10, -17, 0, 0, 0, 0, -10, -7, 0, 0, -23, 3, 151, 10, -327, 0, 4, -5, 6, 5, 1, 0, -1, -3, 0, 0, 0, 1, -185, 0, -3, -24, -5, -2, -1062, 3, 4560, 0, -3, 0, 4, 1, 8, -1, 2, 4, 0, 1, 0, -1, 0, 0, -1, 0, 0, 1, 0, 0, -1, -1, 277, 3, -583, 1, -1, 4, -32, 7, 0, -34, 1, -1, -23685, 0, -1, -2, -1, -7, -5, -4, 0, 2, -2, 0, -5, -1, 35, 0, 0, 2, 202, 0, 180, 0, 0, -1, -3, -6, -193, 0, 770, -1, -2, -4, -32, 23, -28, -46, -13, -9, -54, 10, -1, -61, -44895, 0, -230, 5, -1, -4, -71, 0, -15, 0, 1, 0, 15, 11, -3, 6, 2, -3, 4, -1, 2576, -138, -19881, -47, -65906, -1, 261925, -4, -2, -7, 4, -2, 0, 0, -1, 0, 1, -3, 172, -2, -727, 0, 4, 1, 324, 0, -139, 1, 1, 3, -276, 0, 5, 3, 9, 0, -1, 10, -37, 0, 5, -1, 76, -10, 1318810, 1, 12, -1, -38, 1, -141, 0, 611, 0, 0, -11, 4, 0, -627, 2, -2882, -3, 5711, -2, -48, -7, 55294, 0, 2, -7, 31, 0, 34, 0, -259, 0, -55, 2, 6, 3, -4273, 20, -13554, 3, 53878, 0, -46, 0, -85, 0, 114, 0, -45, 0, -818, 0, 3520, 0, 34, 0, -157, 0, 29, 0, -878, 0, 1838, 0, -428, 0, 161, 0, 24, 0, 65, 0, 19, 0, 15, 0, 12, 0, -26, 0, -14, 0, -149, 0, 584, 0, -793, 0, 4, -23, -238, 0, -18, -5, 45, 0, -7, 42, 79, 0, -1723, 0, 2895, -6, 13362, -4, -26525, -1, -2, 57, 291, 0, 52, -3, -327, 5, -2755, 0, -63, 9, 5, -33, -261, -1, 1122, 0, 621, -4, -227, 0, 1077, 0, -167, 0, 85, 0, -4, 23, -5, 32, 3, 30, -32, 14, 64607, 141, 204958, 59, -815115, 2, -37, -1, 15, -15, 12, 24, 48, -1, 235, 4, 843, -25, 4621, 0, -17, 191, 45, 34, 95, 159, -132, 0, 13, 20, 32, 0, -540, 0, 29, 0, 37, 25, 8, 19, 22127, 0, -35, -5, 232, -48, 7, 262, 5428, 3, -11342, 1, -45, 0, -21, -49, -100, -21, -626, 1, 2665, 0, 532, -2, 235, -12, -111, -105, 774, 1, -283, 17, 29, 20, 3, 27, 47, -2, -43, -192, -87, 136, -269, -1264, 646, -330, -79, 73, -33, -9, 60, -205, 61, 4, -584, -85, -182, -555, -780, -57, -3488, -45, -19818328, -4, 583, 93, 182, 555, -59, 208, -60, -4, 23, 17, 235, 1133, -608, 302, 41, 174, 84, -137, 6, -53, 63, 13, -392, 52, -10, -27, -3, -27, 199, -31, 99, 97, -218, -3, 209, 0, 84, 18, 16, 40, 2, -30, 14, -154, 30, 0, -2, 24, -108, 0, -24, -16, 262, -2, 55, 0, -304, 0, 2, 25, 55112, 95, 175036, 11, -694477, 5, 41, 0, -38, -76, 199, 1, 679, -14, -17, -12, 582619, 1, -16, 191, 38, 27, -234, 2, -60, 0, 80, 163, -10296, 48, -32526, 13, 129703, 8, -1366, 0, -741, 0, -646, 0, 25, 6, 33, 23, 10, 43, -31, 0, -6, 0, -12, 147, 59, 0, 287, -42, -7, 297, -59, 0, -4, -42, -27, -81, -69, -22, 27, 0, -423, -2, 1779, -1, -57, 15, 5, -23, 94, 182, -197, -250, 24, 1, -18, -30, 581, -98, -2473, -303, -2, 43, -277, 70, -92, -136, -681, 925, -2165, 384, -8, -12, 382, 82, -4, 35, -45, -31, -286, 48, 3, -328, -55, -17, 8, -28, -106, 175, -6735, 1601, -2832, -6052, 3495, -1730, -25, -17, -574, 944, -354, -112, -579, 476, -308, -625, -2411, 7074, -1529, 2828, -1335, 247,-112000844, -1, 545, -409, 305, 637, 572, -950, 356, 106, 48, 44, 1170, 5974, -3298, 1624, -4538, -106, -996, 294, 92, -139, -12, 28, 50, 16, 2, -38, 169, -133, 22, -3, 38, 1, 305, 7, 4, -44, 175, 116, 59, 1, -573, 81, 2453, 297, 29, 11, 5674, -8, -27, 9, 173, -173, 215, 228, -87, -184, 102, -5, 3206, 2, -53, 2, 7159, -7, 22505, -19, -89344, -3, 67, 22, 24, 79, -40, -50, 94, 0, 186, 0, -6063, 0, 12612, -5, -271, 35, 7, -278, -479, -74, 426754, 0, 8, -116, -10, -47, -31, -22, 645, 0, 426, 0, -213, 0, 903, 0, -67, -133, -33, -23, 13, -152, -9316, 0, 29, -3, -564, 11, -167, 0, -34, 0, 114, 12, 4, -44, -44561, 42, -141493, 25, 561256, -2, -1, -24, -261, 0, 211, 0, -4263, 0, -262, 1, 1842, 0, 202, 0, 41, -6, 77165, 0, 176, -1, 39, 1, -24, 0, 118, 0, -2991, -4, 6245, -1, 46886, 0, -75, 0, -100, 0, 40, 0, 75, 0, -618, 0, 2652, 0, 112, 0, 1780, 0, 30, 0, 49, 0, 86, 0, 33, 0, -30, 0, -95, 0, 277, 0, -580, 0, -35, 0, -319, 0, 1622, 1, -2201, 0, 79, 0, 10, -57, 2363, 0, -10162, 0, -41, -12, 62, 0, 30, 1, -14, 89, -2721, 0, 5780, -19, 26674, -10, -52964, -2, -5, 30, -4, 111, -317, -1, 1369, 0, 93, -6, -564, 9, -115913, 0, -113, 15, 10, -62, 99, 0, 891, -7, 36, 0, 108, 0, -42, -2, 7, 75, -50, 21, 86822, 104, 275441, 65, -1096109, 1, -56, 3, 31, 66, 63, -1, 307, 7, 1097, -34, 17453, 0, -22, 250, 57, 43, 120, 200, -297, 0, 1269, 0, 166, 0, -662, 0, 40, 28, 1521, 0, -23, 288, 351, -2, -729, 0, -22, -52, -96, -21, -139, -1, 589, 0, 35, 0, 210, 7, -118, -119, 62, 0, -583, -26, -42, 5, -73, 152, -330, -1759, 983, -479, -23, -19, -522, -15, -185, -533, 739, 1559, -1300, 614, -7332, 52, -15836758, 0, 524, 16, 185, 532, 23, 18, 330, 1751, -978, 476, 73, -151, 519, 18, 38, 0, 105, 113, -178, -37, 26, 0, 262, 1, -1139, 0, 71, 17, 16, 42, 151, 0, 16, -148, 4147, 0, 149, 0, -30, 0, 2980, 9, 9454, 2, -37519, 0, -28, -49, 37, -1, 2, -31, 33870, 0, -208, 1, -59, 1, -13105, 68, -41564, 21, 165148, 3, -1022, 0, -40, 0, -132, 0, -228, 0, 95, 0, -138, -16, -126, 16, 24, 5, -57, -346, 191, -94, -14, -11, -12, -37, -3053364, -1, 13, 36, 17, 13, 51, 327, -179, 90, 138, 16, 233, 0, 62, 0, 1164, 0, -5000, 0, -407, 117, 770, 9, -4, 1, 21, 2, 1, 0, -16869, 0, -1, 0, 1, 0, 35, 0, -78, 0, 78, 0, -533, 0, -31, 1, -2448, -6, -7768, -1, 30812, 0, 37, 0, -227, 0, 197, 0, -846, 0, -77, 0, 4171, 0, -67, 0, 287, 0, 2532, 0, -19, 0, -40, 0, -56, 0, 128, 0, 83, 0, -45, 0, -36, 0, -92, 0, -134, 0, 714, 0, -1495, 0, 32, 0, -981, 0, 15, 0, -166, 0, -59, 0, 4923, 0, -21203, 0, 246, 0, 15, 0, 104, 0, 1683, 0, -3523, 0, -865, 0, -25, 1, -186329, -1, 10, 0, 50, 0, 53, 0, 5455, -45, 17271, -10, -68747, 0, 69, -2, -7604, 0, -724, 1, 3101, 0, -46, 0, 200, 0, -44, 0, 97, 0, -53, 0, 62, 0, -54, -4, 88, -24, -9, -36, -581, 27, -914711, 3, 8, 35, -86, 24, 51, 3, 48, 0, 26, 0, 133, 1, -577, 0, 105, 0, -3, -1, 3194, 0, 528, 0, -2263, 0, 2028, 0, -3266, 1, 14016, 0, 10, 0, -41, 0, -100, 0, -32, 0, -124348, 0, 16, 0, -325, 0, 50, -1, 1, 0, -553, 0, 0, 0, 0, 0, 2, 0, -34, 0, -444, 0, 1902, 0, 9, 0, -37, 0, 254, 0, 156, 0, -2, 0, -35, 0, -48, 0, -368, 0, 327, 0, -686, 0, -2263, 0, 1952, 0, -8418, 0, -13, 0, 52, 0, 9, 0, 21, 0, -261, 0, -62404, 0, 0, 0, 79, 0, 1056, 0, -4547, 0, -351, 0, -305, 0, 1310, 0, -1, 0, 6, 0, 0, 0, -55953, 0, -80, 0, 0, 0, 168, 0, -147, 0, 127, 0, -265, 0, 1138, 0, -1, 0, -9, 0, -8, 0, -5984, 0, -22, 0, -5, 0, 0, 0, 0, 0, 127, 0, -2, 0, 10, 0, -31, 0, -29, 0, -286, 0, -98, 0, -1535, 0, 252, 0, -1087, 0, 43, 0, 4, 0, -19, 0, -7620, 0, 29, 0, -322, 0, 203, 0, 0, 0, -3587, 0, 10, 0, 0, 0, 94, 0, 0, 0, -1, 0, -1, 0, -315, 0, 1, 0, 0, 0, 0, 0, -30, 0, -94, 0, -460, 0, 1, 0, -114, 0, 0, 0, -746, 0, 4, 0, -23, 0, 24, 0, 0, 0, -237, 0, 1, 0, 0, 0, -18, 0, 0, 0, 0, 0, -16, 0, -76, 0, -67, 0, 0, 0, -16, 0, 0, 0, }; static char argsm[] = { 0, 3, 3, 4, 3, -8, 4, 3, 5, 1, 2, 2, 5, -5, 6, 2, 5, -1, 10, 2, 13, -1, 11, 3, 3, -7, 4, 0, 3, 1, 13, -1, 11, 2, 5, 1, 2, 4, 5,-10, 6, 0, 4, 2, 10, -2, 13, 14, 3,-23, 4, 1, 3, 3, 2, -7, 3, 4, 4, 1, 3, -1, 13, 18, 2,-16, 3, 2, 2, 8, 2,-13, 3, 1, 5, 2, 10, -2, 13, 2, 3, -3, 5, 1, 6, 0, 3, -1, 13, 26, 2,-29, 3, 0, 3, 1, 10, -1, 11, 2, 4, 1, 4, 1, 10, -1, 13, 3, 2, -4, 3, 1, 4, 1, 10, -1, 13, 3, 3, -4, 4, 0, 3, -1, 10, 15, 2,-12, 3, 0, 4, 2, 10, -3, 13, 24, 2,-24, 3, 0, 3, -1, 10, 23, 2,-25, 3, 0, 4, 1, 10, -1, 11, 1, 3, 1, 6, 0, 4, 2, 10, -2, 11, 5, 2, -6, 3, 0, 4, 2, 10, -2, 13, 6, 2, -8, 3, 0, 4, -2, 10, 1, 13, 12, 2, -8, 3, 1, 5, -1, 10, 1, 13, -1, 11, 20, 2,-20, 3, 1, 4, -2, 10, 1, 13, 3, 1, -1, 3, 1, 5, 2, 10, -2, 13, 2, 3, -5, 5, 5, 6, 0, 4, 2, 10, -2, 13, 2, 3, -3, 5, 1, 4, 2, 10, -2, 13, 6, 3, -8, 4, 0, 4, -2, 10, 1, 13, 20, 2,-21, 3, 1, 4, 1, 10, -1, 11, 1, 3, 1, 5, 0, 1, 1, 6, 0, 4, 2, 10, -2, 13, 5, 3, -6, 4, 0, 3, 3, 2, -5, 3, 2, 5, 0, 2, -1, 11, 1, 14, 1, 4, 2, 10, -2, 13, 2, 3, -2, 5, 0, 2, 1, 3, -2, 4, 1, 4, 1, 10, -1, 11, 5, 2, -7, 3, 0, 1, 1, 5, 0, 2, 7, 3,-13, 4, 0, 4, -2, 10, 1, 13, 15, 2,-13, 3, 0, 4, 2, 10, -2, 13, 3, 2, -3, 3, 0, 2, -2, 11, 2, 14, 1, 3, 1, 10, 1, 12, -1, 13, 1, 3, -1, 13, 21, 2,-21, 3, 0, 2, 3, 2, -5, 3, 0, 2, 2, 3, -4, 4, 1, 2, 5, 2, -8, 3, 0, 3, -1, 13, 23, 2,-24, 3, 0, 2, 6, 3,-11, 4, 0, 1, 2, 5, 0, 2, 3, 3, -6, 4, 0, 2, 5, 3, -9, 4, 0, 4, 1, 10, -1, 11, 1, 3, -2, 5, 0, 3, 2, 10, 2, 12, -2, 13, 1, 2, 2, 2, -3, 3, 2, 2, 4, 3, -7, 4, 0, 2, 2, 13, -2, 11, 0, 2, 3, 3, -5, 4, 0, 2, 1, 2, -2, 3, 0, 2, 2, 3, -3, 4, 0, 4, 1, 10, -1, 11, 4, 2, -5, 3, 0, 2, 1, 3, -1, 4, 0, 2, 4, 2, -6, 3, 0, 4, 2, 10, -2, 13, 2, 2, -2, 3, 0, 3, 1, 10, -1, 11, 1, 2, 0, 2, 1, 2, -1, 3, 0, 3, 1, 12, 2, 13, -2, 11, 0, 2, 5, 3, -8, 4, 0, 2, 1, 3, -3, 5, 0, 3, 2, 10, 1, 12, -2, 13, 1, 2, 4, 3, -6, 4, 0, 2, 1, 3, -2, 5, 1, 2, 3, 3, -4, 4, 0, 2, 3, 2, -4, 3, 1, 2, 1, 10, -1, 13, 0, 2, 1, 3, -1, 5, 0, 2, 1, 3, -2, 6, 0, 2, 2, 3, -2, 4, 0, 2, 1, 3, -1, 6, 0, 2, 8, 2,-14, 3, 0, 3, 1, 3, 2, 5, -5, 6, 1, 3, 5, 3, -8, 4, 3, 5, 1, 1, 1, 12, 3, 3, 3, 3, -8, 4, 3, 5, 1, 3, 1, 3, -2, 5, 5, 6, 0, 2, 8, 2,-12, 3, 0, 2, 1, 3, 1, 5, 0, 3, 2, 10, 1, 12, -2, 11, 1, 2, 5, 2, -7, 3, 0, 3, 1, 10, 1, 13, -2, 11, 0, 2, 2, 2, -2, 3, 0, 2, 5, 3, -7, 4, 0, 3, 1, 12, -2, 13, 2, 11, 0, 2, 4, 3, -5, 4, 0, 2, 3, 3, -3, 4, 0, 1, 1, 2, 0, 3, 3, 10, 1, 12, -3, 13, 0, 2, 2, 3, -4, 5, 0, 2, 2, 3, -3, 5, 0, 2, 2, 10, -2, 13, 0, 2, 2, 3, -2, 5, 0, 2, 3, 2, -3, 3, 0, 3, 1, 10, -1, 12, -1, 13, 1, 2, 2, 3, -1, 5, 0, 2, 2, 3, -2, 6, 0, 1, 2, 12, 2, 3, -2, 10, 1, 11, 1, 14, 0, 2, 2, 10, -2, 11, 0, 2, 2, 2, -1, 3, 0, 4, -2, 10, 2, 13, 1, 2, -1, 3, 0, 2, 4, 2, -4, 3, 0, 2, 3, 10, -3, 13, 0, 4, -2, 10, 2, 13, 1, 3, -1, 5, 0, 2, 3, 3, -3, 5, 0, 3, 2, 10, -1, 12, -2, 13, 2, 3, 3, 10, -1, 13, -2, 11, 0, 1, 3, 12, 1, 4, -2, 10, 2, 13, 2, 2, -2, 3, 0, 3, 2, 10, -1, 12, -2, 11, 1, 2, 5, 2, -5, 3, 0, 2, 4, 10, -4, 13, 0, 2, 6, 2, -6, 3, 0, 3, 2, 10, -2, 12, -2, 13, 1, 3, 4, 10, -2, 13, -2, 11, 0, 3, 2, 10, -2, 12, -2, 11, 0, 2, 7, 2, -7, 3, 0, 3, 2, 10, -3, 12, -2, 13, 0, 2, 8, 2, -8, 3, 0, 2, 9, 2, -9, 3, 0, 2, 10, 2,-10, 3, 0, 3, 2, 10, -4, 12, -1, 13, 0, 3, 4, 10, -2, 12, -3, 13, 0, 4, 4, 10, -1, 12, -1, 13, -2, 11, 0, 3, 2, 10, -3, 12, -1, 13, 1, 4, -2, 10, 1, 13, 3, 3, -2, 5, 0, 3, 4, 10, -1, 12, -3, 13, 0, 4, -2, 10, 1, 13, 3, 3, -3, 5, 0, 4, 2, 10, -2, 12, 1, 13, -2, 11, 0, 4, -2, 10, 1, 13, 2, 2, -1, 3, 0, 3, 3, 10, -1, 12, -2, 11, 0, 3, 4, 10, -1, 13, -2, 11, 0, 3, 2, 10, -2, 12, -1, 13, 2, 4, -2, 10, 1, 13, 2, 3, -1, 5, 0, 3, 3, 10, -1, 12, -2, 13, 0, 4, -2, 10, 1, 13, 3, 2, -3, 3, 0, 4, -2, 10, 1, 13, 2, 3, -2, 5, 0, 2, 4, 10, -3, 13, 0, 4, -2, 10, 1, 13, 2, 3, -3, 5, 0, 3, -2, 10, 1, 13, 1, 2, 0, 4, 2, 10, -1, 12, 1, 13, -2, 11, 1, 4, -2, 10, 1, 13, 2, 2, -2, 3, 0, 2, 3, 12, -1, 13, 0, 2, 3, 10, -2, 11, 0, 2, 1, 10, -2, 12, 0, 4, 4, 10, 1, 12, -1, 13, -2, 11, 0, 3, -1, 13, 3, 2, -2, 3, 0, 3, -1, 13, 3, 3, -2, 5, 0, 3, -2, 10, 18, 2,-15, 3, 0, 5, 2, 10, -1, 13, 3, 3, -8, 4, 3, 5, 0, 3, 2, 10, -1, 12, -1, 13, 2, 5, -2, 10, 1, 13, 5, 3, -8, 4, 3, 5, 0, 5, -2, 10, 1, 13, 1, 3, 2, 5, -5, 6, 0, 4, 2, 10, -2, 13, 18, 2,-17, 3, 0, 4, -2, 10, 1, 13, 1, 3, -1, 6, 0, 4, -2, 10, 1, 13, 2, 3, -2, 4, 0, 4, -2, 10, 1, 13, 1, 3, -1, 5, 0, 2, 3, 10, -2, 13, 0, 4, -2, 10, 1, 13, 3, 2, -4, 3, 0, 4, -2, 10, 1, 13, 3, 3, -4, 4, 0, 4, -2, 10, 1, 13, 1, 3, -2, 5, 0, 3, 4, 10, 1, 12, -3, 13, 0, 4, -2, 10, 1, 13, 1, 3, -3, 5, 0, 3, -1, 13, 4, 2, -4, 3, 0, 4, -2, 10, 1, 13, 1, 2, -1, 3, 0, 4, -2, 10, 1, 13, 1, 3, -1, 4, 0, 4, -2, 10, 1, 13, 2, 3, -3, 4, 0, 4, -2, 10, 1, 13, 3, 3, -5, 4, 0, 3, 2, 10, 1, 13, -2, 11, 0, 4, -2, 10, -1, 13, 1, 11, 1, 14, 0, 4, -2, 10, 1, 13, 2, 2, -3, 3, 1, 2, 2, 12, -1, 13, 1, 3, 3, 10, 1, 12, -2, 11, 0, 4, 2, 10, -1, 13, 2, 3, -4, 4, 0, 4, 2, 10, -1, 13, 3, 2, -5, 3, 0, 2, 1, 10, -1, 12, 1, 3, -1, 13, 3, 2, -3, 3, 0, 3, -2, 10, 1, 13, 1, 5, 0, 4, 2, 10, -1, 13, 1, 3, -2, 4, 0, 3, -1, 13, 2, 3, -2, 5, 0, 4, 2, 10, -1, 13, -1, 11, 1, 14, 0, 3, -1, 13, 5, 3, -6, 4, 0, 3, -2, 10, 1, 13, 1, 6, 0, 3, -1, 10, 1, 3, -1, 5, 0, 4, -2, 10, 1, 13, 8, 2,-13, 3, 1, 3, -2, 10, 18, 2,-16, 3, 1, 5, -2, 10, 1, 13, 3, 2, -7, 3, 4, 4, 1, 4, 2, 10, -1, 13, 2, 5, -5, 6, 1, 5, 2, 10, -1, 13, 4, 3, -8, 4, 3, 5, 1, 2, 2, 10, -1, 13, 2, 5, -2, 10, 1, 13, 4, 3, -8, 4, 3, 5, 1, 4, -2, 10, 1, 13, 2, 5, -5, 6, 1, 5, 2, 10, -1, 13, 3, 2, -7, 3, 4, 4, 0, 4, 2, 10, -2, 13, 18, 2,-16, 3, 1, 4, 2, 10, -1, 13, 8, 2,-13, 3, 1, 3, -1, 10, 3, 2, -4, 3, 0, 3, -1, 13, 6, 2, -8, 3, 0, 3, -1, 13, 2, 3, -3, 5, 0, 3, -1, 13, 6, 3, -8, 4, 0, 3, 2, 10, -1, 13, 1, 6, 0, 4, -2, 10, 1, 13, -1, 11, 1, 14, 0, 4, -2, 10, 1, 13, 1, 3, -2, 4, 0, 3, 2, 10, -1, 13, 1, 5, 0, 3, 3, 10, 1, 12, -2, 13, 0, 4, -2, 10, 1, 13, 3, 2, -5, 3, 0, 4, -2, 10, 1, 13, 2, 3, -4, 4, 0, 2, -1, 13, 1, 2, 0, 4, 2, 10, -1, 13, 2, 2, -3, 3, 0, 3, -1, 10, 1, 2, -1, 3, 0, 3, -1, 13, 4, 2, -5, 3, 0, 3, 2, 10, -3, 13, 2, 11, 0, 4, 2, 10, -1, 13, 2, 3, -3, 4, 0, 3, -1, 13, 2, 2, -2, 3, 0, 4, 2, 10, -1, 13, 1, 2, -1, 3, 0, 4, 2, 10, 1, 12, 1, 13, -2, 11, 0, 3, -2, 13, 18, 2,-15, 3, 0, 2, 1, 12, -1, 13, 2, 3, -1, 13, 1, 3, -1, 6, 0, 4, 2, 10, -1, 13, 1, 3, -2, 5, 0, 3, -1, 13, 2, 3, -2, 4, 0, 3, -1, 13, 1, 3, -1, 5, 0, 4, 2, 10, -1, 13, 3, 3, -4, 4, 0, 1, 1, 10, 0, 3, -1, 13, 3, 2, -4, 3, 0, 3, -1, 13, 3, 3, -4, 4, 0, 4, 2, 10, -1, 13, 1, 3, -1, 5, 0, 4, 2, 10, -1, 13, 2, 3, -2, 4, 0, 3, -1, 13, 1, 3, -2, 5, 0, 3, 2, 10, 1, 12, -1, 13, 2, 3, 1, 12, 1, 13, -2, 11, 0, 3, -1, 13, 1, 2, -1, 3, 0, 4, 2, 10, -1, 13, 2, 2, -2, 3, 0, 3, -1, 13, 4, 2, -6, 3, 0, 3, -1, 13, 2, 3, -3, 4, 0, 3, 1, 13, 1, 2, -2, 3, 0, 4, 2, 10, -1, 13, 3, 3, -3, 4, 0, 2, 3, 13, -2, 11, 0, 4, 2, 10, -1, 13, 4, 2, -5, 3, 0, 3, 1, 10, 1, 2, -1, 3, 0, 3, -1, 13, 2, 2, -3, 3, 1, 3, 2, 10, 2, 12, -3, 13, 0, 3, 2, 10, -1, 13, 1, 2, 0, 3, 1, 13, 2, 3, -4, 4, 0, 3, 1, 13, 3, 2, -5, 3, 0, 2, 21, 2,-21, 3, 0, 3, 1, 10, 1, 12, -2, 13, 1, 4, 2, 10, -1, 13, 2, 3, -4, 5, 0, 4, 2, 10, -1, 13, 7, 3,-10, 4, 0, 2, -1, 13, 1, 5, 0, 3, 1, 13, 1, 3, -2, 4, 0, 4, 2, 10, -3, 13, 2, 3, -2, 5, 0, 3, 1, 10, 1, 3, -2, 5, 0, 3, 1, 13, -1, 11, 1, 14, 1, 2, -1, 13, 1, 6, 0, 4, 2, 10, -1, 13, 6, 3, -8, 4, 1, 4, 2, 10, -1, 13, 2, 3, -3, 5, 1, 3, -1, 13, 8, 3,-15, 4, 0, 4, 2, 10, -1, 13, 6, 2, -8, 3, 0, 5, 2, 10, -1, 13, -2, 11, 5, 2, -6, 3, 0, 3, 1, 10, 3, 3, -4, 4, 0, 3, 1, 10, 3, 2, -4, 3, 1, 4, 1, 10, -1, 13, -1, 11, 2, 4, 0, 3, -2, 13, 26, 2,-29, 3, 0, 3, -1, 13, 8, 2,-13, 3, 0, 3, -2, 13, 18, 2,-16, 3, 2, 4, -1, 13, 3, 2, -7, 3, 4, 4, 0, 3, 1, 13, 2, 5, -5, 6, 1, 4, 1, 13, 4, 3, -8, 4, 3, 5, 1, 1, 1, 13, 3, 4, -1, 13, 4, 3, -8, 4, 3, 5, 1, 3, -1, 13, 2, 5, -5, 6, 1, 4, 1, 13, 3, 2, -7, 3, 4, 4, 0, 2, 18, 2,-16, 3, 1, 3, 1, 13, 8, 2,-13, 3, 2, 2, 26, 2,-29, 3, 0, 4, 1, 10, 1, 13, -1, 11, 2, 4, 0, 5, 2, 10, 1, 13, -2, 11, 5, 2, -6, 3, 0, 3, 1, 13, 8, 3,-15, 4, 1, 4, 2, 10, -3, 13, 2, 3, -3, 5, 0, 3, 1, 10, 1, 3, -1, 5, 0, 2, 1, 13, 1, 6, 0, 4, 2, 10, -1, 13, 5, 3, -6, 4, 0, 3, 1, 10, 2, 3, -2, 4, 0, 3, -1, 13, -1, 11, 1, 14, 1, 4, 2, 10, -1, 13, 2, 3, -5, 6, 0, 4, 2, 10, -1, 13, 2, 3, -2, 5, 0, 5, 2, 10, -1, 13, 2, 3, -4, 5, 5, 6, 0, 3, -1, 13, 1, 3, -2, 4, 1, 2, 1, 13, 1, 5, 0, 4, 2, 10, -1, 13, 4, 3, -4, 4, 0, 4, 2, 10, -1, 13, 3, 2, -3, 3, 0, 4, 2, 10, 2, 12, -1, 13, -2, 11, 0, 2, 1, 10, 1, 12, 2, 3, -1, 13, 3, 2, -5, 3, 0, 3, -1, 13, 2, 3, -4, 4, 0, 4, 2, 10, -1, 13, 2, 3, -1, 5, 0, 4, 2, 10, -1, 13, 2, 3, -2, 6, 0, 3, 1, 10, 1, 12, -2, 11, 0, 3, 2, 10, 2, 12, -1, 13, 1, 3, 1, 13, 2, 2, -3, 3, 1, 3, -1, 13, 1, 11, 1, 14, 0, 2, 1, 13, -2, 11, 0, 4, 2, 10, -1, 13, 5, 2, -6, 3, 0, 3, -1, 13, 1, 2, -2, 3, 0, 3, 1, 13, 2, 3, -3, 4, 0, 3, 1, 13, 1, 2, -1, 3, 0, 4, 2, 10, -1, 13, 4, 2, -4, 3, 0, 3, 2, 10, 1, 12, -3, 13, 1, 3, 1, 13, 1, 3, -2, 5, 0, 3, 1, 13, 3, 3, -4, 4, 0, 3, 1, 13, 3, 2, -4, 3, 0, 2, 1, 10, -2, 13, 0, 4, 2, 10, -1, 13, 3, 3, -4, 5, 0, 3, 1, 13, 1, 3, -1, 5, 0, 3, 1, 13, 2, 3, -2, 4, 0, 3, 1, 13, 1, 3, -1, 6, 0, 4, 2, 10, -1, 13, 3, 3, -3, 5, 0, 4, 2, 10, -1, 13, 6, 2, -7, 3, 0, 2, 1, 12, 1, 13, 2, 4, 2, 10, -1, 13, 3, 3, -2, 5, 0, 4, 2, 10, 1, 12, -1, 13, -2, 11, 0, 2, 1, 10, 2, 12, 0, 2, 1, 10, -2, 11, 0, 3, 1, 13, 2, 2, -2, 3, 0, 3, 1, 12, -1, 13, 2, 11, 0, 4, 2, 10, -1, 13, 5, 2, -5, 3, 0, 3, 1, 13, 2, 3, -3, 5, 0, 2, 2, 10, -3, 13, 0, 3, 1, 13, 2, 3, -2, 5, 0, 3, 1, 13, 3, 2, -3, 3, 0, 3, 1, 10, -1, 12, -2, 13, 0, 4, 2, 10, -1, 13, 6, 2, -6, 3, 0, 2, 2, 12, 1, 13, 1, 3, 2, 10, -1, 13, -2, 11, 0, 3, 1, 10, -1, 12, -2, 11, 0, 3, 2, 10, 1, 13, -4, 11, 0, 3, 1, 13, 4, 2, -4, 3, 0, 4, 2, 10, -1, 13, 7, 2, -7, 3, 0, 3, 2, 10, -1, 12, -3, 13, 1, 2, 3, 12, 1, 13, 0, 4, 2, 10, -1, 12, -1, 13, -2, 11, 0, 3, 1, 13, 5, 2, -5, 3, 0, 4, 2, 10, -1, 13, 8, 2, -8, 3, 0, 3, 2, 10, -2, 12, -3, 13, 0, 4, 2, 10, -1, 13, 9, 2, -9, 3, 0, 3, 4, 10, -3, 12, -2, 13, 0, 2, 2, 10, -4, 12, 0, 3, 4, 10, -2, 12, -2, 13, 1, 2, 6, 10, -4, 13, 0, 3, 4, 10, -1, 12, -2, 11, 0, 2, 2, 10, -3, 12, 1, 3, 3, 10, -2, 12, -1, 13, 0, 3, -2, 10, 3, 3, -2, 5, 0, 3, 4, 10, -1, 12, -2, 13, 1, 3, -2, 10, 3, 3, -3, 5, 0, 2, 5, 10, -3, 13, 0, 3, -2, 10, 4, 2, -4, 3, 0, 3, -2, 10, 2, 2, -1, 3, 0, 2, 4, 10, -2, 11, 0, 2, 2, 10, -2, 12, 2, 3, -2, 10, 3, 3, -2, 4, 0, 3, -2, 10, 2, 3, -1, 5, 0, 3, 3, 10, -1, 12, -1, 13, 1, 3, -2, 10, 3, 2, -3, 3, 0, 3, -2, 10, 2, 3, -2, 5, 0, 2, 4, 10, -2, 13, 0, 3, -2, 10, 2, 3, -3, 5, 0, 2, -2, 10, 1, 2, 0, 4, 2, 10, -1, 12, 2, 13, -2, 11, 0, 3, -2, 10, 2, 2, -2, 3, 0, 3, 3, 10, 1, 13, -2, 11, 0, 3, 4, 10, 1, 12, -2, 11, 0, 4, 2, 10, -1, 12, -1, 11, 1, 14, 0, 4, -2, 10, -1, 13, 18, 2,-15, 3, 0, 4, 2, 10, 3, 3, -8, 4, 3, 5, 0, 2, 2, 10, -1, 12, 2, 4, -2, 10, 5, 3, -8, 4, 3, 5, 0, 4, 2, 10, -1, 13, 18, 2,-17, 3, 0, 3, -2, 10, 1, 3, -1, 6, 0, 3, -2, 10, 2, 3, -2, 4, 0, 3, -2, 10, 1, 3, -1, 5, 0, 2, 3, 10, -1, 13, 0, 3, -2, 10, 3, 2, -4, 3, 0, 3, -2, 10, 3, 3, -4, 4, 0, 3, -2, 10, 1, 3, -2, 5, 0, 3, 4, 10, 1, 12, -2, 13, 1, 4, 2, 10, -1, 12, -2, 13, 2, 11, 0, 3, -2, 10, 1, 2, -1, 3, 0, 3, -2, 10, 2, 3, -3, 4, 0, 3, 2, 10, 2, 13, -2, 11, 0, 3, -2, 10, 2, 2, -3, 3, 0, 2, 2, 12, -2, 13, 1, 3, 2, 10, 2, 3, -4, 4, 0, 3, 2, 10, 3, 2, -5, 3, 0, 3, 1, 10, -1, 12, 1, 13, 1, 3, -2, 13, 3, 2, -3, 3, 0, 2, -2, 10, 1, 5, 0, 3, 2, 10, 1, 3, -2, 4, 0, 3, -2, 13, 2, 3, -2, 5, 0, 3, 2, 10, -1, 11, 1, 14, 0, 4, 4, 10, -2, 13, 2, 3, -3, 5, 0, 3, -2, 10, 8, 2,-13, 3, 0, 4, -2, 10, -1, 13, 18, 2,-16, 3, 1, 4, -2, 10, 3, 2, -7, 3, 4, 4, 0, 4, 2, 10, 4, 3, -8, 4, 3, 5, 1, 1, 2, 10, 3, 4, -2, 10, 4, 3, -8, 4, 3, 5, 1, 4, 2, 10, 3, 2, -7, 3, 4, 4, 0, 4, 2, 10, -1, 13, 18, 2,-16, 3, 1, 3, 2, 10, 8, 2,-13, 3, 0, 3, -2, 10, -1, 11, 1, 14, 0, 4, 4, 10, -2, 13, 2, 3, -2, 5, 0, 3, -2, 10, 1, 3, -2, 4, 0, 2, 2, 10, 1, 5, 0, 4, 4, 10, -2, 13, 3, 2, -3, 3, 0, 3, 3, 10, 1, 12, -1, 13, 1, 3, -2, 10, 3, 2, -5, 3, 0, 3, -2, 10, 2, 3, -4, 4, 0, 3, 4, 10, 2, 12, -2, 13, 0, 3, 2, 10, 2, 2, -3, 3, 0, 3, 2, 10, -2, 13, 2, 11, 0, 3, 2, 10, 1, 2, -1, 3, 0, 4, 2, 10, 1, 12, 2, 13, -2, 11, 0, 2, 1, 12, -2, 13, 2, 3, 2, 10, 1, 3, -2, 5, 0, 3, -2, 13, 1, 3, -1, 5, 0, 3, 2, 10, 3, 2, -4, 3, 0, 2, 1, 10, 1, 13, 0, 3, 2, 10, 1, 3, -1, 5, 0, 3, 2, 10, 2, 3, -2, 4, 0, 2, 2, 10, 1, 12, 2, 2, 1, 12, -2, 11, 0, 3, -2, 13, 1, 2, -1, 3, 0, 3, 1, 10, -1, 13, 2, 11, 0, 3, 2, 10, 2, 2, -2, 3, 0, 3, 1, 10, 1, 12, -3, 13, 0, 3, 2, 13, -1, 11, 1, 14, 0, 3, 2, 10, 2, 3, -3, 5, 0, 3, 2, 10, 6, 2, -8, 3, 0, 3, -3, 13, 18, 2,-16, 3, 1, 3, 2, 13, 2, 5, -5, 6, 0, 4, 2, 13, 4, 3, -8, 4, 3, 5, 0, 1, 2, 13, 0, 4, -2, 13, 4, 3, -8, 4, 3, 5, 0, 3, -2, 13, 2, 5, -5, 6, 0, 3, 1, 13, 18, 2,-16, 3, 1, 3, -2, 13, -1, 11, 1, 14, 0, 3, 2, 10, 2, 3, -2, 5, 0, 3, 2, 10, 3, 2, -3, 3, 0, 3, 1, 10, 1, 12, 1, 13, 1, 2, 2, 10, 2, 12, 1, 2, 1, 11, 1, 14, 1, 4, -1, 13, -2, 11, 18, 2,-16, 3, 0, 1, 2, 11, 0, 4, -1, 13, 2, 11, 18, 2,-16, 3, 0, 2, -3, 11, 1, 14, 0, 3, 2, 13, 1, 2, -1, 3, 0, 3, 2, 10, 4, 2, -4, 3, 0, 3, 2, 10, 1, 12, -4, 13, 0, 2, 1, 10, -3, 13, 0, 3, 2, 13, 1, 3, -1, 5, 0, 2, 1, 12, 2, 13, 2, 3, 1, 10, 2, 12, 1, 13, 0, 3, 1, 10, -1, 13, -2, 11, 0, 2, 1, 12, 2, 11, 1, 3, 2, 10, 5, 2, -5, 3, 0, 2, 2, 10, -4, 13, 0, 3, 2, 10, 6, 2, -6, 3, 0, 2, 2, 12, 2, 13, 0, 3, 2, 10, -2, 13, -2, 11, 0, 2, 2, 12, 2, 11, 0, 2, 2, 10, -4, 11, 0, 3, 2, 10, 7, 2, -7, 3, 0, 3, 2, 10, -1, 12, -4, 13, 0, 4, 2, 10, -1, 12, -2, 13, -2, 11, 0, 3, 2, 10, 8, 2, -8, 3, 0, 3, 2, 10, 9, 2, -9, 3, 0, 3, 4, 10, -3, 12, -1, 13, 0, 3, 6, 10, -1, 12, -3, 13, 0, 3, 4, 10, -2, 12, -1, 13, 1, 3, 5, 10, -1, 12, -2, 13, 0, 2, 6, 10, -3, 13, 0, 4, 4, 10, -1, 12, 1, 13, -2, 11, 0, 3, 2, 10, -3, 12, 1, 13, 0, 2, 3, 10, -2, 12, 0, 3, 4, 10, -1, 12, -1, 13, 1, 2, 5, 10, -2, 13, 0, 3, 6, 10, 1, 12, -3, 13, 0, 3, 4, 10, 1, 13, -2, 11, 0, 3, 2, 10, -2, 12, 1, 13, 1, 2, 3, 10, -1, 12, 0, 4, -2, 10, -1, 13, 2, 3, -2, 5, 0, 2, 4, 10, -1, 13, 0, 4, 2, 10, -2, 12, -1, 13, 2, 11, 0, 3, 4, 10, -3, 13, 2, 11, 0, 4, -2, 10, -1, 13, 2, 2, -2, 3, 0, 3, 2, 10, -1, 12, 1, 13, 2, 4, -2, 10, -1, 13, 1, 3, -1, 5, 0, 1, 3, 10, 0, 3, 4, 10, 1, 12, -1, 13, 1, 4, 2, 10, -1, 12, -1, 13, 2, 11, 1, 4, -2, 10, -1, 13, 1, 2, -1, 3, 0, 3, 2, 10, 3, 13, -2, 11, 0, 2, 2, 12, -3, 13, 0, 3, 1, 10, -1, 12, 2, 13, 0, 4, 2, 10, 1, 13, -1, 11, 1, 14, 0, 4, -2, 10, -2, 13, 18, 2,-16, 3, 0, 5, 2, 10, 1, 13, 4, 3, -8, 4, 3, 5, 0, 2, 2, 10, 1, 13, 1, 5, -2, 10, -1, 13, 4, 3, -8, 4, 3, 5, 0, 3, 2, 10, 18, 2,-16, 3, 0, 4, -2, 10, -1, 13, -1, 11, 1, 14, 0, 4, 4, 10, -1, 13, 2, 3, -2, 5, 0, 4, 4, 10, -1, 13, 3, 2, -3, 3, 0, 2, 3, 10, 1, 12, 1, 3, 4, 10, 2, 12, -1, 13, 0, 4, 2, 10, -1, 13, 1, 11, 1, 14, 0, 3, 2, 10, -1, 13, 2, 11, 0, 2, 1, 12, -3, 13, 1, 2, 1, 10, 2, 13, 0, 3, 2, 10, 1, 12, 1, 13, 1, 3, 1, 12, -1, 13, -2, 11, 1, 2, 1, 10, 2, 11, 0, 4, 2, 10, 1, 12, -1, 13, 2, 11, 0, 1, 3, 13, 0, 4, 2, 10, 1, 13, 2, 3, -2, 5, 0, 3, 1, 10, 1, 12, 2, 13, 0, 3, 2, 10, 2, 12, 1, 13, 0, 3, 1, 13, 1, 11, 1, 14, 0, 2, 1, 13, 2, 11, 0, 3, 1, 10, 1, 12, 2, 11, 0, 4, 2, 10, 2, 12, -1, 13, 2, 11, 0, 2, 1, 13, -4, 11, 0, 2, 1, 10, -4, 13, 0, 2, 1, 12, 3, 13, 1, 3, 1, 12, 1, 13, 2, 11, 1, 2, 2, 10, -5, 13, 0, 3, 2, 10, -3, 13, -2, 11, 0, 3, 2, 10, -1, 13, -4, 11, 0, 3, 6, 10, -2, 12, -2, 13, 0, 2, 4, 10, -3, 12, 0, 3, 6, 10, -1, 12, -2, 13, 0, 2, 4, 10, -2, 12, 1, 2, 6, 10, -2, 13, 0, 2, 4, 10, -1, 12, 1, 2, 5, 10, -1, 13, 0, 3, 6, 10, 1, 12, -2, 13, 0, 4, 4, 10, -1, 12, -2, 13, 2, 11, 0, 3, 4, 10, 2, 13, -2, 11, 0, 3, 2, 10, -2, 12, 2, 13, 0, 1, 4, 10, 0, 3, 2, 10, -2, 12, 2, 11, 0, 3, 4, 10, -2, 13, 2, 11, 0, 3, 2, 10, -1, 12, 2, 13, 1, 2, 3, 10, 1, 13, 0, 2, 4, 10, 1, 12, 1, 3, 2, 10, -1, 12, 2, 11, 1, 3, 3, 10, -1, 13, 2, 11, 0, 2, 2, 10, 2, 13, 0, 3, 3, 10, 1, 12, 1, 13, 0, 3, 2, 10, 1, 11, 1, 14, 0, 2, 2, 10, 2, 11, 0, 2, 1, 12, -4, 13, 0, 2, 1, 10, 3, 13, 0, 3, 2, 10, 1, 12, 2, 13, 1, 3, 1, 12, -2, 13, -2, 11, 0, 3, 1, 10, 1, 13, 2, 11, 0, 3, 2, 10, 1, 12, 2, 11, 0, 1, 4, 13, 0, 3, 1, 10, 1, 12, 3, 13, 0, 2, 2, 13, 2, 11, 0, 4, 1, 10, 1, 12, 1, 13, 2, 11, 0, 1, 4, 11, 0, 2, 1, 12, 4, 13, 0, 3, 1, 12, 2, 13, 2, 11, 0, 3, 2, 10, -4, 13, -2, 11, 0, 3, 6, 10, -2, 12, -1, 13, 0, 2, 8, 10, -3, 13, 0, 3, 6, 10, -1, 12, -1, 13, 0, 3, 4, 10, -2, 12, 1, 13, 0, 2, 6, 10, -1, 13, 0, 3, 4, 10, -1, 12, 1, 13, 1, 3, 6, 10, 1, 12, -1, 13, 0, 4, 4, 10, -1, 12, -1, 13, 2, 11, 0, 3, 2, 10, -2, 12, 3, 13, 0, 2, 4, 10, 1, 13, 0, 3, 4, 10, -1, 13, 2, 11, 0, 3, 2, 10, -1, 12, 3, 13, 0, 3, 4, 10, 1, 12, 1, 13, 0, 4, 2, 10, -1, 12, 1, 13, 2, 11, 0, 2, 2, 10, 3, 13, 0, 3, 2, 10, 1, 13, 2, 11, 0, 3, 2, 10, -1, 13, 4, 11, 0, 3, 2, 10, 1, 12, 3, 13, 0, 3, 1, 12, -3, 13, -2, 11, 0, 3, 1, 10, 2, 13, 2, 11, 0, 4, 2, 10, 1, 12, 1, 13, 2, 11, 0, 1, 5, 13, 0, 2, 3, 13, 2, 11, 0, 2, 1, 13, 4, 11, 0, 3, 1, 12, 3, 13, 2, 11, 0, 2, 8, 10, -2, 13, 0, 2, 6, 10, -1, 12, 0, 1, 6, 10, 0, 3, 6, 10, -2, 13, 2, 11, 0, 3, 4, 10, -1, 12, 2, 13, 0, 3, 4, 10, -1, 12, 2, 11, 0, 2, 4, 10, 2, 13, 0, 2, 4, 10, 2, 11, 0, 3, 2, 10, -1, 12, 4, 13, 0, 3, 4, 10, 1, 12, 2, 13, 0, 4, 2, 10, -1, 12, 2, 13, 2, 11, 0, 2, 2, 10, 4, 13, 0, 3, 2, 10, 2, 13, 2, 11, 0, 2, 2, 10, 4, 11, 0, 1, 6, 13, 0, 2, 4, 13, 2, 11, 0, 2, 2, 13, 4, 11, 0, 3, 6, 10, -1, 12, 1, 13, 0, 2, 6, 10, 1, 13, 0, 2, 4, 10, 3, 13, 0, 3, 4, 10, 1, 13, 2, 11, 0, 2, 2, 10, 5, 13, 0, 3, 2, 10, 3, 13, 2, 11, 0, -1 }; static long tabrl[] = {-1}; static long tabbl[] = {-1}; static long tabll[] = { -3, -4, 4, -1856, 0, 8043, -9, -1082, -1, -310, -1, -522, -330, -1449, -853, 4656, -66, 7, -1, 9996928, -66, 6, 23, 183, 0, 173, 0, -56, 0, 50, 0, -785, 1, 51, 0, -60, 1, 11843, 0, -50754, 0, 1834, 1, -7910, 0, -48060, 1, 56, 0, 13141, -1, -56318, 0, 2541, -1, -649, -133, 778, -46, 8, 1, 1665737, -47, 7, 0, 65, 0, 45, 0, -138, 0, -1005, 0, -2911, 0, -47, 0, 96, 0, -394, 2, 76, 2, -17302, 0, 74337, 0, -101, 0, 58, 0, -171, 0, -77, 0, -1283, 0, 2686, 0, -55, 0, 99, 0, 55, 0, 397, 0, 540, 0, 626, -1, -5188, 0, 10857, 0, -216, -2, -123, 0, 6337, 2, 224, -152, -23472, -29, -74336, 0, 295775, -20, 149, -2, 84, 9, 304, 0, -3051, -70, -6, -57, 34, 0, -638, 0, -201, -73, 9, 0, -100, -101, -8, 0, -57, 0, -207, -3, 80, -45, 45, -5, 102, -59, -23, 52, 201, -48, 233, -220, 71, 4, 2810, 0, 6236541, -61, 218, -216, 67, 51, 201, -59, -23, -144, -837, -457, 3029, -45, 42, -15, 73, -6, -169, 0, 135, -64, -7, 0, -16245, 0, -81, -74, -10, 0, 702, 0, -3013, 0, -5889, 1, 141, 58, 9598, 12, 30443, 1, -120946, -1, -84, -2, 11246, -1, -48391, 0, 1393, 0, 200, -136, -17, 0, 558, -64, -8, 0, -71, 0, 317577, -28, 183, 1, 219, 0, 421, 0, -133, 501, -139, 3, 354, -101, -13, 74, 7, 144, -84, 59, -2, 1, 64, -2931, 12559, -4641, 2638, -303, -2058, -13, -100, -123, -79, -19214, 6084, 1494, 26993, 15213, -82219, 42, 52, 48, -101, -53, -4, 4, 47, 58, -131, 46, 14, -21, -6, -1311, -8791, 10198, -4185, 2815, 5640, 167, 422, -229, 83, 3140, 39, 1221, 120, 96, -30, -1, 184612405, 187, 416, -226, 81, -1985, -10083, 9983, -4464, 2807, 5643, -21, -9, 113, -367, 120, 580, -667, 27, 8, 66, -56, -6, 337, 95, -87, 3303, -1, 65, 68, -374, 0, -574, 15, -94, 0, -53, 0, -1303, 0, -236, 283, 36, -1, -54, 269, -35, 0, -83, 0, -52, 0, 730, 0, -3129, 0, 813, 0, -4299, 1, 59, -6, 5130, 1, 16239, -1, -64603, 0, -80, 91, 12, 0, -561, 133, -17, 0, 250, -12, 71, 0, 155664, 82, -11, 0, 106, 0, -604, 0, 21862, 55, -7, 0, -1514, 0, 6501, 0, 906, 0, -68, 0, 241, 0, 366, 0, 70, 0, -1382, 0, 5957, 0, 113, 0, -51, 0, -55, 0, 731, 0, -264, 0, 65788, 1, -1504, 0, 3147, 0, 217, 0, -4105, 0, 17658, 1, 69, 0, -3518, 0, -1767, -43, -7044, -10, -22304, 0, 88685, 3, 91, 0, -485, 0, -57, -1, 333548, -24, 172, 11, 544, 1, -1132, 0, 353, 0, -188, 0, 53, 0, 77, 158, -887, 35, 131, -54, 13, 0, 1994821, -53, 14, 36, 125, 2, 56, 0, -243, 0, -364, -2, 1916, 0, -8227, 0, 15700, -1, -67308, 1, 66, 0, -53686, 1, 3058, 1, -13177, 0, -72, 0, -72, 0, 61, 0, 15812, 0, 165, 8, -96, 318, 1341, 803, -4252, 24, 193, 1137, -226, 310, 622, -56, 30, -3, 10101666, -56, 30, 1096, -225, 300, 600, -31, 409, -1, -507, 0, -287, 0, -1869, 0, 8026, 1, 544, -1, -1133, 0, 27984, 0, -62, 0, -249, 0, 187, 0, -1096, 1, 53, 2, 12388, 0, -53107, 0, -322, 0, -94, 0, 15157, 0, -582, 0, 3291, 0, 565, 0, 106, 0, 112, 0, 306, 0, 809, 0, 130, 0, -961, 0, 4149, 0, 174, 0, -105, 0, 2196, 0, 59, 0, 36737, -1, -1832, 0, 3835, 0, -139, 0, 24138, 0, 1325, 1, 64, 0, -361, 0, -1162, -44, -6320, -10, -20003, 0, 79588, 2, 80, 0, -2059, 0, -304, 0, 21460, 0, -166, 0, -87, 89, -493, 32, 114, 34, 510, 1, 1172616, 31, 113, -1, 57, 0, 214, 0, -656, 0, -646, 0, 1850, 0, -7931, 0, -6674, 0, 2944, 0, -12641, 0, 916, 45, -255, 16, 60, -1, 619116, 16, 57, 0, -58, 0, 1045, 0, -156, -15, 88, 0, -62964, 0, -126, 0, 1490, 0, -6387, 0, 119, 0, 1338, 0, -56, 0, 204, 0, 153, 0, 940, 0, 251, 0, 312, 0, 584, 0, -786, 0, 3388, 0, -52, 0, 4733, 0, 618, 0, 29982, 0, 101, 0, -174, 0, -2637, 0, 11345, 0, -284, 0, -524, 0, -121, 0, 1464, 11, -60, -1, 151205, 0, 139, 0, -2448, 0, -51, 0, -768, 0, -638, 0, 552, 0, -2370, 0, 70, 0, 64, 0, 57, 0, 39840, 0, 104, 0, -10194, 0, -635, 0, 69, 0, 113, 0, 67, 0, 96, 0, 367, 0, 134, 0, 596, 0, 63, 0, 1622, 0, 483, 0, 72, 0, 11917, 0, -63, 0, 1273, 0, -66, 0, -262, 0, -97, 0, 103, 0, 15196, 0, -1445, 0, -66, 0, -55, 0, -323, 0, 2632, 0, -1179, 0, 59, 0, -56, 0, 78, 0, 65, 0, 422, 0, 309, 0, 2125, 0, -66, 0, 124, 0, -57, 0, 1379, 0, -304, 0, 177, 0, -118, 0, 146, 0, 283, 0, 119, }; static char argsl[] = { 0, 1, 3, 1, 10, 1, 12, -1, 11, 1, 4, 2, 10, 2, 12, -1, 13, -1, 11, 0, 5, 2, 10, -1, 13, -1, 11, 3, 2, -3, 3, 0, 5, 2, 10, -1, 13, -1, 11, 2, 3, -2, 5, 0, 2, -1, 13, 1, 14, 1, 5, -1, 13, 1, 11, 4, 3, -8, 4, 3, 5, 0, 2, 1, 13, -1, 11, 0, 5, 1, 13, -1, 11, 4, 3, -8, 4, 3, 5, 0, 5, 2, 10, -1, 13, -1, 11, 2, 3, -3, 5, 0, 4, 1, 10, 1, 12, -2, 13, 1, 11, 0, 4, 1, 13, -1, 11, 1, 2, -1, 3, 0, 5, 2, 10, -1, 13, -1, 11, 2, 2, -2, 3, 0, 3, 1, 10, -2, 13, 1, 11, 0, 4, 1, 13, -1, 11, 1, 3, -1, 5, 0, 4, -1, 13, 1, 11, 1, 2, -1, 3, 0, 3, 1, 12, 1, 13, -1, 11, 1, 4, 2, 10, 1, 12, -1, 13, -1, 11, 1, 2, 1, 10, -1, 11, 0, 4, -1, 13, 1, 11, 1, 3, -1, 5, 0, 3, 1, 12, -1, 13, 1, 11, 1, 3, 2, 10, -3, 13, 1, 11, 0, 3, 2, 12, 1, 13, -1, 11, 0, 3, -2, 10, 1, 13, 1, 14, 0, 6, -2, 10, 1, 13, 1, 11, 4, 3, -8, 4, 3, 5, 0, 3, 2, 10, -1, 13, -1, 11, 0, 6, 2, 10, -1, 13, -1, 11, 4, 3, -8, 4, 3, 5, 0, 4, -1, 13, 1, 11, 2, 3, -2, 5, 0, 4, -1, 13, 1, 11, 3, 2, -3, 3, 0, 3, 1, 10, -1, 12, -1, 11, 0, 3, 2, 12, -1, 13, 1, 11, 0, 3, 2, 10, 1, 13, -3, 11, 0, 5, -2, 10, 1, 13, 1, 11, 1, 2, -1, 3, 0, 4, 2, 10, -1, 12, -3, 13, 1, 11, 0, 3, 3, 10, -2, 13, -1, 11, 0, 5, -2, 10, 1, 13, 1, 11, 1, 3, -1, 5, 0, 4, 2, 10, -1, 12, -1, 13, -1, 11, 1, 2, 3, 10, -3, 11, 0, 5, -2, 10, 1, 13, 1, 11, 2, 2, -2, 3, 0, 4, 2, 10, -1, 12, 1, 13, -3, 11, 0, 3, 4, 10, -3, 13, -1, 11, 0, 4, 2, 10, -2, 12, -1, 13, -1, 11, 1, 3, 4, 10, -1, 13, -3, 11, 0, 4, 2, 10, -3, 12, -1, 13, -1, 11, 0, 3, 4, 10, -1, 12, -3, 11, 0, 3, 2, 10, -3, 12, -1, 11, 0, 4, 4, 10, -1, 12, -2, 13, -1, 11, 0, 2, 4, 10, -3, 11, 0, 3, 2, 10, -2, 12, -1, 11, 1, 4, 3, 10, -1, 12, -1, 13, -1, 11, 0, 4, -2, 10, 1, 11, 2, 3, -2, 5, 0, 3, 4, 10, -2, 13, -1, 11, 0, 4, -2, 10, 1, 11, 2, 2, -2, 3, 0, 3, 2, 10, -1, 12, -1, 11, 2, 3, -2, 10, 1, 12, 1, 14, 0, 4, -2, 10, 1, 11, 2, 3, -2, 4, 0, 4, -2, 10, 1, 11, 1, 3, -1, 5, 0, 3, 3, 10, -1, 13, -1, 11, 0, 4, -2, 10, 1, 11, 3, 2, -4, 3, 0, 4, -2, 10, 1, 11, 1, 3, -2, 5, 0, 4, 2, 10, -1, 12, -2, 13, 1, 11, 0, 4, -2, 10, 1, 11, 1, 2, -1, 3, 0, 2, -1, 10, 1, 2, 0, 3, 2, 10, 2, 13, -3, 11, 0, 4, -2, 10, 1, 11, 2, 2, -3, 3, 0, 3, 2, 12, -2, 13, 1, 11, 0, 4, 1, 10, -1, 12, 1, 13, -1, 11, 0, 3, -2, 10, 1, 11, 1, 5, 0, 4, 2, 10, -1, 11, 1, 3, -2, 4, 0, 3, 2, 10, -2, 11, 1, 14, 0, 4, -2, 10, 1, 11, 8, 2,-13, 3, 0, 5, -2, 10, -1, 13, 1, 11, 18, 2,-16, 3, 0, 5, 2, 10, -1, 11, 4, 3, -8, 4, 3, 5, 1, 2, 2, 10, -1, 11, 1, 5, -2, 10, 1, 11, 4, 3, -8, 4, 3, 5, 1, 5, 2, 10, -1, 13, -1, 11, 18, 2,-16, 3, 0, 4, 2, 10, -1, 11, 8, 2,-13, 3, 0, 2, -2, 10, 1, 14, 1, 4, -2, 10, 1, 11, 1, 3, -2, 4, 0, 3, 2, 10, -1, 11, 1, 5, 0, 2, 2, 12, -1, 11, 0, 4, 3, 10, 1, 12, -1, 13, -1, 11, 0, 4, 2, 10, -1, 11, 2, 2, -3, 3, 0, 3, 2, 10, -2, 13, 1, 11, 0, 4, 2, 10, -1, 11, 1, 2, -1, 3, 0, 3, 1, 10, 1, 2, -2, 3, 0, 3, 1, 12, -2, 13, 1, 11, 1, 3, 1, 10, 1, 13, -1, 11, 0, 4, 2, 10, -1, 11, 1, 3, -1, 5, 0, 3, 2, 10, 1, 12, -1, 11, 2, 3, -2, 10, -1, 12, 1, 14, 0, 2, 1, 12, -1, 11, 1, 3, 1, 10, -1, 13, 1, 11, 0, 4, 2, 10, -1, 11, 2, 2, -2, 3, 0, 3, 1, 10, 2, 2, -3, 3, 0, 4, 2, 10, 1, 12, -2, 13, 1, 11, 0, 3, -1, 10, 1, 2, -2, 3, 0, 3, -1, 11, 1, 2, -1, 3, 0, 2, 2, 13, -1, 11, 0, 2, -2, 13, 1, 14, 0, 4, 2, 10, -1, 11, 2, 3, -2, 5, 0, 4, 2, 10, -1, 11, 3, 2, -3, 3, 0, 4, 2, 10, 2, 12, -2, 13, -1, 11, 0, 3, 1, 10, 1, 3, -2, 5, 0, 4, 1, 10, 1, 12, 1, 13, -1, 11, 0, 3, 1, 10, 3, 2, -4, 3, 0, 3, 1, 10, 1, 3, -1, 5, 0, 3, 1, 10, 1, 3, -2, 6, 0, 3, 1, 10, 2, 3, -2, 4, 0, 4, 1, 10, 1, 12, -1, 13, -1, 11, 0, 3, 2, 10, 2, 12, -1, 11, 2, 4, 1, 10, 1, 3, 2, 5, -5, 6, 1, 1, 1, 14, 2, 3, 1, 10, 8, 2,-12, 3, 1, 5, -2, 10, 1, 13, -1, 11, 20, 2,-21, 3, 0, 5, 2, 10, -2, 13, 1, 11, 2, 3, -3, 5, 0, 3, 1, 10, 1, 3, 1, 6, 0, 4, -1, 13, -1, 11, 26, 2,-29, 3, 0, 3, -1, 11, 8, 2,-13, 3, 0, 4, -1, 13, -1, 11, 18, 2,-16, 3, 2, 4, -1, 13, 1, 11, 10, 2, -3, 3, 1, 1, 1, 11, 3, 4, -1, 13, -1, 11, 10, 2, -3, 3, 1, 4, -1, 13, 1, 11, 18, 2,-16, 3, 2, 3, 1, 11, 8, 2,-13, 3, 0, 2, 1, 10, 2, 4, 0, 4, 2, 10, -1, 11, 5, 2, -6, 3, 1, 5, 2, 10, -2, 13, -1, 11, 2, 3, -3, 5, 0, 5, -2, 10, 1, 13, 1, 11, 20, 2,-21, 3, 0, 3, 1, 10, 1, 3, 1, 5, 0, 2, -2, 11, 1, 14, 0, 5, 2, 10, -2, 13, 1, 11, 2, 3, -2, 5, 0, 3, 1, 10, 5, 2, -7, 3, 0, 4, 1, 10, 1, 12, -1, 13, 1, 11, 0, 3, 1, 10, 2, 2, -2, 3, 0, 4, 2, 10, 2, 12, -2, 13, 1, 11, 0, 2, 2, 13, -3, 11, 0, 4, 2, 10, -1, 11, 4, 2, -4, 3, 0, 3, 1, 10, 4, 2, -5, 3, 0, 3, 1, 10, -3, 13, 1, 11, 0, 2, 1, 10, 1, 2, 0, 3, 1, 11, 1, 2, -1, 3, 0, 4, 2, 10, -1, 11, 3, 3, -3, 5, 0, 3, 1, 12, 2, 13, -1, 11, 1, 4, 2, 10, 1, 12, -2, 13, -1, 11, 0, 3, 1, 10, -1, 13, -1, 11, 0, 3, 1, 11, 1, 3, -1, 5, 0, 2, 1, 12, 1, 11, 2, 4, 2, 10, -1, 11, 5, 2, -5, 3, 0, 3, 1, 10, 5, 2, -6, 3, 0, 3, 2, 10, 1, 12, -3, 11, 0, 3, 1, 10, 2, 2, -1, 3, 0, 3, 2, 10, -4, 13, 1, 11, 0, 3, -2, 10, 2, 13, 1, 14, 0, 3, 2, 10, -2, 13, -1, 11, 0, 3, 1, 10, 3, 2, -2, 3, 0, 4, 1, 10, -1, 12, -1, 13, -1, 11, 0, 2, 2, 12, 1, 11, 0, 2, 2, 10, -3, 11, 0, 3, 1, 10, 4, 2, -3, 3, 0, 4, 2, 10, -1, 12, -2, 13, -1, 11, 1, 3, 2, 10, -1, 12, -3, 11, 0, 3, 4, 10, -4, 13, -1, 11, 0, 4, 2, 10, -2, 12, -2, 13, -1, 11, 0, 4, 4, 10, -2, 12, -1, 13, -1, 11, 0, 3, 6, 10, -3, 13, -1, 11, 0, 4, 4, 10, -1, 12, -1, 13, -1, 11, 1, 4, 2, 10, -3, 12, -1, 13, 1, 11, 0, 3, 5, 10, -2, 13, -1, 11, 0, 3, 4, 10, 1, 13, -3, 11, 0, 4, 2, 10, -2, 12, 1, 13, -1, 11, 0, 3, 3, 10, -1, 12, -1, 11, 0, 3, 4, 10, -1, 13, -1, 11, 0, 4, 2, 10, -2, 12, -1, 13, 1, 11, 1, 3, 4, 10, -3, 13, 1, 11, 0, 4, 2, 10, -1, 12, 1, 13, -1, 11, 1, 5, -2, 10, 1, 13, -1, 11, 2, 2, -2, 3, 0, 2, 3, 10, -1, 11, 0, 4, 4, 10, 1, 12, -1, 13, -1, 11, 0, 4, 2, 10, -1, 12, -1, 13, 1, 11, 2, 5, -2, 10, 1, 13, -1, 11, 1, 3, -1, 5, 0, 3, 3, 10, -2, 13, 1, 11, 0, 5, -2, 10, 1, 13, -1, 11, 1, 2, -1, 3, 0, 3, 2, 10, 1, 13, -1, 11, 0, 3, -2, 10, -1, 13, 1, 14, 0, 3, 2, 12, -1, 13, -1, 11, 1, 3, 3, 10, 1, 12, -1, 11, 0, 3, 1, 10, -1, 12, 1, 11, 0, 4, -1, 13, -1, 11, 3, 2, -3, 3, 0, 4, -1, 13, -1, 11, 2, 3, -2, 5, 0, 3, 2, 10, -1, 13, 1, 14, 0, 4, -2, 10, -1, 11, 18, 2,-16, 3, 0, 6, 2, 10, -1, 13, 1, 11, 4, 3, -8, 4, 3, 5, 0, 3, 2, 10, -1, 13, 1, 11, 0, 6, -2, 10, 1, 13, -1, 11, 4, 3, -8, 4, 3, 5, 0, 5, 2, 10, -2, 13, 1, 11, 18, 2,-16, 3, 0, 4, -2, 10, 1, 13, -2, 11, 1, 14, 0, 3, 1, 12, -3, 13, 1, 11, 0, 3, 1, 10, 2, 13, -1, 11, 0, 4, 2, 10, 1, 12, 1, 13, -1, 11, 1, 3, 1, 12, -1, 13, -1, 11, 1, 4, -1, 13, -1, 11, 1, 3, -1, 5, 0, 2, 1, 10, 1, 11, 0, 4, 2, 10, 1, 12, -1, 13, 1, 11, 1, 3, 1, 12, 1, 13, -3, 11, 0, 4, -1, 13, -1, 11, 1, 2, -1, 3, 0, 5, 2, 10, -1, 13, 1, 11, 2, 2, -2, 3, 0, 2, 3, 13, -1, 11, 0, 4, 1, 10, 1, 12, -2, 13, -1, 11, 0, 4, 2, 10, 2, 12, 1, 13, -1, 11, 0, 2, 1, 13, 1, 14, 1, 5, 2, 10, -1, 13, 1, 11, 2, 3, -3, 5, 0, 4, -2, 13, -1, 11, 18, 2,-16, 3, 1, 5, 1, 13, 1, 11, 4, 3, -8, 4, 3, 5, 0, 2, 1, 13, 1, 11, 0, 5, -1, 13, -1, 11, 4, 3, -8, 4, 3, 5, 0, 3, 1, 11, 18, 2,-16, 3, 1, 3, -1, 13, -2, 11, 1, 14, 0, 5, 2, 10, -1, 13, 1, 11, 2, 3, -2, 5, 0, 5, 2, 10, -1, 13, 1, 11, 3, 2, -3, 3, 0, 3, 1, 10, 1, 12, 1, 11, 1, 4, 2, 10, 2, 12, -1, 13, 1, 11, 1, 2, 1, 13, -3, 11, 0, 4, 1, 13, 1, 11, 1, 2, -1, 3, 0, 3, 1, 12, 3, 13, -1, 11, 0, 4, 2, 10, 1, 12, -3, 13, -1, 11, 0, 3, 1, 10, -2, 13, -1, 11, 0, 4, 1, 13, 1, 11, 1, 3, -1, 5, 0, 3, 1, 12, 1, 13, 1, 11, 1, 2, 1, 10, -3, 11, 0, 3, 1, 12, -1, 13, 3, 11, 0, 3, 2, 10, -3, 13, -1, 11, 0, 3, 2, 12, 1, 13, 1, 11, 0, 3, 2, 10, -1, 13, -3, 11, 0, 4, 2, 10, -1, 12, -3, 13, -1, 11, 0, 4, 2, 10, -1, 12, -1, 13, -3, 11, 0, 4, 6, 10, -1, 12, -2, 13, -1, 11, 0, 3, 4, 10, -2, 12, -1, 11, 0, 3, 6, 10, -2, 13, -1, 11, 0, 4, 4, 10, -2, 12, -2, 13, 1, 11, 0, 3, 4, 10, -1, 12, -1, 11, 1, 3, 2, 10, -3, 12, 1, 11, 0, 3, 5, 10, -1, 13, -1, 11, 0, 4, 4, 10, -1, 12, -2, 13, 1, 11, 0, 4, 2, 10, -2, 12, 2, 13, -1, 11, 0, 2, 4, 10, -1, 11, 0, 3, 2, 10, -2, 12, 1, 11, 1, 4, 3, 10, -1, 12, -1, 13, 1, 11, 0, 3, 4, 10, -2, 13, 1, 11, 0, 4, 2, 10, -1, 12, 2, 13, -1, 11, 0, 4, -2, 10, -1, 11, 2, 2, -2, 3, 0, 3, 3, 10, 1, 13, -1, 11, 0, 3, 4, 10, 1, 12, -1, 11, 0, 3, 2, 10, -1, 12, 1, 11, 2, 4, -2, 10, -1, 11, 1, 3, -1, 5, 0, 3, 3, 10, -1, 13, 1, 11, 0, 4, 4, 10, 1, 12, -2, 13, 1, 11, 0, 3, 2, 10, 2, 13, -1, 11, 0, 3, 2, 12, -2, 13, -1, 11, 0, 4, 1, 10, -1, 12, 1, 13, 1, 11, 0, 2, 2, 10, 1, 14, 0, 5, -2, 10, -1, 13, -1, 11, 18, 2,-16, 3, 0, 2, 2, 10, 1, 11, 1, 5, 2, 10, -1, 13, 1, 11, 18, 2,-16, 3, 0, 3, -2, 10, -2, 11, 1, 14, 0, 4, 3, 10, 1, 12, -1, 13, 1, 11, 0, 3, 2, 10, -2, 13, 3, 11, 0, 4, 2, 10, 1, 12, 2, 13, -1, 11, 0, 3, 1, 12, -2, 13, -1, 11, 1, 3, 1, 10, 1, 13, 1, 11, 0, 3, 2, 10, 1, 12, 1, 11, 1, 2, 4, 13, -1, 11, 0, 2, 2, 13, 1, 14, 0, 4, -3, 13, -1, 11, 18, 2,-16, 3, 0, 2, 2, 13, 1, 11, 0, 4, 1, 13, 1, 11, 18, 2,-16, 3, 0, 4, 2, 10, 1, 11, 2, 3, -2, 5, 0, 4, 1, 10, 1, 12, 1, 13, 1, 11, 0, 3, 2, 10, 2, 12, 1, 11, 0, 2, 2, 11, 1, 14, 0, 1, 3, 11, 0, 3, 1, 10, -3, 13, -1, 11, 0, 3, 1, 12, 2, 13, 1, 11, 1, 2, 1, 12, 3, 11, 0, 3, 2, 10, -4, 13, -1, 11, 0, 3, 2, 12, 2, 13, 1, 11, 0, 3, 2, 10, -2, 13, -3, 11, 0, 4, 6, 10, -1, 12, -1, 13, -1, 11, 0, 3, 6, 10, -1, 13, -1, 11, 0, 4, 4, 10, -2, 12, -1, 13, 1, 11, 0, 3, 6, 10, -3, 13, 1, 11, 0, 4, 4, 10, -1, 12, 1, 13, -1, 11, 0, 4, 4, 10, -1, 12, -1, 13, 1, 11, 1, 3, 5, 10, -2, 13, 1, 11, 0, 3, 4, 10, 1, 13, -1, 11, 0, 4, 2, 10, -2, 12, 1, 13, 1, 11, 0, 3, 4, 10, -1, 13, 1, 11, 0, 4, 2, 10, -1, 12, 3, 13, -1, 11, 0, 4, 4, 10, 1, 12, 1, 13, -1, 11, 0, 4, 2, 10, -1, 12, 1, 13, 1, 11, 1, 2, 3, 10, 1, 11, 0, 4, 4, 10, 1, 12, -1, 13, 1, 11, 0, 4, 2, 10, -1, 12, -1, 13, 3, 11, 0, 3, 2, 10, 3, 13, -1, 11, 0, 3, 2, 10, 1, 13, 1, 14, 0, 3, 2, 10, 1, 13, 1, 11, 0, 3, 3, 10, 1, 12, 1, 11, 0, 3, 2, 10, -1, 13, 3, 11, 0, 4, 2, 10, 1, 12, 3, 13, -1, 11, 0, 3, 1, 12, -3, 13, -1, 11, 0, 3, 1, 10, 2, 13, 1, 11, 0, 4, 2, 10, 1, 12, 1, 13, 1, 11, 1, 3, 1, 12, -1, 13, -3, 11, 0, 2, 1, 10, 3, 11, 0, 2, 5, 13, -1, 11, 0, 2, 3, 13, 1, 11, 0, 4, 1, 10, 1, 12, 2, 13, 1, 11, 0, 2, 1, 13, 3, 11, 0, 3, 1, 12, 3, 13, 1, 11, 0, 3, 1, 12, 1, 13, 3, 11, 0, 3, 2, 10, -5, 13, -1, 11, 0, 3, 6, 10, -1, 12, -1, 11, 0, 4, 6, 10, -1, 12, -2, 13, 1, 11, 0, 2, 6, 10, -1, 11, 0, 3, 4, 10, -2, 12, 1, 11, 0, 3, 6, 10, -2, 13, 1, 11, 0, 4, 4, 10, -1, 12, 2, 13, -1, 11, 0, 3, 4, 10, -1, 12, 1, 11, 0, 3, 4, 10, 2, 13, -1, 11, 0, 4, 2, 10, -2, 12, 2, 13, 1, 11, 0, 2, 4, 10, 1, 11, 0, 3, 4, 10, -2, 13, 3, 11, 0, 4, 2, 10, -1, 12, 2, 13, 1, 11, 0, 3, 3, 10, 1, 13, 1, 11, 0, 3, 4, 10, 1, 12, 1, 11, 0, 3, 2, 10, -1, 12, 3, 11, 0, 3, 2, 10, 4, 13, -1, 11, 0, 3, 2, 10, 2, 13, 1, 11, 0, 2, 2, 10, 3, 11, 0, 3, 1, 12, -4, 13, -1, 11, 0, 3, 1, 10, 3, 13, 1, 11, 0, 4, 2, 10, 1, 12, 2, 13, 1, 11, 0, 2, 4, 13, 1, 11, 0, 2, 2, 13, 3, 11, 0, 1, 5, 11, 0, 3, 1, 12, 4, 13, 1, 11, 0, 4, 6, 10, -1, 12, -1, 13, 1, 11, 0, 3, 6, 10, 1, 13, -1, 11, 0, 3, 6, 10, -1, 13, 1, 11, 0, 4, 4, 10, -1, 12, 1, 13, 1, 11, 0, 3, 4, 10, 1, 13, 1, 11, 0, 3, 4, 10, -1, 13, 3, 11, 0, 4, 2, 10, -1, 12, 3, 13, 1, 11, 0, 4, 4, 10, 1, 12, 1, 13, 1, 11, 0, 3, 2, 10, 3, 13, 1, 11, 0, 3, 2, 10, 1, 13, 3, 11, 0, 2, 5, 13, 1, 11, 0, 2, 3, 13, 3, 11, 0, 2, 6, 10, 1, 11, 0, 3, 4, 10, 2, 13, 1, 11, 0, 3, 2, 10, 4, 13, 1, 11, 0, -1 }; /*//////////////////////////Mars starts here///////////////////////////////////////*/ static double tablmr[] = { 43471.66140, 21291.11063, 2033.37848, 6890507597.78366, 1279543.73631, 317.74183, 730.69258, -15.26502, 277.56960, -62.96711, 20.96285, 1.01857, -2.19395, 3.75708, 3.65854, 0.01049, 1.09183, -0.00605, -0.04769, 0.41839, 0.10091, 0.03887, 0.11666, -0.03301, 0.02664, 0.38777, -0.56974, 0.02974, -0.15041, 0.02179, -0.00808, 0.08594, 0.09773, -0.00902, -0.04597, 0.00762, -0.03858, -0.00139, 0.01562, 0.02019, 0.01878, -0.01244, 0.00795, 0.00815, 0.03501, -0.00335, -0.02970, -0.00518, -0.01763, 0.17257, 0.14698, -0.14417, 0.26028, 0.00062, -0.00180, 13.35262, 39.38771, -15.49558, 22.00150, -7.71321, -4.20035, 0.62074, -1.42376, 0.07043, -0.06670, 0.16960, -0.06859, 0.07787, 0.01845, -0.01608, -0.00914, 5.60438, -3.44436, 5.88876, 6.77238, -5.29704, 3.48944, 0.01291, 0.01280, -0.53532, 0.86584, 0.79604, 0.31635, -3.92977, -0.94829, -0.74254, -1.37947, 0.17871, -0.12477, 0.00171, 0.11537, 0.02281, -0.03922, -0.00165, 0.02965, 1.59773, 1.24565, -0.35802, 1.37272, -0.44811, -0.08611, 3.04184, -3.39729, 8.86270, 6.65967, -9.10580, 10.66103, 0.02015, -0.00902, -0.01166, -0.23957, -0.12128, -0.04640, -0.07114, 0.14053, -0.04966, -0.01665, 0.28411, -0.37754, -1.26265, 1.01377, 3.70433, -0.21025, -0.00972, 0.00350, 0.00997, 0.00450, -2.15305, 3.18147, -1.81957, -0.02321, -0.02560, -0.35188, 0.00003, -0.01110, 0.00244, -0.05083, -0.00216, -0.02026, 0.05179, 0.04188, 5.92031, -1.61316, 3.72001, 6.98783, -4.17690, 2.61250, 0.04157, 2.76453, -1.34043, 0.74586, -0.20258, -0.30467, 0.00733, 0.00376, 1.72800, 0.76593, 1.26577, -2.02682, -1.14637, -0.91894, -0.00002, 0.00036, 2.54213, 0.89533, -0.04166, 2.36838, -0.97069, 0.05486, 0.46927, 0.04500, 0.23388, 0.35005, 1.61402, 2.30209, -0.99859, 1.63349, -0.51490, -0.26112, 0.27848, -0.26100, -0.07645, -0.22001, 0.92901, 1.12627, -0.39829, 0.77120, -0.23716, -0.11245, -0.02387, 0.03960, -0.00802, 0.02179, 2.86448, 1.00246, -0.14647, 2.80278, -1.14143, 0.05177, 1.68671, -1.23451, 3.16285, 0.70070, 0.25817, 3.17416, 0.07447, -0.08116, -0.03029, -0.02795, 0.00816, 0.01023, 0.00685, -0.01075, -0.34268, 0.03680, -0.05488, -0.07430, -0.00041, -0.02968, 3.13228, -0.83209, 1.95765, 3.78394, -2.26196, 1.38520, -0.00401, -0.01397, 1.01604, -0.99485, 0.62465, 0.22431, -0.05076, 0.12025, 4.35229, -5.04483, 14.87533, 9.00826, -10.37595, 19.26596, 0.40352, 0.19895, 0.09463, -0.10774, -0.17809, -0.08979, -0.00796, -0.04313, 0.01520, -0.03538, 1.53301, -1.75553, 4.87236, 3.23662, -3.62305, 6.42351, -0.00439, -0.01305, 0.17194, -0.64003, 0.26609, 0.06600, 0.01767, -0.00251, -0.08871, -0.15523, 0.01201, -0.03408, -0.29126, -0.07093, -0.00998, -0.07876, 1.05932, -25.38650, -0.29354, 0.04179, -0.01726, 0.07473, -0.07607, -0.08859, 0.00842, -0.02359, 0.47858, -0.39809, 1.25061, 0.87017, -0.82453, 1.56864, -0.00463, 0.02385, -0.29070, 8.56535, -0.12495, 0.06580, -0.03395, -0.02465, -1.06759, 0.47004, -0.40281, -0.23957, 0.03572, -0.07012, 0.00571, -0.00731, 0.18601, -1.34068, 0.03798, -0.00532, 0.00448, -0.01147, 1.41208, -0.00668, 0.25883, 1.23788, -0.57774, 0.09166, -2.49664, -0.25235, -0.53582, -0.80126, 0.10827, -0.08861, -0.03577, 0.06825, -0.00143, 0.04633, 0.01586, -0.01056, -0.02106, 0.03804, -0.00088, -0.03458, -0.00033, -0.01079, 0.05821, -0.02445, 0.00602, 0.00721, -0.00315, -0.01021, -0.65454, 1.08478, -0.44593, -0.21492, -1.35004, 4.47299, -4.19170, 3.51236, 1946.04629, 13960.88247, 576.24572, 8023.81797, 2402.48512, -753.87007, -6376.99217, -10278.88014, -25743.89874, 15506.87748, 15609.59853, 35173.63133, -3.70370, 6.29538, -4.84183, -0.76942, -0.02465, -0.03840, 0.00565, -0.06071, 0.01174, 0.00253, -0.00230, 0.05252, -0.02813, 0.01359, 0.23208, 0.03393, 0.01734, 0.04838, -0.46340, -0.18941, 0.25428, -0.56925, 0.05213, 0.24704, 0.12922, -0.01531, 0.06885, -0.08510, 0.01853, -0.00390, 0.01196, -0.30530, 0.13117, -0.03533, 1.79597, -0.42743, 0.98545, 2.13503, -1.32942, 0.68005, -0.01226, 0.00571, 0.31081, 0.34932, 0.34531, -0.32947, -0.00548, 0.00186, -0.00157, -0.00065, 0.30877, -0.03864, 0.04921, 0.06693, 0.01761, -0.04119, 1.28318, 0.38546, 0.06462, 1.18337, -0.48698, 0.07086, 0.26031, -0.22813, 0.10272, 0.04737, -0.04506, -0.38581, -0.16624, -0.04588, 0.00992, 0.00722, -0.21041, 0.20560, -0.09267, -0.03438, 0.32264, -0.07383, 0.09553, -0.38730, 0.17109, -0.01342, -0.02336, -0.01286, 0.00230, 0.04626, 0.01176, 0.01868, -0.15411, -0.32799, 0.22083, -0.14077, 1.98392, 1.68058, -0.02526, -0.13164, -0.04447, -0.00153, 0.01277, 0.00553, -0.26035, -0.11362, 0.14672, -0.32242, 0.16686, -0.69957, 0.40091, -0.06721, 0.00837, 0.09635, -0.08545, 0.25178, -0.22486, 16.03256, 0.34130, -0.06313, 0.01469, -0.09012, -0.00744, -0.02510, -0.08492, -0.13733, -0.07620, -0.15329, 0.13716, -0.03769, 2.01176, -1.35991, -1.04319, -2.97226, -0.01433, 0.61219, -0.55522, 0.38579, 0.31831, 0.81843, -0.04583, -0.14585, -0.10218, 0.16039, -0.06552, -0.01802, 0.06480, -0.06641, 0.01672, -0.00287, 0.00308, 0.09982, -0.05679, -0.00249, -0.36034, 0.52385, -0.29759, 0.59539, -3.59641, -1.02499, -547.53774, 734.11470, 441.86760, -626.68255, -2255.81376, -1309.01028, -2025.69590, 2774.69901, 1711.21478, 1509.99797, -0.99274, 0.61858, -0.47634, -0.33034, 0.00261, 0.01183, -0.00038, 0.11687, 0.00994, -0.01122, 0.03482, -0.01942, -0.11557, 0.38237, -0.17826, 0.00830, 0.01193, -0.05469, 0.01557, 0.01747, 0.02730, -0.01182, -0.11284, 0.12939, -0.05621, -0.01615, 0.04258, 0.01058, -0.01723, 0.00963, 0.20666, 0.11742, 0.07830, -0.02922, -0.10659, -0.05407, 0.07254, -0.13005, -0.02365, 0.24583, 0.31915, 1.27060, 0.00009, -0.21541, -0.55324, -0.45999, -1.45885, 0.86530, 0.85932, 1.92999, -0.00755, -0.00715, -0.02004, -0.00788, 0.01539, 0.00837, 0.27652, -0.50297, -0.26703, -0.28159, 0.03950, 0.07182, -0.07177, 0.14140, 0.07693, 0.07564, -0.01316, -0.01259, 0.01529, 0.07773, -90.74225, -378.15784, -510.30190, -52.35396, -89.15267, 415.56828, 181.52119, 54.01570, -0.01093, -0.05931, -0.01344, -0.02390, 0.01432, -0.02470, -0.01509, -0.01346, 0.03352, 0.02248, 0.02588, -0.00948, 0.03610, 0.17238, 0.02909, -0.04065, 0.00155, -0.07025, -0.09508, 0.14487, 0.12441, 0.16451, 0.00001, -0.00005, -0.00982, -0.01895, -0.16968, 0.36565, 0.20234, 0.17789, -0.04519, -0.00588, 0.01268, 0.00107, -56.32137, -58.22145, -80.55270, 28.14532, 11.43301, 52.05752, 17.79480, -2.61997, -0.00005, -0.02629, 0.01080, -0.00390, 0.00744, 0.03132, 0.01156, -0.01621, 0.02162, 0.02552, 0.00075, -0.02497, 0.02495, 0.00830, 0.03230, 0.00103, -14.84965, -4.50200, -9.73043, 9.40426, 4.08054, 5.38571, 1.53731, -1.01288, 0.21076, 1.74227, 0.79760, 0.39583, 0.09879, -0.16736, -0.00723, -0.01536, }; static double tabbmr[] = { -364.49380, -47.17612, -554.97858, -430.63121, 596.44312, -3.94434, -7.43169, -0.06665, -2.23987, 0.10366, -0.05567, -0.01463, 0.01908, -0.02611, -0.00350, -0.01057, -0.00610, -0.00015, 0.00002, 0.00010, 0.00033, 0.00007, -0.00000, -0.00010, -0.00004, 0.00012, 0.00002, -0.00014, -0.00048, -0.00003, -0.00007, 0.00008, -0.00005, -0.00043, -0.00003, -0.00010, -0.00004, 0.00001, 0.00001, -0.00003, -0.00003, 0.00004, 0.00007, -0.00041, 0.00031, 0.00076, 0.00062, 0.00001, -0.00002, 0.00035, 0.00053, 0.00026, 0.00019, 0.00020, 0.00010, 0.02936, 0.09624, -0.01153, 0.01386, 0.00551, -0.00690, 0.00196, 0.00148, -0.00408, -0.00673, -0.00067, -0.00152, -0.00014, -0.00005, 0.00000, 0.00005, -0.00116, 0.00276, -0.00391, 0.00983, -0.01327, -0.01986, -0.00003, 0.00001, 0.01104, 0.00631, -0.01364, 0.01152, -0.00439, 0.01103, -0.00546, 0.00181, -0.00039, -0.00083, 0.00007, 0.00002, -0.00010, -0.00008, 0.00005, 0.00002, -0.00584, 0.00512, -0.00722, -0.00174, 0.00101, -0.00316, -0.02229, -0.02797, -0.10718, 0.05741, 0.11403, 0.10033, 0.00036, -0.00022, 0.00787, 0.01191, 0.01756, -0.02121, -0.00169, -0.00364, 0.00070, -0.00051, 0.01850, -0.06836, 0.21471, 0.00162, -0.29165, 0.16799, -0.00002, 0.00011, -0.00075, -0.00077, -0.00675, -0.00814, 0.00029, -0.00599, 0.00107, 0.00013, 0.00010, -0.00002, 0.00005, 0.00020, 0.00355, 0.00306, -0.00013, -0.00061, -0.02950, -0.00847, 0.01037, -0.04783, 0.04237, 0.11662, -0.00331, 0.00207, -0.00107, -0.00264, 0.00072, -0.00023, -0.00151, 0.00146, -0.12847, 0.02294, 0.03611, 0.19705, 0.16855, -0.28279, -0.00000, -0.00002, -0.00525, -0.03619, 0.05048, -0.00481, -0.00745, 0.04618, 0.00286, 0.00443, 0.00521, -0.00351, 0.00200, 0.00474, -0.00149, 0.00031, -0.00003, 0.00029, 0.00686, 0.02467, 0.04275, -0.02223, 0.02282, -0.04228, 0.03312, 0.01847, -0.01253, 0.01601, 0.00076, 0.00091, 0.00045, 0.00035, 0.00658, 0.01586, -0.00310, 0.00628, -0.00045, 0.00316, -0.01602, -0.00340, -0.01744, 0.04907, 0.06426, 0.02275, -0.00217, -0.00377, -0.00091, 0.00037, 0.00040, -0.00003, -0.00017, -0.00027, 0.00366, 0.02693, -0.00934, 0.00386, 0.00616, -0.00037, 0.02028, 0.02120, -0.01768, 0.02421, 0.00102, 0.00877, 0.00012, 0.00030, -0.00019, -0.02165, 0.01245, -0.00742, 0.00172, 0.00320, -0.17117, -0.12908, -0.43134, 0.15617, 0.21216, 0.56432, 0.01139, -0.00937, -0.00058, -0.00337, -0.00999, 0.01862, -0.00621, -0.00080, -0.00025, -0.00140, 0.09250, 0.01173, -0.03549, 0.14651, -0.01784, 0.00945, 0.00000, -0.00006, -0.00500, 0.00086, 0.01079, -0.00002, -0.00012, -0.00029, -0.02661, 0.00140, -0.00524, -0.00460, -0.00352, -0.00563, -0.00277, -0.00052, -0.10171, -0.02001, 0.00045, 0.00265, -0.00082, 0.00160, -0.00302, -0.00434, -0.00022, -0.00134, 0.03285, 0.02964, -0.05612, -0.00668, -0.01821, 0.06590, 0.00039, 0.00061, -0.13531, -0.03831, 0.02553, 0.02130, -0.00336, 0.00468, -0.04522, -0.05540, 0.00129, -0.01767, 0.00181, 0.00031, -0.00011, -0.00034, -0.00146, 0.01101, -0.00030, 0.00240, -0.00039, 0.00072, -0.01954, -0.03822, 0.09682, -0.04541, -0.01567, 0.09617, -0.03371, 0.33028, -0.12102, 0.05874, -0.00990, -0.02236, 0.00109, 0.00158, -0.00482, 0.00019, -0.00036, 0.00004, 0.00024, 0.00201, 0.00017, 0.00011, -0.00012, 0.00002, -0.00323, -0.01062, -0.00130, 0.00091, 0.00056, -0.00017, 0.00774, 0.00601, 0.02550, 0.01700, -0.84327, 0.77533, -0.71414, -0.50643, -473.30877, -1504.79179, -458.52274, -865.82237, -417.34994, -681.03976, 765.50697, -1653.67165, 4427.33176, 710.53895, -5016.39367, 4280.60361, 0.33957, 0.38390, -0.38631, 0.81193, 0.00154, -0.00043, 0.01103, -0.00017, -0.00046, 0.00221, 0.00059, 0.00014, 0.00160, 0.00475, 0.06191, -0.13289, 0.02884, -0.00566, -0.01572, 0.23780, -0.05140, -0.03228, -0.00716, -0.00978, -0.01048, 0.01317, -0.01267, -0.01198, 0.00037, -0.00330, -0.02305, 0.00355, -0.00121, -0.00496, -0.04369, -0.01343, 0.05347, -0.12433, 0.02090, 0.17683, 0.00028, -0.00490, -0.02778, -0.05587, -0.01658, 0.05655, 0.00204, -0.00092, 0.00020, 0.00014, -0.00603, -0.03829, 0.00778, -0.00588, -0.00266, 0.00097, -0.02158, -0.07742, 0.09306, -0.01827, -0.01048, 0.07885, -0.02485, -0.02505, 0.00471, -0.01026, 0.06663, 0.01110, 0.00469, -0.05347, -0.00016, -0.00013, 0.02622, 0.02273, -0.01009, 0.01391, -0.01042, -0.00444, -0.04293, -0.00767, -0.00154, -0.01739, 0.00353, -0.00763, -0.00060, 0.00010, -0.00053, -0.00146, -0.05317, 0.05760, -0.01801, -0.02099, -0.02611, -0.01836, -0.00256, 0.00812, -0.00145, 0.00054, -0.00008, 0.00015, -0.04087, 0.08860, -0.05385, -0.02134, 0.02771, 0.02441, -0.00234, 0.01571, -0.00260, 0.00097, 0.10151, 0.49378, -0.28555, 0.11428, -0.00286, 0.01224, 0.00160, 0.00069, 0.00000, -0.00040, -0.13286, 0.00448, 0.01225, -0.00568, 0.00341, 0.00224, -0.23483, -0.07859, 0.30733, -0.21548, -0.02608, 0.00756, 0.09789, 0.02878, -0.11968, 0.08981, 0.02046, -0.00888, 0.02955, 0.01486, -0.00981, 0.01542, -0.01674, -0.01540, 0.00019, -0.00449, -0.02140, 0.00638, 0.00112, -0.00730, -0.08571, 0.13811, -0.16951, -0.02917, -0.03931, -0.32643, -68.64541, -81.00521, -47.97737, 15.75290, 181.76392, -36.00647, -48.32098, -259.02226, -265.57466, 554.05904, 0.09017, 0.18803, -0.12459, 0.10852, 0.00211, 0.00002, 0.00304, -0.00370, 0.00174, 0.00279, 0.00139, 0.00095, 0.04881, 0.00262, -0.01020, 0.03762, 0.00987, 0.00612, 0.00054, -0.00036, 0.00009, -0.00094, 0.02279, 0.01785, -0.00778, 0.01263, 0.00040, -0.00112, -0.00452, -0.00662, 0.00483, -0.00030, -0.00054, -0.00205, -0.00052, -0.00362, -0.00215, -0.00247, 0.02893, -0.01965, -0.00004, 0.04114, -0.00284, -0.00103, 0.01827, -0.07822, 0.18010, 0.04805, -0.21702, 0.18808, 0.00095, -0.00132, -0.01488, 0.00746, 0.00198, 0.00190, 0.01032, 0.03392, 0.04318, -0.07332, -0.01004, 0.00787, -0.00308, -0.01177, -0.01431, 0.02659, 0.00273, -0.00374, -0.02545, 0.00644, 28.68376, 13.74978, 29.60401, -47.98255, -65.91944, -18.48404, -1.73580, 64.67487, -0.02492, 0.00104, -0.00829, -0.00134, 0.00077, 0.00005, -0.00513, 0.00403, 0.00071, -0.00047, -0.00023, -0.00063, 0.00120, 0.00370, -0.00038, -0.00037, 0.00080, -0.00018, 0.00866, 0.00156, -0.01064, 0.02131, 0.00000, -0.00001, 0.00038, -0.00068, -0.00909, -0.02187, -0.02599, 0.05507, -0.00022, -0.01468, 0.00032, 0.00500, 9.86233, -2.85314, -2.25791, -13.83444, -12.38794, 3.79861, 2.76343, 6.63505, 0.00066, 0.00007, -0.00016, -0.00039, 0.00014, 0.00059, -0.00031, -0.00024, -0.00168, 0.00259, 0.00007, -0.00005, -0.00052, 0.00558, 0.00110, 0.01037, 1.59224, -2.37284, -2.00023, -2.28280, -1.49571, 1.48293, 0.60041, 0.56376, -0.54386, 0.03568, -0.10392, 0.31005, 0.09104, 0.03015, 0.00826, -0.00524, }; /*mars*/ static double tabrmr[] = { -816.07287, -381.41365, -33.69436, 177.22955, 0.18630, -8.29605, -11.15519, -0.57407, -3.53642, 0.16663, -0.06334, -0.03056, 0.02767, -0.04161, 0.03917, -0.02425, 0.00204, -0.00034, 0.00023, 0.00058, -0.00111, 0.00039, -0.00015, 0.00006, -0.00023, 0.00237, 0.00191, 0.00154, -0.00029, 0.00009, 0.00011, -0.00041, 0.00037, -0.00010, -0.00064, 0.00015, -0.00005, 0.00012, -0.00003, -0.00034, 0.00026, 0.00011, -0.00007, -0.00158, 0.00087, 0.00278, 0.00137, 0.00024, -0.00020, 0.00530, -0.00448, 0.00780, 0.00408, 0.00062, 0.00035, -1.35261, 0.79891, -0.81597, -0.43774, 0.14713, -0.27415, 0.05298, 0.02230, -0.02089, -0.01070, -0.00374, 0.00342, -0.00142, 0.00270, -0.00039, 0.00063, 0.16024, 0.27088, -0.32127, 0.27467, -0.16615, -0.24460, -0.00073, 0.00032, -0.05710, -0.05265, -0.06025, 0.05120, -0.05295, 0.23477, -0.08211, 0.04575, -0.00769, -0.01067, -0.00570, 0.00015, -0.00251, -0.00140, -0.00131, -0.00018, -0.12246, 0.15836, -0.13065, -0.03222, 0.00795, -0.04232, -0.36585, -0.31154, 0.68504, -0.96006, 1.19304, 0.88631, 0.00132, 0.00046, 0.13105, 0.04252, 0.05164, -0.06837, -0.01351, -0.01458, 0.00376, -0.00557, 0.28532, -0.17290, -0.53946, -0.79365, -0.95246, 0.74984, 0.00019, 0.00132, -0.00163, -0.00295, -0.40106, -0.26573, -0.00155, -0.22655, 0.04349, -0.00376, 0.00149, -0.00001, 0.00523, 0.00078, 0.01203, 0.00558, -0.00708, 0.00520, -0.36428, -1.28827, 1.50845, -0.83063, 0.58802, 0.89998, -0.55256, 0.01255, -0.15169, -0.26715, 0.06061, -0.04122, -0.00397, 0.00534, -0.52576, 1.22031, 1.44098, 0.92406, 0.67214, -0.85486, -0.00010, 0.00001, 0.28820, -0.84198, 0.78291, 0.00251, 0.02398, 0.32093, -0.02331, 0.10109, -0.07555, 0.03557, -0.61580, 0.43399, -0.43779, -0.26390, 0.06885, -0.13803, 0.17694, 0.19245, 0.15119, -0.05100, 0.49469, -0.45028, 0.33590, 0.15677, -0.04702, 0.10265, -0.00942, -0.00580, -0.00555, -0.00252, -0.32933, 0.92539, -0.91004, -0.04490, -0.01812, -0.37121, 0.34695, 0.50855, -0.24721, 0.86063, -0.84747, 0.01983, 0.01948, 0.02039, 0.00748, -0.00727, -0.00271, 0.00220, 0.00309, 0.00196, 0.02030, 0.17201, -0.03716, 0.02801, 0.01871, 0.00002, 0.31736, 1.17319, -1.42245, 0.73416, -0.52302, -0.85056, 0.00522, -0.00126, 0.33571, 0.34594, -0.07709, 0.21114, -0.04066, -0.01742, 1.72228, 1.46934, -3.06437, 5.06723, -6.53800, -3.55839, -0.06933, 0.13815, 0.03684, 0.03284, -0.04841, 0.09571, -0.02350, 0.00418, 0.01302, 0.00579, 0.73408, 0.64718, -1.37437, 2.04816, -2.70756, -1.52808, 0.00523, -0.00166, 0.25915, 0.06900, -0.02758, 0.10707, 0.00062, 0.00744, -0.08117, 0.04840, -0.01806, -0.00637, 0.03034, -0.12414, 0.03419, -0.00388, 10.92603, 0.48169, -0.01753, -0.12853, -0.03207, -0.00801, 0.03904, -0.03326, 0.01033, 0.00366, 0.17249, 0.20846, -0.38157, 0.54639, -0.68518, -0.36121, -0.01043, -0.00186, -3.33843, -0.16353, 0.03462, 0.06669, -0.01305, 0.01803, -0.22703, -0.52219, 0.11709, -0.19628, 0.03410, 0.01741, 0.00338, 0.00265, 0.63213, 0.08944, 0.00236, 0.01829, 0.00546, 0.00218, 0.00073, -0.72570, 0.63698, -0.13340, 0.04698, 0.29716, -0.13126, 1.27705, -0.40980, 0.27400, -0.04525, -0.05529, -0.03249, -0.01696, -0.02314, -0.00076, 0.00510, 0.00764, -0.01847, -0.01021, 0.01688, -0.00044, 0.00531, -0.00016, -0.01219, -0.02903, -0.00361, 0.00299, 0.00504, -0.00153, -0.53625, -0.32460, 0.10642, -0.22070, -2.21651, -0.66036, -1.74652, -2.08198, -6810.78679, 967.02869, -3915.97140, 291.65905, 372.99563, 1196.01966, 5108.01033, -3172.64698, -7685.78246, -12789.43898, -17474.50562, 7757.84703, 3.13224, 1.84743, -0.38257, 2.40590, 0.01860, -0.01217, 0.03004, 0.00278, -0.00125, 0.00579, -0.02673, -0.00112, 0.00662, 0.01374, -0.02729, 0.13109, -0.02836, 0.00877, 0.12171, -0.27475, 0.34765, 0.15882, -0.12548, 0.02603, 0.00710, 0.06538, -0.04039, -0.03257, -0.00186, -0.00880, 0.16643, 0.00707, 0.01918, 0.07156, -0.20459, -0.85107, 1.01832, -0.47158, 0.32582, 0.63002, -0.00282, -0.00711, -0.19695, 0.15053, 0.15676, 0.17847, 0.00071, 0.00286, -0.00039, 0.00083, 0.02009, 0.17859, -0.03894, 0.02805, 0.02379, 0.00752, 0.17529, -0.57783, 0.53257, -0.02829, 0.03211, 0.21777, 0.13813, 0.16305, -0.02996, 0.06303, 0.21058, -0.02659, 0.02596, -0.08808, -0.00389, 0.00586, 0.08986, 0.09204, -0.01480, 0.04031, 0.06115, 0.18366, 0.25636, 0.06905, 0.00719, 0.11391, 0.00636, -0.01113, -0.02808, 0.00150, -0.01219, 0.00832, 0.28626, -0.09573, 0.10481, 0.16559, -0.94578, 1.26394, 0.08846, -0.01623, 0.00082, -0.02640, -0.00347, 0.00798, 0.12873, -0.21248, 0.27999, 0.14348, 0.44082, 0.10453, 0.04362, 0.25332, -0.06077, 0.00555, -0.06947, -0.05511, -10.08703, -0.10614, 0.04059, 0.21355, 0.05632, 0.00871, 0.01599, -0.00531, 0.36835, -0.03530, 0.09519, -0.04961, 0.02568, 0.08613, 0.57033, 0.84599, 1.27123, -0.41266, -0.36937, -0.00655, -0.16547, -0.24000, -0.35213, 0.13345, 0.05870, -0.01524, 0.06419, 0.04136, -0.00681, 0.02606, -0.02519, -0.02732, -0.00105, -0.00677, -0.03891, 0.00106, 0.00087, -0.02256, -0.20834, -0.14624, -0.23178, -0.11786, 0.32479, -1.41222, -303.74549, -202.79324, 260.20290, 184.84320, 536.68016, -881.56427, -1125.64824, -791.09928, -596.61162, 659.35664, 0.24561, 0.39519, -0.12601, 0.18709, -0.00700, 0.00136, 0.30750, 0.00009, 0.00443, 0.00384, 0.01170, 0.02078, 0.15043, 0.04802, 0.00386, 0.06942, 0.02107, 0.00495, -0.01067, 0.00951, 0.00937, 0.01996, 0.04922, 0.04337, -0.00583, 0.02110, -0.00691, 0.02793, -0.00364, -0.00682, -0.09143, 0.15369, 0.02043, 0.05451, 0.04053, -0.08179, 0.09645, 0.05330, -0.10149, -0.01594, -0.96773, 0.13660, 0.17326, 0.00013, 0.20990, -0.23184, -0.38407, -0.64733, -0.84754, 0.38889, 0.00310, -0.00340, 0.00970, -0.00788, -0.01111, 0.00677, 0.18147, 0.09968, 0.10170, -0.09233, -0.03165, 0.01790, -0.04727, -0.02364, -0.02546, 0.02451, 0.00442, -0.00426, -0.02540, 0.00471, 130.42585, -31.30051, 17.99957, -174.75585, -142.96798, -27.89752, -19.42122, 59.14872, -0.01899, 0.00388, -0.01265, 0.00694, 0.01966, 0.01140, -0.00439, 0.00503, -0.01867, 0.02826, 0.00752, 0.02012, -0.14734, 0.01909, 0.03312, 0.02327, 0.05843, 0.00061, -0.06958, -0.05798, -0.09174, 0.06242, 0.00003, 0.00001, 0.00670, -0.00305, -0.13637, -0.06058, -0.06372, 0.07257, 0.00209, -0.01369, -0.00044, 0.00355, 17.90079, -17.48270, -8.77915, -24.54483, -15.67123, 3.62668, 0.52038, 5.13220, 0.02574, 0.00003, 0.00339, 0.00919, -0.02778, 0.00464, 0.01429, 0.01003, -0.01661, 0.01327, 0.02216, 0.00034, -0.00389, 0.01076, -0.00035, 0.00983, 1.23731, -4.18017, -2.61932, -2.66346, -1.45540, 1.10310, 0.23322, 0.40775, -0.43623, 0.06212, -0.09900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 2, 4, 1, 5, 0, 2, 7, 3,-11, 4, 0, 2, 3, 4, -5, 5, 0, 2, 2, 3, -6, 4, 1, 2, 6, 3, -9, 4, 0, 2, 2, 4, 2, 5, 0, 2, 3, 4, -4, 5, 0, 2, 5, 3, -7, 4, 0, 2, 4, 3, -5, 4, 1, 2, 3, 4, -3, 5, 1, 2, 3, 3, -3, 4, 0, 2, 3, 4, -2, 5, 2, 3, 3, 4, -4, 5, 5, 6, 0, 2, 2, 3, -1, 4, 0, 2, 3, 4, -3, 6, 0, 2, 3, 4, -1, 5, 1, 2, 3, 4, -2, 6, 0, 2, 1, 3, 1, 4, 1, 2, 3, 4, -1, 6, 0, 3, 4, 3, -5, 4, 3, 5, 0, 1, 3, 4, 3, 3, 4, 3,-11, 4, 3, 5, 0, 1, 1, 2, 0, 2, 2, 2, -3, 4, 0, 2, 1, 3, -5, 4, 0, 2, 4, 4, -5, 5, 0, 2, 6, 3, -8, 4, 0, 2, 4, 4, -4, 5, 0, 2, 5, 3, -6, 4, 0, 2, 4, 3, -4, 4, 0, 2, 4, 4, -3, 5, 1, 3, 6, 3, -8, 4, 2, 5, 0, 2, 3, 3, -2, 4, 0, 2, 4, 4, -2, 5, 1, 2, 4, 4, -1, 5, 0, 2, 1, 3, 2, 4, 0, 1, 4, 4, 3, 2, 2, 2, -2, 4, 0, 2, 7, 3, -9, 4, 0, 2, 5, 4, -5, 5, 0, 2, 6, 3, -7, 4, 0, 2, 5, 4, -4, 5, 0, 2, 5, 3, -5, 4, 0, 2, 5, 4, -3, 5, 0, 2, 5, 4, -2, 5, 0, 1, 5, 4, 3, 1, 6, 4, 2, 1, 7, 4, 0, -1 }; /*//////////////////////////////////Venus Starts here////////////////////////////*/ static double tablv[] = { 9.08078, 55.42416, 21066413644.98911, 655127.20186, 0.00329, 0.10408, 0.00268, -0.01908, 0.00653, 0.00183, 0.15083, -0.21997, 6.08596, 2.34841, 3.70668, -0.22740, -2.29376, -1.46741, -0.03840, 0.01242, 0.00176, 0.00913, 0.00121, -0.01222, -1.22624, 0.65264, -1.15974, -1.28172, 1.00656, -0.66266, 0.01560, -0.00654, 0.00896, 0.00069, 0.21649, -0.01786, 0.01239, 0.00255, 0.00084, -0.06086, -0.00041, 0.00887, 0.13453, -0.20013, 0.08234, 0.01575, 0.00658, -0.00214, 0.00254, 0.00857, -0.01047, -0.00519, 0.63215, -0.40914, 0.34271, -1.53258, 0.00038, -0.01437, -0.02599, -2.27805, -0.36873, -1.01799, -0.36798, 1.41356, -0.08167, 0.01368, 0.20676, 0.06807, 0.02282, -0.04691, 0.30308, -0.20218, 0.24785, 0.27522, 0.00197, -0.00499, 1.43909, -0.46154, 0.93459, 2.99583, -3.43274, 0.05672, -0.06586, 0.12467, 0.02505, -0.08433, 0.00743, 0.00174, -0.04013, 0.17715, -0.00603, -0.01024, 0.01542, -0.02378, 0.00676, 0.00002, -0.00168, -4.89487, 0.02393, -0.03064, 0.00090, 0.00977, 0.01223, 0.00381, 0.28135, -0.09158, 0.18550, 0.58372, -0.67437, 0.01409, -0.25404, -0.06863, 0.06763, -0.02939, -0.00009, -0.04888, 0.01718, -0.00978, -0.01945, 0.08847, -0.00135, -11.29920, 0.01689, -0.04756, 0.02075, -0.01667, 0.01397, 0.00443, -0.28437, 0.07600, 0.17996, -0.44326, 0.29356, 1.41869, -1.58617, 0.03206, 0.00229, -0.00753, -0.03076, -2.96766, 0.00245, 0.00697, 0.01063, -0.02468, -0.00351, -0.18179, -0.01088, 0.00380, 0.00496, 0.02072, -0.12890, 0.16719, -0.06820, -0.03234, -60.36135, -11.74485, -11.03752, -3.80145, -21.33955, -284.54495, -763.43839, 248.50823, 1493.02775, 1288.79621, -2091.10921, -1851.15420, -0.00922, 0.06233, 0.00004, 0.00785, 0.10363, -0.16770, 0.45497, 0.24051, -0.28057, 0.61126, -0.02057, 0.00010, 0.00561, 0.01994, 0.01416, -0.00442, 0.03073, -0.14961, -0.06272, 0.08301, 0.02040, 7.12824, -0.00453, -0.01815, 0.00004, -0.00013, -0.03593, -0.18147, 0.20353, -0.00683, 0.00003, 0.06226, -0.00443, 0.00257, 0.03194, 0.03254, 0.00282, -0.01401, 0.00422, 1.03169, -0.00169, -0.00591, -0.00307, 0.00540, 0.05511, 0.00347, 0.07896, 0.06583, 0.00783, 0.01926, 0.03109, 0.15967, 0.00343, 0.88734, 0.01047, 0.32054, 0.00814, 0.00051, 0.02474, 0.00047, 0.00052, 0.03763, -57.06618, 20.34614, -45.06541, -115.20465, 136.46887, -84.67046, 92.93308, 160.44644, -0.00020, -0.00082, 0.02496, 0.00279, 0.00849, 0.00195, -0.05013, -0.04331, -0.00136, 0.14491, -0.00183, -0.00406, 0.01163, 0.00093, -0.00604, -0.00680, -0.00036, 0.06861, -0.00450, -0.00969, 0.00171, 0.00979, -0.00152, 0.03929, 0.00631, 0.00048, -0.00709, -0.00864, 1.51002, -0.24657, 1.27338, 2.64699, -2.40990, -0.57413, -0.00023, 0.03528, 0.00268, 0.00522, -0.00010, 0.01933, -0.00006, 0.01100, 0.06313, -0.09939, 0.08571, 0.03206, -0.00004, 0.00645, }; static double tabbv[] = { -23.91858, 31.44154, 25.93273, -67.68643, -0.00171, 0.00123, 0.00001, -0.00018, -0.00005, 0.00018, -0.00001, 0.00019, 0.00733, 0.00030, -0.00038, 0.00011, 0.00181, 0.00120, 0.00010, 0.00002, -0.00012, 0.00002, 0.00021, 0.00004, -0.00403, 0.00101, 0.00342, -0.00328, 0.01564, 0.01212, 0.00011, 0.00010, -0.00002, -0.00004, -0.00524, 0.00079, 0.00011, 0.00002, -0.00001, 0.00003, 0.00001, 0.00000, 0.00108, 0.00035, 0.00003, 0.00064, -0.00000, -0.00002, -0.00069, 0.00031, 0.00020, 0.00003, 0.00768, 0.03697, -0.07906, 0.01673, -0.00003, -0.00001, -0.00198, -0.01045, 0.01761, -0.00803, -0.00751, 0.04199, 0.00280, -0.00213, -0.00482, -0.00209, -0.01077, 0.00715, 0.00048, -0.00004, 0.00199, 0.00237, 0.00017, -0.00032, -0.07513, -0.00658, -0.04213, 0.16065, 0.27661, 0.06515, 0.02156, -0.08144, -0.23994, -0.05674, 0.00167, 0.00069, 0.00244, -0.01247, -0.00100, 0.00036, 0.00240, 0.00012, 0.00010, 0.00018, 0.00208, -0.00098, -0.00217, 0.00707, -0.00338, 0.01260, -0.00127, -0.00039, -0.03516, -0.00544, -0.01746, 0.08258, 0.10633, 0.02523, 0.00077, -0.00214, -0.02335, 0.00976, -0.00019, 0.00003, 0.00041, 0.00039, 0.00199, -0.01098, 0.00813, -0.00853, 0.02230, 0.00349, -0.02250, 0.08119, -0.00214, -0.00052, -0.00220, 0.15216, 0.17152, 0.08051, -0.01561, 0.27727, 0.25837, 0.07021, -0.00005, -0.00000, -0.02692, -0.00047, -0.00007, -0.00016, 0.01072, 0.01418, -0.00076, 0.00379, -0.00807, 0.03463, -0.05199, 0.06680, -0.00622, 0.00787, 0.00672, 0.00453, -10.69951, -67.43445, -183.55956, -37.87932, -102.30497, -780.40465, 2572.21990, -446.97798, 1665.42632, 5698.61327, -11889.66501, 2814.93799, 0.03204, -0.09479, 0.00014, -0.00001, -0.04118, -0.04562, 0.03435, -0.05878, 0.01700, 0.02566, -0.00121, 0.00170, 0.02390, 0.00403, 0.04629, 0.01896, -0.00521, 0.03215, -0.01051, 0.00696, -0.01332, -0.08937, -0.00469, -0.00751, 0.00016, -0.00035, 0.00492, -0.03930, -0.04742, -0.01013, 0.00065, 0.00021, -0.00006, 0.00017, 0.06768, -0.01558, -0.00055, 0.00322, -0.00287, -0.01656, 0.00061, -0.00041, 0.00030, 0.00047, -0.01436, -0.00148, 0.30302, -0.05511, -0.00020, -0.00005, 0.00042, -0.00025, 0.01270, 0.00458, -0.00593, -0.04480, 0.00005, -0.00008, 0.08457, -0.01569, 0.00062, 0.00018, 9.79942, -2.48836, 4.17423, 6.72044, -63.33456, 34.63597, 39.11878, -72.89581, -0.00066, 0.00036, -0.00045, -0.00062, -0.00287, -0.00118, -0.21879, 0.03947, 0.00086, 0.00671, -0.00113, 0.00122, -0.00193, -0.00029, -0.03612, 0.00635, 0.00024, 0.00207, -0.00273, 0.00443, -0.00055, 0.00030, -0.00451, 0.00175, -0.00110, -0.00015, -0.02608, 0.00480, 2.16555, -0.70419, 1.74648, 0.97514, -1.15360, 1.73688, 0.00004, 0.00105, 0.00187, -0.00311, 0.00005, 0.00055, 0.00004, 0.00032, -0.04629, 0.02292, -0.00363, -0.03807, 0.00002, 0.00020, }; static double tabrv[] = { -0.24459, 3.72698, -6.67281, 5.24378, 0.00030, 0.00003, -0.00002, -0.00000, -0.00000, 0.00001, 0.00032, 0.00021, -0.00326, 0.01002, 0.00067, 0.00653, 0.00243, -0.00417, -0.00004, -0.00010, -0.00002, -0.00001, 0.00004, -0.00002, -0.00638, -0.01453, 0.01458, -0.01235, 0.00755, 0.01030, 0.00006, 0.00014, 0.00000, 0.00009, 0.00063, 0.00176, 0.00003, -0.00022, 0.00112, 0.00001, -0.00014, -0.00001, 0.00485, 0.00322, -0.00035, 0.00198, 0.00004, 0.00013, -0.00015, -0.00003, 0.00011, -0.00025, 0.00634, 0.02207, 0.04620, 0.00160, 0.00045, 0.00001, -0.11563, 0.00643, -0.05947, 0.02018, 0.07704, 0.01574, -0.00090, -0.00471, -0.00322, 0.01104, 0.00265, -0.00038, 0.01395, 0.02165, -0.01948, 0.01713, -0.00057, -0.00019, 0.04889, 0.13403, -0.28327, 0.10597, -0.02325, -0.35829, 0.01171, -0.00904, 0.00747, 0.02546, 0.00029, -0.00190, -0.03408, -0.00703, 0.00176, -0.00109, 0.00463, 0.00293, 0.00000, 0.00148, 1.06691, -0.00054, -0.00935, -0.00790, 0.00552, -0.00084, -0.00100, 0.00336, 0.02874, 0.08604, -0.17876, 0.05973, -0.00720, -0.21195, 0.02134, -0.07980, 0.01500, 0.01398, 0.01758, -0.00004, 0.00371, 0.00650, -0.03375, -0.00723, 4.65465, -0.00040, 0.02040, 0.00707, -0.00727, -0.01144, -0.00196, 0.00620, -0.03396, -0.12904, 0.20160, 0.08092, -0.67045, 0.14014, -0.01571, -0.75141, 0.00361, 0.00110, 1.42165, -0.01499, -0.00334, 0.00117, 0.01187, 0.00507, 0.08935, -0.00174, -0.00211, -0.00525, 0.01035, -0.00252, -0.08355, -0.06442, 0.01616, -0.03409, 5.55241, -30.62428, 2.03824, -6.26978, 143.07279, -10.24734, -125.25411, -380.85360, -644.78411, 745.02852, 926.70000, -1045.09820, -0.03124, -0.00465, -0.00396, 0.00002, 0.08518, 0.05248, -0.12178, 0.23023, -0.30943, -0.14208, -0.00005, -0.01054, -0.00894, 0.00233, -0.00173, -0.00768, 0.07881, 0.01633, -0.04463, -0.03347, -3.92991, 0.00945, 0.01524, -0.00422, -0.00011, -0.00005, 0.10842, -0.02126, 0.00349, 0.12097, -0.03752, 0.00001, -0.00156, -0.00270, -0.01520, 0.01349, 0.00895, 0.00186, -0.67751, 0.00180, 0.00516, -0.00151, -0.00365, -0.00210, -0.00276, 0.03793, -0.02637, 0.03235, -0.01343, 0.00541, -0.11270, 0.02169, -0.63365, 0.00122, -0.24329, 0.00428, -0.00040, 0.00586, 0.00581, 0.01112, -0.02731, 0.00008, -2.69091, 0.42729, 2.78805, 3.43849, -0.87998, -6.62373, 0.56882, 4.69370, 0.00005, -0.00008, -0.00181, 0.01767, -0.00168, 0.00660, 0.01802, -0.01836, -0.11245, -0.00061, 0.00199, -0.00070, -0.00076, 0.00919, 0.00311, -0.00165, -0.05650, -0.00018, 0.00121, -0.00069, -0.00803, 0.00146, -0.03260, -0.00072, -0.00042, 0.00524, 0.00464, -0.00339, -0.06203, -0.00278, 0.04145, 0.02871, -0.01962, -0.01362, -0.03040, -0.00010, 0.00085, -0.00001, -0.01712, -0.00006, -0.00996, -0.00003, -0.00029, 0.00026, 0.00016, -0.00005, -0.00594, -0.00003, }; static char argsv[] = { 0, 3, 2, 2, 5, -5, 6, 0, 3, 2, 2, 1, 3, -8, 4, 0, 3, 5, 1,-14, 2, 2, 3, 0, 3, 3, 2, -7, 3, 4, 4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 2, 1, 5, 0, 2, 2, 2, -5, 3, 0, 2, 6, 2, -8, 3, 0, 2, 2, 1, -4, 2, 0, 2, 3, 2, -3, 3, 0, 1, 2, 3, 0, 2, 3, 2, -7, 3, 0, 2, 5, 2, -6, 3, 1, 2, 2, 2, -2, 4, 0, 2, 3, 2, -5, 4, 0, 2, 2, 2, -1, 3, 0, 2, 7, 2, -9, 3, 0, 2, 4, 2, -4, 3, 0, 2, 1, 2, 1, 3, 0, 2, 3, 2, -4, 4, 0, 2, 6, 2, -7, 3, 0, 2, 3, 2, -2, 3, 0, 2, 2, 2, -4, 5, 0, 2, 2, 2, -3, 5, 0, 2, 2, 2, -2, 5, 0, 2, 5, 2, -5, 3, 0, 2, 2, 2, -3, 6, 0, 2, 2, 2, -1, 5, 0, 2, 2, 2, -2, 6, 0, 1, 2, 2, 3, 2, 2, 2, 1, 5, 0, 2, 7, 2, -8, 3, 0, 2, 2, 1, -3, 2, 0, 2, 4, 2, -3, 3, 0, 2, 6, 2, -6, 3, 0, 2, 3, 2, -1, 3, 0, 2, 8, 2, -9, 3, 0, 2, 5, 2, -4, 3, 0, 2, 7, 2, -7, 3, 0, 2, 4, 2, -2, 3, 0, 2, 3, 2, -4, 5, 0, 2, 3, 2, -3, 5, 0, 2, 9, 2,-10, 3, 0, 2, 3, 2, -2, 5, 0, 1, 3, 2, 2, 2, 8, 2, -8, 3, 0, 2, 5, 2, -3, 3, 0, 2, 9, 2, -9, 3, 0, 2, 10, 2,-10, 3, 0, 1, 4, 2, 1, 2, 11, 2,-11, 3, 0, -1 }; /*/////////////////////////////////Jupiter starts here/////////////////////////////////*/ static double tablj[] = { 153429.13855, 130818.16897, 18120.42948, -8463.12663, -5058.91447, 1092566021.02148, 123671.25097, -5.43364, 12.06012, 30428.31077, -74667.61443, 46848.16236, -66373.44474, 24312.54264, -26045.64766, 18353.92564, -4022.13679, 4037.97936, 10059.82468, -4622.55896, 1383.21617, -187.25468, -1171.66028, -0.00062, -0.21713, -1198.83945, 1178.62445, -1492.07393, 153.07155, -245.57966, -391.94010, 82.26400, -40.92104, 3.72520, 10.57242, -0.04720, -0.04448, -0.04329, -0.06043, -0.03905, 0.15712, -0.05644, -0.00129, -0.00342, 0.02473, 0.00434, -0.01862, 0.00431, -0.03993, -0.03159, -0.15982, -0.09928, 0.04430, -0.00357, 0.31312, -0.01346, -0.00180, -0.09107, 0.01215, 0.02485, 0.01024, 27.29869, 2.70896, 12.91956, 19.21726, -6.91384, 5.12954, -1.07533, -1.71691, -0.01423, 0.03121, -32.48652, -26.13483, 46.78162, -62.02701, 94.96809, 81.73791, -20.13673, 131.05065, -0.00798, 0.01786, 13.99591, 16.87756, -8.51726, 21.59490, -14.28833, -9.45530, 7.73954, -6.53078, 0.03175, -0.04295, 3.06742, -0.11838, 1.03630, 0.94004, -0.14085, 0.14434, -0.03363, 0.00993, -0.00007, -0.02748, 26.01507, -7.37178, 16.96955, 6.24203, -0.40481, 3.72456, -0.53597, -0.14938, 37.82081, 26.15887, -2.82115, 78.26478, -63.39155, -5.52419, 13.11482, -43.54977, 15.64940, 6.67505, -10.25616, -7.39672, -12.37441, 12.24417, 8.54922, 9.68451, -0.03658, -0.00963, 1.65523, 0.43093, 0.32023, 0.71365, -0.12226, 0.03759, 0.10388, 0.47212, -0.02791, 0.09929, -0.04116, -0.03125, -0.10240, -0.23199, -0.03524, -0.13625, 7.52726, 6.86314, 0.01239, 13.46530, -5.22256, 1.56116, -0.15925, -1.19571, 3.26302, 0.06097, -0.14444, -0.20301, 1.93822, -80.12566, 0.98665, -7.52986, 3.86703, -2.43028, 0.64180, 0.78351, 0.00190, -0.00633, -0.00321, -0.04403, 0.19018, 0.14335, 0.10315, 0.53154, -0.00062, -0.00464, -0.00109, 0.02150, 1.19993, 47.21638, -24.56067, 25.06332, -7.50751, -6.36250, 1.39443, -1.23806, 0.04951, 0.02176, 0.02802, -0.01665, -0.10698, -0.13635, 73.54797, -52.34968, 74.98754, 86.56283, -69.01463, 44.56866, 0.04387, -0.05925, -0.03732, -0.03264, 0.00967, 0.02143, 10.59429, 26.48226, 34.03470, 3.96160, 4.15919, -20.22616, -5.25903, -3.40177, 0.05111, -0.06788, 0.06497, 1.21024, -0.29607, 0.49991, -0.06055, -0.03464, 0.02950, 0.16429, 0.00722, -0.90806, -0.02161, 0.00902, -0.00261, 0.00077, 0.00434, -0.29231, 0.00456, 0.04781, 1.33214, -2.62015, 0.79761, -0.81850, 0.06371, 0.00119, 0.03049, -0.03553, 0.02373, -0.01411, -189.06132, -169.17940, 5.27464, -227.72664, 83.72511, -12.04794, 0.23965, 23.75496, -3.43532, -0.34276, -1.35880, 0.45053, -0.34298, -0.11441, -0.16328, 0.07423, 481.48150, 79.82461, 453.82764, 941.94205, -635.83924, 397.29087, -81.54066, -417.22420, 149.91822, 10.53490, -0.13210, 0.36740, 0.33777, 0.15893, -2562.04968, 2442.77844, -2602.66709, 2838.87348, 723.50715, -1284.58208, -4557.23362, -4514.61100, -8960.81693, 4663.55087, -4947.61530, 19377.42027, -0.16786, -0.19514, 0.32100, 0.91502, 4.96600, -1.11836, 307.38057, 175.14618, 16.02093, 444.42376, -219.80047, 62.39286, -18.14266, -52.23698, 0.02111, 0.00469, -20.97409, -34.48296, -2.03906, -27.07560, 3.73818, -3.00599, 0.24112, 0.41430, -0.03552, 0.00394, -0.00217, 0.02307, 0.03686, 0.00510, 34.46537, 10.23293, 9.99520, 28.88781, -11.31210, 3.52646, -0.48062, -2.93641, -0.00987, -0.05310, -38.39539, 0.04568, -31.73684, -1.83151, -24.97332, -1.71244, 0.33498, 7.03899, -4.15247, 200.43434, -0.00800, 0.04462, 37.83113, -13.40661, 9.49434, -35.41588, -14.72767, -3.84674, -0.31412, 3.97734, 0.02908, -0.00353, 1.89935, -14.31774, 7.77051, -7.08945, 1.90915, 1.78908, -0.41445, 0.30506, -14.43121, 7.30707, -11.97842, -17.64121, 13.38962, -7.20982, -5.23362, 2.11364, -0.45605, 4.08835, 1.42683, 0.24838, -0.00605, 0.03199, -0.17609, -1.43091, 0.32444, -0.51371, 0.06182, 0.03733, 0.00696, -0.13438, 4.67581, 4.42379, -1.52602, 4.20659, -1.31757, -0.72910, 1.29012, 0.97780, 2.25895, -0.85306, 1.74120, -5.09507, 0.28107, -0.05040, 0.05508, -0.06349, -0.00061, 0.48249, -2.37749, 1.78180, -1.67423, -0.35618, 0.05789, -0.35287, 0.56252, -0.66584, 0.61979, 4.84016, -4.64462, 17.48002, 0.40982, -4.19214, -1.55252, -1.87505, -0.31070, 0.15554, -0.00034, 0.11102, 0.01116, -0.04166, 9.27689, -4.32090, 6.84888, 1.78741, -0.09306, 1.68391, -0.27482, -0.04197, -7.83068, 37.71086, -37.53346, 7.18559, 0.74427, -24.29751, 10.87837, 1.35503, 0.00998, -0.03395, -133.52206, -150.11329, 4.27494, -173.79469, 150.87961, -356.29181, -330.17873, -426.29809, -607.98186, 126.35464, -299.69623, 556.41055, -0.00342, 0.04411, 44.65946, 42.07312, 85.71397, 5.95130, 24.98064, -41.20026, -14.05970, -10.46101, -2.24038, 2.89211, 0.06175, 0.08128, 0.00705, 0.01939, -1.08361, -0.08213, -0.20868, -0.36268, -4.96489, -2.05966, -6.16586, 3.65514, -3.12555, 12.20821, -1.11236, -1.73772, -1.34045, -0.22774, -0.08639, 0.27355, -0.07700, 1.06260, -0.46013, 0.31916, -0.04969, -0.09488, -1.54000, 0.04949, -0.07616, -0.95933, 0.93303, 3.43183, -0.82917, -0.82042, -0.68158, 0.17083, 0.06942, 0.17491, -0.02699, -0.01051, 0.00657, 0.03063, -0.52595, 0.84035, -0.88323, -0.70188, 0.60928, -0.48179, 0.38290, 0.04482, 0.26456, -0.32369, -0.00615, 0.03218, -0.32943, 0.14675, -0.10782, -0.09036, -0.58003, 0.72888, -0.46654, 1.17977, 0.00222, 0.01541, -0.19226, -0.07770, -0.01829, -0.05070, -1.75385, -1.32969, 0.52361, -1.36036, 0.67222, 1.34612, 6.96841, -29.24025, -23.76900, -39.91647, -41.01215, -2.23638, -18.81024, 20.77095, -0.68592, -2.26212, -1.14065, -0.76493, -0.18044, 0.15193, -0.20669, -0.44387, 0.25697, -0.17880, -0.53097, 0.43181, -0.35187, 0.71934, -0.14962, 0.09220, -0.05031, -0.03924, 0.06571, 0.29487, 0.05170, 0.36847, 0.02754, -0.00411, -0.08313, -0.16907, 0.10273, -0.07315, -0.02312, 0.04912, -0.01062, -0.02713, 0.03806, 0.13401, -1.79865, -2.04540, -2.69965, -0.65706, -1.17916, 0.79292, 0.02415, 0.14001, -0.01767, 0.04209, 0.05212, -0.01795, 0.01285, 0.04028, 0.01075, 0.05533, 0.02323, -0.00864, -0.04691, 0.03128, 0.00548, 0.02254, 0.00011, 0.12033, }; static double tabbj[] = { 548.59659, 594.29629, 219.97664, 59.71822, 23.62157, 40.77732, 227.07380, 0.00293, -0.00745, -307.33226, -347.92807, -309.49383, -428.18929, -96.59506, -191.36254, 2.11014, -34.44145, 2.23085, 6.77110, -5.43468, -0.28391, 0.28355, -1.81690, 0.00036, 0.00078, -1.83259, 1.17464, -2.66976, -0.92339, -0.23645, -1.20623, 0.25248, -0.04958, 0.00064, 0.03599, -0.00079, 0.00004, -0.00005, -0.00010, -0.00024, 0.00051, 0.00001, 0.00005, 0.00015, 0.00010, 0.00017, -0.00004, 0.00113, -0.00011, 0.00021, 0.00087, 0.00120, -0.00114, -0.00881, -0.00020, -0.00005, 0.00009, 0.00005, 0.00007, 0.00002, -0.00033, -0.00554, -0.32274, 0.23695, -0.11184, 0.04050, 0.09929, -0.02189, 0.00305, -0.00142, -0.00055, 0.66623, 0.34590, 0.74913, -0.23202, -1.08316, -1.40407, 1.72287, -0.07604, 0.00024, 0.00004, 0.03592, 0.91143, -1.11848, -0.17473, 0.91500, -1.34912, 0.85229, 0.69029, -0.00019, 0.00075, 0.03615, 0.30768, -0.08733, 0.12016, -0.01716, -0.01138, 0.00021, 0.00004, 0.00531, 0.00098, -0.14354, -0.02364, -0.05559, -0.07561, 0.01419, -0.01141, 0.00014, 0.00218, -0.36564, 0.13498, -0.13283, -0.11462, 0.23741, 0.14960, -0.23173, 0.25148, 0.00763, -0.05987, -0.00857, 0.20312, -0.29399, 0.34831, -1.33166, -0.46808, -0.00027, 0.00046, 0.15729, 0.01367, 0.04093, 0.07447, -0.01598, 0.00785, 0.00583, 0.00324, 0.00053, 0.00160, -0.00030, 0.00043, -0.00208, 0.00334, -0.00316, 0.00136, 0.23086, 0.05711, 0.19558, 0.05897, 0.01070, 0.05021, -0.00818, -0.02242, 0.06301, -0.26483, 0.66177, 0.02125, 0.13477, 0.19376, -0.36520, 0.83588, -0.69848, -0.00877, 0.01626, -0.23878, -0.00373, 0.00044, 0.00008, -0.00004, -0.00374, -0.00283, 0.01104, -0.00619, 0.00004, 0.00015, 0.00026, 0.00013, 0.04630, -0.11815, 0.00773, 0.03796, -0.05172, 0.00149, 0.00444, -0.01493, -0.00064, -0.00044, -0.00033, 0.00002, -0.00012, 0.00284, -0.15622, -0.92158, -0.82690, -1.52101, -0.55934, 0.69375, -0.00171, 0.00031, 0.00129, -0.00013, -0.00024, -0.00083, 0.66101, -0.21764, -0.43967, 0.30157, 0.53389, 1.59141, 1.94286, 0.14146, -0.00064, -0.00006, 0.21850, -0.02912, 0.08594, 0.08734, -0.01678, 0.01629, 0.00133, 0.00562, 0.00128, -0.00025, -0.00005, 0.00027, 0.00032, 0.00001, 0.00037, 0.00042, 0.00070, 0.00003, 0.00275, -0.13096, 0.02329, -0.05582, 0.00405, -0.00251, 0.01316, -0.01165, 0.00279, -0.00374, -39.62783, 20.91467, -28.97236, 3.77560, -3.30029, 0.11472, -0.48216, 1.05814, -0.21607, -0.03055, -0.64162, -0.57355, -0.05861, -0.18592, -0.12207, -0.06279, -38.55325, -125.74207, -47.22357, 41.75842, -119.38841, 18.88515, -11.04830, -50.98851, 16.64895, 1.76553, 0.09474, 0.03714, 0.02593, 0.07967, -1187.61854, -1094.91786, -1011.21939, -1102.25998, -575.88672, -107.84860, -890.58889, -807.06589, 971.78461, -1287.24560, -4601.44669, -849.54329, -0.00904, 0.06233, -0.19456, -0.05521, -0.36915, 1.15363, 32.64763, -85.19705, 114.34437, -13.37747, 15.92865, 55.84857, -13.10538, 3.07629, -0.00327, 0.00104, -7.81035, 6.19960, -6.36096, 1.00493, -0.66971, -0.84572, 0.09943, -0.04583, 0.00200, -0.00032, -0.00265, 0.00047, -0.00053, 0.00046, -0.24396, 0.20664, -0.30820, -0.04917, 0.06184, -0.12642, 0.03053, 0.05054, 0.00035, 0.00012, 0.42063, -0.58254, 0.90517, -0.66276, 0.64765, 0.39338, -1.40645, 0.33017, -1.43377, -0.67089, -0.00045, -0.00036, 0.23690, 0.07185, 0.28386, -0.04397, 0.02836, -0.13082, -0.00978, 0.00108, 0.00046, 0.00083, -0.01665, 0.32499, -0.09980, 0.18611, -0.02561, 0.00239, -0.00084, -0.00110, 0.46854, -0.35113, 0.69908, 0.53244, 0.12875, 0.01115, 0.13930, 0.02747, -0.10587, -0.17759, -0.26850, 0.04400, 0.00010, -0.00015, 0.00164, -0.01308, 0.00488, -0.01046, 0.00170, 0.00024, 0.00084, 0.00014, -0.08481, -0.02547, -0.02290, -0.02281, -0.03946, -0.02810, 0.01298, 0.08658, 0.05575, -0.01081, 1.09695, 0.35441, -0.03127, 0.07946, 0.01245, 0.02578, -0.00524, -0.00027, 0.08217, -0.31742, 0.15273, -0.07804, 0.01197, 0.03053, 0.81596, 0.38640, -0.89777, 0.59499, -0.39581, -0.87375, 0.02096, 0.49772, 0.29986, 0.24210, 0.14038, -0.03016, -0.00208, 0.00045, 0.01024, 0.00114, 1.23010, 1.75663, -0.12741, 1.44996, -0.31607, 0.03151, 0.00259, -0.04741, -11.57091, 8.00331, -9.24028, -6.36906, 4.71248, -2.43695, 0.38630, 1.90625, 0.01401, 0.00114, 33.56690, -55.17784, 33.21425, -52.57002, 27.04138, 13.78610, 69.60307, -81.16312, 27.53960, -158.28336, -205.94418, -95.08051, -0.01407, -0.00364, -18.56128, 6.02270, -10.11059, 24.69471, 12.31878, 9.94393, 3.81994, -4.84109, -1.08440, -0.72136, 0.03731, -0.02094, 0.00789, -0.00176, 0.09673, -0.11181, 0.03112, -0.00065, -0.29167, -0.82083, 0.40866, -0.77487, -2.23349, -0.46973, 0.41024, -0.14274, 0.07755, -0.24895, -0.04965, -0.01197, -0.02264, 0.05917, -0.02817, 0.01242, -0.00250, -0.00247, -0.14414, -0.03739, 0.14708, -0.07908, 0.05843, 0.15173, -0.01601, -0.07844, -0.05957, -0.03143, -0.01830, 0.01257, -0.00109, -0.00000, 0.00174, 0.00050, -0.02119, 0.06918, -0.02470, 0.00185, 0.02372, -0.02417, 0.01081, 0.05222, 0.09820, 0.05931, -0.00588, -0.00086, 0.01688, -0.00133, -0.00073, 0.00041, -0.02280, -0.05706, -0.17694, -0.12027, 0.00196, -0.00060, 0.00051, -0.02426, 0.00314, -0.00302, 0.17923, -0.78343, 0.52073, -0.02398, -0.03978, 0.20841, 6.51325, 3.37139, 12.88844, -6.72098, 3.40949, -14.34313, -9.68278, -7.85143, 1.06886, -0.21727, 0.36675, -0.49815, -0.07289, -0.07537, 0.01107, -0.00644, 0.01013, -0.00306, -0.00708, -0.13488, -0.23041, -0.10698, -0.00049, -0.00692, -0.00142, -0.00211, -0.04021, 0.01805, 0.00479, 0.00620, 0.00739, 0.00566, -0.00101, -0.00022, 0.00261, -0.00188, -0.01812, -0.01205, -0.00061, -0.00061, -0.02479, 0.01157, 0.91642, -0.65781, 0.39969, -1.13699, -0.43337, -0.57828, 0.00145, 0.00281, -0.01675, -0.00975, 0.00119, -0.00074, -0.00343, 0.00139, 0.00061, 0.00086, 0.00054, -0.00046, -0.01996, -0.02689, 0.00034, 0.00037, -0.00006, 0.00001, }; static double tabrj[] = { -734.58857, -1081.04460, -551.65750, -148.79782, -25.23171, 164.64781, 248.64813, -0.05163, -0.02413, -1306.61004, 560.02437, -1622.58047, 589.92513, -812.39674, 166.85340, -157.92826, -107.14755, 68.98900, -18.95875, -0.16183, 36.24345, -9.19972, -2.29315, -0.00316, 0.00222, 10.95234, 21.37177, -6.29550, 21.83656, -7.70755, 1.38228, -0.21770, -1.49525, 0.17951, 0.01043, 0.00062, 0.00208, -0.00066, 0.00050, 0.00313, 0.00187, 0.00010, 0.00131, 0.00102, 0.00047, 0.00102, 0.00012, 0.00012, -0.00037, 0.00808, 0.00027, -0.01219, -0.00961, -0.04166, -0.00327, -0.00001, -0.00146, -0.00092, -0.00989, -0.00135, 0.00196, 0.19216, 2.48442, -1.43599, 1.39651, -0.48549, -0.53272, 0.14066, -0.10352, 0.00141, 0.00066, 2.96838, -3.09575, 6.27741, 5.24306, -8.77080, 9.03247, -10.98350, -3.58579, -0.00168, -0.00100, 0.20234, -0.75737, 0.36838, -0.58241, 0.41430, -0.35784, 0.47038, -0.10586, 0.00539, 0.00490, -0.01375, -0.01950, 0.00145, 0.00723, -0.00391, 0.00391, -0.00131, -0.00568, 0.01317, 0.00319, 1.31006, 5.89394, -1.61753, 3.68814, -0.80644, -0.14747, 0.04481, -0.11361, -4.36130, 7.92488, -16.29047, -1.52163, 2.14492, -14.38028, 9.65573, 3.56881, -1.87208, 3.36213, 1.84499, -2.41575, -2.77076, -3.23915, -3.34573, 1.40979, 0.00217, -0.00841, 0.29313, -0.36246, 0.22043, 0.02328, -0.01182, 0.04074, -0.15728, 0.02468, -0.03185, -0.01099, 0.01059, -0.01274, 0.07362, -0.02642, 0.04035, -0.00968, -2.14457, 2.53297, -4.34196, -0.11421, -0.38757, -1.73872, 0.39784, -0.01397, -0.03311, 0.97723, 0.16060, -0.07486, 25.96413, 0.75088, -3.04736, 0.30340, -1.43451, -1.35136, 0.26526, -0.40247, -0.00460, -0.00056, 0.01633, -0.00128, -0.05197, 0.07002, -0.19450, 0.03737, 0.00188, -0.00037, -0.00903, -0.00059, -19.73809, 0.58424, -10.42034, -10.14579, 2.65990, -3.07889, 0.50884, 0.58508, -0.00970, 0.02099, 0.00716, 0.01161, 0.05751, -0.04515, 22.08042, 30.82415, -36.27430, 31.40265, -18.30150, -29.16403, 0.02454, 0.01834, -0.01312, 0.01576, -0.00928, 0.00330, -11.78094, 4.06738, -2.51590, 15.05277, 9.12747, 2.88088, 2.32916, -2.08271, 0.02872, 0.02194, 0.60494, -0.04597, 0.24749, 0.15971, -0.02185, 0.03384, -0.07075, 0.01287, 0.40201, 0.00347, -0.00410, -0.00998, -0.00005, -0.00121, 0.13770, 0.00186, -0.02268, 0.00210, 1.26291, 0.65546, 0.38885, 0.38880, -0.00184, 0.03067, 0.01273, 0.01136, 0.00557, 0.01117, 94.13171, -88.37882, 120.53292, 8.32903, 7.77313, 43.46523, -11.66698, 0.44639, 0.15092, -1.68367, -0.30833, -0.49030, 0.01971, -0.14144, -0.04019, -0.05110, -39.70024, 272.91667, -468.46263, 256.77696, -200.63130, -307.98554, 206.56301, -41.76039, -4.74242, 74.19909, 0.18474, 0.05547, -0.06732, 0.16515, -1156.31285, -1102.97666, -1346.99288, -1121.01090, 666.84550, 421.92305, 2259.49740, -2268.69758, -2325.87639, -4476.46256, -9683.77583, -2472.92565, -0.10400, 0.08075, -0.45225, 0.16621, 0.57789, 2.43804, 85.21675, -154.17208, 219.91042, -9.71116, 31.13240, 108.60117, -25.85622, 8.98402, -0.00233, 0.01030, -17.01324, 10.41588, -13.34449, 1.08782, -1.48199, -1.81734, 0.20334, -0.11734, -0.00230, -0.01869, -0.01182, -0.00129, -0.00281, 0.02021, -5.75973, 19.13309, -16.13690, 5.53382, -1.96585, -6.29211, 1.63105, -0.26089, 0.02935, -0.00555, 0.30700, -19.96182, 0.99825, -16.32664, 0.83052, -13.76201, -3.15609, 0.17360, -111.81423, -2.05419, -0.02455, -0.00478, 7.45114, 21.53296, 19.90263, 5.69420, 2.31253, -8.15116, -2.17440, -0.23014, 0.00168, 0.01590, 8.78005, 0.71418, 4.48561, 4.50680, -1.05713, 1.17880, -0.19327, -0.24877, -5.00870, -8.66354, 10.51902, -7.71011, 4.65486, 8.05673, -1.39635, -3.07669, -2.40347, -0.11167, -0.04064, 0.83512, -0.02041, -0.00351, 0.97375, -0.15795, 0.36361, 0.19913, -0.02142, 0.04193, 0.08801, 0.00475, -2.81010, 3.11341, -2.79191, -0.93313, 0.44570, -0.88287, -0.51815, 0.54776, 0.29736, 0.99779, 2.28957, 0.82183, 0.03386, 0.12855, 0.03124, 0.02454, -0.31958, 0.00070, -1.48184, -1.28195, 0.03965, -1.12026, 0.23910, 0.01293, 0.36146, -0.64483, -1.88470, 0.21469, -11.79819, -1.87287, 2.65699, -0.36287, 0.88148, -1.26883, -0.19657, -0.14279, -0.07536, -0.00004, 0.01496, 0.00537, 2.48352, 3.75581, -0.34909, 3.26696, -0.82105, 0.11287, -0.00755, -0.13764, -15.34429, -2.79957, -3.22976, -15.46084, 10.66793, -0.26054, -0.12188, 5.06211, 0.01313, 0.00424, 84.34332, -57.05646, 92.68150, -0.02024, 149.62698, 59.14407, 174.04569, -129.26785, -55.99789, -238.01484, -212.51618, -115.94914, -0.01720, -0.00158, -13.65602, 17.47396, 0.16714, 32.66367, 16.30095, 9.18345, 3.98555, -5.39985, -1.09958, -0.86072, 0.02752, -0.02474, 0.00671, -0.00278, -0.21030, -0.73658, 0.20708, -0.21378, 0.78462, -2.14051, -1.60070, -2.60915, -5.02441, -1.19246, 0.67622, -0.41889, 0.07430, -0.53204, -0.11214, -0.03417, -0.72636, -0.15535, -0.16815, -0.35603, 0.07530, -0.02521, -0.01261, -0.94883, 0.39930, -0.05370, -2.77309, 0.38431, 0.72127, -0.52030, -0.01804, -0.51188, -0.11993, 0.02189, 0.00928, -0.02129, -0.02760, 0.00441, -0.56832, -0.48114, 0.64192, -0.65656, 0.37483, 0.51883, -0.08474, 0.20324, 0.12783, 0.13041, -0.01545, -0.00282, -0.16196, -0.26980, 0.06584, -0.09987, -0.36305, -0.27610, -0.57074, -0.13607, -0.00824, 0.00369, 0.06094, -0.12214, 0.03581, -0.00876, 0.49346, -0.74596, 0.47814, 0.18201, -1.00640, 0.24465, 10.09808, 2.30496, 13.63359, -7.94007, 0.29792, -13.55724, -6.48556, -5.99581, 0.69686, -0.22434, 0.23198, -0.35579, -0.04736, -0.05683, 0.36710, -0.16571, 0.14876, 0.21824, -0.18940, -0.15063, -0.23692, -0.09990, -0.08923, -0.12222, 0.02998, -0.04560, -0.16229, 0.04552, -0.33051, 0.02585, -0.00622, 0.01583, 0.15436, -0.07109, 0.06429, 0.09218, -0.01277, -0.00019, 0.02345, -0.01057, -0.07294, 0.02506, 0.62063, -0.52533, 0.16814, -0.77168, -0.20614, -0.31828, -0.12856, 0.01316, -0.01522, -0.00126, 0.01558, 0.04765, -0.02776, 0.01166, -0.05185, 0.00674, 0.00754, 0.02183, -0.00645, -0.01050, -0.02155, 0.00375, 0.12040, -0.00004, }; static char argsj[] = { 0, 6, 3, 2, 5, -6, 6, 3, 7, 0, 2, 2, 5, -5, 6, 6, 3, 1, 5, -2, 6, -3, 8, 0, 2, 4, 5,-10, 6, 4, 3, 2, 5, -4, 6, -3, 7, 1, 3, 3, 5,-10, 6, 7, 7, 0, 2, 6, 5,-15, 6, 0, 3, 1, 5, -4, 6, 4, 7, 0, 3, 3, 5, -8, 6, 2, 7, 0, 3, 1, 5, -3, 6, 1, 7, 0, 3, 1, 5, -3, 6, 2, 7, 0, 1, 1, 7, 1, 2, 5, 5,-12, 6, 0, 3, 2, 5, -7, 6, 7, 7, 0, 3, 1, 5, -1, 6, -3, 7, 0, 2, 3, 5, -7, 6, 3, 3, 1, 5, -4, 6, 3, 7, 0, 2, 1, 5, -2, 6, 3, 3, 3, 5, -8, 6, 3, 7, 0, 2, 1, 5, -3, 6, 3, 3, 1, 5, -3, 6, 3, 7, 0, 2, 3, 5, -8, 6, 2, 3, 2, 5, -5, 6, 2, 7, 0, 1, 2, 7, 0, 2, 4, 5, -9, 6, 3, 2, 2, 5, -4, 6, 4, 1, 1, 6, 2, 3, 2, 5, -5, 6, 3, 7, 0, 2, 2, 5, -6, 6, 2, 2, 5, 5,-11, 6, 1, 3, 1, 5, -2, 7, -2, 8, 0, 2,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, 2, 1, 3, -1, 5, 0, -1 }; /*////////////////////////////////////Saturn starts here/////////////////////////////////////////*/ static double tablst[] = { 1788381.26240, 2460423.68044, 1370113.15868, 415406.99187, 72040.39885, 12669.58806, 439960754.85333, 180256.80433, 18.71177, -40.37092, 66531.01889, -195702.70142, 57188.02694, -179110.60982, -19803.06520, -58084.15705, -9055.13344, -31146.10779, 11245.43286, -3247.59575, 459.48670, 2912.82402, -4.06749, -13.53763, -30.55598, -4.51172, 1.48832, 0.37139, 597.35433, 1193.44545, -297.50957, 976.38608, -263.26842, 34.84354, -6.77785, -29.92106, -0.16325, -0.18346, -0.15364, -0.08227, 0.20180, 0.02244, 0.04672, -0.29867, -0.04143, -0.00760, -0.17046, -0.00778, 0.04200, 0.23937, -0.00098, -0.05236, -0.02749, -0.01813, 0.00637, 0.01256, -0.04506, 0.04448, -0.00105, 0.06224, 0.01157, 0.17057, -0.03214, 0.18178, -0.22059, -0.01472, -0.24213, 0.04309, 0.03436, 0.44873, 0.01350, -0.01931, -0.80618, -0.56864, 0.29223, -0.03101, 0.04171, 0.02264, -0.01264, -0.01645, 0.01774, 0.06374, -0.01925, -0.03552, 0.10473, -0.04119, 0.08045, 0.04635, -3.01112, -9.26158, 8.13745, 1.88838, -0.15184, 0.16898, -0.22091, 0.29070, -0.03259, 0.06938, -0.08499, -0.21688, 0.01848, -0.05594, 0.50100, -0.00027, 0.13300, 0.12055, 0.03039, 0.03854, -1.55287, 2.55618, -0.45497, -0.29895, -0.93268, 0.83518, -0.32785, 7.03878, -1.66649, 2.75564, -0.29459, 0.01050, 0.08293, -0.03161, -0.12750, -0.04359, 0.04217, 0.07480, -114.43467, 49.47867, -66.52340, -26.27841, 15.48190, -13.06589, 3.28365, 5.02286, -0.17155, -0.07404, 0.00924, -0.07407, -0.02922, 0.06184, 108.04882, 86.09791, -155.12793, 208.10044, -311.72810, -268.92703, 74.57561, -420.03057, -0.07893, 0.09246, -0.66033, -0.39026, -0.13816, -0.08490, -36.79241, -78.88254, 71.88167, -68.05297, 51.71616, 65.77970, -43.59328, 23.51076, -0.02029, -0.32943, -8.82754, 1.48646, -3.12794, 2.12866, -0.06926, 0.44979, 0.00621, -0.51720, -3.82964, -1.48596, -0.11277, -3.21677, 0.81705, -0.19487, -0.06195, 0.10005, -0.02208, 0.00108, 0.00455, -0.03825, 0.01217, -0.00599, -0.17479, -0.47290, 0.85469, 1.12548, -0.80648, -0.44134, -0.01559, -0.07061, 0.01268, -0.01773, 0.01308, -0.03461, -0.71114, 1.97680, -0.78306, -0.23052, 0.94475, -0.10743, 0.18252, -8.03174, 0.00734, 0.04779, 0.12334, -0.03513, 0.01341, 0.02461, 0.02047, -0.03454, 0.02169, -0.01921, -1.12789, 0.09304, 0.14585, 0.36365, 0.03702, 0.10661, -0.00464, -1.72706, -0.00769, -0.04635, -0.01157, 0.00099, 10.92646, 1.96174, 2.91142, 4.74585, -0.29832, 0.75543, 0.05411, 1.05850, 0.38846, -0.16265, 1.52209, 0.12185, 0.18650, 0.35535, -278.33587, -82.58648, -160.00093, -225.55776, 35.17458, -77.56672, 10.61975, 3.33907, 0.06090, 2.17429, -4.32981, -5.84246, 11.43116, 20.61395, -0.65772, 1.28796, 1224.46687, -3113.15508, 3798.33409, -137.28735, -256.89302, 2227.35649, -779.78215, -260.37372, 11.73617, -13.25050, -0.75248, -2.87527, -8.38102, 17.21321, -61784.69616, 39475.02257, -54086.68308, 54550.85490, -16403.69351, 29602.70098, 14672.06363, 16234.17489, 15702.37109, -22086.30300, -22889.89844, -1245.88352, 1.48864, 19.75000, 0.78646, 3.29343, -1058.13125, 4095.02368, -2793.78506, 1381.93282, -409.19381, -772.54270, 161.67509, -34.15910, -514.27437, 27.34222, -311.04046, 48.01030, -43.36486, 16.19535, -0.73816, -0.81422, 287.32231, -110.44135, 200.43610, 37.98170, 17.73719, 34.40023, -2.46337, 1.48125, 0.09042, -0.11788, 0.37284, 0.51725, 0.00597, 0.14590, -0.01536, 0.00980, 0.00721, 0.02023, 0.00027, 0.02451, -0.72448, -0.71371, 0.29322, 0.18359, 0.72719, -0.37154, 0.14854, -0.02530, 0.23052, 0.04258, 4.82082, 0.01885, 3.11279, -0.63338, 0.10559, -0.02146, -0.01672, 0.03412, 0.00605, 0.06415, -0.89085, 1.51929, -0.36571, 0.39317, 12.05250, -3.79392, 3.96557, -3.51272, -0.17953, 12.30669, -0.05083, -0.11442, 0.02013, -0.02837, -0.02087, -0.01599, 0.49190, 0.30360, 0.01316, 0.17649, 0.21193, -0.09149, -0.07173, -0.05707, 4.24196, -1.25155, 1.81336, 0.68887, -0.01675, 0.20772, -0.04117, -0.03531, -0.02690, -0.02766, 37.54264, 10.95327, 8.05610, 30.58210, -12.68257, 1.72831, 0.13466, -3.27007, 0.01864, -0.00595, 0.03676, 0.14857, -0.07223, 0.06179, 0.44878, -1.64901, -20.06001, 0.63384, -4.97849, 4.78627, 29.87370, 7.29899, 0.00047, -0.00155, 0.00314, 0.01425, -0.17842, -0.08461, -1.61020, -8.47710, 6.85048, -4.38196, 1.05809, 2.68088, -0.01027, -0.00833, 0.06834, -0.04205, 0.03330, -0.01271, 0.01301, -0.01358, 0.03537, 0.03612, 0.02962, 0.62471, -0.30400, -0.64857, 0.01773, 0.01890, 0.01426, -0.00226, -0.50957, -0.01955, -0.09702, 1.09983, 0.64387, -0.02755, 0.26604, 0.30684, 0.06354, 0.05114, -0.00058, -0.04672, -0.00828, 0.00712, -0.00440, 0.00029, -0.01601, 0.03566, 0.13398, -0.02666, -0.06752, -0.43044, 0.07172, -0.01999, -0.01761, -0.05357, 0.06104, 0.29742, -0.08785, 0.05241, -6.57162, -4.20103, 0.03199, -6.46187, 1.32846, -0.51137, 0.06358, 0.37309, -1.46946, 2.34981, -0.18712, 0.11618, 240.62965, -107.21962, 219.81977, 84.04246, -62.22931, 68.35902, -9.48460, -32.62906, 5.57483, -1.82396, 1.00095, -0.39774, 7.87054, 11.45449, -432.67155, 55064.72398, 12444.62359, 54215.28871, 8486.03749, 12297.48243, -333.27968, 1147.93192, 1403.73797, 990.40885, -3.84938, -722.43963, 16.83276, 96.48787, 7.04834, 38.22208, 0.63843, 2.61007, 230.73221, 171.64166, 1.96751, 287.80846, -85.21762, 31.33649, -2.25739, -11.28441, 0.04699, 0.06555, -0.08887, 1.70919, 0.09477, 0.26291, -0.15490, 0.16009, 1.93274, 1.01953, 0.36380, 1.29582, -0.13911, 0.14169, -0.00491, -0.00030, -0.08908, -0.10216, -0.03265, -0.03889, 0.40413, -1.12715, -0.94687, -0.04514, 0.02487, -0.01048, 0.39729, 2.82305, -0.61100, 1.11728, -0.13083, -0.04965, -0.00602, -0.02952, -6.13507, 13.73998, -15.70559, -1.28059, 2.64422, -9.33798, 3.26470, 1.56984, -0.00572, 0.09992, -8.80458, -8.23890, -11.51628, 9.47904, 11.31646, 4.29587, -2.41367, -0.05883, -0.80022, -1.02706, 0.21461, -0.06864, 0.01882, 0.01798, 0.27614, -0.01007, 0.04362, 0.07560, 0.05519, 0.23435, -0.09389, 0.01613, 0.01298, 0.04691, -0.02665, -0.03582, 0.60080, -4.28673, 1.87316, -1.05840, 0.13248, 0.40887, -0.67657, 0.67732, 0.05522, 0.07812, -0.17707, -0.07510, 0.24885, 10.63974, -7.40226, -2.33827, 2.75463, -32.51518, 0.05140, 0.01555, 180.43808, 263.28252, 384.50646, -76.53434, -93.50706, -220.50123, -81.91610, 103.92061, 30.90305, -2.89292, -0.06634, -0.37717, -0.01945, -0.05936, 29.27877, -59.73705, 35.86569, -18.36556, 3.88812, 4.82090, -0.70903, 0.06615, 0.01558, -0.01854, 0.16209, 0.12682, 0.02508, 0.02406, -0.03078, -0.01737, -0.00033, -0.00020, 0.01023, 0.05972, -0.03373, -0.07289, -2.08162, -0.14717, -0.64233, -0.75397, 0.11752, -0.09202, 4.42981, -4.19241, 5.02542, 5.03467, -4.22983, 2.80794, 3.03016, -2.74373, -1.11490, -2.72378, -0.63131, 0.74864, -0.00759, -0.00675, 0.03615, -0.01806, -2.71920, -1.50954, 0.54479, -1.92088, 0.66427, 0.32228, -2.55188, -0.65332, -2.73798, 2.10182, 1.54407, 3.01357, 38.76777, 23.54578, 27.29884, -14.93005, -7.50931, -5.66773, 0.30142, 1.52416, 0.00634, 0.09697, -0.00748, 0.01433, 0.02936, 0.53228, -0.03603, 0.06345, 0.30816, -1.07925, 0.46709, -0.21568, 0.01663, 0.10810, -0.42511, 0.35872, -0.19662, -6.74031, 1.05776, 1.86205, 1.08919, 0.10483, -0.03368, -0.21535, 0.07556, -0.27104, 0.05142, -0.03812, 1.20189, -1.36782, 1.35764, 1.39387, -1.19124, 0.77347, -0.54760, -0.26295, -0.07473, 0.23043, 2.82621, -0.23524, 0.47352, -0.81672, -0.08515, 0.04700, 0.55355, -0.40138, 0.22255, 0.12236, -0.09110, 0.31982, 0.39404, -0.17898, -0.00056, 0.00014, -0.02012, 0.03102, 0.43236, -0.10037, -0.00961, 0.07440, -0.07076, -1.97272, 0.25555, -0.21832, -0.00837, -0.08393, 0.01531, 0.00627, 0.33193, 0.70765, -0.43556, 0.28542, -0.23190, -0.04293, -0.08062, 0.13427, 0.23763, -0.17092, 0.09259, 0.05155, 0.08065, -0.11943, -0.02174, -0.68899, -0.01875, -0.01746, 0.13604, 0.29280, -0.17871, 0.11799, 0.02003, 0.04065, 0.01343, -0.06060, -0.01290, -0.26068, -0.09033, 0.02649, -0.00092, -0.03094, -0.00770, -0.10447, -0.04113, 0.01259, -0.00469, -0.04346, -0.00010, 0.06547, }; static double tabbst[] = { -567865.62548, -796277.29029, -410804.00791, -91793.12562, -6268.13975, 398.64391, -710.67442, 175.29456, -0.87260, 0.18444, -1314.88121, 20709.97394, -1850.41481, 20670.34255, -896.96283, 6597.16433, -179.80702, 613.45468, 17.37823, -13.62177, -0.36348, 12.34740, 0.47532, 0.48189, 0.27162, -0.20655, -0.23268, 0.05992, 46.94511, 15.78836, 21.57439, 23.11342, -0.25862, 5.21410, -0.22612, -0.05822, -0.00439, -0.01641, -0.01108, -0.00608, 0.00957, 0.00272, -0.00217, 0.00001, -0.00534, -0.00545, 0.00277, -0.00843, 0.00167, -0.00794, 0.00032, -0.00242, -0.00002, -0.00041, -0.00025, 0.00031, 0.00062, -0.00060, 0.00083, 0.00032, 0.00527, -0.00211, 0.00054, 0.00004, -0.02769, -0.01777, 0.00247, 0.00097, 0.00020, -0.00232, 0.00044, -0.00035, -0.00072, 0.01341, 0.00325, -0.01159, 0.00079, -0.00078, -0.00009, 0.00066, 0.00222, 0.00002, 0.00013, -0.00161, 0.01374, -0.05305, 0.00478, -0.00283, 0.16033, 0.13859, 0.33288, -0.16932, -0.00316, 0.00625, -0.00309, 0.01687, 0.00001, 0.00486, 0.00401, -0.01805, -0.00048, -0.00407, -0.01329, 0.01311, -0.00591, 0.00166, 0.00830, 0.00665, -0.80207, 0.22994, -0.34687, 0.08460, -0.11499, -0.01449, -0.01574, 0.78813, -0.03063, 0.28872, -0.00337, 0.01801, -0.01703, -0.00929, -0.00738, 0.03938, 0.05616, -0.00516, -3.09497, 30.13091, -3.14968, 17.62201, -0.73728, 2.46962, -0.11233, 0.03450, -0.07837, -0.01573, -0.01595, 0.00394, 0.00174, 0.01470, 6.83560, -2.37594, 4.95125, 3.24711, 2.44781, 5.17159, 1.99820, -2.38419, 0.00840, 0.03614, -0.00209, -0.30407, -0.02681, -0.06128, 1.50134, 11.82856, 4.39644, 6.98850, -4.17679, 5.73436, -9.66087, 1.98221, -0.29755, 0.08019, -0.24766, -8.54956, -1.74494, -3.36794, -0.32661, -0.00722, 0.14141, 0.01023, -1.21541, -2.58470, 0.38983, -1.70307, 0.31209, -0.10345, 0.02593, 0.02178, 0.00289, 0.00393, -0.00236, -0.00373, -0.00270, -0.00049, -0.06282, -0.00443, -0.02439, -0.02254, -0.02220, 0.03532, -0.00072, 0.00010, -0.00049, -0.00112, 0.00086, 0.00112, 0.10135, -0.10972, 0.08357, 0.00155, 0.04363, -0.00201, -0.01996, -0.01341, -0.00039, -0.00042, -0.00294, 0.00070, 0.00005, -0.00027, 0.00070, -0.00076, 0.00234, -0.00239, -0.08365, -0.08531, -0.03531, 0.15012, -0.01995, -0.01731, -0.00370, -0.00745, -0.00315, -0.00079, -0.00120, -0.00145, -0.99404, -1.31859, 0.03584, -0.83421, 0.10720, -0.05768, 0.06664, -0.09338, -0.01814, -0.00003, -0.05371, -0.06458, -0.00100, -0.01298, -7.08710, -23.13374, 4.18669, -19.94756, 4.85584, -3.37187, 0.58851, 0.31363, 0.01994, 0.27494, -1.37112, 2.61742, 0.52477, -0.46520, -0.13183, 0.26777, 836.90400, -484.65861, 815.99098, 236.54649, -32.38814, 288.95705, -68.17178, -18.87875, -1.79782, -3.68662, -1.27310, -0.65697, -3.67530, 2.10471, -13758.97795, 4807.62301, -14582.14552, 9019.73021, -3202.60105, 4570.16895, 2078.68911, 2892.62326, -2399.35382, 3253.16198, -8182.38152, -3588.77680, -0.16505, 1.08603, 0.53388, 0.87152, 61.53677, 538.43813, -407.32927, 322.27446, -148.71585, -179.37765, 54.07268, -34.12281, -14.76569, -17.95681, -10.82061, -6.39954, -2.10954, 0.67063, 0.22607, -0.43648, 20.90476, -45.48667, 30.39436, -14.20077, 5.17385, 5.12726, -0.66319, 0.55668, 0.02269, -0.00016, 0.07811, 0.00111, 0.01603, 0.01020, -0.00107, 0.00494, -0.00077, -0.00084, -0.00196, 0.00081, -0.03776, 0.01286, -0.00652, -0.01450, 0.05942, -0.08612, 0.01093, -0.01644, 0.02147, -0.00592, 0.36350, -0.00201, 0.14419, -0.10070, -0.00491, -0.01771, -0.00053, -0.00033, 0.00146, 0.00048, 0.00582, 0.04423, -0.00549, 0.00983, 0.27355, -0.38057, 0.24001, -0.05441, -0.07706, 0.14269, -0.00059, -0.00154, -0.00013, -0.00088, -0.00046, 0.00029, -0.00276, -0.00507, 0.00075, -0.00076, 0.01806, 0.00862, -0.00510, -0.01364, -0.00029, -0.12664, 0.03899, -0.03562, 0.00318, 0.00514, 0.00057, 0.00201, 0.00028, 0.00014, -0.47022, -0.74561, 0.40155, -0.16471, -0.18445, 0.34425, -0.07464, -0.13709, -0.01018, -0.00748, -0.01210, -0.04274, -0.00579, -0.00692, -11.09188, -1.67755, -6.62063, -13.84023, 12.75563, -6.73501, 8.31662, 5.40196, 0.00052, 0.00034, 0.00128, 0.00085, -0.02202, -0.00599, -0.33458, -1.65852, 1.47003, -1.02434, 0.87885, 1.15334, -0.00241, -0.00721, 0.03154, 0.00612, 0.00318, -0.02521, 0.00042, 0.00213, -0.01094, 0.05417, -0.03989, -0.00567, 0.00123, -0.00244, 0.00108, 0.00242, -0.00138, -0.00099, 0.04967, 0.01643, -0.00133, 0.02296, 0.12207, 0.05584, 0.00437, -0.04432, -0.00176, -0.00922, -0.00252, 0.00326, -0.00020, -0.00050, -0.00263, -0.00084, -0.01971, 0.00297, 0.03076, 0.01736, -0.01331, 0.01121, -0.00675, 0.00340, -0.00256, 0.00327, -0.00946, 0.03377, -0.00770, 0.00337, 0.61383, 0.71128, -0.02018, 0.62097, -0.07247, 0.04418, -0.02886, -0.03848, -0.44062, 0.03973, -0.00999, -0.04382, 57.94459, 117.45112, -71.22893, 126.39415, -62.33152, -31.90754, 12.17738, -16.46809, -1.13298, 0.08962, -0.20532, 0.16320, -1.55110, -1.44757, -3102.08749, -7452.61957, -5009.53858, -7216.29165, -2476.87148, -1880.58197, -574.49433, 227.45615, 144.50228, 379.15791, 225.36130, -443.47371, -8.51989, -3.75208, -4.25415, -1.59741, -0.43946, -0.06595, 150.42986, 6.54937, 87.67736, 92.32332, -21.97187, 29.87097, -4.21636, -5.72955, -0.03879, -0.01071, -0.45985, 0.02679, -0.02448, 0.02397, -0.06551, -0.01154, 1.97905, -0.82292, 1.10140, 0.30924, 0.03389, 0.14230, 0.00003, 0.00119, -0.01117, 0.00665, -0.00132, -0.00576, -0.08356, 0.08556, -0.26362, -0.12450, 0.00509, 0.00165, 0.02591, 0.16200, -0.03318, 0.06463, -0.00899, -0.00462, 0.00102, 0.00004, -0.73102, 0.08299, -0.52957, -0.35744, 0.14119, -0.24903, 0.20843, 0.14143, 0.00031, -0.00234, -0.42643, -2.02084, 1.58848, -1.57963, 0.68418, 2.07749, -0.45888, 0.19859, -0.30277, -0.22591, 0.11607, -0.09705, 0.00040, 0.00431, -0.02683, 0.03158, -0.01302, -0.00541, 0.01742, -0.00006, -0.02231, -0.01128, -0.00800, 0.02055, -0.00346, 0.00151, 0.56732, -0.68995, 0.27701, -0.16748, 0.01002, 0.00043, 0.26916, -0.57751, 0.15547, -0.15825, -0.02074, -0.07722, -8.23483, -4.02022, 0.69327, -5.91543, 1.72440, 1.02090, 0.00024, -0.00053, 20.03959, 14.79136, 76.43531, -14.42019, -7.82608, -69.96121, -54.94229, 23.55140, 26.60767, 14.68275, 0.05118, -0.10401, -0.00075, -0.01942, -3.84266, -26.23442, 10.20395, -14.77139, 3.40853, 2.07297, -0.53348, 0.40635, 0.00716, -0.00189, 0.12472, -0.02903, 0.02254, -0.00183, -0.00175, -0.01522, 0.00003, -0.00339, 0.00383, -0.00168, 0.01327, -0.03657, -0.08458, -0.00115, -0.03991, -0.02629, 0.00243, -0.00505, 0.33875, -0.16744, 0.05183, 0.01744, -0.24427, 0.15271, 0.37550, -0.17378, 0.09198, -0.27966, -0.22160, 0.16426, 0.00032, -0.00310, -0.00022, -0.00144, -0.06170, -0.01195, -0.00918, 0.02538, 0.03602, 0.03414, -0.14998, -0.44351, 0.45512, -0.11766, 0.35638, 0.27539, 5.93405, 10.55777, 12.42596, -1.82530, -2.36124, -6.04176, -0.98609, 1.67652, -0.09271, 0.03448, -0.01951, 0.00108, 0.33862, 0.21461, 0.02564, 0.06924, 0.01126, -0.01168, -0.00829, -0.00740, 0.00106, -0.00854, -0.08404, 0.02508, -0.02722, -0.06537, 0.01662, 0.11454, 0.06747, 0.00742, -0.01975, -0.02597, -0.00097, -0.01154, 0.00164, -0.00274, 0.02954, -0.05161, -0.02162, -0.02069, -0.06369, 0.03846, 0.00219, -0.01634, -0.04518, 0.06696, 1.21537, 0.99500, 0.68376, -0.28709, -0.11397, -0.06468, 0.00607, -0.00744, 0.01531, 0.00975, -0.03983, 0.02405, 0.07563, 0.00356, -0.00018, -0.00009, 0.00172, -0.00331, 0.01565, -0.03466, -0.00230, 0.00142, -0.00788, -0.01019, 0.01411, -0.01456, -0.00672, -0.00543, 0.00059, -0.00011, -0.00661, -0.00496, -0.01986, 0.01271, -0.01323, -0.00764, 0.00041, 0.01145, 0.00378, -0.00137, 0.00652, 0.00412, 0.01946, -0.00573, -0.00326, -0.00257, -0.00225, 0.00090, -0.00292, -0.00317, -0.00719, 0.00468, 0.00245, 0.00189, 0.00565, -0.00330, -0.00168, -0.00047, -0.00256, 0.00220, 0.00180, -0.00162, -0.00085, -0.00003, -0.00100, 0.00098, -0.00043, 0.00007, -0.00003, -0.00013, }; static double tabrst[] = { -38127.94034, -48221.08524, -20986.93487, -3422.75861, -8.97362, 53.34259, -404.15708, -0.05434, 0.46327, 0.16968, -387.16771, -146.07622, 103.77956, 19.11054, -40.21762, 996.16803, -702.22737, 246.36496, -63.89626, -304.82756, 78.23653, -2.58314, -0.11368, -0.06541, -0.34321, 0.33039, 0.05652, -0.16493, 67.44536, -29.43578, 50.85074, 18.68861, 0.39742, 13.64587, -1.61284, 0.11482, 0.01668, -0.01182, -0.00386, 0.01025, 0.00234, -0.01530, -0.02569, -0.00799, -0.00429, -0.00217, -0.00672, 0.00650, 0.01154, 0.00120, -0.00515, 0.00125, 0.00236, -0.00216, -0.00098, 0.00009, -0.00460, -0.00518, 0.00600, 0.00003, 0.00834, 0.00095, 0.01967, 0.00637, -0.00558, -0.06911, -0.01344, -0.06589, -0.05425, -0.00607, -0.00247, -0.00266, 0.08790, -0.08537, -0.00647, 0.04028, -0.00325, 0.00488, 0.00111, -0.00044, -0.00731, 0.00127, -0.00417, 0.00303, 0.05261, 0.01858, -0.00807, 0.01195, 1.26352, -0.38591, -0.34825, 1.10733, -0.02815, -0.02148, -0.05083, -0.04377, -0.01206, -0.00586, 0.03158, -0.01117, 0.00643, 0.00306, -0.01186, -0.05161, 0.01136, -0.00976, -0.00536, 0.01949, -1.41680, -0.81290, -0.09254, -0.24347, -0.14831, -0.34381, -2.44464, 0.41202, -0.99240, -0.33707, -0.01930, -0.08473, 0.00830, 0.01165, -0.01604, -0.02439, 0.00227, 0.04493, -42.75310, -22.65155, -9.93679, -18.36179, 2.73773, 3.24126, -1.20698, 1.07731, 0.00434, -0.10360, -0.02359, 0.00054, -0.02664, -0.00122, -19.79520, 33.11770, -53.56452, -35.41902, 67.95039, -82.46551, 117.31843, 14.08609, 0.06447, 0.03289, 0.40365, -0.33397, 0.07079, -0.09504, -30.36873, 6.23538, -14.25988, -44.91408, 38.53146, -16.31919, 6.99584, 22.47169, -0.13313, 0.28016, 6.83715, -6.01384, 1.68531, -3.62443, -0.22469, -0.29718, 0.25169, 0.13780, -3.64824, 1.22420, -2.48963, -1.12515, -0.01510, -0.56180, -0.03306, 0.01848, -0.00103, -0.00077, -0.01681, -0.00227, -0.00402, -0.00287, 0.04965, -0.16190, -0.40025, 0.20734, 0.15819, -0.25451, 0.02467, -0.00495, 0.00597, 0.00490, -0.01085, -0.00460, -0.71564, -0.26624, 0.03797, -0.28263, 0.03510, 0.30014, 2.79810, 0.07258, -0.01618, 0.00337, 0.00876, 0.04438, 0.00742, -0.00455, -0.01163, -0.00683, 0.00950, 0.01275, -0.02124, -0.67527, -0.23635, 0.06298, -0.03844, 0.01010, 0.73588, -0.00271, 0.01742, -0.00467, 0.00017, -0.00505, -0.27482, 5.00521, -1.92099, 1.55295, -0.35919, -0.09314, -0.47002, 0.06826, 0.07924, 0.16838, -0.04221, 0.71510, -0.16482, 0.08809, 41.76829, -125.79427, 106.65271, -71.30642, 36.18112, 17.36143, -1.63846, 5.02215, -1.08404, 0.00061, 2.45567, -2.42818, -9.88756, 5.36587, -0.61253, -0.35003, 1523.54790, 602.82184, 68.66902, 1878.26100, -1098.78095, -120.72600, 127.30918, -383.96064, -7.00838, -6.09942, -1.54187, 0.34883, -9.47561, -4.35408, -21541.63676, -32542.09807, -29720.82604, -28072.21231, -15755.56255, -8084.58657, -8148.87315, 7434.89857, 11033.30133, 7827.94658, 610.18256, -11411.93624, -9.87426, 0.94865, -1.63656, 0.41275, 1996.57150, 511.48468, 669.78228, 1363.67610, -379.72037, 198.84438, -16.63126, -79.37624, -2.30776, -246.07820, -16.85846, -148.18168, -6.89632, -20.49587, 0.39892, -0.34627, -57.81309, -136.96971, 15.25671, -96.61153, 16.09785, -8.79091, 0.70515, 1.16197, 0.05647, 0.04684, 0.25032, -0.19951, 0.07282, -0.00696, 0.00493, 0.00733, -0.01085, 0.00422, -0.01309, 0.00262, 0.37616, -0.36203, -0.11154, 0.18213, 0.15691, 0.29343, 0.00485, 0.06106, -0.01492, 0.09954, 0.28486, 2.27190, 0.33102, 1.50696, -0.01926, 0.04901, 0.01827, 0.00863, -0.03315, 0.00178, -0.77600, -0.48576, -0.21111, -0.19485, 1.90295, 6.44856, 1.71638, 2.12980, -7.19585, -0.08043, 0.07004, -0.02764, 0.01604, 0.01158, 0.00936, -0.01199, 0.18396, -0.29234, 0.10422, -0.00720, 0.05196, 0.10753, 0.02859, -0.03602, 0.63828, 1.96280, -0.31919, 0.85859, -0.10218, -0.00673, 0.01748, -0.02190, 0.01266, -0.02729, -4.80220, 8.90557, -5.94059, 2.28577, -0.19687, -1.28666, 0.32398, 0.14879, -0.02619, -0.02056, -0.04872, -0.07011, -0.04082, -0.04740, 0.60167, -2.20365, -0.27919, -0.45957, -1.31664, -2.22682, 176.89871, 13.03918, 0.00568, 0.00560, 0.01093, 0.00486, -0.00948, -0.31272, -11.87638, -3.68471, -1.74977, -9.60468, 2.94988, -0.57118, 0.00307, -0.01636, 0.02624, 0.03032, -0.00464, -0.01338, 0.00935, 0.00530, -0.11822, 0.03328, -0.41854, 0.04331, 0.41340, -0.21657, -0.00865, 0.00849, -0.00374, -0.00899, 0.01227, -0.23462, -0.71894, -0.04515, 0.00047, 0.28112, -0.12788, 0.11698, -0.02030, 0.02759, 0.02967, -0.00092, 0.00454, 0.00565, -0.00026, 0.00164, -0.01405, -0.00862, 0.01088, 0.05589, 0.18248, -0.06931, -0.00011, 0.03713, 0.01932, -0.00982, -0.13861, 0.09853, -0.03441, -0.02492, 2.26163, -5.94453, 4.14361, -0.94105, 0.39561, 0.75414, -0.17642, 0.03724, -1.32978, -0.56610, -0.03259, -0.06752, 39.07495, 80.25429, -28.15558, 82.69851, -37.53894, -17.88963, 6.98299, -13.04691, -0.48675, -1.84530, -0.07985, -0.33004, -3.39292, 2.73153, -17268.46134, 1144.22336, -16658.48585, 5252.94094, -3461.47865, 2910.56452, -433.49442, -305.74268, -383.45023, 545.16136, 313.83376, 27.00533, -31.41075, 7.90570, -12.40592, 3.01833, -0.83334, 0.23404, 59.26487, -112.74279, 113.29402, -15.37579, 14.03282, 32.74482, -4.73299, 1.30224, -0.00866, 0.01232, -0.53797, 0.00238, -0.07979, 0.04443, -0.05617, -0.05396, 0.10185, -1.05476, 0.43791, -0.32302, 0.06465, 0.03815, 0.00028, -0.00446, 0.09289, -0.06389, 0.01701, -0.01409, 0.47101, 0.16158, 0.01036, -0.39836, 0.00477, 0.01101, -2.06535, 0.33197, -0.82468, -0.41414, 0.03209, -0.09348, 0.00843, -0.00030, -9.49517, -3.82206, 0.66899, -10.28786, 6.33435, 1.73684, -0.98164, 2.25164, -0.07577, -0.00277, 1.02122, 0.75747, 1.79155, -0.77789, -2.56780, -2.07807, 0.19528, 0.77118, -0.28083, 0.32130, -0.04350, -0.07428, -0.01161, 0.01387, 0.02074, 0.19802, -0.03600, 0.04922, -0.19837, 0.02572, -0.00682, -0.04277, -0.01805, 0.00299, 0.03283, -0.02099, 3.57307, 1.17468, 0.65769, 1.88181, -0.39215, 0.08415, -0.53635, -0.19087, -0.12456, 0.02176, 0.01182, -0.07941, -2.43731, 2.44464, 1.03961, -1.81936, 30.33140, 0.92645, 0.00508, -0.01771, -81.06338, 66.43957, 33.16729, 131.44697, 76.63344, -34.34324, -35.33012, -28.04413, -1.47440, 13.09015, 0.13253, -0.01629, 0.02187, -0.00963, -21.47470, -9.44332, -7.21711, -12.59472, 1.76195, -1.63911, 0.09060, 0.28656, 0.00635, 0.00536, 0.03470, -0.06493, 0.00666, -0.01084, 0.01116, -0.01612, -0.00102, 0.00208, -0.05568, 0.00628, 0.02665, -0.01032, 0.21261, -1.90651, 0.72728, -0.57788, 0.08662, 0.10918, 3.39133, 3.97302, -4.63381, 4.26670, -2.50873, -3.76064, 1.28114, 1.81919, 1.48064, -0.37578, -0.26209, -0.47187, 0.00282, -0.00499, 0.01749, 0.03222, 1.60521, -1.79705, 1.61453, 0.68886, -0.29909, 0.55025, -0.07894, 0.19880, -0.15635, 0.46159, 2.09769, 1.52742, -7.60312, 11.34886, 4.35640, 8.61048, 2.15001, -2.15303, -0.61587, -0.11950, -0.03289, -0.00520, -0.00501, -0.00445, 0.15294, -0.05277, 0.02455, 0.00408, 1.19601, 0.43479, 0.20422, 0.57125, -0.12790, 0.01318, -0.15275, -0.43856, 6.99144, -0.08794, -1.69865, 0.82589, -0.20235, 0.97040, 0.20903, 0.00675, 0.26943, 0.08281, 0.03686, 0.05311, 1.28468, 1.21735, -1.38174, 1.29570, -0.75899, -1.17168, 0.44696, -0.32341, -0.06378, -0.27573, -0.06406, 0.87186, 0.21069, 0.19724, 0.00119, -0.04147, 0.39279, 0.51437, -0.11035, 0.21450, -0.04309, 0.02359, 0.20490, 0.14210, 0.00007, -0.00017, -0.03529, -0.02644, 0.10710, 0.44476, -0.02632, -0.01817, 2.11335, -0.04432, 0.18206, 0.27335, 0.08867, 0.00313, -0.00692, 0.01595, -0.72957, 0.32080, -0.29291, -0.44764, 0.12767, -0.05778, 0.04797, -0.00223, 0.17661, 0.22427, -0.04914, 0.09114, 0.12236, 0.00708, 0.74315, -0.01346, 0.02245, -0.02555, -0.30446, 0.13947, -0.12340, -0.18498, -0.04099, 0.02103, 0.06337, -0.01224, 0.28181, -0.01019, -0.02794, -0.09412, 0.03272, -0.01095, 0.11247,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, 5, 1, 6, 1, 2, 7, 5,-11, 6, 0, 2, 5, 5, -6, 6, 1, 2, 3, 5, -1, 6, 1, 2, 6, 5, -8, 6, 1, 2, 4, 5, -3, 6, 0, 2, 5, 5, -5, 6, 0, 1, 3, 5, 0, 2, 6, 5, -7, 6, 1, 2, 7, 5, -9, 6, 0, 2, 5, 5, -4, 6, 0, 2, 6, 5, -6, 6, 0, 2, 7, 5, -8, 6, 0, 2, 6, 5, -5, 6, 0, 2, 7, 5, -7, 6, 0, 2, 8, 5, -9, 6, 0, 2, 8, 5, -8, 6, 0, 2, 1, 3, -1, 6, 0, -1 }; #endif nautic-1.5/man/0000755000175000017500000000000011750006215013272 5ustar moellermoellernautic-1.5/man/Makefile.am0000644000175000017500000000002511554101241015320 0ustar moellermoellerman_MANS = nautic.1 nautic-1.5/man/nautic.10000644000175000017500000000147611554101241014644 0ustar moellermoeller.IX Title "NAUTIC 1" .TH NAUTIC 1 "2011-03-12" "nautic-1.2-1" "Nautic Almanac by Enas Giovanni" .SH "NAME" nautic \- A program to find observer position .SH "SYNOPSIS" .IX Header "SYNOPSIS" nautic .SH "DESCRIPTION" .IX Header "DESCRIPTION" program to compute the observer position in astro-navigation, needs a knowlege about the use of data to find the observer's position, easy to use, compute the ephemeris of 56 major stars and navigational planets. .SH "OPTIONS" .IX Header "OPTIONS" This package has no options, and is controlled entirely through its graphical user interface. .SH "HOMPEAGE" .IX Header "HOMEPAGE" https://sourceforge.net/projects/nauticalmanac/ .SH "ORIGINAL AUTHOR" .IX Header "ORIGINAL AUTHOR" Enas Giovanni .PP The development of nautic has been helped by various people from the free software community. nautic-1.5/Info_Dlg.h0000644000175000017500000000620411556005075014362 0ustar moellermoeller////////////////////////////////////////////////////////////////////////// /* Info_Dlg.h - information dialog Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ /////////////////////////////////////////////////////////////////////////// #ifndef __INFODLG__ #define __INFODLG__ #include #include #include #include #include #include #include #include /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /// Class Info_Dlg /////////////////////////////////////////////////////////////////////////////// class Info_Dlg : public wxDialog { private: protected: wxStaticText* m_staticText26; wxStaticText* m_staticText27; wxStaticText* m_staticText271; wxStaticText* m_staticText272; wxStaticText* m_staticText273; wxStaticText* m_staticText274; wxStaticText* m_staticText275; wxStaticText* m_staticText276; wxStaticText* m_staticText277; wxStaticText* m_staticText278; wxStaticText* m_staticText279; wxStaticText* m_staticText280; wxStaticText* m_staticText281; wxStaticText* m_staticText282; wxStaticText* m_staticText283; wxStaticText* m_staticText284; wxStaticText* m_staticText263; wxStaticText* m_staticText1; wxStaticText* m_staticText2; wxStaticText* m_staticText3; wxStaticText* m_staticText4; wxStaticText* m_staticText5; wxStaticText* m_staticText6; wxStaticText* m_staticText7; wxStaticText* m_staticText8; wxStaticText* m_staticText9; wxStaticText* m_staticText10; wxStaticText* m_staticText11; wxStaticText* m_staticText12; wxStaticText* m_staticText13; wxStaticText* m_staticText14; wxStaticText* m_staticText15; wxStaticText* m_staticText16; wxStaticText* m_staticText17; public: //Info_Dlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Body 's paramether"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL|wxFRAME_FLOAT_ON_PARENT ); Info_Dlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Body's paramether"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 650,380 ), long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE ); ~Info_Dlg(); protected: virtual void OnPaintDlgInfo( wxPaintEvent& event ) { event.Skip(); } }; #endif //__noname__ nautic-1.5/main.h0000644000175000017500000001762211742341363013633 0ustar moellermoeller /* main.h - Main file - Declares simple wxWidgets application with GUI created using wxFormBuilder. Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef __main__ #define __main__ // main wxWidgets header file #include #include #include #include #include #include #include "stars.h" #include "sun.h" #include "spa.h" #include "starpos.h" #include "h_correction.h" #include "un_known_star.h" // gui classes generated by wxFormBuilder #include "gui.h" #include "Info_Dlg.h" #include "Pos_dialog.h" #include "about.h" #include "plot_dialog.h" //////////////////////////////////////////////////////////////////////////////// // application class declaration //////////////////////////////////////////////////////////////////////////////// class MainApp : public wxApp { public: virtual bool OnInit(); }; // declare global static function wxGetApp() DECLARE_APP(MainApp) //////////////////////////////////////////////////////////////////////////////// // main application frame declaration //////////////////////////////////////////////////////////////////////////////// class MainDialog : public MainDialogBase { DECLARE_EVENT_TABLE() public: MainDialog( wxWindow *parent ); virtual ~MainDialog(); void SendMessage(); wxColour* col; wxRect rect1; wxTimer timer; int iCount; bool bInsertNum; wxTimer * m_timer; int ihourval; int iminval; int isecval; wxDateTime time; ///////////////sun///////////////////////////stars/////////////planets/////////////moon///////////////// double declination; double CoArect; double Tm; //////////////tempo siderale///////////////////////// double Ts; double altitude; double azimuth; double RA; double LHA; double equinox; double loctime; double t; double lamda; double beta; double parlax; double smdiam; Starpos planet; wxString bodyname; wxString date; wxString jul; wxString constell; double indxerr; bool bUpperLimb; ///////////////////////data///////////////////////////// int year; int month; int day; double iYear ; double iMonth; double iDay; double iHour; double iMinute; double iSeconds; /////////////////////flag for choice/////////////////// bool bSun; bool bMoon; bool bStar; bool bPlanet; ////////////////////distance///////////////// double P_distance; double dTrueAlt; //////////////////////lat, lon////////////////////////////// double latitude; double longitude; double truelat; double truelong; wxString filepath; protected: // protected event handlers virtual void OnCloseDialog( wxCloseEvent& event ); virtual void OnPaint(wxPaintEvent& event); virtual void OnCharHook( wxKeyEvent& event ) ; virtual void OnTimer(wxTimerEvent& event); virtual void OnText_Deg_Lat( wxCommandEvent& event ); virtual void OnText_min_Lat( wxCommandEvent& event ); virtual void OnText_Sec_Lat( wxCommandEvent& event ); virtual void OnChar( wxKeyEvent& event ); virtual void OnTextDegLon( wxCommandEvent& event ); virtual void OnTextMinLon( wxCommandEvent& event ); virtual void OnTextSecLon( wxCommandEvent& event ) ; virtual void OnTextMax( wxCommandEvent& event ); virtual void OnCharDeg( wxKeyEvent& event ); virtual void OnCharSec( wxKeyEvent& event ); virtual void OnCharLon( wxKeyEvent& event ); virtual void OnCharDegLon( wxKeyEvent& event ); virtual void OnCharSecLon( wxKeyEvent& event ); virtual void OnStartTimer( wxCommandEvent& event ); virtual void OnStopTimer( wxCommandEvent& event ); virtual void OnHrsUTC( wxKeyEvent& event ); virtual void OnMinUTC( wxKeyEvent& event ); virtual void OnSecUTC( wxKeyEvent& event ); virtual void OnCharLocalHr( wxKeyEvent& event ); virtual void OnCharLocalMin( wxKeyEvent& event ); virtual void OnCharLocalSec( wxKeyEvent& event ); virtual void OnTextUTChrs( wxCommandEvent& event ); virtual void OnTextUTCmin( wxCommandEvent& event ); virtual void OnTextUTCsecs( wxCommandEvent& event ); virtual void OnTextLTHrs( wxCommandEvent& event ); virtual void OnTextLTmins( wxCommandEvent& event ); virtual void OnTextLTsecs( wxCommandEvent& event ); virtual void OnLocal( wxCommandEvent& event ); virtual void OnUTC( wxCommandEvent& event ); virtual void OnStarChoice(); virtual void OnCalcHeitht( wxCommandEvent& event ); virtual void OnPlanetChoice();//( wxCommandEvent& event ); virtual void OnCharAltMin( wxKeyEvent& event ); virtual void OnTextEnter( wxFocusEvent& event ); virtual void OnCharDiff(wxKeyEvent& event); virtual void OnCharAlt( wxKeyEvent& event ); virtual void OnTextAlt( wxCommandEvent& event ); virtual void OnInfo( wxCommandEvent& event ); virtual void OnCharAltSec( wxKeyEvent& event ); virtual void OnFocusOut( wxFocusEvent& event ); virtual void OnAltMin( wxFocusEvent& event ); virtual void OnAltSec( wxFocusEvent& event ); virtual void OnCharEHt( wxKeyEvent& event ); virtual void OnEyeHt( wxFocusEvent& event ); virtual void OnCheckbox( wxCommandEvent& event ); virtual void OnAzOut( wxFocusEvent& event ); virtual void OnSave( wxCommandEvent& event ); virtual void OnCalcPos( wxCommandEvent& event ); virtual void OnCancLines( wxCommandEvent& event ); virtual void OnMeridian( wxCommandEvent& event ); virtual void OnPlot( wxCommandEvent& event ); virtual void GetData( ); virtual void OnComboStar(wxCommandEvent& event); virtual void OnComboPlan(wxCommandEvent& event); /////////menu//////////////// virtual void OnMenuSave( wxCommandEvent& event ); virtual void OnMenuCancel( wxCommandEvent& event ); virtual void OnMenuAlt( wxCommandEvent& event ); virtual void OnMenuMeridian( wxCommandEvent& event ); virtual void OnMenuPlot( wxCommandEvent& event ) ; virtual void OnMenuInfo( wxCommandEvent& event ); virtual void OnMenuAbout( wxCommandEvent& event ); private: void InitDialog(); int GetMonthfromString(int iMon); wxString FormatDegrees(float Degrees); bool isNumber(int num); bool isOnlyNumber(int num); void formatNum(wxKeyEvent& evt); void formatOnlyNum(wxKeyEvent& evt); void SetTextOnLTime(); void GetUTCfromLocal(); double plan_prlx(double distance,double alt); ////////////flags////////////////////////////// bool isStar; bool isPlanet; /////////////////last function/////////////////////for menu/////// void CalcAltitude(); void CalcMeridian(); void CancLines(); void save(); void info(); void calc_pos(); }; class InfoDlg : public Info_Dlg { public: double decl; double CoRect; double GHAa; double GHA; double LHA; double RA; double JD; double Date; double t; double loctime; double lat; double lon; double parlx; double sdiam; double alt; double azth; double parlax; wxString sConst; wxString body; wxString date; wxString jul; InfoDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Body 's paramether"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 300,500 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL|wxFRAME_FLOAT_ON_PARENT ); protected: wxString hrms(double x); wxString dms(double x); wxString FormatDegrees(float Degrees); wxString FormatDegs(float Degrees); virtual void OnPaintDlgInfo( wxPaintEvent& event ); }; #endif //__main__ nautic-1.5/sofam.h0000644000175000017500000001442611556005075014013 0ustar moellermoeller#ifndef SOFAMHDEF #define SOFAMHDEF /* ** - - - - - - - - ** s o f a m . h ** - - - - - - - - ** ** Macros used by SOFA library. ** ** This file is part of the International Astronomical Union's ** SOFA (Standards Of Fundamental Astronomy) software collection. ** ** This revision: 2010 May 16 ** ** SOFA release YYYY-MM-DD ** ** Copyright (C) 2010 IAU SOFA Board. See notes at end. */ #include "sofa.h" /* Seconds of time per radian */ #define DS2R (7.272205216643039903848712e-5) /* Pi */ #define DPI (3.141592653589793238462643) /* 2Pi */ #define D2PI (6.283185307179586476925287) /* Degrees to radians */ #define DD2R (1.745329251994329576923691e-2) /* Radians to arcseconds */ #define DR2AS (206264.8062470963551564734) /* Arcseconds to radians */ #define DAS2R (4.848136811095359935899141e-6) /* Arcseconds in a full circle */ #define TURNAS (1296000.0) /* Milliarcseconds to radians */ #define DMAS2R (DAS2R / 1e3) /* Length of tropical year B1900 (days) */ #define DTY (365.242198781) /* Seconds per day. */ #define DAYSEC (86400.0) /* Days per Julian year */ #define DJY (365.25) /* Days per Julian century */ #define DJC (36525.0) /* Days per Julian millennium */ #define DJM (365250.0) /* Reference epoch (J2000.0), Julian Date */ #define DJ00 (2451545.0) /* Julian Date of Modified Julian Date zero */ #define DJM0 (2400000.5) /* Reference epoch (J2000.0), Modified Julian Date */ #define DJM00 (51544.5) /* 1977 Jan 1.0 as MJD */ #define DJM77 (43144.0) /* TT minus TAI (s) */ #define TTMTAI (32.184) /* AU (m) */ #define DAU (149597870e3) /* Speed of light (AU per day) */ #define DC (DAYSEC / 499.004782) /* L_G = 1 - d(TT)/d(TCG) */ #define ELG (6.969290134e-10) /* L_B = 1 - d(TDB)/d(TCB), and TDB (s) at TAI 1977/1/1.0 */ #define ELB (1.550519768e-8) #define TDB0 (-6.55e-5) /* dint(A) - truncate to nearest whole number towards zero (double) */ #define dint(A) ((A)<0.0?ceil(A):floor(A)) /* dnint(A) - round to nearest whole number (double) */ #define dnint(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5)) /* dsign(A,B) - magnitude of A with sign of B (double) */ #define dsign(A,B) ((B)<0.0?-(A):(A)) #endif /*---------------------------------------------------------------------- ** ** Copyright (C) 2010 ** Standards Of Fundamental Astronomy Board ** of the International Astronomical Union. ** ** ===================== ** SOFA Software License ** ===================== ** ** NOTICE TO USER: ** ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING TERMS AND CONDITIONS ** WHICH APPLY TO ITS USE. ** ** 1. The Software is owned by the IAU SOFA Board ("SOFA"). ** ** 2. Permission is granted to anyone to use the SOFA software for any ** purpose, including commercial applications, free of charge and ** without payment of royalties, subject to the conditions and ** restrictions listed below. ** ** 3. You (the user) may copy and distribute SOFA source code to others, ** and use and adapt its code and algorithms in your own software, ** on a world-wide, royalty-free basis. That portion of your ** distribution that does not consist of intact and unchanged copies ** of SOFA source code files is a "derived work" that must comply ** with the following requirements: ** ** a) Your work shall be marked or carry a statement that it ** (i) uses routines and computations derived by you from ** software provided by SOFA under license to you; and ** (ii) does not itself constitute software provided by and/or ** endorsed by SOFA. ** ** b) The source code of your derived work must contain descriptions ** of how the derived work is based upon, contains and/or differs ** from the original SOFA software. ** ** c) The name(s) of all routine(s) in your derived work shall not ** include the prefix "iau". ** ** d) The origin of the SOFA components of your derived work must ** not be misrepresented; you must not claim that you wrote the ** original software, nor file a patent application for SOFA ** software or algorithms embedded in the SOFA software. ** ** e) These requirements must be reproduced intact in any source ** distribution and shall apply to anyone to whom you have ** granted a further right to modify the source code of your ** derived work. ** ** Note that, as originally distributed, the SOFA software is ** intended to be a definitive implementation of the IAU standards, ** and consequently third-party modifications are discouraged. All ** variations, no matter how minor, must be explicitly marked as ** such, as explained above. ** ** 4. In any published work or commercial products which includes ** results achieved by using the SOFA software, you shall ** acknowledge that the SOFA software was used in obtaining those ** results. ** ** 5. You shall not cause the SOFA software to be brought into ** disrepute, either by misuse, or use for inappropriate tasks, or ** by inappropriate modification. ** ** 6. The SOFA software is provided "as is" and SOFA makes no warranty ** as to its use or performance. SOFA does not and cannot warrant ** the performance or results which the user may obtain by using the ** SOFA software. SOFA makes no warranties, express or implied, as ** to non-infringement of third party rights, merchantability, or ** fitness for any particular purpose. In no event will SOFA be ** liable to the user for any consequential, incidental, or special ** damages, including any lost profits or lost savings, even if a ** SOFA representative has been advised of such damages, or for any ** claim by any third party. ** ** 7. The provision of any version of the SOFA software under the terms ** and conditions specified herein does not imply that future ** versions will also be made available under the same terms and ** conditions. ** ** Correspondence concerning SOFA software should be addressed as ** follows: ** ** By email: sofa@ukho.gov.uk ** By post: IAU SOFA Center ** HM Nautical Almanac Office ** UK Hydrographic Office ** Admiralty Way, Taunton ** Somerset, TA1 2DN ** United Kingdom ** **--------------------------------------------------------------------*/ nautic-1.5/nutation.h0000644000175000017500000000313511607071655014546 0ustar moellermoeller/* * iau2000a_nutation.h - Declarations for the IAU 2000A nutation model * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _GE2000A_NUTATION_H_ #define _GE2000A_NUTATION_H_ #include "julian_date.h" /* Used internally to store the series of terms in the theory */ struct ge2000a_term1 { short l; short lp; short f; short d; short om; double ps; double psd; double pcp; double ec; double ecd; double esp; }; /* Used internally to store the series of terms in the theory */ struct ge2000a_term2 { short mer; short ven; short ear; short mar; short jup; short sat; short ura; short nep; short gp; short l; short lp; short f; short d; short om; double ps; double pcp; double ec; double esp; }; double ge2000a_mean_obliquity(struct julian_date *tdb); void ge2000a_nutation(struct julian_date *tdb,double *d_psi, double *d_epsilon); void ge2000a_nutation_matrix(struct julian_date *tdb, double nut_matrix[3][3]); #endifnautic-1.5/gui.h0000644000175000017500000002172511742337776013507 0ustar moellermoeller/////////////////////////////////////////////////////////////////////////// /* gui.h - grafical interface Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ /////////////////////////////////////////////////////////////////////////// #ifndef __gui__ #define __gui__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /////////////////////////////////////////////////////////////////////////// // // MyFrame2( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); /////////////////////////////////////////////////////////////////////////////// /// Class MainDialogBase /////////////////////////////////////////////////////////////////////////////// class MainDialogBase : public wxFrame { private: protected: wxMenuBar* m_menubar2; wxMenu* m_menu5; wxMenu* m_menu6; wxMenu* m_menu7; wxChoice* m_choice3; wxChoice* m_choice4; wxChoice* m_choice5; wxChoice* m_choice6; wxStaticText* m_staticText105; wxStaticText* m_staticText106; wxStaticText* m_staticText107; wxStaticText* m_staticText10; wxStaticText* m_staticText22; wxStaticText* m_staticText109; wxChoice* m_choice1; wxTextCtrl* m_textCtrl11; wxTextCtrl* m_textCtrl12; wxTextCtrl* m_textCtrl1; wxTextCtrl* m_textCtrl245; wxStaticText* m_staticText111; wxChoice* m_choice11; wxTextCtrl* m_textCtrl13; wxTextCtrl* m_textCtrl14; wxTextCtrl* m_textCtrl15; wxStaticText* m_staticText15; wxStaticText* m_staticText17; wxStaticText* m_staticText16; wxStaticText* m_staticText8; wxTextCtrl* m_textCtrl111; wxTextCtrl* m_textCtrl112; wxTextCtrl* m_textCtrl113; wxStaticText* m_staticText21; wxTextCtrl* m_textCtrl1111; wxTextCtrl* m_textCtrl1112; wxTextCtrl* m_textCtrl1113; wxStaticText* m_staticText24; wxStaticText* m_staticText7; wxComboBox* m_comboBox3; wxButton* m_button1; wxButton* m_button43; wxStaticText* m_staticText25; wxComboBox* m_comboBox31; wxButton* m_button11; wxStaticText* m_staticText28; wxTextCtrl* m_textCtrl24; wxTextCtrl* m_textCtrl243; wxTextCtrl* m_textCtrl244; wxTextCtrl* m_textCtrl246; wxTextCtrl* m_textCtrl247; wxStaticText* m_staticText29; wxTextCtrl* m_textCtrl241; wxStaticText* m_staticText1051; wxStaticText* m_staticText1062; wxStaticText* m_staticText1071; wxStaticText* m_staticText9; wxStaticText* m_staticText151; wxStaticText* m_staticText171; wxStaticText* m_staticText161; wxStaticText* m_staticText30; wxTextCtrl* m_textCtrl242; wxStaticText* m_staticText301; wxTextCtrl* m_textCtrl2421; wxStaticText* m_staticText211; wxTextCtrl* m_textCtrl24211; wxButton* m_button4; wxButton* m_button7; wxButton* m_button8; wxButton* m_button6; wxButton* m_button9; wxButton* m_button40; wxStaticText* m_staticText51; wxTextCtrl* m_textCtrl11111; wxButton* m_button41; wxButton* m_button411; wxStaticText* m_staticText1091; wxTextCtrl* m_textCtrl2422; wxStaticText* m_staticText1111; wxTextCtrl* m_textCtrl24221; wxCheckBox* m_checkBox1; // Virtual event handlers, overide them in your derived class virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); } virtual void OnPaint( wxPaintEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnKeyDown( wxKeyEvent& event ) { event.Skip(); } virtual void OnText_Deg_Lat( wxCommandEvent& event ) { event.Skip(); } virtual void OnText_min_Lat( wxCommandEvent& event ) { event.Skip(); } virtual void OnText_Sec_Lat( wxCommandEvent& event ) { event.Skip(); } virtual void OnChar( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharDeg( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharSec( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharLon( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharDegLon( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharSecLon( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharEHt( wxKeyEvent& event ) { event.Skip(); } virtual void OnTextDegLon( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextMinLon( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextSecLon( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextMax( wxCommandEvent& event ) { event.Skip(); } virtual void OnStartTimer( wxCommandEvent& event ) { event.Skip(); } virtual void OnStopTimer( wxCommandEvent& event ) { event.Skip(); } virtual void OnHrsUTC( wxKeyEvent& event ) { event.Skip(); } virtual void OnMinUTC( wxKeyEvent& event ) { event.Skip(); } virtual void OnSecUTC( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharLocalHr( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharLocalMin( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharLocalSec( wxKeyEvent& event ) { event.Skip(); } virtual void OnTextUTChrs( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextUTCmin( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextUTCsecs( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextLTHrs( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextLTmins( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextLTsecs( wxCommandEvent& event ) { event.Skip(); } virtual void OnLocal( wxCommandEvent& event ) { event.Skip(); } virtual void OnUTC( wxCommandEvent& event ) { event.Skip(); } //virtual void OnStarChoice( wxCommandEvent& event ) { event.Skip(); } virtual void OnCalcHeitht( wxCommandEvent& event ) { event.Skip(); } //virtual void OnPlanetChoice( wxCommandEvent& event ) { event.Skip(); } //virtual void OnCalcSolarHt( wxCommandEvent& event ) { event.Skip(); } virtual void OnTextEnter( wxFocusEvent& event ) { event.Skip(); } virtual void OnCharDiff( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharAlt( wxKeyEvent& event ) { event.Skip(); } virtual void OnTextAlt( wxCommandEvent& event ) { event.Skip(); } virtual void OnFocusOut( wxFocusEvent& event ) { event.Skip(); } virtual void OnAltMin( wxFocusEvent& event ) { event.Skip(); } virtual void OnAltSec( wxFocusEvent& event ) { event.Skip(); } virtual void OnEyeHt( wxFocusEvent& event ) { event.Skip(); } virtual void OnInfo( wxCommandEvent& event ) { event.Skip(); } virtual void OnCharAltMin( wxKeyEvent& event ) { event.Skip(); } virtual void OnCharAltSec( wxKeyEvent& event ) { event.Skip(); } virtual void OnCheckbox( wxCommandEvent& event ) { event.Skip(); } virtual void OnAzOut( wxFocusEvent& event ) { event.Skip(); } virtual void OnSave( wxCommandEvent& event ) { event.Skip(); } virtual void OnCalcPos( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancLines( wxCommandEvent& event ) { event.Skip(); } virtual void OnMeridian( wxCommandEvent& event ) { event.Skip(); } virtual void OnPlot( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } //////////menu virtual void OnMenuSave( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuCancel( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuAlt( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuMeridian( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuPlot( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuInfo( wxCommandEvent& event ) { event.Skip(); } virtual void OnMenuAbout( wxCommandEvent& event ) { event.Skip(); } virtual void OnTimer( wxTimerEvent& event ){ event.Skip(); } public: MainDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Nautic Almanac"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(650,600),long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );// long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); ~MainDialogBase(); wxTimer * m_timer; }; #endif //__gui__ nautic-1.5/julian_date.h0000644000175000017500000000326611556005075015165 0ustar moellermoeller/* * julian_date.h - Constants & declarations for julian date conversions * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _JULIAN_DATE_H_ #define _JULIAN_DATE_H_ /* * This structure is used wherever a Julian Day Number (JDN) is expected or * returned. Two doubles are used to preserve precision. * * A given JDN may be partitioned between date1 & date2 in any convenient * manner. The JDN that corresponds to this structure is date1 + date2. */ struct julian_date { double date1; double date2; }; #define J2000_EPOCH 2451545.0 #define MJD_EPOCH 2400000.5 #define JULIAN_CENTURY_LENGTH 36525.0 #define JULIAN_MILLENNIUM_LENGTH 365250.0 #define JULIAN_CENTURIES(d1, d2) \ (((d1 - J2000_EPOCH) + d2) / JULIAN_CENTURY_LENGTH) #define JULIAN_MILLENNIA(d1, d2) \ (((d1 - J2000_EPOCH) + d2) / JULIAN_MILLENNIUM_LENGTH) int calendar_to_julian_date(int year, int month, int day,struct julian_date *jd); int julian_to_calendar_date(struct julian_date *jd, int *year, int *month, int *day, double *day_fraction); #endifnautic-1.5/moon.h0000644000175000017500000003501311747701057013656 0ustar moellermoeller/* moon.h bitmaps of moon and cursors Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef __MOON_H #define __MOON_H static char full_moon_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf8,0xff,0xff,0x03, 0xe0,0xff,0xff,0x01,0xc0,0xff,0xff,0x00,0x80,0xff,0x7f,0x00,0x01,0xff,0x7f, 0x08,0x20,0xff,0x3f,0x00,0x10,0xfe,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe, 0x3f,0x01,0x00,0xfe,0x3f,0x00,0x08,0xfe,0x3f,0x00,0x04,0xfe,0x3f,0x00,0x00, 0xfe,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0xff,0xff,0x00,0x80,0xff,0xff,0x21, 0xc0,0xff,0xff,0x03,0xe0,0xff,0xff,0x0f,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char full_moon_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf8,0xff,0xff,0x03,0xe0,0xff,0xff,0x01, 0xc0,0xff,0xff,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x3f,0x00,0x00,0xfe,0x3f, 0x00,0x00,0xfe,0x1f,0x00,0x00,0xfc,0x1f,0x00,0x00,0xfc,0x1f,0x00,0x00,0xfc, 0x1f,0x00,0x00,0xfc,0x1f,0x00,0x00,0xfc,0x1f,0x00,0x00,0xfc,0x1f,0x00,0x00, 0xfc,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe,0x7f,0x00,0x00,0xff,0xff,0x00, 0x80,0xff,0xff,0x01,0xc0,0xff,0xff,0x03,0xe0,0xff,0xff,0x0f,0xf8,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_1_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static char moon_1_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xe1,0xff,0xff,0xff, 0xc3,0xff,0xff,0xff,0x87,0xff,0xff,0xff,0x07,0xff,0xff,0xff,0x0f,0xfe,0xff, 0xff,0x0f,0xfe,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc, 0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f, 0xfc,0xff,0xff,0x0f,0xfe,0xff,0xff,0x0f,0xfe,0xff,0xff,0x07,0xff,0xff,0xff, 0x87,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xe3,0xff,0xff,0xff,0xf9,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_half_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff, 0xe0,0xff,0xff,0xff,0xc0,0xff,0xff,0xff,0x80,0xff,0xff,0xff,0x01,0xff,0xff, 0xff,0x31,0xff,0xff,0xff,0x10,0xfe,0xff,0xff,0x00,0xfe,0xff,0xff,0x00,0xfe, 0xff,0xff,0x00,0xfe,0xff,0xff,0x48,0xfe,0xff,0xff,0x0c,0xfe,0xff,0xff,0x00, 0xfe,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x82,0xff,0xff,0xff, 0xc0,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_half_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf8,0xff,0xff,0x7f,0xe0,0xff,0xff,0x7f, 0xc0,0xff,0xff,0x7f,0x80,0xff,0xff,0x7f,0x00,0xff,0xff,0x7f,0x00,0xfe,0xff, 0x7f,0x00,0xfe,0xff,0x7f,0x00,0xfc,0xff,0x7f,0x00,0xfc,0xff,0x7f,0x00,0xfc, 0xff,0x7f,0x00,0xfc,0xff,0x7f,0x00,0xfc,0xff,0x7f,0x00,0xfc,0xff,0x7f,0x00, 0xfc,0xff,0x7f,0x00,0xfe,0xff,0x7f,0x00,0xfe,0xff,0x7f,0x00,0xff,0xff,0x7f, 0x80,0xff,0xff,0x7f,0xc0,0xff,0xff,0x7f,0xe0,0xff,0xff,0x7f,0xf8,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_ebb_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xf8,0xff,0xff,0x1f, 0xe0,0xff,0xff,0x0f,0xc0,0xff,0xff,0x07,0x80,0xff,0xff,0x07,0x01,0xff,0xff, 0x03,0x31,0xff,0xff,0x03,0x10,0xfe,0xff,0x01,0x00,0xfe,0xff,0x01,0x00,0xfe, 0xff,0x01,0x00,0xfe,0xff,0x01,0x48,0xfe,0xff,0x01,0x0c,0xfe,0xff,0x03,0x00, 0xfe,0xff,0x03,0x00,0xff,0xff,0x07,0x00,0xff,0xff,0x27,0x82,0xff,0xff,0x0f, 0xc0,0xff,0xff,0x1f,0xe0,0xff,0xff,0x3f,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_ebb_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xf8,0xff,0xff,0x1f,0xe0,0xff,0xff,0x0f, 0xc0,0xff,0xff,0x07,0x80,0xff,0xff,0x03,0x00,0xff,0xff,0x03,0x00,0xfe,0xff, 0x01,0x00,0xfe,0xff,0x01,0x00,0xfc,0xff,0x00,0x00,0xfc,0xff,0x00,0x00,0xfc, 0xff,0x00,0x00,0xfc,0xff,0x00,0x00,0xfc,0xff,0x00,0x00,0xfc,0xff,0x01,0x00, 0xfc,0xff,0x01,0x00,0xfe,0xff,0x03,0x00,0xfe,0xff,0x03,0x00,0xff,0xff,0x07, 0x80,0xff,0xff,0x0f,0xc0,0xff,0xff,0x1f,0xe0,0xff,0xff,0x3f,0xf8,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_ebb_C_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x03, 0xfe,0xff,0xff,0x01,0xfc,0xff,0xff,0x00,0xfc,0xff,0x7f,0x00,0xf9,0xff,0x7f, 0x08,0xf9,0xff,0x3f,0x00,0xf8,0xff,0x3f,0x00,0xf0,0xff,0x3f,0x00,0xf0,0xff, 0x3f,0x01,0xf0,0xff,0x3f,0x00,0xf8,0xff,0x3f,0x00,0xfc,0xff,0x3f,0x00,0xf8, 0xff,0x7f,0x00,0xf8,0xff,0x7f,0x00,0xf8,0xff,0xff,0x20,0xfe,0xff,0xff,0x21, 0xfc,0xff,0xff,0x03,0xfe,0xff,0xff,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_ebb_C_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xfe,0xff,0xff,0x03,0xfe,0xff,0xff,0x01, 0xfc,0xff,0xff,0x00,0xf8,0xff,0x7f,0x00,0xf8,0xff,0x3f,0x00,0xf0,0xff,0x3f, 0x00,0xf0,0xff,0x1f,0x00,0xe0,0xff,0x1f,0x00,0xe0,0xff,0x1f,0x00,0xe0,0xff, 0x1f,0x00,0xe0,0xff,0x1f,0x00,0xe0,0xff,0x1f,0x00,0xe0,0xff,0x1f,0x00,0xf0, 0xff,0x3f,0x00,0xf0,0xff,0x3f,0x00,0xf0,0xff,0x7f,0x00,0xf8,0xff,0xff,0x00, 0xf8,0xff,0xff,0x01,0xfc,0xff,0xff,0x03,0xfe,0xff,0xff,0x0f,0xfe,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_half_C_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,0xff,0xff,0x83, 0xff,0xff,0xff,0x81,0xff,0xff,0xff,0x80,0xff,0xff,0x7f,0x80,0xff,0xff,0x7f, 0x88,0xff,0xff,0x3f,0x80,0xff,0xff,0x3f,0x80,0xff,0xff,0x3f,0x80,0xff,0xff, 0x3f,0x81,0xff,0xff,0x3f,0x80,0xff,0xff,0x3f,0x80,0xff,0xff,0x3f,0x80,0xff, 0xff,0x7f,0x80,0xff,0xff,0x7f,0x80,0xff,0xff,0xff,0xa0,0xff,0xff,0xff,0xa1, 0xff,0xff,0xff,0x83,0xff,0xff,0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_half_C_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0x01, 0xff,0xff,0xff,0x00,0xff,0xff,0x7f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x3f, 0x00,0xff,0xff,0x1f,0x00,0xff,0xff,0x1f,0x00,0xff,0xff,0x1f,0x00,0xff,0xff, 0x1f,0x00,0xff,0xff,0x1f,0x00,0xff,0xff,0x1f,0x00,0xff,0xff,0x1f,0x00,0xff, 0xff,0x3f,0x00,0xff,0xff,0x3f,0x00,0xff,0xff,0x7f,0x00,0xff,0xff,0xff,0x00, 0xff,0xff,0xff,0x01,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0x0f,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_last_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xf3, 0xff,0xff,0xff,0xf9,0xff,0xff,0xff,0xf8,0xff,0xff,0x7f,0xfc,0xff,0xff,0x7f, 0xfc,0xff,0xff,0x3f,0xfe,0xff,0xff,0x3f,0xfe,0xff,0xff,0x3f,0xfe,0xff,0xff, 0x3f,0xfe,0xff,0xff,0x3f,0xfe,0xff,0xff,0x3f,0xfe,0xff,0xff,0x3f,0xfe,0xff, 0xff,0x7f,0xfc,0xff,0xff,0x7f,0xfc,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xf9, 0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_last_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xe1, 0xff,0xff,0xff,0xf0,0xff,0xff,0x7f,0xf0,0xff,0xff,0x3f,0xf8,0xff,0xff,0x3f, 0xf8,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0xff, 0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff,0xff,0x1f,0xfc,0xff, 0xff,0x3f,0xf8,0xff,0xff,0x3f,0xf8,0xff,0xff,0x7f,0xf0,0xff,0xff,0xff,0xf0, 0xff,0xff,0xff,0xe1,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0x8f,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_new_bits[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf8,0xff,0xff,0xf3,0xe7,0xff,0xff,0xfd, 0xdf,0xff,0xff,0xfe,0xbf,0xff,0x7f,0xff,0x7f,0xff,0xbf,0xff,0xff,0xfe,0xbf, 0xff,0xff,0xfe,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd, 0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff, 0xfd,0xbf,0xff,0xff,0xfe,0xbf,0xff,0xff,0xfe,0x7f,0xff,0x7f,0xff,0xff,0xfe, 0xbf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xf3,0xe7,0xff,0xff,0x0f,0xf8,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char moon_new_mask[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf8,0xff,0xff,0xf3,0xe7,0xff,0xff,0xfd, 0xdf,0xff,0xff,0xfe,0xbf,0xff,0x7f,0xff,0x7f,0xff,0xbf,0xff,0xff,0xfe,0xbf, 0xff,0xff,0xfe,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd, 0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xfd,0xdf,0xff,0xff, 0xfd,0xbf,0xff,0xff,0xfe,0xbf,0xff,0xff,0xfe,0x7f,0xff,0x7f,0xff,0xff,0xfe, 0xbf,0xff,0xff,0xfd,0xdf,0xff,0xff,0xf3,0xe7,0xff,0xff,0x0f,0xf8,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; static char close_hand_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0xe0, 0x24,0x00,0x00,0x90,0x64,0x00,0x00,0x10,0xa0,0x00,0x00,0x20,0x80,0x00,0x00, 0x30,0x80,0x00,0x00,0x08,0x80,0x00,0x00,0x08,0x40,0x00,0x00,0x10,0x40,0x00, 0x00,0x20,0x20,0x00,0x00,0x40,0x20,0x00,0x00,0x40,0x20,0x00,0x00,0xc0,0x3f, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; static char close_hand_mask[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0xe0, 0x3f,0x00,0x00,0xf0,0x7f,0x00,0x00,0xf0,0xff,0x00,0x00,0xe0,0xff,0x00,0x00, 0xf0,0xff,0x00,0x00,0xf8,0xff,0x00,0x00,0xf8,0x7f,0x00,0x00,0xf0,0x7f,0x00, 0x00,0xe0,0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0xc0,0x3f,0x00,0x00,0xc0,0x3f, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; static char open_hand_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x96,0x03,0x00,0x00,0x99, 0x04,0x00,0x00,0x99,0x14,0x00,0x00,0x92,0x2c,0x00,0x00,0x92,0x24,0x00,0x80, 0x05,0x24,0x00,0x40,0x06,0x20,0x00,0x40,0x04,0x10,0x00,0x80,0x00,0x10,0x00, 0x00,0x01,0x10,0x00,0x00,0x01,0x08,0x00,0x00,0x02,0x08,0x00,0x00,0x04,0x04, 0x00,0x00,0x08,0x04,0x00,0x00,0x08,0x04,0x00,0x00,0xf8,0x07,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; static char open_hand_mask[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xf6,0x03,0x00,0x00,0xff, 0x07,0x00,0x00,0xff,0x17,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x80, 0xfd,0x3f,0x00,0xc0,0xff,0x3f,0x00,0xc0,0xff,0x1f,0x00,0x80,0xff,0x1f,0x00, 0x00,0xff,0x1f,0x00,0x00,0xff,0x0f,0x00,0x00,0xfe,0x0f,0x00,0x00,0xfc,0x07, 0x00,0x00,0xf8,0x07,0x00,0x00,0xf8,0x07,0x00,0x00,0xf8,0x07,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; #endif nautic-1.5/info/0000755000175000017500000000000011750006215013452 5ustar moellermoellernautic-1.5/info/Makefile.am0000644000175000017500000000006211556005075015513 0ustar moellermoellerdatadir = $(datadir)/@PACKAGE@ doc_DATA = README nautic-1.5/info/README0000644000175000017500000000003211556005075014334 0ustar moellermoellerHow to use Nautic Almanac nautic-1.5/config.h.in0000644000175000017500000000373511750005457014561 0ustar moellermoeller/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_WX_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `unsigned int' if does not define. */ #undef size_t nautic-1.5/src/0000755000175000017500000000000011750006215013306 5ustar moellermoellernautic-1.5/src/Info_Dlg.cpp0000644000175000017500000002443111551376326015513 0ustar moellermoeller/* Info_Dlg.cpp implementation of Info Dialog Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "Info_Dlg.h" /////////////////////////////////////////////////////////////////////////// Info_Dlg::Info_Dlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWFRAME ) ); //wxBoxSizer* bSizer2; //bSizer2 = new wxBoxSizer( wxVERTICAL ); wxGridSizer* gSizer2; gSizer2 = new wxGridSizer( 18, 2, 0, 0 ); m_staticText26 = new wxStaticText( this, wxID_ANY, wxT("Body's name :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText26->Wrap( -1 ); gSizer2->Add( m_staticText26, 0,wxALL, 15 ); m_staticText26->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText1 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1->Wrap( -1 ); gSizer2->Add( m_staticText1, 0,wxALL, 15 ); m_staticText1->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); //gSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); //gSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticText27 = new wxStaticText( this, wxID_ANY, wxT("Date :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText27->Wrap( -1 ); gSizer2->Add( m_staticText27, 0,wxALL, 15 ); m_staticText27->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText2 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2->Wrap( -1 ); gSizer2->Add( m_staticText2, 0,wxALL, 15 ); m_staticText2->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText271 = new wxStaticText(this, wxID_ANY, wxT("Time UT :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText271->Wrap( -1 ); gSizer2->Add( m_staticText271, 0, wxALL, 15 ); m_staticText271->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText3 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText3->Wrap( -1 ); gSizer2->Add( m_staticText3, 0,wxALL, 15 ); m_staticText3->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText272 = new wxStaticText( this, wxID_ANY, wxT("Local Time :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText272->Wrap( -1 ); gSizer2->Add( m_staticText272, 0, wxALL, 15 ); m_staticText272->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText4 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText4->Wrap( -1 ); gSizer2->Add( m_staticText4, 0,wxALL, 15 ); m_staticText4->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText273 = new wxStaticText( this, wxID_ANY, wxT("Julian Date :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText273->Wrap( -1 ); gSizer2->Add( m_staticText273, 0, wxALL, 15 ); m_staticText273->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText5 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText5->Wrap( -1 ); gSizer2->Add( m_staticText5, 0,wxALL, 15 ); m_staticText5->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText263 = new wxStaticText( this, wxID_ANY, wxT("GHA aries :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText263->Wrap( -1 ); gSizer2->Add( m_staticText263, 0, wxALL, 15 ); m_staticText263->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText6 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6->Wrap( -1 ); gSizer2->Add( m_staticText6, 0,wxALL, 15 ); m_staticText6->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText274 = new wxStaticText( this, wxID_ANY, wxT("SHA :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText274->Wrap( -1 ); gSizer2->Add( m_staticText274, 0, wxALL, 15 ); m_staticText274->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText7 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7->Wrap( -1 ); gSizer2->Add( m_staticText7, 0,wxALL, 15 ); m_staticText7->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText275 = new wxStaticText( this, wxID_ANY, wxT("Declination :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText275->Wrap( -1 ); gSizer2->Add( m_staticText275, 0, wxALL, 15 ); m_staticText275->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText8 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText8->Wrap( -1 ); gSizer2->Add( m_staticText8, 0,wxALL, 15 ); m_staticText8->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText276 = new wxStaticText( this, wxID_ANY, wxT("Ecliptic Longitude :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText276->Wrap( -1 ); gSizer2->Add( m_staticText276, 0, wxALL, 15 ); m_staticText276->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText9 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText9->Wrap( -1 ); gSizer2->Add( m_staticText9, 0,wxALL, 15 ); m_staticText9->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText277 = new wxStaticText( this, wxID_ANY, wxT("Ecliptic Latitude :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText277->Wrap( -1 ); gSizer2->Add( m_staticText277, 0, wxALL, 15 ); m_staticText277->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText10 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText10->Wrap( -1 ); gSizer2->Add( m_staticText10, 0,wxALL, 15 ); m_staticText10->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText278 = new wxStaticText( this, wxID_ANY, wxT("GHA :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText278->Wrap( -1 ); gSizer2->Add( m_staticText278, 0, wxALL, 15 ); m_staticText278->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText11 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText11->Wrap( -1 ); gSizer2->Add( m_staticText11, 0,wxALL, 15 ); m_staticText11->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText279 = new wxStaticText( this, wxID_ANY, wxT("LHA :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText279->Wrap( -1 ); gSizer2->Add( m_staticText279, 0, wxALL, 15 ); m_staticText279->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText12 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText12->Wrap( -1 ); gSizer2->Add( m_staticText12, 0,wxALL, 15 ); m_staticText12->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText280 = new wxStaticText( this, wxID_ANY, wxT("Semidiameter :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText280->Wrap( -1 ); gSizer2->Add( m_staticText280, 0, wxALL, 15 ); m_staticText280->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText13 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText13->Wrap( -1 ); gSizer2->Add( m_staticText13, 0,wxALL, 15 ); m_staticText13->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText281 = new wxStaticText( this, wxID_ANY, wxT("Horizontal Parallax :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText281->Wrap( -1 ); gSizer2->Add( m_staticText281, 0, wxALL, 15 ); m_staticText281->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText14 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText14->Wrap( -1 ); gSizer2->Add( m_staticText14, 0,wxALL, 15 ); m_staticText14->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText282 = new wxStaticText( this, wxID_ANY, wxT("Altitude :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText282->Wrap( -1 ); gSizer2->Add( m_staticText282, 0, wxALL, 15 ); m_staticText282->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText15 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText15->Wrap( -1 ); gSizer2->Add( m_staticText15, 0,wxALL, 15 ); m_staticText15->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText283 = new wxStaticText( this, wxID_ANY, wxT("Azimuth :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText283->Wrap( -1 ); gSizer2->Add( m_staticText283, 0, wxALL, 15 ); m_staticText283->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText16 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText16->Wrap( -1 ); gSizer2->Add( m_staticText16, 0,wxALL, 15 ); m_staticText16->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText284 = new wxStaticText( this, wxID_ANY, wxT("Constellation :"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText284->Wrap( -1 ); gSizer2->Add( m_staticText284, 0, wxALL, 15 ); m_staticText284->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); m_staticText17 = new wxStaticText( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText17->Wrap( -1 ); gSizer2->Add( m_staticText17, 0,wxALL, 15 ); m_staticText17->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Sans") ) ); this->SetSizer( gSizer2 ); this->Layout(); this->Centre( wxBOTH ); // Connect Events this->Connect( wxEVT_PAINT, wxPaintEventHandler( Info_Dlg::OnPaintDlgInfo ) ); } Info_Dlg::~Info_Dlg() { // Disconnect Events this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( Info_Dlg::OnPaintDlgInfo ) ); } nautic-1.5/src/orbital_elements.cpp0000644000175000017500000001466511505660514017364 0ustar moellermoeller/* * orbital_elements.c - Routines to generate ephemeris from orbital elements * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * Reference 1: "An improved algorithm due to Laguerre for the solution of * Kepler's equation" - Bruce Conway * * * Reference 2: "An efficient method for solving Barker's equation" - R. Meire * */ #include #include "orbital_elements.h" u_short kepler_equation_max_iters = KEPLER_MAX_ITER; double kepler_equation_precision = KEPLER_PRECISION; #ifdef _DEBUG u_short kepler_equation_iters = 0; #endif /* * Calculates the heliocentric rectangular coordinates of a celestial body * given its osculating orbital elements. * * tt -- TT to be used for calculations. * elt -- The body's osculating orbital elements. * eph -- The body's heliocentric rectangular coordinates in AU. The reference * frame is the equinox & ecliptic of J2000. * * Return: SUCCESS -- If the coordinates were calculated successfully. * ERR_INVALID_ECCENTRICITY -- If the body's eccentricity is negative. * ERR_CONVERGENCE -- If Kepler's equation didn't converge to the * required precision within the specified number of iterations. */ int elements_to_ephemeris(struct julian_date *tt, struct orbital_elements *elt, struct rectangular_coordinates *eph) { int retval; double t,ma,ea,ha,w,y,x,r,ta,a,b,c,d; t = (tt->date1 - elt->epoch.date1) + (tt->date2 - elt->epoch.date2); if (elt->eccentricity < 0) { return ERR_INVALID_ECCENTRICITY; } else if (elt->eccentricity == 0) { /* Simple case of a circular orbit */ r = elt->perihelion; ta = elt->mean_anomaly + elt->daily_motion * t; } else if (elt->eccentricity < PARABOLIC_ORBIT) { /* Solve for elliptic orbits */ ma = reduce_angle(elt->mean_anomaly+elt->daily_motion*t, TWO_PI); retval = eccentric_anomaly(ma, elt->eccentricity, &ea); if (retval != SUCCESS) return retval; sincos(ea / 2, &x, &y); r = elt->perihelion * (1.0 - elt->eccentricity * (y*y - x*x)) / (1.0 - elt->eccentricity); ta = atan2(sqrt((1.0 + elt->eccentricity) / (1.0 - elt->eccentricity)) * x, y) * 2; } else if (elt->eccentricity == PARABOLIC_ORBIT) { /* Solve Barker's equation for parabolic orbits (Reference 2) */ w = (t * GAUSS_GRAV_CONSTANT * 1.5) / SQROOT_TWO; y = cbrt(w + sqrt(w * w + 1)); x = y - 1 / y; r = elt->perihelion * (x * x + 1); ta = atan(x) * 2; } else { /* Solve Kepler's equation for hyperbolic orbits */ ma = reduce_angle(elt->mean_anomaly + elt->daily_motion * t, TWO_PI); retval = hyperbolic_anomaly(ma, elt->eccentricity, &ha); if (retval != SUCCESS) return retval; r = elt->perihelion * (1 - elt->eccentricity * cosh(ha)); ta = atan2(sqrt(elt->eccentricity * elt->eccentricity - 1) * sinh(ha), elt->eccentricity - cosh(ha)); } sincos(ta + elt->arg_perihelion, &a, &b); sincos(elt->lon_asc_node, &c, &d); sincos(elt->inclination, &x, &y); eph->x = r * (d * b - c * a * y); eph->y = r * (c * b + d * a * y); eph->z = r * a * x; return SUCCESS; } /* * Solves Kepler's equation for elliptic orbits and returns the resulting * value of the eccentric anomaly. * * mean_ano -- The celestial body's mean anomaly in radians. * ecc -- The eccentricity of the orbit. * ecc_ano -- On success, the body's eccentric anomaly in radians. * * Return: SUCCESS -- If Kepler's equation was solved successfully. * ERR_CONVERGENCE -- If Kepler's equation didn't converge to the * required precision within the specified number of iterations. */ int eccentric_anomaly(double mean_ano, double ecc, double *ecc_ano) { u_short i; const u_short N = 6; double ea,dea,c_ea,s_ea,x,y; /* * Solve Kepler's equation for elliptic orbits using the * Laguerre method (Reference 1). */ ea = mean_ano + ecc * sin(mean_ano); for (i = 0; i < kepler_equation_max_iters; i++) { sincos(ea, &s_ea, &c_ea); dea = N * (mean_ano - ea + ecc * s_ea); x = 1 - ecc * c_ea; y = sqrt(fabs((N - 1) * ((N - 1) * x * x + ecc * s_ea * dea))); if (fabs(x + y) > fabs(x - y)) dea = dea / (x + y); else dea = dea / (x - y); ea += dea; if (fabs(dea) < kepler_equation_precision) break; } #ifdef _DEBUG kepler_equation_iters = (i < kepler_equation_max_iters) ? i + 1 : kepler_equation_max_iters; #endif *ecc_ano = ea; return i < kepler_equation_max_iters ? SUCCESS : ERR_CONVERGENCE; } /* * Solves Kepler's equation for hyperbolic orbits and returns the resulting * value of the hyperbolic anomaly. * * mean_ano -- The celestial body's mean anomaly in radians. * ecc -- The eccentricity of the orbit. * hyp_ano -- On success, the body's hyperbolic anomaly in radians. * * Return: SUCCESS -- If Kepler's equation was solved successfully. * ERR_CONVERGENCE -- If Kepler's equation didn't converge to the * required precision within the specified number of iterations. */ int hyperbolic_anomaly(double mean_ano, double ecc, double *hyp_ano) { u_short i; double ha,dha,x,y; const u_short N = 6; /* * Solve Kepler's equation for hyperbolic orbits using the * Laguerre method (Reference 1). */ ha = mean_ano; for (i = 0; i < kepler_equation_max_iters; i++) { dha = N * (mean_ano + ha - ecc * sinh(ha)); x = ecc * cosh(ha) - 1; y = sqrt(fabs((N - 1) * ((N - 1) * x * x + dha * ecc * sinh(ha)))); if (fabs(x + y) > fabs(x - y)) dha = dha / (x + y); else dha = dha / (x - y); ha += dha; if (fabs(dha) < kepler_equation_precision) break; } #ifdef _DEBUG kepler_equation_iters = (i < kepler_equation_max_iters) ? i + 1 : kepler_equation_max_iters; #endif *hyp_ano = ha; return i < kepler_equation_max_iters ? SUCCESS : ERR_CONVERGENCE; }nautic-1.5/src/Sun.cpp0000644000175000017500000003470611551377316014605 0ustar moellermoeller/* Sun.cpp sun implementation file Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "sun.h" #include // This is a magic incantation which must be done! #define RADEG (180.0/PI) #define DEGRAD (PI/180.0) #define sind(x) sin((x)*DEGRAD) #define cosd(x) cos((x)*DEGRAD) #define tand(x) tan((x)*DEGRAD) #define asind(x) (RADEG*asin(x)) #define acosd(x) (RADEG*acos(x)) #define atand(x) (RADEG*atan(x)) #define atan2d(y,x) (RADEG*atan2((y),(x))) const char *constell[89] = { " Andromedae", " Antliae", " Apodis", " Aquilae", " Aquarii", " Arietis", " Arae", " Aurigae", " Bootis", " Caeli", " Camelopardalis", " Cancri", /* also abbreviated Cnc */ " Capricorni", " Carinae", " Cassiopeiae", " Centauri", " Cephei", " Ceti", " Chamaeleontis", " Circini", " Canis Majoris", " Canis Minoris", " Cancri", " Columbae", " Comae Berenices", " Coronae Austrinae", " Coronae Borealis", " Crateris", " Crucis", " Corvi", " Canum Venaticorum", " Cygni", " Delphini", " Doradus", " Draconis", " Equulei", " Eridani", " Fornacis", " Geminorum", " Gruis", " Herculis", " Horologii", " Hydrae", " Hydri", " Indi", " Lacertae", " Leonis", " Leporis", " Librae", " Leonis Minoris", " Lupi", " Lyncis", " Lyrae", " Mensae", " Microscopii", " Monocerotis", " Muscae", " Normae", " Octantis", " Ophiuchi", " Orionis", " Pavonis", " Pegasi", " Persei", " Phoenicis", " Pictoris", " Piscis Austrini", " Piscium", " Puppis", " Pyxidis", " Reticuli", " Sculptoris", " Scorpii", " Scuti", " Serpentis", " Sextantis", " Sagittae", " Sagittarii", " Tauri", " Telescopii", " Trianguli Australis", " Trianguli", " Tucanae", " Ursae Majoris", " Ursae Minoris", " Velorum", " Virginis", " Volantis", " Vulpeculae", }; #define BNDRIES 357 long bndrie[4*BNDRIES] = { 0, 86400, 316800, 84, 28800, 52200, 311400, 84, 75600, 82800, 310200, 84, 64800, 75600, 309600, 84, 0, 28800, 306000, 16, 33000, 38400, 295200, 10, 0, 18000, 288000, 16, 38400, 52200, 288000, 10, 63000, 64800, 288000, 84, 72600, 75600, 288000, 34, 0, 12630, 277200, 16, 41400, 48900, 277200, 10, 59520, 63000, 270000, 84, 72600, 74400, 270000, 16, 28680, 33000, 264600, 10, 33000, 40800, 264600, 34, 46800, 59520, 252000, 84, 11160, 12300, 244800, 14, 73500, 74400, 241200, 34, 40800, 43200, 239400, 34, 0, 1200, 237600, 16, 50400, 56400, 237600, 84, 84900, 86400, 237600, 16, 43200, 48600, 230400, 34, 48600, 51900, 226800, 34, 83400, 84900, 226800, 16, 21960, 25200, 223200, 10, 72000, 73500, 221400, 34, 73932, 74160, 219300, 16, 25200, 28680, 216000, 10, 28680, 30300, 216000, 83, 71160, 72000, 214200, 34, 72000, 73932, 214200, 16, 82320, 83400, 212700, 16, 0, 8760, 210600, 14, 69900, 71160, 208800, 34, 6120, 6870, 207000, 14, 8760, 11160, 205200, 14, 11160, 11400, 205200, 10, 80340, 82320, 202500, 16, 18000, 21960, 201600, 10, 50520, 51900, 199800, 83, 51900, 69900, 199800, 34, 11400, 12000, 198000, 10, 79680, 80340, 198000, 16, 74160, 79080, 197400, 16, 0, 6120, 194400, 14, 21960, 23400, 194400, 51, 43500, 48600, 190800, 83, 54900, 56700, 190800, 34, 79080, 79680, 189900, 16, 12000, 18000, 189000, 10, 82320, 84000, 189000, 14, 56700, 61200, 185400, 34, 7350, 9060, 181800, 63, 61200, 65640, 181800, 34, 0, 4920, 180000, 14, 4920, 6000, 180000, 63, 23400, 24480, 180000, 51, 84000, 86400, 180000, 14, 48600, 50520, 174600, 83, 0, 4020, 172800, 14, 84900, 86400, 172800, 14, 65430, 65640, 171000, 40, 65640, 68700, 171000, 34, 68700, 69000, 171000, 31, 6000, 7350, 169200, 63, 30300, 33000, 169200, 83, 600, 3120, 165600, 14, 43200, 43500, 162000, 83, 24480, 26520, 160200, 51, 78870, 79080, 158400, 31, 78750, 78870, 157500, 31, 69000, 69840, 156600, 31, 33000, 36600, 151200, 83, 36600, 38820, 144000, 83, 55560, 56700, 144000, 8, 56700, 58800, 144000, 40, 33300, 34500, 143100, 51, 0, 9060, 132300, 0, 9060, 9240, 132300, 63, 69690, 69840, 131400, 52, 16200, 16890, 129600, 63, 78240, 78750, 129600, 31, 78750, 79200, 129600, 45, 23520, 26520, 127800, 7, 26520, 27900, 127800, 51, 0, 7200, 126000, 0, 79200, 82140, 126000, 45, 82140, 82320, 124200, 45, 82320, 84600, 124200, 0, 9240, 9780, 122400, 63, 38820, 39600, 122400, 83, 43200, 44400, 122400, 30, 27900, 33300, 120600, 51, 33300, 35580, 120600, 49, 2580, 5070, 118800, 0, 54660, 55560, 118800, 8, 84600, 85500, 115500, 0, 44400, 47700, 115200, 30, 85500, 86400, 112800, 0, 50250, 50520, 110700, 30, 8700, 9780, 110400, 81, 9780, 16200, 110400, 63, 16200, 17100, 108000, 7, 65430, 69690, 108000, 52, 39600, 43200, 104400, 83, 70800, 75300, 104400, 31, 17100, 21180, 102600, 7, 35580, 37800, 102600, 49, 47700, 50250, 102600, 30, 0, 240, 100800, 0, 5070, 6000, 100800, 81, 21180, 23520, 100800, 7, 28380, 28800, 100800, 38, 75300, 78240, 100800, 31, 69330, 70800, 99000, 31, 6900, 8700, 98100, 81, 58200, 58800, 97200, 26, 54300, 54660, 93600, 8, 54660, 58200, 93600, 26, 66120, 67920, 93600, 52, 38700, 39600, 91800, 49, 67920, 69330, 91800, 52, 6000, 6900, 90000, 81, 2580, 3060, 85500, 67, 37800, 38700, 84600, 49, 76500, 77100, 84600, 88, 20520, 21180, 82200, 78, 240, 510, 79200, 0, 57300, 57720, 79200, 74, 21180, 22380, 77400, 38, 71400, 72900, 76500, 88, 67920, 69300, 75900, 88, 510, 3060, 75600, 0, 72900, 74040, 73800, 88, 28110, 28380, 72000, 38, 74040, 76500, 70200, 88, 69300, 71400, 69000, 88, 11820, 12120, 68400, 5, 67920, 68400, 66600, 76, 20520, 20760, 64800, 60, 22380, 22710, 63000, 38, 68400, 71400, 58200, 76, 17880, 19200, 57600, 78, 57300, 57900, 57600, 40, 71400, 72900, 56700, 76, 16620, 17880, 55800, 78, 19200, 20160, 55800, 78, 46200, 48600, 54000, 24, 62100, 65700, 51600, 40, 42720, 46200, 50400, 24, 27000, 28110, 48600, 38, 60300, 62100, 46200, 40, 0, 510, 45000, 62, 20160, 20760, 45000, 78, 25200, 27000, 45000, 38, 76020, 76800, 45000, 62, 22710, 24960, 43200, 38, 65700, 67920, 43200, 40, 75150, 75780, 42600, 32, 75780, 76020, 42600, 62, 41460, 42720, 39600, 46, 22470, 22710, 36000, 60, 24960, 25200, 36000, 38, 28110, 28530, 36000, 22, 85800, 86400, 36000, 62, 6000, 11820, 35700, 5, 72510, 73080, 30600, 32, 48600, 54300, 28800, 8, 81900, 85800, 27000, 62, 28530, 33300, 25200, 22, 33300, 38700, 25200, 46, 65700, 67184, 22500, 59, 67184, 67920, 22500, 3, 75000, 75150, 21600, 32, 25200, 25260, 19800, 21, 65700, 66330, 16200, 74, 57900, 60300, 14400, 40, 65700, 66330, 10800, 59, 77280, 78000, 9900, 62, 0, 7200, 7200, 67, 66900, 67920, 7200, 74, 73080, 75000, 7200, 32, 75000, 76800, 7200, 35, 76800, 77280, 7200, 62, 79200, 81900, 7200, 62, 78000, 79200, 6300, 62, 25260, 25920, 5400, 21, 12900, 16620, 0, 78, 16620, 16800, 0, 60, 25920, 29100, 0, 21, 52800, 54300, 0, 86, 64200, 65700, 0, 59, 9540, 11820, -6300, 17, 11820, 12900, -6300, 78, 54300, 58560, -11700, 74, 16800, 18300, -14400, 60, 21000, 22470, -14400, 60, 64200, 64680, -14400, 74, 65700, 66900, -14400, 74, 66900, 67920, -14400, 3, 81900, 85800, -14400, 67, 38700, 41460, -21600, 46, 41460, 42600, -21600, 86, 0, 1200, -25200, 67, 85800, 86400, -25200, 67, 51300, 52800, -28800, 86, 57300, 58560, -28800, 59, 72000, 73920, -32400, 3, 76800, 78720, -32400, 4, 61800, 64680, -36000, 59, 21000, 29100, -39600, 55, 17700, 18300, -39600, 36, 18300, 21000, -39600, 60, 29100, 30120, -39600, 42, 34500, 38700, -39600, 75, 42600, 46200, -39600, 86, 63300, 63600, -42000, 59, 67920, 72000, -43320, 3, 17400, 17700, -52200, 36, 73920, 76800, -54000, 4, 61800, 65700, -57600, 74, 65700, 67920, -57600, 73, 30120, 30900, -61200, 42, 58560, 58950, -65700, 59, 30900, 32700, -68400, 42, 38700, 39000, -68400, 27, 58560, 58950, -69300, 59, 56400, 57300, -72000, 48, 45300, 46200, -79200, 29, 46200, 51300, -79200, 86, 32700, 35100, -86400, 42, 6000, 9540, -87780, 17, 9540, 13500, -87780, 36, 39000, 42600, -88200, 27, 42600, 45300, -88200, 29, 51300, 53700, -88200, 48, 58560, 60300, -88500, 59, 0, 6000, -91800, 17, 76800, 78720, -91800, 12, 78720, 85800, -91800, 4, 85800, 86400, -91800, 17, 35100, 36900, -95400, 42, 16920, 17400, -98100, 36, 17400, 22020, -98100, 47, 72000, 76800, -100800, 12, 36900, 38100, -105000, 42, 45300, 53700, -106200, 42, 53700, 56400, -106200, 48, 56400, 57600, -106200, 72, 16500, 16920, -108000, 36, 60300, 63360, -108000, 59, 63360, 64200, -108000, 77, 38100, 39000, -112200, 42, 22020, 26520, -118800, 20, 44100, 45300, -118800, 42, 39000, 44100, -126000, 42, 12600, 13500, -129600, 37, 30120, 33720, -132300, 69, 15360, 16500, -133200, 36, 64200, 69000, -133200, 77, 76800, 82800, -133200, 66, 82800, 84000, -133200, 71, 10800, 12600, -142500, 37, 33720, 39600, -143100, 1, 0, 6000, -144000, 71, 6000, 10800, -144000, 37, 13920, 15360, -144000, 36, 84000, 86400, -144000, 71, 51000, 53700, -151200, 15, 56400, 57600, -151200, 50, 57600, 59115, -151200, 72, 17400, 18000, -154800, 9, 18000, 23700, -154800, 23, 28800, 30120, -154800, 68, 12300, 13920, -158400, 36, 59115, 64200, -163800, 72, 64200, 69000, -163800, 25, 69000, 73200, -163800, 77, 73200, 76800, -163800, 54, 10800, 12300, -165600, 36, 16200, 17400, -167400, 9, 55200, 56400, -172800, 50, 0, 8400, -173400, 64, 9600, 10800, -176400, 36, 14700, 15360, -176400, 41, 15360, 16200, -176400, 9, 76800, 79200, -180000, 39, 21600, 28800, -182700, 68, 28800, 29400, -182700, 85, 8700, 9600, -183600, 36, 13800, 14700, -183600, 41, 0, 6600, -185400, 64, 21600, 22200, -189000, 13, 29400, 30420, -190800, 85, 12600, 13800, -191400, 41, 13800, 14400, -191400, 33, 0, 5700, -192600, 64, 7800, 8700, -194400, 36, 16200, 18000, -194400, 65, 54180, 55200, -194400, 50, 30420, 31800, -196200, 85, 22200, 23400, -198000, 13, 42600, 46200, -198000, 15, 51000, 54180, -198000, 50, 54180, 55200, -198000, 57, 14400, 15600, -203400, 33, 31800, 39600, -203400, 85, 39600, 40500, -203400, 15, 63000, 64800, -205200, 6, 64800, 73200, -205200, 79, 79200, 84000, -205200, 39, 11520, 12600, -207000, 41, 18000, 19800, -207000, 65, 23400, 24600, -208800, 13, 0, 4800, -210600, 64, 4800, 7800, -210600, 36, 84000, 86400, -210600, 64, 15600, 16500, -212400, 33, 55200, 59115, -216000, 57, 73200, 76800, -216000, 44, 19800, 21600, -219600, 65, 54600, 55200, -219600, 19, 59115, 59700, -219600, 6, 53700, 54600, -228900, 19, 59700, 60300, -228900, 6, 21600, 24600, -230400, 65, 24600, 32520, -230400, 13, 40500, 42600, -230400, 15, 42600, 46200, -230400, 28, 46200, 52320, -230400, 15, 48600, 49200, -234000, 19, 60300, 60600, -234000, 6, 7800, 11520, -243000, 41, 11520, 16500, -243000, 70, 53100, 53700, -243000, 19, 60600, 63000, -243000, 6, 63000, 64800, -243000, 61, 79200, 84000, -243000, 82, 16500, 23700, -252000, 33, 49200, 53100, -252000, 19, 53100, 61200, -252000, 80, 0, 4800, -270000, 82, 12600, 16500, -270000, 43, 23700, 32520, -270000, 87, 32520, 40500, -270000, 13, 40500, 49200, -270000, 56, 64800, 76800, -270000, 61, 76800, 84000, -270000, 44, 84000, 86400, -270000, 82, 2700, 4800, -273600, 82, 0, 12600, -297000, 43, 27600, 49200, -297000, 18, 49200, 64800, -297000, 2, 12600, 27600, -306000, 53, 0, 86400, -324000, 58, }; Sun::Sun() { lonsun = 0; Ts = 0; declination = 0; GHAsun = 0; RA = 0; jd = 0; beta = 0; lamda = 0; prlx = 0; } double Sun::GHAAries(int Y,int Mo,int D,int hr,int min,int sec) { double p[3]; double R_A =0; double tz =0; double delta_epsilon; jd = julian_day (Y, Mo, D, hr, min, sec,tz); double JC = julian_century(jd); double jme = julian_ephemeris_millennium(JC); double ecl = ecliptic_mean_obliquity(jme); double true_ecl = ecliptic_true_obliquity(delta_epsilon, ecl); spa_data spa; spa.alpha = R_A; spa.b = 0; spa.timezone = 0; spa.function = SPA_ALL; spa.epsilon0 = ecl; spa.epsilon = true_ecl; spa.jme = jme; spa.jc = JC; spa.jd = jd; spa.year = Y; spa.month = Mo; spa.day = D; spa.minute = min; spa.second = sec; calculate_geocentric_sun_right_ascension_and_declination(&spa); R_A = spa.alpha; Ts = spa.nu; beta = spa.beta; lamda = spa.lamda; prlx = spa.xi; RA = fmod(R_A,360); GHAsun = Ts - R_A; if (GHAsun < 0) GHAsun +=360; declination = spa.delta; //Constell(Mo,D); stConst = whatconstel(RA,declination); } wxString Sun::whatconstel (double Ra,double dec) { int i,k; wxString strReturn,str; wxString strErr; Ra = Ra * 3600. / 15.; if (Ra < 0.0) Ra += 86400.0; dec = dec * 3600.; /* FIND CONSTELLATION SUCH THAT THE DECLINATION ENTERED IS HIGHER THAN THE LOWER BOUNDARY OF THE CONSTELLATION WHEN THE UPPER AND LOWER RIGHT ASCENSIONS FOR THE CONSTELLATION BOUND THE ENTERED RIGHT ASCENSION */ for (i = 0; i < BNDRIES; i++) { k = i << 2; if (Ra >= bndrie[k] && Ra < bndrie[k+1] && dec > bndrie[k+2]) { k = bndrie[k+3]; strReturn = wxString::FromAscii(constell[k]); return strReturn; } } strErr = _("?? constellation not found"); return strErr; } Sun::~Sun() { } nautic-1.5/src/nutation.cpp0000644000175000017500000001226111607071655015670 0ustar moellermoeller/* * iau2000a_nutation.c - Implementation of the IAU 2000A nutation model * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * Reference : US Naval Observatory Circular 179 (2005) * */ #include #include "kepler.h" #include "fund_args.h" #include "nutation.h" /* These arrays in iau2000a_data.c contain the series of terms in the model */ extern struct ge2000a_term1 ge2000a_lunisolar[]; extern struct ge2000a_term2 ge2000a_planetary[]; extern u_short ge2000a_lunisolar_count; extern u_short ge2000a_planetary_count; /* * Calculates the mean obliquity of the ecliptic using the IAU 2000 formula. * * tdb -- TDB to be used for calculations. TT may be used for all but the most * exacting applications. * * Return: The mean obliquity of the ecliptic in radians. */ double ge2000a_mean_obliquity(struct julian_date *tdb) { double t = JULIAN_CENTURIES(tdb->date1, tdb->date2); return (84381.406 + (-46.836769 + (-0.0001831 + (0.00200340 + (-0.000000576 - 0.0000000434*t) * t) * t) * t) * t) * ACS_TO_RAD; } /* * Calculates the nutation in longitude and obliquity using the ge 2000A * nutation model in its entirety. * * tdb -- TDB to be used for calculations. TT may be used for all but the most * exacting applications. * d_psi -- The nutation in longitude expressed in radians. * d_epsilon -- The nutation in obliquity expressed in radians. */ void ge2000a_nutation(struct julian_date *tdb, double *d_psi, double *d_epsilon) { int i ; double t,s_phi,cs,sn,phi[15],psi_lun,psi_pla,eps_lun,eps_pla; t = JULIAN_CENTURIES(tdb->date1, tdb->date2); /* * Get fundamental arguments (planetary longitudes, precession, * luni-solar values). We use 1-based indices for phi to make them * consistent with the reference document. */ for (i = ARG_LONGITUDE_MERCURY; i <= ARG_LONGITUDE_NODE; i++) phi[i + 1] = fundamental_argument((fund_argument)i, t); psi_lun = 0; eps_lun = 0; /* To maximize precision,sum lunisolar terms with smallest terms first */ for (i = ge2000a_lunisolar_count - 1; i >= 0 ; i--) { s_phi = ge2000a_lunisolar[i].l * phi[10] + ge2000a_lunisolar[i].lp * phi[11] + ge2000a_lunisolar[i].f * phi[12] + ge2000a_lunisolar[i].d * phi[13] + ge2000a_lunisolar[i].om * phi[14]; sincos(s_phi, &sn, &cs); psi_lun += (ge2000a_lunisolar[i].ps + ge2000a_lunisolar[i].psd * t) * sn + ge2000a_lunisolar[i].pcp * cs; eps_lun += (ge2000a_lunisolar[i].ec + ge2000a_lunisolar[i].ecd * t) * cs + ge2000a_lunisolar[i].esp * sn; } psi_pla = 0; eps_pla = 0; /* Sum up planetary terms with the smallest terms first */ for (i = 0; i < ge2000a_planetary_count; i++) { s_phi = ge2000a_planetary[i].mer * phi[1] + ge2000a_planetary[i].ven * phi[2] + ge2000a_planetary[i].ear * phi[3] + ge2000a_planetary[i].mar * phi[4] + ge2000a_planetary[i].jup * phi[5] + ge2000a_planetary[i].sat * phi[6] + ge2000a_planetary[i].ura * phi[7] + ge2000a_planetary[i].nep * phi[8] + ge2000a_planetary[i].gp * phi[9] + ge2000a_planetary[i].l * phi[10] + ge2000a_planetary[i].lp * phi[11] + ge2000a_planetary[i].f * phi[12] + ge2000a_planetary[i].d * phi[13] + ge2000a_planetary[i].om * phi[14]; sincos(s_phi, &sn, &cs); psi_pla += ge2000a_planetary[i].ps * sn + ge2000a_planetary[i].pcp * cs; eps_pla += ge2000a_planetary[i].ec * cs + ge2000a_planetary[i].esp * sn; } /* Sum up the individual contributions */ *d_psi = (psi_lun + psi_pla) * MAS_TO_RAD; *d_epsilon = (eps_lun + eps_pla) * MAS_TO_RAD; } /* * Calculates the nutation matrix using the IAU 2000A nutation model in its * entirety. The resulting matrix may be used in the rotation of coordinates. * * tdb -- TDB to be used for calculations. TT may be used for all but the most * exacting applications. * nut_matrix -- The nutation matrix. */ void ge2000a_nutation_matrix(struct julian_date *tdb, double nut_matrix[3][3]) { double epsilon,d_psi,d_epsilon,c1,c2,c3,s1,s2,s3; epsilon = ge2000a_mean_obliquity(tdb); ge2000a_nutation(tdb, &d_psi, &d_epsilon); sincos(epsilon, &s1, &c1); sincos(d_psi, &s2, &c2); s2 *= -1.0; sincos(epsilon + d_epsilon, &s3, &c3); s3 *= -1.0; nut_matrix[0][0] = (c2); nut_matrix[0][1] = (s2 * c1); nut_matrix[0][2] = (s2 * s1); nut_matrix[1][0] = - (s2 * c3); nut_matrix[1][1] = (c3 * c2 * c1) - (s1 * s3); nut_matrix[1][2] = (c3 * c2 * s1) + (c1 * s3); nut_matrix[2][0] = (s2 * s3); nut_matrix[2][1] = - (s3 * c2 * c1) - (s1 * c3); nut_matrix[2][2] = - (s3 * c2 * s1) + (c3 * c1); } nautic-1.5/src/coordinate.cpp0000644000175000017500000001714011505435733016155 0ustar moellermoeller/* * coordinates.c - Routines for coordinate xforms & rotations * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include "kepler.h" #include "coordinate.h" /* * Converts the heliocentric rectangular coordinates of a celestial body to * geocentric spherical coordinates. Since no rotation is involved, the * resulting coordinates will be in the same reference frame (xy plane) as the * original coordinates. * * pla -- The body's heliocentric rectangular coordinates. Must be in the same * reference frame and units as ear. * ear -- The Earth's heliocentric rectangular coordinates. Must be in the same * reference frame and units as pla. * lon -- The body's geocentric longitude in radians. * lat -- The body's geocentric latitude in radians. * rad -- The body's geocentric distance in the units of pla and ear. */ void rectangular_to_spherical(struct rectangular_coordinates *pla, struct rectangular_coordinates *ear, double *lon, double *lat, double *rad) { double x,y,z; /* Convert from heliocentric coordinates to geocentric */ x = pla->x - ear->x; y = pla->y - ear->y; z = pla->z - ear->z; *lon = reduce_angle(atan2(y, x), TWO_PI); *lat = atan2(z, sqrt(x * x + y * y)); *rad = sqrt(x * x + y * y + z * z); } /* * Converts the spherical coordinates of a celestial body to rectangular * coordinates with the same origin and reference frame (xy plane). * * lon -- The body's longitude in radians. * lat -- The body's latitude in radians. * rad -- The body's distance from the central body. * rec -- The body's rectangular coordinates in the same units as rad. */ void spherical_to_rectangular(double lon, double lat, double rad, struct rectangular_coordinates *rec) { double cd,sd,cr,sr; sincos(lon, &sr, &cr); sincos(lat, &sd, &cd); rec->x = rad * cr * cd; rec->y = rad * sr * cd; rec->z = rad * sd; } /* * Calculates the Sun-body-Earth phase angle. * * obj -- The body's heliocentric rectangular coordinates. Must be in * the same reference frame and units as ear. * ear -- The Earth's heliocentric rectangular coordinates. Must be in * the same reference frame and units as obj. * * Return: The Sun-body-Earth phase angle in radians. */ double phase_angle(struct rectangular_coordinates *obj, struct rectangular_coordinates *ear) { double a,b,c,pa; /* Sun-Earth distance */ a = sqrt(ear->x * ear->x + ear->y * ear->y + ear->z * ear->z); /* Sun-body distance */ b = sqrt(obj->x * obj->x + obj->y * obj->y + obj->z * obj->z); /* Earth-body distance */ c = sqrt((obj->x - ear->x) * (obj->x - ear->x) + (obj->y - ear->y) * (obj->y - ear->y) + (obj->z - ear->z) * (obj->z - ear->z)); /* Solve for the phase angle using the law of cosines */ pa = acos((b * b + c * c - a * a) / (2 * b * c)); return pa; } /* * Converts the geocentric equatorial coordinates of a celestial body to * geocentric ecliptic coordinates. * * equ -- The body's geocentric equatorial coordinates. * obl -- The obliquity of the ecliptic in radians. * ecl -- The body's geocentric ecliptic coordinates. */ void equatorial_to_ecliptic(struct equatorial_coordinates *equ, double obl, struct ecliptic_coordinates *ecl) { double cd,sd,cr,sr,co,so; sincos(equ->declination, &sd, &cd); sincos(equ->right_ascension, &sr, &cr); sincos(obl, &so, &co); ecl->longitude = reduce_angle(atan2(sr * cd * co + sd * so, cr * cd), TWO_PI); ecl->latitude = asin(sd * co - sr * cd * so); } /* * Converts the geocentric ecliptic coordinates of a celestial body to * geocentric equatorial coordinates. * * ecl -- The body's geocentric ecliptic coordinates. * obl -- The obliquity of the ecliptic in radians. * equ -- The body's geocentric equatorial coordinates. */ void ecliptic_to_equatorial(struct ecliptic_coordinates *ecl, double obl, struct equatorial_coordinates *equ) { double cg,sg,ct,st,co,so; sincos(ecl->longitude, &sg, &cg); sincos(ecl->latitude, &st, &ct); sincos(obl, &so, &co); equ->right_ascension = reduce_angle(atan2(sg * ct * co - st * so, cg * ct), TWO_PI); equ->declination = asin(st * co + sg * ct * so); } /* * Converts the geocentric equatorial coordinates of a celestial body to * horizontal coordinates. * * ha -- The body's local hour angle in radians. * decl -- The body's declination in radians. * lat -- The observer's geographic latitude in radians. * hor -- The body's horizontal coordinates. */ void equatorial_to_horizontal(double ha, double decl, double lat, struct horizontal_coordinates *hor) { double cd,sd,ch,sh,ct,st; sincos(decl, &sd, &cd); sincos(ha, &sh, &ch); sincos(lat, &st, &ct); hor->azimuth = reduce_angle(atan2(cd * sh, cd * st * ch - sd * ct), TWO_PI); hor->altitude = asin(sd * st + cd * ct * ch); } /* * Converts the horizontal coordinates of a celestial body to geocentric * equatorial coordinates. * * hor -- The body's horizontal coordinates. * lat -- The observer's geographic latitude in radians. * ha -- The body's local hour angle in radians. * decl -- The body's declination in radians. */ void horizontal_to_equatorial(struct horizontal_coordinates *hor, double lat, double *ha, double *decl) { double ca,sa,cz,sz,ct,st; sincos(hor->altitude, &sa, &ca); sincos(hor->azimuth, &sz, &cz); sincos(lat, &st, &ct); *ha = reduce_angle(atan2(sz * ca, cz * ca * st + sa * ct), TWO_PI); *decl = asin(sa * st - cz * ca * ct); } /* * Applies a rotation matrix to a body's rectangular coordinates. * * mat -- The rotation matrix. * pos -- The coordinates to be rotated in-place. */ void rotate_rectangular(double mat[3][3], struct rectangular_coordinates *pos) { struct rectangular_coordinates tmp; tmp.x = (mat[0][0] * pos->x) + (mat[0][1] * pos->y) + (mat[0][2] * pos->z); tmp.y = (mat[1][0] * pos->x) + (mat[1][1] * pos->y) + (mat[1][2] * pos->z); tmp.z = (mat[2][0] * pos->x) + (mat[2][1] * pos->y) + (mat[2][2] * pos->z); pos->x = tmp.x; pos->y = tmp.y; pos->z = tmp.z; } /* * Applies a rotation matrix to a body's geocentric equatorial coordinates. This * function can be used to apply the IAU2006/2000A precession/nutation matrices. * * mat -- The rotation matrix. * pos -- The coordinates to be rotated in-place. */ void rotate_equatorial(double mat[3][3], struct equatorial_coordinates *pos) { struct rectangular_coordinates rec; /* We arbitrarily assign the body a radius of 1 unit */ spherical_to_rectangular(pos->right_ascension, pos->declination,1, &rec); rotate_rectangular(mat, &rec); pos->right_ascension = reduce_angle(atan2(rec.y, rec.x), TWO_PI); pos->declination = asin(rec.z); } /* * Rotates rectangular coordinates in the ecliptic frame to the equatorial frame. * * obl -- The obliquity of the ecliptic in radians. * pos -- The coordinates to be rotated in-place. */ void rotate_ecliptic_to_equator(double obl, struct rectangular_coordinates *pos) { double co,so; struct rectangular_coordinates tmp; sincos(obl, &so, &co); tmp.y = pos->y * co - pos->z * so; tmp.z = pos->y * so + pos->z * co; pos->y = tmp.y; pos->z = tmp.z; }nautic-1.5/src/ge2000a_data.cpp0000644000175000017500000024323511607071655016065 0ustar moellermoeller/* * iau2000a_data.c - Series of terms in the IAU2000A nutation theory * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "kepler.h" #include "nutation.h" struct ge2000a_term1 ge2000a_lunisolar[] = { {0,0,0,0,1,-17206.4161,-17.4666,3.3386,9205.2331,0.9086,1.5377}, {0,0,2,-2,2,-1317.0906,-0.1675,-1.3696,573.0336,-0.3015,-0.4587}, {0,0,2,0,2,-227.6413,-0.0234,0.2796,97.8459,-0.0485,0.1374}, {0,0,0,0,2,207.4554,0.0207,-0.0698,-89.7492,0.0470,-0.0291}, {0,1,0,0,0,147.5877,-0.3633,1.1817,7.3871,-0.0184,-0.1924}, {0,1,2,-2,2,-51.6821,0.1226,-0.0524,22.4386,-0.0677,-0.0174}, {1,0,0,0,0,71.1159,0.0073,-0.0872,-0.6750,0.0000,0.0358}, {0,0,2,0,1,-38.7298,-0.0367,0.0380,20.0728,0.0018,0.0318}, {1,0,2,0,2,-30.1461,-0.0036,0.0816,12.9025,-0.0063,0.0367}, {0,-1,2,-2,2,21.5829,-0.0494,0.0111,-9.5929,0.0299,0.0132}, {0,0,2,-2,1,12.8227,0.0137,0.0181,-6.8982,-0.0009,0.0039}, {-1,0,2,0,2,12.3457,0.0011,0.0019,-5.3311,0.0032,-0.0004}, {-1,0,0,2,0,15.6994,0.0010,-0.0168,-0.1235,0.0000,0.0082}, {1,0,0,0,1,6.3110,0.0063,0.0027,-3.3228,0.0000,-0.0009}, {-1,0,0,0,1,-5.7976,-0.0063,-0.0189,3.1429,0.0000,-0.0075}, {-1,0,2,2,2,-5.9641,-0.0011,0.0149,2.5543,-0.0011,0.0066}, {1,0,2,0,1,-5.1613,-0.0042,0.0129,2.6366,0.0000,0.0078}, {-2,0,2,0,1,4.5893,0.0050,0.0031,-2.4236,-0.0010,0.0020}, {0,0,0,2,0,6.3384,0.0011,-0.0150,-0.1220,0.0000,0.0029}, {0,0,2,2,2,-3.8571,-0.0001,0.0158,1.6452,-0.0011,0.0068}, {0,-2,2,-2,2,3.2481,0.0000,0.0000,-1.3870,0.0000,0.0000}, {-2,0,0,2,0,-4.7722,0.0000,-0.0018,0.0477,0.0000,-0.0025}, {2,0,2,0,2,-3.1046,-0.0001,0.0131,1.3238,-0.0011,0.0059}, {1,0,2,-2,2,2.8593,0.0000,-0.0001,-1.2338,0.0010,-0.0003}, {-1,0,2,0,1,2.0441,0.0021,0.0010,-1.0758,0.0000,-0.0003}, {2,0,0,0,0,2.9243,0.0000,-0.0074,-0.0609,0.0000,0.0013}, {0,0,2,0,0,2.5887,0.0000,-0.0066,-0.0550,0.0000,0.0011}, {0,1,0,0,1,-1.4053,-0.0025,0.0079,0.8551,-0.0002,-0.0045}, {-1,0,0,2,1,1.5164,0.0010,0.0011,-0.8001,0.0000,-0.0001}, {0,2,2,-2,2,-1.5794,0.0072,-0.0016,0.6850,-0.0042,-0.0005}, {0,0,-2,2,0,2.1783,0.0000,0.0013,-0.0167,0.0000,0.0013}, {1,0,0,-2,1,-1.2873,-0.0010,-0.0037,0.6953,0.0000,-0.0014}, {0,-1,0,0,1,-1.2654,0.0011,0.0063,0.6415,0.0000,0.0026}, {-1,0,2,2,1,-1.0204,0.0000,0.0025,0.5222,0.0000,0.0015}, {0,2,0,0,0,1.6707,-0.0085,-0.0010,0.0168,-0.0001,0.0010}, {1,0,2,2,2,-0.7691,0.0000,0.0044,0.3268,0.0000,0.0019}, {-2,0,2,0,0,-1.1024,0.0000,-0.0014,0.0104,0.0000,0.0002}, {0,1,2,0,2,0.7566,-0.0021,-0.0011,-0.3250,0.0000,-0.0005}, {0,0,2,2,1,-0.6637,-0.0011,0.0025,0.3353,0.0000,0.0014}, {0,-1,2,0,2,-0.7141,0.0021,0.0008,0.3070,0.0000,0.0004}, {0,0,0,2,1,-0.6302,-0.0011,0.0002,0.3272,0.0000,0.0004}, {1,0,2,-2,1,0.5800,0.0010,0.0002,-0.3045,0.0000,-0.0001}, {2,0,2,-2,2,0.6443,0.0000,-0.0007,-0.2768,0.0000,-0.0004}, {-2,0,0,2,1,-0.5774,-0.0011,-0.0015,0.3041,0.0000,-0.0005}, {2,0,2,0,1,-0.5350,0.0000,0.0021,0.2695,0.0000,0.0012}, {0,-1,2,-2,1,-0.4752,-0.0011,-0.0003,0.2719,0.0000,-0.0003}, {0,0,0,-2,1,-0.4940,-0.0011,-0.0021,0.2720,0.0000,-0.0009}, {-1,-1,0,2,0,0.7350,0.0000,-0.0008,-0.0051,0.0000,0.0004}, {2,0,0,-2,1,0.4065,0.0000,0.0006,-0.2206,0.0000,0.0001}, {1,0,0,2,0,0.6579,0.0000,-0.0024,-0.0199,0.0000,0.0002}, {0,1,2,-2,1,0.3579,0.0000,0.0005,-0.1900,0.0000,0.0001}, {1,-1,0,0,0,0.4725,0.0000,-0.0006,-0.0041,0.0000,0.0003}, {-2,0,2,0,2,-0.3075,0.0000,-0.0002,0.1313,0.0000,-0.0001}, {3,0,2,0,2,-0.2904,0.0000,0.0015,0.1233,0.0000,0.0007}, {0,-1,0,2,0,0.4348,0.0000,-0.0010,-0.0081,0.0000,0.0002}, {1,-1,2,0,2,-0.2878,0.0000,0.0008,0.1232,0.0000,0.0004}, {0,0,0,1,0,-0.4230,0.0000,0.0005,-0.0020,0.0000,-0.0002}, {-1,-1,2,2,2,-0.2819,0.0000,0.0007,0.1207,0.0000,0.0003}, {-1,0,2,0,0,-0.4056,0.0000,0.0005,0.0040,0.0000,-0.0002}, {0,-1,2,2,2,-0.2647,0.0000,0.0011,0.1129,0.0000,0.0005}, {-2,0,0,0,1,-0.2294,0.0000,-0.0010,0.1266,0.0000,-0.0004}, {1,1,2,0,2,0.2481,0.0000,-0.0007,-0.1062,0.0000,-0.0003}, {2,0,0,0,1,0.2179,0.0000,-0.0002,-0.1129,0.0000,-0.0002}, {-1,1,0,1,0,0.3276,0.0000,0.0001,-0.0009,0.0000,0.0000}, {1,1,0,0,0,-0.3389,0.0000,0.0005,0.0035,0.0000,-0.0002}, {1,0,2,0,0,0.3339,0.0000,-0.0013,-0.0107,0.0000,0.0001}, {-1,0,2,-2,1,-0.1987,0.0000,-0.0006,0.1073,0.0000,-0.0002}, {1,0,0,0,2,-0.1981,0.0000,0.0000,0.0854,0.0000,0.0000}, {-1,0,0,1,0,0.4026,0.0000,-0.0353,-0.0553,0.0000,-0.0139}, {0,0,2,1,2,0.1660,0.0000,-0.0005,-0.0710,0.0000,-0.0002}, {-1,0,2,4,2,-0.1521,0.0000,0.0009,0.0647,0.0000,0.0004}, {-1,1,0,1,1,0.1314,0.0000,0.0000,-0.0700,0.0000,0.0000}, {0,-2,2,-2,1,-0.1283,0.0000,0.0000,0.0672,0.0000,0.0000}, {1,0,2,2,1,-0.1331,0.0000,0.0008,0.0663,0.0000,0.0004}, {-2,0,2,2,2,0.1383,0.0000,-0.0002,-0.0594,0.0000,-0.0002}, {-1,0,0,0,2,0.1405,0.0000,0.0004,-0.0610,0.0000,0.0002}, {1,1,2,-2,2,0.1290,0.0000,0.0000,-0.0556,0.0000,0.0000}, {-2,0,2,4,2,-0.1214,0.0000,0.0005,0.0518,0.0000,0.0002}, {-1,0,4,0,2,0.1146,0.0000,-0.0003,-0.0490,0.0000,-0.0001}, {2,0,2,-2,1,0.1019,0.0000,-0.0001,-0.0527,0.0000,-0.0001}, {2,0,2,2,2,-0.1100,0.0000,0.0009,0.0465,0.0000,0.0004}, {1,0,0,2,1,-0.0970,0.0000,0.0002,0.0496,0.0000,0.0001}, {3,0,0,0,0,0.1575,0.0000,-0.0006,-0.0050,0.0000,0.0000}, {3,0,2,-2,2,0.0934,0.0000,-0.0003,-0.0399,0.0000,-0.0001}, {0,0,4,-2,2,0.0922,0.0000,-0.0001,-0.0395,0.0000,-0.0001}, {0,1,2,0,1,0.0815,0.0000,-0.0001,-0.0422,0.0000,-0.0001}, {0,0,-2,2,1,0.0834,0.0000,0.0002,-0.0440,0.0000,0.0001}, {0,0,2,-2,3,0.1248,0.0000,0.0000,-0.0170,0.0000,0.0001}, {-1,0,0,4,0,0.1338,0.0000,-0.0005,-0.0039,0.0000,0.0000}, {2,0,-2,0,1,0.0716,0.0000,-0.0002,-0.0389,0.0000,-0.0001}, {-2,0,0,4,0,0.1282,0.0000,-0.0003,-0.0023,0.0000,0.0001}, {-1,-1,0,2,1,0.0742,0.0000,0.0001,-0.0391,0.0000,0.0000}, {-1,0,0,1,1,0.1020,0.0000,-0.0025,-0.0495,0.0000,-0.0010}, {0,1,0,0,2,0.0715,0.0000,-0.0004,-0.0326,0.0000,0.0002}, {0,0,-2,0,1,-0.0666,0.0000,-0.0003,0.0369,0.0000,-0.0001}, {0,-1,2,0,1,-0.0667,0.0000,0.0001,0.0346,0.0000,0.0001}, {0,0,2,-1,2,-0.0704,0.0000,0.0000,0.0304,0.0000,0.0000}, {0,0,2,4,2,-0.0694,0.0000,0.0005,0.0294,0.0000,0.0002}, {-2,-1,0,2,0,-0.1014,0.0000,-0.0001,0.0004,0.0000,-0.0001}, {1,1,0,-2,1,-0.0585,0.0000,-0.0002,0.0316,0.0000,-0.0001}, {-1,1,0,2,0,-0.0949,0.0000,0.0001,0.0008,0.0000,-0.0001}, {-1,1,0,1,2,-0.0595,0.0000,0.0000,0.0258,0.0000,0.0000}, {1,-1,0,0,1,0.0528,0.0000,0.0000,-0.0279,0.0000,0.0000}, {1,-1,2,2,2,-0.0590,0.0000,0.0004,0.0252,0.0000,0.0002}, {-1,1,2,2,2,0.0570,0.0000,-0.0002,-0.0244,0.0000,-0.0001}, {3,0,2,0,1,-0.0502,0.0000,0.0003,0.0250,0.0000,0.0002}, {0,1,-2,2,0,-0.0875,0.0000,0.0001,0.0029,0.0000,0.0000}, {-1,0,0,-2,1,-0.0492,0.0000,-0.0003,0.0275,0.0000,-0.0001}, {0,1,2,2,2,0.0535,0.0000,-0.0002,-0.0228,0.0000,-0.0001}, {-1,-1,2,2,1,-0.0467,0.0000,0.0001,0.0240,0.0000,0.0001}, {0,-1,0,0,2,0.0591,0.0000,0.0000,-0.0253,0.0000,0.0000}, {1,0,2,-4,1,-0.0453,0.0000,-0.0001,0.0244,0.0000,-0.0001}, {-1,0,-2,2,0,0.0766,0.0000,0.0001,0.0009,0.0000,0.0000}, {0,-1,2,2,1,-0.0446,0.0000,0.0002,0.0225,0.0000,0.0001}, {2,-1,2,0,2,-0.0488,0.0000,0.0002,0.0207,0.0000,0.0001}, {0,0,0,2,2,-0.0468,0.0000,0.0000,0.0201,0.0000,0.0000}, {1,-1,2,0,1,-0.0421,0.0000,0.0001,0.0216,0.0000,0.0001}, {-1,1,2,0,2,0.0463,0.0000,0.0000,-0.0200,0.0000,0.0000}, {0,1,0,2,0,-0.0673,0.0000,0.0002,0.0014,0.0000,0.0000}, {0,-1,-2,2,0,0.0658,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,3,2,-2,2,-0.0438,0.0000,0.0000,0.0188,0.0000,0.0000}, {0,0,0,1,1,-0.0390,0.0000,0.0000,0.0205,0.0000,0.0000}, {-1,0,2,2,0,0.0639,-0.0011,-0.0002,-0.0019,0.0000,0.0000}, {2,1,2,0,2,0.0412,0.0000,-0.0002,-0.0176,0.0000,-0.0001}, {1,1,0,0,1,-0.0361,0.0000,0.0000,0.0189,0.0000,0.0000}, {1,1,2,0,1,0.0360,0.0000,-0.0001,-0.0185,0.0000,-0.0001}, {2,0,0,2,0,0.0588,0.0000,-0.0003,-0.0024,0.0000,0.0000}, {1,0,-2,2,0,-0.0578,0.0000,0.0001,0.0005,0.0000,0.0000}, {-1,0,0,2,2,-0.0396,0.0000,0.0000,0.0171,0.0000,0.0000}, {0,1,0,1,0,0.0565,0.0000,-0.0001,-0.0006,0.0000,0.0000}, {0,1,0,-2,1,-0.0335,0.0000,-0.0001,0.0184,0.0000,-0.0001}, {-1,0,2,-2,2,0.0357,0.0000,0.0001,-0.0154,0.0000,0.0000}, {0,0,0,-1,1,0.0321,0.0000,0.0001,-0.0174,0.0000,0.0000}, {-1,1,0,0,1,-0.0301,0.0000,-0.0001,0.0162,0.0000,0.0000}, {1,0,2,-1,2,-0.0334,0.0000,0.0000,0.0144,0.0000,0.0000}, {1,-1,0,2,0,0.0493,0.0000,-0.0002,-0.0015,0.0000,0.0000}, {0,0,0,4,0,0.0494,0.0000,-0.0002,-0.0019,0.0000,0.0000}, {1,0,2,1,2,0.0337,0.0000,-0.0001,-0.0143,0.0000,-0.0001}, {0,0,2,1,1,0.0280,0.0000,-0.0001,-0.0144,0.0000,0.0000}, {1,0,0,-2,2,0.0309,0.0000,0.0001,-0.0134,0.0000,0.0000}, {-1,0,2,4,1,-0.0263,0.0000,0.0002,0.0131,0.0000,0.0001}, {1,0,-2,0,1,0.0253,0.0000,0.0001,-0.0138,0.0000,0.0000}, {1,1,2,-2,1,0.0245,0.0000,0.0000,-0.0128,0.0000,0.0000}, {0,0,2,2,0,0.0416,0.0000,-0.0002,-0.0017,0.0000,0.0000}, {-1,0,2,-1,1,-0.0229,0.0000,0.0000,0.0128,0.0000,0.0000}, {-2,0,2,2,1,0.0231,0.0000,0.0000,-0.0120,0.0000,0.0000}, {4,0,2,0,2,-0.0259,0.0000,0.0002,0.0109,0.0000,0.0001}, {2,-1,0,0,0,0.0375,0.0000,-0.0001,-0.0008,0.0000,0.0000}, {2,1,2,-2,2,0.0252,0.0000,0.0000,-0.0108,0.0000,0.0000}, {0,1,2,1,2,-0.0245,0.0000,0.0001,0.0104,0.0000,0.0000}, {1,0,4,-2,2,0.0243,0.0000,-0.0001,-0.0104,0.0000,0.0000}, {-1,-1,0,0,1,0.0208,0.0000,0.0001,-0.0112,0.0000,0.0000}, {0,1,0,2,1,0.0199,0.0000,0.0000,-0.0102,0.0000,0.0000}, {-2,0,2,4,1,-0.0208,0.0000,0.0001,0.0105,0.0000,0.0000}, {2,0,2,0,0,0.0335,0.0000,-0.0002,-0.0014,0.0000,0.0000}, {1,0,0,1,0,-0.0325,0.0000,0.0001,0.0007,0.0000,0.0000}, {-1,0,0,4,1,-0.0187,0.0000,0.0000,0.0096,0.0000,0.0000}, {-1,0,4,0,1,0.0197,0.0000,-0.0001,-0.0100,0.0000,0.0000}, {2,0,2,2,1,-0.0192,0.0000,0.0002,0.0094,0.0000,0.0001}, {0,0,2,-3,2,-0.0188,0.0000,0.0000,0.0083,0.0000,0.0000}, {-1,-2,0,2,0,0.0276,0.0000,0.0000,-0.0002,0.0000,0.0000}, {2,1,0,0,0,-0.0286,0.0000,0.0001,0.0006,0.0000,0.0000}, {0,0,4,0,2,0.0186,0.0000,-0.0001,-0.0079,0.0000,0.0000}, {0,0,0,0,3,-0.0219,0.0000,0.0000,0.0043,0.0000,0.0000}, {0,3,0,0,0,0.0276,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,2,-4,1,-0.0153,0.0000,-0.0001,0.0084,0.0000,0.0000}, {0,-1,0,2,1,-0.0156,0.0000,0.0000,0.0081,0.0000,0.0000}, {0,0,0,4,1,-0.0154,0.0000,0.0001,0.0078,0.0000,0.0000}, {-1,-1,2,4,2,-0.0174,0.0000,0.0001,0.0075,0.0000,0.0000}, {1,0,2,4,2,-0.0163,0.0000,0.0002,0.0069,0.0000,0.0001}, {-2,2,0,2,0,-0.0228,0.0000,0.0000,0.0001,0.0000,0.0000}, {-2,-1,2,0,1,0.0091,0.0000,-0.0004,-0.0054,0.0000,-0.0002}, {-2,0,0,2,2,0.0175,0.0000,0.0000,-0.0075,0.0000,0.0000}, {-1,-1,2,0,2,-0.0159,0.0000,0.0000,0.0069,0.0000,0.0000}, {0,0,4,-2,1,0.0141,0.0000,0.0000,-0.0072,0.0000,0.0000}, {3,0,2,-2,1,0.0147,0.0000,0.0000,-0.0075,0.0000,0.0000}, {-2,-1,0,2,1,-0.0132,0.0000,0.0000,0.0069,0.0000,0.0000}, {1,0,0,-1,1,0.0159,0.0000,-0.0028,-0.0054,0.0000,0.0011}, {0,-2,0,2,0,0.0213,0.0000,0.0000,-0.0004,0.0000,0.0000}, {-2,0,0,4,1,0.0123,0.0000,0.0000,-0.0064,0.0000,0.0000}, {-3,0,0,0,1,-0.0118,0.0000,-0.0001,0.0066,0.0000,0.0000}, {1,1,2,2,2,0.0144,0.0000,-0.0001,-0.0061,0.0000,0.0000}, {0,0,2,4,1,-0.0121,0.0000,0.0001,0.0060,0.0000,0.0000}, {3,0,2,2,2,-0.0134,0.0000,0.0001,0.0056,0.0000,0.0001}, {-1,1,2,-2,1,-0.0105,0.0000,0.0000,0.0057,0.0000,0.0000}, {2,0,0,-4,1,-0.0102,0.0000,0.0000,0.0056,0.0000,0.0000}, {0,0,0,-2,2,0.0120,0.0000,0.0000,-0.0052,0.0000,0.0000}, {2,0,2,-4,1,0.0101,0.0000,0.0000,-0.0054,0.0000,0.0000}, {-1,1,0,2,1,-0.0113,0.0000,0.0000,0.0059,0.0000,0.0000}, {0,0,2,-1,1,-0.0106,0.0000,0.0000,0.0061,0.0000,0.0000}, {0,-2,2,2,2,-0.0129,0.0000,0.0001,0.0055,0.0000,0.0000}, {2,0,0,2,1,-0.0114,0.0000,0.0000,0.0057,0.0000,0.0000}, {4,0,2,-2,2,0.0113,0.0000,-0.0001,-0.0049,0.0000,0.0000}, {2,0,0,-2,2,-0.0102,0.0000,0.0000,0.0044,0.0000,0.0000}, {0,2,0,0,1,-0.0094,0.0000,0.0000,0.0051,0.0000,0.0000}, {1,0,0,-4,1,-0.0100,0.0000,-0.0001,0.0056,0.0000,0.0000}, {0,2,2,-2,1,0.0087,0.0000,0.0000,-0.0047,0.0000,0.0000}, {-3,0,0,4,0,0.0161,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-1,1,2,0,1,0.0096,0.0000,0.0000,-0.0050,0.0000,0.0000}, {-1,-1,0,4,0,0.0151,0.0000,-0.0001,-0.0005,0.0000,0.0000}, {-1,-2,2,2,2,-0.0104,0.0000,0.0000,0.0044,0.0000,0.0000}, {-2,-1,2,4,2,-0.0110,0.0000,0.0000,0.0048,0.0000,0.0000}, {1,-1,2,2,1,-0.0100,0.0000,0.0001,0.0050,0.0000,0.0000}, {-2,1,0,2,0,0.0092,0.0000,-0.0005,0.0012,0.0000,-0.0002}, {-2,1,2,0,1,0.0082,0.0000,0.0000,-0.0045,0.0000,0.0000}, {2,1,0,-2,1,0.0082,0.0000,0.0000,-0.0045,0.0000,0.0000}, {-3,0,2,0,1,-0.0078,0.0000,0.0000,0.0041,0.0000,0.0000}, {-2,0,2,-2,1,-0.0077,0.0000,0.0000,0.0043,0.0000,0.0000}, {-1,1,0,2,2,0.0002,0.0000,0.0000,0.0054,0.0000,0.0000}, {0,-1,2,-1,2,0.0094,0.0000,0.0000,-0.0040,0.0000,0.0000}, {-1,0,4,-2,2,-0.0093,0.0000,0.0000,0.0040,0.0000,0.0000}, {0,-2,2,0,2,-0.0083,0.0000,0.0010,0.0040,0.0000,-0.0002}, {-1,0,2,1,2,0.0083,0.0000,0.0000,-0.0036,0.0000,0.0000}, {2,0,0,0,2,-0.0091,0.0000,0.0000,0.0039,0.0000,0.0000}, {0,0,2,0,3,0.0128,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-2,0,4,0,2,-0.0079,0.0000,0.0000,0.0034,0.0000,0.0000}, {-1,0,-2,0,1,-0.0083,0.0000,0.0000,0.0047,0.0000,0.0000}, {-1,1,2,2,1,0.0084,0.0000,0.0000,-0.0044,0.0000,0.0000}, {3,0,0,0,1,0.0083,0.0000,0.0000,-0.0043,0.0000,0.0000}, {-1,0,2,3,2,0.0091,0.0000,0.0000,-0.0039,0.0000,0.0000}, {2,-1,2,0,1,-0.0077,0.0000,0.0000,0.0039,0.0000,0.0000}, {0,1,2,2,1,0.0084,0.0000,0.0000,-0.0043,0.0000,0.0000}, {0,-1,2,4,2,-0.0092,0.0000,0.0001,0.0039,0.0000,0.0000}, {2,-1,2,2,2,-0.0092,0.0000,0.0001,0.0039,0.0000,0.0000}, {0,2,-2,2,0,-0.0094,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,2,-1,1,0.0068,0.0000,0.0000,-0.0036,0.0000,0.0000}, {0,-2,0,0,1,-0.0061,0.0000,0.0000,0.0032,0.0000,0.0000}, {1,0,2,-4,2,0.0071,0.0000,0.0000,-0.0031,0.0000,0.0000}, {1,-1,0,-2,1,0.0062,0.0000,0.0000,-0.0034,0.0000,0.0000}, {-1,-1,2,0,1,-0.0063,0.0000,0.0000,0.0033,0.0000,0.0000}, {1,-1,2,-2,2,-0.0073,0.0000,0.0000,0.0032,0.0000,0.0000}, {-2,-1,0,4,0,0.0115,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,0,0,3,0,-0.0103,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,-1,2,2,2,0.0063,0.0000,0.0000,-0.0028,0.0000,0.0000}, {0,2,2,0,2,0.0074,0.0000,0.0000,-0.0032,0.0000,0.0000}, {1,1,0,2,0,-0.0103,0.0000,-0.0003,0.0003,0.0000,-0.0001}, {2,0,2,-1,2,-0.0069,0.0000,0.0000,0.0030,0.0000,0.0000}, {1,0,2,1,1,0.0057,0.0000,0.0000,-0.0029,0.0000,0.0000}, {4,0,0,0,0,0.0094,0.0000,0.0000,-0.0004,0.0000,0.0000}, {2,1,2,0,1,0.0064,0.0000,0.0000,-0.0033,0.0000,0.0000}, {3,-1,2,0,2,-0.0063,0.0000,0.0000,0.0026,0.0000,0.0000}, {-2,2,0,2,1,-0.0038,0.0000,0.0000,0.0020,0.0000,0.0000}, {1,0,2,-3,1,-0.0043,0.0000,0.0000,0.0024,0.0000,0.0000}, {1,1,2,-4,1,-0.0045,0.0000,0.0000,0.0023,0.0000,0.0000}, {-1,-1,2,-2,1,0.0047,0.0000,0.0000,-0.0024,0.0000,0.0000}, {0,-1,0,-1,1,-0.0048,0.0000,0.0000,0.0025,0.0000,0.0000}, {0,-1,0,-2,1,0.0045,0.0000,0.0000,-0.0026,0.0000,0.0000}, {-2,0,0,0,2,0.0056,0.0000,0.0000,-0.0025,0.0000,0.0000}, {-2,0,-2,2,0,0.0088,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,0,-2,4,0,-0.0075,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,-2,0,0,0,0.0085,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,0,1,1,0.0049,0.0000,0.0000,-0.0026,0.0000,0.0000}, {-1,2,0,2,0,-0.0074,0.0000,-0.0003,-0.0001,0.0000,-0.0001}, {1,-1,2,-2,1,-0.0039,0.0000,0.0000,0.0021,0.0000,0.0000}, {1,2,2,-2,2,0.0045,0.0000,0.0000,-0.0020,0.0000,0.0000}, {2,-1,2,-2,2,0.0051,0.0000,0.0000,-0.0022,0.0000,0.0000}, {1,0,2,-1,1,-0.0040,0.0000,0.0000,0.0021,0.0000,0.0000}, {2,1,2,-2,1,0.0041,0.0000,0.0000,-0.0021,0.0000,0.0000}, {-2,0,0,-2,1,-0.0042,0.0000,0.0000,0.0024,0.0000,0.0000}, {1,-2,2,0,2,-0.0051,0.0000,0.0000,0.0022,0.0000,0.0000}, {0,1,2,1,1,-0.0042,0.0000,0.0000,0.0022,0.0000,0.0000}, {1,0,4,-2,1,0.0039,0.0000,0.0000,-0.0021,0.0000,0.0000}, {-2,0,4,2,2,0.0046,0.0000,0.0000,-0.0018,0.0000,0.0000}, {1,1,2,1,2,-0.0053,0.0000,0.0000,0.0022,0.0000,0.0000}, {1,0,0,4,0,0.0082,0.0000,0.0000,-0.0004,0.0000,0.0000}, {1,0,2,2,0,0.0081,0.0000,-0.0001,-0.0004,0.0000,0.0000}, {2,0,2,1,2,0.0047,0.0000,0.0000,-0.0019,0.0000,0.0000}, {3,1,2,0,2,0.0053,0.0000,0.0000,-0.0023,0.0000,0.0000}, {4,0,2,0,1,-0.0045,0.0000,0.0000,0.0022,0.0000,0.0000}, {-2,-1,2,0,0,-0.0044,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,1,-2,2,1,-0.0033,0.0000,0.0000,0.0016,0.0000,0.0000}, {1,0,-2,1,0,-0.0061,0.0000,0.0000,0.0001,0.0000,0.0000}, {0,-1,-2,2,1,0.0028,0.0000,0.0000,-0.0015,0.0000,0.0000}, {2,-1,0,-2,1,-0.0038,0.0000,0.0000,0.0019,0.0000,0.0000}, {-1,0,2,-1,2,-0.0033,0.0000,0.0000,0.0021,0.0000,0.0000}, {1,0,2,-3,2,-0.0060,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,2,-2,3,0.0048,0.0000,0.0000,-0.0010,0.0000,0.0000}, {0,0,2,-3,1,0.0027,0.0000,0.0000,-0.0014,0.0000,0.0000}, {-1,0,-2,2,1,0.0038,0.0000,0.0000,-0.0020,0.0000,0.0000}, {0,0,2,-4,2,0.0031,0.0000,0.0000,-0.0013,0.0000,0.0000}, {-2,1,0,0,1,-0.0029,0.0000,0.0000,0.0015,0.0000,0.0000}, {-1,0,0,-1,1,0.0028,0.0000,0.0000,-0.0015,0.0000,0.0000}, {2,0,2,-4,2,-0.0032,0.0000,0.0000,0.0015,0.0000,0.0000}, {0,0,4,-4,4,0.0045,0.0000,0.0000,-0.0008,0.0000,0.0000}, {0,0,4,-4,2,-0.0044,0.0000,0.0000,0.0019,0.0000,0.0000}, {-1,-2,0,2,1,0.0028,0.0000,0.0000,-0.0015,0.0000,0.0000}, {-2,0,0,3,0,-0.0051,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,-2,2,1,-0.0036,0.0000,0.0000,0.0020,0.0000,0.0000}, {-3,0,2,2,2,0.0044,0.0000,0.0000,-0.0019,0.0000,0.0000}, {-3,0,2,2,1,0.0026,0.0000,0.0000,-0.0014,0.0000,0.0000}, {-2,0,2,2,0,-0.0060,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,-1,0,0,1,0.0035,0.0000,0.0000,-0.0018,0.0000,0.0000}, {-2,1,2,2,2,-0.0027,0.0000,0.0000,0.0011,0.0000,0.0000}, {1,1,0,1,0,0.0047,0.0000,0.0000,-0.0001,0.0000,0.0000}, {0,1,4,-2,2,0.0036,0.0000,0.0000,-0.0015,0.0000,0.0000}, {-1,1,0,-2,1,-0.0036,0.0000,0.0000,0.0020,0.0000,0.0000}, {0,0,0,-4,1,-0.0035,0.0000,0.0000,0.0019,0.0000,0.0000}, {1,-1,0,2,1,-0.0037,0.0000,0.0000,0.0019,0.0000,0.0000}, {1,1,0,2,1,0.0032,0.0000,0.0000,-0.0016,0.0000,0.0000}, {-1,2,2,2,2,0.0035,0.0000,0.0000,-0.0014,0.0000,0.0000}, {3,1,2,-2,2,0.0032,0.0000,0.0000,-0.0013,0.0000,0.0000}, {0,-1,0,4,0,0.0065,0.0000,0.0000,-0.0002,0.0000,0.0000}, {2,-1,0,2,0,0.0047,0.0000,0.0000,-0.0001,0.0000,0.0000}, {0,0,4,0,1,0.0032,0.0000,0.0000,-0.0016,0.0000,0.0000}, {2,0,4,-2,2,0.0037,0.0000,0.0000,-0.0016,0.0000,0.0000}, {-1,-1,2,4,1,-0.0030,0.0000,0.0000,0.0015,0.0000,0.0000}, {1,0,0,4,1,-0.0032,0.0000,0.0000,0.0016,0.0000,0.0000}, {1,-2,2,2,2,-0.0031,0.0000,0.0000,0.0013,0.0000,0.0000}, {0,0,2,3,2,0.0037,0.0000,0.0000,-0.0016,0.0000,0.0000}, {-1,1,2,4,2,0.0031,0.0000,0.0000,-0.0013,0.0000,0.0000}, {3,0,0,2,0,0.0049,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,0,4,2,2,0.0032,0.0000,0.0000,-0.0013,0.0000,0.0000}, {1,1,2,2,1,0.0023,0.0000,0.0000,-0.0012,0.0000,0.0000}, {-2,0,2,6,2,-0.0043,0.0000,0.0000,0.0018,0.0000,0.0000}, {2,1,2,2,2,0.0026,0.0000,0.0000,-0.0011,0.0000,0.0000}, {-1,0,2,6,2,-0.0032,0.0000,0.0000,0.0014,0.0000,0.0000}, {1,0,2,4,1,-0.0029,0.0000,0.0000,0.0014,0.0000,0.0000}, {2,0,2,4,2,-0.0027,0.0000,0.0000,0.0012,0.0000,0.0000}, {1,1,-2,1,0,0.0030,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,1,2,1,2,-0.0011,0.0000,0.0000,0.0005,0.0000,0.0000}, {2,0,-2,0,2,-0.0021,0.0000,0.0000,0.0010,0.0000,0.0000}, {-1,0,0,1,2,-0.0034,0.0000,0.0000,0.0015,0.0000,0.0000}, {-4,0,2,2,1,-0.0010,0.0000,0.0000,0.0006,0.0000,0.0000}, {-1,-1,0,1,0,-0.0036,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,-2,2,2,-0.0009,0.0000,0.0000,0.0004,0.0000,0.0000}, {1,0,0,-1,2,-0.0012,0.0000,0.0000,0.0005,0.0000,0.0000}, {0,-1,2,-2,3,-0.0021,0.0000,0.0000,0.0005,0.0000,0.0000}, {-2,1,2,0,0,-0.0029,0.0000,0.0000,-0.0001,0.0000,0.0000}, {0,0,2,-2,4,-0.0015,0.0000,0.0000,0.0003,0.0000,0.0000}, {-2,-2,0,2,0,-0.0020,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,0,-2,4,0,0.0028,0.0000,0.0000,0.0000,0.0000,-0.0002}, {0,-2,-2,2,0,0.0017,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,2,0,-2,1,-0.0022,0.0000,0.0000,0.0012,0.0000,0.0000}, {3,0,0,-4,1,-0.0014,0.0000,0.0000,0.0007,0.0000,0.0000}, {-1,1,2,-2,2,0.0024,0.0000,0.0000,-0.0011,0.0000,0.0000}, {1,-1,2,-4,1,0.0011,0.0000,0.0000,-0.0006,0.0000,0.0000}, {1,1,0,-2,2,0.0014,0.0000,0.0000,-0.0006,0.0000,0.0000}, {-3,0,2,0,0,0.0024,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,0,2,0,2,0.0018,0.0000,0.0000,-0.0008,0.0000,0.0000}, {-2,0,0,1,0,-0.0038,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,-2,1,0,-0.0031,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,0,0,2,1,-0.0016,0.0000,0.0000,0.0008,0.0000,0.0000}, {-1,-1,-2,2,0,0.0029,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,2,-4,1,-0.0018,0.0000,0.0000,0.0010,0.0000,0.0000}, {2,1,0,-4,1,-0.0010,0.0000,0.0000,0.0005,0.0000,0.0000}, {0,2,0,-2,1,-0.0017,0.0000,0.0000,0.0010,0.0000,0.0000}, {1,0,0,-3,1,0.0009,0.0000,0.0000,-0.0004,0.0000,0.0000}, {-2,0,2,-2,2,0.0016,0.0000,0.0000,-0.0006,0.0000,0.0000}, {-2,-1,0,0,1,0.0022,0.0000,0.0000,-0.0012,0.0000,0.0000}, {-4,0,0,2,0,0.0020,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,1,0,-4,1,-0.0013,0.0000,0.0000,0.0006,0.0000,0.0000}, {-1,0,2,-4,1,-0.0017,0.0000,0.0000,0.0009,0.0000,0.0000}, {0,0,4,-4,1,-0.0014,0.0000,0.0000,0.0008,0.0000,0.0000}, {0,3,2,-2,2,0.0000,0.0000,0.0000,-0.0007,0.0000,0.0000}, {-3,-1,0,4,0,0.0014,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,0,0,4,1,0.0019,0.0000,0.0000,-0.0010,0.0000,0.0000}, {1,-1,-2,2,0,-0.0034,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,0,2,2,-0.0020,0.0000,0.0000,0.0008,0.0000,0.0000}, {1,-2,0,0,1,0.0009,0.0000,0.0000,-0.0005,0.0000,0.0000}, {1,-1,0,0,2,-0.0018,0.0000,0.0000,0.0007,0.0000,0.0000}, {0,0,0,1,2,0.0013,0.0000,0.0000,-0.0006,0.0000,0.0000}, {-1,-1,2,0,0,0.0017,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,-2,2,-2,2,-0.0012,0.0000,0.0000,0.0005,0.0000,0.0000}, {0,-1,2,-1,1,0.0015,0.0000,0.0000,-0.0008,0.0000,0.0000}, {-1,0,2,0,3,-0.0011,0.0000,0.0000,0.0003,0.0000,0.0000}, {1,1,0,0,2,0.0013,0.0000,0.0000,-0.0005,0.0000,0.0000}, {-1,1,2,0,0,-0.0018,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,2,0,0,0,-0.0035,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,2,2,0,2,0.0009,0.0000,0.0000,-0.0004,0.0000,0.0000}, {-1,0,4,-2,1,-0.0019,0.0000,0.0000,0.0010,0.0000,0.0000}, {3,0,2,-4,2,-0.0026,0.0000,0.0000,0.0011,0.0000,0.0000}, {1,2,2,-2,1,0.0008,0.0000,0.0000,-0.0004,0.0000,0.0000}, {1,0,4,-4,2,-0.0010,0.0000,0.0000,0.0004,0.0000,0.0000}, {-2,-1,0,4,1,0.0010,0.0000,0.0000,-0.0006,0.0000,0.0000}, {0,-1,0,2,2,-0.0021,0.0000,0.0000,0.0009,0.0000,0.0000}, {-2,1,0,4,0,-0.0015,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,-1,2,2,1,0.0009,0.0000,0.0000,-0.0005,0.0000,0.0000}, {2,0,-2,2,0,-0.0029,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,0,1,1,-0.0019,0.0000,0.0000,0.0010,0.0000,0.0000}, {0,1,0,2,2,0.0012,0.0000,0.0000,-0.0005,0.0000,0.0000}, {1,-1,2,-1,2,0.0022,0.0000,0.0000,-0.0009,0.0000,0.0000}, {-2,0,4,0,1,-0.0010,0.0000,0.0000,0.0005,0.0000,0.0000}, {2,1,0,0,1,-0.0020,0.0000,0.0000,0.0011,0.0000,0.0000}, {0,1,2,0,0,-0.0020,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,-1,4,-2,2,-0.0017,0.0000,0.0000,0.0007,0.0000,0.0000}, {0,0,4,-2,4,0.0015,0.0000,0.0000,-0.0003,0.0000,0.0000}, {0,2,2,0,1,0.0008,0.0000,0.0000,-0.0004,0.0000,0.0000}, {-3,0,0,6,0,0.0014,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,0,4,1,-0.0012,0.0000,0.0000,0.0006,0.0000,0.0000}, {1,-2,0,2,0,0.0025,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,0,0,4,2,-0.0013,0.0000,0.0000,0.0006,0.0000,0.0000}, {-1,-2,2,2,1,-0.0014,0.0000,0.0000,0.0008,0.0000,0.0000}, {-1,0,0,-2,2,0.0013,0.0000,0.0000,-0.0005,0.0000,0.0000}, {1,0,-2,-2,1,-0.0017,0.0000,0.0000,0.0009,0.0000,0.0000}, {0,0,-2,-2,1,-0.0012,0.0000,0.0000,0.0006,0.0000,0.0000}, {-2,0,-2,0,1,-0.0010,0.0000,0.0000,0.0005,0.0000,0.0000}, {0,0,0,3,1,0.0010,0.0000,0.0000,-0.0006,0.0000,0.0000}, {0,0,0,3,0,-0.0015,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,1,0,4,0,-0.0022,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,2,2,0,0.0028,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-2,0,2,3,2,0.0015,0.0000,0.0000,-0.0007,0.0000,0.0000}, {1,0,0,2,2,0.0023,0.0000,0.0000,-0.0010,0.0000,0.0000}, {0,-1,2,1,2,0.0012,0.0000,0.0000,-0.0005,0.0000,0.0000}, {3,-1,0,0,0,0.0029,0.0000,0.0000,-0.0001,0.0000,0.0000}, {2,0,0,1,0,-0.0025,0.0000,0.0000,0.0001,0.0000,0.0000}, {1,-1,2,0,0,0.0022,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,2,1,0,-0.0018,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,2,0,3,0.0015,0.0000,0.0000,0.0003,0.0000,0.0000}, {3,1,0,0,0,-0.0023,0.0000,0.0000,0.0000,0.0000,0.0000}, {3,-1,2,-2,2,0.0012,0.0000,0.0000,-0.0005,0.0000,0.0000}, {2,0,2,-1,1,-0.0008,0.0000,0.0000,0.0004,0.0000,0.0000}, {1,1,2,0,0,-0.0019,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,4,-1,2,-0.0010,0.0000,0.0000,0.0004,0.0000,0.0000}, {1,2,2,0,2,0.0021,0.0000,0.0000,-0.0009,0.0000,0.0000}, {-2,0,0,6,0,0.0023,0.0000,0.0000,-0.0001,0.0000,0.0000}, {0,-1,0,4,1,-0.0016,0.0000,0.0000,0.0008,0.0000,0.0000}, {-2,-1,2,4,1,-0.0019,0.0000,0.0000,0.0009,0.0000,0.0000}, {0,-2,2,2,1,-0.0022,0.0000,0.0000,0.0010,0.0000,0.0000}, {0,-1,2,2,0,0.0027,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-1,0,2,3,1,0.0016,0.0000,0.0000,-0.0008,0.0000,0.0000}, {-2,1,2,4,2,0.0019,0.0000,0.0000,-0.0008,0.0000,0.0000}, {2,0,0,2,2,0.0009,0.0000,0.0000,-0.0004,0.0000,0.0000}, {2,-2,2,0,2,-0.0009,0.0000,0.0000,0.0004,0.0000,0.0000}, {-1,1,2,3,2,-0.0009,0.0000,0.0000,0.0004,0.0000,0.0000}, {3,0,2,-1,2,-0.0008,0.0000,0.0000,0.0004,0.0000,0.0000}, {4,0,2,-2,1,0.0018,0.0000,0.0000,-0.0009,0.0000,0.0000}, {-1,0,0,6,0,0.0016,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-1,-2,2,4,2,-0.0010,0.0000,0.0000,0.0004,0.0000,0.0000}, {-3,0,2,6,2,-0.0023,0.0000,0.0000,0.0009,0.0000,0.0000}, {-1,0,2,4,0,0.0016,0.0000,0.0000,-0.0001,0.0000,0.0000}, {3,0,0,2,1,-0.0012,0.0000,0.0000,0.0006,0.0000,0.0000}, {3,-1,2,0,1,-0.0008,0.0000,0.0000,0.0004,0.0000,0.0000}, {3,0,2,0,0,0.0030,0.0000,0.0000,-0.0002,0.0000,0.0000}, {1,0,4,0,2,0.0024,0.0000,0.0000,-0.0010,0.0000,0.0000}, {5,0,2,-2,2,0.0010,0.0000,0.0000,-0.0004,0.0000,0.0000}, {0,-1,2,4,1,-0.0016,0.0000,0.0000,0.0007,0.0000,0.0000}, {2,-1,2,2,1,-0.0016,0.0000,0.0000,0.0007,0.0000,0.0000}, {0,1,2,4,2,0.0017,0.0000,0.0000,-0.0007,0.0000,0.0000}, {1,-1,2,4,2,-0.0024,0.0000,0.0000,0.0010,0.0000,0.0000}, {3,-1,2,2,2,-0.0012,0.0000,0.0000,0.0005,0.0000,0.0000}, {3,0,2,2,1,-0.0024,0.0000,0.0000,0.0011,0.0000,0.0000}, {5,0,2,0,2,-0.0023,0.0000,0.0000,0.0009,0.0000,0.0000}, {0,0,2,6,2,-0.0013,0.0000,0.0000,0.0005,0.0000,0.0000}, {4,0,2,2,2,-0.0015,0.0000,0.0000,0.0007,0.0000,0.0000}, {0,-1,1,-1,1,0.0000,0.0000,-0.1988,0.0000,0.0000,-0.1679}, {-1,0,1,0,3,0.0000,0.0000,-0.0063,0.0000,0.0000,-0.0027}, {0,-2,2,-2,3,-0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,-1,0,1,0.0000,0.0000,0.0005,0.0000,0.0000,0.0004}, {2,-2,0,-2,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {-1,0,1,0,2,0.0000,0.0000,0.0364,0.0000,0.0000,0.0176}, {-1,0,1,0,1,0.0000,0.0000,-0.1044,0.0000,0.0000,-0.0891}, {-1,-1,2,-1,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {-2,2,0,2,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,0,1,0,0,0.0000,0.0000,0.0330,0.0000,0.0000,0.0000}, {-4,1,2,2,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-3,0,2,1,1,0.0003,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-2,-1,2,0,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {1,0,-2,1,1,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,-1,-2,0,1,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-4,0,2,2,0,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,1,0,3,0,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,0,-1,2,0,0.0000,0.0000,0.0005,0.0000,0.0000,0.0000}, {0,-2,0,0,2,0.0000,0.0000,0.0000,0.0001,0.0000,0.0000}, {0,-2,0,0,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-3,0,0,3,0,0.0006,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,-1,0,2,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,0,-2,3,0,-0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {-4,0,0,4,0,-0.0012,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,1,-2,0,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {2,-1,0,-2,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {0,0,1,-1,0,-0.0005,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,2,0,1,0,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,1,2,0,2,-0.0007,0.0000,0.0000,0.0003,0.0000,0.0000}, {1,1,0,-1,1,0.0007,0.0000,0.0000,-0.0004,0.0000,0.0000}, {1,0,1,-2,1,0.0000,0.0000,-0.0012,0.0000,0.0000,-0.0010}, {0,2,0,0,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {1,-1,2,-3,1,0.0003,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,1,2,-1,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,0,4,-2,2,-0.0007,0.0000,0.0000,0.0003,0.0000,0.0000}, {-2,0,4,-2,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,-2,0,2,1,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {-2,0,-2,4,0,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,2,2,-4,1,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {1,1,2,-4,2,0.0007,0.0000,0.0000,-0.0003,0.0000,0.0000}, {-1,2,2,-2,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,0,0,-3,1,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,2,0,0,1,-0.0005,0.0000,0.0000,0.0003,0.0000,0.0000}, {0,0,0,-2,0,0.0005,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,2,-2,2,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,1,0,0,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,0,0,-1,2,-0.0008,0.0000,0.0000,0.0003,0.0000,0.0000}, {-2,1,0,1,0,0.0009,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,-2,0,-2,1,0.0006,0.0000,0.0000,-0.0003,0.0000,0.0000}, {1,0,-2,0,2,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {-3,1,0,2,0,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,1,-2,2,0,-0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,0,0,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {-3,0,0,2,0,0.0005,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,-1,0,2,0,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,0,2,-6,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,1,2,-4,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {2,0,0,-4,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-2,1,2,-2,1,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,-1,2,-4,1,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,1,0,-2,2,0.0009,0.0000,0.0000,-0.0003,0.0000,0.0000}, {-1,0,0,-2,0,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,0,-2,-2,1,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-4,0,2,0,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,-1,0,-1,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,-2,0,2,0.0009,0.0000,0.0000,-0.0003,0.0000,0.0000}, {-3,0,0,1,0,-0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,0,-2,1,0,-0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,0,-2,2,1,0.0003,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,0,-4,2,0,0.0008,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,-1,-2,2,0,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,2,-6,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,0,2,-4,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {1,0,0,-4,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {2,1,2,-4,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {2,1,2,-4,1,0.0006,0.0000,0.0000,-0.0003,0.0000,0.0000}, {0,1,4,-4,4,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,4,-4,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {-1,-1,-2,4,0,-0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-3,0,2,0,0.0009,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,0,-2,4,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,-1,0,3,0,-0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,-2,3,0,-0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,0,0,3,1,-0.0005,0.0000,0.0000,0.0003,0.0000,0.0000}, {0,-1,0,1,0,-0.0013,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,0,2,2,0,-0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,1,-2,2,0,0.0010,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,1,0,2,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {1,-2,2,-2,1,0.0010,0.0000,0.0013,0.0006,0.0000,-0.0005}, {0,0,1,0,2,0.0000,0.0000,0.0030,0.0000,0.0000,0.0014}, {0,0,1,0,1,0.0000,0.0000,-0.0162,0.0000,0.0000,-0.0138}, {0,0,1,0,0,0.0000,0.0000,0.0075,0.0000,0.0000,0.0000}, {-1,2,0,2,1,-0.0007,0.0000,0.0000,0.0004,0.0000,0.0000}, {0,0,2,0,2,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,0,2,0,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {2,0,0,-1,1,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {3,0,0,-2,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {1,0,2,-2,3,-0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,2,0,0,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,0,2,-3,2,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,1,4,-2,2,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,-2,0,4,0,0.0006,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,-3,0,2,0,0.0009,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,-2,4,0,0.0005,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,0,3,0,-0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,0,0,4,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {-1,0,0,3,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,-2,0,0,0,0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,-1,0,1,0,-0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,0,0,2,0,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,-2,2,0,1,-0.0006,0.0000,-0.0003,0.0003,0.0000,0.0001}, {-1,0,1,2,1,0.0000,0.0000,-0.0003,0.0000,0.0000,-0.0002}, {-1,1,0,3,0,0.0011,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-1,2,1,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {0,-1,2,0,0,0.0011,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,1,2,2,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,-2,2,-2,2,-0.0001,0.0000,0.0003,0.0003,0.0000,-0.0001}, {1,1,0,1,1,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {1,0,1,0,1,0.0000,0.0000,-0.0013,0.0000,0.0000,-0.0011}, {1,0,1,0,0,0.0003,0.0000,0.0006,0.0000,0.0000,0.0000}, {0,2,0,2,0,-0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,-1,2,-2,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {0,-1,4,-2,1,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {0,0,4,-2,3,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,4,-2,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {4,0,2,-4,2,-0.0007,0.0000,0.0000,0.0003,0.0000,0.0000}, {2,2,2,-2,2,0.0008,0.0000,0.0000,-0.0003,0.0000,0.0000}, {2,0,4,-4,2,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,-2,0,4,0,0.0011,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,-3,2,2,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {-3,0,2,4,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-3,0,2,-2,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,-1,0,-2,1,0.0008,0.0000,0.0000,-0.0004,0.0000,0.0000}, {-3,0,0,0,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-3,0,-2,2,0,0.0011,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,0,-4,1,-0.0006,0.0000,0.0000,0.0003,0.0000,0.0000}, {-2,1,0,-2,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-4,0,0,0,1,-0.0008,0.0000,0.0000,0.0004,0.0000,0.0000}, {-1,0,0,-4,1,-0.0007,0.0000,0.0000,0.0003,0.0000,0.0000}, {-3,0,0,-2,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,0,3,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-1,1,0,4,1,0.0006,0.0000,0.0000,-0.0003,0.0000,0.0000}, {1,-2,2,0,1,-0.0006,0.0000,0.0000,0.0003,0.0000,0.0000}, {0,1,0,3,0,0.0006,0.0000,0.0000,0.0000,0.0000,0.0000}, {-1,0,2,2,3,0.0006,0.0000,0.0000,-0.0001,0.0000,0.0000}, {0,0,2,2,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-2,0,2,2,2,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,1,2,2,0,-0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {3,0,0,0,2,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,1,0,1,0,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,-1,2,-1,2,0.0006,0.0000,0.0000,-0.0003,0.0000,0.0000}, {0,0,2,0,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,3,0,3,0.0000,0.0000,-0.0026,0.0000,0.0000,-0.0011}, {0,0,3,0,2,0.0000,0.0000,-0.0010,0.0000,0.0000,-0.0005}, {-1,2,2,2,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {-1,0,4,0,0,-0.0013,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,2,2,0,1,0.0003,0.0000,0.0000,-0.0002,0.0000,0.0000}, {3,1,2,-2,1,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {1,1,4,-2,2,0.0007,0.0000,0.0000,-0.0003,0.0000,0.0000}, {-2,-1,0,6,0,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,-2,0,4,0,0.0005,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,0,0,6,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,-2,2,4,2,-0.0006,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,-3,2,2,2,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,0,4,2,-0.0007,0.0000,0.0000,0.0003,0.0000,0.0000}, {-1,-1,2,3,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-2,0,2,4,0,0.0013,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,-1,0,2,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {1,0,0,3,0,-0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,0,4,1,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,1,0,4,0,-0.0011,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,-1,2,1,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,0,2,2,3,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,2,2,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,0,2,2,2,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-2,0,4,2,1,0.0006,0.0000,0.0000,-0.0003,0.0000,0.0000}, {2,1,0,2,1,0.0003,0.0000,0.0000,-0.0002,0.0000,0.0000}, {2,1,0,2,0,-0.0012,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,-1,2,0,0,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,2,1,0,-0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,1,2,2,0,-0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,0,2,0,3,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {3,0,2,0,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {1,0,2,0,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {1,0,3,0,3,0.0000,0.0000,-0.0005,0.0000,0.0000,-0.0002}, {1,1,2,1,1,-0.0007,0.0000,0.0000,0.0004,0.0000,0.0000}, {0,2,2,2,2,0.0006,0.0000,0.0000,-0.0003,0.0000,0.0000}, {2,1,2,0,0,-0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,0,4,-2,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {4,1,2,-2,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {-1,-1,0,6,0,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000}, {-3,-1,2,6,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {-1,0,0,6,1,-0.0005,0.0000,0.0000,0.0003,0.0000,0.0000}, {-3,0,2,6,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {1,-1,0,4,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {1,-1,0,4,0,0.0012,0.0000,0.0000,0.0000,0.0000,0.0000}, {-2,0,2,5,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {1,-2,2,2,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {3,-1,0,2,0,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,-1,2,2,0,0.0006,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,2,3,1,0.0005,0.0000,0.0000,-0.0003,0.0000,0.0000}, {-1,1,2,4,1,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {0,1,2,3,2,-0.0006,0.0000,0.0000,0.0003,0.0000,0.0000}, {-1,0,4,2,1,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {2,0,2,1,1,0.0006,0.0000,0.0000,-0.0003,0.0000,0.0000}, {5,0,0,0,0,0.0006,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,1,2,1,2,-0.0006,0.0000,0.0000,0.0003,0.0000,0.0000}, {1,0,4,0,1,0.0003,0.0000,0.0000,-0.0002,0.0000,0.0000}, {3,1,2,0,1,0.0007,0.0000,0.0000,-0.0004,0.0000,0.0000}, {3,0,4,-2,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-2,-1,2,6,2,-0.0005,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,0,6,0,0.0005,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,-2,2,4,2,-0.0006,0.0000,0.0000,0.0003,0.0000,0.0000}, {-2,0,2,6,1,-0.0006,0.0000,0.0000,0.0003,0.0000,0.0000}, {2,0,0,4,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {2,0,0,4,0,0.0010,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,-2,2,2,2,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,2,4,0,0.0007,0.0000,0.0000,0.0000,0.0000,0.0000}, {1,0,2,3,2,0.0007,0.0000,0.0000,-0.0003,0.0000,0.0000}, {4,0,0,2,0,0.0004,0.0000,0.0000,0.0000,0.0000,0.0000}, {2,0,2,2,0,0.0011,0.0000,0.0000,0.0000,0.0000,0.0000}, {0,0,4,2,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {4,-1,2,0,2,-0.0006,0.0000,0.0000,0.0002,0.0000,0.0000}, {3,0,2,1,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {2,1,2,2,1,0.0003,0.0000,0.0000,-0.0002,0.0000,0.0000}, {4,1,2,0,2,0.0005,0.0000,0.0000,-0.0002,0.0000,0.0000}, {-1,-1,2,6,2,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {-1,0,2,6,1,-0.0004,0.0000,0.0000,0.0002,0.0000,0.0000}, {1,-1,2,4,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {1,1,2,4,2,0.0004,0.0000,0.0000,-0.0002,0.0000,0.0000}, {3,1,2,2,2,0.0003,0.0000,0.0000,-0.0001,0.0000,0.0000}, {5,0,2,0,1,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {2,-1,2,4,2,-0.0003,0.0000,0.0000,0.0001,0.0000,0.0000}, {2,0,2,4,1,-0.0003,0.0000,0.0000,0.0002,0.0000,0.0000}, {0,0,0,0,0,0,0,0,0,0,0} }; struct ge2000a_term2 ge2000a_planetary[] = { {0,0,2,0,-2,0,0,0,0,0,0,2,2,2,0.0003,0.0000,0.0000,-0.0001}, {0,1,-1,0,0,0,0,0,0,1,0,2,0,2,0.0003,0.0000,0.0000,-0.0001}, {0,3,-3,0,0,0,0,0,0,-1,0,2,2,2,0.0007,0.0000,0.0000,-0.0003}, {0,0,2,0,-2,0,0,0,0,-1,0,2,2,2,0.0013,0.0000,0.0000,-0.0006}, {0,0,1,0,0,0,0,0,0,2,0,2,0,1,0.0004,0.0000,-0.0001,-0.0002}, {0,0,1,0,0,0,0,0,0,0,0,2,0,2,-0.0024,-0.0012,-0.0005,0.0010}, {0,0,1,0,0,0,0,0,0,1,0,1,1,1,0.0000,0.0003,0.0002,0.0000}, {0,0,4,-8,3,0,0,0,0,1,0,2,0,2,0.0000,0.0003,0.0001,0.0000}, {0,0,-4,8,-3,0,0,0,0,1,0,2,0,2,0.0000,0.0003,0.0001,0.0000}, {0,0,2,0,-3,0,0,0,0,2,0,2,0,2,0.0024,-0.0012,-0.0005,-0.0011}, {0,0,2,0,-3,0,0,0,0,-1,0,2,2,2,-0.0005,0.0000,0.0000,0.0002}, {0,-1,1,0,0,0,0,0,0,1,0,2,0,2,-0.0003,0.0000,0.0000,0.0001}, {0,0,-1,0,1,0,0,0,0,-1,0,2,2,2,0.0003,0.0000,0.0000,-0.0001}, {0,2,-2,0,0,0,0,0,0,0,0,2,0,2,-0.0003,0.0000,0.0000,0.0001}, {0,0,1,0,-1,0,0,0,0,0,0,2,0,2,-0.0006,0.0000,0.0000,0.0003}, {0,1,-1,0,0,0,0,0,0,0,0,2,0,2,0.0008,0.0000,0.0000,-0.0004}, {0,2,-3,0,0,0,0,0,0,0,0,2,0,2,0.0000,0.0003,0.0001,0.0000}, {0,0,2,0,-2,0,0,0,0,-2,0,2,2,2,-0.0003,0.0000,0.0000,0.0001}, {0,0,1,0,0,0,0,0,0,-1,0,2,0,1,-0.0021,-0.0011,-0.0006,0.0011}, {0,0,1,0,0,0,0,0,0,0,0,1,1,0,0.0000,-0.0004,0.0000,0.0000}, {0,0,-2,0,3,0,0,0,0,1,0,2,0,1,0.0021,-0.0011,-0.0006,-0.0011}, {0,0,-2,0,3,0,0,0,0,2,0,2,-2,2,0.0003,0.0000,0.0000,-0.0001}, {0,0,-4,8,-3,0,0,0,0,-1,0,2,0,2,-0.0126,-0.0063,-0.0027,0.0055}, {0,0,-4,8,-3,0,0,0,0,0,0,2,0,2,0.0000,0.0009,0.0004,-0.0001}, {0,0,4,-8,3,0,0,0,0,0,0,2,0,2,0.0000,0.0009,0.0004,0.0001}, {0,0,1,0,0,0,0,0,0,1,0,2,0,2,0.0005,0.0000,0.0001,-0.0002}, {0,0,1,0,0,0,0,0,0,0,0,1,1,1,-0.0003,0.0028,0.0015,0.0002}, {0,10,-3,0,0,0,0,0,0,-1,0,2,0,2,-0.0005,0.0000,0.0001,0.0002}, {0,0,1,0,0,0,0,0,0,1,0,2,0,2,0.0126,-0.0063,-0.0027,-0.0055}, {0,0,1,0,0,0,0,0,0,0,0,1,1,2,0.0000,-0.0003,-0.0002,0.0000}, {0,0,2,0,-2,0,0,0,0,0,0,0,2,0,-0.0003,0.0000,0.0000,0.0000}, {0,-2,3,0,0,0,0,0,0,0,0,2,0,2,0.0000,0.0003,0.0001,0.0000}, {0,-1,1,0,0,0,0,0,0,0,0,2,0,2,-0.0008,0.0000,0.0000,0.0003}, {0,0,-1,0,1,0,0,0,0,0,0,2,0,2,0.0006,0.0000,0.0000,-0.0003}, {0,-2,2,0,0,0,0,0,0,0,0,2,0,2,0.0003,0.0000,0.0000,-0.0001}, {0,0,1,0,-1,0,0,0,0,0,0,0,-2,0,0.0004,0.0000,0.0000,0.0000}, {0,2,-2,0,0,0,0,0,0,0,0,0,-2,0,0.0003,0.0000,0.0000,0.0000}, {0,0,1,0,-1,0,0,0,0,1,0,0,0,0,0.0003,0.0000,0.0000,0.0000}, {0,1,-1,0,0,0,0,0,0,1,0,0,0,0,-0.0004,0.0000,0.0000,0.0000}, {0,0,-2,0,2,0,0,0,0,1,0,2,-2,2,-0.0006,0.0000,0.0000,0.0003}, {0,-3,3,0,0,0,0,0,0,1,0,2,-2,2,-0.0003,0.0000,0.0000,0.0001}, {0,0,-2,0,2,0,0,0,0,1,0,0,-2,1,0.0003,0.0000,0.0000,-0.0002}, {0,3,-3,0,0,0,0,0,0,-1,0,0,2,0,-0.0019,0.0000,0.0000,0.0000}, {0,0,2,0,-2,0,0,0,0,-1,0,0,2,0,-0.0034,0.0000,0.0000,0.0000}, {0,0,2,0,-2,0,0,0,0,0,0,0,0,0,0.0020,0.0010,0.0000,0.0000}, {0,0,2,0,-2,0,0,0,0,-1,0,0,2,1,-0.0003,0.0000,0.0000,0.0002}, {0,0,4,-8,3,0,0,0,0,-1,0,0,0,0,0.0000,-0.0005,0.0000,0.0000}, {0,0,-1,0,0,0,0,0,0,1,0,1,-1,1,0.0000,0.0005,0.0003,0.0000}, {0,0,-1,0,0,0,0,0,0,-1,0,1,-1,1,0.0000,-0.0005,-0.0002,0.0000}, {0,0,4,-8,3,0,0,0,0,1,0,0,0,0,0.0000,-0.0005,0.0000,0.0000}, {0,0,2,0,-3,0,0,0,0,-2,0,0,0,0,0.0021,0.0011,0.0000,0.0000}, {0,0,2,0,-3,0,0,0,0,-1,0,0,2,0,0.0013,0.0000,0.0000,0.0000}, {0,0,1,0,0,0,0,0,0,1,0,-1,1,0,0.0000,0.0003,0.0000,0.0000}, {0,2,-2,0,0,0,0,0,0,-1,0,0,2,0,0.0004,0.0000,0.0000,0.0000}, {0,1,-1,0,0,0,0,0,0,-1,0,0,0,0,-0.0005,0.0000,0.0000,0.0000}, {0,0,1,0,-1,0,0,0,0,-1,0,0,0,0,0.0004,0.0000,0.0000,0.0000}, {0,0,2,0,-3,0,0,0,0,-1,0,0,0,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,4,-8,3,0,0,0,0,-2,0,0,2,0,0.0005,0.0000,0.0000,0.0000}, {0,0,4,-8,3,0,0,0,0,1,0,0,-2,0,0.0000,-0.0004,0.0000,0.0000}, {0,0,4,-8,3,0,0,0,0,-1,0,0,2,0,0.0000,-0.0004,0.0000,0.0000}, {0,0,2,0,-2,0,0,0,0,-1,0,0,0,0,0.0006,0.0000,0.0000,0.0000}, {0,3,-3,0,0,0,0,0,0,-1,0,0,0,0,0.0004,0.0000,0.0000,0.0000}, {0,1,-1,0,0,0,0,0,0,1,0,0,-2,0,-0.0004,0.0000,0.0000,0.0000}, {0,0,1,0,-1,0,0,0,0,1,0,0,-2,0,0.0007,0.0000,0.0000,0.0000}, {0,2,-2,0,0,0,0,0,0,1,0,0,-2,0,0.0006,0.0000,0.0000,0.0000}, {0,0,2,0,-2,0,0,0,0,1,0,0,-2,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,0,0,0,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,0,6,0,0,0,0,0,2,0,0,0,0,0,0.0005,0.0000,0.0000,-0.0002}, {0,0,6,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0003,0.0001,0.0000}, {0,0,6,0,0,0,0,0,0,0,0,0,0,0,0.0006,0.0000,0.0000,0.0000}, {0,0,6,0,0,0,0,0,2,0,0,0,0,0,0.0006,0.0000,0.0000,-0.0003}, {0,0,6,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0004,0.0002,0.0000}, {0,0,6,0,0,0,0,0,0,0,0,0,0,0,0.0008,0.0000,0.0000,0.0000}, {0,0,6,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0000,0.0000,-0.0004}, {0,0,6,0,0,0,0,0,2,0,0,0,0,0,0.0002,0.0009,0.0004,0.0003}, {0,6,-4,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0003,-0.0002,0.0000}, {0,9,-9,0,0,0,0,0,0,0,0,0,0,0,0.0013,0.0000,0.0000,0.0000}, {0,-9,9,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0005,0.0003,0.0000}, {0,-9,9,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0000,0.0000,-0.0005}, {0,-9,9,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0000,-0.0001,0.0000}, {0,5,-3,0,0,0,0,0,2,0,0,0,0,0,0.0014,-0.0003,0.0000,-0.0001}, {0,5,-3,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0005,-0.0003,0.0000}, {0,8,-8,0,0,0,0,0,0,0,0,0,0,0,0.0019,0.0000,0.0000,0.0000}, {0,-8,8,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0007,0.0004,0.0000}, {0,3,0,0,0,0,0,0,2,0,0,0,0,0,0.0017,-0.0003,-0.0001,0.0000}, {0,0,5,0,-2,0,0,0,2,0,0,0,0,0,0.0003,0.0012,0.0005,-0.0001}, {0,0,5,0,-3,0,0,0,2,0,0,0,0,0,-0.0009,0.0000,0.0001,0.0004}, {0,0,5,0,-4,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,4,-2,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0003,0.0000,0.0000}, {0,4,-2,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0000,-0.0002,0.0000}, {0,4,-2,0,0,0,0,0,2,0,0,0,0,0,0.0008,-0.0004,0.0000,-0.0004}, {0,4,-2,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0007,-0.0004,0.0000}, {0,7,-7,0,0,0,0,0,0,0,0,0,0,0,0.0028,0.0000,0.0000,0.0000}, {0,-7,7,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0009,0.0005,-0.0001}, {0,2,1,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0003,0.0002,0.0000}, {0,2,1,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0000,0.0000,-0.0010}, {0,2,1,0,0,0,0,0,2,0,0,0,0,0,0.0019,-0.0023,-0.0010,0.0002}, {0,5,-4,0,0,0,0,0,2,0,0,0,0,0,0.0000,0.0003,0.0001,0.0000}, {0,8,-9,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0004,0.0000,0.0000}, {0,0,4,0,0,0,0,0,0,0,0,0,0,0,0.0003,-0.0004,0.0000,0.0000}, {0,0,5,-2,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0008,-0.0004,0.0000}, {0,0,4,0,0,-2,0,0,2,0,0,0,0,0,-0.0007,0.0000,0.0000,0.0003}, {0,0,4,0,-1,0,0,0,2,0,0,0,0,0,-0.0003,-0.0032,-0.0014,0.0001}, {0,3,-1,0,0,0,0,0,2,0,0,0,0,0,0.0031,-0.0006,0.0000,-0.0013}, {0,3,-1,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0010,-0.0006,-0.0001}, {0,3,-1,0,0,0,0,0,0,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,6,-4,0,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,0,4,0,-2,0,0,0,2,0,0,0,0,0,-0.0184,-0.0003,-0.0001,0.0080}, {0,6,-6,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0003,-0.0002,0.0000}, {0,6,-6,0,0,0,0,0,0,0,0,0,0,0,0.0040,0.0000,0.0000,0.0000}, {0,-6,6,0,0,0,0,0,1,0,0,0,0,0,0.0003,0.0013,0.0007,-0.0002}, {0,0,4,0,-3,0,0,0,2,0,0,0,0,0,-0.0037,-0.0007,-0.0003,0.0016}, {0,0,4,0,-4,0,0,0,2,0,0,0,0,0,-0.0005,0.0000,0.0000,0.0002}, {0,-9,11,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0005,0.0003,0.0000}, {0,-9,11,0,0,0,0,0,2,0,0,0,0,0,0.0034,0.0000,0.0000,-0.0015}, {0,1,2,0,0,0,0,0,2,0,0,0,0,0,0.0004,0.0017,0.0007,-0.0002}, {0,4,-3,0,0,0,0,0,2,0,0,0,0,0,0.0000,0.0009,0.0004,0.0000}, {0,0,5,-3,0,0,0,0,2,0,0,0,0,0,-0.0010,0.0000,0.0000,0.0004}, {0,7,-8,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0006,0.0000,0.0000}, {0,0,6,-5,0,0,0,0,2,0,0,0,0,0,-0.0006,0.0003,0.0001,0.0003}, {0,0,7,-7,0,0,0,0,2,0,0,0,0,0,0.0000,0.0003,0.0001,0.0000}, {0,0,7,-7,0,0,0,0,2,0,0,0,0,0,0.0000,0.0000,-0.0003,0.0000}, {0,2,0,0,0,0,0,0,2,0,0,0,0,0,0.0370,-0.0008,0.0000,-0.0160}, {0,2,0,0,0,0,0,0,1,0,0,0,0,0,0.0004,-0.0015,-0.0008,-0.0002}, {0,2,0,0,0,0,0,0,0,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0000}, {0,5,-5,0,0,0,0,0,2,0,0,0,0,0,-0.0008,0.0000,0.0000,0.0004}, {0,5,-5,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0004,-0.0002,0.0000}, {0,5,-5,0,0,0,0,0,0,0,0,0,0,0,0.0059,0.0000,0.0000,0.0000}, {0,-5,5,0,0,0,0,0,1,0,0,0,0,0,0.0004,0.0017,0.0009,-0.0002}, {0,-3,8,0,0,0,0,0,2,0,0,0,0,0,0.0000,0.0004,0.0002,0.0000}, {0,0,3,0,1,0,0,0,2,0,0,0,0,0,-0.0005,-0.0011,-0.0005,0.0002}, {0,0,2,2,0,0,0,0,2,0,0,0,0,0,-0.0004,0.0004,0.0002,0.0002}, {0,-8,10,0,0,0,0,0,2,0,0,0,0,0,0.0000,0.0003,0.0001,0.0000}, {0,-8,10,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0007,0.0004,0.0000}, {0,-8,10,0,0,0,0,0,2,0,0,0,0,0,0.0050,0.0000,0.0000,-0.0022}, {0,0,-1,8,-3,0,0,0,2,0,0,0,0,0,-0.0022,0.0012,0.0005,0.0010}, {0,0,3,0,0,0,0,0,2,0,0,0,0,0,0.0000,0.0004,0.0002,0.0000}, {0,0,-5,16,-4,-5,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,0,7,-8,3,0,0,0,2,0,0,0,0,0,-0.0025,0.0000,0.0000,0.0011}, {0,0,3,0,2,-5,0,0,2,0,0,0,0,0,0.0005,0.0012,0.0005,-0.0002}, {0,-8,16,0,0,0,0,0,2,0,0,0,0,0,-0.0006,0.0000,0.0000,0.0003}, {0,0,1,0,-1,0,0,0,0,0,0,2,-2,1,-0.0004,0.0000,0.0000,0.0002}, {0,0,3,0,0,-1,0,0,2,0,0,0,0,0,0.0029,0.0000,0.0000,-0.0013}, {0,0,4,-2,0,0,0,0,2,0,0,0,0,0,0.0143,-0.0003,-0.0001,-0.0062}, {0,0,3,0,0,-2,0,0,2,0,0,0,0,0,0.0000,-0.0007,-0.0003,0.0000}, {0,0,3,0,-1,0,0,0,2,0,0,0,0,0,0.0517,0.0016,0.0007,-0.0224}, {0,0,3,0,-1,0,0,0,2,0,0,0,0,0,0.0000,0.0000,0.0000,0.0023}, {0,3,-2,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0114,-0.0050,0.0000}, {0,3,-2,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0000,0.0000,0.0000}, {0,0,5,-4,0,0,0,0,2,0,0,0,0,0,0.0030,-0.0018,-0.0008,-0.0013}, {0,0,3,0,-2,0,0,0,2,0,0,0,0,0,0.0067,-0.0091,-0.0039,-0.0029}, {0,0,3,0,-2,0,0,0,0,0,0,0,0,0,-0.0004,-0.0012,0.0000,0.0000}, {0,0,6,-6,0,0,0,0,2,0,0,0,0,0,0.0006,-0.0009,-0.0004,-0.0002}, {0,6,-7,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0009,0.0000,0.0000}, {0,-6,7,0,0,0,0,0,1,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,-2,6,0,0,0,0,0,2,0,0,0,0,0,-0.0008,0.0000,0.0000,0.0004}, {0,0,3,0,-3,0,0,0,2,0,0,0,0,0,0.0009,-0.0011,-0.0005,-0.0004}, {0,0,3,0,-3,0,0,0,0,0,0,0,0,0,0.0018,-0.0003,0.0000,0.0000}, {0,0,7,-8,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0004,-0.0002,0.0000}, {0,1,-1,0,0,0,0,0,0,0,0,2,-2,1,0.0003,0.0000,0.0000,-0.0001}, {0,0,3,0,-4,0,0,0,0,0,0,0,0,0,0.0005,0.0000,0.0000,0.0000}, {0,-9,12,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0010,-0.0005,0.0000}, {0,1,1,0,0,0,0,0,2,0,0,0,0,0,-0.0339,0.0000,0.0000,0.0147}, {0,1,1,0,0,0,0,0,1,0,0,0,0,0,0.0005,-0.0023,-0.0012,-0.0003}, {0,1,1,0,0,0,0,0,0,0,0,0,0,0,-0.0004,0.0000,0.0000,0.0000}, {0,0,-3,0,5,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,0,2,1,0,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0001,-0.0001}, {0,4,-4,0,0,0,0,0,2,0,0,0,0,0,0.0011,-0.0003,-0.0001,-0.0005}, {0,4,-4,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0010,-0.0005,0.0000}, {0,4,-4,0,0,0,0,0,0,0,0,0,0,0,0.0083,0.0000,0.0000,0.0000}, {0,-4,4,0,0,0,0,0,1,0,0,0,0,0,0.0006,0.0024,0.0013,-0.0003}, {0,0,3,-1,0,0,0,0,2,0,0,0,0,0,0.0019,0.0000,0.0000,-0.0008}, {0,0,4,-3,0,0,0,0,2,0,0,0,0,0,0.0026,-0.0014,-0.0006,-0.0011}, {0,-7,9,0,0,0,0,0,1,0,0,0,0,0,-0.0003,0.0012,0.0006,0.0002}, {0,-7,9,0,0,0,0,0,2,0,0,0,0,0,0.0074,0.0000,0.0000,-0.0032}, {0,-1,4,0,0,0,0,0,2,0,0,0,0,0,0.0003,-0.0004,-0.0002,-0.0001}, {0,-1,4,0,0,0,0,0,1,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0002}, {0,0,5,-5,0,0,0,0,2,0,0,0,0,0,0.0007,-0.0012,-0.0005,-0.0003}, {0,0,6,-7,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0007,-0.0003,0.0000}, {0,2,-1,0,0,0,0,0,2,0,0,0,0,0,0.0005,-0.0173,-0.0075,-0.0002}, {0,2,-1,0,0,0,0,0,0,0,0,0,0,0,0.0006,0.0019,0.0000,0.0000}, {0,0,7,-9,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0004,-0.0002,0.0000}, {0,0,-1,6,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0007,-0.0003,0.0000}, {0,0,2,0,2,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,5,-6,0,0,0,0,0,2,0,0,0,0,0,0.0003,0.0010,0.0004,-0.0001}, {0,5,-6,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0008,0.0000,0.0000}, {0,-5,6,0,0,0,0,0,1,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0002}, {0,-5,6,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0003,-0.0001,0.0000}, {0,0,0,4,0,0,0,0,2,0,0,0,0,0,-0.0021,-0.0032,-0.0014,0.0009}, {0,-3,7,0,0,0,0,0,2,0,0,0,0,0,-0.0063,-0.0016,-0.0007,0.0028}, {0,0,2,0,1,0,0,0,2,0,0,0,0,0,0.0163,-0.0012,-0.0005,-0.0072}, {0,0,1,2,0,0,0,0,2,0,0,0,0,0,-0.0085,-0.0070,-0.0031,0.0037}, {0,0,-4,8,-3,0,0,0,0,0,0,2,-2,1,0.0000,0.0004,0.0002,0.0000}, {0,0,1,0,0,0,0,0,0,0,0,1,-1,0,0.0000,0.0003,0.0000,0.0000}, {0,0,4,-8,3,0,0,0,0,0,0,2,-2,1,0.0000,0.0004,0.0002,0.0000}, {0,3,-3,0,2,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,0,2,0,0,1,0,0,2,0,0,0,0,0,0.0000,-0.0019,-0.0008,0.0000}, {0,0,11,0,0,0,0,0,2,0,0,0,0,0,-0.0011,0.0005,0.0002,0.0005}, {0,-8,11,0,0,0,0,0,2,0,0,0,0,0,-0.0062,-0.0097,-0.0042,0.0027}, {0,-8,11,0,0,0,0,0,1,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,-8,11,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0015,-0.0007,0.0000}, {0,3,-5,4,0,0,0,0,2,0,0,0,0,0,-0.0013,0.0009,0.0004,0.0006}, {0,0,2,0,-2,5,0,0,2,0,0,0,0,0,0.0012,-0.0006,-0.0003,-0.0005}, {0,0,6,-8,1,5,0,0,2,0,0,0,0,0,0.0000,-0.0003,-0.0001,0.0000}, {0,0,-2,8,-3,0,0,0,2,0,0,0,0,0,-0.0123,-0.0416,-0.0180,0.0053}, {0,0,-2,8,-3,0,0,0,2,0,0,0,0,0,0.0000,0.0000,-0.0019,0.0006}, {0,0,-6,16,-4,-5,0,0,2,0,0,0,0,0,0.0000,-0.0086,-0.0019,-0.0006}, {0,0,2,0,0,0,0,0,2,0,0,0,0,0,-0.0089,0.0000,0.0000,0.0038}, {0,0,2,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0004,0.0002,0.0000}, {0,0,1,0,0,0,0,0,0,0,0,1,-1,1,0.0000,-0.0009,-0.0005,0.0000}, {0,0,2,0,0,0,0,0,1,0,0,0,0,0,0.0007,-0.0032,-0.0017,-0.0004}, {0,0,2,0,0,0,0,0,0,0,0,0,0,0,-0.0005,0.0000,0.0000,0.0000}, {0,0,2,0,0,0,0,0,0,0,0,0,0,0,0.0000,0.0000,0.0000,-0.0035}, {0,0,6,-8,3,0,0,0,2,0,0,0,0,0,0.0123,-0.0415,-0.0180,-0.0053}, {0,0,-2,8,-1,-5,0,0,2,0,0,0,0,0,0.0000,-0.0003,-0.0001,0.0000}, {0,0,2,0,2,-5,0,0,2,0,0,0,0,0,-0.0011,-0.0006,-0.0003,0.0005}, {0,-3,9,-4,0,0,0,0,2,0,0,0,0,0,0.0014,0.0009,0.0004,-0.0006}, {0,-8,15,0,0,0,0,0,2,0,0,0,0,0,0.0061,-0.0096,-0.0042,-0.0027}, {0,0,-6,15,0,0,0,0,2,0,0,0,0,0,0.0011,0.0005,0.0002,-0.0005}, {0,0,2,0,0,-1,0,0,2,0,0,0,0,0,0.0000,-0.0020,-0.0009,0.0000}, {0,0,3,-2,0,0,0,0,2,0,0,0,0,0,0.0080,-0.0071,-0.0031,-0.0035}, {0,0,3,-2,0,0,0,0,0,0,0,0,0,0,0.0000,0.0009,0.0000,0.0000}, {0,0,2,0,0,-2,0,0,1,0,0,0,0,0,0.0000,0.0004,0.0002,0.0000}, {0,0,2,0,0,-2,0,0,0,0,0,0,0,0,0.0015,0.0000,0.0000,0.0000}, {0,0,2,0,-1,0,0,0,2,0,0,0,0,0,-0.0154,-0.0030,-0.0013,0.0067}, {0,0,2,0,-1,0,0,0,0,0,0,0,0,0,0.0000,0.0035,0.0000,0.0000}, {0,0,-5,13,0,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,0,2,0,0,-3,0,0,0,0,0,0,0,0,0.0000,0.0003,0.0000,0.0000}, {0,3,-3,0,0,0,0,0,2,0,0,0,0,0,0.0054,-0.0015,-0.0007,-0.0024}, {0,3,-3,0,0,0,0,0,1,0,0,0,0,0,0.0003,0.0012,0.0006,-0.0001}, {0,3,-3,0,0,0,0,0,0,0,0,0,0,0,0.0089,0.0000,0.0000,0.0000}, {0,-3,3,0,0,0,0,0,1,0,0,0,0,0,0.0008,0.0034,0.0018,-0.0004}, {0,0,4,-4,0,0,0,0,2,0,0,0,0,0,0.0018,-0.0029,-0.0013,-0.0008}, {0,0,4,-4,0,0,0,0,0,0,0,0,0,0,0.0008,0.0000,0.0000,0.0000}, {0,-5,10,0,0,0,0,0,2,0,0,0,0,0,-0.0003,0.0008,0.0004,0.0001}, {0,0,2,0,-2,0,0,0,2,0,0,0,0,0,-0.0006,0.0000,-0.0001,0.0003}, {0,0,2,0,-2,0,0,0,1,0,0,0,0,0,-0.0004,0.0021,0.0011,0.0002}, {0,0,2,0,-2,0,0,0,0,0,0,0,0,0,0.0393,0.0003,0.0000,0.0000}, {0,0,5,-6,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0006,-0.0002,0.0000}, {0,0,5,-6,0,0,0,0,0,0,0,0,0,0,0.0003,0.0000,0.0000,0.0000}, {0,0,-3,9,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0003,-0.0001,0.0000}, {0,0,2,0,-2,0,0,0,0,0,0,0,0,1,-0.0003,0.0000,0.0000,0.0002}, {0,6,-8,0,0,0,0,0,0,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0000}, {0,-6,8,0,0,0,0,0,1,0,0,0,0,0,-0.0005,0.0019,0.0010,0.0002}, {0,-6,8,0,0,0,0,0,2,0,0,0,0,0,0.0117,0.0000,0.0000,-0.0051}, {0,-2,5,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0114,-0.0049,0.0000}, {0,-2,5,0,0,0,0,0,1,0,0,0,0,0,-0.0004,0.0000,0.0000,0.0002}, {0,0,2,0,-3,0,0,0,0,0,0,0,0,0,0.0083,0.0015,0.0000,0.0000}, {0,0,-2,7,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0006,-0.0002,0.0000}, {0,0,2,0,-4,0,0,0,0,0,0,0,0,0,0.0011,0.0004,0.0000,0.0000}, {0,0,-2,0,4,0,0,0,2,0,0,0,0,0,0.0017,0.0000,0.0000,-0.0007}, {0,0,-1,5,0,0,0,0,2,0,0,0,0,0,-0.0005,-0.0009,-0.0004,0.0002}, {0,-9,13,0,0,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,1,0,0,0,0,0,0,2,0,0,0,0,0,-0.0005,0.0006,0.0003,0.0002}, {0,1,0,0,0,0,0,0,0,0,0,0,0,0,-0.0004,-0.0028,0.0000,0.0000}, {0,0,0,3,0,0,0,0,2,0,0,0,0,0,-0.0018,-0.0010,-0.0004,0.0008}, {0,0,-2,0,5,0,0,0,2,0,0,0,0,0,0.0005,0.0000,0.0000,-0.0002}, {0,0,1,1,0,0,0,0,2,0,0,0,0,0,-0.0013,0.0000,0.0000,0.0006}, {0,4,-5,0,0,0,0,0,0,0,0,0,0,0,0.0000,-0.0003,0.0000,0.0000}, {0,-4,5,0,0,0,0,0,1,0,0,0,0,0,0.0005,0.0000,0.0000,-0.0002}, {0,-4,5,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0004,-0.0002,0.0000}, {0,-4,8,0,0,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,0,3,-3,0,0,0,0,0,0,0,0,0,0,0.0027,0.0000,0.0000,0.0000}, {0,-7,10,0,0,0,0,0,1,0,0,0,0,0,0.0004,0.0000,0.0000,-0.0002}, {0,-7,10,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0024,-0.0010,0.0000}, {0,-1,3,0,0,0,0,0,2,0,0,0,0,0,0.0113,0.0000,0.0000,-0.0049}, {0,-1,2,0,0,0,0,0,0,0,0,1,-1,1,0.0000,0.0003,0.0001,0.0000}, {0,-1,3,0,0,0,0,0,1,0,0,0,0,0,0.0008,-0.0031,-0.0016,-0.0004}, {0,1,-3,0,0,0,0,0,0,0,0,0,0,0,0.0008,-0.0003,0.0000,0.0000}, {0,0,4,-5,0,0,0,0,0,0,0,0,0,0,0.0016,-0.0006,0.0000,0.0000}, {0,-2,2,0,0,0,0,0,0,0,0,0,0,1,0.0004,0.0000,0.0000,-0.0002}, {0,0,5,-7,0,0,0,0,0,0,0,0,0,0,0.0005,-0.0007,0.0000,0.0000}, {0,0,-5,7,0,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,0,1,0,3,0,0,0,2,0,0,0,0,0,-0.0005,-0.0007,-0.0003,0.0002}, {0,2,-2,0,0,0,0,0,1,0,0,0,0,0,-0.0003,-0.0013,-0.0007,0.0001}, {0,2,-2,0,0,0,0,0,0,0,0,0,0,0,-0.0598,0.0000,0.0000,0.0000}, {0,-2,1,0,0,0,0,0,0,0,0,1,-1,1,0.0000,0.0005,0.0003,0.0000}, {0,-2,2,0,0,0,0,0,1,0,0,0,0,0,0.0012,0.0055,0.0029,-0.0006}, {0,0,6,-9,0,0,0,0,0,0,0,0,0,0,0.0000,-0.0005,0.0000,0.0000}, {0,0,-6,9,0,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,2,-2,0,0,0,0,0,0,0,0,0,0,1,0.0006,0.0000,0.0000,-0.0003}, {0,0,-2,6,0,0,0,0,2,0,0,0,0,0,-0.0003,-0.0005,-0.0002,0.0001}, {0,0,1,0,2,0,0,0,2,0,0,0,0,0,-0.0035,-0.0048,-0.0021,0.0015}, {-1,0,3,0,0,0,0,0,2,0,0,0,0,0,0.0001,0.0000,0.0000,0.0000}, {0,0,-1,0,1,0,0,0,0,0,0,0,0,0,0.0000,-0.0003,0.0000,0.0000}, {0,0,-1,0,1,0,0,0,0,0,0,2,-2,1,0.0005,0.0000,0.0000,-0.0003}, {0,5,-7,0,0,0,0,0,0,0,0,0,0,0,0.0016,-0.0005,0.0000,0.0000}, {0,-5,6,0,0,0,0,0,0,0,0,1,-1,1,0.0000,0.0004,0.0002,0.0000}, {0,-5,7,0,0,0,0,0,1,0,0,0,0,0,-0.0008,0.0035,0.0019,0.0005}, {0,-5,7,0,0,0,0,0,2,0,0,0,0,0,0.0202,0.0000,0.0000,-0.0087}, {0,0,-1,4,0,0,0,0,2,0,0,0,0,0,-0.0019,-0.0008,-0.0004,0.0008}, {0,-3,6,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0027,-0.0012,0.0000}, {0,-3,6,0,0,0,0,0,1,0,0,0,0,0,-0.0007,0.0000,0.0000,0.0004}, {0,3,-6,0,0,0,0,0,0,0,0,0,0,0,0.0000,-0.0004,0.0000,0.0000}, {0,0,1,0,1,0,0,0,2,0,0,0,0,0,-0.0262,0.0000,0.0000,0.0114}, {0,0,1,0,1,0,0,0,1,0,0,0,0,0,0.0000,0.0003,0.0002,0.0000}, {0,0,1,0,1,0,0,0,0,0,0,0,0,0,0.0008,0.0011,0.0000,0.0000}, {0,-5,5,0,0,0,0,0,0,0,0,2,-2,1,0.0004,0.0000,0.0000,-0.0002}, {0,0,1,0,0,2,0,0,2,0,0,0,0,0,0.0000,-0.0003,-0.0001,0.0000}, {0,0,0,2,0,0,0,0,2,0,0,0,0,0,-0.0074,0.0000,0.0000,0.0032}, {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0.0006,0.0000,0.0000,0.0000}, {0,0,1,0,0,1,0,0,2,0,0,0,0,0,-0.0014,0.0000,0.0000,0.0006}, {0,0,1,0,1,-2,0,0,0,0,0,0,0,0,-0.0001,0.0000,0.0000,0.0000}, {0,-8,12,0,0,0,0,0,0,0,0,0,0,0,-0.0008,0.0000,0.0000,0.0000}, {0,-8,12,0,0,0,0,0,2,0,0,0,0,0,-0.0006,0.0000,0.0000,0.0002}, {0,0,1,0,-2,5,0,0,2,0,0,0,0,0,0.0000,0.0005,0.0002,0.0000}, {0,0,-3,8,-3,0,0,0,2,0,0,0,0,0,-0.0004,0.0000,0.0000,0.0002}, {0,0,3,-8,3,0,0,0,0,0,0,0,0,0,-0.0019,-0.0011,0.0000,0.0000}, {0,0,1,0,0,0,0,0,0,0,0,0,0,0,0.0008,-0.0027,0.0000,0.0000}, {0,0,-1,0,0,0,0,0,1,0,0,0,0,0,-0.0004,0.0000,0.0000,0.0002}, {0,0,5,-8,3,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,0,5,-8,3,0,0,0,0,0,0,0,0,0,0.0021,0.0003,0.0000,0.0000}, {0,0,1,0,2,-5,0,0,0,0,0,0,0,0,-0.0013,-0.0030,0.0000,0.0000}, {0,-8,14,0,0,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,0,-2,2,0,0,0,0,0,0,0,0,0,1,0.0003,0.0000,0.0000,-0.0002}, {0,0,-1,0,1,0,0,0,0,0,0,0,0,1,0.0011,0.0000,0.0000,-0.0006}, {0,0,1,0,0,-1,0,0,0,0,0,0,0,0,-0.0075,0.0000,0.0000,0.0000}, {0,0,2,-2,0,0,0,0,0,0,0,0,0,0,-0.0368,0.0000,0.0000,0.0000}, {0,0,1,0,0,-2,0,0,0,0,0,0,0,0,-0.0006,0.0020,0.0000,0.0000}, {0,-3,4,0,0,0,0,0,0,0,0,0,0,1,0.0000,0.0003,0.0002,0.0000}, {0,0,1,0,-3,5,0,0,0,0,0,0,0,0,0.0003,0.0000,0.0000,0.0000}, {0,0,1,0,-1,0,0,0,1,0,0,0,0,0,0.0000,0.0007,0.0003,0.0000}, {0,0,1,0,-1,0,0,0,0,0,0,0,0,0,-0.1223,-0.0026,0.0000,0.0000}, {0,0,-1,0,1,0,0,0,1,0,0,0,0,0,0.0000,-0.0004,-0.0002,0.0000}, {0,0,1,0,1,-5,0,0,0,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,1,0,0,-3,0,0,0,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,-1,0,2,0,0,0,0,0,0,0,0,1,0.0000,0.0003,0.0001,0.0000}, {0,0,2,-2,0,0,0,0,0,0,0,0,0,1,0.0005,0.0000,0.0000,-0.0002}, {0,3,-4,0,0,0,0,0,1,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0002}, {0,3,-4,0,0,0,0,0,0,0,0,0,0,0,-0.0005,0.0328,0.0000,0.0000}, {0,-3,4,0,0,0,0,0,1,0,0,0,0,0,0.0007,0.0000,0.0000,-0.0004}, {0,-3,4,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0005,-0.0002,0.0000}, {0,0,3,-4,0,0,0,0,0,0,0,0,0,0,-0.0078,0.0045,0.0000,0.0000}, {0,-5,9,0,0,0,0,0,2,0,0,0,0,0,0.0010,0.0000,0.0000,-0.0004}, {0,0,1,0,-1,0,0,0,0,0,0,0,0,1,0.0015,0.0000,0.0000,-0.0008}, {0,0,1,0,-2,0,0,0,0,0,0,0,0,0,-0.0166,0.0269,0.0000,0.0000}, {0,0,-1,0,2,0,0,0,2,0,0,0,0,0,-0.0005,0.0000,0.0000,0.0002}, {0,3,-4,0,0,0,0,0,0,0,0,0,0,1,0.0000,-0.0004,-0.0002,0.0000}, {0,0,4,-6,0,0,0,0,0,0,0,0,0,0,-0.0016,0.0023,0.0000,0.0000}, {0,0,-4,6,0,0,0,0,2,0,0,0,0,0,0.0006,0.0000,0.0000,-0.0002}, {0,-2,2,0,0,0,0,0,0,0,0,2,-2,1,0.0011,0.0000,0.0000,-0.0006}, {0,0,1,0,-2,0,0,0,0,0,0,0,0,1,0.0000,-0.0004,-0.0002,-0.0001}, {0,6,-9,0,0,0,0,0,0,0,0,0,0,0,0.0000,-0.0003,0.0000,0.0000}, {0,-6,9,0,0,0,0,0,1,0,0,0,0,0,0.0009,0.0000,0.0000,-0.0005}, {0,-6,9,0,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0045,-0.0020,0.0000}, {0,-2,4,0,0,0,0,0,2,0,0,0,0,0,-0.0458,0.0000,0.0000,0.0198}, {0,-2,3,0,0,0,0,0,0,0,0,1,-1,1,0.0000,0.0009,0.0005,0.0001}, {0,-2,4,0,0,0,0,0,1,0,0,0,0,0,0.0014,-0.0059,-0.0031,-0.0008}, {0,2,-4,0,0,0,0,0,0,0,0,0,0,0,0.0005,-0.0005,0.0000,0.0000}, {0,0,1,0,-3,0,0,0,0,0,0,0,0,0,-0.0028,0.0036,0.0000,0.0000}, {0,0,-1,0,3,0,0,0,1,0,0,0,0,0,0.0000,-0.0005,-0.0003,0.0000}, {0,0,-1,0,3,0,0,0,2,0,0,0,0,0,0.0118,0.0000,0.0000,-0.0052}, {0,0,5,-8,0,0,0,0,0,0,0,0,0,0,0.0000,0.0011,0.0000,0.0000}, {0,0,-5,8,0,0,0,0,2,0,0,0,0,0,0.0005,0.0003,0.0001,-0.0002}, {0,4,-4,0,0,0,0,0,0,-2,0,0,2,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,-3,7,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0003,-0.0001,0.0000}, {0,0,-3,0,3,0,0,0,0,0,0,2,-2,1,0.0004,0.0000,0.0000,-0.0002}, {0,0,-6,10,0,0,0,0,0,0,0,0,0,0,0.0000,0.0003,0.0000,0.0000}, {0,0,-6,10,0,0,0,0,2,0,0,0,0,0,0.0000,0.0004,0.0002,-0.0001}, {0,-1,1,0,0,0,0,0,0,0,0,0,0,1,-0.0019,0.0000,0.0000,0.0010}, {0,0,1,0,-4,0,0,0,0,0,0,0,0,0,-0.0004,0.0004,0.0000,0.0000}, {0,0,-1,0,4,0,0,0,2,0,0,0,0,0,0.0030,-0.0006,-0.0002,-0.0013}, {0,0,-2,5,0,0,0,0,2,0,0,0,0,0,-0.0006,-0.0003,-0.0002,0.0003}, {0,1,-2,0,0,0,0,0,0,0,0,1,-1,1,0.0000,0.0005,0.0003,0.0000}, {0,1,-1,0,0,0,0,0,1,0,0,0,0,0,-0.0007,-0.0032,-0.0017,0.0004}, {0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0.1485,0.0000,0.0000,0.0000}, {0,-1,0,0,0,0,0,0,0,0,0,1,-1,1,0.0005,0.0021,0.0011,-0.0003}, {0,-1,1,0,0,0,0,0,1,0,0,0,0,0,0.0025,0.0106,0.0057,-0.0013}, {0,-1,1,0,0,0,0,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0001}, {0,0,-7,12,0,0,0,0,2,0,0,0,0,0,0.0000,0.0003,0.0001,0.0000}, {0,0,-1,3,0,0,0,0,2,0,0,0,0,0,-0.0011,0.0000,0.0000,0.0005}, {0,0,1,-3,0,0,0,0,0,0,0,0,0,0,0.0000,0.0003,0.0000,0.0000}, {0,0,-1,0,5,0,0,0,2,0,0,0,0,0,0.0005,0.0000,0.0000,-0.0002}, {0,1,-1,0,0,0,0,0,0,0,0,0,0,1,-0.0028,0.0000,0.0000,0.0015}, {0,1,0,0,0,0,0,0,0,0,0,-1,1,0,0.0000,-0.0003,0.0000,0.0000}, {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0.0002,0.0001,0.0000,0.0000}, {0,2,-2,0,0,0,0,0,0,-2,0,0,2,0,-0.0005,0.0000,0.0000,0.0000}, {0,4,-6,0,0,0,0,0,0,0,0,0,0,0,-0.0046,0.0014,0.0000,0.0000}, {0,-4,6,0,0,0,0,0,1,0,0,0,0,0,-0.0003,0.0013,0.0007,0.0002}, {0,-4,5,0,0,0,0,0,0,0,0,1,-1,1,-0.0007,0.0028,0.0015,0.0004}, {0,-4,6,0,0,0,0,0,1,0,0,0,0,0,-0.0022,0.0093,0.0049,0.0012}, {0,-4,6,0,0,0,0,0,2,0,0,0,0,0,0.0490,0.0000,0.0000,-0.0213}, {0,-4,7,0,0,0,0,0,2,0,0,0,0,0,0.0003,0.0066,0.0029,-0.0001}, {0,-4,6,0,0,0,0,0,0,0,0,1,-1,1,0.0003,0.0000,0.0000,-0.0001}, {0,-4,7,0,0,0,0,0,1,0,0,0,0,0,-0.0012,-0.0003,-0.0002,0.0006}, {0,0,1,-1,0,0,0,0,0,0,0,0,0,0,-0.0025,0.0000,0.0000,0.0000}, {0,4,-5,0,0,0,0,0,0,0,0,-1,1,0,0.0000,-0.0004,0.0000,0.0000}, {0,-4,4,0,0,0,0,0,0,0,0,2,-2,1,0.0027,0.0000,0.0000,-0.0014}, {0,0,2,-3,0,0,0,0,0,0,0,0,0,0,-0.0068,0.0039,0.0000,0.0000}, {0,4,-4,0,0,0,0,0,0,0,0,-2,2,0,0.0004,0.0000,0.0000,0.0000}, {0,-7,11,0,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0003,-0.0002,0.0000}, {0,-7,11,0,0,0,0,0,2,0,0,0,0,0,-0.0016,-0.0003,-0.0001,0.0007}, {0,-1,2,0,0,0,0,0,2,0,0,0,0,0,-0.0003,-0.0006,-0.0002,0.0001}, {0,-1,2,0,0,0,0,0,1,0,0,0,0,0,-0.0004,0.0000,0.0000,0.0002}, {0,1,-2,0,0,0,0,0,0,0,0,0,0,0,0.0022,-0.0087,0.0000,0.0000}, {0,1,-3,0,0,0,0,0,0,0,0,1,-1,1,-0.0004,0.0000,0.0000,0.0002}, {0,1,-2,0,0,0,0,0,1,0,0,0,0,0,-0.0010,0.0000,0.0001,0.0005}, {0,0,3,-5,0,0,0,0,0,0,0,0,0,0,-0.0020,0.0034,0.0000,0.0000}, {0,0,-3,5,0,0,0,0,1,0,0,0,0,0,0.0000,-0.0003,-0.0002,-0.0001}, {0,0,-3,5,0,0,0,0,2,0,0,0,0,0,0.0017,0.0000,0.0000,-0.0007}, {0,0,0,0,4,0,0,0,2,0,0,0,0,0,-0.0009,0.0003,0.0001,0.0004}, {0,-1,2,0,0,0,0,0,0,0,0,0,0,1,0.0000,0.0003,0.0001,0.0000}, {0,0,-5,10,0,0,0,0,2,0,0,0,0,0,0.0000,-0.0005,-0.0002,0.0000}, {0,0,-2,0,3,0,0,0,0,0,0,2,-2,1,0.0007,0.0000,0.0000,-0.0004}, {0,-2,3,0,0,0,0,0,0,0,0,0,0,1,0.0000,0.0019,0.0010,0.0000}, {0,0,4,-7,0,0,0,0,0,0,0,0,0,0,0.0000,0.0022,0.0000,0.0000}, {0,0,-4,7,0,0,0,0,1,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0002}, {0,0,-4,7,0,0,0,0,2,0,0,0,0,0,0.0016,0.0009,0.0004,-0.0007}, {0,0,2,0,-2,0,0,0,0,0,0,-2,2,0,0.0005,0.0000,0.0000,0.0000}, {0,0,-4,8,0,0,0,0,2,0,0,0,0,0,-0.0006,-0.0010,-0.0004,0.0003}, {0,0,4,-8,0,0,0,0,0,0,0,0,0,0,0.0003,0.0005,0.0000,0.0000}, {0,0,0,0,3,0,0,0,2,0,0,0,0,0,-0.0127,0.0021,0.0009,0.0055}, {0,0,0,0,3,0,0,0,1,0,0,0,0,0,0.0000,0.0006,0.0003,-0.0001}, {0,0,-1,0,3,0,0,0,0,0,0,1,-1,1,-0.0003,-0.0009,-0.0005,0.0002}, {0,0,0,0,3,0,0,0,1,0,0,0,0,0,0.0006,0.0017,0.0009,-0.0003}, {0,2,-3,0,0,0,0,0,1,0,0,0,0,0,0.0003,-0.0003,-0.0001,-0.0002}, {0,2,-3,0,0,0,0,0,0,0,0,0,0,0,0.0008,0.0614,0.0000,0.0000}, {0,-2,2,0,0,0,0,0,0,0,0,1,-1,1,0.0018,0.0000,0.0000,-0.0009}, {0,-2,3,0,0,0,0,0,1,0,0,0,0,0,0.0030,-0.0003,-0.0002,-0.0016}, {0,-2,3,0,0,0,0,0,2,0,0,0,0,0,0.0005,-0.0011,-0.0005,-0.0002}, {0,-6,10,0,0,0,0,0,2,0,0,0,0,0,0.0024,0.0005,0.0002,-0.0011}, {0,-6,10,0,0,0,0,0,1,0,0,0,0,0,0.0000,0.0005,0.0003,0.0001}, {0,3,-3,0,0,0,0,0,0,0,0,-2,2,0,0.0013,0.0000,0.0000,0.0000}, {0,0,1,0,0,0,0,0,0,-2,0,1,1,1,0.0000,-0.0005,-0.0003,0.0000}, {0,0,-2,0,2,0,0,0,0,0,0,2,-2,1,0.0050,0.0000,0.0000,-0.0027}, {0,0,1,0,-2,0,0,0,0,0,0,-1,1,0,-0.0003,0.0016,0.0000,0.0000}, {0,0,5,-9,0,0,0,0,0,0,0,0,0,0,0.0007,0.0013,0.0000,0.0000}, {0,0,-5,9,0,0,0,0,1,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0001}, {0,0,-5,9,0,0,0,0,2,0,0,0,0,0,0.0008,0.0012,0.0005,-0.0003}, {0,2,-3,0,0,0,0,0,0,0,0,0,0,1,0.0000,-0.0032,-0.0017,0.0000}, {0,2,-2,0,0,0,0,0,0,0,0,-1,1,0,0.0003,0.0000,0.0000,0.0000}, {0,0,-3,6,0,0,0,0,2,0,0,0,0,0,-0.0024,-0.0013,-0.0006,0.0010}, {0,0,-3,6,0,0,0,0,1,0,0,0,0,0,-0.0004,0.0000,0.0000,0.0002}, {0,0,-4,6,0,0,0,0,0,0,0,1,-1,1,0.0004,0.0000,0.0000,-0.0002}, {0,0,-3,6,0,0,0,0,1,0,0,0,0,0,-0.0005,0.0000,0.0001,0.0003}, {0,0,3,-6,0,0,0,0,0,0,0,0,0,0,0.0000,0.0031,0.0000,0.0000}, {0,-5,7,0,0,0,0,0,0,0,0,1,-1,2,-0.0005,0.0000,0.0000,0.0002}, {0,0,-4,4,0,0,0,0,0,0,0,2,-2,1,0.0003,0.0000,0.0000,-0.0002}, {0,0,2,-4,0,0,0,0,0,0,0,0,0,1,-0.0004,0.0008,0.0004,0.0002}, {0,-3,3,0,0,0,0,0,0,0,0,2,-2,1,0.0117,0.0000,0.0000,-0.0063}, {0,3,-4,0,0,0,0,0,0,0,0,-1,1,0,0.0000,-0.0004,0.0000,0.0000}, {0,3,-5,0,0,0,0,0,0,0,0,0,0,1,-0.0008,0.0000,0.0001,0.0004}, {0,0,0,0,0,5,0,0,2,0,0,0,0,0,-0.0006,0.0000,0.0000,0.0003}, {0,0,-2,0,2,0,0,0,0,0,0,2,-2,2,-0.0005,0.0000,0.0000,0.0002}, {0,0,0,0,2,0,0,0,2,0,0,0,0,0,-0.1166,0.0000,0.0000,0.0505}, {0,0,0,0,2,0,0,0,1,0,0,0,0,0,0.0009,0.0049,0.0026,-0.0005}, {0,0,-1,0,2,0,0,0,0,0,0,1,-1,1,-0.0027,-0.0143,-0.0077,0.0014}, {0,0,0,0,2,0,0,0,1,0,0,0,0,0,0.0042,0.0223,0.0119,-0.0022}, {0,0,0,0,2,0,0,0,0,0,0,0,0,0,-0.0025,0.0022,0.0000,0.0000}, {0,0,0,0,4,-5,0,0,2,0,0,0,0,0,0.0007,0.0000,0.0000,-0.0003}, {0,0,-7,9,0,0,0,0,0,0,0,2,-2,1,0.0000,0.0003,0.0002,-0.0001}, {0,0,2,0,0,-2,0,0,0,-2,0,0,2,0,-0.0003,0.0000,0.0000,0.0000}, {0,-3,3,0,0,0,0,0,0,2,0,0,-2,1,0.0016,0.0000,0.0000,-0.0009}, {1,0,-4,0,0,0,0,0,0,0,0,0,0,0,0.0005,0.0003,0.0000,0.0000}, {-1,0,4,0,0,0,0,0,2,0,0,0,0,0,-0.0004,0.0010,0.0004,0.0002}, {0,0,6,-11,0,0,0,0,0,0,0,0,0,0,0.0009,0.0006,0.0000,0.0000}, {0,0,-6,11,0,0,0,0,2,0,0,0,0,0,0.0000,0.0011,0.0005,0.0000}, {0,0,-2,0,1,0,0,0,0,0,0,2,-2,1,-0.0003,0.0000,0.0000,0.0001}, {0,0,1,0,-1,0,0,0,0,0,0,-1,1,0,0.0000,0.0004,0.0000,0.0000}, {0,0,0,0,-1,0,0,0,0,0,0,0,0,1,0.0004,0.0015,0.0008,-0.0002}, {0,0,-1,0,-1,0,0,0,0,0,0,1,-1,2,0.0000,-0.0006,-0.0002,0.0000}, {0,5,-8,0,0,0,0,0,0,0,0,0,0,0,-0.0014,-0.0039,0.0000,0.0000}, {0,-5,8,0,0,0,0,0,1,0,0,0,0,0,0.0057,0.0011,0.0006,-0.0030}, {0,-5,7,0,0,0,0,0,0,0,0,1,-1,1,0.0140,0.0027,0.0014,-0.0075}, {0,-5,8,0,0,0,0,0,1,0,0,0,0,0,0.0031,0.0006,0.0003,-0.0017}, {0,-5,8,0,0,0,0,0,2,0,0,0,0,0,0.0000,0.0007,0.0003,0.0000}, {0,-5,6,0,0,0,0,0,0,0,0,2,-2,2,0.0000,0.0012,0.0005,0.0000}, {0,-5,8,0,0,0,0,0,2,0,0,0,0,0,-0.0011,-0.0268,-0.0116,0.0005}, {0,0,-2,4,0,0,0,0,2,0,0,0,0,0,-0.0051,0.0000,0.0000,0.0022}, {0,0,-2,4,0,0,0,0,1,0,0,0,0,0,-0.0008,0.0012,0.0006,0.0004}, {0,0,-3,4,0,0,0,0,0,0,0,1,-1,1,0.0009,-0.0013,-0.0007,-0.0005}, {0,0,-2,4,0,0,0,0,1,0,0,0,0,0,-0.0006,0.0009,0.0005,0.0003}, {0,0,2,-4,0,0,0,0,0,0,0,0,0,0,-0.0086,0.0153,0.0000,0.0000}, {0,0,1,-4,0,0,0,0,0,0,0,1,-1,1,0.0003,0.0000,0.0000,-0.0002}, {0,0,2,-4,0,0,0,0,1,0,0,0,0,0,0.0004,0.0000,0.0000,-0.0002}, {0,-3,5,0,0,0,0,0,2,0,0,0,0,0,0.0085,0.0000,0.0000,-0.0037}, {0,-3,3,0,0,0,0,0,0,0,0,2,-2,2,-0.0012,0.0000,0.0000,0.0005}, {0,-3,5,0,0,0,0,0,2,0,0,0,0,0,-0.2150,0.0000,0.0000,0.0932}, {0,-3,5,0,0,0,0,0,1,0,0,0,0,0,0.0011,-0.0049,-0.0026,-0.0007}, {0,-3,4,0,0,0,0,0,0,0,0,1,-1,1,-0.0010,0.0040,0.0021,0.0005}, {0,3,-5,0,0,0,0,0,0,0,0,0,0,0,-0.0145,0.0047,0.0000,0.0000}, {0,3,-5,0,0,0,0,0,1,0,0,0,0,0,-0.0003,-0.0009,-0.0005,0.0003}, {0,3,-6,0,0,0,0,0,0,0,0,1,-1,1,-0.0009,-0.0014,-0.0008,0.0005}, {0,0,-2,0,0,2,0,0,0,0,0,2,-2,1,0.0008,0.0000,0.0000,-0.0004}, {0,0,1,0,0,-2,0,0,0,0,0,-1,1,0,-0.0004,0.0009,0.0000,0.0000}, {0,0,2,-2,0,0,0,0,0,0,0,-1,1,0,0.0000,0.0004,0.0000,0.0000}, {0,0,1,-2,0,0,0,0,0,0,0,0,0,1,-0.0037,0.0035,0.0019,0.0020}, {0,0,0,-2,0,0,0,0,0,0,0,1,-1,2,-0.0007,0.0000,0.0000,0.0003}, {0,0,-1,0,2,0,0,0,0,0,0,1,-1,2,0.0000,0.0010,0.0004,0.0000}, {0,0,-2,0,2,0,0,0,0,2,0,0,-2,1,0.0054,0.0000,0.0000,-0.0029}, {0,0,4,-8,3,0,0,0,0,0,0,0,0,2,0.0000,-0.0007,-0.0003,0.0000}, {0,0,-4,8,-3,0,0,0,0,0,0,0,0,2,0.0000,-0.0007,-0.0003,0.0000}, {0,3,-3,0,0,0,0,0,0,-2,0,0,2,0,-0.0138,0.0000,0.0000,0.0000}, {0,0,0,0,0,3,0,0,2,0,0,0,0,0,0.0000,0.0015,0.0007,0.0000}, {0,0,0,0,0,3,0,0,1,0,0,0,0,0,0.0008,-0.0004,-0.0002,-0.0004}, {0,0,-1,0,0,3,0,0,0,0,0,1,-1,1,-0.0008,0.0004,0.0002,0.0004}, {0,0,0,0,2,-2,0,0,0,0,0,0,0,0,-0.0004,0.0000,0.0000,0.0000}, {0,0,4,-4,0,0,0,0,0,-2,0,0,2,0,-0.0004,0.0000,0.0000,0.0000}, {-1,0,2,0,0,0,0,0,0,0,0,2,-2,1,0.0000,0.0008,0.0004,0.0001}, {0,0,-8,11,0,0,0,0,0,0,0,2,-2,1,0.0000,0.0008,0.0004,0.0000}, {0,0,-5,6,0,0,0,0,0,2,0,0,-2,1,0.0003,0.0000,0.0000,-0.0002}, {0,0,7,-13,0,0,0,0,0,0,0,0,0,0,0.0010,0.0000,0.0000,0.0000}, {0,0,-7,13,0,0,0,0,2,0,0,0,0,0,-0.0004,0.0008,0.0003,0.0002}, {0,0,1,0,0,-1,0,0,0,0,0,-1,1,0,-0.0004,0.0000,0.0000,0.0000}, {0,0,0,0,0,-1,0,0,0,0,0,0,0,1,0.0000,0.0005,0.0003,0.0000}, {0,0,-1,0,0,-1,0,0,0,0,0,1,-1,2,-0.0003,0.0000,0.0000,0.0001}, {0,0,0,0,1,0,0,0,2,0,0,0,0,0,0.0052,0.0023,0.0010,-0.0023}, {0,0,0,0,1,0,0,0,1,0,0,0,0,0,0.0000,0.0005,0.0003,0.0000}, {0,0,-1,0,1,0,0,0,0,0,0,1,-1,1,-0.0006,-0.0047,-0.0025,0.0003}, {0,0,0,0,1,0,0,0,1,0,0,0,0,0,0.0006,0.0049,0.0026,-0.0003}, {0,0,0,0,1,0,0,0,0,0,0,0,0,0,-0.0091,0.0248,0.0000,0.0000}, {0,0,0,0,-1,0,0,0,1,0,0,0,0,0,-0.0013,0.0052,0.0028,0.0007}, {0,0,-1,0,-1,0,0,0,0,0,0,1,-1,1,-0.0050,0.0194,0.0103,0.0027}, {0,0,0,0,3,-5,0,0,0,0,0,0,0,0,0.0000,-0.0004,0.0000,0.0000}, {0,0,-1,0,1,0,0,0,0,1,0,0,-1,1,0.0004,0.0000,0.0000,-0.0002}, {0,0,6,-8,0,0,0,0,0,-2,0,0,2,1,0.0000,0.0003,0.0002,0.0001}, {0,0,2,0,-3,0,0,0,0,-2,0,0,2,1,-0.0053,-0.0009,-0.0005,0.0028}, {0,0,-8,15,0,0,0,0,0,0,0,0,0,1,-0.0005,-0.0003,-0.0001,0.0003}, {0,6,-8,0,0,0,0,0,0,-2,0,0,2,1,0.0011,-0.0003,-0.0001,-0.0006}, {0,5,-8,0,0,0,0,0,0,0,0,0,0,1,0.0000,0.0005,0.0003,0.0000}, {0,5,-7,0,0,0,0,0,0,0,0,-1,1,0,0.0035,-0.0007,0.0000,0.0000}, {0,-5,6,0,0,0,0,0,0,0,0,2,-2,1,-0.0018,-0.0436,-0.0233,0.0009}, {0,0,-2,4,0,0,0,0,0,0,0,0,0,1,-0.0011,-0.0021,-0.0011,0.0006}, {0,-3,4,0,0,0,0,0,0,0,0,1,-1,2,0.0000,-0.0003,-0.0001,0.0000}, {0,-3,5,0,0,0,0,0,0,0,0,0,0,1,-0.0021,-0.0006,-0.0003,0.0011}, {0,3,-6,0,0,0,0,0,0,0,0,1,-1,0,0.0000,0.0004,0.0000,0.0000}, {0,0,0,0,0,2,0,0,2,0,0,0,0,0,-0.0133,0.0000,0.0000,0.0057}, {0,0,0,0,0,2,0,0,1,0,0,0,0,0,0.0051,0.0114,0.0061,-0.0027}, {0,0,-1,0,0,2,0,0,0,0,0,1,-1,1,-0.0048,-0.0110,-0.0059,0.0026}, {0,0,-1,0,0,-2,0,0,0,0,0,1,-1,1,0.0003,-0.0004,-0.0002,-0.0002}, {0,0,3,-4,0,0,0,0,0,-1,0,0,1,1,-0.0003,0.0000,0.0000,0.0002}, {0,3,-4,0,0,0,0,0,0,-1,0,0,1,1,0.0000,0.0023,0.0013,0.0000}, {0,0,-1,2,0,0,0,0,1,0,0,0,0,0,0.0006,0.0047,0.0025,-0.0003}, {0,0,-2,2,0,0,0,0,0,0,0,1,-1,1,-0.0008,-0.0047,-0.0025,0.0004}, {0,0,1,-2,0,0,0,0,0,0,0,0,0,0,-0.0449,0.0430,0.0000,0.0000}, {0,0,0,-2,0,0,0,0,0,0,0,1,-1,1,0.0273,0.0080,0.0043,-0.0146}, {0,0,1,-2,0,0,0,0,1,0,0,0,0,0,0.0023,0.0007,0.0003,-0.0013}, {0,-8,13,0,0,0,0,0,0,0,0,0,0,1,-0.0040,0.0057,0.0030,0.0021}, {0,-8,12,0,0,0,0,0,0,0,0,1,-1,2,-0.0004,0.0000,0.0000,0.0002}, {0,0,1,0,-2,0,0,0,0,-2,0,1,1,1,0.0000,-0.0006,-0.0003,0.0000}, {0,-18,16,0,0,0,0,0,0,1,0,0,0,1,0.0057,-0.0028,-0.0015,-0.0030}, {0,0,2,0,-2,0,0,0,0,-2,0,0,2,0,-0.0439,0.0000,0.0000,0.0000}, {0,-3,7,-4,0,0,0,0,0,0,0,0,0,1,-0.0009,-0.0005,-0.0003,0.0005}, {0,0,2,0,0,-5,0,0,0,-2,0,0,2,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,3,-7,0,0,0,0,0,2,0,-1,-1,1,0.0003,0.0000,-0.0001,-0.0002}, {0,0,1,0,2,-5,0,0,0,0,0,-1,1,0,-0.0009,-0.0016,0.0000,0.0000}, {0,0,0,0,2,-5,0,0,0,0,0,0,0,1,-0.0073,0.0017,0.0009,0.0039}, {0,0,4,-8,3,0,0,0,0,0,0,0,0,1,-0.0082,0.0292,0.0156,0.0044}, {0,10,-3,0,0,0,0,0,0,-1,0,0,0,1,-0.0003,0.0000,0.0000,0.0001}, {0,0,-2,0,0,0,0,0,0,0,0,2,-2,1,-0.0003,0.0000,0.0000,0.0002}, {0,-10,3,0,0,0,0,0,0,1,0,0,0,1,0.0003,0.0000,0.0000,-0.0001}, {0,0,-4,8,-3,0,0,0,0,0,0,0,0,1,0.0084,0.0298,0.0159,-0.0045}, {0,0,0,0,-2,5,0,0,0,0,0,0,0,1,0.0076,0.0017,0.0009,-0.0041}, {0,0,-1,0,-2,5,0,0,0,0,0,1,-1,2,-0.0003,0.0005,0.0002,0.0001}, {0,0,-3,7,0,0,0,0,0,-2,0,1,1,1,-0.0005,-0.0004,-0.0002,0.0003}, {0,3,-7,4,0,0,0,0,0,0,0,0,0,1,0.0010,-0.0006,-0.0003,-0.0005}, {0,0,-1,0,-1,1,0,0,0,0,0,1,-1,1,0.0000,0.0014,0.0007,0.0000}, {0,18,-16,0,0,0,0,0,0,-1,0,0,0,1,-0.0068,-0.0034,-0.0018,0.0036}, {0,0,2,-2,0,0,0,0,0,-1,0,0,1,0,-0.0005,0.0000,0.0000,0.0000}, {0,-8,11,0,0,0,0,0,0,0,0,2,-2,1,0.0000,0.0003,0.0002,0.0000}, {0,8,-12,0,0,0,0,0,0,0,0,-1,1,0,-0.0014,0.0007,0.0000,0.0000}, {0,8,-13,0,0,0,0,0,0,0,0,0,0,1,0.0046,0.0066,0.0035,-0.0025}, {0,3,-3,0,0,0,0,0,0,-2,0,0,2,1,-0.0005,0.0000,0.0000,0.0003}, {0,0,2,0,-3,1,0,0,0,-2,0,0,2,1,0.0003,0.0000,0.0000,-0.0002}, {0,3,-5,0,2,0,0,0,0,0,0,0,0,0,0.0010,0.0000,0.0000,0.0000}, {1,0,-2,0,0,0,0,0,0,0,0,-2,2,0,0.0000,-0.0003,0.0000,0.0000}, {0,0,0,2,0,0,0,0,0,0,0,-1,1,1,0.0008,-0.0003,-0.0001,-0.0005}, {0,0,-1,2,0,0,0,0,0,0,0,0,0,2,-0.0005,-0.0004,-0.0002,0.0002}, {0,-3,4,0,0,0,0,0,0,1,0,0,-1,1,0.0000,0.0029,0.0015,0.0000}, {0,0,-3,4,0,0,0,0,0,1,0,0,-1,1,0.0004,0.0003,0.0001,-0.0002}, {0,0,-9,17,0,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0002}, {0,0,9,-17,0,0,0,0,0,0,0,0,0,0,0.0005,-0.0006,0.0000,0.0000}, {0,0,5,-6,0,0,0,0,0,-2,0,0,2,0,-0.0024,0.0012,0.0000,0.0000}, {0,0,7,-13,0,0,0,0,0,0,0,0,0,1,-0.0003,0.0000,0.0000,0.0002}, {0,0,-9,13,0,0,0,0,0,0,0,2,-2,1,0.0010,-0.0022,-0.0012,-0.0005}, {0,0,0,0,0,1,0,0,2,0,0,0,0,0,0.0000,0.0008,0.0004,0.0000}, {0,0,0,0,0,1,0,0,1,0,0,0,0,0,0.0047,0.0008,0.0004,-0.0025}, {0,0,-1,0,0,1,0,0,0,0,0,1,-1,1,-0.0066,-0.0012,-0.0006,0.0035}, {0,0,0,0,0,1,0,0,0,0,0,0,0,0,0.0011,0.0056,0.0000,0.0000}, {0,0,-1,0,0,-1,0,0,0,0,0,1,-1,1,0.0174,0.0084,0.0045,-0.0093}, {0,0,0,0,0,-1,0,0,1,0,0,0,0,0,0.0032,0.0015,-0.0008,0.0017}, {0,5,-6,0,0,0,0,0,0,0,0,-2,2,1,0.0000,0.0006,0.0003,0.0000}, {0,-6,8,0,0,0,0,0,0,2,0,0,-2,1,-0.0017,-0.0004,-0.0002,0.0009}, {0,0,-1,0,-2,4,0,0,0,0,0,1,-1,1,0.0005,0.0003,0.0002,-0.0002}, {0,0,-1,0,1,0,0,0,0,0,0,1,-1,2,0.0000,0.0006,0.0003,0.0000}, {0,0,0,0,1,0,0,0,0,0,0,0,0,1,0.0020,-0.0070,-0.0037,-0.0011}, {0,0,1,0,1,0,0,0,0,0,0,-1,1,0,-0.0021,-0.0078,0.0000,0.0000}, {0,0,-10,15,0,0,0,0,0,0,0,2,-2,1,-0.0003,0.0000,0.0000,0.0001}, {0,0,8,-15,0,0,0,0,0,0,0,0,0,1,0.0015,-0.0007,-0.0004,-0.0008}, {0,20,-21,0,0,0,0,0,0,1,0,0,-2,0,0.0000,-0.0008,0.0000,0.0000}, {0,-20,20,0,0,0,0,0,0,-1,0,1,1,1,0.0005,0.0000,0.0000,-0.0003}, {0,0,1,0,-1,0,0,0,0,-1,0,0,1,0,-0.0053,0.0000,0.0000,0.0000}, {0,0,2,0,-1,-5,0,0,0,-2,0,0,2,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,6,-8,0,0,0,0,0,-2,0,0,2,0,-0.0015,0.0022,0.0000,0.0000}, {0,0,2,0,-3,0,0,0,0,-2,0,0,2,0,-0.0349,-0.0062,0.0000,0.0000}, {0,0,1,0,-3,0,0,0,0,-2,0,1,1,1,-0.0003,0.0007,0.0004,0.0002}, {0,0,1,0,-3,0,0,0,0,-2,0,1,1,0,0.0000,0.0003,0.0000,0.0000}, {0,0,-2,0,3,0,0,0,0,2,0,0,-2,1,0.0089,-0.0016,-0.0009,-0.0048}, {0,0,-6,8,0,0,0,0,0,2,0,0,-2,1,0.0003,0.0005,0.0003,-0.0002}, {0,0,2,0,-5,5,0,0,0,-2,0,0,2,0,0.0000,0.0003,0.0000,0.0000}, {0,2,-5,0,0,0,0,0,0,2,0,0,-2,0,0.0000,-0.0003,0.0000,0.0000}, {0,0,8,-15,0,0,0,0,0,1,0,-1,-1,0,-0.0003,0.0000,0.0000,0.0000}, {0,0,8,-15,0,0,0,0,0,0,0,0,0,0,0.0045,-0.0022,0.0000,0.0000}, {0,0,-9,15,0,0,0,0,0,0,0,1,-1,1,0.0000,0.0019,0.0010,0.0000}, {0,0,-8,15,0,0,0,0,1,0,0,0,0,0,0.0000,0.0008,-0.0004,0.0000}, {0,0,-8,15,0,0,0,0,2,0,0,0,0,0,-0.0014,0.0008,0.0003,0.0006}, {0,0,0,0,0,0,2,0,2,0,0,0,0,0,-0.0007,0.0000,0.0000,0.0003}, {0,0,0,0,0,0,2,0,1,0,0,0,0,0,0.0000,-0.0005,0.0003,0.0000}, {0,0,-1,0,0,0,2,0,0,0,0,1,-1,1,0.0000,-0.0008,-0.0004,-0.0001}, {0,0,1,0,1,0,0,0,0,0,0,-1,1,1,0.0000,-0.0004,-0.0002,0.0001}, {0,0,0,0,1,0,0,0,0,0,0,0,0,2,0.0000,-0.0003,-0.0001,0.0000}, {0,-6,7,0,0,0,0,0,0,2,0,1,-3,1,0.0000,0.0003,0.0001,0.0000}, {0,6,-8,0,0,0,0,0,0,-2,0,0,2,0,0.0078,-0.0018,0.0000,0.0000}, {0,5,-7,0,0,0,0,0,0,0,0,-1,1,1,-0.0003,0.0000,0.0000,0.0001}, {0,5,-6,0,0,0,0,0,0,0,0,-2,2,0,-0.0010,0.0233,0.0000,0.0000}, {0,0,1,0,0,1,0,0,0,0,0,-1,1,0,-0.0042,0.0020,0.0000,0.0000}, {0,0,0,0,0,1,0,0,0,0,0,0,0,1,0.0004,0.0024,0.0013,-0.0002}, {0,0,-1,0,0,1,0,0,0,0,0,1,-1,2,-0.0005,0.0000,0.0000,0.0002}, {0,0,9,-13,0,0,0,0,0,0,0,-2,2,0,-0.0003,-0.0005,0.0000,0.0000}, {0,0,5,-6,0,0,0,0,0,-2,0,0,2,1,-0.0006,0.0004,0.0002,0.0003}, {0,0,-1,0,1,-3,0,0,0,0,0,1,-1,1,0.0000,0.0003,0.0002,0.0000}, {0,17,-16,0,-2,0,0,0,0,1,0,0,-2,0,0.0000,0.0005,0.0000,0.0000}, {0,0,0,0,1,-2,0,0,0,0,0,0,0,0,0.0000,0.0003,0.0000,0.0000}, {0,0,-1,0,-1,2,0,0,0,0,0,1,-1,1,0.0000,-0.0008,-0.0004,0.0000}, {0,-3,5,0,0,0,0,0,0,0,0,0,0,2,0.0003,0.0000,0.0000,-0.0001}, {0,0,-9,17,0,0,0,0,0,0,0,0,0,1,-0.0003,-0.0004,-0.0002,0.0001}, {0,0,-1,0,0,2,0,0,0,0,0,1,-1,2,0.0011,0.0024,0.0011,-0.0005}, {0,0,1,0,0,2,0,0,0,0,0,-1,1,0,0.0000,0.0003,0.0000,0.0000}, {0,0,3,-4,0,0,0,0,0,-1,0,0,1,0,-0.0016,0.0008,0.0000,0.0000}, {0,0,0,0,0,0,0,2,2,0,0,0,0,0,-0.0006,0.0000,0.0000,0.0003}, {0,0,0,0,0,0,0,2,1,0,0,0,0,0,-0.0009,-0.0011,0.0006,-0.0005}, {0,0,-1,0,0,0,0,2,0,0,0,1,-1,1,-0.0017,-0.0019,-0.0010,0.0009}, {0,0,0,0,0,0,1,0,0,0,0,0,0,0,0.0000,0.0003,0.0000,0.0000}, {0,0,-1,0,0,0,-1,0,0,0,0,1,-1,1,0.0000,0.0004,0.0002,0.0000}, {0,0,-5,9,0,0,0,0,0,-2,0,2,0,2,0.0000,0.0003,0.0000,0.0000}, {0,0,2,0,-2,-2,0,0,0,-2,0,0,2,0,0.0004,0.0000,0.0000,0.0000}, {0,3,-4,0,0,0,0,0,0,-1,0,0,1,0,0.0000,0.0131,0.0000,0.0000}, {0,3,-5,0,0,0,0,0,0,-1,0,1,0,1,-0.0003,0.0000,0.0000,0.0002}, {0,0,-2,2,0,0,0,0,0,0,0,1,-1,2,0.0000,0.0015,0.0007,0.0000}, {0,0,-1,2,0,0,0,0,0,0,0,0,0,1,-0.0460,-0.0435,-0.0232,0.0246}, {0,0,0,2,0,0,0,0,0,0,0,-1,1,0,0.0266,-0.0078,0.0000,0.0000}, {0,0,2,0,-4,3,0,0,0,-2,0,0,2,0,-0.0006,-0.0009,0.0000,0.0000}, {0,3,-5,0,2,0,0,0,0,0,0,0,0,1,0.0013,0.0000,0.0000,-0.0007}, {0,0,2,0,-3,1,0,0,0,-2,0,0,2,0,0.0015,0.0000,0.0000,0.0000}, {0,3,-3,0,0,0,0,0,0,-2,0,0,2,2,0.0006,0.0000,0.0000,-0.0003}, {0,0,2,0,-4,5,0,0,0,-2,0,0,2,1,-0.0005,0.0000,0.0000,0.0003}, {0,8,-13,0,0,0,0,0,1,0,0,0,0,0,0.0005,-0.0006,0.0003,0.0003}, {0,8,-14,0,0,0,0,0,0,0,0,1,-1,1,0.0011,-0.0012,-0.0007,-0.0006}, {0,8,-13,0,0,0,0,0,0,0,0,0,0,0,0.0235,0.0334,0.0000,0.0000}, {0,-8,12,0,0,0,0,0,0,0,0,1,-1,1,0.1200,0.0598,0.0319,-0.0641}, {0,-8,13,0,0,0,0,0,1,0,0,0,0,0,0.0425,0.0212,-0.0133,0.0269}, {0,-8,11,0,0,0,0,0,0,0,0,2,-2,2,0.0000,0.0015,0.0006,0.0000}, {0,-8,13,0,0,0,0,0,2,0,0,0,0,0,-0.0041,0.0175,0.0076,0.0017}, {0,0,2,-2,0,0,0,0,0,-1,0,0,1,1,0.0005,0.0000,0.0000,-0.0003}, {0,18,-17,0,0,0,0,0,0,-1,0,1,-1,1,0.0000,-0.0006,-0.0003,0.0000}, {0,0,1,0,-2,0,0,0,0,-2,0,1,1,2,0.0000,-0.0008,-0.0002,0.0000}, {0,18,-16,0,0,0,0,0,0,-1,0,0,0,0,0.0226,0.0101,0.0000,0.0000}, {0,0,2,0,-2,0,0,0,0,-2,0,0,2,1,0.0284,0.0000,0.0000,-0.0151}, {0,0,1,0,1,-1,0,0,0,0,0,-1,1,0,0.0000,0.0024,0.0000,0.0000}, {0,3,-7,4,0,0,0,0,0,0,0,0,0,0,-0.0007,0.0000,0.0000,0.0000}, {0,0,2,0,0,-5,0,0,0,-2,0,0,2,1,0.0012,0.0000,0.0000,-0.0006}, {0,0,-1,0,-4,10,0,0,0,0,0,1,-1,1,0.0009,-0.0027,-0.0014,-0.0005}, {0,0,-1,0,2,0,0,0,0,1,0,0,-1,1,-0.0026,-0.0029,-0.0016,0.0014}, {0,2,-4,0,-3,0,0,0,0,0,0,1,-1,1,0.0000,-0.0013,-0.0007,0.0000}, {0,19,-21,3,0,0,0,0,0,1,0,0,-2,0,0.0103,-0.0060,0.0000,0.0000}, {0,0,3,-7,0,0,0,0,0,2,0,-1,-1,0,0.0026,-0.0009,0.0000,0.0000}, {0,0,0,0,-2,5,0,0,2,0,0,0,0,0,0.0011,-0.0024,-0.0011,-0.0009}, {0,0,0,0,-2,5,0,0,1,0,0,0,0,0,-0.1444,0.2409,-0.1286,-0.0771}, {0,0,-1,0,-2,5,0,0,0,0,0,1,-1,1,-0.3084,0.5123,0.2735,0.1647}, {0,0,0,0,2,-5,0,0,0,0,0,0,0,0,-0.0491,0.0128,0.0000,0.0000}, {0,0,-1,0,2,-5,0,0,0,0,0,1,-1,1,0.0031,-0.0481,-0.0257,-0.0017}, {0,0,0,0,2,-5,0,0,1,0,0,0,0,0,0.0014,-0.0218,0.0117,0.0008}, {0,0,0,0,2,-5,0,0,2,0,0,0,0,0,-0.0012,0.0000,0.0000,0.0000}, {0,-5,6,4,0,0,0,0,2,0,0,0,0,0,0.0003,0.0000,0.0000,0.0000}, {0,0,4,-8,1,5,0,0,2,0,0,0,0,0,0.0000,0.0006,0.0002,0.0000}, {0,0,-4,8,-3,0,0,0,1,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0002}, {0,0,-5,8,-3,0,0,0,0,0,0,1,-1,1,0.0099,0.0000,0.0000,-0.0053}, {0,0,4,-8,3,0,0,0,0,0,0,0,0,0,-0.0462,0.1604,0.0000,0.0000}, {0,0,0,0,-2,6,-3,0,2,0,0,0,0,0,-0.0003,0.0000,0.0000,0.0000}, {0,10,-3,0,0,0,0,0,0,-1,0,0,0,0,-0.0219,0.0089,0.0000,0.0000}, {0,0,3,-8,3,0,0,0,0,0,0,1,-1,1,-0.0114,0.0000,0.0000,0.0061}, {0,0,4,-8,3,0,0,0,1,0,0,0,0,0,0.0003,0.0000,0.0000,-0.0002}, {0,0,-4,8,-1,-5,0,0,2,0,0,0,0,0,0.0003,-0.0007,-0.0003,0.0000}, {0,0,0,0,0,0,-1,2,2,0,0,0,0,0,0.0000,0.0005,0.0000,0.0000}, {0,0,8,-16,4,5,0,0,2,0,0,0,0,0,0.0125,-0.0043,0.0000,-0.0054}, {0,0,-8,16,-4,-5,0,0,2,0,0,0,0,0,0.0056,-0.0117,-0.0042,-0.0040}, {0,0,8,-16,4,5,0,0,0,0,0,0,0,0,0.1440,0.0000,0.0000,0.0000}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }; u_short ge2000a_lunisolar_count = sizeof(ge2000a_lunisolar) / sizeof(ge2000a_lunisolar[0]) - 1; u_short ge2000a_planetary_count = sizeof(ge2000a_planetary) / sizeof(ge2000a_planetary[0]) - 1; nautic-1.5/src/config.h.in0000644000175000017500000000561611545160721015346 0ustar moellermoeller/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `libwx_gtk2u_xrc-2.8.so.0 libwx_gtk2u_html-2.8.so.0 libwx_gtk2u_qa-2.8.so.0 libwx_gtk2u_adv-2.8.so.0 libwx_gtk2u_core-2.8.so.0 libwx_baseu_xml-2.8.so.0 libwx_baseu_net-2.8.so.0 libwx_baseu-2.8.so.0 libstdc++.so.6 libm.so.6 libgomp.so.1 libgcc_s.so.1 libpthread.so.0 libc.so.6' library (-llibwx_gtk2u_xrc-2.8.so.0 libwx_gtk2u_html-2.8.so.0 libwx_gtk2u_qa-2.8.so.0 libwx_gtk2u_adv-2.8.so.0 libwx_gtk2u_core-2.8.so.0 libwx_baseu_xml-2.8.so.0 libwx_baseu_net-2.8.so.0 libwx_baseu-2.8.so.0 libstdc++.so.6 libm.so.6 libgomp.so.1 libgcc_s.so.1 libpthread.so.0 libc.so.6). */ #undef HAVE_LIBLIBWX_GTK2U_XRC_2_8_SO_0__LIBWX_GTK2U_HTML_2_8_SO_0__LIBWX_GTK2U_QA_2_8_SO_0_LIBWX_GTK2U_ADV_2_8_SO_0_______________LIBWX_GTK2U_CORE_2_8_SO_0_LIBWX_BASEU_XML_2_8_SO_0__LIBWX_BASEU_NET_2_8_SO_0_LIBWX_BASEU_2_8_SO_0_LIBSTDC___SO_6_______________LIBM_SO_6_LIBGOMP_SO_1_LIBGCC_S_SO_1_LIBPTHREAD_SO_0_LIBC_SO_6 /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_WX_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `unsigned int' if does not define. */ #undef size_t nautic-1.5/src/julian_date.cpp0000644000175000017500000000602311505427367016307 0ustar moellermoeller/* * julian_date.c - Implementation of routines for julian date conversions * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include "kepler.h" #include "julian_date.h" /* * Calculates the Julian Day Number for a date in the proleptic Gregorian * calendar. The Gregorian calendar reform is ignored and dates prior to * Jan. 1, 4800BC are not supported. * * year -- Year number using astronomical reckoning and after 4800BC. * month -- Month of the year. * day -- Day of the month. * jd -- The calculated Julian Day Number. * * Return: SUCCESS -- Julian date calculated successfully. * ERR_INVALID_DATE -- Gregorian date specified is invalid or out of range. */ int calendar_to_julian_date(int year, int month, int day, struct julian_date *jd) { int mm; if (year < -4799 || month < 1 || month > 12 || day < 1 || day > 31) return ERR_INVALID_DATE; mm = (month - 14) / 12; jd->date1 = MJD_EPOCH; jd->date2 = day + (1461 * (year + 4800 + mm)) / 4 + (367 * (month - 2 - mm * 12)) / 12 - (3 * ((year + 4900 + mm) / 100)) / 4 - 2432076; return SUCCESS; } /* * Calculates the date in the proleptic Gregorian calendar that corresponds to * the given Julian Day Number. The Gregorian calendar reform is ignored. * * jd -- The Julian Day Number. Must correspond to a date on or after * Jan. 1, 4800BC in the proleptic Gregorian calendar. * year -- Year number using astronomical reckoning. * month -- Month of the year. * day -- Day of the month. * day_fraction -- Fractional part of day (0 = midnight, 0.5 = noon). * * Return: SUCCESS -- Gregorian date calculated successfully. * ERR_INVALID_DATE -- Julian Day Number specified is out of range. */ int julian_to_calendar_date(struct julian_date *jd, int *year, int *month, int *day, double *day_fraction) { double j; int a,da,b,db,c,dc,g,dg,y,m,d; j = jd->date1 + jd->date2; if (j < -32044.5) return ERR_INVALID_DATE; j += 32044.5; g = j / 146097; dg = fmod(j, 146097); c = ((dg / 36524 + 1) * 3) / 4; dc = dg - c * 36524; b = dc / 1461; db = fmod(dc, 1461); a = ((db / 365 + 1) * 3) / 4; da = db - a * 365; y = g * 400 + c * 100 + b * 4 + a; m = (da * 5 + 308) / 153 - 2; d = da - ((m + 4) * 153) / 5 + 122; *year = y - 4800 + (m + 2) / 12; *month = fmod(m + 2, 12) + 1; *day = d + 1; *day_fraction = fmod(jd->date1 + jd->date2 + 0.5, 1.0); return SUCCESS; }nautic-1.5/src/spa.cpp0000644000175000017500000006472711551377102014622 0ustar moellermoeller//Solar Position Algorithm (SPA) // //for Solar Radiation Application // // // //May 12, 2003 // // // //Filename: SPA.H // //Afshin Michael Andreas // //afshin_andreas@nrel.gov (303)384-6383 // // //Measurement & Instrumentation Team //Solar Radiation Research Laboratory // //National Renewable Energy Laboratory // //1617 Cole Blvd, Golden, CO 80401 #include #include "spa.h" #define SUN_RADIUS 0.26667 #define L_COUNT 6 #define B_COUNT 2 #define R_COUNT 5 #define Y_COUNT 63 #define L_MAX_SUBCOUNT 64 #define B_MAX_SUBCOUNT 5 #define R_MAX_SUBCOUNT 40 enum {TERM_A, TERM_B, TERM_C, TERM_COUNT}; enum {TERM_X0, TERM_X1, TERM_X2, TERM_X3, TERM_X4, TERM_X_COUNT}; enum {TERM_PSI_A, TERM_PSI_B, TERM_EPS_C, TERM_EPS_D, TERM_PE_COUNT}; enum {JD_MINUS, JD_ZERO, JD_PLUS, JD_COUNT}; enum {SUN_TRANSIT, SUN_RISE, SUN_SET, SUN_COUNT}; #define TERM_Y_COUNT TERM_X_COUNT const int l_subcount[L_COUNT] = {64,34,20,7,3,1}; const int b_subcount[B_COUNT] = {5,2}; const int r_subcount[R_COUNT] = {40,10,6,2,1}; /////////////////////////////////////////////////// /////////////////////////////////////////////////// /// Earth Periodic Terms /////////////////////////////////////////////////// const double L_TERMS[L_COUNT][L_MAX_SUBCOUNT][TERM_COUNT]= { { {175347046.0,0,0}, {3341656.0,4.6692568,6283.07585}, {34894.0,4.6261,12566.1517}, {3497.0,2.7441,5753.3849}, {3418.0,2.8289,3.5231}, {3136.0,3.6277,77713.7715}, {2676.0,4.4181,7860.4194}, {2343.0,6.1352,3930.2097}, {1324.0,0.7425,11506.7698}, {1273.0,2.0371,529.691}, {1199.0,1.1096,1577.3435}, {990,5.233,5884.927}, {902,2.045,26.298}, {857,3.508,398.149}, {780,1.179,5223.694}, {753,2.533,5507.553}, {505,4.583,18849.228}, {492,4.205,775.523}, {357,2.92,0.067}, {317,5.849,11790.629}, {284,1.899,796.298}, {271,0.315,10977.079}, {243,0.345,5486.778}, {206,4.806,2544.314}, {205,1.869,5573.143}, {202,2.458,6069.777}, {156,0.833,213.299}, {132,3.411,2942.463}, {126,1.083,20.775}, {115,0.645,0.98}, {103,0.636,4694.003}, {102,0.976,15720.839}, {102,4.267,7.114}, {99,6.21,2146.17}, {98,0.68,155.42}, {86,5.98,161000.69}, {85,1.3,6275.96}, {85,3.67,71430.7}, {80,1.81,17260.15}, {79,3.04,12036.46}, {75,1.76,5088.63}, {74,3.5,3154.69}, {74,4.68,801.82}, {70,0.83,9437.76}, {62,3.98,8827.39}, {61,1.82,7084.9}, {57,2.78,6286.6}, {56,4.39,14143.5}, {56,3.47,6279.55}, {52,0.19,12139.55}, {52,1.33,1748.02}, {51,0.28,5856.48}, {49,0.49,1194.45}, {41,5.37,8429.24}, {41,2.4,19651.05}, {39,6.17,10447.39}, {37,6.04,10213.29}, {37,2.57,1059.38}, {36,1.71,2352.87}, {36,1.78,6812.77}, {33,0.59,17789.85}, {30,0.44,83996.85}, {30,2.74,1349.87}, {25,3.16,4690.48} }, { {628331966747.0,0,0}, {206059.0,2.678235,6283.07585},//{628331966747.0,0,0},//{206059.0,2.678235,6283.07585} {4303.0,2.6351,12566.1517}, {425.0,1.59,3.523}, {119.0,5.796,26.298}, {109.0,2.966,1577.344}, {93,2.59,18849.23}, {72,1.14,529.69}, {68,1.87,398.15}, {67,4.41,5507.55}, {59,2.89,5223.69}, {56,2.17,155.42}, {45,0.4,796.3}, {36,0.47,775.52}, {29,2.65,7.11}, {21,5.34,0.98}, {19,1.85,5486.78}, {19,4.97,213.3}, {17,2.99,6275.96}, {16,0.03,2544.31}, {16,1.43,2146.17}, {15,1.21,10977.08}, {12,2.83,1748.02}, {12,3.26,5088.63}, {12,5.27,1194.45}, {12,2.08,4694}, {11,0.77,553.57}, {10,1.3,6286.6}, {10,4.24,1349.87}, {9,2.7,242.73}, {9,5.64,951.72}, {8,5.3,2352.87}, {6,2.65,9437.76}, {6,4.67,4690.48} }, { {52919.0,0,0}, {8720.0,1.0721,6283.0758}, {309.0,0.867,12566.152}, {27,0.05,3.52}, {16,5.19,26.3}, {16,3.68,155.42}, {10,0.76,18849.23}, {9,2.06,77713.77}, {7,0.83,775.52}, {5,4.66,1577.34}, {4,1.03,7.11}, {4,3.44,5573.14}, {3,5.14,796.3}, {3,6.05,5507.55}, {3,1.19,242.73}, {3,6.12,529.69}, {3,0.31,398.15}, {3,2.28,553.57}, {2,4.38,5223.69}, {2,3.75,0.98} }, { {289.0,5.844,6283.076}, {35,0,0}, {17,5.49,12566.15}, {3,5.2,155.42}, {1,4.72,3.52}, {1,5.3,18849.23}, {1,5.97,242.73} }, { {114.0,3.142,0}, {8,4.13,6283.08}, {1,3.84,12566.15} }, { {1,3.14,0} } }; const double B_TERMS[B_COUNT][B_MAX_SUBCOUNT][TERM_COUNT]= { { {280.0,3.199,84334.662}, {102.0,5.422,5507.553}, {80,3.88,5223.69}, {44,3.7,2352.87}, {32,4,1577.34} }, { {9,3.9,5507.55}, {6,1.73,5223.69} } }; const double R_TERMS[R_COUNT][R_MAX_SUBCOUNT][TERM_COUNT]= { { {100013989.0,0,0}, {1670700.0,3.0984635,6283.07585}, {13956.0,3.05525,12566.1517}, {3084.0,5.1985,77713.7715}, {1628.0,1.1739,5753.3849}, {1576.0,2.8469,7860.4194}, {925.0,5.453,11506.77}, {542.0,4.564,3930.21}, {472.0,3.661,5884.927}, {346.0,0.964,5507.553}, {329.0,5.9,5223.694}, {307.0,0.299,5573.143}, {243.0,4.273,11790.629}, {212.0,5.847,1577.344}, {186.0,5.022,10977.079}, {175.0,3.012,18849.228}, {110.0,5.055,5486.778}, {98,0.89,6069.78}, {86,5.69,15720.84}, {86,1.27,161000.69}, {65,0.27,17260.15}, {63,0.92,529.69}, {57,2.01,83996.85}, {56,5.24,71430.7}, {49,3.25,2544.31}, {47,2.58,775.52}, {45,5.54,9437.76}, {43,6.01,6275.96}, {39,5.36,4694}, {38,2.39,8827.39}, {37,0.83,19651.05}, {37,4.9,12139.55}, {36,1.67,12036.46}, {35,1.84,2942.46}, {33,0.24,7084.9}, {32,0.18,5088.63}, {32,1.78,398.15}, {28,1.21,6286.6}, {28,1.9,6279.55}, {26,4.59,10447.39} }, { {103019.0,1.10749,6283.07585}, {1721.0,1.0644,12566.1517}, {702.0,3.142,0}, {32,1.02,18849.23}, {31,2.84,5507.55}, {25,1.32,5223.69}, {18,1.42,1577.34}, {10,5.91,10977.08}, {9,1.42,6275.96}, {9,0.27,5486.78} }, { {4359.0,5.7846,6283.0758}, {124.0,5.579,12566.152}, {12,3.14,0}, {9,3.63,77713.77}, {6,1.87,5573.14}, {3,5.47,18849.23} }, { {145.0,4.273,6283.076}, {7,3.92,12566.15} }, { {4,2.56,6283.08} } }; //////////////////////////////////////////////////////////////// /// Periodic Terms for the nutation in longitude and obliquity //////////////////////////////////////////////////////////////// const int Y_TERMS[Y_COUNT][TERM_Y_COUNT]= { {0,0,0,0,1}, {-2,0,0,2,2}, {0,0,0,2,2}, {0,0,0,0,2}, {0,1,0,0,0}, {0,0,1,0,0}, {-2,1,0,2,2}, {0,0,0,2,1}, {0,0,1,2,2}, {-2,-1,0,2,2}, {-2,0,1,0,0}, {-2,0,0,2,1}, {0,0,-1,2,2}, {2,0,0,0,0}, {0,0,1,0,1}, {2,0,-1,2,2}, {0,0,-1,0,1}, {0,0,1,2,1}, {-2,0,2,0,0}, {0,0,-2,2,1}, {2,0,0,2,2}, {0,0,2,2,2}, {0,0,2,0,0}, {-2,0,1,2,2}, {0,0,0,2,0}, {-2,0,0,2,0}, {0,0,-1,2,1}, {0,2,0,0,0}, {2,0,-1,0,1}, {-2,2,0,2,2}, {0,1,0,0,1}, {-2,0,1,0,1}, {0,-1,0,0,1}, {0,0,2,-2,0}, {2,0,-1,2,1}, {2,0,1,2,2}, {0,1,0,2,2}, {-2,1,1,0,0}, {0,-1,0,2,2}, {2,0,0,2,1}, {2,0,1,0,0}, {-2,0,2,2,2}, {-2,0,1,2,1}, {2,0,-2,0,1}, {2,0,0,0,1}, {0,-1,1,0,0}, {-2,-1,0,2,1}, {-2,0,0,0,1}, {0,0,2,2,1}, {-2,0,2,0,1}, {-2,1,0,2,1}, {0,0,1,-2,0}, {-1,0,1,0,0}, {-2,1,0,0,0}, {1,0,0,0,0}, {0,0,1,2,0}, {0,0,-2,2,2}, {-1,-1,1,0,0}, {0,1,1,0,0}, {0,-1,1,2,2}, {2,-1,-1,2,2}, {0,0,3,2,2}, {2,-1,0,2,2}, }; const double PE_TERMS[Y_COUNT][TERM_PE_COUNT]= { {-171996,-174.2,92025,8.9}, {-13187,-1.6,5736,-3.1}, {-2274,-0.2,977,-0.5}, {2062,0.2,-895,0.5}, {1426,-3.4,54,-0.1}, {712,0.1,-7,0}, {-517,1.2,224,-0.6}, {-386,-0.4,200,0}, {-301,0,129,-0.1}, {217,-0.5,-95,0.3}, {-158,0,0,0}, {129,0.1,-70,0}, {123,0,-53,0}, {63,0,0,0}, {63,0.1,-33,0}, {-59,0,26,0}, {-58,-0.1,32,0}, {-51,0,27,0}, {48,0,0,0}, {46,0,-24,0}, {-38,0,16,0}, {-31,0,13,0}, {29,0,0,0}, {29,0,-12,0}, {26,0,0,0}, {-22,0,0,0}, {21,0,-10,0}, {17,-0.1,0,0}, {16,0,-8,0}, {-16,0.1,7,0}, {-15,0,9,0}, {-13,0,7,0}, {-12,0,6,0}, {11,0,0,0}, {-10,0,5,0}, {-8,0,3,0}, {7,0,-3,0}, {-7,0,0,0}, {-7,0,3,0}, {-7,0,3,0}, {6,0,0,0}, {6,0,-3,0}, {6,0,-3,0}, {-6,0,3,0}, {-6,0,3,0}, {5,0,0,0}, {-5,0,3,0}, {-5,0,3,0}, {-5,0,3,0}, {4,0,0,0}, {4,0,0,0}, {4,0,0,0}, {-4,0,0,0}, {-4,0,0,0}, {-4,0,0,0}, {3,0,0,0}, {-3,0,0,0}, {-3,0,0,0}, {-3,0,0,0}, {-3,0,0,0}, {-3,0,0,0}, {-3,0,0,0}, {-3,0,0,0}, }; ///////////////////////////////////////////////////////////////////////////////////////////// double rad2deg(double radians) { return (180.0/PI)*radians; } double deg2rad(double degrees) { return (PI/180.0)*degrees; } double limit_degrees(double degrees) { double limited; degrees /= 360.0; limited = 360.0*(degrees-floor(degrees)); if (limited < 0) limited += 360.0; return limited; } double limit_degrees180pm(double degrees) { double limited; degrees /= 360.0; limited = 360.0*(degrees-floor(degrees)); if (limited < -180.0) limited += 360.0; else if (limited > 180.0) limited -= 360.0; return limited; } double limit_degrees180(double degrees) { double limited; degrees /= 180.0; limited = 180.0*(degrees-floor(degrees)); if (limited < 0) limited += 180.0; return limited; } double limit_zero2one(double value) { double limited; limited = value - floor(value); if (limited < 0) limited += 1.0; return limited; } double limit_minutes(double minutes) { double limited=minutes; if (limited < -20.0) limited += 1440.0; else if (limited > 20.0) limited -= 1440.0; return limited; } double dayfrac_to_local_hr(double dayfrac, double timezone) { return 24.0*limit_zero2one(dayfrac + timezone/24.0); } double third_order_polynomial(double a, double b, double c, double d, double x) { return ((a*x + b)*x + c)*x + d; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////// int validate_inputs(spa_data *spa) { if ((spa->year < -2000) || (spa->year > 6000)) return 1; if ((spa->month < 1 ) || (spa->month > 12 )) return 2; if ((spa->day < 1 ) || (spa->day > 31 )) return 3; if ((spa->hour < 0 ) || (spa->hour > 24 )) return 4; if ((spa->minute < 0 ) || (spa->minute > 59 )) return 5; if ((spa->second < 0 ) || (spa->second > 59 )) return 6; if ((spa->pressure < 0 ) || (spa->pressure > 5000)) return 12; if ((spa->temperature <= -273) || (spa->temperature > 6000)) return 13; if ((spa->hour == 24 ) && (spa->minute > 0 )) return 5; if ((spa->hour == 24 ) && (spa->second > 0 )) return 6; if (fabs(spa->delta_t) > 8000 ) return 7; if (fabs(spa->timezone) > 12 ) return 8; if (fabs(spa->longitude) > 180 ) return 9; if (fabs(spa->latitude) > 90 ) return 10; if (fabs(spa->atmos_refract)> 5 ) return 16; if ( spa->elevation < -6500000) return 11; if ((spa->function == SPA_ZA_INC) || (spa->function == SPA_ALL)) { if (fabs(spa->slope) > 360) return 14; if (fabs(spa->azm_rotation) > 360) return 15; } return 0; } /////////////////////////////////////////////////////////////////////////////////////////////// double julian_day (int year, int month, int day, int hour, int minute, int second, double tz) { double day_decimal, julian_day, a; day_decimal = day + (hour - tz + (minute + second/60.0)/60.0)/24.0; if (month < 3) { month += 12; year--; } julian_day = floor(365.25*(year+4716.0)) + floor(30.6001*(month+1)) + day_decimal - 1524.5; if (julian_day > 2299160.0) { a = floor(year/100); julian_day += (2 - a + floor(a/4)); } return julian_day; } double julian_century(double jd) { return (jd-2451545.0)/36525.0; } double julian_ephemeris_day(double jd, double delta_t) { return jd+delta_t/86400.0; } double julian_ephemeris_century(double jde) { return (jde - 2451545.0)/36525.0; } double julian_ephemeris_millennium(double jce) { return (jce/10.0); } double earth_periodic_term_summation(const double terms[][TERM_COUNT], int count, double jme) { int i; double sum=0; for (i = 0; i < count; i++) sum += terms[i][TERM_A]*cos(terms[i][TERM_B]+terms[i][TERM_C]*jme); return sum; } double earth_values(double term_sum[], int count, double jme) { int i; double sum=0; for (i = 0; i < count; i++) sum += term_sum[i]*pow(jme, i); sum /= 1.0e8; return sum; } double earth_heliocentric_longitude(double jme) { double sum[L_COUNT]; int i; for (i = 0; i < L_COUNT; i++) sum[i] = earth_periodic_term_summation(L_TERMS[i], l_subcount[i], jme); return limit_degrees(rad2deg(earth_values(sum, L_COUNT, jme))); } double earth_heliocentric_latitude(double jme) { double sum[B_COUNT]; int i; for (i = 0; i < B_COUNT; i++) sum[i] = earth_periodic_term_summation(B_TERMS[i], b_subcount[i], jme); return rad2deg(earth_values(sum, B_COUNT, jme)); } double earth_radius_vector(double jme) { double sum[R_COUNT]; int i; for (i = 0; i < R_COUNT; i++) sum[i] = earth_periodic_term_summation(R_TERMS[i], r_subcount[i], jme); return earth_values(sum, R_COUNT, jme); } double geocentric_longitude(double l) { double theta = l + 180.0; if (theta >= 360.0) theta -= 360.0; return theta; } double geocentric_latitude(double b) { return -b; } double mean_elongation_moon_sun(double jce) { return third_order_polynomial(1.0/189474.0, -0.0019142, 445267.11148, 297.85036, jce); } double mean_anomaly_sun(double jce) { return third_order_polynomial(-1.0/300000.0, -0.0001603, 35999.05034, 357.52772, jce); } double mean_anomaly_moon(double jce) { return third_order_polynomial(1.0/56250.0, 0.0086972, 477198.867398, 134.96298, jce); } double argument_latitude_moon(double jce) { return third_order_polynomial(1.0/327270.0, -0.0036825, 483202.017538, 93.27191, jce); } double ascending_longitude_moon(double jce) { return third_order_polynomial(1.0/450000.0, 0.0020708, -1934.136261, 125.04452, jce); } double xy_term_summation(int i, double x[TERM_X_COUNT]) { int j; double sum=0; for (j = 0; j < TERM_Y_COUNT; j++) sum += x[j]*Y_TERMS[i][j]; return sum; } void nutation_longitude_and_obliquity(double jce, double x[TERM_X_COUNT], double *del_psi, double *del_epsilon) { int i; double xy_term_sum, sum_psi=0, sum_epsilon=0; for (i = 0; i < Y_COUNT; i++) { xy_term_sum = deg2rad(xy_term_summation(i, x)); sum_psi += (PE_TERMS[i][TERM_PSI_A] + jce*PE_TERMS[i][TERM_PSI_B])*sin(xy_term_sum); sum_epsilon += (PE_TERMS[i][TERM_EPS_C] + jce*PE_TERMS[i][TERM_EPS_D])*cos(xy_term_sum); } *del_psi = sum_psi / 36000000.0; *del_epsilon = sum_epsilon / 36000000.0; } double ecliptic_mean_obliquity(double jme) { double u = jme/10.0; return 84381.448 + u*(-4680.96 + u*(-1.55 + u*(1999.25 + u*(-51.38 + u*(-249.67 + u*( -39.05 + u*( 7.12 + u*( 27.87 + u*( 5.79 + u*2.45))))))))); } double ecliptic_true_obliquity(double delta_epsilon, double epsilon0) { return delta_epsilon + epsilon0/3600.0; } double aberration_correction(double r) { return -20.4898 / (3600.0*r); } double apparent_sun_longitude(double theta, double delta_psi, double delta_tau) { return theta + delta_psi + delta_tau; } double greenwich_mean_sidereal_time (double jd, double jc) { return limit_degrees(280.46061837 + 360.98564736629 * (jd - 2451545.0) + jc*jc*(0.000387933 - jc/38710000.0)); } double greenwich_sidereal_time (double nu0, double delta_psi, double epsilon) { return nu0 + delta_psi*cos(deg2rad(epsilon)); } double geocentric_sun_right_ascension(double lamda, double epsilon, double beta) { double lamda_rad = deg2rad(lamda); double epsilon_rad = deg2rad(epsilon); return limit_degrees(rad2deg(atan2(sin(lamda_rad)*cos(epsilon_rad) - tan(deg2rad(beta))*sin(epsilon_rad), cos(lamda_rad)))); } double geocentric_sun_declination(double beta, double epsilon, double lamda) { double beta_rad = deg2rad(beta); double epsilon_rad = deg2rad(epsilon); return rad2deg(asin(sin(beta_rad)*cos(epsilon_rad) + cos(beta_rad)*sin(epsilon_rad)*sin(deg2rad(lamda)))); } double observer_hour_angle(double nu, double longitude, double alpha_deg) { return limit_degrees(nu + longitude - alpha_deg); } double sun_equatorial_horizontal_parallax(double r) { return 8.794 / (3600.0 * r); } void sun_right_ascension_parallax_and_topocentric_dec(double latitude, double elevation, double xi, double h, double delta, double *delta_alpha, double *delta_prime) { double delta_alpha_rad; double lat_rad = deg2rad(latitude); double xi_rad = deg2rad(xi); double h_rad = deg2rad(h); double delta_rad = deg2rad(delta); double u = atan(0.99664719 * tan(lat_rad)); double y = 0.99664719 * sin(u) + elevation*sin(lat_rad)/6378140.0; double x = cos(u) + elevation*cos(lat_rad)/6378140.0; delta_alpha_rad = atan2(- x*sin(xi_rad) *sin(h_rad), cos(delta_rad) - x*sin(xi_rad) *cos(h_rad)); *delta_prime = rad2deg(atan2((sin(delta_rad) - y*sin(xi_rad))*cos(delta_alpha_rad), cos(delta_rad) - x*sin(xi_rad) *cos(h_rad))); *delta_alpha = rad2deg(delta_alpha_rad); } double topocentric_sun_right_ascension(double alpha_deg, double delta_alpha) { return alpha_deg + delta_alpha; } double topocentric_local_hour_angle(double h, double delta_alpha) { return h - delta_alpha; } double topocentric_elevation_angle(double latitude, double delta_prime, double h_prime) { double lat_rad = deg2rad(latitude); double delta_prime_rad = deg2rad(delta_prime); return rad2deg(asin(sin(lat_rad)*sin(delta_prime_rad) + cos(lat_rad)*cos(delta_prime_rad) * cos(deg2rad(h_prime)))); } double atmospheric_refraction_correction(double pressure, double temperature, double atmos_refract, double e0) { double del_e = 0; if (e0 >= -1*(SUN_RADIUS + atmos_refract)) del_e = (pressure / 1010.0) * (283.0 / (273.0 + temperature)) * 1.02 / (60.0 * tan(deg2rad(e0 + 10.3/(e0 + 5.11)))); return del_e; } double topocentric_elevation_angle_corrected(double e0, double delta_e) { return e0 + delta_e; } double topocentric_zenith_angle(double e) { return 90.0 - e; } double topocentric_azimuth_angle_neg180_180(double h_prime, double latitude, double delta_prime) { double h_prime_rad = deg2rad(h_prime); double lat_rad = deg2rad(latitude); return rad2deg(atan2(sin(h_prime_rad), cos(h_prime_rad)*sin(lat_rad) - tan(deg2rad(delta_prime))*cos(lat_rad))); } double topocentric_azimuth_angle_zero_360(double azimuth180) { return azimuth180 + 180.0; } double surface_incidence_angle(double zenith, double azimuth180, double azm_rotation, double slope) { double zenith_rad = deg2rad(zenith); double slope_rad = deg2rad(slope); return rad2deg(acos(cos(zenith_rad)*cos(slope_rad) + sin(slope_rad )*sin(zenith_rad) * cos(deg2rad(azimuth180 - azm_rotation)))); } double sun_mean_longitude(double jme) { return limit_degrees(280.4664567 + jme*(360007.6982779 + jme*(0.03032028 + jme*(1/49931.0 + jme*(-1/15300.0 + jme*(-1/2000000.0)))))); } double eot(double m, double alpha, double del_psi, double epsilon) { return limit_minutes(4.0*(m - 0.0057183 - alpha + del_psi*cos(deg2rad(epsilon)))); } double approx_sun_transit_time(double alpha_zero, double longitude, double nu) { return (alpha_zero - longitude - nu) / 360.0; } double sun_hour_angle_at_rise_set(double latitude, double delta_zero, double h0_prime) { double h0 = -99999; double latitude_rad = deg2rad(latitude); double delta_zero_rad = deg2rad(delta_zero); double argument = (sin(deg2rad(h0_prime)) - sin(latitude_rad)*sin(delta_zero_rad)) / (cos(latitude_rad)*cos(delta_zero_rad)); if (fabs(argument) <= 1) h0 = limit_degrees180(rad2deg(acos(argument))); return h0; } void approx_sun_rise_and_set(double *m_rts, double h0) { double h0_dfrac = h0/360.0; m_rts[SUN_RISE] = limit_zero2one(m_rts[SUN_TRANSIT] - h0_dfrac); m_rts[SUN_SET] = limit_zero2one(m_rts[SUN_TRANSIT] + h0_dfrac); m_rts[SUN_TRANSIT] = limit_zero2one(m_rts[SUN_TRANSIT]); } double rts_alpha_delta_prime(double *ad, double n) { double a = ad[JD_ZERO] - ad[JD_MINUS]; double b = ad[JD_PLUS] - ad[JD_ZERO]; if (fabs(a) >= 2.0) a = limit_zero2one(a); if (fabs(b) >= 2.0) b = limit_zero2one(b); return ad[JD_ZERO] + n * (a + b + (b-a)*n)/2.0; } double rts_sun_altitude(double latitude, double delta_prime, double h_prime) { double latitude_rad = deg2rad(latitude); double delta_prime_rad = deg2rad(delta_prime); return rad2deg(asin(sin(latitude_rad)*sin(delta_prime_rad) + cos(latitude_rad)*cos(delta_prime_rad)*cos(deg2rad(h_prime)))); } double sun_rise_and_set(double *m_rts, double *h_rts, double *delta_prime, double latitude, double *h_prime, double h0_prime, int sun) { return m_rts[sun] + (h_rts[sun] - h0_prime) /(360.0*cos(deg2rad(delta_prime[sun]))*cos(deg2rad(latitude)) *sin(deg2rad(h_prime[sun]))); } //////////////////////////////////////////////////////////////////////////////////////////////// // Calculate required SPA parameters to get the right ascension (alpha) and declination (delta) // Note: JD must be already calculated and in structure //////////////////////////////////////////////////////////////////////////////////////////////// void calculate_geocentric_sun_right_ascension_and_declination(spa_data *spa) { double x[TERM_X_COUNT]; spa->jc = julian_century(spa->jd); spa->jde = julian_ephemeris_day(spa->jd, spa->delta_t); spa->jce = julian_ephemeris_century(spa->jde); spa->jme = julian_ephemeris_millennium(spa->jce); spa->l = earth_heliocentric_longitude(spa->jme); spa->b = earth_heliocentric_latitude(spa->jme); spa->r = earth_radius_vector(spa->jme); spa->theta = geocentric_longitude(spa->l); spa->beta = geocentric_latitude(spa->b); x[TERM_X0] = spa->x0 = mean_elongation_moon_sun(spa->jce); x[TERM_X1] = spa->x1 = mean_anomaly_sun(spa->jce); x[TERM_X2] = spa->x2 = mean_anomaly_moon(spa->jce); x[TERM_X3] = spa->x3 = argument_latitude_moon(spa->jce); x[TERM_X4] = spa->x4 = ascending_longitude_moon(spa->jce); nutation_longitude_and_obliquity(spa->jce, x, &(spa->del_psi), &(spa->del_epsilon)); spa->epsilon0 = ecliptic_mean_obliquity(spa->jme); spa->epsilon = ecliptic_true_obliquity(spa->del_epsilon, spa->epsilon0); spa->del_tau = aberration_correction(spa->r); spa->lamda = apparent_sun_longitude(spa->theta, spa->del_psi, spa->del_tau); spa->nu0 = greenwich_mean_sidereal_time (spa->jd, spa->jc); spa->nu = greenwich_sidereal_time (spa->nu0, spa->del_psi, spa->epsilon); spa->alpha = geocentric_sun_right_ascension(spa->lamda, spa->epsilon, spa->beta); spa->delta = geocentric_sun_declination(spa->beta, spa->epsilon, spa->lamda); } void calculate_eot_and_sun_rise_transit_set(spa_data *spa) { spa_data sun_rts = *spa; double nu, m, h0, n; double alpha[JD_COUNT], delta[JD_COUNT]; double m_rts[SUN_COUNT], nu_rts[SUN_COUNT], h_rts[SUN_COUNT]; double alpha_prime[SUN_COUNT], delta_prime[SUN_COUNT], h_prime[SUN_COUNT]; double h0_prime = -1*(SUN_RADIUS + spa->atmos_refract); int i; m = sun_mean_longitude(spa->jme); spa->eot = eot(m, spa->alpha, spa->del_psi, spa->epsilon); sun_rts.hour = sun_rts.minute = sun_rts.second = sun_rts.timezone = 0; sun_rts.jd = julian_day (sun_rts.year, sun_rts.month, sun_rts.day, sun_rts.hour, sun_rts.minute, sun_rts.second, sun_rts.timezone); calculate_geocentric_sun_right_ascension_and_declination(&sun_rts); nu = sun_rts.nu; sun_rts.delta_t = 0; sun_rts.jd--; for (i = 0; i < JD_COUNT; i++) { calculate_geocentric_sun_right_ascension_and_declination(&sun_rts); alpha[i] = sun_rts.alpha; delta[i] = sun_rts.delta; sun_rts.jd++; } m_rts[SUN_TRANSIT] = approx_sun_transit_time(alpha[JD_ZERO], spa->longitude, nu); h0 = sun_hour_angle_at_rise_set(spa->latitude, delta[JD_ZERO], h0_prime); if (h0 >= 0) { approx_sun_rise_and_set(m_rts, h0); for (i = 0; i < SUN_COUNT; i++) { nu_rts[i] = nu + 360.985647*m_rts[i]; n = m_rts[i] + spa->delta_t/86400.0; alpha_prime[i] = rts_alpha_delta_prime(alpha, n); delta_prime[i] = rts_alpha_delta_prime(delta, n); h_prime[i] = limit_degrees180pm(nu_rts[i] + spa->longitude - alpha_prime[i]); h_rts[i] = rts_sun_altitude(spa->latitude, delta_prime[i], h_prime[i]); } spa->srha = h_prime[SUN_RISE]; spa->ssha = h_prime[SUN_SET]; spa->sta = h_rts[SUN_TRANSIT]; spa->suntransit = dayfrac_to_local_hr(m_rts[SUN_TRANSIT] - h_prime[SUN_TRANSIT] / 360.0, spa->timezone); spa->sunrise = dayfrac_to_local_hr(sun_rise_and_set(m_rts, h_rts, delta_prime, spa->latitude, h_prime, h0_prime, SUN_RISE), spa->timezone); spa->sunset = dayfrac_to_local_hr(sun_rise_and_set(m_rts, h_rts, delta_prime, spa->latitude, h_prime, h0_prime, SUN_SET), spa->timezone); } else spa->srha= spa->ssha= spa->sta= spa->suntransit= spa->sunrise= spa->sunset= -99999; } /////////////////////////////////////////////////////////////////////////////////////////// // Calculate all SPA parameters and put into structure // Note: All inputs values (listed in header file) must already be in structure /////////////////////////////////////////////////////////////////////////////////////////// int spa_calculate(spa_data *spa) { int result; result = validate_inputs(spa); if (result == 0) { spa->jd = julian_day (spa->year, spa->month, spa->day, spa->hour, spa->minute, spa->second, spa->timezone); calculate_geocentric_sun_right_ascension_and_declination(spa); spa->h = observer_hour_angle(spa->nu, spa->longitude, spa->alpha); spa->xi = sun_equatorial_horizontal_parallax(spa->r); sun_right_ascension_parallax_and_topocentric_dec(spa->latitude, spa->elevation, spa->xi, spa->h, spa->delta, &(spa->del_alpha), &(spa->delta_prime)); spa->alpha_prime = topocentric_sun_right_ascension(spa->alpha, spa->del_alpha); spa->h_prime = topocentric_local_hour_angle(spa->h, spa->del_alpha); spa->e0 = topocentric_elevation_angle(spa->latitude, spa->delta_prime, spa->h_prime); spa->del_e = atmospheric_refraction_correction(spa->pressure, spa->temperature, spa->atmos_refract, spa->e0); spa->e = topocentric_elevation_angle_corrected(spa->e0, spa->del_e); spa->zenith = topocentric_zenith_angle(spa->e); spa->azimuth180 = topocentric_azimuth_angle_neg180_180(spa->h_prime, spa->latitude, spa->delta_prime); spa->azimuth = topocentric_azimuth_angle_zero_360(spa->azimuth180); if ((spa->function == SPA_ZA_INC) || (spa->function == SPA_ALL)) spa->incidence = surface_incidence_angle(spa->zenith, spa->azimuth180, spa->azm_rotation, spa->slope); if ((spa->function == SPA_ZA_RTS) || (spa->function == SPA_ALL)) calculate_eot_and_sun_rise_transit_set(spa); } return result; } nautic-1.5/src/gui.cpp0000644000175000017500000013321411747667313014624 0ustar moellermoeller/* gui.cpp implementation of Graphical user interface Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "gui.h" /////////////////////////////////////////////////////////////////////////// //MainDialogBase::MainDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) MainDialogBase::MainDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxIcon * icon = new wxIcon(_("/usr/share/pixmaps/sext.xpm"),wxBITMAP_TYPE_XPM ,30,30); this->SetIcon(*icon); m_timer= new wxTimer();//il mio timer ///////////////////////////////////////////menu data///////////////////////////////////////////////// m_menubar2 = new wxMenuBar( 0 ); m_menu5 = new wxMenu(); wxMenuItem* m_menuItem11; m_menuItem11 = new wxMenuItem( m_menu5, wxID_ANY, wxString( wxT("Save pos. line") ) , wxEmptyString, wxITEM_NORMAL ); m_menu5->Append( m_menuItem11 ); wxMenuItem* m_menuItem12; m_menuItem12 = new wxMenuItem( m_menu5, wxID_ANY, wxString( wxT("Cancel pos. lines") ) , wxEmptyString, wxITEM_NORMAL ); m_menu5->Append( m_menuItem12 ); m_menubar2->Append( m_menu5, wxT("Position lines") ); m_menu6 = new wxMenu(); wxMenuItem* m_menuItem14; m_menuItem14 = new wxMenuItem( m_menu6, wxID_ANY, wxString( wxT("calc. body's param") ) , wxEmptyString, wxITEM_NORMAL ); m_menu6->Append( m_menuItem14 ); wxMenuItem* m_menuItem16; m_menuItem16 = new wxMenuItem( m_menu6, wxID_ANY, wxString( wxT("meridian passage") ) , wxEmptyString, wxITEM_NORMAL ); m_menu6->Append( m_menuItem16 ); wxMenuItem* m_menuItem19; m_menuItem19 = new wxMenuItem( m_menu6, wxID_ANY, wxString( wxT("plotting") ) , wxEmptyString, wxITEM_NORMAL ); m_menu6->Append( m_menuItem19 ); m_menubar2->Append( m_menu6, wxT("Calculations") ); m_menu7 = new wxMenu(); wxMenuItem* m_menuItem17; m_menuItem17 = new wxMenuItem( m_menu7, wxID_ANY, wxString( wxT("body's info") ) , wxEmptyString, wxITEM_NORMAL ); m_menu7->Append( m_menuItem17 ); wxMenuItem* m_menuItem18; m_menuItem18 = new wxMenuItem( m_menu7, wxID_ANY, wxString( wxT("about") ) , wxEmptyString, wxITEM_NORMAL ); m_menu7->Append( m_menuItem18 ); m_menubar2->Append( m_menu7, wxT("Info") ); this->SetMenuBar( m_menubar2 ); /////////////////////////////////////////////////////////////////////////////////////////////////////// wxBoxSizer* bSizer3; bSizer3 = new wxBoxSizer( wxVERTICAL ); bSizer3->Add( 0, 20, 0, wxEXPAND, 5 ); //////////////////////////AGGIUNTA DATA///////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////// wxStaticBoxSizer* sbSizer31; sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Date:") ), wxVERTICAL ); wxFlexGridSizer* fgSizer31; fgSizer31 = new wxFlexGridSizer( 1, 5, 0, 0 ); fgSizer31->AddGrowableRow( 0 ); fgSizer31->SetFlexibleDirection( wxHORIZONTAL ); fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); wxString m_choice3Choices[] = { wxT("Sun"), wxT("Mon"), wxT("Tue"), wxT("Wed"), wxT("Thu"), wxT("Fri"), wxT("Sat"), wxT("Sun") }; int m_choice3NChoices = sizeof( m_choice3Choices ) / sizeof( wxString ); m_choice3 = new wxChoice( this, 6, wxDefaultPosition, wxSize( 70,25 ), m_choice3NChoices, m_choice3Choices, 0 ); m_choice3->SetSelection( 0 ); fgSizer31->Add( m_choice3, 0, wxALL, 5 ); wxString m_choice4Choices[] = { wxT("1"), wxT("2"), wxT("3"), wxT("4"), wxT("5"), wxT("6"), wxT("7"), wxT("8"), wxT("9"), wxT("10"), wxT("11"), wxT("12"), wxT("13"), wxT("14"), wxT("15"), wxT("16"), wxT("17"), wxT("18"), wxT("19"), wxT("20"), wxT("21"), wxT("22"), wxT("23"), wxT("24"), wxT("25"), wxT("26"), wxT("27"), wxT("28"), wxT("29"), wxT("30"), wxT("31") }; int m_choice4NChoices = sizeof( m_choice4Choices ) / sizeof( wxString ); m_choice4 = new wxChoice( this, 7, wxDefaultPosition, wxSize( 50,25 ), m_choice4NChoices, m_choice4Choices, 0 ); m_choice4->SetSelection( 0 ); fgSizer31->Add( m_choice4, 0, wxALL, 5 ); wxString m_choice5Choices[] = { wxT("Jan"), wxT("Feb"), wxT("Mar"), wxT("Apr"), wxT("May"), wxT("Jun"), wxT("Jul"), wxT("Aug"), wxT("Sep"), wxT("Oct"), wxT("Nov"), wxT("Dec") }; int m_choice5NChoices = sizeof( m_choice5Choices ) / sizeof( wxString ); m_choice5 = new wxChoice( this, 8, wxDefaultPosition, wxSize( 60,25 ), m_choice5NChoices, m_choice5Choices, 0 ); m_choice5->SetSelection( 0 ); fgSizer31->Add( m_choice5, 0, wxALL, 5 ); wxString m_choice6Choices[] = {wxT("1999"),wxT("2000"),wxT("2001"),wxT("2002"),wxT("2003"),wxT("2004"),wxT("2005"),wxT("2006"),wxT("2007"),wxT("2008"), wxT("2009"),wxT("2010"), wxT("2011"), wxT("2012"), wxT("2013"), wxT("2014"), wxT("2015"), wxT("2016"), wxT("2017"), wxT("2018"), wxT("2019"), wxT("2020"), wxT("2021"), wxT("2022"), wxT("2023"), wxT("2024"), wxT("2025"), wxT("2026"), wxT("2027"), wxT("2028"), wxT("2029"), wxT("2030") }; int m_choice6NChoices = sizeof( m_choice6Choices ) / sizeof( wxString ); m_choice6 = new wxChoice( this, 9, wxDefaultPosition, wxSize( -1,25 ), m_choice6NChoices, m_choice6Choices, 0 ); m_choice6->SetSelection( 0 ); fgSizer31->Add( m_choice6, 0, wxALL, 5 ); fgSizer31->Add( 15, 0, 1, wxEXPAND, 5 ); sbSizer31->Add( fgSizer31, 0, wxEXPAND, 5 ); bSizer3->Add( sbSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); ////////////////////////////////FINE DATA////////////////////////////////////////////////////////////// wxStaticBoxSizer* sbSizer3; sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Estimated Position:") ), wxVERTICAL ); wxFlexGridSizer* fgSizer3; fgSizer3 = new wxFlexGridSizer( 0, 12, 0, 0 ); fgSizer3->SetFlexibleDirection( wxBOTH ); fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer3->Add( 0, 10, 1, wxEXPAND, 5 ); fgSizer3->Add( 0, 10, 1, wxEXPAND, 5 ); m_staticText105 = new wxStaticText( this, wxID_ANY, wxT(" Deg°"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText105->Wrap( -1 ); fgSizer3->Add( m_staticText105, 0, wxALL, 5 ); m_staticText106 = new wxStaticText( this, wxID_ANY, wxT(" Min'"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText106->Wrap( -1 ); fgSizer3->Add( m_staticText106, 0, wxALL, 5 ); m_staticText107 = new wxStaticText( this, wxID_ANY, wxT(" Secs''"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText107->Wrap( -1 ); fgSizer3->Add( m_staticText107, 0, wxALL, 5 ); fgSizer3->Add( 0, 10, 1, wxEXPAND, 5 ); fgSizer3->Add( 0, 10, 1, wxEXPAND, 5 ); fgSizer3->Add( 0, 10, 1, wxEXPAND, 5 ); m_staticText1051 = new wxStaticText( this, wxID_ANY, wxT(" Deg°"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1051->Wrap( -1 ); fgSizer3->Add( m_staticText1051, 0, wxALL, 5 ); m_staticText1062 = new wxStaticText( this, wxID_ANY, wxT(" Min'"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1062->Wrap( -1 ); fgSizer3->Add( m_staticText1062, 0, wxALL, 5 ); m_staticText1071 = new wxStaticText( this, wxID_ANY, wxT(" Secs''"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1071->Wrap( -1 ); fgSizer3->Add( m_staticText1071, 0, wxALL, 5 ); fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticText109 = new wxStaticText( this, wxID_ANY, wxT("Latitude:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText109->Wrap( -1 ); fgSizer3->Add( m_staticText109, 0, wxALL, 5 ); wxString m_choice1Choices[] = { wxT("N"), wxT("S") }; int m_choice1NChoices = sizeof( m_choice1Choices ) / sizeof( wxString ); m_choice1 = new wxChoice( this, 10, wxDefaultPosition, wxSize( 50,25 ), m_choice1NChoices, m_choice1Choices, 0 ); m_choice1->SetSelection( 0 ); m_choice1->SetMinSize( wxSize( 50,25 ) ); fgSizer3->Add( m_choice1, 0, wxALL, 0 ); m_textCtrl11 = new wxTextCtrl( this, 11, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); fgSizer3->Add( m_textCtrl11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 0 ); m_textCtrl12 = new wxTextCtrl( this, 12, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); m_textCtrl12->SetMaxLength(5); fgSizer3->Add( m_textCtrl12, 0, 0, 5 ); m_textCtrl1 = new wxTextCtrl( this, 13, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); m_textCtrl1->SetMaxLength( 2 ); fgSizer3->Add( m_textCtrl1, 0, wxRIGHT|wxLEFT, 5 ); fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticText111 = new wxStaticText( this, 14, wxT("Longitude:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText111->Wrap( -1 ); fgSizer3->Add( m_staticText111, 0, wxALL, 5 ); wxString m_choice11Choices[] = { wxT("E"), wxT("W") }; int m_choice11NChoices = sizeof( m_choice11Choices ) / sizeof( wxString ); m_choice11 = new wxChoice( this, 14, wxDefaultPosition, wxSize( 50,25 ), m_choice11NChoices, m_choice11Choices, 0 ); m_choice11->SetSelection( 0 ); m_choice11->SetMinSize( wxSize( 50,25 ) ); fgSizer3->Add( m_choice11, 0, wxALL, 0 ); m_textCtrl13 = new wxTextCtrl( this, 15, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); fgSizer3->Add( m_textCtrl13, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_textCtrl14 = new wxTextCtrl( this, 16, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxTE_RIGHT ); m_textCtrl14->SetMaxLength(5); fgSizer3->Add( m_textCtrl14, 0, 0, 5 ); m_textCtrl15 = new wxTextCtrl( this, 17, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); fgSizer3->Add( m_textCtrl15, 0, wxRIGHT|wxLEFT, 5 ); sbSizer3->Add( fgSizer3, 0, 0, 5 ); bSizer3->Add( sbSizer3, 0, wxALL|wxEXPAND, 5 ); /////////////////////////////////////////BOX TEMPO/////////////////////////////////// wxStaticBoxSizer* sbSizer4; sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Time:") ), wxVERTICAL ); wxFlexGridSizer* fgSizer2; fgSizer2 = new wxFlexGridSizer( 1, 12, 0, 0 ); fgSizer2->SetFlexibleDirection( wxBOTH ); fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgSizer2->Add( 0, 10, 1, wxEXPAND, 5 ); m_staticText151 = new wxStaticText( this, wxID_ANY, wxT("Hours"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText151->Wrap( -1 ); fgSizer2->Add( m_staticText151, 0, wxALL, 5 ); m_staticText171 = new wxStaticText( this, wxID_ANY, wxT(" mins"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText171->Wrap( -1 ); fgSizer2->Add( m_staticText171, 0, wxALL, 5 ); m_staticText16 = new wxStaticText( this, wxID_ANY, wxT(" secs"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText16->Wrap( -1 ); fgSizer2->Add( m_staticText16, 0, wxALL, 5 ); m_button7 = new wxButton( this, 18, wxT("Start"), wxDefaultPosition, wxSize( 50,25 ), 0 ); fgSizer2->Add( m_button7, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 10, 1, wxEXPAND, 5 ); //fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticText15 = new wxStaticText( this, wxID_ANY, wxT("Hours"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText15->Wrap( -1 ); fgSizer2->Add( m_staticText15, 0, wxALL, 5 ); m_staticText17 = new wxStaticText( this, wxID_ANY, wxT(" mins"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText17->Wrap( -1 ); fgSizer2->Add( m_staticText17, 0, wxALL, 5 ); m_staticText161 = new wxStaticText( this, wxID_ANY, wxT(" secs"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText161->Wrap( -1 ); fgSizer2->Add( m_staticText161, 0, wxALL, 5 ); m_button6 = new wxButton( this, 26, wxT("UTC"), wxDefaultPosition, wxSize( 50,25 ), 0 ); fgSizer2->Add( m_button6, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); m_staticText8 = new wxStaticText( this, wxID_ANY, wxT("Time UTC:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText8->Wrap( -1 ); fgSizer2->Add( m_staticText8, 0, wxALL, 5 ); m_textCtrl111 = new wxTextCtrl( this,19, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); m_textCtrl111->SetMaxLength( 2 ); fgSizer2->Add( m_textCtrl111, 0, 0, 5 ); m_textCtrl112 = new wxTextCtrl( this,20, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); m_textCtrl112->SetMaxLength( 2 ); fgSizer2->Add( m_textCtrl112, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_textCtrl113 = new wxTextCtrl( this, 21, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); m_textCtrl113->SetMaxLength( 2 ); fgSizer2->Add( m_textCtrl113, 0, wxRIGHT, 5 ); m_button8 = new wxButton( this, 22, wxT("Stop"), wxDefaultPosition, wxSize( 50,25 ), 0 ); fgSizer2->Add( m_button8, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_staticText21 = new wxStaticText( this, wxID_ANY, wxT("Local time:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText21->Wrap( -1 ); fgSizer2->Add( m_staticText21, 0, wxALL, 5 ); //fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 ); m_textCtrl1111 = new wxTextCtrl( this, 23, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxTE_RIGHT ); m_textCtrl1111->SetMaxLength( 2 ); fgSizer2->Add( m_textCtrl1111, 0, 0, 5 ); m_textCtrl1112 = new wxTextCtrl( this, 24, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxTE_RIGHT ); m_textCtrl1112->SetMaxLength( 2 ); fgSizer2->Add( m_textCtrl1112, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_textCtrl1113 = new wxTextCtrl( this, 25, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxTE_RIGHT ); m_textCtrl1113->SetMaxLength( 2 ); fgSizer2->Add( m_textCtrl1113, 0, wxBOTTOM|wxRIGHT, 5 ); m_button9 = new wxButton( this, 27, wxT("Local "), wxDefaultPosition, wxSize( 50,25 ), 0 ); fgSizer2->Add( m_button9, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); sbSizer4->Add( fgSizer2, 0, wxEXPAND, 5 ); bSizer3->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 ); ///////////////////////////////OSSERVAZIONE//////////////////////////////////////////////// wxStaticBoxSizer* sbSizer5; sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Observation:") ), wxVERTICAL ); ////////////////////////////////////////////new 7 apr 2012///////////////////////////////////////////////////////////// wxGridBagSizer* gbSizer3; gbSizer3 = new wxGridBagSizer( 0, 0 ); gbSizer3->SetFlexibleDirection( wxBOTH ); gbSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer3->SetMinSize( wxSize( 100,10 ) ); gbSizer3->Add( 100, 10, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); sbSizer5->Add( gbSizer3, 0, wxEXPAND, 5 ); wxGridBagSizer* gbSizer4; gbSizer4 = new wxGridBagSizer( 0, 0 ); gbSizer4->SetFlexibleDirection( wxBOTH ); gbSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer4->SetMinSize( wxSize( 100,30 ) ); m_staticText24 = new wxStaticText( this, wxID_ANY, wxT("Star name: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText24->Wrap( -1 ); gbSizer4->Add( m_staticText24, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER, 5 ); m_comboBox3 = new wxComboBox( this, 28, wxEmptyString, wxDefaultPosition, wxSize( 120,25 ), 0, NULL, wxCB_READONLY ); m_comboBox3->Append( wxT("Acamar") ); m_comboBox3->Append( wxT("Achernar") ); m_comboBox3->Append( wxT("Acrux") ); m_comboBox3->Append( wxT("Adhara") ); m_comboBox3->Append( wxT("Aldebaran") ); m_comboBox3->Append( wxT("Alioth") ); m_comboBox3->Append( wxT("Alkaid") ); m_comboBox3->Append( wxT("Almak") ); m_comboBox3->Append( wxT("Al Nair") ); m_comboBox3->Append( wxT("Alnilam") ); m_comboBox3->Append( wxT("Alphard") ); m_comboBox3->Append( wxT("Alphecca") ); m_comboBox3->Append( wxT("Alpheratz") ); m_comboBox3->Append( wxT("Altair") ); m_comboBox3->Append( wxT("Ankaa") ); m_comboBox3->Append( wxT("Antares") ); m_comboBox3->Append( wxT("Arcturus") ); m_comboBox3->Append( wxT("Atria") ); m_comboBox3->Append( wxT("Avior") ); m_comboBox3->Append( wxT("Bellatrix") ); m_comboBox3->Append( wxT("Betelgeuse") ); m_comboBox3->Append( wxT("Canopo") ); m_comboBox3->Append( wxT("Capella") ); m_comboBox3->Append( wxT("Castor") ); m_comboBox3->Append( wxT("Cor Caroli") ); m_comboBox3->Append( wxT("Deneb") ); m_comboBox3->Append( wxT("Denebola") ); m_comboBox3->Append( wxT("Diphda") ); m_comboBox3->Append( wxT("Dubhe") ); m_comboBox3->Append( wxT("Elnath") ); m_comboBox3->Append( wxT("Eltanin") ); m_comboBox3->Append( wxT("Enif") ); m_comboBox3->Append( wxT("Fomalhaut") ); m_comboBox3->Append( wxT("Gracrux") ); m_comboBox3->Append( wxT("Gienah") ); m_comboBox3->Append( wxT("Hadar") ); m_comboBox3->Append( wxT("Hamal") ); m_comboBox3->Append( wxT("Kaus Australis") ); m_comboBox3->Append( wxT("Kochab") ); m_comboBox3->Append( wxT("Markab") ); m_comboBox3->Append( wxT("Menkar") ); m_comboBox3->Append( wxT("Menkent") ); m_comboBox3->Append( wxT("Merak") ); m_comboBox3->Append( wxT("Miraplacidus") ); m_comboBox3->Append( wxT("Mirfak") ); m_comboBox3->Append( wxT("Mizar") ); m_comboBox3->Append( wxT("Nunki") ); m_comboBox3->Append( wxT("Peacock") ); m_comboBox3->Append( wxT("Phact") ); m_comboBox3->Append( wxT("Polaris") ); m_comboBox3->Append( wxT("Pollux") ); m_comboBox3->Append( wxT("Procyon") ); m_comboBox3->Append( wxT("Ras Alhague") ); m_comboBox3->Append( wxT("Regulus") ); m_comboBox3->Append( wxT("Rigel") ); m_comboBox3->Append( wxT("Rigil Kentaurus") ); m_comboBox3->Append( wxT("Sabik") ); m_comboBox3->Append( wxT("Saiph") ); m_comboBox3->Append( wxT("Schedar") ); m_comboBox3->Append( wxT("Scheddi") ); m_comboBox3->Append( wxT("Shaula") ); m_comboBox3->Append( wxT("Sirius") ); m_comboBox3->Append( wxT("Spica") ); m_comboBox3->Append( wxT("Suhail") ); m_comboBox3->Append( wxT("Vega") ); m_comboBox3->Append( wxT("Zuben el Genubi") ); gbSizer4->Add( m_comboBox3, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxTOP, 5 ); gbSizer4->Add( 142, 10, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_button1 = new wxButton( this, 29, wxT("Calc Altitude"), wxDefaultPosition, wxSize( 100,25 ), 0 ); gbSizer4->Add( m_button1, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALL, 5 ); m_button11 = new wxButton( this, 30, wxT("info"), wxDefaultPosition, wxSize( 100,25 ), 0 ); gbSizer4->Add( m_button11, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALL, 5 ); sbSizer5->Add( gbSizer4, 0, wxEXPAND, 5 ); wxGridBagSizer* gbSizer5; gbSizer5 = new wxGridBagSizer( 0, 0 ); gbSizer5->SetFlexibleDirection( wxBOTH ); gbSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer5->SetMinSize( wxSize( 100,10 ) ); sbSizer5->Add( gbSizer5, 0, wxEXPAND, 5 ); m_staticText25 = new wxStaticText( this, wxID_ANY, wxT("Solar System: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText25->Wrap( -1 ); gbSizer5->Add( m_staticText25, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_comboBox31 = new wxComboBox( this, 31, wxEmptyString, wxDefaultPosition, wxSize( 120,25 ), 0, NULL, wxCB_READONLY); m_comboBox31->Append( wxT("Sun") ); m_comboBox31->Append( wxT("Moon") ); m_comboBox31->Append( wxT("Venus") ); m_comboBox31->Append( wxT("Mars") ); m_comboBox31->Append( wxT("Jupiter") ); m_comboBox31->Append( wxT("Saturn") ); gbSizer5->Add( m_comboBox31, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxBOTTOM, 5 ); m_staticText29 = new wxStaticText( this, wxID_ANY, wxT(" Observed Altitude: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText29->Wrap( -1 ); gbSizer5->Add( m_staticText29, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl241 = new wxTextCtrl( this, 35, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxALIGN_RIGHT ); m_textCtrl241->SetMaxLength( 2 );//obs altitude degrees gbSizer5->Add( m_textCtrl241, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); gbSizer5->Add( 4, 10, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_textCtrl244 = new wxTextCtrl( this, 36, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxALIGN_LEFT ); m_textCtrl244->SetMaxLength( 3 );// altitude minutes gbSizer5->Add( m_textCtrl244, wxGBPosition( 0, 5 ), wxGBSpan( 1, 1 ),wxALIGN_RIGHT|wxCENTER, 5 ); gbSizer5->Add( 4, 10, wxGBPosition( 0, 6 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_textCtrl243 = new wxTextCtrl( this, 37, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxTE_RIGHT ); m_textCtrl243->SetMaxLength( 2 );// altitude seconds gbSizer5->Add( m_textCtrl243, wxGBPosition( 0, 7 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); gbSizer5->Add( 4, 10, wxGBPosition( 0, 8 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_checkBox1 = new wxCheckBox( this, 38, wxT("upper limb"), wxDefaultPosition, wxDefaultSize, 0 ); gbSizer5->Add( m_checkBox1, wxGBPosition( 0, 9 ), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxBOTTOM, 5 ); //upper limb*/ /////////////////////////altra linea//////////////////////////// wxGridBagSizer* gbSizer6; gbSizer6 = new wxGridBagSizer( 0, 0 ); gbSizer6->SetFlexibleDirection( wxBOTH ); gbSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer6->SetMinSize( wxSize( 100,10 ) ); m_staticText28 = new wxStaticText( this, wxID_ANY, wxT("Calculated Alt: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText28->Wrap( -1 ); gbSizer6->Add( m_staticText28, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl24 = new wxTextCtrl( this, 32, wxEmptyString, wxDefaultPosition, wxSize( 100,25 ), wxTE_READONLY|wxTE_RIGHT ); gbSizer6->Add( m_textCtrl24, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 );//altitude gbSizer6->Add( 85, 10, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_staticText301 = new wxStaticText( this, wxID_ANY, wxT("Index error: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText301->Wrap( -1 ); gbSizer6->Add( m_staticText301, wxGBPosition( 0, 3), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl2421 = new wxTextCtrl( this, 39, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ), wxTE_RIGHT ); m_textCtrl2421->SetMaxLength( 4 );//index error gbSizer6->Add( m_textCtrl2421, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); gbSizer6->Add( 30, 10, wxGBPosition( 0, 5 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_staticText10 = new wxStaticText( this, wxID_ANY, wxT("Eye height: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText10->Wrap( -1 ); gbSizer6->Add( m_staticText10, wxGBPosition( 0, 6), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl245 = new wxTextCtrl( this, 40, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxTE_RIGHT ); m_textCtrl245->SetMaxLength( 4 );//eye height gbSizer6->Add( m_textCtrl245, wxGBPosition( 0, 7 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); m_staticText7 = new wxStaticText( this, wxID_ANY, wxT(" mt."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7->Wrap( -1 ); gbSizer6->Add( m_staticText7, wxGBPosition( 0, 8), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); sbSizer5->Add( gbSizer6, 0, wxEXPAND, 5 ); ///////////////altra linea////////////////////////////// wxGridBagSizer* gbSizer7; gbSizer7 = new wxGridBagSizer( 0, 0 ); gbSizer7->SetFlexibleDirection( wxBOTH ); gbSizer7->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer7->SetMinSize( wxSize( 100,0 ) ); gbSizer7->Add( 30, 4, wxGBPosition( 0, 5 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); sbSizer5->Add( gbSizer7, 0, wxEXPAND, 5 ); /////////altra linea///////////////////////////////////// wxGridBagSizer* gbSizer8; gbSizer8 = new wxGridBagSizer( 0, 0 ); gbSizer8->SetFlexibleDirection( wxBOTH ); gbSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer8->SetMinSize( wxSize( 100,10 ) ); m_staticText30 = new wxStaticText( this, wxID_ANY, wxT("Azimuth: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText30->Wrap( -1 ); gbSizer8->Add( m_staticText30, wxGBPosition( 0, 0), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl242 = new wxTextCtrl( this, 33, wxEmptyString, wxDefaultPosition, wxSize( 100,25 ), wxTE_RIGHT ); gbSizer8->Add( m_textCtrl242, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 );//azimuth gbSizer8->Add( 99, 4, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_staticText9 = new wxStaticText( this, wxID_ANY, wxT("Intercept: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText9->Wrap( -1 ); gbSizer8->Add( m_staticText9, wxGBPosition( 0, 3), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl246 = new wxTextCtrl( this, 41, wxEmptyString, wxDefaultPosition, wxSize( 50,25 ),wxTE_READONLY|wxTE_RIGHT ); m_textCtrl246->SetMaxLength( 4 );//intercept gbSizer8->Add( m_textCtrl246, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); m_staticText10 = new wxStaticText( this, wxID_ANY, wxT(" Miles"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText10->Wrap( -1 ); gbSizer8->Add( m_staticText10, wxGBPosition( 0, 5), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); sbSizer5->Add( gbSizer8, 0, wxEXPAND, 5 ); ////////////////////////////////altra linea///////////////////////////////////////////// wxGridBagSizer* gbSizer9; gbSizer9 = new wxGridBagSizer( 0, 0 ); gbSizer9->SetFlexibleDirection( wxBOTH ); gbSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer9->SetMinSize( wxSize( 100,0 ) ); gbSizer9->Add( 30, 4, wxGBPosition( 0, 5 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); sbSizer5->Add( gbSizer9, 0, wxEXPAND, 5 ); //////////////////////////////////////altra linea///////////////////////////////////////// wxGridBagSizer* gbSizer10; gbSizer10 = new wxGridBagSizer( 0, 0 ); gbSizer10->SetFlexibleDirection( wxBOTH ); gbSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer10->SetMinSize( wxSize( 100,10 ) ); m_staticText211 = new wxStaticText( this, wxID_ANY, wxT("Star unknown: "), wxDefaultPosition, wxDefaultSize, wxTE_RIGHT ); m_staticText211->Wrap( -1 ); gbSizer10->Add( m_staticText211, wxGBPosition( 0, 0), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl24211 = new wxTextCtrl( this,34, wxT("No match"), wxDefaultPosition, wxSize( 100,25 ),wxTE_READONLY|wxTE_RIGHT ); gbSizer10->Add( m_textCtrl24211, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 );//unknown star gbSizer10->Add( 75, 4, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_staticText8 = new wxStaticText( this, wxID_ANY, wxT("True Altitude: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText8->Wrap( -1 ); gbSizer10->Add( m_staticText8, wxGBPosition( 0, 3), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); //true altitude m_textCtrl247 = new wxTextCtrl( this, 42, wxEmptyString, wxDefaultPosition, wxSize( 100,25 ),wxTE_READONLY|wxTE_RIGHT ); gbSizer10->Add( m_textCtrl247, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); gbSizer10->Add( 15, 4, wxGBPosition( 0, 5), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_button4 = new wxButton( this, 43, wxT("Save"), wxDefaultPosition, wxSize( 100,25 ), 0 ); gbSizer10->Add( m_button4, wxGBPosition( 0, 6), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); sbSizer5->Add( gbSizer10, 0, wxEXPAND, 5 ); bSizer3->Add( sbSizer5, 0, wxALL|wxEXPAND, 5 ); /////////////////////////////////////POSIZIONE/////////////////////////////////////////////// wxStaticBoxSizer* sbSizer7; sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Position:") ), wxVERTICAL ); //////////////////prima linea/////////////////////////// wxGridBagSizer* gbSizer11; gbSizer11 = new wxGridBagSizer( 0, 0 ); gbSizer11->SetFlexibleDirection( wxBOTH ); gbSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer11->SetMinSize( wxSize( 10,10 ) ); gbSizer11->Add( 50, 10, wxGBPosition( 0,1), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); sbSizer7->Add( gbSizer11, 0, wxEXPAND, 5 ); //////////////////////////////////////////////seconda linea/////////////////////////////////////////////// wxGridBagSizer* gbSizer12; gbSizer12 = new wxGridBagSizer( 0, 0 ); gbSizer12->SetFlexibleDirection( wxBOTH ); gbSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer12->SetMinSize( wxSize( 0,0 ) ); m_button411 = new wxButton( this, 46, wxT("Calc Position"), wxDefaultPosition, wxSize( 100,25 ), 0 ); gbSizer12->Add( m_button411, wxGBPosition( 0, 0), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); gbSizer12->Add( 50, 10, wxGBPosition( 0,1), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_staticText1091 = new wxStaticText( this, wxID_ANY, wxT("Latitude : "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1091->Wrap( -1 ); gbSizer12->Add( m_staticText1091, wxGBPosition( 0, 2), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); m_textCtrl2422 = new wxTextCtrl( this, 47, wxEmptyString, wxDefaultPosition, wxSize( 100,25 ), wxTE_RIGHT ); gbSizer12->Add( m_textCtrl2422, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); gbSizer12->Add( 50, 2, wxGBPosition( 0,4), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_staticText1111 = new wxStaticText( this, wxID_ANY, wxT("Longitude: "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1111->Wrap( -1 ); gbSizer12->Add( m_staticText1111, wxGBPosition( 0, 5), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); gbSizer12->Add( 5, 10, wxGBPosition( 0,6), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_textCtrl24221 = new wxTextCtrl( this, 48, wxEmptyString, wxDefaultPosition, wxSize( 100,25 ), wxTE_RIGHT ); gbSizer12->Add( m_textCtrl24221, wxGBPosition( 0, 7 ), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); sbSizer7->Add( gbSizer12, 0, wxEXPAND, 5 ); //////////////////////////////////////////TERZA LINEA///////////////////////////////////// wxGridBagSizer* gbSizer13; gbSizer13 = new wxGridBagSizer( 0, 0 ); gbSizer13->SetFlexibleDirection( wxBOTH ); gbSizer13->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer13->SetMinSize( wxSize( 0,0 ) ); m_button40 = new wxButton( this, 45, wxT("Meridian"), wxDefaultPosition, wxSize( 100,25 ), 0 ); gbSizer13->Add( m_button40, wxGBPosition( 0, 0), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); ///////////////14 apr 2012 aggiunte, da togliere a fine lavori/////////////////////// gbSizer13->Add( 50, 2, wxGBPosition( 0,1), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_staticText22 = new wxStaticText( this, wxID_ANY, wxT("Stars above the horizon at current position : "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText22->Wrap( -1 ); gbSizer13->Add( m_staticText22, wxGBPosition( 0, 2), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxTOP, 5 ); gbSizer13->Add( 4, 10, wxGBPosition( 0,3), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); //////////////added april 7/////////////////////////////////////////////////////// m_button43 = new wxButton( this, 46, wxT("Sky view"), wxDefaultPosition, wxSize( 100,25 ), 0 ); gbSizer13->Add( m_button43, wxGBPosition( 0, 4), wxGBSpan( 1, 1 ), wxALIGN_LEFT|wxCENTER, 5 ); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// sbSizer7->Add( gbSizer13, 0, wxEXPAND, 5 ); /////////////////////////////////////QUARTA LINEA///////////////////////////////// wxGridBagSizer* gbSizer14; gbSizer14 = new wxGridBagSizer( 0, 0 ); gbSizer14->SetFlexibleDirection( wxBOTH ); gbSizer14->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer14->SetMinSize( wxSize( 100,10 ) ); m_button41 = new wxButton( this, 44, wxT("Cancel Saved"), wxDefaultPosition, wxSize( 100,25 ), 0 ); gbSizer14->Add( m_button41, wxGBPosition( 0, 0), wxGBSpan( 1, 1 ), wxALIGN_RIGHT|wxCENTER, 5 ); sbSizer7->Add( gbSizer14, 0, wxEXPAND, 5 ); bSizer3->Add( sbSizer7, 0, wxEXPAND|wxALL, 5 ); this->SetSizer( bSizer3 ); this->Layout(); // Connect Events /////////////////////////////////////EVENTI///////////////////////////////////////////////////////// this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogBase::OnCloseDialog ) ); this->Connect( wxEVT_PAINT, wxPaintEventHandler( MainDialogBase::OnPaint ) ); this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( MainDialogBase::OnInitDialog )); this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( MainDialogBase::OnKeyDown ) ); m_textCtrl12->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnChar ), NULL, this ); m_textCtrl11->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharDeg ), NULL, this ); m_textCtrl1->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharSec ), NULL, this ); m_textCtrl13->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLon ), NULL, this ); m_textCtrl14->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharDegLon ), NULL, this ); m_textCtrl15->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharSecLon ), NULL, this ); m_textCtrl245->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharEHt ), NULL, this ); m_textCtrl12->Connect( wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEventHandler( MainDialogBase::OnTextMax ), NULL, this ); m_textCtrl11->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnText_Deg_Lat ), NULL, this ); m_textCtrl12->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnText_min_Lat ), NULL, this ); m_textCtrl1->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnText_Sec_Lat ), NULL, this ); m_textCtrl13->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextDegLon ), NULL, this ); m_textCtrl14->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextMinLon ), NULL, this ); m_textCtrl15->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextSecLon ), NULL, this ); m_button7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnStartTimer ), NULL, this ); m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnStopTimer ), NULL, this ); m_textCtrl111->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnHrsUTC ), NULL, this ); m_textCtrl112->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnMinUTC ), NULL, this ); m_textCtrl113->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnSecUTC ), NULL, this ); m_textCtrl1111->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLocalHr ), NULL, this ); m_textCtrl1112->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLocalMin ), NULL, this ); m_textCtrl1113->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLocalSec ), NULL, this ); m_textCtrl1111->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLocalHr ), NULL, this ); m_textCtrl1112->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLocalMin ), NULL, this ); m_textCtrl1113->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLocalSec ), NULL, this ); m_textCtrl111->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextUTChrs ), NULL, this ); m_textCtrl112->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextUTCmin ), NULL, this ); m_textCtrl113->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextUTCsecs ), NULL, this ); m_textCtrl1111->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextLTHrs ), NULL, this ); m_textCtrl1112->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextLTmins ), NULL, this ); m_textCtrl1113->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextLTsecs ), NULL, this ); m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnUTC ), NULL, this ); m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnLocal ), NULL, this ); //m_comboBox3->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnStarChoice ), NULL, this ); m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCalcHeitht ), NULL, this ); //m_comboBox31->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnPlanetChoice ), NULL, this ); //m_button11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCalcSolarHt ), NULL, this ); m_textCtrl2421->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnTextEnter ), NULL, this ); m_textCtrl244->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnAltMin ), NULL, this ); m_textCtrl243->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnAltSec ), NULL, this ); m_textCtrl245->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnEyeHt ), NULL, this ); m_textCtrl2421->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharDiff ), NULL, this ); m_textCtrl241->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharAlt ), NULL, this ); m_textCtrl244->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharAltMin ), NULL, this ); m_textCtrl243->Connect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharAltSec ), NULL, this ); m_textCtrl241->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::OnTextAlt ), NULL, this ); m_textCtrl241->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnFocusOut ), NULL, this ); m_button11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnInfo ), NULL, this ); m_checkBox1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogBase::OnCheckbox ), NULL, this ); m_textCtrl242->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler(MainDialogBase::OnAzOut ), NULL, this ); m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnSave ), NULL, this ); m_button411->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCalcPos ), NULL, this ); m_button41->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCancLines ), NULL, this ); m_button40->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnMeridian ), NULL, this ); m_button43->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnPlot ), NULL, this ); ///////////////menu/////////// this->Connect( m_menuItem11->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuSave ) ); this->Connect( m_menuItem12->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuCancel ) ); this->Connect( m_menuItem14->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuAlt ) ); this->Connect( m_menuItem16->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuMeridian ) ); this->Connect( m_menuItem19->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuPlot ) ); this->Connect( m_menuItem17->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuInfo ) ); this->Connect( m_menuItem18->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuAbout ) ); m_timer->Connect(wxEVT_TIMER,wxTimerEventHandler(MainDialogBase::OnTimer),NULL,this); } MainDialogBase::~MainDialogBase() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogBase::OnCloseDialog ) ); this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( MainDialogBase::OnPaint ) ); this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( MainDialogBase::OnInitDialog ) ); this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( MainDialogBase::OnKeyDown ) ); m_textCtrl12->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnChar ), NULL, this ); m_textCtrl11->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharDeg ), NULL, this ); m_textCtrl1->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharSec ), NULL, this ); m_textCtrl13->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharLon ), NULL, this ); m_textCtrl14->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharDegLon ), NULL, this ); m_textCtrl15->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharSecLon ), NULL, this ); m_textCtrl245->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharEHt ), NULL, this ); m_textCtrl12->Disconnect( wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEventHandler( MainDialogBase::OnTextMax ), NULL, this ); m_textCtrl11->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnText_Deg_Lat ), NULL, this ); m_textCtrl12->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnText_min_Lat ), NULL, this ); m_textCtrl1->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnText_Sec_Lat ), NULL, this ); m_textCtrl13->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextDegLon ), NULL, this ); m_textCtrl14->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextMinLon ), NULL, this ); m_textCtrl15->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextSecLon ), NULL, this ); m_button7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnStartTimer ), NULL, this ); m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnStopTimer ), NULL, this ); m_textCtrl111->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnHrsUTC ), NULL, this ); m_textCtrl112->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnMinUTC ), NULL, this ); m_textCtrl113->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnSecUTC ), NULL, this ); m_textCtrl111->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextUTChrs ), NULL, this ); m_textCtrl112->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextUTCmin ), NULL, this ); m_textCtrl113->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextUTCsecs ), NULL, this ); m_textCtrl1111->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextLTHrs ), NULL, this ); m_textCtrl1112->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextLTmins ), NULL, this ); m_textCtrl1113->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MainDialogBase::OnTextLTsecs ), NULL, this ); m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnUTC ), NULL, this ); m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnLocal ), NULL, this ); //m_comboBox3->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnStarChoice ), NULL, this ); m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCalcHeitht ), NULL, this ); //m_comboBox31->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnPlanetChoice ), NULL, this ); //m_button11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCalcSolarHt ), NULL, this ); m_textCtrl2421->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnTextEnter ), NULL, this ); m_textCtrl244->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnAltMin), NULL, this ); m_textCtrl243->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnAltSec ), NULL, this ); m_textCtrl245->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnEyeHt ), NULL, this ); m_textCtrl2421->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharDiff ), NULL, this ); m_textCtrl241->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharAlt ), NULL, this ); m_textCtrl244->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharAltMin ), NULL, this ); m_textCtrl243->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainDialogBase::OnCharAltSec ), NULL, this ); m_textCtrl241->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::OnTextAlt ), NULL, this ); m_textCtrl241->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::OnFocusOut ), NULL, this ); m_button11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnInfo ), NULL, this ); m_checkBox1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MainDialogBase::OnCheckbox ), NULL, this ); m_textCtrl242->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler(MainDialogBase::OnAzOut ), NULL, this ); m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnSave ), NULL, this ); m_button411->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCalcPos ), NULL, this ); m_button41->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCancLines ), NULL, this ); m_button40->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnMeridian), NULL, this ); m_button43->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnPlot), NULL, this ); ///menu this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuSave ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuCancel ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuAlt ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuMeridian ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuPlot ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuInfo ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainDialogBase::OnMenuAbout ) ); m_timer->Disconnect(wxEVT_TIMER,wxTimerEventHandler(MainDialogBase::OnTimer),NULL,this); } nautic-1.5/src/un_known_star.cpp0000644000175000017500000001062511646364271016722 0ustar moellermoeller/* un_known_star.cpp unknown star implementation Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "un_known_star.h" #include // This is a magic incantation which must be done! static char starnam[80] = {'s','t','n','a','m','\0'}; double PIg = 3.14159265358979323846; double RTSI = 2.0626480624709635516e5; /* arc seconds per radian */ const char * pthname = "/usr/share/nautic/stnam"; #define RADEG (180.0/PIg) #define DEGRAD (PIg/180.0) #define sind(x) sin((x)*DEGRAD) #define cosd(x) cos((x)*DEGRAD) #define tand(x) tan((x)*DEGRAD) #define asind(x) (RADEG*asin(x)) #define acosd(x) (RADEG*acos(x)) #define atand(x) (RADEG*atan(x)) #define atan2d(y,x) (RADEG*atan2((y),(x))) UnKnownStar::UnKnownStar() { } struct star { char obname[32]; /* Object name (31 chars) */ double epoch; /* Epoch of coordinates */ double ra; /* Right Ascension, radians */ double dec; /* Declination, radians */ double px; /* Parallax, radians */ double mura; /* proper motion in R.A., rad/century */ double mudec; /* proper motion in Dec., rad/century */ double v; /* radial velocity, km/s */ double equinox; /* Epoch of equinox and ecliptic */ double mag; /* visual magnitude */ }; wxString UnKnownStar::calc_bounds(double alt, double azth, double SDT, double Lat) { double RA, Dec, r, d, HA; wxString result; const char * star = "/usr/share/nautic/stnam"; double xh = cosd(azth) * cosd(alt); double yh = sind(azth) * cosd(alt); double zh = sind(alt); double xhor = xh * sind(Lat) - zh * cosd(Lat); double yhor = yh; double zhor = xh * cosd(Lat) + zh * sind(Lat); HA = atan2d( yhor, xhor ) - 180 ; Dec = atan2d( zhor, sqrt(xhor*xhor+yhor*yhor) ); RA = (SDT - HA); if(RA < 0) RA += 360; RA = RA / 15; if(RA > 24) RA -=24; int linenum = 66; double rh, rm,rs, dd, dm, ds, epoch, mura, mudec, v, px, mag, ra , dec; char obname[32]; char s[128]; const char * str; const char * starname; const char * constname; int i; FILE *f;// *fopen(); char *res; strcpy(starnam,pthname); f = fopen(starnam, "r" ); wxString strMess; strMess = wxString::FromAscii(star); strMess = _("Can't find file: ") + strMess; if( f == 0 ) { if( wxMessageBox(strMess,_("error"))==wxYES); goto ext; } for( i=0; i (r - 1) ) { if(Dec < (d + 1) && Dec > (d - 1)) { starname = constname; result = wxString::FromAscii(starname); goto end; } } else result = _("Star Unknown"); } end: fclose(f); ext: return result; } UnKnownStar::~UnKnownStar() { } nautic-1.5/src/aberration.cpp0000644000175000017500000002421011525036767016156 0ustar moellermoeller/* * aberration.c - Implementation of Ron-Vondrak theory of aberration * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * Implements the algorithm developed by C. Ron & J. Vondrak to calculate * the annual aberration using expansions of trigonometric series. * * Reference : */ #include #include #include "fund_args.h" #include "aberration.h" /* #define J2000_EPOCH 2451545.0 #define JULIAN_CENTURY_LENGTH 36525.0 #define JULIAN_CENTURIES(d1, d2) \ (((d1 - J2000_EPOCH) + d2) / JULIAN_CENTURY_LENGTH) */ /* * Terms for velocity components of the EMB's heliocentric motion #1 */ struct aberration_term1_1 aberration_series1_1[] = { {1,-1719919,-2,-25,0,0,25,-13,-1,1578094,156,10,32,1,684187,-358}, {2,6434,141,28007,-107,-1,25697,-95,-1,-5904,-130,11141,-48,0,-2559,-55}, {3,486,-5,-236,-4,0,-216,-4,0,-446,5,-94,-2,0,-193,2}, }; /* * Terms for velocity components of the EMB's heliocentric motion #2 */ struct aberration_term1_2 aberration_series1_2[] = { {0,0,2,0,-1,0,31,1,1,-28,0,-12}, {0,0,3,-8,3,0,8,-28,25,8,11,3}, {0,0,5,-8,3,0,8,-28,-25,-8,-11,-3}, {0,1,0,0,0,-25,0,0,23,0,10}, {0,2,-1,0,0,0,21,0,0,-19,0,-8}, {0,0,1,0,-2,0,16,0,0,15,1,7}, {0,0,1,0,1,0,11,-1,-1,-10,-1,-5}, {0,2,-2,0,0,0,0,-11,-10,0,-4,0}, {0,0,1,0,-1,0,-11,-2,-2,9,-1,4}, {0,0,4,0,0,0,-7,-8,-8,6,-3,3}, {0,0,3,0,-2,0,-10,0,0,9,0,4}, {0,1,-2,0,0,0,-9,0,0,-9,0,-4}, {0,2,-3,0,0,0,-9,0,0,-8,0,-4}, {0,2,-3,0,0,0,0,-9,8,0,3,0}, {0,0,3,-2,0,0,8,0,0,-8,0,-3}, {0,8,-12,0,0,0,-4,-7,-6,4,-3,2}, {0,8,-14,0,0,0,-4,-7,6,-4,3,-2}, {0,0,0,2,0,0,-6,-5,-4,5,-2,2}, {0,3,-4,0,0,0,-1,-1,-2,-7,1,-4}, {0,0,2,0,-2,0,4,-6,-5,-4,-2,-2}, {0,3,-3,0,0,0,0,-7,-6,0,-3,0}, {0,0,2,-2,0,0,5,-5,-4,-5,-2,-2}, {0,3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0,0}, {0,0,7,-15,0,0,-1,0,0,-1,0,0}, {0,2,0,0,0,0,0,-1,-1,0,0,0}, {0,0,2,0,2,-5,0,1,1,0,0,0}, {2,0,-2,0,0,0,0,1,-1,0,0,0}, {0,0,9,-19,0,3,0,1,-1,0,0,0}, {0,0,11,-19,0,3,0,1,1,0,0,0}, {0,0,2,-5,0,0,0,-1,1,0,0,0}, {0,5,-9,0,0,0,0,1,-1,0,0,0}, {0,11,-10,0,0,0,1,0,0,0,0,0}, {0,4,-4,0,0,0,0,1,0,0,0,0}, {0,0,2,0,-4,0,1,0,0,0,0,0}, {0,0,5,-6,0,0,0,-1,0,0,0,0}, {0,5,-5,0,0,0,0,1,0,0,0,0}, {0,0,4,0,-3,0,-1,0,0,0,0,0}, {0,4,-6,0,0,0,0,-1,0,0,0,0}, {0,5,-7,0,0,0,0,0,1,0,0,0}, {0,0,4,0,-2,0,0,0,1,0,0,0}, {0,0,3,0,-4,0,0,0,0,1,0,0}, {0,7,-8,0,0,0,0,0,0,-1,0,0} }; /* * Terms for velocity components of the Sun wrt the solar system barycenter */ struct aberration_term2 aberration_series2[] = { {0,0,1,0,0,0,719,0,6,-660,-15,-283}, {0,0,0,1,0,0,159,0,2,-147,-6,-61}, {0,0,2,0,0,0,34,-9,-8,-31,-4,-13}, {0,0,0,0,1,0,17,0,0,-16,0,-7}, {0,0,0,0,0,1,16,0,1,-15,-3,-6}, {0,0,0,2,0,0,0,-9,-8,0,-3,1}, {1,0,0,0,0,0,6,0,0,-6,0,-2}, {0,1,0,0,0,0,5,0,0,-5,0,-2}, {0,0,3,0,0,0,2,-1,-1,-2,0,-1}, {0,0,1,-5,0,0,-2,0,0,-2,0,-1}, {0,0,3,-5,0,0,-2,0,0,2,0,1}, {1,0,0,0,0,-2,-1,0,0,-1,0,0}, {0,0,0,3,0,0,-1,0,0,1,0,0}, {0,0,2,-6,0,0,1,0,0,1,0,0}, {0,0,2,-4,0,0,1,0,0,-1,0,0}, {0,0,0,0,2,0,-1,0,0,1,0,0}, {0,0,1,0,0,-2,1,0,0,0,0,0} }; /* * Terms for velocity components of the Earth wrt the EMB */ struct aberration_term3 aberration_series3[] = { {1,0,0,0,0,715,-656,-285}, {0,0,0,0,1,0,26,-59}, {1,0,0,1,0,39,-36,-16}, {1,2,0,-1,0,8,-7,-3}, {1,-2,0,0,0,5,-5,-2}, {1,2,0,0,0,4,-4,-2}, {0,0,0,1,1,0,1,-3}, {1,-2,0,1,0,-2,2,1}, {1,0,0,2,0,2,-2,-1}, {0,2,0,0,-1,0,1,-2}, {1,0,0,0,-2,-1,1,1}, {1,0,1,0,0,-1,1,0}, {1,0,-1,0,0,1,-1,0}, {1,4,0,-2,0,1,-1,0}, {1,-2,0,2,0,-1,1,0}, {1,2,0,1,0,1,0,0}, {0,2,0,-1,1,0,0,-1} }; /* * Calculates the components of the earth's velocity. * * tdb -- TDB to be used for calculations. TT may be used for all but the most * exacting applications. * vel -- The Earth's velocity components in 10**(-8) AU/day. The reference frame * is the equinox & equator of J2000. */ void aberration_earth_velocity(struct julian_date *tdb, struct rectangular_coordinates *vel) { int i; struct rectangular_coordinates v1,v2,v3; double t,me,ve,ea,ma,ju,sa,ur,ne,l,lp,f,d,w,phi,c_phi,s_phi; /* Fundamental arguments */ t = JULIAN_CENTURIES(tdb->date1, tdb->date2); me = fundamental_argument(ARG_LONGITUDE_MERCURY, t); ve = fundamental_argument(ARG_LONGITUDE_VENUS, t); ea = fundamental_argument(ARG_LONGITUDE_EARTH, t); ma = fundamental_argument(ARG_LONGITUDE_MARS, t); ju = fundamental_argument(ARG_LONGITUDE_JUPITER, t); sa = fundamental_argument(ARG_LONGITUDE_SATURN, t); ur = fundamental_argument(ARG_LONGITUDE_URANUS, t); ne = fundamental_argument(ARG_LONGITUDE_NEPTUNE, t); l = fundamental_argument(ARG_ANOMALY_MOON, t); lp = fundamental_argument(ARG_ANOMALY_SUN, t); f = fundamental_argument(ARG_LATITUDE_MOON, t); d = fundamental_argument(ARG_ELONGATION_MOON, t); w = fundamental_argument(ARG_LONGITUDE_MOON, t); memset(&v1, 0, sizeof(v1)); memset(&v2, 0, sizeof(v2)); memset(&v3, 0, sizeof(v3)); /* * Sum up each series individually with the smallest terms first * in order to maximize precision */ /* EMB's heliocentric motion #2 */ i = sizeof(aberration_series1_2) / sizeof(aberration_series1_2[0]) - 1; for (; i >= 0; i--) { phi = aberration_series1_2[i].l_me * me + aberration_series1_2[i].l_ve * ve + aberration_series1_2[i].l_ea * ea + aberration_series1_2[i].l_ma * ma + aberration_series1_2[i].l_ju * ju + aberration_series1_2[i].l_sa * sa; sincos(phi, &s_phi, &c_phi); v1.x += aberration_series1_2[i].x_sin * s_phi + aberration_series1_2[i].x_cos * c_phi; v1.y += aberration_series1_2[i].y_sin * s_phi + aberration_series1_2[i].y_cos * c_phi; v1.z += aberration_series1_2[i].z_sin * s_phi + aberration_series1_2[i].z_cos * c_phi; } /* EMB's heliocentric motion #1 */ i = sizeof(aberration_series1_1) / sizeof(aberration_series1_1[0]) - 1; for (; i >= 0; i--) { phi = aberration_series1_1[i].l_ea * ea; sincos(phi, &s_phi, &c_phi); v1.x += (aberration_series1_1[i].x_sin + aberration_series1_1[i].x_sin_t * t) * s_phi; v1.x += (aberration_series1_1[i].x_cos + (aberration_series1_1[i].x_cos_t + aberration_series1_1[i].x_cos_t2 * t) * t) * c_phi; v1.y += (aberration_series1_1[i].y_sin + (aberration_series1_1[i].y_sin_t + aberration_series1_1[i].y_sin_t2 * t) * t) * s_phi; v1.y += (aberration_series1_1[i].y_cos + aberration_series1_1[i].y_cos_t * t) * c_phi; v1.z += (aberration_series1_1[i].z_sin + (aberration_series1_1[i].z_sin_t + aberration_series1_1[i].z_sin_t2 * t) * t) * s_phi; v1.z += (aberration_series1_1[i].z_cos + aberration_series1_1[i].z_cos_t * t) * c_phi; } /* The Sun's motion wrt the solar system barycenter */ i = sizeof(aberration_series2) / sizeof(aberration_series2[0]) - 1; for (; i >= 0; i--) { phi = aberration_series2[i].l_ve * ve + aberration_series2[i].l_ea * ea + aberration_series2[i].l_ju * ju + aberration_series2[i].l_sa * sa + aberration_series2[i].l_ur * ur + aberration_series2[i].l_ne * ne; sincos(phi, &s_phi, &c_phi); v2.x += aberration_series2[i].x_sin * s_phi + aberration_series2[i].x_cos * c_phi; v2.y += aberration_series2[i].y_sin * s_phi + aberration_series2[i].y_cos * c_phi; v2.z += aberration_series2[i].z_sin * s_phi + aberration_series2[i].z_cos * c_phi; } /* The Earth's motion wrt to the EMB */ i = sizeof(aberration_series3) / sizeof(aberration_series3[0]) - 1; for (; i >= 0; i--) { phi = aberration_series3[i].w * w + aberration_series3[i].d * d + aberration_series3[i].lp * lp + aberration_series3[i].l * l + aberration_series3[i].f * f; sincos(phi, &s_phi, &c_phi); v3.x += aberration_series3[i].x_sin * s_phi; v3.y += aberration_series3[i].y_cos * c_phi; v3.z += aberration_series3[i].z_cos * c_phi; } vel->x = v1.x + v2.x + v3.x; vel->y = v1.y + v2.y + v3.y; vel->z = v1.z + v2.z + v3.z; } /* * Calculates the annual aberration in right ascension and declination. * * tdb -- TDB to be used for calculations. * e -- Equatorial coordinates of the celestial body. * d_ra -- Aberration in right ascension. * d_dec -- Aberration in declination. */ void annual_aberration(struct julian_date *tdb, struct equatorial_coordinates *e, double *d_ra, double *d_dec) { double c,cra,sra,cdec,sdec; struct rectangular_coordinates v; /* Speed of light in 10**(-8) AU/day */ c = 17314463348.4; /* Get the components of the Earth's velocity */ aberration_earth_velocity(tdb, &v); sincos(e->right_ascension, &sra, &cra); sincos(e->declination, &sdec, &cdec); *d_ra = (v.y * cra - v.x * sra) / (c * cdec); *d_dec = (v.z * cdec - (v.x * cra + v.y * sra) * sdec) / c; }nautic-1.5/src/delta_t.cpp0000644000175000017500000001015711507052740015436 0ustar moellermoeller/* * delta-t.c - Implementation for calculating Delta-T * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * An implementation of NASA's polynomial expressions for approximating Delta-T * * Reference : */ #include "kepler.h" #include "delta_t.h" /* * Returns an approximate value for Delta-T (TT - UT1) valid for a limited * historical period. * * year -- Astronomical year number between 2000BC and 3000AD inclusive. * month -- Month of the year. * delta_t -- An approximate value for Delta-T in seconds. * correction -- A correction, in seconds, to be added to Delta-T for years * before 1955AD or after 2005AD and when used in conjunction with * NASA's publication "Five millennium canon of solar eclipses". * * Return: SUCCESS -- Delta-T calculated successfully. * ERR_INVALID_DATE -- Invalid year or month specified. */ int delta_t(int year, int month, double *delta_t, double *correction) { double u,y; if (year < -1999 || year > 3000 || month < 1 || month > 12) return ERR_INVALID_DATE; y = year + (month - 0.5) / 12; if (year < -500) { u = (year - 1820) / 100; *delta_t = -20 + 32 * u * u; } else if (year >= -500 && year < 500) { u = y / 100; *delta_t = 10583.6 + (-1014.41 + (33.78311 + (-5.952053 + (-0.1798452 + (0.022174192 + 0.0090316521 * u) * u) * u) * u) * u) * u; } else if (year >= 500 && year < 1600) { u = (y - 1000) / 100; *delta_t = 1574.2 + (-556.01 + (71.23472 + (0.319781 + (-0.8503463 + (-0.005050998 + 0.0083572073 * u) * u) * u) * u) * u) * u; } else if (year >= 1600 && year < 1700) { u = y - 1600; *delta_t = 120 + (-0.9808 + (-0.01532 + u / 7129.0) * u) * u; } else if (year >= 1700 && year < 1800) { u = y - 1700; *delta_t = 8.83 + (0.1603 + (-0.0059285 + (0.00013336 - u / 1174000.0) * u) * u) * u; } else if (year >= 1800 && year < 1860) { u = y - 1800; *delta_t = 13.72 + (-0.332447 + (0.0068612 + (0.0041116 + (-0.00037436 + (0.0000121272 + (-0.0000001699 + 0.000000000875 * u) * u) * u) * u) * u) * u) * u; } else if (year >= 1860 && year < 1900) { u = y - 1860; *delta_t = 7.62 + (0.5737 + (-0.251754 + (0.01680668 + (-0.0004473624 + u / 233174.0) * u) * u) * u) * u; } else if (year >= 1900 && year < 1920) { u = y - 1900; *delta_t = -2.79 + (1.494119 + (-0.0598939 + (0.0061966 - 0.000197 * u) * u) * u) * u; } else if (year >= 1920 && year < 1941) { u = y - 1920; *delta_t = 21.20 + (0.84493 + (-0.076100 + 0.0020936 * u) * u) * u; } else if (year >= 1941 && year < 1961) { u = y - 1950; *delta_t = 29.07 + (0.407 + (-1.0 / 233.0 + u / 2547.0) * u) * u; } else if (year >= 1961 && year < 1986) { u = y - 1975; *delta_t = 45.45 + (1.067 + (-1.0 / 260.0 - u / 718.0) * u) * u; } else if (year >= 1986 && year < 2005) { u = y - 2000; *delta_t = 63.86 + (0.3345 + (-0.060374 + (0.0017275 + (0.000651814 + 0.00002373599 * u) * u) * u) * u) * u; } else if (year >= 2005 && year < 2050) { u = y - 2000; *delta_t = 62.92 + (0.32217 + 0.005589 * u) * u; } else if (year >= 2050 && year < 2150) { u = (y - 1820) / 100; *delta_t = -20 + 32 * u * u - 0.5628 * (2150 - y); } else { u = (year - 1820) / 100; *delta_t = -20 + 32 * u * u; } if (year < 1955 || year > 2005) *correction = -0.000012932 * (y - 1955) * (y - 1955); else *correction = 0; return SUCCESS; }nautic-1.5/src/starpos.cpp0000644000175000017500000034533311551377232015531 0ustar moellermoeller #include #include "starpos.h" #include // This is a magic incantation which must be done! #define WILLIAMS 1 #define SIMON 0 #define TABSTART 1620 #define TABEND 2013 #define TABSIZ (TABEND - TABSTART + 1) #define double double #define COS cos #define SIN sin #define mods3600(x) ((x) - 1.296e6 * floor ((x)/1.296e6)) #define mod3600(x) ((x) - 1296000. * floor ((x)/1296000.)) #define NCON 89 /* Earth radii per au */ #define DISFAC1 2.3454780e4 /* cosine of 90 degrees 50 minutes: */ #define COSSUN -0.014543897651582657 /* cosine of 90 degrees 34 minutes: */ #define COSZEN -9.8900378587411476e-3 #define RTOH (12.0/PI) double DTR = 1.7453292519943295769e-2; double RTD = 5.7295779513082320877e1; double RTS = 2.0626480624709635516e5; /* arc seconds per radian */ double STR = 4.8481368110953599359e-6; /* radians per arc second */ double PI = 3.14159265358979323846; Starpos::Starpos() { } double JD; double rearth[3]; double dtgiven = 0.0; double dradt; double ddecdt; double jdeps = -1.0; /* Date for which obliquity was last computed */ double eps = 0.0; /* The computed obliquity in radians */ double coseps = 0.0; /* Cosine of the obliquity */ double sineps = 0.0; /* Sine of the obliquity */ #define J2000 2451545.0 /* 2000 January 1.5 */ /* starpos.cpp star position implementation Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #define B1950 2433282.423 /* 1950 January 0.923 Besselian epoch */ #define J1900 2415020.0 /* 1900 January 0, 12h UT */ double SE; /* earth-sun distance */ double SO; /* object-sun distance */ double EO; /* object-earth distance */ double TDT; double UT; int jdflag; int prtflg = 1; struct orbit *elobject; static char starnam[80] = {'s','t','a','r','.','c','a','t','\0'}; static char orbnam[80] = {'o','r','b','i','t','.','c','a','t','\0'}; const char * pathname = "/usr/share/nautic/star"; //static int linenum = 1; static double pAcof[] = { #if 1 /* Corrections to Williams (1994) introduced in DE403. */ -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3, -0.235316, 0.076, 110.5414, 50287.91959 #else -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3, -0.235316, 0.076, 110.5407, 50287.70000 #endif }; #if SIMON /* Precession coefficients from Simon et al: */ static double pAcof[] = { -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3, -0.235316, 0.07732, 111.2022, 50288.200 }; #endif #if LASKAR /* Precession coefficients taken from Laskar's paper: */ static double pAcof[] = { -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3, -0.235316, 0.07732, 111.1971, 50290.966 }; #endif #if WILLIAMS /* Pi from Williams' 1994 paper, in radians. No change in DE403. */ static double nodecof[] = { 6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 1.9e-10, -3.54e-9, -1.8103e-7, 1.26e-7, 7.436169e-5, -0.04207794833, 3.052115282424}; /* pi from Williams' 1994 paper, in radians. No change in DE403. */ static double inclcof[] = { 1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11, -5.4000441e-11, 1.32115526e-9, -6.012e-7, -1.62442e-5, 0.00227850649, 0.0 }; #endif #if SIMON static double nodecof[] = { 6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 1.9e-10, -3.54e-9, -1.8103e-7, 2.579e-8, 7.4379679e-5, -0.0420782900, 3.0521126906}; static double inclcof[] = { 1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11, -5.4000441e-11, 1.32115526e-9, -5.99908e-7, -1.624383e-5, 0.002278492868, 0.0 }; #endif /* Node and inclination of the earth's orbit computed from * Laskar's data as done in Bretagnon and Francou's paper. * Units are radians. */ short dt[TABSIZ] = { /* 1620.0 thru 1659.0 */ 12400, 11900, 11500, 11000, 10600, 10200, 9800, 9500, 9100, 8800, 8500, 8200, 7900, 7700, 7400, 7200, 7000, 6700, 6500, 6300, 6200, 6000, 5800, 5700, 5500, 5400, 5300, 5100, 5000, 4900, 4800, 4700, 4600, 4500, 4400, 4300, 4200, 4100, 4000, 3800, /* 1660.0 thru 1699.0 */ 3700, 3600, 3500, 3400, 3300, 3200, 3100, 3000, 2800, 2700, 2600, 2500, 2400, 2300, 2200, 2100, 2000, 1900, 1800, 1700, 1600, 1500, 1400, 1400, 1300, 1200, 1200, 1100, 1100, 1000, 1000, 1000, 900, 900, 900, 900, 900, 900, 900, 900, /* 1700.0 thru 1739.0 */ 900, 900, 900, 900, 900, 900, 900, 900, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1200, 1200, 1200, 1200, 1200, 1200, /* 1740.0 thru 1779.0 */ 1200, 1200, 1200, 1200, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1700, 1700, 1700, 1700, 1700, /* 1780.0 thru 1799.0 */ 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1600, 1600, 1600, 1600, 1500, 1500, 1400, 1400, /* 1800.0 thru 1819.0 */ 1370, 1340, 1310, 1290, 1270, 1260, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1240, 1230, 1220, /* 1820.0 thru 1859.0 */ 1200, 1170, 1140, 1110, 1060, 1020, 960, 910, 860, 800, 750, 700, 660, 630, 600, 580, 570, 560, 560, 560, 570, 580, 590, 610, 620, 630, 650, 660, 680, 690, 710, 720, 730, 740, 750, 760, 770, 770, 780, 780, /* 1860.0 thru 1899.0 */ 788, 782, 754, 697, 640, 602, 541, 410, 292, 182, 161, 10, -102, -128, -269, -324, -364, -454, -471, -511, -540, -542, -520, -546, -546, -579, -563, -564, -580, -566, -587, -601, -619, -664, -644, -647, -609, -576, -466, -374, /* 1900.0 thru 1939.0 */ -272, -154, -2, 124, 264, 386, 537, 614, 775, 913, 1046, 1153, 1336, 1465, 1601, 1720, 1824, 1906, 2025, 2095, 2116, 2225, 2241, 2303, 2349, 2362, 2386, 2449, 2434, 2408, 2402, 2400, 2387, 2395, 2386, 2393, 2373, 2392, 2396, 2402, /* 1940.0 thru 1979.0 */ 2433, 2483, 2530, 2570, 2624, 2677, 2728, 2778, 2825, 2871, 2915, 2957, 2997, 3036, 3072, 3107, 3135, 3168, 3218, 3268, 3315, 3359, 3400, 3447, 3503, 3573, 3654, 3743, 3829, 3920, 4018, 4117, 4223, 4337, 4449, 4548, 4646, 4752, 4853, 4959, /* 1980.0 thru 2003.0 */ 5054, 5138, 5217, 5296, 5379, 5434, 5487, 5532, 5582, 5630, 5686, 5757, 5831, 5912, 5998, 6078, 6163, 6230, 6297, 6347, 6383, 6409, 6430, 6447, /* Extrapolated values */ 6456, 6600, 6700, 6800, 6900, 7000, 7100, 7200, 7300, 7400, }; struct plantbl moonlat = { 14, { 0, 26, 29, 8, 3, 5, 0, 0, 0, 6, 5, 3, 5, 1, 0, 0, 0, 0,}, 3, argsl, tabll, tabbl, tabrl, 0.0000000000000000e+00, 3.6525000000000000e+06, 1.0000000000000000e-04, }; struct plantbl moonlr = { 14, { 3, 26, 29, 23, 5, 10, 0, 0, 0, 8, 4, 4, 6, 2, 0, 0, 0, 0,}, 3, argsm, tablm, tabbm, tabrm, 2.5735686895300000e-03, 3.6525000000000000e+06, 1.0000000000000000e-04, }; struct plantbl ear404 = { 12, { 2, 11, 14, 19, 6, 10, 2, 2, 0, 1, 1, 4, 0, 0, 0, 0, 0, 0,}, 3, args, tabl, tabb, tabr, 1.0001398729597080e+00, 3.6525000000000000e+06, 1.0000000000000000e-04, }; struct plantbl mar404 = { 9, { 0, 5, 12, 24, 9, 7, 3, 2, 0,}, 5, argsmr, tablmr, tabbmr, tabrmr, 1.5303348827100001e+00, 3652500.0, 1.0 }; struct plantbl ven404 = { 9, { 5, 14, 13, 8, 4, 5, 1, 0, 0,}, 5, argsv, tablv, tabbv, tabrv, 7.2332982000000001e-01, 3652500.0, 1.0 }; struct plantbl jup404 = { 9, { 0, 0, 1, 0, 9, 16, 7, 5, 0,}, 6, argsj, tablj, tabbj, tabrj, 5.2026032092000003e+00, 3652500.0, 1.0 }; struct plantbl sat404 = { 9, { 0, 0, 1, 0, 8, 18, 9, 5, 0,}, 7, argsst, tablst, tabbst, tabrst, 9.5575813548599999e+00, 3652500.0, 1.0 }; struct orbit { char obname[16]; /* name of the object */ double epoch; /* epoch of orbital elements */ double i; /* inclination */ double W; /* longitude of the ascending node */ double w; /* argument of the perihelion */ double a; /* mean distance (semimajor axis) */ double dm; /* daily motion */ double ecc; /* eccentricity */ double M; /* mean anomaly */ double equinox; /* epoch of equinox and ecliptic */ double mag; /* visual magnitude at 1AU from earth and sun */ double sdiam; /* equatorial semidiameter at 1au, arc seconds */ /* The following used by perterbation formulas: */ struct plantbl *ptable; double L; /* computed mean longitude */ double r; /* computed radius vector */ double plat; /* perturbation in ecliptic latitude */ }; struct star { char obname[32]; /* Object name (31 chars) */ double epoch; /* Epoch of coordinates */ double ra; /* Right Ascension, radians */ double dec; /* Declination, radians */ double px; /* Parallax, radians */ double mura; /* proper motion in R.A., rad/century */ double mudec; /* proper motion in Dec., rad/century */ double v; /* radial velocity, km/s */ double equinox; /* Epoch of equinox and ecliptic */ double mag; /* visual magnitude */ }; static double A[3] = {-1.62557e-6, -3.1919e-7, - 1.3843e-7}; static double Ad[3] = {1.244e-3, -1.579e-3, -6.60e-4}; /* Transformation matrix for unit direction vector, * and motion vector in arc seconds per century */ static double Mat[36] = { 0.9999256782, -0.0111820611, -4.8579477e-3, 2.42395018e-6, -2.710663e-8, -1.177656e-8, 0.0111820610, 0.9999374784, -2.71765e-5, 2.710663e-8, 2.42397878e-6, -6.587e-11, 4.8579479e-3, -2.71474e-5, 0.9999881997, 1.177656e-8, -6.582e-11, 2.42410173e-6, -5.51e-4, -0.238565, 0.435739, 0.99994704, -0.01118251, -4.85767e-3, 0.238514, -2.667e-3, -8.541e-3, 0.01118251, 0.99995883, -2.718e-5, -0.435623, 0.012254, 2.117e-3, 4.85767e-3, -2.714e-5, 1.00000956 }; char *months[12] = { (char*)"January", (char*)"February", (char*)"March", (char*)"April", (char*)"May", (char*)"June", (char*)"July", (char*)"August", (char*)"September", (char*)"October", (char*)"November", (char*)"December" }; char *days[7] = { (char*)"Sunday", (char*)"Monday", (char*)"Tuesday", (char*)"Wednesday", (char*)"Thursday", (char*)"Friday", (char*)"Saturday" }; struct orbit earth = { "Earth ", 2446800.5, 0.0, 0.0, 102.884, 0.999999, 0.985611, 0.016713, 1.1791, 2446800.5, -3.86, 0.0, &ear404, 0.0, 0.0, 0.0 }; struct orbit venus = { "Venus ", 2446800.5, 3.3946, 76.561, 54.889, 0.723329, 1.60214, 0.006757, 9.0369, 2446800.5, /* Note the calculated apparent visual magnitude for Venus * is not very accurate. */ -4.40, 8.34, &ven404, 0.0, 0.0, 0.0 }; struct orbit mars = { "Mars ", 2446800.5, 1.8498, 49.457, 286.343, 1.523710, 0.524023, 0.093472, 53.1893, 2446800.5, -1.52, 4.68, &mar404, 0.0, 0.0, 0.0 }; struct orbit jupiter = { "Jupiter ", 2446800.5, 1.3051, 100.358, 275.129, 5.20265, 0.0830948, 0.048100, 344.5086, 2446800.5, -9.40, 98.44, &jup404, 0.0, 0.0, 0.0 }; struct orbit saturn = { "Saturn ", 2446800.5, 2.4858, 113.555, 337.969, 9.54050, 0.0334510, 0.052786, 159.6327, 2446800.5, -8.88, 82.73, &sat404, 0.0, 0.0, 0.0 }; static double freqs[] = { /* Arc sec per 10000 Julian years. */ 53810162868.8982, 21066413643.3548, 12959774228.3429, 6890507749.3988, 1092566037.7991, 439960985.5372, 154248119.3933, 78655032.0744, 52272245.1795 }; static double phases[] = { /* Arc sec. */ 252.25090552 * 3600., 181.97980085 * 3600., 100.46645683 * 3600., 355.43299958 * 3600., 34.35151874 * 3600., 50.07744430 * 3600., 314.05500511 * 3600., 304.34866548 * 3600., 860492.1546, }; short nt[105*9] = { 0, 0, 0, 0, 2, 2062, 2,-895, 5, -2, 0, 2, 0, 1, 46, 0,-24, 0, 2, 0,-2, 0, 0, 11, 0, 0, 0, -2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 0, 0, -2, 0, 2, 2, 2, 1, 0,-1, 0, -1, 0, 2, 4, 2,-2, 0, 1, 0, 2, 0, 0,-4, 0,-1, 0, 0, 0, 1, 1, 2,-2, 2, 1, 0,-1, 0, 1, 0, 2, 2, 1,-1, 0, 1, 0, -2, 0, 2, 4, 2,-1, 0, 1, 0, -1, 0, 4, 0, 2, 1, 0, 0, 0, 1,-1, 0,-2, 0, 1, 0, 0, 0, 2, 0, 2,-2, 1, 1, 0,-1, 0, 2, 0, 2, 2, 2,-1, 0, 0, 0, 1, 0, 0, 2, 1,-1, 0, 0, 0, 0, 0, 4,-2, 2, 1, 0, 0, 0, 3, 0, 2,-2, 2, 1, 0, 0, 0, 1, 0, 2,-2, 0,-1, 0, 0, 0, 0, 1, 2, 0, 1, 1, 0, 0, 0, -1,-1, 0, 2, 1, 1, 0, 0, 0, 0, 0,-2, 0, 1,-1, 0, 0, 0, 0, 0, 2,-1, 2,-1, 0, 0, 0, 0, 1, 0, 2, 0,-1, 0, 0, 0, 1, 0,-2,-2, 0,-1, 0, 0, 0, 0,-1, 2, 0, 1,-1, 0, 0, 0, 1, 1, 0,-2, 1,-1, 0, 0, 0, 1, 0,-2, 2, 0,-1, 0, 0, 0, 2, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 2, 4, 2,-1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, }; /* Greek letters */ #define NGREEK 24 const char *greek[NGREEK] = { "alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "sigma", "tau", "upsilon", "phi", "chi", "psi", "omega", }; const char *constel[NCON] = { "And Andromedae", "Ant Antliae", "Aps Apodis", "Aql Aquilae", "Aqr Aquarii", "Ari Arietis", "Ara Arae", "Aur Aurigae", "Boo Bootis", "Cae Caeli", "Cam Camelopardalis", "Can Cancri", /* also abbreviated Cnc */ "Cap Capricorni", "Car Carinae", "Cas Cassiopeiae", "Cen Centauri", "Cep Cephei", "Cet Ceti", "Cha Chamaeleontis", "Cir Circini", "CMa Canis Majoris", "CMi Canis Minoris", "Cnc Cancri", "Col Columbae", "Com Comae Berenices", "CrA Coronae Austrinae", "CrB Coronae Borealis", "Crt Crateris", "Cru Crucis", "Crv Corvi", "CVn Canum Venaticorum", "Cyg Cygni", "Del Delphini", "Dor Doradus", "Dra Draconis", "Equ Equulei", "Eri Eridani", "For Fornacis", "Gem Geminorum", "Gru Gruis", "Her Herculis", "Hor Horologii", "Hya Hydrae", "Hyi Hydri", "Ind Indi", "Lac Lacertae", "Leo Leonis", "Lep Leporis", "Lib Librae", "LMi Leonis Minoris", "Lup Lupi", "Lyn Lyncis", "Lyr Lyrae", "Men Mensae", "Mic Microscopii", "Mon Monocerotis", "Mus Muscae", "Nor Normae", "Oct Octantis", "Oph Ophiuchi", "Ori Orionis", "Pav Pavonis", "Peg Pegasi", "Per Persei", "Phe Phoenicis", "Pic Pictoris", "PsA Piscis Austrini", "Psc Piscium", "Pup Puppis", "Pyx Pyxidis", "Ret Reticuli", "Scl Sculptoris", "Sco Scorpii", "Sct Scuti", "Ser Serpentis", "Sex Sextantis", "Sge Sagittae", "Sgr Sagittarii", "Tau Tauri", "Tel Telescopii", "TrA Trianguli Australis", "Tri Trianguli", "Tuc Tucanae", "UMa Ursae Majoris", "UMi Ursae Minoris", "Vel Velorum", "Vir Virginis", "Vol Volantis", "Vul Vulpeculae", }; #define NBNDRIES 357 long bndries[4*NBNDRIES] = { 0, 86400, 316800, 84, 28800, 52200, 311400, 84, 75600, 82800, 310200, 84, 64800, 75600, 309600, 84, 0, 28800, 306000, 16, 33000, 38400, 295200, 10, 0, 18000, 288000, 16, 38400, 52200, 288000, 10, 63000, 64800, 288000, 84, 72600, 75600, 288000, 34, 0, 12630, 277200, 16, 41400, 48900, 277200, 10, 59520, 63000, 270000, 84, 72600, 74400, 270000, 16, 28680, 33000, 264600, 10, 33000, 40800, 264600, 34, 46800, 59520, 252000, 84, 11160, 12300, 244800, 14, 73500, 74400, 241200, 34, 40800, 43200, 239400, 34, 0, 1200, 237600, 16, 50400, 56400, 237600, 84, 84900, 86400, 237600, 16, 43200, 48600, 230400, 34, 48600, 51900, 226800, 34, 83400, 84900, 226800, 16, 21960, 25200, 223200, 10, 72000, 73500, 221400, 34, 73932, 74160, 219300, 16, 25200, 28680, 216000, 10, 28680, 30300, 216000, 83, 71160, 72000, 214200, 34, 72000, 73932, 214200, 16, 82320, 83400, 212700, 16, 0, 8760, 210600, 14, 69900, 71160, 208800, 34, 6120, 6870, 207000, 14, 8760, 11160, 205200, 14, 11160, 11400, 205200, 10, 80340, 82320, 202500, 16, 18000, 21960, 201600, 10, 50520, 51900, 199800, 83, 51900, 69900, 199800, 34, 11400, 12000, 198000, 10, 79680, 80340, 198000, 16, 74160, 79080, 197400, 16, 0, 6120, 194400, 14, 21960, 23400, 194400, 51, 43500, 48600, 190800, 83, 54900, 56700, 190800, 34, 79080, 79680, 189900, 16, 12000, 18000, 189000, 10, 82320, 84000, 189000, 14, 56700, 61200, 185400, 34, 7350, 9060, 181800, 63, 61200, 65640, 181800, 34, 0, 4920, 180000, 14, 4920, 6000, 180000, 63, 23400, 24480, 180000, 51, 84000, 86400, 180000, 14, 48600, 50520, 174600, 83, 0, 4020, 172800, 14, 84900, 86400, 172800, 14, 65430, 65640, 171000, 40, 65640, 68700, 171000, 34, 68700, 69000, 171000, 31, 6000, 7350, 169200, 63, 30300, 33000, 169200, 83, 600, 3120, 165600, 14, 43200, 43500, 162000, 83, 24480, 26520, 160200, 51, 78870, 79080, 158400, 31, 78750, 78870, 157500, 31, 69000, 69840, 156600, 31, 33000, 36600, 151200, 83, 36600, 38820, 144000, 83, 55560, 56700, 144000, 8, 56700, 58800, 144000, 40, 33300, 34500, 143100, 51, 0, 9060, 132300, 0, 9060, 9240, 132300, 63, 69690, 69840, 131400, 52, 16200, 16890, 129600, 63, 78240, 78750, 129600, 31, 78750, 79200, 129600, 45, 23520, 26520, 127800, 7, 26520, 27900, 127800, 51, 0, 7200, 126000, 0, 79200, 82140, 126000, 45, 82140, 82320, 124200, 45, 82320, 84600, 124200, 0, 9240, 9780, 122400, 63, 38820, 39600, 122400, 83, 43200, 44400, 122400, 30, 27900, 33300, 120600, 51, 33300, 35580, 120600, 49, 2580, 5070, 118800, 0, 54660, 55560, 118800, 8, 84600, 85500, 115500, 0, 44400, 47700, 115200, 30, 85500, 86400, 112800, 0, 50250, 50520, 110700, 30, 8700, 9780, 110400, 81, 9780, 16200, 110400, 63, 16200, 17100, 108000, 7, 65430, 69690, 108000, 52, 39600, 43200, 104400, 83, 70800, 75300, 104400, 31, 17100, 21180, 102600, 7, 35580, 37800, 102600, 49, 47700, 50250, 102600, 30, 0, 240, 100800, 0, 5070, 6000, 100800, 81, 21180, 23520, 100800, 7, 28380, 28800, 100800, 38, 75300, 78240, 100800, 31, 69330, 70800, 99000, 31, 6900, 8700, 98100, 81, 58200, 58800, 97200, 26, 54300, 54660, 93600, 8, 54660, 58200, 93600, 26, 66120, 67920, 93600, 52, 38700, 39600, 91800, 49, 67920, 69330, 91800, 52, 6000, 6900, 90000, 81, 2580, 3060, 85500, 67, 37800, 38700, 84600, 49, 76500, 77100, 84600, 88, 20520, 21180, 82200, 78, 240, 510, 79200, 0, 57300, 57720, 79200, 74, 21180, 22380, 77400, 38, 71400, 72900, 76500, 88, 67920, 69300, 75900, 88, 510, 3060, 75600, 0, 72900, 74040, 73800, 88, 28110, 28380, 72000, 38, 74040, 76500, 70200, 88, 69300, 71400, 69000, 88, 11820, 12120, 68400, 5, 67920, 68400, 66600, 76, 20520, 20760, 64800, 60, 22380, 22710, 63000, 38, 68400, 71400, 58200, 76, 17880, 19200, 57600, 78, 57300, 57900, 57600, 40, 71400, 72900, 56700, 76, 16620, 17880, 55800, 78, 19200, 20160, 55800, 78, 46200, 48600, 54000, 24, 62100, 65700, 51600, 40, 42720, 46200, 50400, 24, 27000, 28110, 48600, 38, 60300, 62100, 46200, 40, 0, 510, 45000, 62, 20160, 20760, 45000, 78, 25200, 27000, 45000, 38, 76020, 76800, 45000, 62, 22710, 24960, 43200, 38, 65700, 67920, 43200, 40, 75150, 75780, 42600, 32, 75780, 76020, 42600, 62, 41460, 42720, 39600, 46, 22470, 22710, 36000, 60, 24960, 25200, 36000, 38, 28110, 28530, 36000, 22, 85800, 86400, 36000, 62, 6000, 11820, 35700, 5, 72510, 73080, 30600, 32, 48600, 54300, 28800, 8, 81900, 85800, 27000, 62, 28530, 33300, 25200, 22, 33300, 38700, 25200, 46, 65700, 67184, 22500, 59, 67184, 67920, 22500, 3, 75000, 75150, 21600, 32, 25200, 25260, 19800, 21, 65700, 66330, 16200, 74, 57900, 60300, 14400, 40, 65700, 66330, 10800, 59, 77280, 78000, 9900, 62, 0, 7200, 7200, 67, 66900, 67920, 7200, 74, 73080, 75000, 7200, 32, 75000, 76800, 7200, 35, 76800, 77280, 7200, 62, 79200, 81900, 7200, 62, 78000, 79200, 6300, 62, 25260, 25920, 5400, 21, 12900, 16620, 0, 78, 16620, 16800, 0, 60, 25920, 29100, 0, 21, 52800, 54300, 0, 86, 64200, 65700, 0, 59, 9540, 11820, -6300, 17, 11820, 12900, -6300, 78, 54300, 58560, -11700, 74, 16800, 18300, -14400, 60, 21000, 22470, -14400, 60, 64200, 64680, -14400, 74, 65700, 66900, -14400, 74, 66900, 67920, -14400, 3, 81900, 85800, -14400, 67, 38700, 41460, -21600, 46, 41460, 42600, -21600, 86, 0, 1200, -25200, 67, 85800, 86400, -25200, 67, 51300, 52800, -28800, 86, 57300, 58560, -28800, 59, 72000, 73920, -32400, 3, 76800, 78720, -32400, 4, 61800, 64680, -36000, 59, 21000, 29100, -39600, 55, 17700, 18300, -39600, 36, 18300, 21000, -39600, 60, 29100, 30120, -39600, 42, 34500, 38700, -39600, 75, 42600, 46200, -39600, 86, 63300, 63600, -42000, 59, 67920, 72000, -43320, 3, 17400, 17700, -52200, 36, 73920, 76800, -54000, 4, 61800, 65700, -57600, 74, 65700, 67920, -57600, 73, 30120, 30900, -61200, 42, 58560, 58950, -65700, 59, 30900, 32700, -68400, 42, 38700, 39000, -68400, 27, 58560, 58950, -69300, 59, 56400, 57300, -72000, 48, 45300, 46200, -79200, 29, 46200, 51300, -79200, 86, 32700, 35100, -86400, 42, 6000, 9540, -87780, 17, 9540, 13500, -87780, 36, 39000, 42600, -88200, 27, 42600, 45300, -88200, 29, 51300, 53700, -88200, 48, 58560, 60300, -88500, 59, 0, 6000, -91800, 17, 76800, 78720, -91800, 12, 78720, 85800, -91800, 4, 85800, 86400, -91800, 17, 35100, 36900, -95400, 42, 16920, 17400, -98100, 36, 17400, 22020, -98100, 47, 72000, 76800, -100800, 12, 36900, 38100, -105000, 42, 45300, 53700, -106200, 42, 53700, 56400, -106200, 48, 56400, 57600, -106200, 72, 16500, 16920, -108000, 36, 60300, 63360, -108000, 59, 63360, 64200, -108000, 77, 38100, 39000, -112200, 42, 22020, 26520, -118800, 20, 44100, 45300, -118800, 42, 39000, 44100, -126000, 42, 12600, 13500, -129600, 37, 30120, 33720, -132300, 69, 15360, 16500, -133200, 36, 64200, 69000, -133200, 77, 76800, 82800, -133200, 66, 82800, 84000, -133200, 71, 10800, 12600, -142500, 37, 33720, 39600, -143100, 1, 0, 6000, -144000, 71, 6000, 10800, -144000, 37, 13920, 15360, -144000, 36, 84000, 86400, -144000, 71, 51000, 53700, -151200, 15, 56400, 57600, -151200, 50, 57600, 59115, -151200, 72, 17400, 18000, -154800, 9, 18000, 23700, -154800, 23, 28800, 30120, -154800, 68, 12300, 13920, -158400, 36, 59115, 64200, -163800, 72, 64200, 69000, -163800, 25, 69000, 73200, -163800, 77, 73200, 76800, -163800, 54, 10800, 12300, -165600, 36, 16200, 17400, -167400, 9, 55200, 56400, -172800, 50, 0, 8400, -173400, 64, 9600, 10800, -176400, 36, 14700, 15360, -176400, 41, 15360, 16200, -176400, 9, 76800, 79200, -180000, 39, 21600, 28800, -182700, 68, 28800, 29400, -182700, 85, 8700, 9600, -183600, 36, 13800, 14700, -183600, 41, 0, 6600, -185400, 64, 21600, 22200, -189000, 13, 29400, 30420, -190800, 85, 12600, 13800, -191400, 41, 13800, 14400, -191400, 33, 0, 5700, -192600, 64, 7800, 8700, -194400, 36, 16200, 18000, -194400, 65, 54180, 55200, -194400, 50, 30420, 31800, -196200, 85, 22200, 23400, -198000, 13, 42600, 46200, -198000, 15, 51000, 54180, -198000, 50, 54180, 55200, -198000, 57, 14400, 15600, -203400, 33, 31800, 39600, -203400, 85, 39600, 40500, -203400, 15, 63000, 64800, -205200, 6, 64800, 73200, -205200, 79, 79200, 84000, -205200, 39, 11520, 12600, -207000, 41, 18000, 19800, -207000, 65, 23400, 24600, -208800, 13, 0, 4800, -210600, 64, 4800, 7800, -210600, 36, 84000, 86400, -210600, 64, 15600, 16500, -212400, 33, 55200, 59115, -216000, 57, 73200, 76800, -216000, 44, 19800, 21600, -219600, 65, 54600, 55200, -219600, 19, 59115, 59700, -219600, 6, 53700, 54600, -228900, 19, 59700, 60300, -228900, 6, 21600, 24600, -230400, 65, 24600, 32520, -230400, 13, 40500, 42600, -230400, 15, 42600, 46200, -230400, 28, 46200, 52320, -230400, 15, 48600, 49200, -234000, 19, 60300, 60600, -234000, 6, 7800, 11520, -243000, 41, 11520, 16500, -243000, 70, 53100, 53700, -243000, 19, 60600, 63000, -243000, 6, 63000, 64800, -243000, 61, 79200, 84000, -243000, 82, 16500, 23700, -252000, 33, 49200, 53100, -252000, 19, 53100, 61200, -252000, 80, 0, 4800, -270000, 82, 12600, 16500, -270000, 43, 23700, 32520, -270000, 87, 32520, 40500, -270000, 13, 40500, 49200, -270000, 56, 64800, 76800, -270000, 61, 76800, 84000, -270000, 44, 84000, 86400, -270000, 82, 2700, 4800, -273600, 82, 0, 12600, -297000, 43, 27600, 49200, -297000, 18, 49200, 64800, -297000, 2, 12600, 27600, -306000, 53, 0, 86400, -324000, 58, }; long cyear = 1986L; static int month = 1; static double day = 1.0; short yerend = 0; double pq; /* cosine of sun-object-earth angle */ double ep; /* -cosine of sun-earth-object angle */ double qe; /* cosine of earth-sun-object angle */ /* correction vector, saved for display */ double dp[3]; double jvearth = -1.0; double vearth[3] = {0.0}; double Clightaud; /* C in au/day */ double emrat = 81.300585; static double Args[NARGS]; static double LP_equinox; static double NF_arcsec; static double Ea_arcsec; static double pA_precession; static double ss[NARGS][31]; static double cc[NARGS][31]; double jdnut = -1.0; /* time to which the nutation applies */ double nutl; /* nutation in longitude (radians) */ double nuto; /* nutation in obliquity (radians) */ double j; /* Julian date and fraction */ /* East longitude of observer, degrees */ //double tlong = 0;//-71.13; /* Cambridge, Massachusetts */ //double tlat = 0;//42.38; /* geocentric */ //double glat = 0;//42.17; /* geodetic */ double r_trnsit; double r_rise; double r_set; int f_trnsit; double t_rise; double t_trnsit; double t_set; //int objnum = 88; /* I.D. number of object */ double obpolar[3]; double eapolar[3]; double trho = 0.9985; double aearth = 6378137.; /* Radius of the earth, in meters. */ double au = 1.49597870691e8; /* Astronomical unit, in kilometers. */ static double DISFAC = 2.3454780e4; double atpress; /* millibars */ double attemp; /* degrees C */ static double flat = 298.257222; static double height = 0.0; double Clight = 2.99792458e5; /* Speed of light, km/sec */ const char *intfmt = "%d"; const char *lngfmt = "%ld"; const char *dblfmt = "%lf"; const char *strfmt = "%s"; double Rearth; struct star * starobject; static double djd = 1.0; static int ntab = 1; /* Space for star description read from a disc file. */ struct star fstar; /* Space for orbit read from a disc file. Entering 99 for the * planet number yields a prompt for a file name containg ASCII * strings specifying the elements. */ struct orbit forbit; static int hours = 0; static int minutes = 0; static double seconds = 0.0; bool flag = false; bool fPlanet = false; static double ra; /* Right Ascension */ static double dec; /* Declination */ double robject[3] = {0.0}; /*////////////////////////////////funzioni////////////////////////////////////////////////////*/ int Starpos::trnsit(double J, double lha, double dec) { double x, y, z, N, D, TPI; double lhay, cosdec, sindec, coslat, sinlat; f_trnsit = 0; TPI = 2.0*PI; /* Initialize to no-event flag value. */ r_rise = -10.0; r_set = -10.0; /* observer's geodetic latitude, in radians */ x = glat * DTR; coslat = cos(x); sinlat = sin(x); cosdec = cos(dec); sindec = sin(dec); /* x = (J - floor(J-0.5) - 0.5) * TPI; */ x = floor(J) - 0.5; x = (J - x) * TPI; /* adjust local hour angle */ y = lha; /* printf ("%.7f,", lha); */ while( y < -PI ) y += TPI; while( y > PI ) y -= TPI; lhay = y; y = y/( -dradt/TPI + 1.00273790934); r_trnsit = x - y; /* printf ("rt %.7f ", r_trnsit); */ /* Ordinarily never print here. */ if( prtflg > 1 ) { //printf( "approx local meridian transit" ); hms( r_trnsit ); //printf( "UT (date + %.5f)\n", r_trnsit/TPI ); } if( (coslat == 0.0) || (cosdec == 0.0) ) goto norise; /* The time at which the upper limb of the body meets the * horizon depends on the body's angular diameter. */ switch( objnum ) { /* Sun */ case 0: N = COSSUN; break; /* Moon, elevation = -34' - semidiameter + parallax * semidiameter = 0.272453 * parallax + 0.0799" */ case 3: N = 1.0/(DISFAC*obpolar[2]); D = asin( N ); /* the parallax */ N = - 9.890199094634534e-3 + (1.0 - 0.2725076)*D - 3.874e-7; N = sin(N); break; /* Other object */ default: N = COSZEN; break; } y = (N - sinlat*sindec)/(coslat*cosdec); if( (y < 1.0) && (y > -1.0) ) { f_trnsit = 1; /* Derivative of y with respect to declination * times rate of change of declination: */ z = -ddecdt*(sinlat + COSZEN*sindec); z /= TPI*coslat*cosdec*cosdec; /* Derivative of acos(y): */ z /= sqrt( 1.0 - y*y); y = acos(y); D = -dradt/TPI + 1.00273790934; r_rise = x - (lhay + y)*(1.0 + z)/D; r_set = x - (lhay - y)*(1.0 - z)/D; /* Ordinarily never print here. */ if( prtflg > 1 ) { //printf( "rises approx " ); hms(r_rise); //printf( "UT, sets approx " ); hms(r_set); //printf( "UT\n" ); } } norise: ; return(0); } void Starpos::iter_func(double t, int (* func)()) { int prtsave; prtsave = prtflg; prtflg = 0; JD = t; update(); /* Set UT and TDT */ kepler( TDT, &earth, rearth, eapolar ); (*func)(); prtflg = prtsave; } double Starpos::sidrlt(double j,double tlong ) //double j; /* Julian date and fraction */ //double tlong; /* East longitude of observer, degrees */ { double jd0; /* Julian day at midnight Universal Time */ double secs; /* Time of day, UT seconds since UT midnight */ double eqeq, gmst, jd, T0, msday; /*long il;*/ /* Julian day at given UT */ jd = j; jd0 = floor(jd); secs = j - jd0; if( secs < 0.5 ) { jd0 -= 0.5; secs += 0.5; } else { jd0 += 0.5; secs -= 0.5; } secs *= 86400.0; /* Julian centuries from standard epoch J2000.0 */ /* T = (jd - J2000)/36525.0; */ /* Same but at 0h Universal Time of date */ T0 = (jd0 - J2000)/36525.0; /* The equation of the equinoxes is the nutation in longitude * times the cosine of the obliquity of the ecliptic. * We already have routines for these. */ nutlo(TDT); epsiln(TDT); /* nutl is in radians; convert to seconds of time * at 240 seconds per degree */ eqeq = 240.0 * RTD * nutl * coseps; /* Greenwich Mean Sidereal Time at 0h UT of date */ #if 1 #if 0 /* J. G. Williams, "Contributions to the Earth's obliquity rate, precession, and nutation," Astronomical Journal 108, p. 711 (1994). */ gmst = (((-2.0e-6*T0 - 3.e-7)*T0 + 9.27695e-2)*T0 + 8640184.7928613)*T0 + 24110.54841; /* UT days per sidereal day at date T0 */ msday = (((-(4. * 2.0e-6)*T0 - (3. * 3.e-7))*T0 + (2. * 9.27695e-2))*T0 + 8640184.7928613)/(86400.*36525.) + 1.0; #else /* Corrections to Williams (1994) introduced in DE403. */ gmst = (((-2.0e-6*T0 - 3.e-7)*T0 + 9.27701e-2)*T0 + 8640184.7942063)*T0 + 24110.54841; msday = (((-(4. * 2.0e-6)*T0 - (3. * 3.e-7))*T0 + (2. * 9.27701e-2))*T0 + 8640184.7942063)/(86400.*36525.) + 1.0; #endif #else /* This is the 1976 IAU formula. */ gmst = (( -6.2e-6*T0 + 9.3104e-2)*T0 + 8640184.812866)*T0 + 24110.54841; /* mean solar days per sidereal day at date T0 */ msday = 1.0 + ((-1.86e-5*T0 + 0.186208)*T0 + 8640184.812866)/(86400.*36525.); #endif /* Local apparent sidereal time at given UT */ gmst = gmst + msday*secs + eqeq + 240.0*tlong; /* Sidereal seconds modulo 1 sidereal day */ gmst = gmst - 86400.0 * floor( gmst/86400.0 ); /* * il = gmst/86400.0; * gmst = gmst - 86400.0 * il; * if( gmst < 0.0 ) * gmst += 86400.0; */ return( gmst ); } int Starpos::diurab(double last,double *ra,double *dec ) //double last; /* local apparent sidereal time, radians */ //double *ra; /* right ascension, radians */ //double *dec; /* declination, radians */ { double lha, coslha, sinlha, cosdec, sindec; double coslat, N, D; //trho =0; lha = last - *ra; coslha = cos(lha); sinlha = sin(lha); cosdec = cos(*dec); sindec = sin(*dec); coslat = cos( DTR*tlat ); if( cosdec != 0.0 ) N = 1.5472e-6*trho*coslat*coslha/cosdec; else N = 0.0; *ra += N; D = 1.5472e-6*trho*coslat*sinlha*sindec; *dec += D; /* if( prtflg ) { printf( "diurnal aberration dRA %.3fs dDec %.2f\"\n", RTS*N/15.0, RTS*D ); }*/ return(0); } int Starpos::diurpx(double last,double *ra,double *dec,double dist ) //double last; /* local apparent sidereal time, radians */ //double *ra; /* right ascension, radians */ //double *dec; /* declination, radians */ //double dist; /* Earth - object distance, au */ { double cosdec, sindec, coslat, sinlat; double p[3], dp[3], x, y, z, D; /* Don't bother with this unless the equatorial horizontal parallax * is at least 0.005" */ if( dist > 1758.8 ) return(-1); DISFAC = au / (0.001 * aearth); cosdec = cos(*dec); sindec = sin(*dec); /* Observer's astronomical latitude */ x = tlat * DTR; coslat = cos(x); sinlat = sin(x); /* Convert to equatorial rectangular coordinates * in which unit distance = earth radius */ D = dist * DISFAC; p[0] = D*cosdec*cos(*ra); p[1] = D*cosdec*sin(*ra); p[2] = D*sindec; dp[0] = -trho*coslat*cos(last); dp[1] = -trho*coslat*sin(last); dp[2] = -trho*sinlat; x = p[0] + dp[0]; y = p[1] + dp[1]; z = p[2] + dp[2]; D = x*x + y*y + z*z; D = sqrt(D); /* topocentric distance */ /* recompute ra and dec */ *ra = zatan2(x,y); *dec = asin(z/D); showcor((char*) "diurnal parallax", p, dp ); return(0); } double Starpos::refrac(double alt) //double alt; /* altitude in degrees */ { double y, y0, D0, N, D, P, Q; int i; if( (alt < -2.0) || (alt >= 90.0) ) return(0.0); /* For high altitude angle, AA page B61 * Accuracy "usually about 0.1' ". */ if( alt > 15.0 ) { D = 0.00452*atpress/((273.0+attemp)*tan( DTR*alt )); return(D); } /* Formula for low altitude is from the Almanac for Computers. * It gives the correction for observed altitude, so has * to be inverted numerically to get the observed from the true. * Accuracy about 0.2' for -20C < T < +40C and 970mb < P < 1050mb. */ /* Start iteration assuming correction = 0 */ y = alt; D = 0.0; /* Invert Almanac for Computers formula numerically */ P = (atpress - 80.0)/930.0; Q = 4.8e-3 * (attemp - 10.0); y0 = y; D0 = D; for( i=0; i<4; i++ ) { N = y + (7.31/(y+4.4)); N = 1.0/tan(DTR*N); D = N*P/(60.0 + Q * (N + 39.0)); N = y - y0; y0 = D - D0 - N; /* denominator of derivative */ if( (N != 0.0) && (y0 != 0.0) ) /* Newton iteration with numerically estimated derivative */ N = y - N*(alt + D - y)/y0; else /* Can't do it on first pass */ N = alt + D; y0 = y; D0 = D; y = N; } return( D ); } int Starpos::altaz(double pol[],double J ) { double dec, cosdec, sindec, lha, coslha, sinlha; double ra, dist, last, alt, az, coslat, sinlat; double N, D, x, y, z, TPI; ra = pol[0]; dec = pol[1]; dist = pol[2]; TPI = 2.0*PI; /* local apparent sidereal time, seconds converted to radians */ last = sidrlt( J, tlong ) * DTR/240.0; lha = last - ra; /* local hour angle, radians */ if( prtflg ) { //printf( "Local apparent sidereal time " ); hms( last ); //printf( "\n" ); } /* Display rate at which ra and dec are changing */ /* *if( prtflg ) * { * x = RTS/24.0; * N = x*dradt; * D = x*ddecdt; * if( N != 0.0 ) * printf( "dRA/dt %.2f\"/h, dDec/dt %.2f\"/h\n", N, D ); * } */ diurab( last, &ra, &dec ); /* Do rise, set, and transit times trnsit.c takes diurnal parallax into account, but not diurnal aberration. */ lha = last - ra; trnsit( J, lha, dec ); /* Diurnal parallax */ diurpx( last, &ra, &dec, dist ); /* Diurnal aberration */ /*diurab( last, &ra, &dec );*/ /* Convert ra and dec to altitude and azimuth */ cosdec = cos(dec); sindec = sin(dec); lha = last - ra; coslha = cos(lha); sinlha = sin(lha); /* Use the geodetic latitude for altitude and azimuth */ x = DTR * glat; coslat = cos(x); sinlat = sin(x); N = -cosdec * sinlha; D = sindec * coslat - cosdec * coslha * sinlat; az = RTD * zatan2( D, N ); alt = sindec * sinlat + cosdec * coslha * coslat; alt = RTD * asin(alt); /* Correction for atmospheric refraction * unit = degrees */ D = refrac( alt ); alt += D; /* Convert back to R.A. and Dec. */ y = sin(DTR*alt); x = cos(DTR*alt); z = cos(DTR*az); sinlha = -x * sin(DTR*az); coslha = y*coslat - x*z*sinlat; sindec = y*sinlat + x*z*coslat; lha = zatan2( coslha, sinlha ); y = ra; /* save previous values, before refrac() */ z = dec; dec = asin( sindec ); ra = last - lha; //dec = dec + 0.000029088;//aggiunti da me //ra = ra + 0.000203616;//aggiunti da me y = ra - y; /* change in ra */ while( y < -PI ) y += TPI; while( y > PI ) y -= TPI; y = RTS*y/15.0; z = RTS*(dec - z); if( prtflg ) { printf( "atmospheric refraction %.3f deg dRA %.3fs dDec %.2f\"\n", D, y, z ); printf( "Topocentric: Altitude %.3f deg, ", alt ); printf( "Azimuth %.3f deg\n", az ); printf( "Topocentric: R.A." ); hms( ra ); printf( " Dec." ); dms( dec ); printf( "\n" ); } return(0); } /* Iterative computation of rise, transit, and set times. */ int Starpos::iter_trnsit( int (* func)() ) { double JDsave, TDTsave, UTsave; double date, date_save, date_trnsit, t0, t1; double rise1, set1, trnsit1, loopctr, retry; double TPI; int prtsave; loopctr = 0; prtsave = prtflg; TPI = PI + PI; JDsave = JD; TDTsave = TDT; UTsave = UT; date = floor(UT - 0.5) + 0.5; retry = 0; date_save = date; t1 = date_save; /* Find transit time. */ do { date = date_save; t0 = t1; iter_func(t0, func); t1 = date + r_trnsit / TPI; if (++loopctr > 10) { printf ("? Transit time did not converge.\n"); goto no_trnsit; } /* Reject transit if it is more than half a day from entered date. */ if (retry == 0) { if ((UTsave - t1) > 0.5) { date_save += 1.0; t1 = t_trnsit + 1.0; retry = 1; /* goto do_retry; */ } if ((UTsave - t1) < -0.5) { date_save -= 1.0; t1 = t_trnsit - 1.0; retry = 1; /* goto do_retry; */ } } } while (fabs(t1 - t0) > .0001); t_trnsit = t1; trnsit1 = r_trnsit; set1 = r_set; if (f_trnsit == 0) goto prtrnsit; /* Set current date to be that of the transit just found. */ date_trnsit = date; t1 = date + r_rise / TPI; /* Choose rising no later than transit. */ if (t1 >= t_trnsit) { date -= 1.0; t1 = date + r_rise / TPI; } loopctr = 0; do { t0 = t1; iter_func(t0, func); /* Skip out if no event found. Don't report rise or set. */ if ((f_trnsit == 0) || (++loopctr > 10)) { if (loopctr > 10) { printf ("? Rise time did not converge.\n"); } f_trnsit = 0; goto prtrnsit; } t1 = date + r_rise / TPI; if (t1 > t_trnsit) { date -= 1; t1 = date + r_rise / TPI; } } while (fabs(t1 - t0) > .0001); rise1 = r_rise; t_rise = t1; /* Set current date to be that of the transit. */ date = date_trnsit; r_set = set1; /* Choose setting no earlier than transit. */ t1 = date + r_set / TPI; if (t1 <= t_trnsit) { date += 1.0; t1 = date + r_set / TPI; } loopctr = 0; do { t0 = t1; iter_func(t0, func); if ((f_trnsit == 0) || (++loopctr > 10)) { if (loopctr > 10) { printf ("? Set time did not converge.\n"); } f_trnsit = 0; goto prtrnsit; } t1 = date + r_set / TPI; if (t1 < t_trnsit) { date += 1.0; t1 = date + r_set / TPI; } } while (fabs(t1 - t0) > .0001); t_set = t1; r_trnsit = trnsit1; r_rise = rise1; prtrnsit: prtflg = 1; printf( "local meridian transit " ); UT = t_trnsit; jtocal (t_trnsit); if (f_trnsit != 0) { printf( "rises " ); UT = t_rise; jtocal (t_rise); printf( "sets " ); UT = t_set; jtocal (t_set); t0 = t_set - t_rise; if ((t0 > 0.0) && (t0 < 1.0)) printf("Visible hours %.4f\n", 24.0 * t0); if ((fabs(JDsave - t_rise) > 0.5) && (fabs(JDsave - t_trnsit) > 0.5) && (fabs(JDsave - t_set) > 0.5)) printf("? wrong event date.\n"); } no_trnsit: JD = JDsave; TDT = TDTsave; UT = UTsave; /* Reset to original input date entry. */ prtflg = 0; update(); prtflg = prtsave; return 0; } void Starpos:: mean_elements (double J) { double x, T, T2; /* Time variables. T is in Julian centuries. */ T = (J - 2451545.0) / 36525.0; T2 = T*T; /* Mean longitudes of planets (Simon et al, 1994) .047" subtracted from constant term for offset to DE403 origin. */ /* Mercury */ x = mods3600( 538101628.6889819 * T + 908103.213 ); x += (6.39e-6 * T - 0.0192789) * T2; Args[0] = STR * x; /* Venus */ x = mods3600( 210664136.4335482 * T + 655127.236 ); x += (-6.27e-6 * T + 0.0059381) * T2; Args[1] = STR * x; /* Earth */ x = mods3600( 129597742.283429 * T + 361679.198 ); x += (-5.23e-6 * T - 2.04411e-2 ) * T2; Ea_arcsec = x; Args[2] = STR * x; /* Mars */ x = mods3600( 68905077.493988 * T + 1279558.751 ); x += (-1.043e-5 * T + 0.0094264) * T2; Args[3] = STR * x; /* Jupiter */ x = mods3600( 10925660.377991 * T + 123665.420 ); x += ((((-3.4e-10 * T + 5.91e-8) * T + 4.667e-6) * T + 5.706e-5) * T - 3.060378e-1)*T2; Args[4] = STR * x; /* Saturn */ x = mods3600( 4399609.855372 * T + 180278.752 ); x += (((( 8.3e-10 * T - 1.452e-7) * T - 1.1484e-5) * T - 1.6618e-4) * T + 7.561614E-1)*T2; Args[5] = STR * x; /* Uranus */ x = mods3600( 1542481.193933 * T + 1130597.971 ) + (0.00002156*T - 0.0175083)*T2; Args[6] = STR * x; /* Neptune */ x = mods3600( 786550.320744 * T + 1095655.149 ) + (-0.00000895*T + 0.0021103)*T2; Args[7] = STR * x; /* Copied from cmoon.c, DE404 version. */ /* Mean elongation of moon = D */ x = mods3600( 1.6029616009939659e+09 * T + 1.0722612202445078e+06 ); x += (((((-3.207663637426e-013 * T + 2.555243317839e-011) * T + 2.560078201452e-009) * T - 3.702060118571e-005) * T + 6.9492746836058421e-03) * T /* D, t^3 */ - 6.7352202374457519e+00) * T2; /* D, t^2 */ Args[9] = STR * x; /* Mean distance of moon from its ascending node = F */ x = mods3600( 1.7395272628437717e+09 * T + 3.3577951412884740e+05 ); x += ((((( 4.474984866301e-013 * T + 4.189032191814e-011) * T - 2.790392351314e-009) * T - 2.165750777942e-006) * T - 7.5311878482337989e-04) * T /* F, t^3 */ - 1.3117809789650071e+01) * T2; /* F, t^2 */ NF_arcsec = x; Args[10] = STR * x; /* Mean anomaly of sun = l' (J. Laskar) */ x = mods3600(1.2959658102304320e+08 * T + 1.2871027407441526e+06); x += (((((((( 1.62e-20 * T - 1.0390e-17 ) * T - 3.83508e-15 ) * T + 4.237343e-13 ) * T + 8.8555011e-11 ) * T - 4.77258489e-8 ) * T - 1.1297037031e-5 ) * T + 8.7473717367324703e-05) * T - 5.5281306421783094e-01) * T2; Args[11] = STR * x; /* Mean anomaly of moon = l */ x = mods3600( 1.7179159228846793e+09 * T + 4.8586817465825332e+05 ); x += (((((-1.755312760154e-012 * T + 3.452144225877e-011) * T - 2.506365935364e-008) * T - 2.536291235258e-004) * T + 5.2099641302735818e-02) * T /* l, t^3 */ + 3.1501359071894147e+01) * T2; /* l, t^2 */ Args[12] = STR * x; /* Mean longitude of moon, re mean ecliptic and equinox of date = L */ x = mods3600( 1.7325643720442266e+09 * T + 7.8593980921052420e+05); x += ((((( 7.200592540556e-014 * T + 2.235210987108e-010) * T - 1.024222633731e-008) * T - 6.073960534117e-005) * T + 6.9017248528380490e-03) * T /* L, t^3 */ - 5.6550460027471399e+00) * T2; /* L, t^2 */ LP_equinox = x; Args[13] = STR * x; /* Precession of the equinox */ x = ((((((((( -8.66e-20*T - 4.759e-17)*T + 2.424e-15)*T + 1.3095e-12)*T + 1.7451e-10)*T - 1.8055e-8)*T - 0.0000235316)*T + 0.000076)*T + 1.105414)*T + 5028.791959)*T; /* Moon's longitude re fixed J2000 equinox. */ /* Args[13] -= x; */ pA_precession = STR * x; /* Free librations. */ /* longitudinal libration 2.891725 years */ x = mods3600( 4.48175409e7 * T + 8.060457e5 ); Args[14] = STR * x; /* libration P, 24.2 years */ x = mods3600( 5.36486787e6 * T - 391702.8 ); Args[15] = STR * x; #if 0 Args[16] = 0.0; #endif /* libration W, 74.7 years. */ x = mods3600( 1.73573e6 * T ); Args[17] = STR * x; } int Starpos::sscc (int k,double arg,int n) { double cu, su, cv, sv, s; int i; su = sin(arg); cu = cos(arg); ss[k][0] = su; /* sin(L) */ cc[k][0] = cu; /* cos(L) */ sv = 2.0 * su * cu; cv = cu * cu - su * su; ss[k][1] = sv; /* sin(2L) */ cc[k][1] = cv; for (i = 2; i < n; i++) { s = su * cv + cu * sv; cv = cu * cv - su * sv; sv = s; ss[k][i] = sv; /* sin( i+1 L ) */ cc[k][i] = cv; } return (0); } int Starpos::nutlo(double J) { double f, g, T, T2, T10; double MM, MS, FF, DD, OM; double cu, su, cv, sv, sw; double C, D; int i, j, k, k1, m; short *p; if( jdnut == J ) return(0); jdnut = J; /* Julian centuries from 2000 January 1.5, * barycentric dynamical time */ T = (J-2451545.0)/36525.0; T2 = T * T; T10 = T / 10.0; /* Fundamental arguments in the FK5 reference system. */ /* longitude of the mean ascending node of the lunar orbit * on the ecliptic, measured from the mean equinox of date */ OM = (mod3600 (-6962890.539 * T + 450160.280) + (0.008 * T + 7.455) * T2) * STR; /* mean longitude of the Sun minus the * mean longitude of the Sun's perigee */ MS = (mod3600 (129596581.224 * T + 1287099.804) - (0.012 * T + 0.577) * T2) * STR; /* mean longitude of the Moon minus the * mean longitude of the Moon's perigee */ MM = (mod3600 (1717915922.633 * T + 485866.733) + (0.064 * T + 31.310) * T2) * STR; /* mean longitude of the Moon minus the * mean longitude of the Moon's node */ FF = (mod3600 (1739527263.137 * T + 335778.877) + (0.011 * T - 13.257) * T2) * STR; /* mean elongation of the Moon from the Sun. */ DD = (mod3600 (1602961601.328 * T + 1072261.307) + (0.019 * T - 6.891) * T2) * STR; /* Calculate sin( i*MM ), etc. for needed multiple angles */ sscc( 0, MM, 3 ); sscc( 1, MS, 2 ); sscc( 2, FF, 4 ); sscc( 3, DD, 4 ); sscc( 4, OM, 2 ); C = 0.0; D = 0.0; p = &nt[0]; /* point to start of table */ for( i=0; i<105; i++ ) { /* argument of sine and cosine */ k1 = 0; cv = 0.0; sv = 0.0; for( m=0; m<5; m++ ) { j = *p++; if( j ) { k = j; if( j < 0 ) k = -k; su = ss[m][k-1]; /* sin(k*angle) */ if( j < 0 ) su = -su; cu = cc[m][k-1]; if( k1 == 0 ) { /* set first angle */ sv = su; cv = cu; k1 = 1; } else { /* combine angles */ sw = su*cv + cu*sv; cv = cu*cv - su*sv; sv = sw; } } } /* longitude coefficient */ f = *p++; if( (k = *p++) != 0 ) f += T10 * k; /* obliquity coefficient */ g = *p++; if( (k = *p++) != 0 ) g += T10 * k; /* accumulate the terms */ C += f * sv; D += g * cv; } /* first terms, not in table: */ C += (-1742.*T10 - 171996.)*ss[4][0]; /* sin(OM) */ D += ( 89.*T10 + 92025.)*cc[4][0]; /* cos(OM) */ /* printf( "nutation: in longitude %.3f\", in obliquity %.3f\"\n", C, D ); */ /* Save answers, expressed in radians */ nutl = 0.0001 * STR * C; nuto = 0.0001 * STR * D; return(0); } int Starpos::nutate(double J,double p[] ) { double ce, se, cl, sl, sino, f; double dp[3], p1[3]; int i; nutlo(J); /* be sure we calculated nutl and nuto */ epsiln(J); /* and also the obliquity of date */ f = eps + nuto; ce = cos( f ); se = sin( f ); sino = sin(nuto); cl = cos( nutl ); sl = sin( nutl ); /* Apply adjustment * to equatorial rectangular coordinates of object. * * This is a composite of three rotations: rotate about x axis * to ecliptic of date; rotate about new z axis by the nutation * in longitude; rotate about new x axis back to equator of date * plus nutation in obliquity. */ p1[0] = cl*p[0] - sl*coseps*p[1] - sl*sineps*p[2]; p1[1] = sl*ce*p[0] + ( cl*coseps*ce + sineps*se )*p[1] - ( sino + (1.0-cl)*sineps*ce )*p[2]; p1[2] = sl*se*p[0] + ( sino + (cl-1.0)*se*coseps )*p[1] + ( cl*sineps*se + coseps*ce )*p[2]; for( i=0; i<3; i++ ) dp[i] = p1[i] - p[i]; showcor((char*) "nutation", p, dp ); for( i=0; i<3; i++ ) p[i] = p1[i]; return(0); } int Starpos::g3plan (double J, plantbl *plan, double pobj[],int objnum) { int i, j, k, m, n, k1, ip, np, nt; #ifdef _MSC_VER char FAR *p; long FAR *pl; long FAR *pb; long FAR *pr; #else /* On some systems such as Silicon Graphics, char is unsigned by default. */ #ifdef vax /* VAX CC rejects "signed char." */ char *p; #else #ifdef __STDC__ char *p; #else char *p; #endif #endif long *pl, *pb, *pr; #endif double su, cu, sv, cv; double T, t, sl, sb, sr; mean_elements (J); #if 0 /* For librations, moon's longitude is sidereal. */ if (flag) Args[13] -= pA_precession; #endif T = (J - J2000) / plan->timescale; n = plan->maxargs; /* Calculate sin( i*MM ), etc. for needed multiple angles. */ for (i = 0; i < n; i++) { if ((j = plan->max_harmonic[i]) > 0) { sscc (i, Args[i], j); } } /* Point to start of table of arguments. */ p = plan->arg_tbl; /* Point to tabulated cosine and sine amplitudes. */ #ifdef _MSC_VER pl = (long *) plan->lon_tbl; pb = (long *) plan->lat_tbl; pr = (long *) plan->rad_tbl; #else pl = (long *) plan->lon_tbl; pb = (long *) plan->lat_tbl; pr = (long *) plan->rad_tbl; #endif sl = 0.0; sb = 0.0; sr = 0.0; for (;;) { /* argument of sine and cosine */ /* Number of periodic arguments. */ np = *p++; if (np < 0) break; if (np == 0) { /* It is a polynomial term. */ nt = *p++; /* "Longitude" polynomial (phi). */ cu = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; } /* sl += mods3600 (cu); */ sl += cu; /* "Latitude" polynomial (theta). */ cu = *pb++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pb++; } sb += cu; /* Radius polynomial (psi). */ cu = *pr++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pr++; } sr += cu; continue; } k1 = 0; cv = 0.0; sv = 0.0; for (ip = 0; ip < np; ip++) { /* What harmonic. */ j = *p++; /* Which planet. */ m = *p++ - 1; if (j) { /* k = abs (j); */ if (j < 0) k = -j; else k = j; k -= 1; su = ss[m][k]; /* sin(k*angle) */ if (j < 0) su = -su; cu = cc[m][k]; if (k1 == 0) { /* set first angle */ sv = su; cv = cu; k1 = 1; } else { /* combine angles */ t = su * cv + cu * sv; cv = cu * cv - su * sv; sv = t; } } } /* Highest power of T. */ nt = *p++; /* Longitude. */ cu = *pl++; su = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; su = su * T + *pl++; } sl += cu * cv + su * sv; /* Latitiude. */ cu = *pb++; su = *pb++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pb++; su = su * T + *pb++; } sb += cu * cv + su * sv; /* Radius. */ cu = *pr++; su = *pr++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pr++; su = su * T + *pr++; } sr += cu * cv + su * sv; } t = plan->trunclvl; pobj[0] = Args[objnum - 1] + STR * t * sl; pobj[1] = STR * t * sb; pobj[2] = plan->distance * (1.0 + STR * t * sr); return (0); } int Starpos:: gplan (double J, plantbl *plan,double pobj[]) { register double su, cu, sv, cv, T; double t, sl, sb, sr; int i, j, k, m, n, k1, ip, np, nt; #ifdef _MSC_VER char FAR *p; double FAR *pl; double FAR *pb; double FAR *pr; #else /* On some systems such as Silicon Graphics, char is unsigned by default. */ #ifdef vax /* VAX CC rejects "signed char." */ char *p; #else #ifdef __STDC__ char *p; #else char *p; #endif #endif double *pl, *pb, *pr; #endif T = (J - J2000) / plan->timescale; n = plan->maxargs; /* Calculate sin( i*MM ), etc. for needed multiple angles. */ for (i = 0; i < n; i++) { if ((j = plan->max_harmonic[i]) > 0) { sr = (mods3600 (freqs[i] * T) + phases[i]) * STR; sscc (i, sr, j); } } /* Point to start of table of arguments. */ p = plan->arg_tbl; /* Point to tabulated cosine and sine amplitudes. */ #ifdef _MSC_VER pl = (double FAR *) plan->lon_tbl; pb = (double FAR *) plan->lat_tbl; pr = (double FAR *) plan->rad_tbl; #else pl = (double *) plan->lon_tbl; pb = (double *) plan->lat_tbl; pr = (double *) plan->rad_tbl; #endif sl = 0.0; sb = 0.0; sr = 0.0; for (;;) { /* argument of sine and cosine */ /* Number of periodic arguments. */ np = *p++; if (np < 0) break; if (np == 0) { /* It is a polynomial term. */ nt = *p++; /* Longitude polynomial. */ cu = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; } sl += mods3600 (cu); /* Latitude polynomial. */ cu = *pb++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pb++; } sb += cu; /* Radius polynomial. */ cu = *pr++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pr++; } sr += cu; continue; } k1 = 0; cv = 0.0; sv = 0.0; for (ip = 0; ip < np; ip++) { /* What harmonic. */ j = *p++; /* Which planet. */ m = *p++ - 1; if (j) { k = j; if (j < 0) k = -k; k -= 1; su = ss[m][k]; /* sin(k*angle) */ if (j < 0) su = -su; cu = cc[m][k]; if (k1 == 0) { /* set first angle */ sv = su; cv = cu; k1 = 1; } else { /* combine angles */ t = su * cv + cu * sv; cv = cu * cv - su * sv; sv = t; } } } /* Highest power of T. */ nt = *p++; /* Longitude. */ cu = *pl++; su = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; su = su * T + *pl++; } sl += cu * cv + su * sv; /* Latitiude. */ cu = *pb++; su = *pb++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pb++; su = su * T + *pb++; } sb += cu * cv + su * sv; /* Radius. */ cu = *pr++; su = *pr++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pr++; su = su * T + *pr++; } sr += cu * cv + su * sv; } pobj[0] = STR * sl; pobj[1] = STR * sb; pobj[2] = STR * plan->distance * sr + plan->distance; return (0); } double Starpos::g1plan (double J, plantbl *plan) { int i, j, k, m, k1, ip, np, nt; #ifdef _MSC_VER char FAR *p; long FAR *pl; #else /* On some systems such as Silicon Graphics, char is unsigned by default. */ #ifdef vax /* VAX CC rejects "signed char." */ char *p; #else #ifdef __STDC__ char *p; #else char *p; #endif #endif long *pl; #endif double su, cu, sv, cv; double T, t, sl; T = (J - J2000) / plan->timescale; mean_elements (J); /* Calculate sin( i*MM ), etc. for needed multiple angles. */ for (i = 0; i < NARGS; i++) { if ((j = plan->max_harmonic[i]) > 0) { sscc (i, Args[i], j); } } /* Point to start of table of arguments. */ p = plan->arg_tbl; /* Point to tabulated cosine and sine amplitudes. */ #ifdef _MSC_VER pl = (long FAR *) plan->lon_tbl; #else pl = (long *) plan->lon_tbl; #endif sl = 0.0; for (;;) { /* argument of sine and cosine */ /* Number of periodic arguments. */ np = *p++; if (np < 0) break; if (np == 0) { /* It is a polynomial term. */ nt = *p++; cu = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; } /* sl += mods3600 (cu); */ sl += cu; continue; } k1 = 0; cv = 0.0; sv = 0.0; for (ip = 0; ip < np; ip++) { /* What harmonic. */ j = *p++; /* Which planet. */ m = *p++ - 1; if (j) { /* k = abs (j); */ if (j < 0) k = -j; else k = j; k -= 1; su = ss[m][k]; /* sin(k*angle) */ if (j < 0) su = -su; cu = cc[m][k]; if (k1 == 0) { /* set first angle */ sv = su; cv = cu; k1 = 1; } else { /* combine angles */ t = su * cv + cu * sv; cv = cu * cv - su * sv; sv = t; } } } /* Highest power of T. */ nt = *p++; /* Cosine and sine coefficients. */ cu = *pl++; su = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; su = su * T + *pl++; } sl += cu * cv + su * sv; } return (plan->trunclvl * sl); } int Starpos::g2plan (double J, plantbl *plan,double pobj[]) { int i, j, k, m, n, k1, ip, np, nt; #if _MSC_VER char FAR *p; long FAR *pl; long FAR *pr; #else /* On some systems such as Silicon Graphics, char is unsigned by default. */ #ifdef vax /* VAX CC rejects "signed char." */ char *p; #else #ifdef __STDC__ char *p; #else char *p; #endif #endif long *pl, *pr; #endif double su, cu, sv, cv; double T, t, sl, sr; mean_elements (J); #if 0 /* For librations, moon's longitude is sidereal. */ if (flag) Args[13] -= pA_precession; #endif T = (J - J2000) / plan->timescale; n = plan->maxargs; /* Calculate sin( i*MM ), etc. for needed multiple angles. */ for (i = 0; i < n; i++) { if ((j = plan->max_harmonic[i]) > 0) { sscc (i, Args[i], j); } } /* Point to start of table of arguments. */ p = plan->arg_tbl; /* Point to tabulated cosine and sine amplitudes. */ #ifdef _MSC_VER pl = (long FAR *) plan->lon_tbl; pr = (long FAR *) plan->rad_tbl; #else pl = (long *) plan->lon_tbl; pr = (long *) plan->rad_tbl; #endif sl = 0.0; sr = 0.0; for (;;) { /* argument of sine and cosine */ /* Number of periodic arguments. */ np = *p++; if (np < 0) break; if (np == 0) { /* It is a polynomial term. */ nt = *p++; /* Longitude polynomial. */ cu = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; } /* sl += mods3600 (cu); */ sl += cu; /* Radius polynomial. */ cu = *pr++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pr++; } sr += cu; continue; } k1 = 0; cv = 0.0; sv = 0.0; for (ip = 0; ip < np; ip++) { /* What harmonic. */ j = *p++; /* Which planet. */ m = *p++ - 1; if (j) { /* k = abs (j); */ if (j < 0) k = -j; else k = j; k -= 1; su = ss[m][k]; /* sin(k*angle) */ if (j < 0) su = -su; cu = cc[m][k]; if (k1 == 0) { /* set first angle */ sv = su; cv = cu; k1 = 1; } else { /* combine angles */ t = su * cv + cu * sv; cv = cu * cv - su * sv; sv = t; } } } /* Highest power of T. */ nt = *p++; /* Longitude. */ cu = *pl++; su = *pl++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pl++; su = su * T + *pl++; } sl += cu * cv + su * sv; /* Radius. */ cu = *pr++; su = *pr++; for (ip = 0; ip < nt; ip++) { cu = cu * T + *pr++; su = su * T + *pr++; } sr += cu * cv + su * sv; } t = plan->trunclvl; pobj[0] = t * sl; pobj[2] = t * sr; return (0); } int Starpos::gmoon (double J,double rect[],double pol[]) { double x, cosB, sinB, cosL, sinL; g2plan (J, &moonlr, pol); x = pol[0]; x += LP_equinox; if (x < -6.48e5) x += 1.296e6; if (x > 6.48e5) x -= 1.296e6; pol[0] = STR * x; x = g1plan (J, &moonlat); pol[1] = STR * x; x = (1.0 + STR * pol[2]) * moonlr.distance; pol[2] = x; /* Convert ecliptic polar to equatorial rectangular coordinates. */ epsiln(J); cosB = cos(pol[1]); sinB = sin(pol[1]); cosL = cos(pol[0]); sinL = sin(pol[0]); rect[0] = cosB * cosL * x; rect[1] = (coseps * cosB * sinL - sineps * sinB) * x; rect[2] = (sineps * cosB * sinL + coseps * sinB) * x; return 0; } int Starpos::embofs(double J,double ea[],double * pr ) { double pm[3], polm[3]; double a, b; int i; /* Compute the vector Moon - Earth. */ gmoon( J, pm, polm ); /* Precess the lunar position * to ecliptic and equinox of J2000.0 */ precess( pm, J, 1 ); /* Adjust the coordinates of the Earth */ a = 1.0 / (emrat + 1.0); b = 0.0; for( i=0; i<3; i++ ) { ea[i] = ea[i] - a * pm[i]; b = b + ea[i] * ea[i]; } /* Sun-Earth distance. */ *pr = sqrt(b); return(0); } /* Reduce x modulo 2 pi */ #define TPI (2.0*PI) double Starpos:: modtp(double x) { double y; y = floor( x/TPI ); y = x - y * TPI; while( y < 0.0 ) y += TPI; while( y >= TPI ) y -= TPI; return(y); } /* Reduce x modulo 360 degrees */ double Starpos:: mod360(double x) { long k; double y; k = (long) (x/360.0); y = x - k * 360.0; while( y < 0.0 ) y += 360.0; while( y > 360.0 ) y -= 360.0; return(y); } int Starpos::kepler(double J, struct orbit *e,double rect[],double polar[]) { double alat, E, M, W, temp; double epoch, inclination, ascnode, argperih; double meandistance, dailymotion, eccent, meananomaly; double r, coso, sino, cosa; /* Call program to compute position, if one is supplied. */ if( e->ptable ) { if( e == &earth ) g3plan (J, e->ptable, polar, 3); else gplan (J, e->ptable, polar); E = polar[0]; /* longitude */ e->L = E; W = polar[1]; /* latitude */ r = polar[2]; /* radius */ e->r = r; e->epoch = J; e->equinox = J2000; goto kepdon; } /* Decant the parameters from the data structure */ epoch = e->epoch; inclination = e->i; ascnode = e->W * DTR; argperih = e->w; meandistance = e->a; /* semimajor axis */ dailymotion = e->dm; eccent = e->ecc; meananomaly = e->M; /* Check for parabolic orbit. */ if( eccent == 1.0 ) { /* meandistance = perihelion distance, q * epoch = perihelion passage date */ temp = meandistance * sqrt(meandistance); W = (J - epoch ) * 0.0364911624 / temp; /* The constant above is 3 k / sqrt(2), * k = Gaussian gravitational constant = 0.01720209895 . */ E = 0.0; M = 1.0; while( fabs(M) > 1.0e-11 ) { temp = E * E; temp = (2.0 * E * temp + W)/( 3.0 * (1.0 + temp)); M = temp - E; if( temp != 0.0 ) M /= temp; E = temp; } r = meandistance * (1.0 + E * E ); M = atan( E ); M = 2.0 * M; alat = M + DTR*argperih; goto parabcon; } if( eccent > 1.0 ) { /* The equation of the hyperbola in polar coordinates r, theta * is r = a(e^2 - 1)/(1 + e cos(theta)) * so the perihelion distance q = a(e-1), * the "mean distance" a = q/(e-1). */ meandistance = meandistance/(eccent - 1.0); temp = meandistance * sqrt(meandistance); W = (J - epoch ) * 0.01720209895 / temp; /* solve M = -E + e sinh E */ E = W/(eccent - 1.0); M = 1.0; while( fabs(M) > 1.0e-11 ) { M = -E + eccent * sinh(E) - W; E += M/(1.0 - eccent * cosh(E)); } r = meandistance * (-1.0 + eccent * cosh(E)); temp = (eccent + 1.0)/(eccent - 1.0); M = sqrt(temp) * tanh( 0.5*E ); M = 2.0 * atan(M); alat = M + DTR*argperih; goto parabcon; } /* Calculate the daily motion, if it is not given. */ if( dailymotion == 0.0 ) { /* The constant is 180 k / pi, k = Gaussian gravitational constant. * Assumes object in heliocentric orbit is massless. */ dailymotion = 0.9856076686/(e->a*sqrt(e->a)); } dailymotion *= J - epoch; /* M is proportional to the area swept out by the radius * vector of a circular orbit during the time between * perihelion passage and Julian date J. * It is the mean anomaly at time J. */ M = DTR*( meananomaly + dailymotion ); M = modtp(M); /* If mean longitude was calculated, adjust it also * for motion since epoch of elements. */ if( e->L ) { e->L += dailymotion; e->L = mod360( e->L ); } /* By Kepler's second law, M must be equal to * the area swept out in the same time by an * elliptical orbit of same total area. * Integrate the ellipse expressed in polar coordinates * r = a(1-e^2)/(1 + e cosW) * with respect to the angle W to get an expression for the * area swept out by the radius vector. The area is given * by the mean anomaly; the angle is solved numerically. * * The answer is obtained in two steps. We first solve * Kepler's equation * M = E - eccent*sin(E) * for the eccentric anomaly E. Then there is a * closed form solution for W in terms of E. */ E = M; /* Initial guess is same as circular orbit. */ temp = 1.0; do { /* The approximate area swept out in the ellipse */ temp = E - eccent * sin(E) /* ...minus the area swept out in the circle */ - M; /* ...should be zero. Use the derivative of the error * to converge to solution by Newton's method. */ E -= temp/(1.0 - eccent*cos(E)); } while( fabs(temp) > 1.0e-11 ); /* The exact formula for the area in the ellipse is * 2.0*atan(c2*tan(0.5*W)) - c1*eccent*sin(W)/(1+e*cos(W)) * where * c1 = sqrt( 1.0 - eccent*eccent ) * c2 = sqrt( (1.0-eccent)/(1.0+eccent) ). * Substituting the following value of W * yields the exact solution. */ temp = sqrt( (1.0+eccent)/(1.0-eccent) ); W = 2.0 * atan( temp * tan(0.5*E) ); /* The true anomaly. */ W = modtp(W); meananomaly *= DTR; /* Orbital longitude measured from node * (argument of latitude) */ if( e->L ) alat = (e->L)*DTR + W - meananomaly - ascnode; else alat = W + DTR*argperih; /* mean longitude not given */ /* From the equation of the ellipse, get the * radius from central focus to the object. */ r = meandistance*(1.0-eccent*eccent)/(1.0+eccent*cos(W)); parabcon: /* The heliocentric ecliptic longitude of the object * is given by * tan( longitude - ascnode ) = cos( inclination ) * tan( alat ). */ coso = cos( alat ); sino = sin( alat ); inclination *= DTR; W = sino * cos( inclination ); E = zatan2( coso, W ) + ascnode; /* The ecliptic latitude of the object */ W = sino * sin( inclination ); W = asin(W); kepdon: /* Convert to rectangular coordinates, * using the perturbed latitude. */ rect[2] = r * sin(W); cosa = cos(W); rect[1] = r * cosa * sin(E); rect[0] = r * cosa * cos(E); /* Convert from heliocentric ecliptic rectangular * to heliocentric equatorial rectangular coordinates * by rotating eps radians about the x axis. */ epsiln( e->equinox ); W = coseps*rect[1] - sineps*rect[2]; M = sineps*rect[1] + coseps*rect[2]; rect[1] = W; rect[2] = M; /* Precess the position * to ecliptic and equinox of J2000.0 * if not already there. */ precess( rect, e->equinox, 1 ); /* If earth, adjust from earth-moon barycenter to earth * by AA page E2. */ if( e == &earth ) { embofs( J, rect, &r ); /* see below */ } /* Rotate back into the ecliptic. */ epsiln( J2000 ); W = coseps*rect[1] + sineps*rect[2]; M = -sineps*rect[1] + coseps*rect[2]; /* Convert to polar coordinates */ E = zatan2( rect[0], W ); W = asin( M/r ); /* Output the polar cooordinates */ polar[0] = E; /* longitude */ polar[1] = W; /* latitude */ polar[2] = r; /* radius */ return(0); } /*//////////caluculate velociti vector/////////*/ int Starpos::velearth(double J ) { double e[3], p[3], t; int i; #if DEBUG double x[3], A, q; #endif if( J == jvearth ) return(0); jvearth = J; /* calculate heliocentric position of the earth * as of a short time ago. */ t = 0.005; kepler( TDT-t, &earth, e, p ); for( i=0; i<3; i++ ) vearth[i] = (rearth[i] - e[i])/t; #if DEBUG /* Generate display for comparison with Almanac values. */ for( i=0; i<3; i++ ) { q = vearth[i]; A += q*q; x[i] = q; } A = sqrt(A); precess( x, TDT, 1 ); printf( "Vearth %.6e, X %.6f, Y %.6f, Z %.6f\n", A, x[0], x[1], x[2] ); #endif return(0); } /*//////////////////annual abberration///////////////////////*/ int Starpos:: annuab(double p[] ) //double p[]; /* unit vector pointing from earth to object */ { double A, B, C; double betai, pV; double x[3], V[3]; int i; /* Calculate the velocity of the earth (see vearth.c). */ velearth( TDT ); betai = 0.0; pV = 0.0; for( i=0; i<3; i++ ) { A = vearth[i]/Clightaud; V[i] = A; betai += A*A; pV += p[i] * A; } /* Make the adjustment for aberration. */ betai = sqrt( 1.0 - betai ); C = 1.0 + pV; A = betai/C; B = (1.0 + pV/(1.0 + betai))/C; for( i=0; i<3; i++ ) { C = A * p[i] + B * V[i]; x[i] = C; dp[i] = C - p[i]; } showcor((char*) "annual aberration", p, dp ); for( i=0; i<3; i++ ) p[i] = x[i]; return(0); } /* jd from gregorian calendar */ double Starpos::caltoj(long year,int month,double day ) { long y, a, b, c, e, m; double J; /* The origin should be chosen to be a century year * that is also a leap year. We pick 4801 B.C. */ y = year + 4800; if( year < 0 ) { y += 1; } /* The following magic arithmetic calculates a sequence * whose successive terms differ by the correct number of * days per calendar month. It starts at 122 = March; January * and February come after December. */ m = month; if( m <= 2 ) { m += 12; y -= 1; } e = (306 * (m+1))/10; a = y/100; /* number of centuries */ if( year <= 1582L ) { if( year == 1582L ) { if( month < 10 ) goto julius; if( month > 10) goto gregor; if( day >= 15 ) goto gregor; } julius: //printf( " Julian Calendar assumed.\n" ); b = -38; } else { /* -number of century years that are not leap years */ gregor: b = (a/4) - a; } c = (36525L * y)/100; /* Julian calendar years and leap years */ /* Add up these terms, plus offset from J 0 to 1 Jan 4801 B.C. * Also fudge for the 122 days from the month algorithm. */ J = b + c + e + day - 32167.5; return( J ); } /* * Convert change in rectangular coordinatates to change * in right ascension and declination. * For changes greater than about 0.1 degree, the * coordinates are converted directly to R.A. and Dec. * and the results subtracted. For small changes, * the change is calculated to first order by differentiating * tan(R.A.) = y/x * to obtain * dR.A./cos**2(R.A.) = dy/x - y dx/x**2 * where * cos**2(R.A.) = 1/(1 + (y/x)**2). * * The change in declination arcsin(z/R) is * d asin(u) = du/sqrt(1-u**2) * where u = z/R. * * p0 is the initial object - earth vector and * p1 is the vector after motion or aberration. * */ int Starpos::deltap(double p0[],double p1[],double* dr,double * dd ) { double dp[3], A, B, P, Q, x, y, z; int i; P = 0.0; Q = 0.0; z = 0.0; for( i=0; i<3; i++ ) { x = p0[i]; y = p1[i]; P += x * x; Q += y * y; y = y - x; dp[i] = y; z += y*y; } A = sqrt(P); B = sqrt(Q); if( (A < 1.e-7) || (B < 1.e-7) || (z/(P+Q)) > 5.e-7 ) { P = zatan2( p0[0], p0[1] ); Q = zatan2( p1[0], p1[1] ); Q = Q - P; while( Q < -PI ) Q += 2.0*PI; while( Q > PI ) Q -= 2.0*PI; *dr = Q; P = asin( p0[2]/A ); Q = asin( p1[2]/B ); *dd = Q - P; return(0); } x = p0[0]; y = p0[1]; if( x == 0.0 ) { *dr = 1.0e38; } else { Q = y/x; Q = (dp[1] - dp[0]*y/x)/(x * (1.0 + Q*Q)); *dr = Q; } x = p0[2]/A; P = sqrt( 1.0 - x*x ); *dd = (p1[2]/B - x)/P; return(0); } /* Display magnitude of correction vector * in arc seconds */ int Starpos::showcor(char* strng,double p[],double dp[] ) { double p1[3], dr, dd; int i; if( prtflg == 0 ) return(0); for( i=0; i<3; i++ ) p1[i] = p[i] + dp[i]; deltap( p, p1, &dr, &dd ); printf( "%s dRA %.3fs dDec %.2f\"\n", strng, RTS*dr/15.0, RTS*dd ); return(0); } int Starpos::relativity(double p[],double q[],double e[] ) /* unit vector from earth to object: double p[]; /* heliocentric ecliptic rectangular coordinates * of earth and object: double q[], e[];*/ { double C; int i; C = 1.974e-8/(SE*(1.0+qe)); for( i=0; i<3; i++ ) { dp[i] = C*(pq*e[i]/SE - ep*q[i]/SO); p[i] += dp[i]; } if( prtflg ) //printf( "elongation from sun %.2f degrees, ", acos( -ep )/DTR ); showcor((char*) "light defl.", p, dp ); return(0); } /* Radians to degrees, minutes, seconds */ int Starpos::dms(double x ) { double s; int d, m; s = x * RTD; if(fPlanet) { Dec = s; } if( s < 0.0 ) { printf( " -" ); s = -s; } else printf( " " ); d = (int) s; s -= d; s *= 60; m = (int) s; s -= m; s *= 60; printf( "%3dd %02d\' %05.2f\" ", d, m, s ); return(0); } /* Display Right Ascension and Declination * from input equatorial rectangular unit vector. * Output vector pol[] contains R.A., Dec., and radius. */ int Starpos:: showrd(char* msg,double p[],double pol[] ) { double x, y, r; int i; r = 0.0; for( i=0; i<3; i++ ) { x = p[i]; r += x * x; } r = sqrt(r); x = zatan2( p[0], p[1] ); pol[0] = x; y = asin( p[2]/r ); pol[1] = y; pol[2] = r; if(flag) { RA = x * RTOH * 15; RA = RA - 360; RA = fabs(RA); Dec = y * RTD; } if (prtflg != 0) { printf( "%s R.A. ", msg ); hms( x ); printf( "Dec. " ); dms( y ); printf( "\n" ); constellation = whatconstel (x, y); } return(0); } int Starpos::angles(double p[],double q[],double e[] ) { double a, b, s; int i; EO = 0.0; SE = 0.0; SO = 0.0; pq = 0.0; ep = 0.0; qe = 0.0; for( i=0; i<3; i++ ) { a = e[i]; b = q[i]; s = p[i]; EO += s * s; SE += a * a; SO += b * b; pq += s * b; ep += a * s; qe += b * a; } EO = sqrt(EO); /* Distance between Earth and object */ SO = sqrt(SO); /* Sun - object */ SE = sqrt(SE); /* Sun - earth */ /* Avoid fatality: if object equals sun, SO is zero. */ if( SO > 1.0e-12 ) { pq /= EO*SO; /* cosine of sun-object-earth */ qe /= SO*SE; /* cosine of earth-sun-object */ } ep /= SE*EO; /* -cosine of sun-earth-object */ return(0); } int Starpos::hms( double x ) { int h, m; long sint, sfrac; double s; s = x * RTOH; if(fPlanet == true) { RA = s * 15; RA = RA - 360; RA = fabs(RA); RA = fmod(RA,360); } if( s < 0.0 ) s += 24.0; h = (int) s; s -= h; s *= 60; m = (int) s; s -= m; s *= 60; /* Handle shillings and pence roundoff. */ sfrac = (long) (1000.0 * s + 0.5); if( sfrac >= 60000L ) { sfrac -= 60000L; m += 1; if( m >= 60 ) { m -= 60; h += 1; } } sint = sfrac / 1000; sfrac -= sint * 1000; printf( "%3dh %02dm %02ld.%03lds ", h, m, sint, sfrac ); return(0); } int Starpos::epsiln(double J) //double J; /* Julian date input */ { double T; if( J == jdeps ) return(0); T = (J - 2451545.0)/36525.0; #if WILLIAMS /* DE403 values. */ T /= 10.0; eps = ((((((((( 2.45e-10*T + 5.79e-9)*T + 2.787e-7)*T + 7.12e-7)*T - 3.905e-5)*T - 2.4967e-3)*T - 5.138e-3)*T + 1.9989)*T - 0.0175)*T - 468.33960)*T + 84381.406173; #else /* This expansion is from the AA. * Note the official 1976 IAU number is 23d 26' 21.448", but * the JPL numerical integration found 21.4119". */ #if SIMON T /= 10.0; eps = ((((((((( 2.45e-10*T + 5.79e-9)*T + 2.787e-7)*T + 7.12e-7)*T - 3.905e-5)*T - 2.4967e-3)*T - 5.138e-3)*T + 1.9989)*T - 0.0152)*T - 468.0927)*T + 84381.412; #else if( fabs(T) < 2.0 ) eps = ((1.813e-3*T - 5.9e-4)*T - 46.8150)*T + 84381.448; /* This expansion is from Laskar, cited above. * Bretagnon and Simon say, in Planetary Programs and Tables, that it * is accurate to 0.1" over a span of 6000 years. Laskar estimates the * precision to be 0.01" after 1000 years and a few seconds of arc * after 10000 years. */ else { eps = ((((((((( 2.45e-10*T + 5.79e-9)*T + 2.787e-7)*T + 7.12e-7)*T - 3.905e-5)*T - 2.4967e-3)*T - 5.138e-3)*T + 1.99925)*T - 0.0155)*T - 468.093)*T + 84381.448; } #endif /* not SIMON */ #endif /* not WILLIAMS */ eps *= STR; coseps = cos( eps ); sineps = sin( eps ); jdeps = J; return(0); } int Starpos:: jtocal(double J ) { int month, day; long year, a, c, d, x, y, jd; int BC; double dd; if( J < 1721425.5 ) /* January 1.0, 1 A.D. */ BC = 1; else BC = 0; jd = (long) (J + 0.5); /* round Julian date up to integer */ /* Find the number of Gregorian centuries * since March 1, 4801 B.C. */ a = (100*jd + 3204500L)/3652425L; /* Transform to Julian calendar by adding in Gregorian century years * that are not leap years. * Subtract 97 days to shift origin of JD to March 1. * Add 122 days for magic arithmetic algorithm. * Add four years to ensure the first leap year is detected. */ c = jd + 1486; if( jd >= 2299160.5 ) c += a - a/4; else c += 38; /* Offset 122 days, which is where the magic arithmetic * month formula sequence starts (March 1 = 4 * 30.6 = 122.4). */ d = (100*c - 12210L)/36525L; /* Days in that many whole Julian years */ x = (36525L * d)/100L; /* Find month and day. */ y = ((c-x)*100L)/3061L; day = (int) (c - x - ((306L*y)/10L)); month = (int) (y - 1); if( y > 13 ) month -= 12; /* Get the year right. */ year = d - 4715; if( month > 2 ) year -= 1; /* Day of the week. */ a = (jd + 1) % 7; /* Fractional part of day. */ dd = day + J - jd + 0.5; /* post the year. */ cyear = year; if( BC ) { year = -year + 1; cyear = -year; if( prtflg ) printf( "%ld B.C. ", year ); } else { if( prtflg ) printf( "%ld ", year ); } day = (int) dd; if( prtflg ) //printf( "%s %d %s", months[month-1], day, days[(int) a] ); /* Flag last or first day of year */ if( ((month == 1) && (day == 1)) || ((month == 12) && (day == 31)) ) yerend = 1; else yerend = 0; /* Display fraction of calendar day * as clock time. */ a = (long) dd; dd = dd - a; if( prtflg ) { hms( 2.0*PI*dd ); /* if( J == TDT ) //printf( "TDT\n" ); /* Indicate Terrestrial Dynamical Time else if( J == UT ) //printf( "UT\n" ); /* Universal Time else //printf( "\n" );*/ } return(0); } int Starpos::fk4fk5(double p[],double m[], struct star *el ) { double a, b, c; double *u, *v; double R[6]; int i, j; printf( "Converting to FK5 system\n" ); /* Note the direction vector and motion vector * are already supplied by rstar.c. */ a = 0.0; b = 0.0; for( i=0; i<3; i++ ) { m[i] *= RTS; /* motion must be in arc seconds per century */ a += A[i] * p[i]; b += Ad[i] * p[i]; } /* Remove E terms of aberration from FK4 */ for( i=0; i<3; i++ ) { R[i] = p[i] - A[i] + a * p[i]; R[i+3] = m[i] - Ad[i] + b * p[i]; } /* Perform matrix multiplication */ v = &Mat[0]; for( i=0; i<6; i++ ) { a = 0.0; u = &R[0]; for( j=0; j<6; j++ ) a += *u++ * *v++; if( i < 3 ) p[i] = a; else m[i-3] = a; } /* Transform the answers into J2000 catalogue entries * in radian measure. */ b = p[0]*p[0] + p[1]*p[1]; a = b + p[2]*p[2]; c = a; a = sqrt(a); el->ra = zatan2( p[0], p[1] ); el->dec = asin( p[2]/a ); /* Note motion converted back to radians per (Julian) century */ el->mura = (p[0]*m[1] - p[1]*m[0])/(RTS*b); el->mudec = (m[2]*b - p[2]*(p[0]*m[0] + p[1]*m[1]) )/(RTS*c*sqrt(b)); if( el->px > 0.0 ) { c = 0.0; for( i=0; i<3; i++ ) c += p[i] * m[i]; /* divide by RTS to deconvert m (and therefore c) * from arc seconds back to radians */ el->v = c/(21.094952663 * el->px * RTS * a); } el->px = el->px/a; /* a is dimensionless */ el->epoch = J2000; #if DEBUG /* Display the computed J2000 catalogue entries */ hms( el->ra ); dms( el->dec ); u = (double *)&el->px; for( i=0; i<3; i++ ) printf( " %.4f ", *u++ * RTS ); printf( "\n" ); #endif return(0); } /* Precession coefficients from Simon et al: */ /* Subroutine arguments: * * R = rectangular equatorial coordinate vector to be precessed. * The result is written back into the input vector. * J = Julian date * direction = * Precess from J to J2000: direction = 1 * Precess from J2000 to J: direction = -1 * Note that if you want to precess from J1 to J2, you would * first go from J1 to J2000, then call the program again * to go from J2000 to J2. */ int Starpos::precess(double R[],double J,int direction) { double A, B, T, pA, W, z; double x[3]; double *p; int i; #if IAU double sinth, costh, sinZ, cosZ, sinz, cosz, Z, TH; #endif if( J == J2000 ) return(0); /* Each precession angle is specified by a polynomial in * T = Julian centuries from J2000.0. See AA page B18. */ T = (J - J2000)/36525.0; #if IAU /* Use IAU formula only for a few centuries, if at all. */ if( FABS(T) > Two ) goto laskar; Z = (( 0.017998*T + 0.30188)*T + 2306.2181)*T*STR; z = (( 0.018203*T + 1.09468)*T + 2306.2181)*T*STR; TH = ((-0.041833*T - 0.42665)*T + 2004.3109)*T*STR; sinth = SIN(TH); costh = COS(TH); sinZ = SIN(Z); cosZ = COS(Z); sinz = SIN(z); cosz = COS(z); A = cosZ*costh; B = sinZ*costh; if( direction < 0 ) { /* From J2000.0 to J */ x[0] = (A*cosz - sinZ*sinz)*R[0] - (B*cosz + cosZ*sinz)*R[1] - sinth*cosz*R[2]; x[1] = (A*sinz + sinZ*cosz)*R[0] - (B*sinz - cosZ*cosz)*R[1] - sinth*sinz*R[2]; x[2] = cosZ*sinth*R[0] - sinZ*sinth*R[1] + costh*R[2]; } else { /* From J to J2000.0 */ x[0] = (A*cosz - sinZ*sinz)*R[0] + (A*sinz + sinZ*cosz)*R[1] + cosZ*sinth*R[2]; x[1] = -(B*cosz + cosZ*sinz)*R[0] - (B*sinz - cosZ*cosz)*R[1] - sinZ*sinth*R[2]; x[2] = -sinth*cosz*R[0] - sinth*sinz*R[1] + costh*R[2]; } goto done; laskar: #endif /* IAU */ /* Implementation by elementary rotations using Laskar's expansions. * First rotate about the x axis from the initial equator * to the ecliptic. (The input is equatorial.) */ if( direction == 1 ) epsiln( J ); /* To J2000 */ else epsiln( J2000 ); /* From J2000 */ x[0] = R[0]; z = coseps*R[1] + sineps*R[2]; x[2] = -sineps*R[1] + coseps*R[2]; x[1] = z; /* Precession in longitude */ T /= 10.0; /* thousands of years */ p = pAcof; pA = *p++; for( i=0; i<9; i++ ) pA = pA * T + *p++; pA *= STR * T; /* Node of the moving ecliptic on the J2000 ecliptic. */ p = nodecof; W = *p++; for( i=0; i<10; i++ ) W = W * T + *p++; /* Rotate about z axis to the node. */ if( direction == 1 ) z = W + pA; else z = W; B = COS(z); A = SIN(z); z = B * x[0] + A * x[1]; x[1] = -A * x[0] + B * x[1]; x[0] = z; /* Rotate about new x axis by the inclination of the moving * ecliptic on the J2000 ecliptic. */ p = inclcof; z = *p++; for( i=0; i<10; i++ ) z = z * T + *p++; if( direction == 1 ) z = -z; B = COS(z); A = SIN(z); z = B * x[1] + A * x[2]; x[2] = -A * x[1] + B * x[2]; x[1] = z; /* Rotate about new z axis back from the node. */ if( direction == 1 ) z = -W; else z = -W - pA; B = COS(z); A = SIN(z); z = B * x[0] + A * x[1]; x[1] = -A * x[0] + B * x[1]; x[0] = z; /* Rotate about x axis to final equator. */ if( direction == 1 ) epsiln( J2000 ); else epsiln( J ); z = coseps * x[1] - sineps * x[2]; x[2] = sineps * x[1] + coseps * x[2]; x[1] = z; #if IAU done: #endif for( i=0; i<3; i++ ) R[i] = x[i]; return(0); } double Starpos::deltat(double Y) { double ans, p, B; int d[6]; int i, iy, k; if( dtgiven != 0.0 ) return( dtgiven ); if( Y > TABEND ) { #if 0 /* Morrison, L. V. and F. R. Stephenson, "Sun and Planetary System" * vol 96,73 eds. W. Fricke, G. Teleki, Reidel, Dordrecht (1982) */ B = 0.01*(Y-1800.0) - 0.1; ans = -15.0 + 32.5*B*B; return(ans); #else /* Extrapolate forward by a second-degree curve that agrees with the most recent data in value and slope, and vaguely fits over the past century. This idea communicated by Paul Muller, who says NASA used to do something like it. */ B = Y - TABEND; /* slope */ p = dt[TABSIZ-1] - dt[TABSIZ-2]; /* square term */ ans = (dt[TABSIZ - 101] - (dt[TABSIZ - 1] - 100.0 * p)) * 1e-4; ans = 0.01 * (dt[TABSIZ-1] + p * B + ans * B * B); if( prtflg ) printf("[extrapolated deltaT] "); return(ans); #endif } if( Y < TABSTART ) { if( Y >= 948.0 ) { /* Stephenson and Morrison, stated domain is 948 to 1600: * 25.5(centuries from 1800)^2 - 1.9159(centuries from 1955)^2 */ B = 0.01*(Y - 2000.0); ans = (23.58 * B + 100.3)*B + 101.6; } else { /* Borkowski */ B = 0.01*(Y - 2000.0) + 3.75; ans = 35.0 * B * B + 40.; } return(ans); } /* Besselian interpolation from tabulated values. * See AA page K11. */ /* Index into the table. */ p = floor(Y); iy = (int) (p - TABSTART); /* Zeroth order estimate is value at start of year */ ans = dt[iy]; k = iy + 1; if( k >= TABSIZ ) goto done; /* No data, can't go on. */ /* The fraction of tabulation interval */ p = Y - p; /* First order interpolated value */ ans += p*(dt[k] - dt[iy]); if( (iy-1 < 0) || (iy+2 >= TABSIZ) ) goto done; /* can't do second differences */ /* Make table of first differences */ k = iy - 2; for( i=0; i<5; i++ ) { if( (k < 0) || (k+1 >= TABSIZ) ) { d[i] = 0; } else d[i] = dt[k+1] - dt[k]; k += 1; } /* Compute second differences */ for( i=0; i<4; i++ ) d[i] = d[i+1] - d[i]; B = 0.25*p*(p-1.0); ans += B*(d[1] + d[2]); #if DEMO printf( "B %.4lf, ans %.4lf\n", B, ans ); #endif if( iy+2 >= TABSIZ ) goto done; /* Compute third differences */ for( i=0; i<3; i++ ) d[i] = d[i+1] - d[i]; B = 2.0*B/3.0; ans += (p-0.5)*B*d[1]; #if DEMO printf( "B %.4lf, ans %.4lf\n", B*(p-0.5), ans ); #endif if( (iy-2 < 0) || (iy+3 > TABSIZ) ) goto done; /* Compute fourth differences */ for( i=0; i<2; i++ ) d[i] = d[i+1] - d[i]; B = 0.125*B*(p+1.0)*(p-2.0); ans += B*(d[0] + d[1]); #if DEMO printf( "B %.4lf, ans %.4lf\n", B, ans ); #endif done: /* Astronomical Almanac table is corrected by adding the expression * -0.000091 (ndot + 26)(year-1955)^2 seconds * to entries prior to 1955 (AA page K8), where ndot is the secular * tidal term in the mean motion of the Moon. * * Entries after 1955 are referred to atomic time standards and * are not affected by errors in Lunar or planetary theory. */ ans *= 0.01; if( Y < 1955.0 ) { B = (Y - 1955.0); #if 1 ans += -0.000091 * (-25.8 + 26.0) * B * B; #else ans += -0.000091 * (-23.8946 + 26.0) * B * B; #endif } return( ans ); } int Starpos::update() { double T; /* Convert Julian date to Julian years re J2000.0. */ T = 2000.0 + (JD - J2000)/365.25; switch( jdflag ) { case 0: TDT = JD; UT = JD; break; case 1: TDT = JD; UT = TDT - deltat(T)/86400.0; jtocal(UT); /* display the other date */ break; case 2: UT = JD; TDT = UT + deltat(T)/86400.0; jtocal(TDT); break; } jtocal(JD); return(0); } int Starpos::dostar() { rstar( (struct star *) elobject ); return 0; } int Starpos::mainStar(int Year, int month, int hour, int day, int min, int sec) { int i; kinit(); char * buff; //loop: objnum = 88; //prtflg = 1; //printf( "Enter starting date of tabulation\n" ); JD = caltoj(Year,month,day); /* date */ double t = (3600.0*hours + 60.0*minutes + seconds)/86400.0;; /* time of day */ JD += t; update(); /* find UT and ET */ if(objnum ==88) { elobject = (struct orbit *)&fstar; i = getstar( (struct star *) elobject ); } if( elobject == (struct orbit *)&fstar ) showcname( &elobject->obname[0] ); else if( elobject ) buff = &elobject->obname[0]; /* Always calculate heliocentric position of the earth */ kepler( TDT, &earth, rearth, eapolar ); if( objnum ==88) { dostar(); } } int Starpos::rstar(struct star *el ) { double p[3], q[3], e[3], m[3], temp[3], polar[3]; double T, vpi, epoch; double cosdec, sindec, cosra, sinra; int i; double log(); /* Convert from RA and Dec to equatorial rectangular direction */ loop: cosdec = cos( el->dec ); sindec = sin( el->dec ); cosra = cos( el->ra ); sinra = sin( el->ra ); q[0] = cosra * cosdec; q[1] = sinra * cosdec; q[2] = sindec; /* space motion */ vpi = 21.094952663 * el->v * el->px; m[0] = -el->mura * cosdec * sinra - el->mudec * sindec * cosra + vpi * q[0]; m[1] = el->mura * cosdec * cosra - el->mudec * sindec * sinra + vpi * q[1]; m[2] = el->mudec * cosdec + vpi * q[2]; epoch = el->epoch; /* Convert FK4 to FK5 catalogue */ if( epoch == B1950 ) { fk4fk5( q, m, el ); goto loop; } for( i=0; i<3; i++ ) e[i] = rearth[i]; /* precess the earth to the star epoch */ precess( e, epoch, -1 ); /* Correct for proper motion and parallax */ T = (TDT - epoch)/36525.0; for( i=0; i<3; i++ ) { p[i] = q[i] + T * m[i] - el->px * e[i]; } /* precess the star to J2000 */ precess( p, epoch, 1 ); /* reset the earth to J2000 */ for( i=0; i<3; i++ ) e[i] = rearth[i]; /* Find Euclidean vectors between earth, object, and the sun * angles( p, q, e ); */ angles( p, p, e );//changed q for p /* Find unit vector from earth in direction of object */ for( i=0; i<3; i++ ) { p[i] /= EO; temp[i] = p[i]; } if( prtflg ) { // printf( "approx. visual magnitude %.1f\n", el->mag ); /* Report astrometric position */ showrd((char*) "Astrometric J2000.0:", p, polar ); /* Also in 1950 coordinates */ precess( temp, B1950, -1 ); showrd((char*) "Astrometric B1950.0:", temp, polar ); /* For equinox of date: */ for( i=0; i<3; i++ ) temp[i] = p[i]; precess( temp, TDT, -1 ); showrd((char*) "Astrometric of date:", temp, polar ); } /* Correct position for light deflection * relativity( p, q, e ); */ relativity( p, p, e ); /* Correct for annual aberration */ annuab( p ); /* Precession of the equinox and ecliptic * from J2000.0 to ephemeris date */ precess( p, TDT, -1 ); /* Ajust for nutation * at current ecliptic. */ epsiln( TDT ); nutate( TDT, p ); /* Display the final apparent R.A. and Dec. * for equinox of date. */ flag = true; showrd((char*) " Apparent:", p, polar ); flag = false; /* Go do topocentric reductions. */ dradt = 0.0; ddecdt = 0.0; polar[2] = 1.0e38; /* make it ignore diurnal parallax */ altaz( polar, UT ); return(0); } int Starpos::kinit() { double a, b, fl, co, si, u; FILE *f;// *fopen(); char s[84]; //printf( "\n\tSteve Moshier's Ephemeris Program v5.6\n\n" ); //printf( "Planetary and lunar positions approximate DE404.\n" ); f = fopen( "aa.ini", "r" ); if( f ) { char* res =fgets( s, 80, f ); sscanf( s, "%lf", &tlong ); res =fgets( s, 80, f ); sscanf( s, "%lf", &glat ); res =fgets( s, 80, f ); sscanf( s, "%lf", &height ); u = glat * DTR; /* Reduction from geodetic latitude to geocentric latitude * AA page K5 */ co = cos(u); si = sin(u); fl = 1.0 - 1.0/flat; fl = fl*fl; si = si*si; u = 1.0/sqrt( co*co + fl*si ); a = aearth*u + height; b = aearth*fl*u + height; trho = sqrt( a*a*co*co + b*b*si ); tlat = RTD * acos( a*co/trho ); if( glat < 0.0 ) tlat = -tlat; trho /= aearth; /* Reduction from geodetic latitude to geocentric latitude/////////////////////////////////// * AA page K5 tlat = glat - 0.19242861 * sin(2.0*u) + 0.00032314 * sin(4.0*u) - 0.00000072 * sin(6.0*u); trho = 0.998327073 + 0.001676438 * cos(2.0*u) - 0.000003519 * cos(4.0*u) + 0.000000008 * cos(6.0*u); trho += height/6378160.;/////////////////////////////*/ //printf( "Terrestrial east longitude %.4f deg\n", tlong ); //printf( "geocentric latitude %.4f deg\n", tlat ); //printf( "Earth radius %.5f\n", trho ); res =fgets( s, 80, f ); sscanf( s, "%lf", &attemp ); //printf( "temperature %.1f C\n", attemp ); res =fgets( s, 80, f ); sscanf( s, "%lf", &atpress ); //printf( "pressure %.0f mb\n", atpress ); res =fgets( s, 80, f ); sscanf( s, "%d", &jdflag ); /* switch( jdflag ) { case 0: printf("TDT and UT assumed equal.\n"); break; case 1: printf("Input time is TDT.\n" ); break; case 2: printf("Input time is UT.\n" ); break; default: printf("Illegal jdflag\n" ); exit(0); }*/ res =fgets( s, 80, f ); sscanf( s, "%lf", &dtgiven ); if( dtgiven != 0.0 ) //printf( "Using deltaT = %.2fs.\n", dtgiven ); fclose(f); } Clightaud = 86400.0 * Clight / au; /* Radius of the earth in au Thanks to Min He for pointing out res this needs to be initialized early. */ Rearth = 0.001 * aearth / au; return(0); } /* Program to read in a file containing orbital parameters */ extern struct orbit earth; int Starpos::getorbit(struct orbit *el) { FILE *f; char s1[128], s2[128], *u, *v; int i; getnum((char *) "Name of orbit catalogue file: ", orbnam, strfmt ); f = fincat( orbnam, 2, s1, s2 ); if( f == 0 ) return(-1); /* failure flag */ //printf( "%s\n", s1 ); //printf( "%s\n", s2 ); /* Read in ASCII floating point numbers */ sscanf( s1, "%lf %lf %lf %lf %lf %lf", &el->epoch, &el->i, &el->W, &el->w, &el->a, &el->dm ); sscanf( s2, "%lf %lf %lf %lf %lf %15s", &el->ecc, &el->M, &el->equinox, &el->mag, &el->sdiam, &el->obname[0] ); el->obname[15] = '\0'; /* Clear out the rest of the data structure */ el->ptable = 0; el->L = 0.0; el->r = 0.0; el->plat = 0.0; if( strcmp( &el->obname[0], "Earth" ) ) { return(0); } else { u = (char *)&earth; v = (char *)el; for( i=0; i < (int) sizeof(struct orbit); i++ ) *u++ = *v++; printf( "Read in earth orbit\n" ); return(1); } } /* Open catalogue and find line number */ FILE *Starpos::fincat(char * name,int n,char * str1,char * str2 ) //int n; /* number of lines per catalogue entry */ { strcpy(name,pathname); int i; FILE *f;// *fopen(); char *res; f = fopen(name, "r" ); if( f == 0 ) { printf( "Can't find file %s\n", name ); return(0); /* failure flag */ } //getnum((char*) "Line number", &linenum, intfmt ); //linenum = 1; //prova di input if( linenum <= 0 ) goto failure; for( i=0; i 1 ) { res=fgets( str2, 126, f ); if( *str2 == '-' ) goto endf; } } fclose(f); return( f ); endf: printf( "End of file reached.\n" ); failure: fclose(f); return(0); } int Starpos:: getnum(char* msg,void* num,const char* format ) { char s[40]; printf( "%s (", msg ); if( format == strfmt ) printf( format, (char *) num ); else if( format == dblfmt ) printf( format, *(double *)num ); else if( format == intfmt ) printf( format, *(int *)num ); else if( format == lngfmt ) printf( format, *(long *)num ); else printf( "Illegal input format\n" ); printf( ") ? "); //char * res = gets(s); if( s[0] != '\0' ) sscanf( s, format, num ); return(0); } int Starpos:: getstar(struct star *el) { int sign; char s[128]; double rh, rm,rs, dd, dm, ds, x, z; FILE *f; char *p; char *str; char buffer[10]; int i; f = fincat( starnam, 1, s, (char *)0 ); if( f == 0 ) return(-1); /* failure flag */ /* Read in the ASCII string data and name of the object*/ str = strtok(s," "); el->epoch = atof(str); str = strtok(NULL," "); rh = atof(str); str = strtok(NULL," "); rm = atof(str); str = strtok(NULL," "); rs = atof(str); str = strtok(NULL," "); dd = atof(str); str = strtok(NULL," "); dm = atof(str); str = strtok(NULL," "); ds = atof(str); str = strtok(NULL," "); el->mura = atof(str); str = strtok(NULL," "); el->mudec = atof(str); str = strtok(NULL," "); el->v = atof(str); str = strtok(NULL," "); el->px = atof(str); str = strtok(NULL," "); el->mag = atof(str); str = strtok(NULL," "); strcpy(el->obname,str); constname =el->obname; /* sscanf(s,"%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %s",&el->epoch, &rh, &rm, &rs, &dd, &dm, &ds, &el->mura, &el->mudec, &el->v, &el->px, &el->mag, &el->obname[0] );*/ x = el->epoch; if( x == 2000.0 ) x = J2000; else if( x == 1950.0 ) x = B1950; else if( x == 1900.0 ) x = J1900; else x = J2000 + 365.25 * (x - 2000.0); el->epoch = x; /* read the right ascension */ el->ra = 2.0 * PI * (3600.0*rh + 60.0*rm + rs)/86400.0; /* read the declination */ sign = 1; if( (dd < 0.0) || (dm < 0.0) || (ds < 0.0) ) sign = -1; z = (3600.0*fabs(dd) + 60.0*fabs(dm) + fabs(ds))/RTS; if( dd == 0.0 ) { /* Scan the text for possible minus sign in front of declination 0 */ p = s; /* skip over 4 fields */ for( i=0; i<4; i++ ) { while( *p++ == ' ' ) ; while( *p++ != ' ' ) ; } while( *p++ == ' ' ) ; --p; if( *p == '-' ) sign = -1; } if( sign < 0 ) z = -z; el->dec = z; #if DEBUG /* printf( "%.2f\n", el->epoch ); printf( "%.0f %.0f %.3f\n", rh, rm, rs ); printf( "%.8f\n", el->ra ); printf( "%.0f %.0f %.3f\n", dd, dm, ds ); printf( "%.8f\n", el->dec ); printf( "d %.3f mua %.3f mud %.3f v %.3f\n", el->px, el->mura, el->mudec, el->v );*/ #endif el->mura *= 15.0/RTS; /* s/century -> "/century -> rad/century */ el->mudec /= RTS; z = el->px; if( z < 1.0 ) { if( z <= 0.0 ) el->px = 0.0; else el->px = STR * z; /* assume px in arc seconds */ } else { el->px = 1.0/(RTS * z); /* parsecs -> radians */ } return(0); } int Starpos::showcname( char *in ) { char *g, *p, *q; char ans[80]; int i; p = in; q = ans; skipwh(p); if( isnumber(p) ) { while( isnumber(p) ) *q++ = *p++; } skipwh(p); *q++ = ' '; if( islow(p) ) { for( i=0; i= 'a') && (*p <= 'z') ) return(1); else return(0); } int Starpos:: isnumber(char *p) { if( (*p >= '0') && (*p <= '9') ) return(1); else return(0); } int Starpos::skipwh(char *p) { while( ((*p == ' ') || (*p == '\t') || (*p == '_')) && (*p != '\0') && (*p != '\n') && (*p != '\r') ) ++p; return(0); } int Starpos:: isup(char *p) { if( (*p >= 'A') && (*p <= 'Z') ) return(1); else return(0); } double Starpos:: zgetdate() { double J; /* Get operator to type in a date. */ getnum((char*) "Calendar date: Year", &cyear, lngfmt ); if( (cyear > 53994L) || (cyear < -4713L) ) { printf( "Year out of range.\n" ); goto err; } if( cyear == 0 ) { printf( "There is no year 0.\n" ); err: J = 0.0; goto pdate; } //getnum( (char*)"Month (1-12)", &month, intfmt); //getnum( (char*)"Day.fraction", &day, dblfmt ); /* Find the Julian day. */ J = caltoj(cyear,month,day); /*printf( "Julian day %.1f\n", J );*/ pdate: /* Convert back to calendar date. */ /* jtocal( J ); */ return(J); } double Starpos:: gethms() { double t; getnum((char*) "Time: Hours", &hours, intfmt ); getnum( (char*)"Minutes", &minutes, intfmt ); getnum( (char*)"Seconds", &seconds, dblfmt ); t = (3600.0*hours + 60.0*minutes + seconds)/86400.0; return(t); } double Starpos::zatan2(double x,double y ) { double z, w; short code; code = 0; if( x < 0.0 ) code = 2; if( y < 0.0 ) code |= 1; if( x == 0.0 ) { if( code & 1 ) return( 1.5*PI ); if( y == 0.0 ) return( 0.0 ); return( 0.5*PI ); } if( y == 0.0 ) { if( code & 2 ) return( PI ); return( 0.0 ); } switch( code ) { default: case 0: w = 0.0; break; case 1: w = 2.0 * PI; break; case 2: case 3: w = PI; break; } z = atan( y/x ); return( w + z ); } int Starpos::mainPlanet(int Year,int month, int day, int hour, int minute, int second) { int i; kinit(); prtflg = 1; //printf( "Enter starting date of tabulation\n" ); JD = caltoj(Year,month,day); /* date */ double t = (3600.0*hour + 60.0*minute + second)/86400.0;; /* time of day */ JD += t; update(); /* find UT and ET */ //printf( "Julian day %.7f\n", JD ); /*getnum( "Enter interval between tabulations in days", &djd, dblfmt ); getnum( "Number of tabulations to display", &ntab, intfmt ); if( ntab <= 0 ) ntab = 1; loop1: getnum( "Planet number 0-9 or 88 to read star, 99 to read orbit", &objnum, intfmt );*/ ////////////////////da cambiare per selezionaere pianeta////////////////// switch(objnum) { case -1: exit(0); case 1: elobject = &venus; break; case 2: elobject = &mars; break; case 3: elobject = &jupiter; break; case 4: elobject = &saturn; break; } if( elobject == (struct orbit *)&fstar ) showcname( &elobject->obname[0] ); else if( elobject ) bodyname = &elobject->obname[0]; /* print Julian date */ update(); /* Always calculate heliocentric position of the earth */ kepler( TDT, &earth, rearth, eapolar ); switch( objnum ) { //case 0: dosun(); break; case 0: domoon(); break; default: doplanet(); break; } //printf( "\n" ); JD += djd; #ifdef _MSC_VER return 0; #endif } int Starpos::domoon() { int i, prtsav; double ra0, dec0; double x, y, z, lon0; double pp[3], qq[3], pe[3], re[3], moonpp[3], moonpol[3]; /* Geometric equatorial coordinates of the earth. */ for (i = 0; i < 3; i++) re[i] = rearth[i]; /* Run the orbit calculation twice, at two different times, * in order to find the rate of change of R.A. and Dec. */ /* Calculate for 0.001 day ago */ prtsav = prtflg; prtflg = 0; /* disable display */ moonll(TDT-0.001, moonpp, moonpol); ra0 = ra; dec0 = dec; lon0 = moonpol[0]; prtflg = prtsav; /* Calculate for present instant. */ moonll(TDT, moonpp, moonpol); if(prtflg) printf("Geometric lon %.3f deg, lat %.3f deg, rad %.4e au\n", RTD * obpolar[0], RTD * obpolar[1], obpolar[2]); prtflg = 0; /* The rates of change. These are used by altaz() to * correct the time of rising, transit, and setting. */ dradt = ra - ra0; if (dradt >= PI) dradt = dradt - 2.0 * PI; if (dradt <= -PI) dradt = dradt + 2.0 * PI; dradt = 1000.0 * dradt; ddecdt = 1000.0*(dec-dec0); /* Rate of change in longitude, degrees per day * used for phase of the moon */ lon0 = 1000.0*RTD*(moonpol[0] - lon0); /* Get apparent coordinates for the earth. */ z = re[0] * re[0] + re[1] * re[1] + re[2] * re[2]; z = sqrt(z); for (i = 0; i < 3; i++) re[i] /= z; annuab( re ); /* aberration of light. */ /* pe[0] -= STR * (20.496/(RTS*pe[2])); */ precess( re, TDT, -1 ); nutate( TDT, re ); for (i = 0; i < 3; i++) re[i] *= z; lonlat( re, TDT, pe, 0 ); prtflg = prtsav; /* reenable display */ /* Find sun-moon-earth angles */ for( i=0; i<3; i++ ) qq[i] = re[i] + moonpp[i]; angles( moonpp, qq, re ); /* Display answers */ if( prtflg ) { mlong = RTD * moonpol[0];//latitude mlat = RTD * moonpol[1];//longitude printf( "Distance %.3f Earth-radii\n", moonpol[2]/Rearth ); printf( "Horizontal parallax" ); x = Rearth/moonpol[2]; prlx = asin(x) * RTD;//parallax dms( asin(x) ) ; printf( "Semidiameter" ); x = 0.272453 * x + 0.0799/RTS; /* AA page L6 */ sdiam = x * RTD;//semidiameter dms( x ); x = RTD * acos(-ep); /* x = 180.0 - RTD * arcdot (re, pp); */ printf( "\nElongation from sun %.2f deg,", x ); x = 0.5 * (1.0 + pq); printf( " Illuminated fraction %.2f\n", x ); /* Find phase of the Moon by comparing Moon's longitude * with Earth's longitude. * * The number of days before or past indicated phase is * estimated by assuming the true longitudes change linearly * with time. These rates are estimated for the date, but * do not stay constant. The error can exceed 0.15 day in 4 days. */ x = moonpol[0] - pe[0]; x = modtp( x ) * RTD; /* difference in longitude */ i = (int) (x/90); /* number of quarters */ x = (x - i*90.0); /* phase angle mod 90 degrees */ /* days per degree of phase angle */ z = moonpol[2]/(12.3685 * 0.00257357); if( x > 45.0 ) { y = -(x - 90.0)*z; if( y > 1.0 ) printf( "Phase %.1f days before ", y ); else printf( "Phase %.2f days before ", y ); i = (i+1) & 3; } else { y = x*z; if( y > 1.0 ) printf( "Phase %.1f days past ", y ); else printf( "Phase %.2f days past ", y ); } switch(i) { case 0: printf( "Full Moon\n" ); break; case 1: printf( "Third Quarter\n" ); break; case 2: printf( "New Moon\n" ); break; case 3: printf( "First Quarter\n" ); break; } fPlanet =true; printf( " Apparent: R.A." ); hms(ra); printf( "Declination" ); dms(dec); printf( "\n" ); fPlanet = false; } /* if prtflg */ /* Compute and display topocentric position (altaz.c) */ pp[0] = ra; pp[1] = dec; pp[2] = moonpol[2]; altaz( pp, UT ); constellation = whatconstel(ra,dec);/////////////////////////////aggiunto da me//////////////////// return(0); } /* Calculate apparent latitude, longitude, and horizontal parallax * of the Moon at Julian date J. */ int Starpos::moonll(double J,double rect[],double pol[]) { double cosB, sinB, cosL, sinL, y, z; double qq[3], pp[3]; int i; /* Compute obliquity of the ecliptic, coseps, and sineps. */ epsiln( J ); /* Get geometric coordinates of the Moon. */ gmoon (J, rect, pol); /* Post the geometric ecliptic longitude and latitude, in radians, * and the radius in au. */ obpolar[0] = pol[0]; obpolar[1] = pol[1]; obpolar[2] = pol[2]; /* Light time correction to longitude, * about 0.7". */ pol[0] -= 0.0118 * DTR * Rearth / pol[2]; /* convert to equatorial system of date */ cosB = cos(pol[1]); sinB = sin(pol[1]); cosL = cos(pol[0]); sinL = sin(pol[0]); rect[0] = cosB*cosL; rect[1] = coseps*cosB*sinL - sineps*sinB; rect[2] = sineps*cosB*sinL + coseps*sinB; /* Rotate to J2000. */ precess( rect, TDT, 1 ); /* Find Euclidean vectors and angles between earth, object, and the sun */ for( i=0; i<3; i++ ) { pp[i] = rect[i] * pol[2]; qq[i] = rearth[i] + pp[i]; } angles( pp, qq, rearth ); /* Make rect a unit vector. */ /* for (i = 0; i < 3; i++) */ /* rect[i] /= EO; */ /* Correct position for light deflection. (Ignore.) */ /* relativity( rect, qq, rearth ); */ /* Aberration of light. The Astronomical Almanac (Section D, Daily Polynomial Coefficients) seems to omit this, even though the reference ephemeris is inertial. */ /* annuab (rect); */ /* Precess to date. */ precess( rect, TDT, -1 ); /* Correct for nutation at date TDT. */ nutate( TDT, rect ); /* Apparent geocentric right ascension and declination. */ ra = zatan2(rect[0],rect[1]); dec = asin(rect[2]); /* For apparent ecliptic coordinates, rotate from the true equator into the ecliptic of date. */ cosL = cos(eps+nuto); sinL = sin(eps+nuto); y = cosL * rect[1] + sinL * rect[2]; z = -sinL * rect[1] + cosL * rect[2]; pol[0] = zatan2( rect[0], y ); pol[1] = asin(z); /* Restore earth-moon distance. */ for( i=0; i<3; i++ ) rect[i] *= EO; return(0); } int Starpos::doplanet() { /* calculate heliocentric position of the object */ kepler( TDT, elobject, robject, obpolar ); /* apply correction factors and print apparent place */ reduce( elobject, robject, rearth ); return 0; } int Starpos::reduce( struct orbit *elemnt,double q[],double e[] ) //struct orbit *elemnt; /* orbital elements of q */ //double q[], e[]; /* heliocentric coordinates */ { double p[3], temp[3], polar[3]; double a, b, s; int i; //double sqrt(), asin(), log(); /* Save the geometric coordinates at TDT */ for( i=0; i<3; i++ ) temp[i] = q[i]; /* Display ecliptic longitude and latitude, precessed to equinox of date. */ if( prtflg ) lonlat( q, TDT, polar, 1 ); /* Adjust for light time (planetary aberration) */ lightt( elemnt, q, e ); /* Find Euclidean vectors between earth, object, and the sun */ for( i=0; i<3; i++ ) p[i] = q[i] - e[i]; angles( p, q, e ); if( prtflg ) { a = 0.0; for( i=0; i<3; i++ ) { b = temp[i] - e[i]; a += b * b; } a = sqrt(a); //printf( "true geocentric distance %.7f au ", a ); planet_distance = a;/* was EO */ printf( "equatorial diameter %.2f\"\n", 2.0*elemnt->sdiam/EO ); /* Calculate visual magnitude. * "Visual" refers to the spectrum of visible light. * Phase = 0.5(1+pq) = geometric fraction of disc illuminated. * where pq = cos( sun-object-earth angle ) * The magnitude is * V(1,0) + 2.5 log10( SE^2 SO^2 / Phase) * where V(1,0) = elemnt->mag is the magnitude at 1au from * both earth and sun and 100% illumination. */ a = 0.5 * (1.0 + pq); /* Fudge the phase for light leakage in magnitude estimation. * Note this phase term estimate does not reflect reality well. * Calculated magnitudes of Mercury and Venus are inaccurate. */ b = 0.5 * (1.01 + 0.99*pq); s = elemnt->mag + 2.1715 * log( EO*SO ) - 1.085*log(b); printf( "approx. visual magnitude %.1f, phase %.3f\n", s, a ); } /* Find unit vector from earth in direction of object */ for( i=0; i<3; i++ ) { p[i] /= EO; temp[i] = p[i]; } if( prtflg ) { /* Report astrometric position */ showrd((char *) "Astrometric J2000.0:", p, polar ); /* Also in 1950 coordinates */ precess( temp, B1950, -1 ); showrd((char *) "Astrometric B1950.0:", temp, polar ); } /* Correct position for light deflection */ relativity( p, q, e ); /* Correct for annual aberration */ annuab( p ); /* Precession of the equinox and ecliptic * from J2000.0 to ephemeris date */ precess( p, TDT, -1 ); /* Ajust for nutation * at current ecliptic. */ epsiln( TDT ); nutate( TDT, p ); /* Display the final apparent R.A. and Dec. * for equinox of date. */ /* if( prtflg) { constellation = whatconstel (ra, dec); }*/ fPlanet = true; showrd((char *) " Apparent:", p, polar ); fPlanet = false; /* Geocentric ecliptic longitude and latitude. */ if( prtflg ) { printf ("Apparent geocentric "); for( i=0; i<3; i++ ) p[i] *= EO; lonlat( p, TDT, temp, 0 ); } /* Go do topocentric reductions. */ polar[2] = EO; altaz( polar, UT ); return(0); } int Starpos::lonlat(double pp[],double J,double polar[],int ofdate ) //int ofdate; /* 1 means precess from J2000 to date J. */ { double s[3], x, y, z, yy, zz, r; int i; /* Make local copy of position vector * and calculate radius. */ r = 0.0; for( i=0; i<3; i++ ) { x = pp[i]; s[i] = x; r += x * x; } r = sqrt(r); /* Precess to equinox of date J */ if( ofdate ) precess( s, J, -1 ); /* Convert from equatorial to ecliptic coordinates */ epsiln(J); yy = s[1]; zz = s[2]; x = s[0]; y = coseps * yy + sineps * zz; z = -sineps * yy + coseps * zz; yy = zatan2( x, y ); zz = asin( z/r ); polar[0] = yy; polar[1] = zz; polar[2] = r; if( prtflg == 0 ) return(0); printf( "ecliptic long" ); dms( yy ); plong = yy * RTD;//////////////////longitude printf( " lat" ); dms( zz ); plat = zz *RTD; //////////////latitude printf( " rad %.6E\n", r ); return(0); } /* Correction for light time from object to earth * including gravitational retardation due to the Sun. * AA page B36. */ int Starpos::lightt( struct orbit *elemnt,double q[],double e[] ) //double e[], q[]; /* rectangular position vectors */ //struct orbit *elemnt; /* orbital elements of object q */ { double p[3], p0[3], ptemp[3]; double P, Q, E, t, x, y; int i, k; /* save initial q-e vector for display */ for( i=0; i<3; i++ ) { p0[i] = q[i] - e[i]; } E = 0.0; for( i=0; i<3; i++ ) E += e[i]*e[i]; E = sqrt(E); for( k=0; k<2; k++ ) { P = 0.0; Q = 0.0; for( i=0; i<3; i++ ) { y = q[i]; x = y - e[i]; p[i] = x; Q += y * y; P += x * x; } P = sqrt(P); Q = sqrt(Q); /* Note the following blows up if object equals sun. */ t = (P + 1.97e-8 * log( (E+P+Q)/(E-P+Q) ) )/173.1446327; kepler( TDT-t, elemnt, q, ptemp ); } if( prtflg ) printf( "light time %.4fm, ", 1440.0*t ); /* Final object-earth vector and the amount by which it changed. */ for( i=0; i<3; i++ ) { x = q[i] - e[i]; p[i] = x; dp[i] = x - p0[i]; } showcor((char *) "aberration", p0, dp ); /* Calculate dRA/dt and dDec/dt. * The desired correction of apparent coordinates is relative * to the equinox of date, but the coordinates here are * for J2000. This introduces a slight error. * * Estimate object-earth vector t days ago. We have * p(?) = q(J-t) - e(J), and must adjust to * p(J-t) = q(J-t) - e(J-t) = q(J-t) - (e(J) - Vearth * t) * = p(?) + Vearth * t. */ velearth(TDT); for( i=0; i<3; i++ ) p[i] += vearth[i]*t; deltap( p, p0, &dradt, &ddecdt ); /* see dms.c */ dradt /= t; ddecdt /= t; return(0); } const char * Starpos::whatconstel(double ra, double dec)// (double pp[],double epoch) { int i, k; /* double ra, dec, d; /* double p[3]; for (i = 0; i < 3; i++) p[i] = pp[i]; /* Precess from given epoch to J2000. */ /* precess (p, epoch, 1); /* Precess from J2000 to Besselian epoch 1875.0. */ /* precess (p, 2405889.25855, -1); /* d = p[0] * p[0] + p[1] * p[1] + p[2] * p[2]; d = sqrt (d); ra = zatan2 (p[1], p[0]) * (RTD * 3600. / 15.); if (ra < 0.0) ra += 86400.0; dec = asin (p[2] / d) * (RTD * 3600.);*/ ra = ra * RTD * 3600. / 15.; if (ra < 0.0) ra += 86400.0; dec = dec * RTD * 3600.; /* FIND CONSTELLATION SUCH THAT THE DECLINATION ENTERED IS HIGHER THAN THE LOWER BOUNDARY OF THE CONSTELLATION WHEN THE UPPER AND LOWER RIGHT ASCENSIONS FOR THE CONSTELLATION BOUND THE ENTERED RIGHT ASCENSION */ for (i = 0; i < NBNDRIES; i++) { k = i << 2; if (ra >= bndries[k] && ra < bndries[k+1] && dec > bndries[k+2]) { k = bndries[k+3]; return (constel[k]); } } return ("?? constellation not found"); } Starpos::~Starpos() { } nautic-1.5/src/Makefile.am0000644000175000017500000000175711750005453015357 0ustar moellermoeller# what flags you want to pass to the C compiler & linker AM_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib CFLAGS = --pedantic -Wall -std=c99 -O2 -ansi AM_LDFLAGS = # this lists the binaries to produce, the (non-PHONY, binary) targets in # the previous manual Makefile bin_PROGRAMS = nautic nautic_SOURCES = main.cpp main.h aberration.cpp about.cpp delta_t.cpp fund_arg.cpp\ gui.cpp h_correction.cpp ge2000a_data.cpp Info_Dlg.cpp \ julian_date.cpp nutation.cpp orbital_elements.cpp plot_dialog.cpp Pos_dialog.cpp\ precession.cpp sofa.cpp spa.cpp starpos.cpp stars.cpp Sun.cpp un_known_star.cpp\ aberration.h about.h addings.h coordinate.h delta_t.h fund_args.h gui.h\ h_correction.h Info_Dlg.h julian_date.h kepler.h moon.h nutation.h\ orbital_elements.h plant.h plot_dialog.h Pos_dialog.h precession.h sofa.h\ sofam.h spa.h starpos.h stars.h sun.h un_known_star.h sext.ico star.cat\ stnam.cat pos.cat nautic-1.5/src/precession.cpp0000644000175000017500000000561611607071655016207 0ustar moellermoeller/* * iau2006_precession.c - Implementation of the IAU 2006 precession model * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * Reference : US Naval Observatory Circular 179 (2005) * */ #include #include "kepler.h" #include "precession.h" /* * Calculates the precession matrix using the IAU 2006 precession model in its * entirety. The resulting matrix may be used in the rotation of coordinates. * * tdb -- TDB to be used for calculations. TT may be used for all but the most * exacting applications. * toJ2000 -- If 0, the resulting matrix is for precessing from J2000 to another * epoch. Otherwise, the precession is from another epoch to J2000. * prec_matrix -- The precession matrix. */ void ge2006_precession_matrix(struct julian_date *tdb, int toJ2000, double prec_matrix[3][3]) { double t,psi,omega,chi,eps0,c1,c2,c3,c4,s1,s2,s3,s4; eps0 = 84381.406 * ACS_TO_RAD; t = JULIAN_CENTURIES(tdb->date1, tdb->date2); psi = ((5038.481507 + (-1.0790069 + (-0.00114045 + (0.000132851 - 0.0000000951*t) * t) * t) * t) * t) * ACS_TO_RAD; omega = eps0 + ((-0.025754 + (0.0512623 + (-0.00772503 + (-0.000000467 + 0.0000003337*t) * t) * t) * t) * t) * ACS_TO_RAD; chi = ((10.556403 + (-2.3814292 + (-0.00121197 + (0.000170663 - 0.0000000560*t) * t) * t) * t) * t) * ACS_TO_RAD; sincos(eps0, &s1, &c1); sincos(psi, &s2, &c2); s2 *= -1.0; sincos(omega, &s3, &c3); s3 *= -1.0; sincos(chi, &s4, &c4); prec_matrix[0][0] = (c4 * c2)-(s2 * s4 * c3); prec_matrix[0][1] = (c4 * s2 * c1)+(s4 * c3 * c2 * c1)-(s1 * s4 * s3); prec_matrix[0][2] = (c4 * s2 * s1)+(s4 * c3 * c2 * s1)+(c1 * s4 * s3); prec_matrix[1][0] = -(s4 * c2)-(s2 * c4 * c3); prec_matrix[1][1] = -(s4 * s2 * c1)+(c4 * c3 * c2 * c1)-(s1 * c4 * s3); prec_matrix[1][2] = -(s4 * s2 * s1)+(c4 * c3 * c2 * s1)+(c1 * c4 * s3); prec_matrix[2][0] = s2 * s3; prec_matrix[2][1] = -(s3 * c2 * c1)-(s1 * c3); prec_matrix[2][2] = -(s3 * c2 * s1)+(c3 * c1); /* Just transpose the matrix for precession to J2000 */ if (toJ2000) { swap(&prec_matrix[0][1], &prec_matrix[1][0]); swap(&prec_matrix[0][2], &prec_matrix[2][0]); swap(&prec_matrix[1][2], &prec_matrix[2][1]); } } nautic-1.5/src/h_correction.cpp0000644000175000017500000003475111551374360016512 0ustar moellermoeller/* h_correction.cpp implementation of correction of sights Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "h_correction.h" static double eye_ht[] = { 0.34, 0.43, 0.49, 0.58, 0.67, 0.76, 0.85, 0.98, 1.1, 1.22, 1.34, 1.49, 1.62, 1.72, 1.92, 2.1, 2.26, 2.44, 2.62, 2.8, 2.99, 3.2, 3.41, 3.63, 3.84, 4.05, 4.30, 4.54, 4.79, 5.03, 5.3, 5.58, 5.82, 6.13, 6.4, 6.71, 6.98, 7.28, 7.59, 7.92, 8.26, 8.56, 8.9, 9.27, 9.6, 9.97, 10.33, 10.7, 11.06, 11.46, 11.86, 12.22, 12.65, 13.05, 13.45, 13.72, 14.33, 14.63, 14.94, 15.54, 15.85, 16.46, 16.76, 17.37, 17.68, 18.29, 18.9, 19.2, 19.81, 20.42, 20.73, 21.34, 21.95, 22.56, 22.86, 23.47, 24.08, 24.69, 25.3, 25.91, 26.52, 26.82, 27.43, 28.04, 28.65, 29.26, 29.87, 30.78, 31.39, 32.0, 32.61, 33.22, 33.83, 34.44, 35.36, 35.97, 36.58, 37.19, 38.1, 38.71, 39.32, 40.23, 40.84, 41.45, 42.37, 42.89, 43.89, 44.5, 45.42, }; static double obs_ht[] = { 4.38333, 4.43333, 4.483333, 4.53333, 4.6, 4.65, 4.7, 4.76666, 4.81666, 4.88333, 4.93333, 5.0, 5.06666, 5.133333, 5.2, 5.26666, 5.33333, 5.4, 5.466666, 5.53333, 5.616666, 5.68333, 5.76666, 5.85, 5.916666, 6.0, 6.083333, 6.18333, 6.26666, 6.35, 6.45, 6.53333, 6.633333, 6.733333, 6.83333, 6.933333, 7.133333, 7.15, 7.266666, 7.383333, 7.5, 7.6166666, 7.733333, 7.866666, 8.0, 8.13333, 8.26666, 8.416666, 8.566666, 8.716666, 8.8666666, 9.033333, 9.2, 9.383333, 9.55, 9.733333, 9.933333, 10.13333, 10.33333, 10.55, 10.76666, 11.0, 11.23333, 11.483333, 11.75, 12.016666, 12.3, 12.583333, 12.9, 13.216666, 13.55, 13.9, 14.26666, 14.66666, 15.066666, 15.5, 15.95, 16.43333, 16.93333, 17.46666, 18.03333, 18.63333, 19.283333, 19.96666, 20.7, 21.46666, 22.31666, 23.21666, 24.183333, 25.233333, 26.36666, 27.6, 28.93333, 30.4, 32.0, 33.75, 35.66666, 37.8, 40.13333, 42.73333, 45.6, 48.783333, 52.3, 56.183333, 60.46666, 65.133333, 70.183333, 75.56666, 81.216666, 87.05, 90.0, }; static double prlx[] = { 54.0, 54.3, 54.6, 54.9, 55.2, 55.5, 55.8, 56.1, 56.4, 56.7, 57.0, 57.3, 57.6, 57.9, 58.2, 58.5, 58.8, 59.1, 59.4, 59.7, 60.0, 60.3, 60.6, 60.9, 61.2, 61.5, }; static double mean_alt[]= { 9,14,19,24,29,34,39,44,49,54,59,64,69,74,79,84,89, }; static double moon_alt[504]; static double moon_refrac[] = { 0.0, 0.0, 66.9, 67.2, 67.4, 67.6, 67.8, 68.0, 68.2, 68.4, 68.6, 68.7, 68.9, 69.0, 69.2, 69.4, 69.4, 69.5, 69.6, 69.8, 69.8, 70.0, 70.1, 70.2, 70.2, 70.3, 70.4, 70.5, 70.5, 70.6, 70.7, 70.8, 70.8, 70.9, 70.9, 70.9, 71.0, 71.1, 71.1, 71.1, 71.2, 71.3, 71.3, 71.3, 71.3, 71.3, 71.4, 71.4, 71.4, 71.4, 71.4, 71.4, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.5, 71.4, 71.4, 71.4, 71.4, 71.4, 71.4, 71.4, 71.4, 71.4, 71.4, 71.4, 71.3, 71.3, 71.3, 71.3, 71.2, 71.2, 71.2, 71.2, 71.2, 71.1, 71.1, 71.0, 71.0, 71.0, 71.0, 70.9, 70.9, 70.9, 70.8, 70.8, 70.8, 70.8, 70.7, 70.7, 70.6, 70.6, 70.6, 70.5, 70.4, 70.4, 70.4, 70.4, 70.3, 70.2, 70.2, 70.1, 70.1, 70.1, 70.0, 69.9, 69.9, 69.8, 69.8, 69.8, 69.7, 69.6, 69.6, 69.5, 69.4, 69.4, 69.4, 69.3, 69.2, 69.2, 69.1, 69.1, 69.0, 69.0, 68.9, 68.8, 68.7, 68.7, 68.7, 68.6, 68.5, 68.5, 68.4, 68.3, 68.2, 68.1, 68.1, 68.1, 68.0, 67.9, 67.8, 67.7, 67.7, 67.6, 67.5, 67.5, 67.4, 67.3, 67.3, 67.2, 67.1, 67.0, 66.9, 66.8, 66.8, 66.8, 66.7, 66.6, 66.5, 66.4, 66.3, 66.2, 66.1, 66.0, 65.9, 65.9, 65.9, 65.8, 65.7, 65.6, 65.5, 65.4, 65.3, 65.2, 65.1, 65.0, 64.9, 64.9, 64.8, 64.7, 64.6, 64.5, 64.4, 64.3, 64.2, 64.1, 64.0, 63.9, 63.8, 63.8, 63.7, 63.6, 63.5, 63.4, 63.3, 63.2, 63.1, 63.0, 62.9, 62.8, 62.7, 62.6, 62.5, 62.5, 62.4, 62.2, 62.1, 62.0, 61.9, 61.8, 61.7, 61.6, 61.5, 61.4, 61.3, 61.1, 61.0, 60.9, 60.8, 60.8, 60.7, 60.6, 60.5, 60.3, 60.2, 60.1, 60.0, 59.9, 59.8, 59.7, 59.5, 59.4, 59.3, 59.2, 59.1, 59.0, 58.9, 58.8, 58.7, 58.6, 58.5, 58.3, 58.2, 58.1, 58.0, 57.9, 57.7, 57.6, 57.5, 57.4, 57.2, 57.1, 57.0, 56.9, 56.7, 56.7, 56.6, 56.5, 56.3, 56.2, 56.1, 56.0, 55.8, 55.7, 55.6, 55.5, 55.3, 55.2, 55.1, 54.9, 54.8, 54.7, 54.6, 54.4, 54.3, 54.2, 54.1, 54.0, 53.9, 53.7, 53.6, 53.5, 53.3, 53.2, 53.1, 52.9, 52.8, 52.7, 52.5, 52.4, 52.3, 52.1, 52.0, 51.9, 51.7, 51.6, 51.4, 51.3, 51.2, 51.0, 51.0, 50.9, 50.7, 50.6, 50.4, 50.3, 50.2, 50.0, 49.9, 49.7, 49.6, 49.5, 49.3, 49.2, 49.0, 48.9, 48.8, 48.6, 48.5, 48.3, 48.2, 48.0, 47.9, 47.8, 47.6, 47.5, 47.4, 47.3, 47.1, 47.0, 46.8, 46.7, 46.6, 46.4, 46.3, 46.1, 46.0, 45.8, 45.7, 45.5, 45.4, 45.2, 45.1, 44.9, 44.8, 44.6, 44.5, 44.3, 44.2, 44.0, 43.9, 43.7, 43.6, 43.5, 43.4, 43.2, 43.1, 42.9, 42.8, 42.6, 42.5, 42.3, 42.2, 42.0, 41.9, 41.7, 41.6, 41.4, 41.3, 41.1, 41.0, 40.8, 40.6, 40.5, 40.3, 40.2, 40.0, 39.9, 39.7, 39.6, 39.4, 39.3, 39.1, 38.9, 38.8, 38.7, 38.6, 38.4, 38.3, 38.1, 37.9, 37.8, 37.6, 37.5, 37.3, 37.2, 37.0, 36.8, 36.7, 36.5, 36.4, 36.2, 36.0, 35.9, 35.7, 35.6, 35.4, 35.3, 35.1, 34.9, 34.8, 34.6, 34.5, 34.3, 34.1, 34.0, 33.9, 33.8, 33.6, 33.4, 33.3, 33.1, 32.9, 32.8, 32.6, 32.5, 32.3, 32.1, 32.0, 31.8, 31.7, 31.5, 31.3, 31.2, 31.0, 30.8, 30.7, 30.5, 30.4, 30.2, 30.0, 29.9, 29.7, 29.5, 29.4, 29.2, 29.0, 28.9, 28.7, 28.6, 28.5, 28.3, 28.2, 28.0, 27.8, 27.7, 27.5, 27.3, 27.2, 27.0, 26.8, 26.7, 26.5, 26.4, 26.2, 26.0, 25.9, 25.7, 25.5, 25.4, 25.2, 25.0, 24.9, 24.7, 24.5, 24.4, 24.2, 24.0, 23.9, 23.7, 23.5, 23.4, 23.2, 23.0, 22.9, 22.8, 22.7, 22.5, 22.3, 22.2, 22.0, 21.8, 21.7, 21.5, 21.3, 21.2, 21.0, 20.8, 20.7, 20.5, 20.3, 20.2 }; static double moon_prlx[][26]={ {31.7, 31.9, 31.9, 32.0, 32.0, 32.2, 32.3, 32.6, 32.8, 33.0, 33.2, 33.4, 33.7, 33.8, 34.1, 34.3, 34.6}, {32.1, 32.3, 32.3, 32.4, 32.4, 32.5, 32.7, 32.9, 33.1, 33.3, 33.4, 33.7, 33.9, 34.0, 34.2, 34.4, 34.7}, {32.5, 32.7, 32.7, 32.7, 32.8, 32.9, 33.0, 33.2, 33.4, 33.5, 33.7, 33.9, 34.0, 34.2, 34.4, 34.6, 34.8}, {32.9, 33.0, 33.1, 33.1, 33.1, 33.2, 33.3, 33.6, 33.7, 33.8, 34.0, 34.1, 34.2, 34.4, 34.5, 34.7, 34.9}, {33.3, 33.4, 33.5, 33.4, 33.5, 33.6, 33.7, 33.9, 34.0, 34.1, 34.2, 34.4, 34.4, 34.6, 34.7, 34.9, 35.0}, {33.7, 33.8, 33.9, 33.8, 33.9, 33.9, 34.1, 34.2, 34.3, 34.4, 34.5, 34.5, 34.6, 34.7, 34.9, 35.1, 35.2}, {34.0, 34.1, 34.2, 34.1, 34.2, 34.2, 34.4, 34.4, 34.5, 34.6, 34.7, 34.7, 34.8, 34.8, 34.9, 35.1, 35.2}, {34.4, 34.5, 34.5, 34.5, 34.5, 34.5, 34.7, 34.7, 34.8, 34.9, 34.9, 34.9, 35.0, 35.0, 35.1, 35.3, 35.4}, {34.8, 34.9, 34.9, 34.8, 34.9, 34.9, 35.0, 35.1, 35.1, 35.1, 35.2, 35.1, 35.2, 35.2, 35.3, 35.4, 35.5}, {35.2, 35.3, 35.3, 35.2, 35.2, 35.2, 35.4, 35.4, 35.4, 35.4, 35.4, 35.4, 35.4, 35.5, 35.5, 35.6, 35.6}, {35.6, 35.7, 35.7, 35.6, 35.6, 35.6, 35.7, 35.7, 35.7, 35-7, 35.6, 35.6, 35.6, 35.7, 35.7, 35.7, 35.7}, {35.9, 36.0, 36.0, 35.9, 35.9, 35.9, 36.0, 35.9, 35.9, 35.9, 35.8, 35.8, 35.7, 35.8, 35.8, 35.7, 35.7}, {36.3, 36.4, 36.4, 36.3, 36.2, 36.2, 36.3, 36.2, 36.2, 36.2, 36.0, 36.0, 35.9, 36.0, 35.9, 35.9, 35.8}, {36.7, 36.8, 36.8, 36.6, 36.6, 36.6, 36.6, 36.6, 36.5, 36.4, 36.3, 36.2, 36.1, 36.2, 36.1, 36.0, 35.9}, {37.1, 37.2, 37.1, 37.0, 37.0, 36.9, 36.9, 36.9, 36.8, 36.7, 36.5, 36.5, 36.4, 36.4, 36.3, 36.2, 36.1}, {37.5, 37.6, 37.5, 37.4, 37.3, 37.3, 37.3, 37.2, 37.1, 36.9, 36.8, 36.7, 36.6, 36.6, 36.4, 36.3, 36.2}, {37.9, 38.0, 37.9, 37.8, 37.7, 37.6, 37.6, 37.5, 37.4, 37.2, 37.1, 36.9, 36.8, 36.7, 36.6, 36.4, 36.3}, {38.2, 38.3, 38.2, 38.0, 38.0, 37.9, 37.9, 37.8, 37.6, 37.4, 37.3, 37.1, 37.0, 36.8, 36.7, 36.5, 36.3}, {38.6, 38.6, 38.6, 38.4, 38.3, 38.2, 38.2, 38.1, 37.9, 37.7, 37.5, 37.3, 37.2, 37.0, 36.8, 36.6, 36.4}, {39.0, 39.0, 39.0, 38.8, 38.7, 38.6, 38.5, 38.4, 38.2, 37.9, 37.8, 37.6, 37.4, 37.2, 37.0, 36.8, 36.5}, {39.4, 39.4, 39.4, 39.2, 39.1, 38.9, 38.9, 38.7, 38.5, 38.2, 38.0, 37.9, 37.6, 37.4, 37.1, 36.9, 36.6}, {39.8, 39.8, 39.7, 39.5, 39.4, 39.3, 39.2, 39.0, 38.8, 38.5, 38.3, 38.1, 37.8, 37.6, 37.3, 37.0, 36.7}, {40.1, 40.1, 40.0, 39.8, 39.7, 39.6, 39.5, 39.3, 39.0, 38.7, 38.5, 38.3, 38.0, 37.7, 37.4, 37.1, 36.8}, {40.5, 40.5, 40.4, 40.2, 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.3, 4.1, 3.8}, {6.9, 6.7, 6.6, 6.6, 6.5, 6.4, 6.1, 6.0, 5.8, 5.6, 5.4, 5.0, 4.8, 4.6, 4.3, 4.0, 3.7}, {7.2, 7.0, 6.9, 6.9, 6.8, 6.6, 6.4, 6.3, 6.0, 5.8, 5.5, 5.2, 4.9, 4.7, 4.3, 4.0, 3.7}, {7.4, 7.2, 7.1, 7.1, 7.0, 6.8, 6.5, 6.4, 6.1, 5.9, 5.6, 5.2, 4.9, 4.7, 4.3, 4.0, 3.7}, {7.6, 7.4, 7.3, 7.3, 7.1, 6.9, 6.6, 6.5, 6.2, 6.0, 5.6, 5.2, 5.0, 4.7, 4.3, 3.9, 3.6}, {7.8, 7.6, 7.5, 7.5, 7.3, 7.1, 7.0, 6.6, 6.3, 6.0, 5.7, 5.3, 5.0, 4.7, 4.3, 3.9, 3.5}, }; static double sun_lw_limb[] = { 0.0, 40.3, 40.2, 40.1, 40.0, 39.8, 39.8, 39.8, 39.8, 39.9, 40.1, 40.2, 40.3, }; static double sun_up_limb[] = { 0.0, 7.7, 7.8, 7.8, 8.0, 8.2, 8.2, 8.2, 8.2, 8.1, 7.9, 7.8, 7.7, }; HCorrection::HCorrection() { moon_altitude = 4.8333334; for(int a = 0; a<514; a++){ moon_alt[a] = moon_altitude; moon_altitude += 0.1666666; } } double HCorrection::CalcDip(double e) { int a; double dip; dip = 19.1; if(e > 45.42) goto label; for(a = 0;a < sizeof(eye_ht);a++ ) { dip = dip - 0.1; if(e <= eye_ht[a]) { goto label; } } label: return dip; } double HCorrection::CalcRefrac(double obs_h) { int a; double refract; refract = 28.9; if(obs_h > 90.0) goto label; for(a = 0;a < sizeof(obs_ht);a++ ) { refract = refract + 0.1; if(obs_h <= obs_ht[a]) { goto label; } } label: return refract; } double HCorrection::CalcSunRefrac(double obs_h) { int a; double refract; refract = 5.0; if(obs_h > 90.0) goto label; for(a = 0;a < sizeof(obs_ht);a++ ) { refract = refract + 0.1; if(obs_h <= obs_ht[a]) { goto label; } } label: return refract; } double HCorrection::moon_trd_coor(double px, double obs_h) { double prlx_corr; int x,y; for(int a =0; a 12) return -2; /* If February in a leap year, 1, otherwise 0. */ ly = ((im == 2) && !(iy%4) && (iy%100 || !(iy%400))); /* Validate day, taking into account leap years. */ if ( (id < 1) || (id > (mtab[im-1] + ly))) j = -3; /* Return result. */ my = (im - 14) / 12; iypmy = (long) (iy + my); *djm0 = 2400000.5; *djm = (double)((1461L * (iypmy + 4800L)) / 4L + (367L * (long) (im - 2 - 12 * my)) / 12L - (3L * ((iypmy + 4900L) / 100L)) / 4L + (long) id - 2432076L); /* Return status. */ return j; } double iauGst06a(double uta, double utb, double tta, double ttb) /* ** ** Called: ** iauPnm06a classical NPB matrix, IAU 2006/2000A ** iauGst06 Greenwich apparent ST, IAU 2006, given NPB matrix ** */ { double rnpb[3][3], gst; /* Classical nutation x precession x bias matrix, IAU 2000A. */ iauPnm06a(tta, ttb, rnpb); /* Greenwich apparent sidereal time. */ gst = iauGst06(uta, utb, tta, ttb, rnpb); return gst; } double iauGst06(double uta, double utb, double tta, double ttb, double rnpb[3][3]) /* ** Called: ** iauBpn2xy extract CIP X,Y coordinates from NPB matrix ** iauS06 the CIO locator s, given X,Y, IAU 2006 ** iauAnp normalize angle into range 0 to 2pi ** iauEra00 Earth rotation angle, IAU 2000 ** iauEors equation of the origins, given NPB matrix and s ** */ { double x, y, s, era, eors, gst; /* Extract CIP coordinates. */ iauBpn2xy(rnpb, &x, &y); /* The CIO locator, s. */ s = iauS06(tta, ttb, x, y); /* Greenwich apparent sidereal time. */ era = iauEra00(uta, utb); eors = iauEors(rnpb, s); gst = iauAnp(era - eors); return gst; } void iauPnm06a(double date1, double date2, double rnpb[3][3]) /* ** - - - - - - - - - - ** i a u P n m 0 6 a ** - - - - - - - - - - ** iauPfw06 bias-precession F-W angles, IAU 2006 ** iauNut06a nutation, IAU 2006/2000A ** iauFw2m F-W angles to r-matrix ** ** Reference: */ { double gamb, phib, psib, epsa, dp, de; /* Fukushima-Williams angles for frame bias and precession. */ iauPfw06(date1, date2, &gamb, &phib, &psib, &epsa); /* Nutation components. */ iauNut06a(date1, date2, &dp, &de); /* Equinox based nutation x precession x bias matrix. */ iauFw2m(gamb, phib, psib + dp, epsa + de, rnpb); return; } void iauBpn2xy(double rbpn[3][3], double *x, double *y) /* ** - - - - - - - - - - ** i a u B p n 2 x y ** - - - - - - - - - - ** ** Extract from the bias-precession-nutation matrix the X,Y coordinates ** of the Celestial Intermediate Pole. ** */ { /* Extract the X,Y coordinates. */ *x = rbpn[2][0]; *y = rbpn[2][1]; return; } double iauS06(double date1, double date2, double x, double y) /* ** - - - - - - - ** i a u S 0 6 ** - - - - - - - ** ** The CIO locator s, positioning the Celestial Intermediate Origin on ** the equator of the Celestial Intermediate Pole, given the CIP's X,Y ** coordinates. Compatible with IAU 2006/2000A precession-nutation. ** ** This function is part of the International Astronomical Union's ** SOFA (Standards Of Fundamental Astronomy) software collection. ** ** Status: canonical model. ** ** Given: ** date1,date2 double TT as a 2-part Julian Date (Note 1) ** x,y double CIP coordinates (Note 3) ** ** Returned (function value): ** double the CIO locator s in radians (Note 2) ** ** Notes: ** ** 1) The TT date date1+date2 is a Julian Date, apportioned in any ** convenient way between the two arguments. For example, ** JD(TT)=2450123.7 could be expressed in any of these ways, ** among others: ** ** date1 date2 ** ** 2450123.7 0.0 (JD method) ** 2451545.0 -1421.3 (J2000 method) ** 2400000.5 50123.2 (MJD method) ** 2450123.5 0.2 (date & time method) ** ** The JD method is the most natural and convenient to use in ** cases where the loss of several decimal digits of resolution ** is acceptable. The J2000 method is best matched to the way ** the argument is handled internally and will deliver the ** optimum resolution. The MJD method and the date & time methods ** are both good compromises between resolution and convenience. ** ** 2) The CIO locator s is the difference between the right ascensions ** of the same point in two systems: the two systems are the GCRS ** and the CIP,CIO, and the point is the ascending node of the ** CIP equator. The quantity s remains below 0.1 arcsecond ** throughout 1900-2100. ** ** 3) The series used to compute s is in fact for s+XY/2, where X and Y ** are the x and y components of the CIP unit vector; this series ** is more compact than a direct series for s would be. This ** function requires X,Y to be supplied by the caller, who is ** responsible for providing values that are consistent with the ** supplied date. ** ** 4) The model is consistent with the "P03" precession (Capitaine et ** al. 2003), adopted by IAU 2006 Resolution 1, 2006, and the ** IAU 2000A nutation (with P03 adjustments). ** ** Called: ** iauFal03 mean anomaly of the Moon ** iauFalp03 mean anomaly of the Sun ** iauFaf03 mean argument of the latitude of the Moon ** iauFad03 mean elongation of the Moon from the Sun ** iauFaom03 mean longitude of the Moon's ascending node ** iauFave03 mean longitude of Venus ** iauFae03 mean longitude of Earth ** iauFapa03 general accumulated precession in longitude ** ** References: ** ** Capitaine, N., Wallace, P.T. & Chapront, J., 2003, Astron. ** Astrophys. 432, 355 ** ** McCarthy, D.D., Petit, G. (eds.) 2004, IERS Conventions (2003), ** IERS Technical Note No. 32, BKG ** ** This revision: 2009 December 17 ** ** SOFA release 2010-12-01 ** ** Copyright (C) 2010 IAU SOFA Board. See notes at end. */ { /* Time since J2000.0, in Julian centuries */ double t; /* Miscellaneous */ int i, j; double a, w0, w1, w2, w3, w4, w5; /* Fundamental arguments */ double fa[8]; /* Returned value */ double s; /* --------------------- */ /* The series for s+XY/2 */ /* --------------------- */ typedef struct { int nfa[8]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */ double s, c; /* sine and cosine coefficients */ } TERM; /* Polynomial coefficients */ static const double sp[] = { /* 1-6 */ 94.00e-6, 3808.65e-6, -122.68e-6, -72574.11e-6, 27.98e-6, 15.62e-6 }; /* Terms of order t^0 */ static const TERM s0[] = { /* 1-10 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6 }, {{ 0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6 }, {{ 0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, 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, 0}, 0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 }, {{ 0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6 }, /* 31-33 */ {{ 0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6 } }; /* Terms of order t^1 */ static const TERM s1[] = { /* 1 - 3 */ {{ 0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6 }, {{ 0, 0, 0, 0, 1, 0, 0, 0}, 1.73e-6, -0.03e-6 }, {{ 0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6 } }; /* Terms of order t^2 */ static const TERM s2[] = { /* 1-10 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, 743.52e-6, -0.17e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6 }, {{ 0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6 }, {{ 1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6 }, {{ 0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6 }, {{ 0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6 }, /* 11-20 */ {{ 1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6 }, {{ 0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6 }, {{ 1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6 }, {{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6 }, {{ 1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6 }, {{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6 }, {{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6 }, {{ 2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 }, {{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6 }, /* 21-25 */ {{ 0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6 }, {{ 2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6 }, {{ 2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6 }, {{ 1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6 }, {{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6 } }; /* Terms of order t^3 */ static const TERM s3[] = { /* 1-4 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.42e-6 }, {{ 0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.46e-6 }, {{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.25e-6 }, {{ 0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.23e-6 } }; /* Terms of order t^4 */ static const TERM s4[] = { /* 1-1 */ {{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6 } }; /* Number of terms in the series */ static const int NS0 = (int) (sizeof s0 / sizeof (TERM)); static const int NS1 = (int) (sizeof s1 / sizeof (TERM)); static const int NS2 = (int) (sizeof s2 / sizeof (TERM)); static const int NS3 = (int) (sizeof s3 / sizeof (TERM)); static const int NS4 = (int) (sizeof s4 / sizeof (TERM)); /*--------------------------------------------------------------------*/ /* Interval between fundamental epoch J2000.0 and current date (JC). */ t = ((date1 - DJ00) + date2) / DJC; /* Fundamental Arguments (from IERS Conventions 2003) */ /* Mean anomaly of the Moon. */ fa[0] = iauFal03(t); /* Mean anomaly of the Sun. */ fa[1] = iauFalp03(t); /* Mean longitude of the Moon minus that of the ascending node. */ fa[2] = iauFaf03(t); /* Mean elongation of the Moon from the Sun. */ fa[3] = iauFad03(t); /* Mean longitude of the ascending node of the Moon. */ fa[4] = iauFaom03(t); /* Mean longitude of Venus. */ fa[5] = iauFave03(t); /* Mean longitude of Earth. */ fa[6] = iauFae03(t); /* General precession in longitude. */ fa[7] = iauFapa03(t); /* Evaluate s. */ w0 = sp[0]; w1 = sp[1]; w2 = sp[2]; w3 = sp[3]; w4 = sp[4]; w5 = sp[5]; for (i = NS0-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s0[i].nfa[j] * fa[j]; } w0 += s0[i].s * sin(a) + s0[i].c * cos(a); } for (i = NS1-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s1[i].nfa[j] * fa[j]; } w1 += s1[i].s * sin(a) + s1[i].c * cos(a); } for (i = NS2-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s2[i].nfa[j] * fa[j]; } w2 += s2[i].s * sin(a) + s2[i].c * cos(a); } for (i = NS3-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s3[i].nfa[j] * fa[j]; } w3 += s3[i].s * sin(a) + s3[i].c * cos(a); } for (i = NS4-1; i >= 0; i--) { a = 0.0; for (j = 0; j < 8; j++) { a += (double)s4[i].nfa[j] * fa[j]; } w4 += s4[i].s * sin(a) + s4[i].c * cos(a); } s = (w0 + (w1 + (w2 + (w3 + (w4 + w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0; return s; } double iauAnp(double a) /* ** - - - - - - - ** i a u A n p ** - - - - - - - ** ** Normalize angle into the range 0 <= a < 2pi. */ { double w; w = fmod(a, D2PI); if (w < 0) w += D2PI; return w; } double iauEra00(double dj1, double dj2) /* ** - - - - - - - - - ** i a u E r a 0 0 ** - - - - - - - - - ** ** Earth rotation angle (IAU 2000 model). ** Called: ** iauAnp normalize angle into range 0 to 2pi ** */ { double d1, d2, t, f, theta; /* Days since fundamental epoch. */ if (dj1 < dj2) { d1 = dj1; d2 = dj2; } else { d1 = dj2; d2 = dj1; } t = d1 + (d2- DJ00); /* Fractional part of T (days). */ f = fmod(d1, 1.0) + fmod(d2, 1.0); /* Earth rotation angle at this UT1. */ theta = iauAnp(D2PI * (f + 0.7790572732640 + 0.00273781191135448 * t)); return theta; } double iauEors(double rnpb[3][3], double s) /* ** - - - - - - - - ** i a u E o r s ** - - - - - - - - ** ** Equation of the origins, given the classical NPB matrix and the ** quantity s. */ { double x, ax, xs, ys, zs, p, q, eo; /* Evaluate Wallace & Capitaine (2006) expression (16). */ x = rnpb[2][0]; ax = x / (1.0 + rnpb[2][2]); xs = 1.0 - ax * x; ys = -ax * rnpb[2][1]; zs = -x; p = rnpb[0][0] * xs + rnpb[0][1] * ys + rnpb[0][2] * zs; q = rnpb[1][0] * xs + rnpb[1][1] * ys + rnpb[1][2] * zs; eo = ((p != 0) || (q != 0)) ? s - atan2(q, p) : s; return eo; } void iauPfw06(double date1, double date2, double *gamb, double *phib, double *psib, double *epsa) /* ** - - - - - - - - - ** i a u P f w 0 6 ** - - - - - - - - - ** ** Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation). ** Called: ** iauObl06 mean obliquity, IAU 2006 */ { double t; /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - DJ00) + date2) / DJC; /* P03 bias+precession angles. */ *gamb = ( -0.052928 + ( 10.556378 + ( 0.4932044 + ( -0.00031238 + ( -0.000002788 + ( 0.0000000260 ) * t) * t) * t) * t) * t) * DAS2R; *phib = ( 84381.412819 + ( -46.811016 + ( 0.0511268 + ( 0.00053289 + ( -0.000000440 + ( -0.0000000176 ) * t) * t) * t) * t) * t) * DAS2R; *psib = ( -0.041775 + ( 5038.481484 + ( 1.5584175 + ( -0.00018522 + ( -0.000026452 + ( -0.0000000148 ) * t) * t) * t) * t) * t) * DAS2R; *epsa = iauObl06(date1, date2); return; } void iauNut06a(double date1, double date2, double *dpsi, double *deps) /* ** - - - - - - - - - - ** i a u N u t 0 6 a ** - - - - - - - - - - ** ** IAU 2000A nutation with adjustments to match the IAU 2006 ** precession. ** Called: ** iauNut00a nutation, IAU 2000A ** ** References: */ { double t, fj2, dp, de; /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - DJ00) + date2) / DJC; /* Factor correcting for secular variation of J2. */ fj2 = -2.7774e-6 * t; /* Obtain IAU 2000A nutation. */ iauNut00a(date1, date2, &dp, &de); /* Apply P03 adjustments (Wallace & Capitaine, 2006, Eqs.5). */ *dpsi = dp + dp * (0.4697e-6 + fj2); *deps = de + de * fj2; return; } void iauFw2m(double gamb, double phib, double psi, double eps, double r[3][3]) /* ** - - - - - - - - ** i a u F w 2 m ** - - - - - - - - ** ** Form rotation matrix given the Fukushima-Williams angles. ** ** Called: ** iauIr initialize r-matrix to identity ** iauRz rotate around Z-axis ** iauRx rotate around X-axis */ { /* Construct the matrix. */ iauIr(r); iauRz(gamb, r); iauRx(phib, r); iauRz(-psi, r); iauRx(-eps, r); return; } double iauFal03(double t) /* ** - - - - - - - - - ** i a u F a l 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean anomaly of the Moon. */ { double a; /* Mean anomaly of the Moon (IERS Conventions 2003). */ a = fmod( 485868.249036 + t * ( 1717915923.2178 + t * ( 31.8792 + t * ( 0.051635 + t * ( - 0.00024470 ) ) ) ), TURNAS ) * DAS2R; return a; } double iauFalp03(double t) /* ** - - - - - - - - - - ** i a u F a l p 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean anomaly of the Sun. */ { double a; /* Mean anomaly of the Sun (IERS Conventions 2003). */ a = fmod( 1287104.793048 + t * ( 129596581.0481 + t * ( - 0.5532 + t * ( 0.000136 + t * ( - 0.00001149 ) ) ) ), TURNAS ) * DAS2R; return a; } double iauFaf03(double t) /* ** - - - - - - - - - ** i a u F a f 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of the Moon minus mean longitude of the ascending ** node. */ { double a; /* Mean longitude of the Moon minus that of the ascending node */ /* (IERS Conventions 2003). */ a = fmod( 335779.526232 + t * ( 1739527262.8478 + t * ( - 12.7512 + t * ( - 0.001037 + t * ( 0.00000417 ) ) ) ), TURNAS ) * DAS2R; return a; } double iauFad03(double t) /* ** - - - - - - - - - ** i a u F a d 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean elongation of the Moon from the Sun. */ { double a; /* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */ a = fmod( 1072260.703692 + t * ( 1602961601.2090 + t * ( - 6.3706 + t * ( 0.006593 + t * ( - 0.00003169 ) ) ) ), TURNAS ) * DAS2R; return a; } double iauFaom03(double t) /* ** - - - - - - - - - - ** i a u F a o m 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of the Moon's ascending node. */ { double a; /* Mean longitude of the Moon's ascending node */ /* (IERS Conventions 2003). */ a = fmod( 450160.398036 + t * ( - 6962890.5431 + t * ( 7.4722 + t * ( 0.007702 + t * ( - 0.00005939 ) ) ) ), TURNAS ) * DAS2R; return a; } double iauFave03(double t) /* ** - - - - - - - - - - ** i a u F a v e 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Venus. */ { double a; /* Mean longitude of Venus (IERS Conventions 2003). */ a = fmod(3.176146697 + 1021.3285546211 * t, D2PI); return a; } double iauFae03(double t) /* ** - - - - - - - - - ** i a u F a e 0 3 ** - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Earth. */ { double a; /* Mean longitude of Earth (IERS Conventions 2003). */ a = fmod(1.753470314 + 628.3075849991 * t, D2PI); return a; } double iauFapa03(double t) /* ** - - - - - - - - - - ** i a u F a p a 0 3 ** - - - - - - - - - - ** */ { double a; /* General accumulated precession in longitude. */ a = (0.024381750 + 0.00000538691 * t) * t; return a; } double iauObl06(double date1, double date2) /* ** - - - - - - - - - ** i a u O b l 0 6 ** - - - - - - - - - ** ** Mean obliquity of the ecliptic, IAU 2006 precession model. */ { double t, eps0; /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - DJ00) + date2) / DJC; /* Mean obliquity. */ eps0 = (84381.406 + (-46.836769 + ( -0.0001831 + ( 0.00200340 + ( -0.000000576 + ( -0.0000000434) * t) * t) * t) * t) * t) * DAS2R; return eps0; } void iauNut00a(double date1, double date2, double *dpsi, double *deps) /* ** - - - - - - - - - - ** i a u N u t 0 0 a ** - - - - - - - - - - ** ** Nutation, IAU 2000A model (MHB2000 luni-solar and planetary nutation ** with free core nutation omitted). ** ** ** Called: ** iauFal03 mean anomaly of the Moon ** iauFaf03 mean argument of the latitude of the Moon ** iauFaom03 mean longitude of the Moon's ascending node ** iauFame03 mean longitude of Mercury ** iauFave03 mean longitude of Venus ** iauFae03 mean longitude of Earth ** iauFama03 mean longitude of Mars ** iauFaju03 mean longitude of Jupiter ** iauFasa03 mean longitude of Saturn ** iauFaur03 mean longitude of Uranus ** iauFapa03 general accumulated precession in longitude */ { int i; double t, el, elp, f, d, om, arg, dp, de, sarg, carg, al, af, ad, aom, alme, alve, alea, alma, alju, alsa, alur, alne, apa, dpsils, depsls, dpsipl, depspl; /* Units of 0.1 microarcsecond to radians */ const double U2R = DAS2R / 1e7; /* ------------------------- */ /* Luni-Solar nutation model */ /* ------------------------- */ /* The units for the sine and cosine coefficients are */ /* 0.1 microarcsecond and the same per Julian century */ static const struct { int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */ double sp,spt,cp; /* longitude sin, t*sin, cos coefficients */ double ce,cet,se; /* obliquity cos, t*cos, sin coefficients */ } xls[] = { /* 1- 10 */ { 0, 0, 0, 0, 1, -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0}, { 0, 0, 2,-2, 2, -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0}, { 0, 0, 2, 0, 2,-2276413.0,-234.0,2796.0,978459.0,-485.0, 1374.0}, { 0, 0, 0, 0, 2,2074554.0, 207.0, -698.0,-897492.0,470.0, -291.0}, { 0, 1, 0, 0, 0,1475877.0,-3633.0,11817.0,73871.0,-184.0,-1924.0}, { 0, 1, 2,-2, 2,-516821.0,1226.0, -524.0,224386.0,-677.0, -174.0}, { 1, 0, 0, 0, 0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0}, { 0, 0, 2, 0, 1,-387298.0,-367.0, 380.0, 200728.0, 18.0, 318.0}, { 1, 0, 2, 0, 2,-301461.0, -36.0, 816.0, 129025.0,-63.0, 367.0}, { 0,-1, 2,-2, 2, 215829.0,-494.0, 111.0, -95929.0,299.0, 132.0}, /* 11-20 */ { 0, 0, 2,-2, 1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0}, {-1, 0, 2, 0, 2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0}, {-1, 0, 0, 2, 0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0}, { 1, 0, 0, 0, 1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0}, {-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0}, {-1, 0, 2, 2, 2, -59641.0, -11.0, 149.0, 25543.0,-11.0, 66.0}, { 1, 0, 2, 0, 1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0}, {-2, 0, 2, 0, 1, 45893.0, 50.0, 31.0, -24236.0,-10.0, 20.0}, { 0, 0, 0, 2, 0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0}, { 0, 0, 2, 2, 2, -38571.0, -1.0, 158.0, 16452.0,-11.0, 68.0}, /* 21-30 */ { 0,-2, 2,-2, 2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0}, {-2, 0, 0, 2, 0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0}, { 2, 0, 2, 0, 2, -31046.0, -1.0, 131.0, 13238.0,-11.0, 59.0}, { 1, 0, 2,-2, 2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0}, {-1, 0, 2, 0, 1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0}, { 2, 0, 0, 0, 0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0}, { 0, 0, 2, 0, 0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0}, { 0, 1, 0, 0, 1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0}, {-1, 0, 0, 2, 1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0}, { 0, 2, 2,-2, 2, -15794.0, 72.0, -16.0, 6850.0,-42.0, -5.0}, /* 31-40 */ { 0, 0,-2, 2, 0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0}, { 1, 0, 0,-2, 1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0}, { 0,-1, 0, 0, 1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0}, {-1, 0, 2, 2, 1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0}, { 0, 2, 0, 0, 0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0}, { 1, 0, 2, 2, 2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0}, {-2, 0, 2, 0, 0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0}, { 0, 1, 2, 0, 2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0}, { 0, 0, 2, 2, 1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0}, { 0,-1, 2, 0, 2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0}, /* 41-50 */ { 0, 0, 0, 2, 1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0}, { 1, 0, 2,-2, 1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0}, { 2, 0, 2,-2, 2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0}, {-2, 0, 0, 2, 1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0}, { 2, 0, 2, 0, 1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0}, { 0,-1, 2,-2, 1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0}, { 0, 0, 0,-2, 1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0}, {-1,-1, 0, 2, 0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0}, { 2, 0, 0,-2, 1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0}, { 1, 0, 0, 2, 0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0}, /* 51-60 */ { 0, 1, 2,-2, 1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0}, { 1,-1, 0, 0, 0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0}, {-2, 0, 2, 0, 2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0}, { 3, 0, 2, 0, 2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0}, { 0,-1, 0, 2, 0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0}, { 1,-1, 2, 0, 2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0}, { 0, 0, 0, 1, 0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0}, {-1,-1, 2, 2, 2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0}, {-1, 0, 2, 0, 0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0}, { 0,-1, 2, 2, 2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0}, /* 61-70 */ {-2, 0, 0, 0, 1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0}, { 1, 1, 2, 0, 2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0}, { 2, 0, 0, 0, 1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0}, {-1, 1, 0, 1, 0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0}, { 1, 1, 0, 0, 0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0}, { 1, 0, 2, 0, 0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0}, {-1, 0, 2,-2, 1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0}, { 1, 0, 0, 0, 2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0}, {-1, 0, 0, 1, 0, 4026.0, 0.0, -353.0, -553.0, 0.0, -139.0}, { 0, 0, 2, 1, 2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0}, /* 71-80 */ {-1, 0, 2, 4, 2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0}, {-1, 1, 0, 1, 1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0}, { 0,-2, 2,-2, 1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0}, { 1, 0, 2, 2, 1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0}, {-2, 0, 2, 2, 2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0}, {-1, 0, 0, 0, 2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0}, { 1, 1, 2,-2, 2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0}, {-2, 0, 2, 4, 2, -1214.0, 0.0, 5.0, 518.0, 0.0, 2.0}, {-1, 0, 4, 0, 2, 1146.0, 0.0, -3.0, -490.0, 0.0, -1.0}, { 2, 0, 2,-2, 1, 1019.0, 0.0, -1.0, -527.0, 0.0, -1.0}, /* 81-90 */ { 2, 0, 2, 2, 2, -1100.0, 0.0, 9.0, 465.0, 0.0, 4.0}, { 1, 0, 0, 2, 1, -970.0, 0.0, 2.0, 496.0, 0.0, 1.0}, { 3, 0, 0, 0, 0, 1575.0, 0.0, -6.0, -50.0, 0.0, 0.0}, { 3, 0, 2,-2, 2, 934.0, 0.0, -3.0, -399.0, 0.0, -1.0}, { 0, 0, 4,-2, 2, 922.0, 0.0, -1.0, -395.0, 0.0, -1.0}, { 0, 1, 2, 0, 1, 815.0, 0.0, -1.0, -422.0, 0.0, -1.0}, { 0, 0,-2, 2, 1, 834.0, 0.0, 2.0, -440.0, 0.0, 1.0}, { 0, 0, 2,-2, 3, 1248.0, 0.0, 0.0, -170.0, 0.0, 1.0}, {-1, 0, 0, 4, 0, 1338.0, 0.0, -5.0, -39.0, 0.0, 0.0}, { 2, 0,-2, 0, 1, 716.0, 0.0, -2.0, -389.0, 0.0, -1.0}, /* 91-100 */ {-2, 0, 0, 4, 0, 1282.0, 0.0, -3.0, -23.0, 0.0, 1.0}, {-1,-1, 0, 2, 1, 742.0, 0.0, 1.0, -391.0, 0.0, 0.0}, {-1, 0, 0, 1, 1, 1020.0, 0.0, -25.0, -495.0, 0.0, -10.0}, { 0, 1, 0, 0, 2, 715.0, 0.0, -4.0, -326.0, 0.0, 2.0}, { 0, 0,-2, 0, 1, -666.0, 0.0, -3.0, 369.0, 0.0, -1.0}, { 0,-1, 2, 0, 1, -667.0, 0.0, 1.0, 346.0, 0.0, 1.0}, { 0, 0, 2,-1, 2, -704.0, 0.0, 0.0, 304.0, 0.0, 0.0}, { 0, 0, 2, 4, 2, -694.0, 0.0, 5.0, 294.0, 0.0, 2.0}, {-2,-1, 0, 2, 0, -1014.0, 0.0, -1.0, 4.0, 0.0, -1.0}, { 1, 1, 0,-2, 1, -585.0, 0.0, -2.0, 316.0, 0.0, -1.0}, /* 101-110 */ {-1, 1, 0, 2, 0, -949.0, 0.0, 1.0, 8.0, 0.0, -1.0}, {-1, 1, 0, 1, 2, -595.0, 0.0, 0.0, 258.0, 0.0, 0.0}, { 1,-1, 0, 0, 1, 528.0, 0.0, 0.0, -279.0, 0.0, 0.0}, { 1,-1, 2, 2, 2, -590.0, 0.0, 4.0, 252.0, 0.0, 2.0}, {-1, 1, 2, 2, 2, 570.0, 0.0, -2.0, -244.0, 0.0, -1.0}, { 3, 0, 2, 0, 1, -502.0, 0.0, 3.0, 250.0, 0.0, 2.0}, { 0, 1,-2, 2, 0, -875.0, 0.0, 1.0, 29.0, 0.0, 0.0}, {-1, 0, 0,-2, 1, -492.0, 0.0, -3.0, 275.0, 0.0, -1.0}, { 0, 1, 2, 2, 2, 535.0, 0.0, -2.0, -228.0, 0.0, -1.0}, {-1,-1, 2, 2, 1, -467.0, 0.0, 1.0, 240.0, 0.0, 1.0}, /* 111-120 */ { 0,-1, 0, 0, 2, 591.0, 0.0, 0.0, -253.0, 0.0, 0.0}, { 1, 0, 2,-4, 1, -453.0, 0.0, -1.0, 244.0, 0.0, -1.0}, {-1, 0,-2, 2, 0, 766.0, 0.0, 1.0, 9.0, 0.0, 0.0}, { 0,-1, 2, 2, 1, -446.0, 0.0, 2.0, 225.0, 0.0, 1.0}, { 2,-1, 2, 0, 2, -488.0, 0.0, 2.0, 207.0, 0.0, 1.0}, { 0, 0, 0, 2, 2, -468.0, 0.0, 0.0, 201.0, 0.0, 0.0}, { 1,-1, 2, 0, 1, -421.0, 0.0, 1.0, 216.0, 0.0, 1.0}, {-1, 1, 2, 0, 2, 463.0, 0.0, 0.0, -200.0, 0.0, 0.0}, { 0, 1, 0, 2, 0, -673.0, 0.0, 2.0, 14.0, 0.0, 0.0}, { 0,-1,-2, 2, 0, 658.0, 0.0, 0.0, -2.0, 0.0, 0.0}, /* 121-130 */ { 0, 3, 2,-2, 2, -438.0, 0.0, 0.0, 188.0, 0.0, 0.0}, { 0, 0, 0, 1, 1, -390.0, 0.0, 0.0, 205.0, 0.0, 0.0}, {-1, 0, 2, 2, 0, 639.0, -11.0, -2.0, -19.0, 0.0, 0.0}, { 2, 1, 2, 0, 2, 412.0, 0.0, -2.0, -176.0, 0.0, -1.0}, { 1, 1, 0, 0, 1, -361.0, 0.0, 0.0, 189.0, 0.0, 0.0}, { 1, 1, 2, 0, 1, 360.0, 0.0, -1.0, -185.0, 0.0, -1.0}, { 2, 0, 0, 2, 0, 588.0, 0.0, -3.0, -24.0, 0.0, 0.0}, { 1, 0,-2, 2, 0, -578.0, 0.0, 1.0, 5.0, 0.0, 0.0}, {-1, 0, 0, 2, 2, -396.0, 0.0, 0.0, 171.0, 0.0, 0.0}, { 0, 1, 0, 1, 0, 565.0, 0.0, -1.0, -6.0, 0.0, 0.0}, /* 131-140 */ { 0, 1, 0,-2, 1, -335.0, 0.0, -1.0, 184.0, 0.0, -1.0}, {-1, 0, 2,-2, 2, 357.0, 0.0, 1.0, -154.0, 0.0, 0.0}, { 0, 0, 0,-1, 1, 321.0, 0.0, 1.0, -174.0, 0.0, 0.0}, {-1, 1, 0, 0, 1, -301.0, 0.0, -1.0, 162.0, 0.0, 0.0}, { 1, 0, 2,-1, 2, -334.0, 0.0, 0.0, 144.0, 0.0, 0.0}, { 1,-1, 0, 2, 0, 493.0, 0.0, -2.0, -15.0, 0.0, 0.0}, { 0, 0, 0, 4, 0, 494.0, 0.0, -2.0, -19.0, 0.0, 0.0}, { 1, 0, 2, 1, 2, 337.0, 0.0, -1.0, -143.0, 0.0, -1.0}, { 0, 0, 2, 1, 1, 280.0, 0.0, -1.0, -144.0, 0.0, 0.0}, { 1, 0, 0,-2, 2, 309.0, 0.0, 1.0, -134.0, 0.0, 0.0}, /* 141-150 */ {-1, 0, 2, 4, 1, -263.0, 0.0, 2.0, 131.0, 0.0, 1.0}, { 1, 0,-2, 0, 1, 253.0, 0.0, 1.0, -138.0, 0.0, 0.0}, { 1, 1, 2,-2, 1, 245.0, 0.0, 0.0, -128.0, 0.0, 0.0}, { 0, 0, 2, 2, 0, 416.0, 0.0, -2.0, -17.0, 0.0, 0.0}, {-1, 0, 2,-1, 1, -229.0, 0.0, 0.0, 128.0, 0.0, 0.0}, {-2, 0, 2, 2, 1, 231.0, 0.0, 0.0, -120.0, 0.0, 0.0}, { 4, 0, 2, 0, 2, -259.0, 0.0, 2.0, 109.0, 0.0, 1.0}, { 2,-1, 0, 0, 0, 375.0, 0.0, -1.0, -8.0, 0.0, 0.0}, { 2, 1, 2,-2, 2, 252.0, 0.0, 0.0, -108.0, 0.0, 0.0}, { 0, 1, 2, 1, 2, -245.0, 0.0, 1.0, 104.0, 0.0, 0.0}, /* 151-160 */ { 1, 0, 4,-2, 2, 243.0, 0.0, -1.0, -104.0, 0.0, 0.0}, {-1,-1, 0, 0, 1, 208.0, 0.0, 1.0, -112.0, 0.0, 0.0}, { 0, 1, 0, 2, 1, 199.0, 0.0, 0.0, -102.0, 0.0, 0.0}, {-2, 0, 2, 4, 1, -208.0, 0.0, 1.0, 105.0, 0.0, 0.0}, { 2, 0, 2, 0, 0, 335.0, 0.0, -2.0, -14.0, 0.0, 0.0}, { 1, 0, 0, 1, 0, -325.0, 0.0, 1.0, 7.0, 0.0, 0.0}, {-1, 0, 0, 4, 1, -187.0, 0.0, 0.0, 96.0, 0.0, 0.0}, {-1, 0, 4, 0, 1, 197.0, 0.0, -1.0, -100.0, 0.0, 0.0}, { 2, 0, 2, 2, 1, -192.0, 0.0, 2.0, 94.0, 0.0, 1.0}, { 0, 0, 2,-3, 2, -188.0, 0.0, 0.0, 83.0, 0.0, 0.0}, /* 161-170 */ {-1,-2, 0, 2, 0, 276.0, 0.0, 0.0, -2.0, 0.0, 0.0}, { 2, 1, 0, 0, 0, -286.0, 0.0, 1.0, 6.0, 0.0, 0.0}, { 0, 0, 4, 0, 2, 186.0, 0.0, -1.0, -79.0, 0.0, 0.0}, { 0, 0, 0, 0, 3, -219.0, 0.0, 0.0, 43.0, 0.0, 0.0}, { 0, 3, 0, 0, 0, 276.0, 0.0, 0.0, 2.0, 0.0, 0.0}, { 0, 0, 2,-4, 1, -153.0, 0.0, -1.0, 84.0, 0.0, 0.0}, { 0,-1, 0, 2, 1, -156.0, 0.0, 0.0, 81.0, 0.0, 0.0}, { 0, 0, 0, 4, 1, -154.0, 0.0, 1.0, 78.0, 0.0, 0.0}, {-1,-1, 2, 4, 2, -174.0, 0.0, 1.0, 75.0, 0.0, 0.0}, { 1, 0, 2, 4, 2, -163.0, 0.0, 2.0, 69.0, 0.0, 1.0}, /* 171-180 */ {-2, 2, 0, 2, 0, -228.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-2,-1, 2, 0, 1, 91.0, 0.0, -4.0, -54.0, 0.0, -2.0}, {-2, 0, 0, 2, 2, 175.0, 0.0, 0.0, -75.0, 0.0, 0.0}, {-1,-1, 2, 0, 2, -159.0, 0.0, 0.0, 69.0, 0.0, 0.0}, { 0, 0, 4,-2, 1, 141.0, 0.0, 0.0, -72.0, 0.0, 0.0}, { 3, 0, 2,-2, 1, 147.0, 0.0, 0.0, -75.0, 0.0, 0.0}, {-2,-1, 0, 2, 1, -132.0, 0.0, 0.0, 69.0, 0.0, 0.0}, { 1, 0, 0,-1, 1, 159.0, 0.0, -28.0, -54.0, 0.0, 11.0}, { 0,-2, 0, 2, 0, 213.0, 0.0, 0.0, -4.0, 0.0, 0.0}, {-2, 0, 0, 4, 1, 123.0, 0.0, 0.0, -64.0, 0.0, 0.0}, /* 181-190 */ {-3, 0, 0, 0, 1, -118.0, 0.0, -1.0, 66.0, 0.0, 0.0}, { 1, 1, 2, 2, 2, 144.0, 0.0, -1.0, -61.0, 0.0, 0.0}, { 0, 0, 2, 4, 1, -121.0, 0.0, 1.0, 60.0, 0.0, 0.0}, { 3, 0, 2, 2, 2, -134.0, 0.0, 1.0, 56.0, 0.0, 1.0}, {-1, 1, 2,-2, 1, -105.0, 0.0, 0.0, 57.0, 0.0, 0.0}, { 2, 0, 0,-4, 1, -102.0, 0.0, 0.0, 56.0, 0.0, 0.0}, { 0, 0, 0,-2, 2, 120.0, 0.0, 0.0, -52.0, 0.0, 0.0}, { 2, 0, 2,-4, 1, 101.0, 0.0, 0.0, -54.0, 0.0, 0.0}, {-1, 1, 0, 2, 1, -113.0, 0.0, 0.0, 59.0, 0.0, 0.0}, { 0, 0, 2,-1, 1, -106.0, 0.0, 0.0, 61.0, 0.0, 0.0}, /* 191-200 */ { 0,-2, 2, 2, 2, -129.0, 0.0, 1.0, 55.0, 0.0, 0.0}, { 2, 0, 0, 2, 1, -114.0, 0.0, 0.0, 57.0, 0.0, 0.0}, { 4, 0, 2,-2, 2, 113.0, 0.0, -1.0, -49.0, 0.0, 0.0}, { 2, 0, 0,-2, 2, -102.0, 0.0, 0.0, 44.0, 0.0, 0.0}, { 0, 2, 0, 0, 1, -94.0, 0.0, 0.0, 51.0, 0.0, 0.0}, { 1, 0, 0,-4, 1, -100.0, 0.0, -1.0, 56.0, 0.0, 0.0}, { 0, 2, 2,-2, 1, 87.0, 0.0, 0.0, -47.0, 0.0, 0.0}, {-3, 0, 0, 4, 0, 161.0, 0.0, 0.0, -1.0, 0.0, 0.0}, {-1, 1, 2, 0, 1, 96.0, 0.0, 0.0, -50.0, 0.0, 0.0}, {-1,-1, 0, 4, 0, 151.0, 0.0, -1.0, -5.0, 0.0, 0.0}, /* 201-210 */ {-1,-2, 2, 2, 2, -104.0, 0.0, 0.0, 44.0, 0.0, 0.0}, {-2,-1, 2, 4, 2, -110.0, 0.0, 0.0, 48.0, 0.0, 0.0}, { 1,-1, 2, 2, 1, -100.0, 0.0, 1.0, 50.0, 0.0, 0.0}, {-2, 1, 0, 2, 0, 92.0, 0.0, -5.0, 12.0, 0.0, -2.0}, {-2, 1, 2, 0, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0}, { 2, 1, 0,-2, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0}, {-3, 0, 2, 0, 1, -78.0, 0.0, 0.0, 41.0, 0.0, 0.0}, {-2, 0, 2,-2, 1, -77.0, 0.0, 0.0, 43.0, 0.0, 0.0}, {-1, 1, 0, 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NLS = (int) (sizeof xls / sizeof xls[0]); /* ------------------------ */ /* Planetary nutation model */ /* ------------------------ */ /* The units for the sine and cosine coefficients are */ /* 0.1 microarcsecond */ static const struct { int nl, /* coefficients of l, F, D and Omega */ nf, nd, nom, nme, /* coefficients of planetary longitudes */ nve, nea, nma, nju, nsa, nur, nne, npa; /* coefficient of general precession */ int sp,cp; /* longitude sin, cos coefficients */ int se,ce; /* obliquity sin, cos coefficients */ } xpl[] = { /* 1-10 */ { 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 0, 1440, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, -8, 16,-4,-5, 0, 0, 2, 56,-117, -42, -40}, { 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 2, 125, -43, 0, -54}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 2, 2, 0, 5, 0, 0}, { 0, 0, 0, 0, 0, 0, -4, 8,-1,-5, 0, 0, 2, 3, -7, -3, 0}, { 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1, 3, 0, 0, -2}, { 0, 1,-1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0, -114, 0, 0, 61}, {-1, 0, 0, 0, 0, 10, -3, 0, 0, 0, 0, 0, 0, -219, 89, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0,-2, 6,-3, 0, 2, -3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, -462,1604, 0, 0}, /* 11-20 */ { 0, 1,-1, 1, 0, 0, -5, 8,-3, 0, 0, 0, 0, 99, 0, 0, -53}, { 0, 0, 0, 0, 0, 0, -4, 8,-3, 0, 0, 0, 1, -3, 0, 0, 2}, { 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2, 0, 6, 2, 0}, { 0, 0, 0, 0, 0, -5, 6, 4, 0, 0, 0, 0, 2, 3, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 2, -12, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 1, 14,-218, 117, 8}, { 0, 1,-1, 1, 0, 0, -1, 0, 2,-5, 0, 0, 0, 31,-481, -257, -17}, { 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 0, -491, 128, 0, 0}, { 0, 1,-1, 1, 0, 0, -1, 0,-2, 5, 0, 0, 0,-3084,5123, 2735,1647}, { 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 1,-1444,2409,-1286,-771}, /* 21-30 */ { 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 2, 11, -24, -11, -9}, { 2,-1,-1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, 26, -9, 0, 0}, { 1, 0,-2, 0, 0, 19,-21, 3, 0, 0, 0, 0, 0, 103, -60, 0, 0}, { 0, 1,-1, 1, 0, 2, -4, 0,-3, 0, 0, 0, 0, 0, -13, -7, 0}, { 1, 0,-1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -26, -29, -16, 14}, { 0, 1,-1, 1, 0, 0, -1, 0,-4,10, 0, 0, 0, 9, -27, -14, -5}, {-2, 0, 2, 1, 0, 0, 2, 0, 0,-5, 0, 0, 0, 12, 0, 0, -6}, { 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0, -7, 0, 0, 0}, { 0,-1, 1, 0, 0, 0, 1, 0, 1,-1, 0, 0, 0, 0, 24, 0, 0}, {-2, 0, 2, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, 284, 0, 0,-151}, /* 31-40 */ {-1, 0, 0, 0, 0, 18,-16, 0, 0, 0, 0, 0, 0, 226, 101, 0, 0}, {-2, 1, 1, 2, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -8, -2, 0}, {-1, 1,-1, 1, 0, 18,-17, 0, 0, 0, 0, 0, 0, 0, -6, -3, 0}, {-1, 0, 1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -3}, { 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 2, -41, 175, 76, 17}, { 0, 2,-2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0}, { 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 1, 425, 212, -133, 269}, { 0, 1,-1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0, 1200, 598, 319,-641}, { 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 0, 235, 334, 0, 0}, { 0, 1,-1, 1, 0, 8,-14, 0, 0, 0, 0, 0, 0, 11, -12, -7, -6}, /* 41-50 */ { 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 1, 5, -6, 3, 3}, {-2, 0, 2, 1, 0, 0, 2, 0,-4, 5, 0, 0, 0, -5, 0, 0, 3}, {-2, 0, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3}, {-2, 0, 2, 0, 0, 0, 2, 0,-3, 1, 0, 0, 0, 15, 0, 0, 0}, { 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0, 13, 0, 0, -7}, {-2, 0, 2, 0, 0, 0, 2, 0,-4, 3, 0, 0, 0, -6, -9, 0, 0}, { 0,-1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 266, -78, 0, 0}, { 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0, -460,-435, -232, 246}, { 0, 1,-1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 15, 7, 0}, {-1, 1, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2}, /* 51-60 */ {-1, 0, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0}, {-2, 0, 2, 0, 0, 0, 2, 0,-2,-2, 0, 0, 0, 4, 0, 0, 0}, {-2, 2, 0, 2, 0, 0, -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 0, 0, 0, 0, 0, -5, 0, 0, 0}, {-1, 0, 0, 1, 0, 18,-16, 0, 0, 0, 0, 0, 0, -68, -34, -18, 36}, /* 131-140 */ { 0, 1,-1, 1, 0, 0, -1, 0,-1, 1, 0, 0, 0, 0, 14, 7, 0}, { 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0, 10, -6, -3, -5}, {-2, 1, 1, 1, 0, 0, -3, 7, 0, 0, 0, 0, 0, -5, -4, -2, 3}, { 0, 1,-1, 2, 0, 0, -1, 0,-2, 5, 0, 0, 0, -3, 5, 2, 1}, { 0, 0, 0, 1, 0, 0, 0, 0,-2, 5, 0, 0, 0, 76, 17, 9, -41}, { 0, 0, 0, 1, 0, 0, -4, 8,-3, 0, 0, 0, 0, 84, 298, 159, -45}, { 1, 0, 0, 1, 0,-10, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 2,-2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2}, {-1, 0, 0, 1, 0, 10, -3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1}, { 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, -82, 292, 156, 44}, /* 141-150 */ { 0, 0, 0, 1, 0, 0, 0, 0, 2,-5, 0, 0, 0, -73, 17, 9, 39}, { 0,-1, 1, 0, 0, 0, 1, 0, 2,-5, 0, 0, 0, -9, -16, 0, 0}, { 2,-1,-1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0, 3, 0, -1, -2}, {-2, 0, 2, 0, 0, 0, 2, 0, 0,-5, 0, 0, 0, -3, 0, 0, 0}, { 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0, -9, -5, -3, 5}, {-2, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -439, 0, 0, 0}, { 1, 0, 0, 1, 0,-18, 16, 0, 0, 0, 0, 0, 0, 57, -28, -15, -30}, {-2, 1, 1, 1, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -6, -3, 0}, { 0, 1,-1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2}, { 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0, -40, 57, 30, 21}, /* 151-160 */ { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1, 23, 7, 3, -13}, { 0, 1,-1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0, 273, 80, 43,-146}, { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -449, 430, 0, 0}, { 0, 1,-1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, -8, -47, -25, 4}, { 0, 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 1, 6, 47, 25, -3}, {-1, 0, 1, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 23, 13, 0}, {-1, 0, 1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, -3, 0, 0, 2}, { 0, 1,-1, 1, 0, 0, -1, 0, 0,-2, 0, 0, 0, 3, -4, -2, -2}, { 0, 1,-1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0, -48,-110, -59, 26}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 51, 114, 61, -27}, /* 161-170 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, -133, 0, 0, 57}, { 0, 1,-1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, { 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0, -21, -6, -3, 11}, { 0, 1,-1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, -3, -1, 0}, { 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0, -11, -21, -11, 6}, { 0, 2,-2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, -18,-436, -233, 9}, { 0,-1, 1, 0, 0, 5, -7, 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, 0, 0, 0, 0, 0, 0, -9, -14, -8, 5}, { 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1, -3, -9, -5, 3}, { 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0, -145, 47, 0, 0}, { 0, 1,-1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, -10, 40, 21, 5}, { 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 1, 11, -49, -26, -7}, { 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2,-2150, 0, 0, 932}, /* 211-220 */ { 0, 2,-2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -12, 0, 0, 5}, { 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2, 85, 0, 0, -37}, { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1, 4, 0, 0, -2}, { 0, 1,-1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0, 3, 0, 0, -2}, { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -86, 153, 0, 0}, { 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -6, 9, 5, 3}, { 0, 1,-1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 9, -13, -7, -5}, { 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -8, 12, 6, 4}, { 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 2, -51, 0, 0, 22}, { 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, -11,-268, -116, 5}, /* 221-230 */ { 0, 2,-2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 12, 5, 0}, { 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, 0, 7, 3, 0}, { 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 31, 6, 3, -17}, { 0, 1,-1, 1, 0, -5,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, 0, -3, 9, -4, 0, 0, 0, 0, 2, 14, 9, 4, -6}, { 0, 0, 0, 0, 0, 0, 2, 0, 2,-5, 0, 0, 2, -11, -6, -3, 5}, { 0, 0, 0, 0, 0, 0, -2, 8,-1,-5, 0, 0, 2, 0, -3, -1, 0}, { 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2, 123,-415, -180, -53}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 7, -32, -17, -4}, { 0, 1,-1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -9, -5, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, -4, 2, 0}, { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, -89, 0, 0, 38}, /* 481-490 */ { 0, 0, 0, 0, 0, 0, -6, 16,-4,-5, 0, 0, 2, 0, -86, -19, -6}, { 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, 0, 0, -19, 6}, { 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, -123,-416, -180, 53}, { 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2, 0, -3, -1, 0}, { 0, 0, 0, 0, 0, 0, 2, 0,-2, 5, 0, 0, 2, 12, -6, -3, -5}, { 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2, -13, 9, 4, 6}, { 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, 0, -15, -7, 0}, { 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1}, { 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, -62, -97, -42, 27}, { 0, 0, 0, 0, 0, 0, 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 4, -8, 3, 0, 0, 0, 0, 0, 3, 1, 0}, /* 681-687 */ { 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0}, { 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, -24, -12, -5, 10}, { 2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, -1, -2}, {-1, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 13, 0, 0, -6}, {-1, 2, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 7, 0, 0, -3}, { 1, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1}, { 0, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 3, 0, 0, -1} }; /* Number of terms in the planetary nutation model */ const int NPL = (int) (sizeof xpl / sizeof xpl[0]); /*--------------------------------------------------------------------*/ /* Interval between fundamental date J2000.0 and given date (JC). */ t = ((date1 - DJ00) + date2) / DJC; /* ------------------- */ /* LUNI-SOLAR NUTATION */ /* ------------------- */ /* Fundamental (Delaunay) arguments */ /* Mean anomaly of the Moon (IERS 2003). */ el = iauFal03(t); /* Mean anomaly of the Sun (MHB2000). */ elp = fmod(1287104.79305 + t * (129596581.0481 + t * (-0.5532 + t * (0.000136 + t * (-0.00001149)))), TURNAS) * DAS2R; /* Mean longitude of the Moon minus that of the ascending node */ /* (IERS 2003. */ f = iauFaf03(t); /* Mean elongation of the Moon from the Sun (MHB2000). */ d = fmod(1072260.70369 + t * (1602961601.2090 + t * (-6.3706 + t * (0.006593 + t * (-0.00003169)))), TURNAS) * DAS2R; /* Mean longitude of the ascending node of the Moon (IERS 2003). */ om = iauFaom03(t); /* Initialize the nutation values. */ dp = 0.0; de = 0.0; /* Summation of luni-solar nutation series (in reverse order). */ for (i = NLS-1; i >= 0; i--) { /* Argument and functions. */ arg = fmod((double)xls[i].nl * el + (double)xls[i].nlp * elp + (double)xls[i].nf * f + (double)xls[i].nd * d + (double)xls[i].nom * om, D2PI); sarg = sin(arg); carg = cos(arg); /* Term. */ dp += (xls[i].sp + xls[i].spt * t) * sarg + xls[i].cp * carg; de += (xls[i].ce + xls[i].cet * t) * carg + xls[i].se * sarg; } /* Convert from 0.1 microarcsec units to radians. */ dpsils = dp * U2R; depsls = de * U2R; /* ------------------ */ /* PLANETARY NUTATION */ /* ------------------ */ /* n.b. The MHB2000 code computes the luni-solar and planetary nutation */ /* in different functions, using slightly different Delaunay */ /* arguments in the two cases. This behaviour is faithfully */ /* reproduced here. Use of the IERS 2003 expressions for both */ /* cases leads to negligible changes, well below */ /* 0.1 microarcsecond. */ /* Mean anomaly of the Moon (MHB2000). */ al = fmod(2.35555598 + 8328.6914269554 * t, D2PI); /* Mean longitude of the Moon minus that of the ascending node */ /*(MHB2000). */ af = fmod(1.627905234 + 8433.466158131 * t, D2PI); /* Mean elongation of the Moon from the Sun (MHB2000). */ ad = fmod(5.198466741 + 7771.3771468121 * t, D2PI); /* Mean longitude of the ascending node of the Moon (MHB2000). */ aom = fmod(2.18243920 - 33.757045 * t, D2PI); /* General accumulated precession in longitude (IERS 2003). */ apa = iauFapa03(t); /* Planetary longitudes, Mercury through Uranus (IERS 2003). */ alme = iauFame03(t); alve = iauFave03(t); alea = iauFae03(t); alma = iauFama03(t); alju = iauFaju03(t); alsa = iauFasa03(t); alur = iauFaur03(t); /* Neptune longitude (MHB2000). */ alne = fmod(5.321159000 + 3.8127774000 * t, D2PI); /* Initialize the nutation values. */ dp = 0.0; de = 0.0; /* Summation of planetary nutation series (in reverse order). */ for (i = NPL-1; i >= 0; i--) { /* Argument and functions. */ arg = fmod((double)xpl[i].nl * al + (double)xpl[i].nf * af + (double)xpl[i].nd * ad + (double)xpl[i].nom * aom + (double)xpl[i].nme * alme + (double)xpl[i].nve * alve + (double)xpl[i].nea * alea + (double)xpl[i].nma * alma + (double)xpl[i].nju * alju + (double)xpl[i].nsa * alsa + (double)xpl[i].nur * alur + (double)xpl[i].nne * alne + (double)xpl[i].npa * apa, D2PI); sarg = sin(arg); carg = cos(arg); /* Term. */ dp += (double)xpl[i].sp * sarg + (double)xpl[i].cp * carg; de += (double)xpl[i].se * sarg + (double)xpl[i].ce * carg; } /* Convert from 0.1 microarcsec units to radians. */ dpsipl = dp * U2R; depspl = de * U2R; /* ------- */ /* RESULTS */ /* ------- */ /* Add luni-solar and planetary components. */ *dpsi = dpsils + dpsipl; *deps = depsls + depspl; return; } void iauIr(double r[3][3]) /* ** - - - - - - ** i a u I r ** - - - - - - ** ** Initialize an r-matrix to the identity matrix. ** ** This function is part of the International Astronomical Union's ** SOFA (Standards Of Fundamental Astronomy) software collection. ** ** Status: vector/matrix support function. ** ** Returned: ** r double[3][3] r-matrix ** ** Called: ** iauZr zero r-matrix ** ** This revision: 2008 May 11 ** ** SOFA release 2010-12-01 ** ** Copyright (C) 2010 IAU SOFA Board. See notes at end. */ { iauZr(r); r[0][0] = 1.0; r[1][1] = 1.0; r[2][2] = 1.0; return; } void iauRz(double psi, double r[3][3]) /* ** - - - - - - ** i a u R z ** - - - - - - ** ** Rotate an r-matrix about the z-axis. ** Called: ** iauIr initialize r-matrix to identity ** iauRxr product of two r-matrices ** iauCr copy r-matrix */ { double s, c, a[3][3], w[3][3]; /* Matrix representing new rotation. */ s = sin(psi); c = cos(psi); iauIr(a); a[0][0] = c; a[1][0] = -s; a[0][1] = s; a[1][1] = c; /* Rotate. */ iauRxr(a, r, w); /* Return result. */ iauCr(w, r); return; } void iauRx(double phi, double r[3][3]) /* ** - - - - - - ** i a u R x ** - - - - - - ** ** Rotate an r-matrix about the x-axis. */ { double s, c, a[3][3], w[3][3]; /* Matrix representing new rotation. */ s = sin(phi); c = cos(phi); iauIr(a); a[1][1] = c; a[2][1] = -s; a[1][2] = s; a[2][2] = c; /* Rotate. */ iauRxr(a, r, w); /* Return result. */ iauCr(w, r); return; } double iauFame03(double t) /* ** - - - - - - - - - - ** i a u F a m e 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Mercury. */ { double a; /* Mean longitude of Mercury (IERS Conventions 2003). */ a = fmod(4.402608842 + 2608.7903141574 * t, D2PI); return a; } double iauFama03(double t) /* ** - - - - - - - - - - ** i a u F a m a 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Mars. */ { double a; /* Mean longitude of Mars (IERS Conventions 2003). */ a = fmod(6.203480913 + 334.0612426700 * t, D2PI); return a; } double iauFaju03(double t) /* ** - - - - - - - - - - ** i a u F a j u 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Jupiter. */ { double a; /* Mean longitude of Jupiter (IERS Conventions 2003). */ a = fmod(0.599546497 + 52.9690962641 * t, D2PI); return a; } double iauFasa03(double t) /* ** - - - - - - - - - - ** i a u F a s a 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Saturn. ** */ { double a; /* Mean longitude of Saturn (IERS Conventions 2003). */ a = fmod(0.874016757 + 21.3299104960 * t, D2PI); return a; } double iauFaur03(double t) /* ** - - - - - - - - - - ** i a u F a u r 0 3 ** - - - - - - - - - - ** ** Fundamental argument, IERS Conventions (2003): ** mean longitude of Uranus. */ { double a; /* Mean longitude of Uranus (IERS Conventions 2003). */ a = fmod(5.481293872 + 7.4781598567 * t, D2PI); return a; } void iauZr(double r[3][3]) /* ** - - - - - - ** i a u Z r ** - - - - - - ** ** Initialize an r-matrix to the null matrix. */ { int i, j; for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { r[i][j] = 0.0; } } return; } void iauRxr(double a[3][3], double b[3][3], double atb[3][3]) /* ** - - - - - - - ** i a u R x r ** - - - - - - - ** ** Multiply two r-matrices. */ { int i, j, k; double w, wm[3][3]; for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { w = 0.0; for (k = 0; k < 3; k++) { w += a[i][k] * b[k][j]; } wm[i][j] = w; } } iauCr(wm, atb); return; } void iauCr(double r[3][3], double c[3][3]) /* ** - - - - - - ** i a u C r ** - - - - - - ** ** Copy an r-matrix. ** Called: ** iauCp copy p-vector */ { iauCp(r[0], c[0]); iauCp(r[1], c[1]); iauCp(r[2], c[2]); return; } void iauCp(double p[3], double c[3]) /* ** - - - - - - ** i a u C p ** - - - - - - ** ** Copy a p-vector. */ { c[0] = p[0]; c[1] = p[1]; c[2] = p[2]; return; } double iauGmst06(double uta, double utb, double tta, double ttb) /* ** - - - - - - - - - - ** i a u G m s t 0 6 ** - - - - - - - - - - ** ** Greenwich mean sidereal time (consistent with IAU 2006 precession). ** iauEra00 Earth rotation angle, IAU 2000 ** iauAnp normalize angle into range 0 to 2pi ** */ { double t, gmst; /* TT Julian centuries since J2000.0. */ t = ((tta - DJ00) + ttb) / DJC; /* Greenwich mean sidereal time, IAU 2006. */ gmst = iauAnp(iauEra00(uta, utb) + ( 0.014506 + ( 4612.156534 + ( 1.3915817 + ( -0.00000044 + ( -0.000029956 + ( -0.0000000368 ) * t) * t) * t) * t) * t) * DAS2R); return gmst; } nautic-1.5/src/about.cpp0000644000175000017500000000441611747670513015147 0ustar moellermoeller/* about.cpp implementation of about dlg Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "about.h" /////////////////////////////////////////////////////////////////////////// AboutDialog::AboutDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->Centre( wxBOTH ); //connect this->Connect( wxEVT_PAINT, wxPaintEventHandler( AboutDialog::OnPaint ) ); } void AboutDialog::OnPaint(wxPaintEvent& event) { wxPaintDC dc(this); wxColour bk(0,0,0); wxPen pen; pen.SetColour(bk); dc.SetPen(pen); dc.DrawText(_("This programm was designed and implemented by"),20,20); dc.DrawText(_("-Giovanni Enas-"),130,40); dc.DrawText(_("with the aid of SOFA libraries, refering to the algorithms"),10,60); dc.DrawText(_("and solutions of -Steve Moshier's Ephemeris Program-"),10,75); dc.DrawText(_("and Shiva Iyer routines. "),10,90); dc.DrawText(_("Plus the -Solar Position Algorithm (SPA)- for sun position."),10,105); dc.DrawText(_("and is intended to be an aid for navigators and amateurs"),10,120); dc.DrawText(_("for the calculation of body's ephemeris and the observer"),10,135); dc.DrawText(_("position in Astro Navigation."),10,150); dc.DrawText(_("Version: 1.5-1"),150,180); dc.DrawText(_("Copyright (C) 2011 Giovanni Enas"),110,195); dc.DrawText(_("License: GPLv3"),140,210); } AboutDialog::~AboutDialog() { this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( AboutDialog::OnPaint ) ); } nautic-1.5/src/main.cpp0000644000175000017500000011413511747701057014757 0ustar moellermoeller/* main.cpp Main implementation file Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "main.h" #define TIMER_ID 1000 // initialize the application IMPLEMENT_APP(MainApp); long iVal; #define RADEG (180.0/PI) #define DEGRAD (PI/180.0) #define sind(x) sin((x)*DEGRAD) #define cosd(x) cos((x)*DEGRAD) #define tand(x) tan((x)*DEGRAD) #define asind(x) (RADEG*asin(x)) #define acosd(x) (RADEG*acos(x)) #define atand(x) (RADEG*atan(x)) #define atan2d(y,x) (RADEG*atan2((y),(x))) //////////////////////////////////////////////////////////////////////////////// // application class implementation //////////////////////////////////////////////////////////////////////////////// bool MainApp::OnInit() { /*MainDialog * m_dlg = new MainDialog(NULL); m_dlg->Show();*/ SetTopWindow( new MainDialog( NULL ) ); GetTopWindow()->Show(); // true = enter the main loop return true; } //////////////////////////////////////////////////////////////////////////////// // main application frame implementation //////////////////////////////////////////////////////////////////////////////// BEGIN_EVENT_TABLE(MainDialog, MainDialogBase) EVT_TIMER (wxEVT_TIMER, MainDialog::OnTimer) EVT_CHAR_HOOK (MainDialog::OnCharHook) END_EVENT_TABLE() /*BEGIN_EVENT_TABLE(MainFrame,MainFrameBase) EVT_TIMER(TIMER_ID, MainFrame::OnTimer) END_EVENT_TABLE()*/ MainDialog::MainDialog(wxWindow *parent) : MainDialogBase( parent ) { //connect m_comboBox31->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialog::OnComboPlan ), NULL, this ); m_comboBox3->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialog::OnComboStar ), NULL, this ); bInsertNum = false; bUpperLimb = false; bSun = false; bMoon = false; bPlanet = false; bStar = false; iCount =0; ihourval=0; iminval=0; isecval=0; declination=0; CoArect=0; Tm=0; Ts=0; truelat = 0; truelong = 0; parlax = 0; smdiam = 0; azimuth = 2; iYear = 0; iMonth = 0; iDay = 0; iHour = 0; iMinute = 0; iSeconds = 0; isStar = false; isPlanet = false; m_timer = new wxTimer(this,wxEVT_TIMER); m_timer->Stop(); latitude = 0; longitude = 0; InitDialog(); } void MainDialog::InitDialog() { ///////////////////formattazione della data//////////////////////////////////////// time = wxDateTime::Now(); year = time.GetYear(); month= time.GetMonth(); day = time.GetDay(); wxString strWeekDay =time.Format(); wxString strWeek=strWeekDay.Left(3); if (strWeek==_("lun")) strWeek=_("Mon"); if (strWeek==_("mar")) strWeek=_("Tue"); if (strWeek==_("mer")) strWeek=_("Wed"); if (strWeek==_("gio")) strWeek=_("Thu"); if (strWeek==_("ven")) strWeek=_("Fri"); if (strWeek==_("sab")) strWeek=_("Sat"); if (strWeek==_("dom")) strWeek=_("Sun"); wxString strYear = wxString::Format(_("%d"),year); wxString strMonth; wxString strDay = wxString::Format(_("%d"),day); month = month + 1; switch (month) { case 1: strMonth= _("Jan"); break; case 2: strMonth= _("Feb"); break; case 3: strMonth= _("Mar"); break; case 4: strMonth= _("Apr"); break; case 5: strMonth= _("May"); break; case 6: strMonth= _("Jun"); break; case 7: strMonth= _("Jul"); break; case 8: strMonth= _("Ago"); break; case 9: strMonth= _("Sep"); break; case 10: strMonth= _("Oct"); break; case 11: strMonth= _("Nov"); break; case 12: strMonth= _("Dec"); break; } m_choice3->SetStringSelection(strWeek); m_choice4->SetStringSelection(strDay); m_choice5->SetStringSelection(strMonth); m_choice6->SetStringSelection(strYear); //////////////////////formattazione ora UTC///////////////////////////////// //////////////////leggo file per index error////////////////////////////// wxFileName dirname; const wxChar * pth; wxString path; wxString buff = wxT("0,0"); wxCharBuffer buffer(4); dirname.AssignHomeDir(); path = dirname.GetPath(wxPATH_GET_SEPARATOR,wxPATH_UNIX); wxString filename = wxT("/inderr"); wxString my_dir_name = wxT("Index"); wxString dir_path = path + my_dir_name; wxFileName my_dir(dir_path); label: my_dir.Mkdir(dir_path,0777,wxPATH_MKDIR_FULL); if(!my_dir.DirExists()) goto label; filepath = dir_path + filename; pth = filepath.c_str(); wxFile file; if(!file.Exists(pth)) file.Create(pth,false,wxS_IRUSR | wxS_IWUSR); if(!file.Exists(pth)) wxMessageBox(wxT("couldn't create file"),wxT("Error")); if(!file.IsOpened()) file.Open(pth,wxFile::read_write); if(!file.IsOpened()){ wxMessageBox(wxT("couldn't open file"),wxT("Error")); goto end; } else { if(file.Length()<=0){ file.Write(buff); indxerr = 0.0; } else{ int a = file.Length(); file.SeekEnd(-a); file.Read(buffer.data(),a); indxerr = atof((const char *)buffer); } } file.Close(); end: wxString pos = wxString::Format(_("%2.1f"),indxerr); m_textCtrl2421->SetValue(pos); return; } void MainDialog::OnTimer(wxTimerEvent& event) { timer.SetOwner(this); wxDateTime time= wxDateTime::Now(); wxDateTime timeUTC = time.ToUTC(); int iUHour=timeUTC.GetHour(); int iUMin=timeUTC.GetMinute(); int iUSec=timeUTC.GetSecond(); wxString strUHour = wxString::Format(_("%d"),iUHour); wxString strUMin = wxString::Format(_("%d"),iUMin); wxString strUSec = wxString::Format(_("%d"),iUSec); m_textCtrl111->SetValue(strUHour); m_textCtrl112->SetValue(strUMin); m_textCtrl113->SetValue(strUSec); } void MainDialog::OnStartTimer( wxCommandEvent& event ) { m_timer->Start(1000); } void MainDialog::OnStopTimer( wxCommandEvent& event ) { m_timer->Stop(); } void MainDialog::OnPaint(wxPaintEvent& event) { /*wxPaintDC dc(this); wxDC& pdc =dc; PrepareDC(dc); wxPen pen(wxColour(0,0,0)); wxBrush brush(wxColour(0,0,0),wxTRANSPARENT); dc.SetBrush(brush); dc.SetPen(pen); dc.GetBackground(); dc.DrawRectangle(wxRect(10, 85, 570, 75));*/ } ///////////////////////////EVENTI TESTO CASELLE LAT LON//////////////////////////////////////////// void MainDialog::OnChar(wxKeyEvent& event) { formatNum(event); } void MainDialog::OnCharDeg( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharSec( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharLon( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharDegLon( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharSecLon( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnHrsUTC( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnMinUTC( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnSecUTC( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharLocalHr( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharLocalMin( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharLocalSec( wxKeyEvent& event ) { formatOnlyNum(event); } ///////////////////////////////INSERIMENTO VALORI CASELLE DI TESTO LAT LON///////////////////////////////// void MainDialog::OnText_Deg_Lat( wxCommandEvent& event ) { long iVal = 0; wxString value=m_textCtrl11->GetValue(); value.ToLong(&iVal); if (iVal>90) { wxMessageBox(_("Warning, latitude degrees can not exeed 90°"),_("Error")); m_textCtrl11->SetValue(_("90")); } } void MainDialog::OnText_min_Lat(wxCommandEvent& event) { double iVal = 0; double lVal = 0; const char * s; int a; bInsertNum=true; wxString value=m_textCtrl12->GetValue(); value.ToDouble(&lVal); if (lVal>60) { wxMessageBox(_("Warning, latitude minutes can not exeed 60°"),_("Error")); m_textCtrl12->SetValue(_("60,00")); } wxChar ch=','; wxString val = value.AfterFirst(ch); s = val.mb_str(); a = atoi(s); //wxMessageBox(wxString::Format(_("%s"),s)); val.ToDouble(&iVal); a = a * 60; a = a / 10; val = wxString::Format(_("%d"),a); m_textCtrl1->SetValue(val); } void MainDialog::OnCheckbox(wxCommandEvent& event) { if(m_checkBox1->GetValue()==true) bUpperLimb = true; else bUpperLimb = false; } void MainDialog::OnTextMax( wxCommandEvent& event ) { /*wxString val; wxString value=m_textCtrl12->GetValue(); val=value; val=val.insert(2,1,','); m_textCtrl12->SetValue(val);*/ } void MainDialog::OnText_Sec_Lat(wxCommandEvent& event) { long iVal = 0; wxString value=m_textCtrl1->GetValue(); value.ToLong(&iVal); if (iVal>60) { wxMessageBox(_("Warning, latitude seconds can not exeed 60°"),_("Error")); m_textCtrl1->SetValue(_("60")); } } void MainDialog::OnTextDegLon(wxCommandEvent& event) { long iVal,timeVal; iVal = 0; timeVal = 0; wxString value=m_textCtrl13->GetValue(); value.ToLong(&iVal); if (iVal>180) { wxMessageBox(_("Warning, longitude degrees can not exeed 180°"),_("Error")); m_textCtrl13->SetValue(_("180")); } } void MainDialog::OnTextMinLon( wxCommandEvent& event ) { double iVal = 0; double lVal = 0; const char * s; int a; bInsertNum = true; wxString value=m_textCtrl14->GetValue(); value.ToDouble(&lVal); if (lVal>60) { wxMessageBox(_("Warning, longitude minutes can not exeed 60°"),_("Error")); m_textCtrl14->SetValue(_("60,00")); } wxChar ch=','; wxString val = value.AfterFirst(ch); s = val.mb_str(); a = atoi(s); val.ToDouble(&iVal); a = a * 60; a = a / 10; val = wxString::Format(_("%d"),a); m_textCtrl15->SetValue(val); } void MainDialog::OnTextSecLon( wxCommandEvent& event ) { long iVal = 0; wxString val=_("60"); wxString value=m_textCtrl15->GetValue(); value.ToLong(&iVal); if (iVal>60) { //val=value.insert(2,1,','); wxMessageBox(_("Warning, longitude seconds can not exeed 60°"),_("Error")); m_textCtrl15->SetValue(val); } } void MainDialog::OnTextUTChrs( wxCommandEvent& event ) { long iVal = 0; wxString val=_("0"); wxString value=m_textCtrl111->GetValue(); value.ToLong(&iVal); if (iVal>24) { wxMessageBox(_("Warning, hours may not be more then 24"),_("Error")); m_textCtrl111->SetValue(val); } } void MainDialog::OnTextUTCmin( wxCommandEvent& event ) { long iVal = 0; wxString val=_("0"); wxString value=m_textCtrl112->GetValue(); value.ToLong(&iVal); if (iVal>60) { wxMessageBox(_("Warning, minutes may not be more then 60"),_("Error")); m_textCtrl112->SetValue(val); } } void MainDialog::OnTextUTCsecs( wxCommandEvent& event ) { long iVal = 0; wxString val=_("0"); wxString value=m_textCtrl113->GetValue(); value.ToLong(&iVal); if (iVal>60) { wxMessageBox(_("Warning, seconds may not be more then 60"),_("Error")); m_textCtrl113->SetValue(val); } } void MainDialog::OnTextLTHrs( wxCommandEvent& event ) { long iVal = 0; wxString val=_("0"); wxString value=m_textCtrl1111->GetValue(); value.ToLong(&iVal); if (iVal>24) { wxMessageBox(_("Warning, hours may not be more then 24"),_("Error")); m_textCtrl1111->SetValue(val); } } void MainDialog::OnTextLTmins( wxCommandEvent& event ) { long iVal = 0; wxString val=_("0"); wxString value=m_textCtrl1112->GetValue(); value.ToLong(&iVal); if (iVal>60) { wxMessageBox(_("Warning, minutes may not be more then 60"),_("Error")); m_textCtrl1112->SetValue(val); } } void MainDialog::OnTextLTsecs( wxCommandEvent& event ) { long iVal = 0; wxString val=_("0"); wxString value=m_textCtrl1113->GetValue(); value.ToLong(&iVal); if (iVal>60) { wxMessageBox(_("Warning, seconds may not be more then 60"),_("Error")); m_textCtrl1113->SetValue(val); } } void MainDialog::OnEyeHt( wxFocusEvent& event ) { HCorrection * hcorr; double Deg,min,sec; Deg = 0; min = 0; sec = 0; double dAltitude,dObsAlt,rAlt,dAltDiff; wxString strAltDeg = m_textCtrl241->GetValue(); strAltDeg.ToDouble(&Deg); wxString strAltMin = m_textCtrl244->GetValue(); strAltMin.ToDouble(&min); wxString strAltSec = m_textCtrl243->GetValue(); strAltSec.ToDouble(&sec); dAltitude = Deg + (min + sec / 60)/60; dObsAlt = dAltitude - indxerr / 60; parlax = plan_prlx(P_distance,dObsAlt); rAlt = 0; wxString strRAlt = m_textCtrl245->GetValue(); strRAlt.ToDouble(&rAlt); // if(bSun == false||bMoon ==false||bStar == false || bPlanet == false) dTrueAlt = hcorr->stars_corr(rAlt,dObsAlt); int iplan = m_comboBox31->GetSelection(); switch (iplan) { case 0: bSun = true; bMoon =false; bStar = false; bPlanet = false; break; case 1: bSun = false; bMoon =true; bStar = false; bPlanet = false; break; case 2: bSun = false; bMoon =false; bStar = false; bPlanet = true; break; case 3: bSun = false; bMoon =false; bStar = false; bPlanet = true; break; case 4: bSun = false; bMoon =false; bStar = false; bPlanet = true; break; case 5: bSun = false; bMoon =false; bStar = false; bPlanet = true; break; default: bSun = false; bMoon =false; bStar = true; bPlanet = false; break; } if(bSun){ dTrueAlt = hcorr->sun_corr(rAlt,dObsAlt,iMonth,bUpperLimb); } if(bMoon){ dTrueAlt = hcorr->moon_corr(rAlt,parlax,dObsAlt,bUpperLimb); // bMoon = false; } if(bStar){ dTrueAlt = hcorr->stars_corr(rAlt,dObsAlt); parlax = 0; // bStar = false; } if(bPlanet){ dTrueAlt = hcorr->plan_corr(rAlt,dObsAlt,parlax); // bPlanet = false; } int deg;// mn, sc; deg = floor(dTrueAlt); double res = (dTrueAlt - deg) * 60; dAltDiff = (dTrueAlt - altitude) * 60; ///differenza di altitudine wxString strdiff = wxString::Format(_("%2.1f"),dAltDiff); m_textCtrl246->SetValue(strdiff); wxString str = wxString::Format(_("%d° %2.1f"),deg,res); m_textCtrl247->SetValue(str); } void MainDialog::OnAzOut(wxFocusEvent& event) { UnKnownStar unknown; Sun mysun; double SDT, azmt, alt; wxString starname; GetData(); /////////////////azimuth/////////////////// azmt = 0; wxString strAz = m_textCtrl242->GetValue(); strAz.ToDouble(&azmt); azimuth = azmt; //////////////////altitude//////////////////// alt = dTrueAlt; ///////////////////SIderal time//////////////////////////// mysun.GHAAries(iYear,iMonth,iDay,iHour,iMinute,iSeconds); SDT = mysun.Ts; /////////////////////trovo nome/////////////////////////////////// starname = unknown.calc_bounds(alt,azmt,SDT,latitude); m_textCtrl24211->SetValue(starname); } void MainDialog::OnLocal( wxCommandEvent& event ) { SetTextOnLTime(); } void MainDialog::OnUTC( wxCommandEvent& event ) { GetUTCfromLocal(); } void MainDialog::OnComboPlan(wxCommandEvent& event) { isPlanet = true; isStar = false; m_comboBox3->SetValue(_("")); } void MainDialog::OnComboStar(wxCommandEvent& event) { isStar = true; isPlanet = false; m_comboBox31->SetValue(_("")); } ////////////////////////////////////SCELTA DEGLI ASTRI/////////////////////////////////////////////////////////// void MainDialog::OnStarChoice() { Sun sun; wxString str= m_comboBox3->GetStringSelection();//recupero nome della stella GetData(); bStar = true; Stars star; sun.GHAAries(iYear,iMonth,iDay,iHour,iMinute,iSeconds); Ts = sun.Ts; wxString strSign; int a=star.stars.GetCount(); t = (iHour+(iMinute + (iSeconds/ 60.00)) / 60.00) * 15; loctime = t + longitude; date = wxString::Format(_("%2.0f - %2.0f - %2.0f"),iDay,iMonth,iYear); jul = wxString::Format(_("%lf"),sun.jd); for(int b=0;bGetValue(); wxString strMin=m_textCtrl12->GetValue(); wxString strSec=m_textCtrl1->GetValue(); wxString strDeglon=m_textCtrl13->GetValue(); wxString strMinlon=m_textCtrl14->GetValue(); wxString strSeclon=m_textCtrl15->GetValue(); strDeg.ToLong(°); strMin.ToLong(&min); strSec.ToLong(&sec); strDeglon.ToLong(°lon); strMinlon.ToLong(&minlon); strSeclon.ToLong(&seclon); latitude = deg+(min+(sec/60.0000))/60.0000; longitude = deglon+(minlon+(seclon/60.0000))/60.0000; if(m_choice1->GetSelection()==1) latitude= -latitude; else latitude= +latitude; if(m_choice11->GetSelection()==1) longitude= -longitude; else longitude= +longitude; ////////////////////////fatto latitudine longitudine///////////////////////////////////////// //////////////////////tempo tm e local///////////////////////////// ///calcolo la data e l'ora utc wxString strYear=m_choice6->GetStringSelection(); strYear.ToDouble(&iYear); iMonth=m_choice5->GetSelection()+1; wxString strDay=m_choice4->GetStringSelection(); strDay.ToDouble(&iDay); wxString strHour=m_textCtrl111->GetValue(); strHour.ToDouble(&iHour); wxString strMinute=m_textCtrl112->GetValue(); strMinute.ToDouble(&iMinute); wxString strSeconds=m_textCtrl113->GetValue(); strSeconds.ToDouble(&iSeconds); } void MainDialog::OnPlanetChoice() { int e; wxString str= m_comboBox31->GetStringSelection();//recupero nome dell'oggetto sistema solare GetData(); Sun mysun; Stars star; int iChoice = m_comboBox31->GetSelection(); mysun.GHAAries(iYear,iMonth,iDay,iHour,iMinute,iSeconds); t = (iHour+(iMinute + (iSeconds/ 60.00)) / 60.00) * 15; loctime = t + longitude; date = wxString::Format(_("%2.0f - %2.0f - %2.0f"),iDay,iMonth,iYear); jul = wxString::Format(_("%lf"),mysun.jd); if(iChoice==0) { bSun = true; declination = mysun.declination; Tm = mysun.GHAsun; Tm = fmod(Tm,360); LHA = Tm + longitude; LHA = fmod(LHA,360); Ts = mysun.Ts; RA = mysun.RA; lamda = mysun.lamda; beta = mysun.beta; parlax = mysun.prlx; bodyname = _("Sun"); constell = mysun.stConst; smdiam = 0; } if(iChoice==1) { bMoon = true; planet.tlat = latitude; planet.tlong = longitude; planet.objnum = 0; e = planet.mainPlanet(iYear,iMonth,iDay,iHour,iMinute,iSeconds); Ts = mysun.Ts; RA = planet.RA; Tm = Ts + planet.RA; Tm = fmod(Tm,360); LHA = Tm + longitude; LHA = fmod(LHA,360); lamda = planet.mlong; beta = planet.mlat; parlax = planet.prlx; smdiam = planet.sdiam; declination = planet.Dec; bodyname = _("Moon"); constell = wxString::FromAscii(planet.constellation); } if(iChoice==2) { bPlanet = true; planet.objnum = 1; e = planet.mainPlanet(iYear,iMonth,iDay,iHour,iMinute,iSeconds); Ts = mysun.Ts; RA = planet.RA; Tm = Ts + planet.RA; Tm = fmod(Tm,360); declination = planet.Dec; LHA = Tm + longitude; LHA = fmod(LHA,360); lamda = planet.plong; beta = planet.plat; parlax = 0; smdiam = 0; P_distance = planet.planet_distance; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); } if(iChoice==3) { bPlanet = true; planet.objnum = 2; e = planet.mainPlanet(iYear,iMonth,iDay,iHour,iMinute,iSeconds); Ts = mysun.Ts; RA = planet.RA; Tm = Ts + planet.RA; Tm = fmod(Tm,360); declination = planet.Dec; LHA = Tm + longitude; LHA = fmod(LHA,360); lamda = planet.plong; beta = planet.plat; parlax = 0; smdiam = 0; P_distance = planet.planet_distance; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); } if(iChoice==4) { bStar = true; planet.objnum = 3; e = planet.mainPlanet(iYear,iMonth,iDay,iHour,iMinute,iSeconds); Ts = mysun.Ts; RA = planet.RA; Tm = Ts + planet.RA; Tm = fmod(Tm,360); declination = planet.Dec; LHA = Tm + longitude; LHA = fmod(LHA,360); lamda = planet.plong; parlax = 0; smdiam = 0; beta = planet.plat; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); } if(iChoice==5) { bStar = true; planet.objnum = 4; e = planet.mainPlanet(iYear,iMonth,iDay,iHour,iMinute,iSeconds); Ts = mysun.Ts; RA = planet.RA; Tm = Ts + planet.RA; Tm = fmod(Tm,360); declination = planet.Dec; LHA = Tm + longitude; LHA = fmod(LHA,360); lamda = planet.plong; beta = planet.plat; parlax = 0; smdiam = 0; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); } if(iChoice>5) { return; } } void MainDialog::OnCalcHeitht( wxCommandEvent& event ) { CalcAltitude(); } void MainDialog::CalcAltitude() { double Height; if(isPlanet) OnPlanetChoice(); if(isStar) OnStarChoice(); /////////////////////////prova altezza quadratica//////////////////////////////// double x = cosd(LHA) * cosd(declination); double y = sind(LHA) * cosd(declination); double z = sind(declination); double xhor = x * sind(latitude) - z * cosd(latitude); double yhor = y; double zhor = x * cosd(latitude) + z * sind(latitude); azimuth = atan2d( yhor, xhor ) + 180; Height = atan2d( zhor, sqrt(xhor*xhor+yhor*yhor) ); altitude = Height; wxString strS; if(Height>0) strS=_("+ "); if(Height<0) strS=_("- "); wxString str=FormatDegrees(Height); wxString strHeight=strS+str; m_textCtrl24->SetValue(strHeight); m_textCtrl242->SetValue(FormatDegrees(azimuth)); } void MainDialog::OnTextEnter( wxFocusEvent& event ) //index error { //char s[4]; //char * res, * st; double val,rest; val = 0; rest = 0; wxString str = m_textCtrl2421->GetValue(); str.ToDouble(&val); indxerr = val; const wxChar * pth = _(""); wxFile file; pth = filepath.c_str(); if(!file.Open(pth,wxFile::read_write)) wxMessageBox(wxString::Format( _("Can't find file %s\n"), _("inderr") )); else{ file.Write(wxString::Format(wxT("%2.1f\n"),indxerr)); file.Close(); } } void MainDialog::OnFocusOut( wxFocusEvent& event )////// { wxString str = m_textCtrl241->GetValue(); double val = 0; str.ToDouble(&val); if(val>90) { str =_("0"); wxMessageBox(_("Attention, altitude degrees can't exceede 90°"),_("Error")); m_textCtrl241->SetValue(str); } } void MainDialog::OnAltMin( wxFocusEvent& event )//////altitude minute { wxString str = m_textCtrl244->GetValue(); //wxChar ch =','; double val,rest; val = 0; rest = 0; int integer; str.ToDouble(&val); int len = str.length(); if(len == 2 &&val>60) { str =_("60"); wxMessageBox(_("Attention, altitude minutes can't exceede 60°"),_("Error")); m_textCtrl244->SetValue(str); } if(len == 3&& val > 100) { val = val / 10; integer = floor(val); if(integer > 60) { str= _("60"); wxMessageBox(_("Attention, altitude minutes can't exceede 60°"),_("Error")); m_textCtrl244->SetValue(str); } else { rest = val - integer; str = wxString::Format(_("%d'"),integer); m_textCtrl244->SetValue(str); rest = rest * 60; rest = floor(rest); m_textCtrl243->SetValue(wxString::Format(_("%f"),rest)); } } } void MainDialog::OnAltSec( wxFocusEvent& event ) { wxString str = m_textCtrl243->GetValue(); long val = 0; str.ToLong(&val); if(val>60) { str= _("60"); wxMessageBox(_("Attention, altitude seconds can't exceede 60°"),_("Error")); m_textCtrl243->SetValue(str); } } void MainDialog::OnCharDiff( wxKeyEvent& event ) { formatNum(event); } void MainDialog::OnCharAlt( wxKeyEvent& event ) { formatOnlyNum(event); } void MainDialog::OnCharAltMin( wxKeyEvent& event )//altitude minutes { formatNum(event); } void MainDialog::OnCharAltSec( wxKeyEvent& event ) { formatOnlyNum(event); } void MainDialog::OnCharEHt( wxKeyEvent& event )//eye height { formatNum(event); } void MainDialog::OnTextAlt( wxCommandEvent& event ) { } void MainDialog::OnInfo( wxCommandEvent& event ) { info(); } void MainDialog::info() { InfoDlg dlg(this); dlg.decl = declination; dlg.RA = RA; dlg.CoRect = CoArect; dlg.GHAa = Ts; dlg.body = bodyname; dlg.date = date; dlg.t = t; dlg.jul = jul; dlg.loctime = loctime; dlg.lon = lamda; dlg.lat = beta; dlg.GHA = Tm; dlg.LHA = LHA; dlg.parlax = parlax; dlg.alt = altitude; dlg.azth = azimuth; dlg.sConst = constell; dlg.sdiam = smdiam; dlg.ShowModal(); } void MainDialog::OnSave(wxCommandEvent& event) { save(); } void MainDialog::save() { double az,incpt,lat,lon; az = azimuth; lat = latitude; lon = longitude; wxString strInt = m_textCtrl246->GetValue(); strInt.ToDouble(&incpt); const wxChar * pth = _(""); wxFile file; pth = filepath.c_str(); if(!file.Open(pth,wxFile::write_append)) wxMessageBox(wxString::Format( _("Can't find file %s\n"), _("inderr") )); else{ file.Write(wxString::Format(wxT("%2.1f %2.1f %2.5f %2.5f\n"),az,incpt,lat,lon)); file.Close(); } } void MainDialog::OnCalcPos( wxCommandEvent& event ) { calc_pos(); } void MainDialog::calc_pos() { Pos_Dialog dlg(this); dlg.stpath = filepath; dlg.ShowModal(); truelat = dlg.latitud; truelong = dlg.longitud; wxString signlat,signlong; if(truelat < 0) signlat = _("S "); else signlat =_("N "); if(truelong < 0) signlong = _("W "); else signlong =_("E "); wxString strlat = FormatDegrees(truelat); wxString strlon = FormatDegrees(truelong); strlat = signlat + strlat; strlon = signlong + strlon; m_textCtrl2422->SetValue(strlat); m_textCtrl24221->SetValue(strlon); } void MainDialog::OnCancLines(wxCommandEvent& event) { CancLines(); } void MainDialog::CancLines() { wxString str = wxString::Format(wxT("%2.1f\n"),indxerr); wxFile file; const wxChar * pth; pth = filepath.c_str(); file.Open(pth,wxFile::write); if (file.IsOpened()) { file.Write(str); } else wxMessageBox(wxT("file couldn't be opened"),wxT("Error")); file.Close(); } void MainDialog::OnMeridian(wxCommandEvent& event) { CalcMeridian(); } void MainDialog::CalcMeridian() { wxString signlat; wxString strlat ; double Zdistance = 90 - dTrueAlt; double Pdistance = 90 - declination; if(azimuth > 179 && azimuth < 181) { truelat = Zdistance + declination; if(truelat < 0) signlat = _("S "); else signlat =_("N "); strlat = FormatDegrees(truelat); strlat = signlat + strlat; m_textCtrl2422->SetValue(strlat); } if((azimuth > 359 && azimuth < 360) || (azimuth > 0 && azimuth < 1)) { if(dTrueAlt <= latitude) { if(declination < 0) { declination = fabs(declination); signlat = _("S "); } else signlat =_("N "); truelat = dTrueAlt + Pdistance; goto out; } Zdistance = -Zdistance; truelat = Zdistance + declination; if(truelat < 0) signlat = _("S "); else signlat =_("N "); out: strlat = FormatDegrees(truelat); strlat = signlat + strlat; m_textCtrl2422->SetValue(strlat); } else if((azimuth > 1 && azimuth < 179) || (azimuth > 181 && azimuth < 359)) wxMessageBox(_("No meridian passage"),_("Error")); } void MainDialog::OnCharHook(wxKeyEvent& event) { //wxWindow * ctrlWin; wxWindow *win = FindFocus (); if (win == NULL) { event.Skip (); return; } int ikey = event.GetKeyCode(); int id = win->GetId(); bool backward = event.ShiftDown (); if (event.GetKeyCode () == WXK_TAB) { //wxMessageBox(wxString::Format(wxT("You pressed TAB on win %d and code %d"),id, ikey)); if (backward){ if(id>=7) FindWindow(id - 1)->SetFocus(); } else{ if(id<=47) FindWindow (id + 1)->SetFocus (); } return; } event.Skip (); } ////////////////////////////////////////////CALSS INFO DLG////////////////////////////////////////////////////// InfoDlg::InfoDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : Info_Dlg( parent, id, title, pos, size, style ) { decl = 0; RA = 0; CoRect = 0; GHAa = 0; body = _(""); date = _(""); t = 0; jul = _(""); loctime = 0; lon = 0; lat = 0; GHA = 0; LHA = 0; parlax = 0; alt = 0; azth = 0; sConst = _(""); sdiam = 0; } void InfoDlg::OnPaintDlgInfo( wxPaintEvent& event ) { wxPaintDC dc(this); m_staticText1->SetLabel(body); m_staticText2->SetLabel(date); wxString strtime = hrms(t); m_staticText3->SetLabel(strtime); wxString strltime = hrms(loctime); m_staticText4->SetLabel(strltime); m_staticText5->SetLabel(jul); wxString strTs = dms(GHAa); m_staticText6->SetLabel(strTs); wxString strRA = dms(RA); m_staticText7->SetLabel(strRA); wxString strDecl = FormatDegrees(decl); m_staticText8->SetLabel(strDecl); wxString strLamda = dms(lon); m_staticText9->SetLabel(strLamda); wxString strBeta = FormatDegrees(lat); m_staticText10->SetLabel(strBeta); wxString strGHA = dms(GHA); m_staticText11->SetLabel(strGHA); wxString strLHA = dms(LHA); m_staticText12->SetLabel(strLHA); wxString strDiam =dms(sdiam); m_staticText13->SetLabel(strDiam); wxString strPrlx = dms(parlax); m_staticText14->SetLabel(strPrlx); wxString strAlt =FormatDegs(alt); m_staticText15->SetLabel(strAlt); int azt = floor(azth); wxString strAz = wxString::Format(_("%03d°"),azt); m_staticText16->SetLabel(strAz); m_staticText17->SetLabel(sConst); } wxString InfoDlg::FormatDegrees(float Degrees) { wxString strSign,result,res; if (Degrees<0){ strSign = _("S"); Degrees = (-1 * Degrees); } else strSign = _("N"); int integral =floor(Degrees); float rest = Degrees-integral; rest=rest*60; result=wxString::Format(_(" %02d° %0.2f'"),integral,rest); res = strSign + result; return res; } wxString InfoDlg::hrms(double x) { int h, m; long sint, sfrac; double s; s = x / 15; if( s < 0.0 ) s += 24.0; h = (int) s; s -= h; s *= 60; m = (int) s; s -= m; s *= 60; /* Handle shillings and pence roundoff. */ sfrac = (long) (1000.0 * s + 0.5); if( sfrac >= 60000L ) { sfrac -= 60000L; m += 1; if( m >= 60 ) { m -= 60; h += 1; } } sint = sfrac / 1000; sfrac -= sint * 1000; wxString result = wxString::Format(_( "%02dh %02dm %02ld.%03lds "), h, m, sint, sfrac ); return result; } wxString InfoDlg::dms(double x) { double s; int d, m; s = x ; if( s < 0.0 ) { s = -s; } d = (int) s; s -= d; s *= 60; //m = (int) s; //s -= m; //s *= 60; wxString str = wxString::Format(_( "%02d° %02.2f' "), d, s ); return str; } wxString InfoDlg::FormatDegs(float Degrees) { wxString strSign,result,res; if (Degrees<0){ strSign = _("-"); Degrees=-Degrees; } else strSign = _(""); int integral =floor(Degrees); float rest = Degrees-integral; rest=rest*60; res = wxString::Format(_("%d° %02.1f"),integral,rest); result = strSign + res; return result; } //////////////////////////////////FUNZIONI OWNER////////////////////////////////////// int MainDialog::GetMonthfromString(int iMon) { } void MainDialog::SendMessage() { wxString ts ,coast,dec,messg,strSign,tm; if(declination<0) strSign=_("dec = S "); else strSign=_("dec = N "); coast=FormatDegrees(CoArect); dec=FormatDegrees(declination); ts=FormatDegrees(Ts); tm=FormatDegrees(Tm); wxMessageBox(_("Ts = ")+ts+_(" ascn_rect = ")+coast+strSign+dec+_(" Tm = ")+tm); } bool MainDialog::isNumber(int num) { bool IsNum=false; if (num=='1'||num=='2'||num=='3'||num=='4'||num=='5'||num=='6'||num=='7'||num=='8'||num=='9'||num=='0'||num==','||num== WXK_BACK|| num==WXK_DELETE||num==WXK_TAB|| num == '-'|| num == '+') IsNum=true; else IsNum=false; return IsNum; } bool MainDialog::isOnlyNumber(int num) { bool IsNum=false; if (num=='1'||num=='2'||num=='3'||num=='4'||num=='5'||num=='6'||num=='7'||num=='8'||num=='9'||num=='0'||num== WXK_BACK|| num==WXK_DELETE||num==WXK_TAB) IsNum=true; else IsNum=false; return IsNum; } void MainDialog::formatNum(wxKeyEvent& evt) { wxString str; if(isNumber(evt.GetKeyCode())==true) { evt.Skip(); } else { wxBell(); } } void MainDialog::formatOnlyNum(wxKeyEvent& evt) { wxString str; if(isOnlyNumber(evt.GetKeyCode())==true) { evt.Skip(); } else { wxBell(); } } void MainDialog::SetTextOnLTime() { ihourval=0; iminval=0; isecval=0; wxString strHrs=m_textCtrl111->GetValue(); wxString strmin=m_textCtrl112->GetValue(); wxString strsecs=m_textCtrl113->GetValue(); wxString strDeg=m_textCtrl13->GetValue(); wxString strMin=m_textCtrl14->GetValue(); wxString strScnd=m_textCtrl15->GetValue(); long a,b,c,al,bl,cl; a = 0; b = 0; c = 0; al = 0; bl = 0; cl = 0; strHrs.ToLong(&a); strmin.ToLong(&b); strsecs.ToLong(&c); strDeg.ToLong(&al); strMin.ToLong(&bl); strScnd.ToLong(&cl); int ilseconds_lon,iseconds_UTC; ilseconds_lon=(al*240)+(bl*4)+(cl/15);//secondi di longitune in tempo iseconds_UTC=(a*3600)+(b*60)+c;//tempo in secondi if(m_choice11->GetSelection()==0) { isecval=ilseconds_lon+iseconds_UTC; if(isecval<0) isecval=-1*isecval; iminval=isecval/60; isecval=isecval%60; ihourval=iminval/60; iminval=iminval%60; ihourval=ihourval%24; } else { isecval=ilseconds_lon-iseconds_UTC; if(isecval<0) isecval=-1*isecval; iminval=isecval/60; isecval=isecval%60; ihourval=iminval/60; iminval=iminval%60; ihourval=ihourval%24; } m_textCtrl1111->SetValue(wxString::Format(_("%d"),ihourval)); m_textCtrl1112->SetValue(wxString::Format(_("%d"),iminval)); m_textCtrl1113->SetValue(wxString::Format(_("%d"),isecval)); } void MainDialog::GetUTCfromLocal() { ihourval=0; iminval=0; isecval=0; wxString strHrs=m_textCtrl1111->GetValue(); wxString strmin=m_textCtrl1112->GetValue(); wxString strsecs=m_textCtrl1113->GetValue(); wxString strDeg=m_textCtrl13->GetValue(); wxString strMin=m_textCtrl14->GetValue(); wxString strScnd=m_textCtrl15->GetValue(); long a,b,c,al,bl,cl; a = 0; b = 0; c = 0; al = 0; bl = 0; cl = 0; strHrs.ToLong(&a); strmin.ToLong(&b); strsecs.ToLong(&c); strDeg.ToLong(&al); strMin.ToLong(&bl); strScnd.ToLong(&cl); int ilseconds_lon,iseconds_UTC; ilseconds_lon=(al*240)+(bl*4)+(cl/15);//secondi di longitune in tempo iseconds_UTC=(a*3600)+(b*60)+c;//tempo in secondi if(m_choice11->GetSelection()==0) { isecval=ilseconds_lon-iseconds_UTC; if(isecval<0) isecval=-1*isecval; iminval=isecval/60; isecval=isecval%60; ihourval=iminval/60; iminval=iminval%60; ihourval=ihourval%24; } else { isecval=ilseconds_lon+iseconds_UTC; if(isecval<0) isecval=-1*isecval; iminval=isecval/60; isecval=isecval%60; ihourval=iminval/60; iminval=iminval%60; ihourval=ihourval%24; } m_textCtrl111->SetValue(wxString::Format(_("%d"),ihourval)); m_textCtrl112->SetValue(wxString::Format(_("%d"),iminval)); m_textCtrl113->SetValue(wxString::Format(_("%d"),isecval)); } wxString MainDialog::FormatDegrees(float Degrees) { wxString strSign; if (Degrees<0) Degrees=-Degrees; int integral =floor(Degrees); float rest = Degrees-integral; rest=rest*60; wxString result=wxString::Format(_("%d° %02.1f"),integral,rest); return result; } double MainDialog::plan_prlx(double distance, double alt) { double parallax = 0.157 / P_distance; parallax = parallax * cosd(alt); return parallax; } /////////////////////////////////FUNZIONI MENU//////////////////////////////////// void MainDialog::OnMenuSave(wxCommandEvent& event) { save(); } void MainDialog::OnMenuCancel(wxCommandEvent& event) { CancLines(); } void MainDialog::OnMenuAlt(wxCommandEvent& event) { CalcAltitude(); } void MainDialog::OnMenuMeridian(wxCommandEvent& event) { CalcMeridian(); } void MainDialog::OnMenuPlot(wxCommandEvent& event) { calc_pos(); } void MainDialog::OnMenuInfo(wxCommandEvent& event) { info(); } void MainDialog::OnMenuAbout(wxCommandEvent& event) { AboutDialog dlg(this); dlg.ShowModal(); } void MainDialog::OnPlot(wxCommandEvent& event) { GetData(); Plot_dialog dlg(this); dlg.dDay = iDay; dlg.dHour = iHour; dlg.dMinute = iMinute; dlg.dSeconds = iSeconds; dlg.dYear = iYear; dlg.dMonth = iMonth; dlg.latitud = latitude; dlg.longitud = longitude; dlg.ShowModal(); } /////////////////////////////////FUNZIONI DI CHIUSURA///////////ATAG///////////////////////// MainDialog::~MainDialog() { m_comboBox31->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialog::OnComboPlan ), NULL, this ); m_comboBox3->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialog::OnComboStar ), NULL, this ); dTrueAlt = 0; } void MainDialog::OnCloseDialog(wxCloseEvent& event) { wxString str = wxString::Format(wxT("%2.1f\n"),indxerr); wxFile file; const wxChar * pth; pth = filepath.c_str(); file.Open(pth,wxFile::write); if (file.IsOpened()) { file.Write(str); } else wxMessageBox(wxT("file couldn't be opened"),wxT("Error")); file.Close(); Destroy(); } nautic-1.5/src/plot_dialog.cpp0000644000175000017500000005336511747727160016342 0ustar moellermoeller/* Plot_dialog.cpp implementation of plotting dialog Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "plot_dialog.h" //IMPLEMENT_DYNAMIC_CLASS( Plot_dialog,wxDialog ) #define AZIMUTH_SPAN 4 #define RADEG (180.0/PI) #define DEGRAD (PI/180.0) #define sind(x) sin((x)*DEGRAD) #define cosd(x) cos((x)*DEGRAD) #define tand(x) tan((x)*DEGRAD) #define asind(x) (RADEG*asin(x)) #define acosd(x) (RADEG*acos(x)) #define atand(x) (RADEG*atan(x)) #define atan2d(y,x) (RADEG*atan2((y),(x))) Plot_dialog::Plot_dialog() { } Plot_dialog::Plot_dialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer( wxVERTICAL ); wxColour colour(0,200,255); this->SetBackgroundColour(colour); this->SetSizer( bSizer2 ); this->Layout(); this->Centre( wxBOTH ); centre_toppoint.x = 375; centre_toppoint.y = 10; north_toppoint = centre_toppoint; //////////////////cursors///////////////////////////////////// #ifdef __WXMSW__ wxBitmap open_bitmap(open_hand_bits, 32, 32); wxBitmap open_mask_bitmap(open_hand_mask, 32, 32); wxBitmap close_bitmap(close_hand_bits, 32, 32); wxBitmap close_mask_bitmap(close_hand_mask, 32, 32); open_bitmap.SetMask(new wxMask(open_mask_bitmap)); close_bitmap.SetMask(new wxMask(close_mask_bitmap)); wxImage open_hand_image = open_bitmap.ConvertToImage(); open_hand_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 6); open_hand_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 14); wxImage close_hand_image = close_bitmap.ConvertToImage(); close_hand_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 6); close_hand_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 14); open_cursor = wxCursor(open_hand_image); close_cursor = wxCursor(close_hand_image); #else open_cursor = wxCursor(open_hand_bits, 32, 32, 6, 14, open_hand_mask,wxBLACK, wxWHITE); close_cursor = wxCursor(close_hand_bits, 32, 32, 6, 14, close_hand_mask,wxBLACK, wxWHITE); #endif // Connect Events this->Connect( wxEVT_PAINT, wxPaintEventHandler( Plot_dialog::OnPaint ) ); this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( Plot_dialog::OnLeftMouseClick ) ); this->Connect( wxEVT_MOTION, wxMouseEventHandler(Plot_dialog::OnMotion ) ); this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( Plot_dialog::OnLeftMouseUp ) ); } wxPoint Plot_dialog::Calc_draw_coordinate(double azimuth, double alt) { wxPoint point; if(azimuth <= 90) point.x = east_toppoint.x - ((90 - azimuth)* AZIMUTH_SPAN ) -10; if(azimuth > 90 && azimuth < 145) point.x = east_toppoint.x + ((azimuth - 90)* AZIMUTH_SPAN ) -10; if(azimuth >=145 && azimuth <= 180) point.x = south_toppoint.x - ((180 - azimuth)* AZIMUTH_SPAN) -10; if(azimuth > 180 && azimuth <= 225) point.x = south_toppoint.x + ((azimuth - 180)* AZIMUTH_SPAN) -10; if(azimuth > 225 && azimuth <= 270) point.x = west_toppoint.x - ((270 - azimuth)* AZIMUTH_SPAN) -10; if(azimuth > 270 && west_toppoint.x < 1080) point.x = west_toppoint.x + ((azimuth - 270) * AZIMUTH_SPAN) -10; if(azimuth > 270 && west_toppoint.x > 1080) point.x = north_toppoint.x - ((360 -azimuth) * AZIMUTH_SPAN) -10; point.y = north_bottompoint.y - (altitude * AZIMUTH_SPAN) -10; return point; } void Plot_dialog::OnPaint(wxPaintEvent& event) { Stars star; ////////////points coordinates//////////////////////////////////////////// int x = north_toppoint.x; wxPoint centre_point(375,400); wxPoint sun_point; wxPoint planet_point; wxPoint star_point; wxPoint moon_point; wxString name; /////////////////////calculating the coordinates of the dc for rotation/////////////////////////////// east_toppoint.x = north_toppoint.x + (90 *AZIMUTH_SPAN); if(x > 745) east_toppoint.x = north_toppoint.x - (270 *AZIMUTH_SPAN); if(x > -710 && x < 28) south_toppoint.x = north_toppoint.x + (180 *AZIMUTH_SPAN); if(x < 745 && x >= 29) south_toppoint.x = north_toppoint.x - (180 *AZIMUTH_SPAN); if(x > 745) south_toppoint.x = north_toppoint.x - (180 *AZIMUTH_SPAN); if(x < 370) west_toppoint.x = north_toppoint.x + (270 *AZIMUTH_SPAN); if(x > 370) west_toppoint.x = north_toppoint.x - (90 *AZIMUTH_SPAN); north_bottompoint.x = north_toppoint.x; north_bottompoint.y = north_toppoint.y + 355; east_toppoint.y = north_toppoint.y; east_bottompoint.x = east_toppoint.x; east_bottompoint.y = east_toppoint.y + 355; south_toppoint.y = north_toppoint.y; south_bottompoint.x = south_toppoint.x ; south_bottompoint.y = south_toppoint.y + 355; west_toppoint.y = north_toppoint.y; west_bottompoint.x = west_toppoint.x ; west_bottompoint.y = west_toppoint.y + 355; wxPaintDC dc( this ); PrepareDC( dc ); wxPen oldpen = dc.GetPen(); wxPen pen(*wxBLUE,1,wxLONG_DASH); wxPen pen_blue(*wxBLUE,1,wxLONG_DASH); wxColour colour(155,67,15); wxColour night_col(20,20,20); wxColour twilight(123,122,224); int a=star.stars.GetCount(); Calc_sun_data(&azth,&altitude,&sun_gha); sun_alt = altitude; sun_point = Calc_draw_coordinate(azth, altitude); Draw_sun(&dc,sun_point,sun_alt);//draw sun Calc_moon_data(&azth,&altitude, &moon_tm); moon_point = Calc_draw_coordinate(azth, altitude); moon_alt = altitude; Draw_moon(&dc,moon_point,moon_alt,moon_tm);//draw moon ///////////////changing the background colour///////////////////////////////////// if(sun_alt < -15) this->SetBackgroundColour(night_col); if(sun_alt > -15 && sun_alt < 0) this->SetBackgroundColour(twilight); if(sun_alt < 0) { Calc_planet_data(&azth,&altitude, 0,&name); ////planets planet_point = Calc_draw_coordinate(azth, altitude); Draw_planet(&dc,planet_point,altitude,name); Calc_planet_data(&azth,&altitude, 1,&name); planet_point = Calc_draw_coordinate(azth, altitude); Draw_planet(&dc,planet_point,altitude,name); Calc_planet_data(&azth,&altitude, 2,&name); planet_point = Calc_draw_coordinate(azth, altitude); Draw_planet(&dc,planet_point,altitude,name); Calc_planet_data(&azth,&altitude, 3,&name); planet_point = Calc_draw_coordinate(azth, altitude); Draw_planet(&dc,planet_point,altitude,name); for(int b=0;bGetSize(&width, &heigth); dc.DrawRectangle( 0, 360, width, heigth / 5 ); /////////////drawing the azimuth indicators for sun and moon////////////////////////////////////////// dc.SetPen(pen_blue); dc.DrawLine(sun_point.x + 10, sun_point.y + 20, sun_point.x + 10 , sun_point.y + (sun_alt * AZIMUTH_SPAN) + 30 ) ; dc.DrawLine(moon_point.x + 10, moon_point.y + 10, moon_point.x + 10 , moon_point.y + (moon_alt * AZIMUTH_SPAN) + 30 ) ; dc.SetPen(oldpen); ///////////////writing cardinal figures/////////////////////////////////////// north_bottompoint.x = north_bottompoint.x - 4; dc.DrawText(wxT("N"),north_bottompoint); east_bottompoint.x = east_bottompoint.x - 4; dc.DrawText(wxT("E"),east_bottompoint); south_bottompoint.x = south_bottompoint.x - 4; dc.DrawText(wxT("S"),south_bottompoint); west_bottompoint.x = west_bottompoint.x - 4; dc.DrawText(wxT("W"),west_bottompoint); ////////////////////compass drawing////////////////////////////// north_bottompoint.x = north_bottompoint.x + 4; wxPoint nor = north_bottompoint; Draw_compass(&dc,nor); } void Plot_dialog::OnLeftMouseClick(wxMouseEvent& event) { ///////////////set cursor////////////////////////// this->SetCursor(close_cursor); int a, b; event.GetPosition(&a,&b); point_from_centre_span = a - north_toppoint.x; } void Plot_dialog::OnMotion(wxMouseEvent& event) { this->SetCursor(open_cursor); int a,b; if(event.m_leftDown) { this->SetCursor(close_cursor); event.GetPosition(&a,&b); north_toppoint.x = a - point_from_centre_span; if(north_toppoint.x < -710) north_toppoint.x = north_toppoint.x + 1450; if(north_toppoint.x > 1440) north_toppoint.x = north_toppoint.x -1440; this->Refresh(); } } void Plot_dialog::OnLeftMouseUp(wxMouseEvent& event) { this->SetCursor(open_cursor); int a,b; event.GetPosition(&a,&b); } void Plot_dialog::Calc_sun_data(double * azimuth, double * alt, double * GHA) { Sun mysun; mysun.GHAAries(dYear,dMonth,dDay,dHour,dMinute,dSeconds); declination = mysun.declination; double Tm = mysun.GHAsun; Tm = fmod(Tm,360); LHA = Tm + longitud; LHA = fmod(LHA,360); Ts = mysun.Ts; RA = mysun.RA; lamda = mysun.lamda; beta = mysun.beta; parlax = mysun.prlx; bodyname = _("Sun"); constell = mysun.stConst; smdiam = 0; ///////////////////////calcolo azimuth e altezza///////////////////////////// double x = cosd(LHA) * cosd(declination); double y = sind(LHA) * cosd(declination); double z = sind(declination); double xhor = x * sind(latitud) - z * cosd(latitud); double yhor = y; double zhor = x * cosd(latitud) + z * sind(latitud); *azimuth = atan2d( yhor, xhor ) + 180; *alt = atan2d( zhor, sqrt(xhor*xhor+yhor*yhor) ); *GHA = Tm; sun_gha = Tm; } void Plot_dialog::Draw_sun(wxPaintDC * dc, wxPoint point, double altitude) { wxPen oldpen = dc->GetPen(); wxPen pen(*wxBLACK,1,wxSOLID); wxPen pen_blue(*wxBLUE,1,wxLONG_DASH); dc->SetPen(pen); wxColour light_yellow(238,238,88); wxColour yellow(243,243,13); wxColour red(247,39,1); wxBrush ly_brush(light_yellow); wxBrush y_brush(yellow); wxBrush r_brush(red); if(altitude <= 0) goto end; if(altitude > 0 && altitude < 10) dc->SetBrush(r_brush); if(altitude > 10 && altitude < 20) dc->SetBrush(y_brush); if(altitude > 20 ) dc->SetBrush(ly_brush); dc->DrawEllipse(point.x ,point.y,20,20); end: dc->SetPen(oldpen); } void Plot_dialog::Draw_moon(wxPaintDC * dc, wxPoint point, double altitude, double GHA) { wxBitmap full_btm(full_moon_bits, 32, 32); wxBitmap full_mask(full_moon_mask, 32, 32); full_btm.SetMask(new wxMask(full_mask)); wxBitmap moon_1(moon_1_bits, 32, 32); wxBitmap mask_1(moon_1_mask, 32, 32); moon_1.SetMask(new wxMask(mask_1)); wxBitmap moon_half(moon_half_bits, 32, 32); wxBitmap mask_half(moon_half_mask, 32, 32); moon_half.SetMask(new wxMask(mask_half)); wxBitmap moon_ebb(moon_ebb_bits, 32, 32); wxBitmap ebb_mask(moon_ebb_mask, 32, 32); moon_ebb.SetMask(new wxMask(ebb_mask)); wxBitmap moon_ebb_C(moon_ebb_C_bits, 32, 32); wxBitmap ebb_mask_C(moon_ebb_C_mask, 32, 32); moon_ebb_C.SetMask(new wxMask(ebb_mask_C)); wxBitmap moon_half_C(moon_half_C_bits, 32, 32); wxBitmap half_mask_C(moon_half_C_mask, 32, 32); moon_half_C.SetMask(new wxMask(half_mask_C)); wxBitmap moon_last(moon_last_bits, 32, 32); wxBitmap last_mask(moon_last_mask, 32, 32); moon_last.SetMask(new wxMask(last_mask)); wxBitmap moon_new(moon_new_bits, 32, 32); wxBitmap new_mask(moon_new_mask, 32, 32); moon_new.SetMask(new wxMask(new_mask)); /////////////////difference of GHA moon and sun///////////for elongation//////////// if(GHA < sun_gha) GHA = GHA + 360; int diff = GHA - sun_gha; if(diff > 360) diff = diff - 360; wxPen oldpen = dc->GetPen(); if(altitude <= 0) goto end; point.x = point.x - 5; point.y = point.y - 5; if(diff <= 22 || diff >= 337) /////new moon { dc->DrawBitmap(moon_new,point.x,point.y,true); } if(diff >23 && diff < 67) /////last slice of moon/// { dc->DrawBitmap(moon_last,point.x,point.y,true); } if(diff >=67 && diff < 112) /////half moon decreasing { dc->DrawBitmap(moon_half_C,point.x,point.y,true); } if(diff >=112 && diff < 157)////moon ebb decreasing { dc->DrawBitmap(moon_ebb_C,point.x,point.y,true); } if(diff >=157 && diff < 202)///////////full moon//// { dc->DrawBitmap(full_btm,point.x,point.y,true); } if(diff >=202 && diff < 247)///moon ebb increasing { dc->DrawBitmap(moon_ebb,point.x,point.y,true); } if(diff >=247 && diff < 292)///moon half increasing { dc->DrawBitmap(moon_half,point.x,point.y,true); } if(diff >=292 && diff < 337)////first slice of moon { dc->DrawBitmap(moon_1,point.x,point.y,true); } end: dc->SetPen(oldpen); } void Plot_dialog::Draw_planet(wxPaintDC * dc, wxPoint point, double altitude, wxString name) { wxFont oldfont(wxSystemSettings::GetFont(wxSYS_DEVICE_DEFAULT_FONT)); wxColour yellow(243,243,13); wxFont font(6,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL); wxPen oldpen; wxPen pen(*wxBLACK,1,wxSOLID); dc->SetPen(pen); wxBrush y_brush(yellow); dc->SetBrush(y_brush); if(altitude <= 0) goto end; dc->DrawEllipse(point.x ,point.y + 3,6,6); dc->SetTextForeground(*wxWHITE); dc->SetFont(font); ////////////names of planets//////////////////// dc->DrawText(name,point.x + 10, point.y + 1); pen.SetColour(*wxBLACK); dc->SetFont(oldfont); dc->SetTextForeground(*wxBLACK); end: dc->SetPen(oldpen); } void Plot_dialog::Draw_star(wxPaintDC*dc, wxPoint point, double altitude, wxString name) { wxFont oldfont(wxSystemSettings::GetFont(wxSYS_DEVICE_DEFAULT_FONT)); wxFont font(6,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL); wxPen oldpen; wxPen pen(*wxBLACK,1,wxSOLID); dc->SetPen(pen); wxBrush y_brush(*wxWHITE); dc->SetBrush(y_brush); if(altitude <= 0) goto end; dc->DrawEllipse(point.x ,point.y + 3,3,3); dc->SetTextForeground(*wxWHITE); dc->SetFont(font); ////////////////write names of stars/////////////////////// dc->DrawText(name,point.x + 10, point.y + 1); pen.SetColour(*wxBLACK); dc->SetFont(oldfont); dc->SetTextForeground(*wxBLACK); end: dc->SetPen(oldpen); } void Plot_dialog::Draw_compass(wxPaintDC * dc, wxPoint point) { /////////////draw the compass on the bottom of the dialog///////////////////// wxPoint pt = point; wxPoint px = point; wxString str, str_1; wxFont oldfont(wxSystemSettings::GetFont(wxSYS_DEVICE_DEFAULT_FONT)); wxFont font(6,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL); wxPen oldpen; wxPen pen(*wxBLACK,1,wxSOLID); dc->SetPen(pen); dc->SetFont(font); for(int a = 0; a < 360; a++) { pt = point; px = point; pt.x = pt.x + (a * AZIMUTH_SPAN); px.x = px.x - (a * AZIMUTH_SPAN ); if(a%10==0) { str = wxString::Format(wxT("%d"),a); str_1 = wxString::Format(wxT("%d"),360-a); dc->DrawLine(pt.x,pt.y + 14, pt.x, pt.y + 26); dc->DrawLine(px.x,px.y + 14, px.x, px.y + 26); if(a%90!=0 && a!=0){ dc->DrawText(str, pt.x - 4, pt.y + 2); dc->DrawText(str_1, px.x - 4, px.y + 2); } } else { dc->DrawLine(pt.x,pt.y + 20, pt.x, pt.y + 26); dc->DrawLine(px.x,px.y + 20, px.x, px.y + 26); } } dc->SetFont(oldfont); } void Plot_dialog::Draw_alt(wxPaintDC*dc, wxPoint point) { ///////////write the altitude segments and figures on the cardinal lines///////////////// wxFont oldfont(wxSystemSettings::GetFont(wxSYS_DEVICE_DEFAULT_FONT)); wxFont font(6,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL); wxString str; dc->SetFont(font); wxPoint pt = point; for(int a = 0; a <= 90; a ++) { if(a%10==0){ pt.y = point.y; pt.y = pt.y - (a * AZIMUTH_SPAN) - 5; dc->DrawLine(pt.x - 4, pt.y, pt.x + 4, pt.y); dc->SetTextForeground(*wxBLUE); str = wxString::Format(wxT("%d"),a); dc->DrawText(str, pt.x + 6, pt.y - 4); } } dc->SetFont(oldfont); dc->SetTextForeground(*wxBLACK); } void Plot_dialog::Calc_moon_data(double * azimuth, double *alt, double * GHA) { int e; Sun mysun; Stars star; Starpos planet; mysun.GHAAries(dYear,dMonth,dDay,dHour,dMinute,dSeconds); t = (dHour+(dMinute + (dSeconds/ 60.00)) / 60.00) * 15; loctime = t + longitud; planet.tlat = latitud; planet.tlong = longitud; planet.objnum = 0; e = planet.mainPlanet(dYear,dMonth,dDay,dHour,dMinute,dSeconds); Ts = mysun.Ts; RA = planet.RA; moon_tm = Ts + planet.RA; moon_tm = fmod(moon_tm,360); LHA = moon_tm + longitud; LHA = fmod(LHA,360); lamda = planet.mlong; beta = planet.mlat; parlax = planet.prlx; smdiam = planet.sdiam; declination = planet.Dec; bodyname = _("Moon"); constell = wxString::FromAscii(planet.constellation); smdiam = 0; ///////////////////////calcolo azimuth e altezza///////////////////////////// double x = cosd(LHA) * cosd(declination); double y = sind(LHA) * cosd(declination); double z = sind(declination); double xhor = x * sind(latitud) - z * cosd(latitud); double yhor = y; double zhor = x * cosd(latitud) + z * sind(latitud); *azimuth = atan2d( yhor, xhor ) + 180; *alt = atan2d( zhor, sqrt(xhor*xhor+yhor*yhor) ); *GHA = moon_tm; } void Plot_dialog::Calc_planet_data(double* azimuth, double* alt, int iChoice, wxString* name) { int e; Sun mysun; Stars star; Starpos planet; mysun.GHAAries(dYear,dMonth,dDay,dHour,dMinute,dSeconds); t = (dHour+(dMinute + (dSeconds/ 60.00)) / 60.00) * 15; loctime = t + longitud; if(iChoice==0) { planet.objnum = 1; e = planet.mainPlanet(dYear,dMonth,dDay,dHour,dMinute,dSeconds); Ts = mysun.Ts; RA = planet.RA; double venus_tm = Ts + planet.RA; venus_tm = fmod(venus_tm,360); declination = planet.Dec; LHA = venus_tm + longitud; LHA = fmod(LHA,360); lamda = planet.plong; beta = planet.plat; parlax = 0; smdiam = 0; //_distance = planet.planet_distance; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); *name = bodyname; } if(iChoice==1) { planet.objnum = 2; e = planet.mainPlanet(dYear,dMonth,dDay,dHour,dMinute,dSeconds); Ts = mysun.Ts; RA = planet.RA; double mars_tm = Ts + planet.RA; mars_tm = fmod(mars_tm,360); declination = planet.Dec; LHA = mars_tm + longitud; LHA = fmod(LHA,360); lamda = planet.plong; beta = planet.plat; parlax = 0; smdiam = 0; //P_distance = planet.planet_distance; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); *name = bodyname; } if(iChoice==2) { planet.objnum = 3; e = planet.mainPlanet(dYear,dMonth,dDay,dHour,dMinute,dSeconds); Ts = mysun.Ts; RA = planet.RA; double jupiter_tm = Ts + planet.RA; jupiter_tm = fmod(jupiter_tm,360); declination = planet.Dec; LHA = jupiter_tm + longitud; LHA = fmod(LHA,360); lamda = planet.plong; parlax = 0; smdiam = 0; beta = planet.plat; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); *name = bodyname; } if(iChoice==3) { planet.objnum = 4; e = planet.mainPlanet(dYear,dMonth,dDay,dHour,dMinute,dSeconds); Ts = mysun.Ts; RA = planet.RA; double saturn_tm = Ts + planet.RA; saturn_tm = fmod(saturn_tm,360); declination = planet.Dec; LHA = saturn_tm + longitud; LHA = fmod(LHA,360); lamda = planet.plong; beta = planet.plat; parlax = 0; smdiam = 0; bodyname = wxString::FromAscii(planet.bodyname); constell = wxString::FromAscii(planet.constellation); *name = bodyname; } ///////////////////////calcolo azimuth e altezza///////////////////////////// double x = cosd(LHA) * cosd(declination); double y = sind(LHA) * cosd(declination); double z = sind(declination); double xhor = x * sind(latitud) - z * cosd(latitud); double yhor = y; double zhor = x * cosd(latitud) + z * sind(latitud); *azimuth = atan2d( yhor, xhor ) + 180; *alt = atan2d( zhor, sqrt(xhor*xhor+yhor*yhor) ); } void Plot_dialog::Calc_star_data(double* azimuth, double* alt, int a, wxString * name) { Sun mysun; Stars star; Starpos planet; wxString str; mysun.GHAAries(dYear,dMonth,dDay,dHour,dMinute,dSeconds); Ts = mysun.Ts; t = (dHour+(dMinute + (dSeconds/ 60.00)) / 60.00) * 15; loctime = t + longitud; str = star.stars[a]; star.starname = str; star.CalcVariation(dYear,dMonth,dDay,dHour,dMinute,dSeconds); RA = star.RA; //star.co_asc_rct[b]; declination = star.declin; //star.dec[b]; double GHA = Ts + RA; GHA = fmod(GHA,360); LHA = GHA + longitud; LHA = fmod(LHA,360); lamda = star.lon; beta = star.lat; parlax = 0; smdiam = 0; bodyname = star.starname; constell =star.constellation; *name = bodyname; /////////////////////////prova altezza quadratica//////////////////////////////// double x = cosd(LHA) * cosd(declination); double y = sind(LHA) * cosd(declination); double z = sind(declination); double xhor = x * sind(latitud) - z * cosd(latitud); double yhor = y; double zhor = x * cosd(latitud) + z * sind(latitud); *azimuth = atan2d( yhor, xhor ) + 180; *alt = atan2d( zhor, sqrt(xhor*xhor+yhor*yhor) ); } Plot_dialog::~Plot_dialog() { this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( Plot_dialog::OnPaint ) ); this->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( Plot_dialog::OnLeftMouseClick ) ); this->Disconnect( wxEVT_MOTION, wxMouseEventHandler(Plot_dialog::OnMotion ) ); this->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( Plot_dialog::OnLeftMouseUp ) ); } nautic-1.5/src/Pos_dialog.cpp0000644000175000017500000002045111747727165016120 0ustar moellermoeller/* Pos_dialog.cpp implementation of plotting dialog Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "Pos_dialog.h" //IMPLEMENT_DYNAMIC_CLASS( Pos_Dialog,wxDialog ) //BEGIN_EVENT_TABLE( Pos_Dialog, wxDialog ) //END_EVENT_TABLE() #define PIg 3.14159265358979323846 #define RADEG (180.0/PIg) #define DEGRAD (PIg/180.0) #define sind(x) sin((x)*DEGRAD) #define cosd(x) cos((x)*DEGRAD) #define tand(x) tan((x)*DEGRAD) #define asind(x) (RADEG*asin(x)) #define acosd(x) (RADEG*acos(x)) #define atand(x) (RADEG*atan(x)) #define atan2d(y,x) (RADEG*atan2((y),(x))) /////////////////////////////////////////////////////////////////////////// Pos_Dialog::Pos_Dialog() { } Pos_Dialog::Pos_Dialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); //this->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVECAPTION ) ); this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ) ); this->Centre( wxBOTH ); center.x = 325; center.y = 300; n = 0;//counter longitud = 0; latitud = 0; Dlat = 0; Dlon = 0; pos_point.x = 0; pos_point.y = 0; for(int a = 0; a < 10; a++) { point[a].x = 0; point[a].y = 0; } Lat_d = 0; Lon_d = 0; // Connect Events this->Connect( wxEVT_PAINT, wxPaintEventHandler( Pos_Dialog::OnPaint ) ); } void Pos_Dialog::OnPaint(wxPaintEvent& event) { wxPaintDC dc(this); wxColour col(100,100,100); wxColour rd(255,0,0); wxColour bk(0,0,0); wxBrush brush(rd); wxPen pen; pen.SetColour(col); pen.SetStyle(wxLONG_DASH); dc.SetPen(pen); dc.DrawLine(wxPoint(60,300),wxPoint(590,300)); dc.DrawLine(wxPoint(325,60),wxPoint(325,600)); pen.SetColour(bk); pen.SetStyle(wxSOLID); dc.SetPen(pen); dc.SetBrush(brush); DrawIntercept(&dc); WritePosition(&dc); } void Pos_Dialog::DrawIntercept(wxPaintDC * dc) { double azt,intcpt,iee,Lon,Lat; wxPoint pos; const wxChar * pth; ////new////// wxCharBuffer buffer(320); wxString st_buff, st_rest,st_toc; const char * ch; int a = 0; pth = stpath.c_str(); wxFile file; if(!file.Open(pth,wxFile::read)) wxMessageBox(wxT("Couldn't open file"),wxT("Error")); else{ a = file.Length(); file.Read(buffer.data(),a-1); ch = buffer.data(); file.Close(); } st_buff = wxString::FromAscii(ch); st_buff = st_buff.AfterFirst('\n'); while(!st_buff.IsEmpty()) { st_rest = st_buff; st_toc = st_rest.BeforeFirst(' '); st_toc.ToDouble(&azt); st_rest = st_rest.AfterFirst(' '); st_toc = st_rest.BeforeFirst(' '); st_toc.ToDouble(&intcpt); st_rest = st_rest.AfterFirst(' '); st_toc = st_rest.BeforeFirst(' '); st_toc.ToDouble(&Lat); st_rest = st_rest.AfterFirst(' '); st_toc = st_rest.BeforeFirst('\n'); st_toc.ToDouble(&Lon); pos = CalcPoint(azt,intcpt,Lat); dc->DrawLine(center,pos); DrawPosLine(dc,azt,intcpt,Lat); st_buff = st_buff.AfterFirst('\n'); } pos_point = GetIntPoint(); Lon_d = Lon; Lat_d = Lat; if(pos_point.x != 0 && pos_point.y != 0) { pos_point.x -= center.x; pos_point.y -= center.y; } Dlon = pos_point.x / 6.0; longitud = Lon + Dlon / 60; Dlat = pos_point.y / 6.0; Dlat = Dlat * cosd(Lat); latitud = Lat - Dlat / 60; } void Pos_Dialog::DrawPosLine(wxPaintDC* dc, double azt, double intcpt,double Lat) { wxPoint pnt[4]; wxPoint pos, pline, plin; double right, left; wxColour bk(0,0,0); wxPen oldpen = dc->GetPen(); wxPen pen; pen.SetColour(bk); pen.SetStyle(wxSOLID); pen.SetWidth(2); dc->SetPen(pen); double x,y; pos = CalcPoint(azt,intcpt,Lat); azt = 90 - azt; x = 200 * sind(azt) ; y = 200 * cosd(azt) ; pline.x = pos.x + x; pline.y = pos.y + y; dc->DrawLine(pos,pline); DrawApex(dc,pline,azt,intcpt); plin.x = pos.x - x; plin.y = pos.y - y; dc->DrawLine(pos,plin); DrawApex(dc,plin,azt,intcpt); dc->SetPen(oldpen); pnt[0].x = pline.x - (4 * cosd(azt)); pnt[0].y = pline.y - (4 * sind(azt)); pnt[1].x = pline.x + (4 * cosd(azt)); pnt[1].y = pline.y + (4 * sind(azt)); pnt[2].x = plin.x + (4 * cosd(azt)); pnt[2].y = plin.y + (4 * sind(azt)); pnt[3].x = plin.x - (4 * cosd(azt)); pnt[3].y = plin.y + (4 * sind(azt)); wxRegion reg(4,pnt); n++; rgn[n] = reg; } wxPoint Pos_Dialog::CalcPoint(double azt, double intcpt,double Lat) { wxPoint pos; azt = 90 - azt; double x,y; pix = intcpt / cosd(Lat) ;//latitudine crescente x = pix * cosd(azt) * 6; y = pix * sind(azt) * 6; pos.x = center.x + x; pos.y = center.y - y; return pos; } void Pos_Dialog::DrawApex(wxPaintDC* dc, wxPoint pnt, double azt, double intcpt) { wxPoint pos, vertx, vert; double x,y,xa,ya; x = 15 * cosd(azt) ; y = 15 * sind(azt) ; pos.x = pnt.x + x; pos.y = pnt.y - y; xa = 6 * cosd(azt + 30); ya = 6 * sind(azt + 30); vertx.x = pos.x - xa; vertx.y = pos.y + ya; dc->DrawLine(pnt,pos); dc->DrawLine(pos,vertx); xa = 6 * cosd(azt - 30); ya = 6 * sind(azt - 30); vert.x = pos.x - xa; vert.y = pos.y + ya; dc->DrawLine(pos,vert); dc->DrawLine(vert,vertx); } wxPoint Pos_Dialog::GetIntPoint() { wxRegion region; wxPoint iPoint; wxPoint pt; wxPoint pl; wxPoint cx; iPoint.x = 0; iPoint.y = 0; int b ; int c = 1; int d = n; int a = n - 1; double dx = 0; double dy = 0; while (n > 1) { region =rgn[d]; if (region.Intersect(rgn[a])!=0) { a -= 1; d -= 1; wxRect rect = region.GetBox(); pt = rect.GetLeftTop(); pl = rect.GetBottomRight(); cx.x = (pl.x + pt.x) / 2; cx.y = (pl.y + pt.y) / 2; point[c].x = cx.x; point[c].y = cx.y; c++; } if(a == 0) a = n; if(d == 0) goto out; } out: for(b = 1; b < c; b++) { dx = dx + point[b].x; dy = dy + point[b].y; } if(n > 0) { dx = dx / n ; dy = dy / n ; } iPoint.x = dx; iPoint.y = dy; return iPoint; } void Pos_Dialog::WritePosition(wxPaintDC* dc) { double lon_d,lat_d,d_min; int deg, min, sec; wxString strlon, strlat,strcomt; ///longitude lon_d = Lon_d; if(lon_d < 0) lon_d = lon_d * (-1); deg = floor(lon_d); d_min = (lon_d - deg) * 60; min = floor(d_min); sec = (d_min - min) * 60; if(Lon_d >= 0) strlon = wxString::Format(_("E %02d : %02d : %02d"),deg,min,sec); if(Lon_d < 0) strlon = wxString::Format(_("W %02d : %02d : %02d"),deg,min,sec); dc->DrawText(strlon,280,610); //latitude lat_d = Lat_d; if(lat_d < 0) lat_d = lat_d * (-1); deg = floor(lat_d); d_min = (lat_d - deg) * 60; min = floor(d_min); sec = (d_min - min) * 60; if(Lat_d >= 0) strlon = wxString::Format(_("N %02d : %02d : %02d"),deg,min,sec); if(Lat_d < 0) strlon = wxString::Format(_("S %02d : %02d : %02d"),deg,min,sec); dc->DrawText(strlon,30,280); /// position longitude lon_d = longitud; if(lon_d < 0) lon_d = lon_d * (-1); deg = floor(lon_d); d_min = (lon_d - deg) * 60; min = floor(d_min); sec = (d_min - min) * 60; strcomt = _("Position:"); if(Lon_d >= 0) strlon = wxString::Format(_("Lon: E %02d : %02d : %02d"),deg,min,sec); if(Lon_d < 0) strlon = wxString::Format(_("Lon: W %02d : %02d : %02d"),deg,min,sec); dc->DrawText(strcomt,30,580); dc->DrawText(strlon,30,595); //latitude position lat_d = latitud; if(lat_d < 0) lat_d = lat_d * (-1); deg = floor(lat_d); d_min = (lat_d - deg) * 60; min = floor(d_min); sec = (d_min - min) * 60; if(Lat_d >= 0) strlon = wxString::Format(_("Lat : N %02d : %02d : %02d"),deg,min,sec); if(Lat_d < 0) strlon = wxString::Format(_("Lat : S %02d : %02d : %02d"),deg,min,sec); dc->DrawText(strlon,30,610); } Pos_Dialog::~Pos_Dialog() { // Disconnect Events this->Disconnect( wxEVT_PAINT, wxPaintEventHandler(Pos_Dialog::OnPaint ) ); } nautic-1.5/src/stars.cpp0000644000175000017500000001750111607071655015165 0ustar moellermoeller/* star.cpp star implementation file Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include "stars.h" #include // This is a magic incantation which must be done! WX_DEFINE_OBJARRAY(wxFloatArray); #define RADEG (180.0/PI) #define DEGRAD (PI/180.0) #define sind(x) sin((x)*DEGRAD) #define cosd(x) cos((x)*DEGRAD) #define tand(x) tan((x)*DEGRAD) #define asind(x) (RADEG*asin(x)) #define acosd(x) (RADEG*acos(x)) #define atand(x) (RADEG*atan(x)) #define atan2d(y,x) (RADEG*atan2((y),(x))) float revstr( float x ) { return x - floor(x/360.0)*360.0; } Stars::Stars() { time = wxDateTime::Now(); declin = 0; RA = 0; astronames.Add(_("fi eridani")); astronames.Add(_("alpha eridani")); astronames.Add(_("alpha crucis")); stars.Add(_("Acamar")); stars.Add(_("Achernar")); stars.Add(_("Acrux")); stars.Add(_("Adhara")); stars.Add(_("Aldebaran")); stars.Add(_("Alioth")); stars.Add(_("Alkaid")); stars.Add(_("Almak")); stars.Add(_("Al Nair")); stars.Add(_("Alnilam")); stars.Add(_("Alphard")); stars.Add(_("Alphecca")); stars.Add(_("Alpheratz")); stars.Add(_("Altair")); stars.Add(_("Ankaa")); stars.Add(_("Antares")); stars.Add(_("Arcturus")); stars.Add(_("Atria")); stars.Add(_("Avior")); stars.Add(_("Bellatrix")); stars.Add(_("Betelgeuse")); stars.Add(_("Canopus")); stars.Add(_("Capella")); stars.Add(_("Castor")); stars.Add(_("Cor Caroli")); stars.Add(_("Deneb")); stars.Add(_("Denebola")); stars.Add(_("Diphda")); stars.Add(_("Dubhe")); stars.Add(_("Elnath")); stars.Add(_("Eltanin")); stars.Add(_("Enif")); stars.Add(_("Fomalhaut")); stars.Add(_("Gacrux")); stars.Add(_("Gienah")); stars.Add(_("Hadar")); stars.Add(_("Hamal")); stars.Add(_("Kaus Australis")); stars.Add(_("Kochab")); stars.Add(_("Markab")); stars.Add(_("Menkar")); stars.Add(_("Menkent")); stars.Add(_("Merak")); stars.Add(_("Miraplacidus")); stars.Add(_("Mirfak")); stars.Add(_("Mizar")); stars.Add(_("Nunki")); stars.Add(_("Peacock")); stars.Add(_("Phact")); stars.Add(_("Polaris")); stars.Add(_("Pollux")); stars.Add(_("Procyon")); stars.Add(_("Ras Alhague")); stars.Add(_("Regulus")); stars.Add(_("Rigel")); stars.Add(_("Rigil Kentaurus")); stars.Add(_("Sabik")); stars.Add(_("Saiph")); stars.Add(_("Schedar")); stars.Add(_("Scheddi")); stars.Add(_("Shaula")); stars.Add(_("Sirius")); stars.Add(_("Spica")); stars.Add(_("Suhail")); stars.Add(_("Vega")); stars.Add(_("Zuben el Genubi")); } double Stars::CalcAriesSideralTime(int Y,int Mo,int D,int hr,int min,int sec) { double djm0; double djm; iauCal2jd(Y, Mo,D,&djm0,&djm);///funzione sofa per calcolare anno Juliano double Jtime = djm0 + djm; double hourrate =15.041068664; double GAST = iauGst06a(Jtime,0.0,Jtime,0.0);//funzione sofa per calcolare Ts alle 0UTC data GMST = iauGmst06(Jtime,0.0,Jtime,0.0);//g. Mean Sideral time GMST = GMST * RADEG; GAST = GAST * RADEG;//Ts in gradi double dfrac = hr+((min+(sec/60.0000))/60.0000); GAST = GAST + dfrac*hourrate; GMST = GMST + dfrac*hourrate; equinox = GAST - GMST ; Ts = GAST; Ts=fmod(Ts,360); if(Ts<0) Ts=360+Ts; return Ts; } double Stars::CalcVariation(int Y,int Mo,int D,int hr,int min,int sec) { Starpos a; a.linenum = 67; if(starname == _("Acamar")) a.linenum = 1; if(starname == _("Achernar")) a.linenum = 2; if(starname == _("Acrux")) a.linenum = 3; if(starname == _("Adhara")) a.linenum = 4; if(starname == _("Aldebaran")) a.linenum = 5; if(starname == _("Alioth")) a.linenum = 6; if(starname == _("Alkaid")) a.linenum = 7; if(starname == _("Almak")) a.linenum = 8; if(starname == _("Al Nair")) a.linenum = 9; if(starname == _("Alnilam")) a.linenum = 10; if(starname == _("Alphard")) a.linenum = 11; if(starname == _("Alphecca")) a.linenum = 12; if(starname == _("Alpheratz")) a.linenum = 13; if(starname == _("Altair")) a.linenum = 14; if(starname == _("Ankaa")) a.linenum = 15; if(starname == _("Antares")) a.linenum = 16; if(starname == _("Arcturus")) a.linenum = 17; if(starname == _("Atria")) a.linenum = 18; if(starname == _("Avior")) a.linenum = 19; if(starname == _("Bellatrix")) a.linenum = 20; if(starname == _("Betelgeuse")) a.linenum = 21; if(starname == _("Canopus")) a.linenum = 22; if(starname == _("Capella")) a.linenum = 23; if(starname == _("Castor")) a.linenum = 24; if(starname == _("Cor Caroli")) a.linenum = 25; if(starname == _("Deneb")) a.linenum = 26; if(starname == _("Denebola")) a.linenum = 27; if(starname == _("Diphda")) a.linenum = 28; if(starname == _("Dubhe")) a.linenum = 29; if(starname == _("Elnath")) a.linenum = 30; if(starname == _("Eltanin")) a.linenum = 31; if(starname == _("Enif")) a.linenum = 32; if(starname == _("Fomalhaut")) a.linenum = 33; if(starname == _("Gacrux")) a.linenum = 34; if(starname == _("Gienah")) a.linenum = 35; if(starname == _("Hadar")) a.linenum = 36; if(starname == _("Hamal")) a.linenum = 37; if(starname == _("Kaus Australis")) a.linenum = 38; if(starname == _("Kochab")) a.linenum = 39; if(starname == _("Markab")) a.linenum = 40; if(starname == _("Menkar")) a.linenum = 41; if(starname == _("Menkent")) a.linenum = 42; if(starname == _("Merak")) a.linenum = 43; if(starname == _("Miraplacidus")) a.linenum = 44; if(starname == _("Mirfak")) a.linenum = 45; if(starname == _("Mizar")) a.linenum = 46; if(starname == _("Nunki")) a.linenum = 47; if(starname == _("Peacock")) a.linenum = 48; if(starname == _("Phact")) a.linenum = 49; if(starname == _("Polaris")) a.linenum = 50; if(starname == _("Pollux")) a.linenum = 51; if(starname == _("Procyon")) a.linenum = 52; if(starname == _("Ras Alhague")) a.linenum = 53; if(starname == _("Regulus")) a.linenum = 54; if(starname == _("Rigel")) a.linenum = 55; if(starname == _("Rigil Kentaurus")) a.linenum = 56; if(starname == _("Sabik")) a.linenum = 57; if(starname == _("Saiph")) a.linenum = 58; if(starname == _("Schedar")) a.linenum = 59; if(starname == _("Scheddi")) a.linenum = 60; if(starname == _("Shaula")) a.linenum = 61; if(starname == _("Sirius")) a.linenum = 62; if(starname == _("Spica")) a.linenum = 63; if(starname == _("Suhail")) a.linenum = 64; if(starname == _("Vega")) a.linenum = 65; if(starname == _("Zuben el Genubi")) a.linenum = 66; if(a.linenum<0 || a.linenum>66) exit(0); a.mainStar(Y,Mo,D,hr,min,sec); RA = a.RA; declin = a.Dec; constellation = wxString::FromAscii( a.constname); //////////////////////lamda and beta//////////////////////////////// double x = cosd(RA) * cosd(declin); double y = sind(RA) * cosd(declin); double z = sind(declin); struct julian_date tdb; calendar_to_julian_date(Y, Mo, D, &tdb); double ecl = ge2000a_mean_obliquity(&tdb); double sinlat,coslon; ecl = ecl * RADEG; double p[3]; double theta; double phi; double xecl = x; double yecl = y * cosd(ecl) - z * sind(ecl); double zecl = y * sind(ecl) + z * cosd(ecl); p[0] = xecl; p[1] = yecl; p[2] = zecl; iauC2s( p, &theta, &phi); lon = theta * RADEG; if(lon < 0) lon = lon + 360; lat = phi * RADEG; return declin; } Stars::~Stars() { } nautic-1.5/src/fund_arg.cpp0000644000175000017500000001075411505333343015611 0ustar moellermoeller/* * fund_args.c - Implementation of fundamental planetary/lunisolar arguments * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * Reference : US Naval Observatory Circular 179 (2005) * */ //#include #include "fund_args.h" #define PI 3.141592653589793238462643 #define TWO_PI 6.283185307179586476925287 #define SQROOT_TWO 1.414213562373095048801689 #define DEG_TO_RAD 0.01745329251994329576923691 #define ACS_TO_RAD 0.000004848136811095359935899141 #define MAS_TO_RAD 0.000000004848136811095359935899141 #define UAS_TO_RAD 0.000000000004848136811095359935899141 #define RAD_TO_DEG 57.295779513082320876798147 #define RAD_TO_ACS 206264.806247096 #define DEG_TO_HRS 0.066666666666666666666667 #define HRS_TO_DEG 15.0 #define RAD_TO_HRS 3.81971863420548805845321 #define HRS_TO_RAD 0.261799387799149436538554 #define DEGREES(d, m, s) (d + (m / 60.0) + (s / 3600.0)) #define GAUSS_GRAV_CONSTANT 0.01720209895 #define AU 149597870.691 /* 1 AU in KM */ #define EARTH_FLATTENING (1.0 / 298.25642) #define EARTH_EQU_RADIUS 6378136.6 /* Earth's equatorial radius(meters) */ #define EARTH_POL_RADIUS (EARTH_EQU_RADIUS * (1.0 - EARTH_FLATTENING)) /* * Calculates values for the various fundamental arguments used in the planetary, * lunar, precession and nutation models. * * arg -- One of the values from the fund_argument enumeration. * t -- Number of Julian centuries of TDB since 2000-01-01 12h TDB. TT may be used * for all but the most exacting applications. * * Return: -1 if the arg parameter is invalid. The value of the fundamental * argument in radians otherwise. */ double fundamental_argument(enum fund_argument arg, double t) { double val = -1; switch (arg) { /* Heliocentric ecliptic longitudes of the eight planets */ case ARG_LONGITUDE_MERCURY: val = 4.402608842 + 2608.7903141574 * t; break; case ARG_LONGITUDE_VENUS: val = 3.176146697 + 1021.3285546211 * t; break; case ARG_LONGITUDE_EARTH: val = 1.753470314 + 628.3075849991 * t; break; case ARG_LONGITUDE_MARS: val = 6.203480913 + 334.0612426700 * t; break; case ARG_LONGITUDE_JUPITER: val = 0.599546497 + 52.9690962641 * t; break; case ARG_LONGITUDE_SATURN: val = 0.874016757 + 21.3299104960 * t; break; case ARG_LONGITUDE_URANUS: val = 5.481293872 + 7.4781598567 * t; break; case ARG_LONGITUDE_NEPTUNE: val = 5.311886287 + 3.8133035638 * t; break; /* General precession in longitude */ case ARG_PRECESSION: val = (0.024381750 + 0.00000538691 * t) * t; break; /* Mean anomaly of the Moon (L)*/ case ARG_ANOMALY_MOON: val = (485868.249036 + (1717915923.2178 + (31.8792 + (0.051635 - 0.00024470 * t) * t) * t) * t) * ACS_TO_RAD; break; /* Mean anomaly of the Sun (Lprime) */ case ARG_ANOMALY_SUN: val = (1287104.79305 + (129596581.0481 + (-0.5532 + (0.000136 - 0.00001149 * t) * t) * t) * t) * ACS_TO_RAD; break; /* Mean argument of latitude of the Moon (F) */ case ARG_LATITUDE_MOON: val = (335779.526232 + (1739527262.8478 + (-12.7512 + (-0.001037 + 0.00000417 * t) * t) * t) * t) * ACS_TO_RAD; break; /* Mean elongation of the Moon from the Sun (D) */ case ARG_ELONGATION_MOON: val = (1072260.70369 + (1602961601.2090 + (-6.3706 + (0.006593 - 0.00003169 * t) * t) * t) * t) * ACS_TO_RAD; break; /* Mean longitude of the Moon's mean ascending node (Omega) */ case ARG_LONGITUDE_NODE: val = (450160.398036 + (-6962890.5431 + (7.4722 + (0.007702 - 0.00005939 * t) * t) * t) * t) * ACS_TO_RAD; break; /* Mean longitude of the moon (w) */ case ARG_LONGITUDE_MOON: val = (785939.95571 + (1732559343.73604 + (-5.8883 + (0.006604 - 0.00003169 * t) * t) * t) * t) * ACS_TO_RAD; break; } return val; }nautic-1.5/starpos.h0000644000175000017500000000735011556005075014377 0ustar moellermoeller/* starpos.h star position Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef STARPOS_H #define STARPOS_H #include #include #include #include #include "plant.h" class Starpos { public: Starpos(); virtual ~Starpos(); int mainStar(int Year, int month, int hour, int day, int min, int sec); int hms( double x ); int trnsit(double J, double lha, double dec); void iter_func(double t, int (* func)()); int update(); int kepler(double J, struct orbit *e,double rect[],double polar[]); double sidrlt(double j,double tlong ); int nutlo(double J); int epsiln(double J); int diurab(double last,double *ra,double *dec ); int diurpx(double last,double *ra,double *dec,double dist ); int showcor(char* strng,double p[],double dp[] ); double refrac(double alt); int altaz(double pol[],double J ); int dms(double x ); int iter_trnsit( int (* func)() ); int jtocal(double J ); void mean_elements (double J); int sscc (int k,double arg,int n); int nutate(double J,double p[] ); int g3plan (double J, plantbl *plan, double pobj[],int objnum); int gplan (double J, plantbl *plan,double pobj[]); double g1plan (double J, plantbl *plan); int g2plan (double J, plantbl *plan,double pobj[]); int gmoon (double J,double rect[],double pol[]); int embofs(double J,double ea[],double * pr ); int precess( double R[],double J,int direction ); double modtp(double x); double mod360(double x); int velearth(double J ); int annuab(double p[] ); double caltoj(long year,int month,double day ); int deltap(double p0[],double p1[],double* dr,double * dd ); int relativity(double p[],double q[],double e[] ); int showrd(char* msg,double p[],double pol[] ); int angles(double p[],double q[],double e[] ); int fk4fk5(double p[],double m[], struct star *el ); double deltat(double Y); int dostar (); int rstar(struct star *el); int kinit(); int getorbit(struct orbit *el); FILE *fincat(char * name,int n,char * str1,char * str2 ); int getnum(char* msg,void* num,const char* format ); int getstar(struct star *el); int showcname( char *in ); static int islow(char* p); static int skipwh(char *p); static int isnumber(char *p); static int isup(char *p); double zgetdate(); double gethms(); double zatan2(double x,double y ); int mainPlanet(int Year,int month, int day, int hour, int minute, int second); int domoon(); int doplanet(); int reduce( struct orbit *elemnt,double q[],double e[] ); int moonll(double J,double rect[],double pol[]); int lonlat(double pp[],double J,double polar[],int ofdate ); int lightt( struct orbit *elemnt,double q[],double e[] ); const char * whatconstel(double ra, double dec);// (double pp[],double epoch); double RA; double Dec; int linenum; int objnum; double planet_distance; double tlong;//-71.13; /* Cambridge, Massachusetts */ double tlat ;//42.38; /* geocentric */ double glat;//42.17; /* geodetic */ const char * constellation; const char * bodyname; const char * constname; double mlong; double mlat; double prlx; double sdiam; double plong; double plat; }; #endif // STARPOS_H nautic-1.5/aberration.h0000644000175000017500000000423011556005075015024 0ustar moellermoeller/* * aberration.h - Declarations for calculating annual aberration * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _ABERRATION_H_ #define _ABERRATION_H_ #include "julian_date.h" #include "coordinate.h" /* * Used internally to store the terms in the trigonometric aberration series */ struct aberration_term1_1 { short l_ea; int x_sin; int x_sin_t; int x_cos; int x_cos_t; int x_cos_t2; int y_sin; int y_sin_t; int y_sin_t2; int y_cos; int y_cos_t; int z_sin; int z_sin_t; int z_sin_t2; int z_cos; int z_cos_t; }; /* * Used internally to store the terms in the trigonometric aberration series */ struct aberration_term1_2 { short l_me; short l_ve; short l_ea; short l_ma; short l_ju; short l_sa; short x_sin; short x_cos; short y_sin; short y_cos; short z_sin; short z_cos; }; /* * Used internally to store the terms in the trigonometric aberration series */ struct aberration_term2 { short l_ve; short l_ea; short l_ju; short l_sa; short l_ur; short l_ne; short x_sin; short x_cos; short y_sin; short y_cos; short z_sin; short z_cos; }; /* * Used internally to store the terms in the trigonometric aberration series */ struct aberration_term3 { short w; short d; short lp; short l; short f; short x_sin; short y_cos; short z_cos; }; void aberration_earth_velocity(struct julian_date *tdb, struct rectangular_coordinates *vel); void annual_aberration(struct julian_date *tdb, struct equatorial_coordinates *e, double *d_ra, double *d_dec); #endif nautic-1.5/delta_t.h0000644000175000017500000000160111556005075014311 0ustar moellermoeller/* * delta-t.h - Declarations for calculating delta-T * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _DELTA_T_H_ #define _DELTA_T_H_ int delta_t(int year, int month, double *delta_t, double *correction); #endifnautic-1.5/Makefile.am0000644000175000017500000000007511554101241014552 0ustar moellermoellerAUTOMAKE_OPTIONS = foreign SUBDIRS = src data info man icon nautic-1.5/orbital_elements.h0000644000175000017500000000523711556005075016236 0ustar moellermoeller/* * orbital_elements.h - Declarations for orbital element support * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _ORBITAL_ELEMENTS_H_ #define _ORBITAL_ELEMENTS_H_ #include "kepler.h" #include "julian_date.h" #include "coordinate.h" #define PARABOLIC_ORBIT 1.00 #define KEPLER_MAX_ITER 10 #define KEPLER_PRECISION 1e-14 /* * Used wherever the osculating orbital elements of a celestial body are * expected or returned. * * These values may be obtained from the circulars of the Minor Planet * Center, the Astronomical Almanac or other publications. See mpc_file.c * for some ways in which this structure is used. */ struct orbital_elements { struct julian_date epoch; /* Epoch of osculation. */ double mean_anomaly; /* Mean anomaly in radians at epoch. */ double daily_motion; /* Daily motion in radians/day. */ double perihelion; /* Perihelion distance in AU. */ double eccentricity; /* Eccentricity of the orbit. */ /* The values for the orbit's orientation must be referred to J2000. */ double arg_perihelion; /* Argument of the perihelion in radians. */ double lon_asc_node; /* Longitude of the ascending node in radians. */ double inclination; /* Inclination of the orbit in radians. */ }; /* * May be set to limit the number of iterations in the solution of Kepler's * equations. The default value is KEPLER_MAX_ITER. */ extern u_short kepler_equation_max_iters; /* * May be set to specify the precision expected in the solution Kepler's * equations. The default value is KEPLER_PRECISION. */ extern double kepler_equation_precision; #ifdef _DEBUG /* * Set to the number of iterations required for the solution of Kepler's * equations in the most recent call to the relevant functions. */ extern u_short kepler_equation_iters; #endif int elements_to_ephemeris(struct julian_date *tt, struct orbital_elements *elt, struct rectangular_coordinates *eph); int eccentric_anomaly(double mean_ano, double ecc, double *ecc_ano); int hyperbolic_anomaly(double mean_ano, double ecc, double *hyp_ano); #endif nautic-1.5/install-sh0000777000175000017500000000000011646752210022703 2/usr/share/automake-1.11/install-shustar moellermoellernautic-1.5/h_correction.h0000644000175000017500000000311011556005075015350 0ustar moellermoeller/* h_correction.h - altitude correction functions and variables Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef HCORRECTION_H #define HCORRECTION_H #include #include class HCorrection { public: HCorrection(); virtual ~HCorrection(); double CalcDip(double e); double CalcRefrac( double obs_h); double CalcSunRefrac( double obs_h); double moon_trd_coor(double px, double obs_h); double calc_sun_llimb(int mon); double calc_sun_uplimb(int mon); double moon_snd_coor(double obs_h); double moon_trd_up_coor(double px, double obs_h); double stars_corr(double e, double obs_h); double plan_corr(double e, double obs_h, double prlx); double sun_corr(double e, double obs_h, double mon, bool ch); double moon_corr(double e, double px, double obs_h, bool ch); int year; int month; int day; double prlax; protected: double moon_altitude; }; #endif // HCORRECTION_H nautic-1.5/Pos_dialog.h0000644000175000017500000000445411747727164015002 0ustar moellermoeller/* Pos-dialog.h plotting sheet Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef _POSDIALOG_ #define _POSDIALOG_ #include #include #include #include #include #include #include #include #include /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /// Class Pos_Dialog /////////////////////////////////////////////////////////////////////////////// class Pos_Dialog : public wxDialog { //DECLARE_DYNAMIC_CLASS(Pos_Dialog ) //DECLARE_EVENT_TABLE() private: void DrawIntercept(wxPaintDC * dc); void DrawPosLine(wxPaintDC * dc, double azt, double intcpt,double Lat); wxPoint CalcPoint(double azt,double intcpt,double Lat); void DrawApex(wxPaintDC * dc, wxPoint pnt, double azt, double intcpt); wxPoint GetIntPoint(); void WritePosition(wxPaintDC *dc); wxPoint center; wxRegion rgn[10]; wxPoint point[10]; wxPoint pos_point; double pix; double Dlat; double Dlon; int n; double Lon_d; double Lat_d; double * ptLat; protected: virtual void OnPaint( wxPaintEvent& event );// { event.Skip(); } public: Pos_Dialog(); Pos_Dialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Plotting Plan"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(650,700), long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER); ~Pos_Dialog(); double longitud; double latitud; wxString stpath; }; #endif //__noname__ nautic-1.5/coordinate.h0000644000175000017500000000552511556005075015035 0ustar moellermoeller/* * coordinates.h - Structs and declarations for coordinate xforms * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _COORDINATES_H_ #define _COORDINATES_H_ /* * Used for rectangular coordinates. The origin and orientation of the xy axes * are application specific. The xy plane could be the ecliptic or the Earth's * equator. */ struct rectangular_coordinates { double x; /* x-coordinate. The unit is application specific. */ double y; /* y-coordinate. The unit is application specific. */ double z; /* z-coordinate. The unit is application specific. */ }; /* Used for coordinates in the Earth's equatorial frame. */ struct equatorial_coordinates { double right_ascension; /* Right ascension in radians. */ double declination; /* Declination in radians. */ }; /* Used for ecliptic coordinates. The origin is application specific. */ struct ecliptic_coordinates { double longitude; /* Longitude in radians. */ double latitude; /* Latitude in radians. */ }; /* Used for horizontal coordinates. */ struct horizontal_coordinates { double azimuth; /* Azimuth in radians. Clockwise from the South. */ double altitude; /* Altitude in radians. */ }; void rectangular_to_spherical(struct rectangular_coordinates *pla, struct rectangular_coordinates *ear, double *lon, double *lat, double *rad); void spherical_to_rectangular(double lon, double lat, double rad, struct rectangular_coordinates *rec); double phase_angle(struct rectangular_coordinates *obj, struct rectangular_coordinates *ear); void equatorial_to_ecliptic(struct equatorial_coordinates *equ, double obl, struct ecliptic_coordinates *ecl); void ecliptic_to_equatorial(struct ecliptic_coordinates *ecl, double obl, struct equatorial_coordinates *equ); void equatorial_to_horizontal(double ha, double decl, double lat, struct horizontal_coordinates *hor); void horizontal_to_equatorial(struct horizontal_coordinates *hor, double lat, double *ha, double *decl); void rotate_rectangular(double mat[3][3], struct rectangular_coordinates *pos); void rotate_equatorial(double mat[3][3], struct equatorial_coordinates *pos); void rotate_ecliptic_to_equator(double obl, struct rectangular_coordinates *pos); #endifnautic-1.5/plot_dialog.h0000644000175000017500000000754711747727162015223 0ustar moellermoeller/* Plot_dialog.h sky view Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef _PLOTDIALOG_ #define _PLOTDIALOG_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //////////////////////// #include "sun.h" #include "stars.h" #include "starpos.h" #include "moon.h" class Plot_dialog : public wxDialog { //DECLARE_DYNAMIC_CLASS(Plot_dialog ) public: Plot_dialog(); Plot_dialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Stars position"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(750,400), long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER); ~Plot_dialog(); ////////////////////////////variable//////////////////////////////////////////// double dYear ; double dMonth; double dDay; double dHour; double dMinute; double dSeconds; double latitud; double longitud; protected: wxStaticBitmap* m_bitmap3; virtual void OnPaint( wxPaintEvent& event );// { event.Skip(); } virtual void OnLeftMouseClick( wxMouseEvent& event ); virtual void OnMotion( wxMouseEvent& event ); virtual void OnLeftMouseUp( wxMouseEvent& event ); //variable wxPoint centre_toppoint; wxPoint centre_bottompoint; wxPoint east_toppoint; wxPoint east_bottompoint; wxPoint south_toppoint; wxPoint south_bottompoint; wxPoint north_toppoint; wxPoint north_bottompoint; wxPoint west_toppoint; wxPoint west_bottompoint; int point_from_centre_span; private: ////////////////////function/////////////////////////////// void Calc_sun_data(double* azimuth, double* alt, double *GHA); void Calc_moon_data(double* azimuth, double* alt, double *GHA); void Calc_planet_data(double* azimuth, double *alt, int iChoice, wxString* name); void Calc_star_data(double* azimuth, double* alt, int a, wxString* name); void Draw_sun(wxPaintDC * dc, wxPoint point, double altitude); void Draw_compass(wxPaintDC * dc, wxPoint point); void Draw_moon(wxPaintDC* dc, wxPoint point, double altitude, double GHA); void Draw_planet(wxPaintDC*dc, wxPoint point, double altitude, wxString name); void Draw_star(wxPaintDC*dc, wxPoint point, double altitude, wxString name); void Draw_alt(wxPaintDC*dc, wxPoint point); wxPoint Calc_draw_coordinate(double azimuth, double alt); wxCursor open_cursor; wxCursor close_cursor; //////////////////////variables///////////////////////////// double declination; double CoArect; double moon_alt; double moon_tm; double sun_alt; double sun_gha; //////////////tempo siderale///////////////////////// double Ts; double altitude; double azth; double RA; double LHA; double equinox; double loctime; double t; double lamda; double beta; double parlax; double smdiam; wxString bodyname; wxString constell; }; #endif // PLOTDIALOG nautic-1.5/depcomp0000777000175000017500000000000011646752210021625 2/usr/share/automake-1.11/depcompustar moellermoellernautic-1.5/missing0000777000175000017500000000000011646752210021671 2/usr/share/automake-1.11/missingustar moellermoellernautic-1.5/about.h0000644000175000017500000000352311556005075014014 0ustar moellermoeller////////////////////////////////////////////////////////////////////////// // /* about.h - about dialog routines * Copyright (C) 2011 Enas Giovanni * * This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ /////////////////////////////////////////////////////////////////////////// #ifndef __ABOUTDLG__ #define __ABOUTDLG__ #include #include #include #include #include #include #include #include #include /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /// Class AboutDialog /////////////////////////////////////////////////////////////////////////////// class AboutDialog : public wxDialog { private: protected: // Virtual event handlers, overide them in your derived class virtual void OnPaint( wxPaintEvent& event ); public: AboutDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Nautic Almanac"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400,250), long style = wxDEFAULT_DIALOG_STYLE ); ~AboutDialog(); }; #endif //__noname__ nautic-1.5/un_known_star.h0000644000175000017500000000227711556005075015576 0ustar moellermoeller/* un_known_star.h unknown star header file Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef UNKNOWNSTAR_H #define UNKNOWNSTAR_H #include #include #include #include #include #include class UnKnownStar { public: UnKnownStar(); virtual ~UnKnownStar(); wxString calc_bounds(double alt, double azth,double SDT,double Lat); int getstar(struct star *el); FILE * fincat(char * name,int n,char * str1,char * str2 ); }; #endif // UNKNOWNSTAR_H nautic-1.5/stars.h0000644000175000017500000000315311556005075014035 0ustar moellermoeller/* stars.h star data Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef STARS_H #define STARS_H #include #include #include #include "sofa.h" #include "sofam.h" #include "sun.h" #include "aberration.h" #include "kepler.h" #include "coordinate.h" #include "nutation.h" #include "precession.h" #include "starpos.h" WX_DECLARE_OBJARRAY(float,wxFloatArray); class Stars { public: Stars(); virtual ~Stars(); wxDateTime time; wxArrayString astronames; wxArrayString stars; double Ts; double co_rect; double declin; double CalcAriesSideralTime(int Y,int Mo,int D,int hr,int min,int sec); double CalcVariation(int Y,int Mo,int D,int hr,int min,int sec); double delta_ecl; double delta_lon; double GMST; double equinox; double delta_psi (double JDArg); double RA ; double Dec; double lon; double lat; wxString constellation; wxString starname; private: }; #endif // STARS_H nautic-1.5/sun.h0000644000175000017500000000313311742303306013477 0ustar moellermoeller/* sun.h sun routines Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #ifndef SUN_H #define SUN_H #include #include #include #include "stars.h" //#include "sofa.h" //#include "sofam.h" #include "fund_args.h" #include "orbital_elements.h" #include "delta_t.h" #include "spa.h" #include "starpos.h" class Sun { public: Sun(); virtual ~Sun(); double CalcDeclination(int Y,int Mo,int D,int hr,int min,int sec); double CalcCoAscention(int Y,int Mo,int D,int hr,int min,int sec); double GHAAries(int Y,int Mo,int D,int hr,int min,int sec); double CalcSunPos(float d); int GetDayofYear(int year, int month, int day); wxString whatconstel (double Ra,double dec); wxString stConst; double lonsun; double Ts; double declination; double GHAsun; double RA; double jd; double beta; double lamda; double prlx; Starpos plan; private: double xs; double ys; }; #endif // SUN_H nautic-1.5/configure.ac0000644000175000017500000000322311554101241015002 0ustar moellermoeller# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) AC_INIT([nautic], [1.2], [gio.enas@alice.it]) AM_INIT_AUTOMAKE([nautic], [1.2]) AC_CONFIG_SRCDIR([sofam.h]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CXX AC_PROG_CC #PKG_CHECK_MODULES([WXWIDGETS], [gtk+-2.0 >= 1.3.5 libwxgtk2.8-0 >= 1.8.4 libwxbase2.8-0 >= 1.8.4]) # Checks for libraries. AM_OPTIONS_WXCONFIG reqwx=1.8.0 AM_PATH_WXCONFIG($reqwx, wxWin=1) if test "$wxWin" != 1; then AC_MSG_ERROR([ wxWidgets must be installed on your system. Please check that wx-config is in path, the directory where wxWidgets libraries are installed (returned by 'wx-config --libs' or 'wx-config --static --libs' command) is in LD_LIBRARY_PATH or equivalent variable and wxWidgets version is $reqwx or above. ]) fi CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" LIBS="$LIBS $WX_LIBS" #AC_CHECK_LIB([libwx_gtk2u_xrc-2.8.so.0 libwx_gtk2u_html-2.8.so.0 libwx_gtk2u_qa-2.8.so.0 libwx_gtk2u_adv-2.8.so.0 # libwx_gtk2u_core-2.8.so.0 libwx_baseu_xml-2.8.so.0 libwx_baseu_net-2.8.so.0 libwx_baseu-2.8.so.0 libstdc++.so.6 # libm.so.6 libgomp.so.1 libgcc_s.so.1 libpthread.so.0 libc.so.6]) # Checks for header files. AC_CHECK_HEADERS([memory.h stdlib.h string.h wx.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([floor memset pow sqrt]) AC_OUTPUT(Makefile src/Makefile info/Makefile data/Makefile man/Makefile icon/Makefile) nautic-1.5/debian/0000755000175000017500000000000011750006730013743 5ustar moellermoellernautic-1.5/debian/rules0000755000175000017500000000134311724747475015047 0ustar moellermoeller#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ override_dh_clean: dh_clean rm -f config.guess config.sub config.log config.status $(RM) ltmain.sh Makefile.in configure $(RM) aclocal.m4 data/Makefile.in icon/Makefile.in $(RM) info/Makefile.in man/Makefile.in src/Makefile.in override_dh_auto_configure: autoreconf -fs dh_auto_configure nautic-1.5/debian/README.source0000644000175000017500000000015711616353717016140 0ustar moellermoellernautic ====== The source tarball was unpacked in a new folder named nautic- and then tared up again. nautic-1.5/debian/manpages0000644000175000017500000000002011616355572015465 0ustar moellermoellerdebian/nautic.1 nautic-1.5/debian/watch0000644000175000017500000000010111724747357015006 0ustar moellermoellerversion=3 http://sf.net/nauticalmanac/nautic_(.+)\.orig\.tar\.gz nautic-1.5/debian/control0000644000175000017500000000206511724747662015372 0ustar moellermoellerSource: nautic Section: science Priority: optional Maintainer: Enas Giovanni DM-Upload-Allowed: yes Build-Depends: debhelper (>= 7.0.50~), autoconf(>= 2.13), automake, autotools-dev, libglib2.0-0,wx-common, libwxgtk2.8-0( >= 1.8.4),libwxbase2.8-0( >= 1.8.4),libwxgtk2.8-dev,wx2.8-headers,libwxbase2.8-dev Standards-Version: 3.9.2 Homepage: https://sourceforge.net/projects/nauticalmanac/ Package: nautic Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: computation of observer position in astro-navigation Nautical ephemeris are included until 2030 with no relevant error for all navigational bodies, 56 stars, Sun, Moon and 4 major planets. The local meridan time can be computed directly from time UT: sextant altitude correction is computed automatically after inserting the value of height of eye with the correction tables of the Admiralty Nautical Almanac. . A plotting sheet reports the calculated position and bodies' position lines. An info window indicates the body's most important celestial parameters. nautic-1.5/debian/menu0000644000175000017500000000023711553007723014640 0ustar moellermoeller?package(nautic):needs="X11" section="Applications/Science/Astronomy"\ title="Nautic Almanac" command="/usr/bin/nautic"\ icon="/usr/share/pixmaps/sext.xpm" nautic-1.5/debian/nautic.10000644000175000017500000000147111616357515015326 0ustar moellermoeller.TH NAUTIC 1 "March 12, 2011" .SH NAME nautic \- A program to find observer position .SH SYNOPSIS .B nautic .RI [ options ] " files" ... .br .B bar .RI [ options ] " files" ... .SH DESCRIPTION program to compute the observer position in astro-navigation, needs a knowlege about the use of data to find the observer's position, easy to use, compute the ephemeris of 56 major stars and navigational planets. .B nautic .SH OPTIONS This package has no options, and is controlled entirely through its graphical user interface. .SH AUTHOR This manpage was written by Enas Giovanni .SH HOMPEAGE The nautic_almanac homepage may be found at https://sourceforge.net/projects/nauticalmanac/ .PP This manual page was written by Enas Giovanni , for the Debian project (and may be used by others). nautic-1.5/debian/changelog0000644000175000017500000000365111750006622015622 0ustar moellermoellernautic (1.5-1) unstable; urgency=low *new issue with new view and major changes -- Enas Giovanni Tue, 01 May 2012 07:10:31 +0200 nautic (1.4-2) unstable; urgency=low * fixed problem with GUI -- Enas Giovanni Sun, 09 Mar 2012 09:27:00 +0100 nautic (1.4-1) unstable; urgency=low * new upstream release (Closes: #662221) -- Enas Giovanni Mon, 05 Mar 2012 07:33:48 +0100 nautic (1.3-7) unstable; urgency=low * Bug correction (Closes: #637689) -- Enas Giovanni Sat, 15 Oct 2011 20:00:00 +0200 nautic (1.3-6) unstable; urgency=low * Control file adjustments - adding build-dep - ordered build deps alphabetically -- Enas Giovanni Sun, 03 Sep 2011 20:00:00 +0200 nautic (1.3-5) unstable; urgency=low * Further autoconf adjustments -- Enas Giovanni Sun, 27 Aug 2011 09:00:00 +0200 nautic (1.3-4) unstable; urgency=low * Further improvements to code bug -- Enas Giovanni Thur, 25 Aug 2011 14:00:00 +0200 nautic (1.3-3) unstable; urgency=low * Further improvements to copyright -- Enas Giovanni Tue, 12 Jul 2011 18:20:00 +0200 nautic (1.3-2) unstable; urgency=low * First reactions to rejection by FTPmasters -- Enas Giovanni Wed, 02 Jul 2011 18:20:00 +0200 nautic (1.3-1) unstable; urgency=low * manual page available in man/nautic.1 -- Enas Giovanni Wed, 02 Jul 2011 14:20:00 +0200 nautic (1.2-2) unstable; urgency=low * manual page available in man/nautic.1 -- Enas Giovanni Wed, 27 Apr 2011 14:20:00 +0200 nautic (1.2-1) unstable; urgency=low * Initial release (Closes: #622760) * Fix missing-debian-source-format lintian warning. * Switch to dpkg-source 3.0 (quilt) format -- Enas Giovanni Sat, 16 Apr 2011 16:34:24 +0200 nautic-1.5/debian/copyright0000644000175000017500000001254411616355265015717 0ustar moellermoellerThis work was packaged for Debian by: Enas Giovanni on Fri, 15 Apr 2011 22:32:24 +0200 It was downloaded from https://sourceforge.net/projects/nauticalmanac Files: * Author: Enas Giovanni Copyright: (C) 2011 Enas Giovanni License: GPL-3 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . The origial license file is avilable in Debian see `/usr/share/common-licenses/GPL-3'. Files: sofa.h, stars.cpp. sofa.cpp Copyright: Copyright (C) 2010 Standards Of Fundamental Astronomy Board of the International Astronomical Union. License: This program uses SOFA Software and routine for implementing data calculation the responsibility for malfunctioning is of the Author of this program alone. This program uses and is subject to the following SOFA licence: ===================== SOFA Software License ===================== NOTICE TO USER: BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING TERMS AND CONDITIONS WHICH APPLY TO ITS USE. 1. The Software is owned by the IAU SOFA Board ("SOFA"). 2. Permission is granted to anyone to use the SOFA software for any purpose, including commercial applications, free of charge and without payment of royalties, subject to the conditions and restrictions listed below. 3. You (the user) may copy and distribute SOFA source code to others, and use and adapt its code and algorithms in your own software, on a world-wide, royalty-free basis. That portion of your distribution that does not consist of intact and unchanged copies of SOFA source code files is a "derived work" that must comply with the following requirements: a) Your work shall be marked or carry a statement that it (i) uses routines and computations derived by you from software provided by SOFA under license to you; and (ii) does not itself constitute software provided by and/or endorsed by SOFA. b) The source code of your derived work must contain descriptions of how the derived work is based upon, contains and/or differs from the original SOFA software. c) The name(s) of all routine(s) in your derived work shall not include the prefix "iau". d) The origin of the SOFA components of your derived work must not be misrepresented; you must not claim that you wrote the original software, nor file a patent application for SOFA software or algorithms embedded in the SOFA software. e) These requirements must be reproduced intact in any source distribution and shall apply to anyone to whom you have granted a further right to modify the source code of your derived work. Note that, as originally distributed, the SOFA software is intended to be a definitive implementation of the IAU standards, and consequently third-party modifications are discouraged. All variations, no matter how minor, must be explicitly marked as such, as explained above. 4. In any published work or commercial products which includes results achieved by using the SOFA software, you shall acknowledge that the SOFA software was used in obtaining those results. 5. You shall not cause the SOFA software to be brought into disrepute, either by misuse, or use for inappropriate tasks, or by inappropriate modification. 6. The SOFA software is provided "as is" and SOFA makes no warranty as to its use or performance. SOFA does not and cannot warrant the performance or results which the user may obtain by using the SOFA software. SOFA makes no warranties, express or implied, as to non-infringement of third party rights, merchantability, or fitness for any particular purpose. In no event will SOFA be liable to the user for any consequential, incidental, or special damages, including any lost profits or lost savings, even if a SOFA representative has been advised of such damages, or for any claim by any third party. 7. The provision of any version of the SOFA software under the terms and conditions specified herein does not imply that future versions will also be made available under the same terms and conditions. Correspondence concerning SOFA software should be addressed as follows: By email: sofa@ukho.gov.uk By post: IAU SOFA Center HM Nautical Almanac Office UK Hydrographic Office Admiralty Way, Taunton Somerset, TA1 2DN United Kingdom nautic-1.5/debian/compat0000644000175000017500000000000211603613500015135 0ustar moellermoeller7 nautic-1.5/debian/source/0000755000175000017500000000000011616357531015254 5ustar moellermoellernautic-1.5/debian/source/format0000644000175000017500000000001411646752210016456 0ustar moellermoeller3.0 (quilt) nautic-1.5/precession.h0000644000175000017500000000173711607071655015065 0ustar moellermoeller/* * iau2006_precession.h - Declarations for the IAU 2006 precession model * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _GE2006_PRECESSION_H_ #define _GE2006_PRECESSION_H_ #include "julian_date.h" void ge2006_precession_matrix(struct julian_date *tdb, int toJ2000, double prec_matrix[3][3]); #endifnautic-1.5/addings.h0000644000175000017500000000322611556005075014313 0ustar moellermoeller/* addings.h - addings Copyright (C) 2011 Enas Giovanni This file is part of Nautic. Nautic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Nautic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Nautic. If not, see . */ #include #include #include #define DEMO 0 #define TABSTART 1620 #define TABEND 2013 #define TABSIZ (TABEND - TABSTART + 1) #define RTOH (12.0/PI) #define mods3600(x) ((x) - 1.296e6 * floor ((x)/1.296e6)) #define mod3600(x) ((x) - 1296000. * floor ((x)/1296000.)) #define DISFAC 2.3454780e4 /* cosine of 90 degrees 50 minutes: */ #define COSSUN -0.014543897651582657 /* cosine of 90 degrees 34 minutes: */ #define COSZEN -9.8900378587411476e-3 #define PI 3.14159265358979323846 #define RTS 2.0626480624709635516e5 #define DTR 1.7453292519943295769e-2 #define RTD 5.7295779513082320877e1 /* arc seconds per radian */ #define STR 4.8481368110953599359e-6 /* radians per arc second */ #define J2000 2451545.0 /* 2000 January 1.5 */ #define B1950 2433282.423 /* 1950 January 0.923 Besselian epoch */ #define J1900 2415020.0 /* 1900 January 0, 12h UT */ int kinit(); nautic-1.5/data/0000755000175000017500000000000011750006215013430 5ustar moellermoellernautic-1.5/data/stnam0000755000175000017500000001126411516571276014522 0ustar moellermoeller2000 02 58 15,696 -40 18 16,97 -0,391 1,94 12,0 0,0280 3,42 Acamar 771 2000 01 37 42,852 -57 14 12,18 1,173 -3,47 16,0 0,0230 0,46 Achernar 334 2000 12 26 35,871 -63 05 56,58 -0,524 -1,21 -11,0 0,0000 1,58 Acrux 2745 2000 06 58 37,548 -28 58 19,50 0,031 0,28 27,0 0,0000 1,50 Adhara 3666 2000 04 35 55,237 16 30 33,39 0,439 -18,97 54,0 0,0480 0,85 Aldebaran 629 2000 12 54 1,748 55 57 35,47 1,328 -0,58 -9,0 0,0090 1,77 Alioth 1627 2000 13 47 32,434 49 18 47,95 -1,249 -1,09 -11,0 0,0350 1,86 Alkaid 2027 2000 02 03 54,720 42 19 51,41 3,700 -5,700 -14,0 0,009 4,84 Almak 395 2000 22 08 14,000 -46 57 39,59 1,259 -15,10 12,0 0,0510 1,74 Al_Nair 14063 2000 05 36 12,809 -01 12 7,02 0,006 -0,24 26,0 0,0000 1,70 Alnilam 969 2000 09 27 35,247 -08 39 31,15 -0,093 3,28 -4,0 0,0170 1,98 Alphard 2680 2000 15 34 41,276 26 42 52,94 0,906 -8,86 2,0 0,0430 2,23 Alphecca 2512 2000 00 08 23,265 29 05 25,58 1,039 -16,33 -12,0 0,0240 2,06 Alpheraz 4 2000 19 50 47,002 08 52 6,03 3,629 38,63 -26,3 0,1981 0,77 Altair 4236 2000 00 26 17,030 -42 18 21,81 1,833 -39,57 75,0 0,0350 2,39 Ankaa 116 2000 16 29 24,439 -26 25 55,15 -0,071 -2,03 -3,0 0,0190 0,96 Antares 11359 2000 14 15 39,677 19 10 56,71 -7,714 -199,84 -5,0 0,0900 -0,04 Arcturus 2777 2000 16 48 39,869 -69 01 39,82 0,260 -3,40 -3,0 0,0240 1,92 Atria 2822 2000 08 22 30,833 -59 30 34,51 -0,346 1,44 2,0 0,0000 1,86 Avio 1032 2000 05 25 7,857 06 20 58,74 -0,059 -1,39 18,0 0,0260 1,64 Bellatrix 919 2000 05 55 10,307 07 24 25,35 0,173 0,87 21,0 0,0050 0,50 Betelgeuse 1055 2000 06 23 57,119 -52 41 44,50 0,245 2,07 21,0 0,0180 -0,72 Canopus 914 2000 05 16 41,353 45 59 52,90 0,728 -42,47 30,0 0,0730 0,08 Capella 1077 2000 07 34 36,000 31 53 19,00 -0,172 -0,099 -1,0 0,0675 2,88 Castor 1581 2000 12 56 01,700 38 19 06,00 -0,234 0,056 -3,0 0,027 2,90 Cor_Caroli 4914 2000 20 41 25,917 45 16 49,31 0,027 0,23 -5,0 0,0000 1,25 Deneb 3541 2000 11 49 3,580 14 34 19,35 -3,422 -11,41 0,0 0,0760 2,14 Denebola 2383 2000 00 43 35,372 -17 59 11,82 1,637 3,25 13,0 0,0570 2,04 Diphda 115 2000 11 03 43,666 61 45 3,22 -1,675 -6,65 -9,0 0,0310 1,79 Dubhe 1161 2000 05 26 17,511 28 36 26,67 0,169 -17,51 9,0 0,0180 1,65 Elnath 795 2000 17 56 36,367 51 29 20,21 -0,081 -1,94 -28,0 0,0170 2,23 Eltanin 2282 2000 21 44 11,164 09 52 29,92 0,207 -0,06 5,0 0,0060 2,39 Enif 4891 2000 22 57 39,055 -29 37 20,10 2,551 -16,47 7,0 0,1440 1,16 Fomalhaut 19370 2000 12 31 9,929 -57 06 47,50 0,285 -26,23 21,0 0,0000 1,63 Gacrux 5272 2000 12 15 48,366 -17 32 30,97 -1,124 2,33 -4,0 0,0000 2,59 Gienah 3424 2000 14 03 49,408 -60 22 22,79 -0,426 -1,93 6,0 0,0160 0,61 Hadar 5365 2000 02 07 10,403 23 27 44,66 1,383 -14,83 -14,0 0,0430 2,00 Hamal 306 2000 18 24 10,327 -34 23 4,73 -0,309 -12,41 -15,0 0,0150 1,85 Kaus_Australis 12784 2000 14 50 42,346 74 09 19,78 -0,763 1,22 17,0 0,0310 2,08 Kokhab 595 2000 23 04 45,658 15 12 18,90 0,436 -4,25 -4,0 0,0300 2,49 Markab 4926 2000 03 02 16,773 04 05 22,93 -0,063 -7,80 -26,0 0,0090 2,53 Menkar 419 2000 14 06 40,951 -36 22 12,03 -4,293 -51,90 1,0 0,0590 2,06 Menkent 9260 2000 11 01 50,500 56 22 57,00 8,166 3,37 -12,0 0,0410 2,34 Merak 1302 2000 09 13 11,957 -69 43 1,95 -3,108 10,78 -5,0 0,0380 1,68 Miraplacidus 1023 2000 03 24 19,365 49 51 40,34 0,246 -2,46 -2,0 0,0290 1,80 Mirfak 917 2000 13 23 55,500 54 55 31,00 12,123 -2,20 -9,0 0,0417 2,23 Mizar 1603 2000 18 55 15,924 -26 17 48,23 0,099 -5,42 -11,0 0,0000 2,02 Nunki 13595 2000 20 25 38,852 -56 44 6,38 0,082 -8,91 2,0 0,0000 1,94 Peacock 9674 2000 05 39 38,939 -34 04 26,78 -0,010 -2,40 35,0 0,0121 2,60 Phact 215 2000 02 31 48,704 89 15 50,72 19,877 -1,52 -17,0 0,0070 2,02 Polaris 8 2000 07 45 18,946 28 01 34,26 -4,740 -4,59 3,0 0,0930 1,14 Pollux 1463 2000 07 39 18,113 05 13 30,06 -4,755 -102,29 -3,0 0,2880 0,38 Procyon 1739 2000 17 34 56,076 12 33 36,14 0,822 -22,64 13,0 0,0560 2,08 Ras_Alhague 3252 2000 10 08 22,315 11 58 1,89 -1,693 0,64 6,0 0,0390 1,35 Regulus 2149 2000 05 14 32,268 -08 12 5,98 0,003 -0,13 21,0 0,0130 0,12 Rigel 1063 2000 14 39 35,885 -60 50 7,44 -49,826 69,93 -22,2 0,7516 -0,01 Rigil_Kentaurus 5483 2000 17 10 22,681 -15 43 29,71 0,260 9,50 -1,0 0,0520 2,43 Sabik 4467 2000 05 47 45,400 -09 40 11,00 0,155 -0,12 21,0 0,0005 2,06 Saiph 220 2000 00 40 30,450 56 32 14,46 0,636 -3,19 -4,0 0,0160 2,23 Sheddar 139 2000 21 47 02,400 -16 07 38,00 1,830 -29,70 -6,0 0,0870 2,87 Sheddi 819 2000 17 33 36,534 -37 06 13,72 -0,011 -2,92 -3,0 0,0000 1,63 Shaula 11673 2000 06 45 8,871 -16 42 57,99 -3,847 -120,53 -7,6 0,3751 -1,46 Sirius 1591 2000 13 25 11,587 -11 09 40,71 -0,278 -2,83 1,0 0,0210 0,97 Spica 3672 2000 09 07 59,776 -43 25 57,38 -0,172 1,27 18,0 0,0150 2,21 Suhail 4990 2000 18 36 56,332 38 47 1,17 1,726 28,61 -14,0 0,1230 0,03 Vega 3238 2000 14 50 52,713 -16 02 30,42 -0,734 -6,68 -10,0 0,0490 2,75 Zuben_el_Genubi 3966 nautic-1.5/data/star0000755000175000017500000001216411516103662014337 0ustar moellermoeller2000 02 58 15,696 -40 18 16,97 -0,391 1,94 12,0 0,0280 3,42 theta-Eridani 771 2000 01 37 42,852 -57 14 12,18 1,173 -3,47 16,0 0,0230 0,46 alpha-Eridani 334 2000 12 26 35,871 -63 05 56,58 -0,524 -1,21 -11,0 0,0000 1,58 alpha-Crucis 2745 2000 06 58 37,548 -28 58 19,50 0,031 0,28 27,0 0,0000 1,50 eps-Canis_Major 3666 2000 04 35 55,237 16 30 33,39 0,439 -18,97 54,0 0,0480 0,85 alpha-Taurus 629 2000 12 54 1,748 55 57 35,47 1,328 -0,58 -9,0 0,0090 1,77 eps-Ursa_Major 1627 2000 13 47 32,434 49 18 47,95 -1,249 -1,09 -11,0 0,0350 1,86 eta-Ursa_Major 2027 2000 02 03 54,720 42 19 51,41 3,700 -5,700 -14,0 0,009 4,84 gamma-Andromedae 395 2000 22 08 14,000 -46 57 39,59 1,259 -15,10 12,0 0,0510 1,74 alpha-Gruis 14063 2000 05 36 12,809 -01 12 7,02 0,006 -0,24 26,0 0,0000 1,70 eps-Orionis 969 2000 09 27 35,247 -08 39 31,15 -0,093 3,28 -4,0 0,0170 1,98 alpha-Hydrae 2680 2000 15 34 41,276 26 42 52,94 0,906 -8,86 2,0 0,0430 2,23 alpha-Cor_Borealis 2512 2000 00 08 23,265 29 05 25,58 1,039 -16,33 -12,0 0,0240 2,06 alpha-Andromedae 4 2000 19 50 47,002 08 52 6,03 3,629 38,63 -26,3 0,1981 0,77 alpha-Aquilae 4236 2000 00 26 17,030 -42 18 21,81 1,833 -39,57 75,0 0,0350 2,39 alpha-Phoenix 116 2000 16 29 24,439 -26 25 55,15 -0,071 -2,03 -3,0 0,0190 0,96 alpha-Scorpii 11359 2000 14 15 39,677 19 10 56,71 -7,714 -199,84 -5,0 0,0900 -0,04 alpha-Boote 2777 2000 16 48 39,869 -69 01 39,82 0,260 -3,40 -3,0 0,0240 1,92 alpha-Triangulus_Aus 2822 2000 08 22 30,833 -59 30 34,51 -0,346 1,44 2,0 0,0000 1,86 eps-Carinae 1032 2000 05 25 7,857 06 20 58,74 -0,059 -1,39 18,0 0,0260 1,64 gamma-Orionis 919 2000 05 55 10,307 07 24 25,35 0,173 0,87 21,0 0,0050 0,50 alpha-Orionis 1055 2000 06 23 57,119 -52 41 44,50 0,245 2,07 21,0 0,0180 -0,72 alpha-Carinae 914 2000 05 16 41,353 45 59 52,90 0,728 -42,47 30,0 0,0730 0,08 alpha-Auriga 1077 2000 07 34 36,000 31 53 19,00 -0,172 -0,099 -1,0 0,0675 2,88 alpha-Gemini 1581 2000 12 56 01,700 38 19 06,00 -0,234 0,056 -3,0 0,027 2,90 alpha-Canis_Venator 4914 2000 20 41 25,917 45 16 49,31 0,027 0,23 -5,0 0,0000 1,25 alpha-Cycnus 3541 2000 11 49 3,580 14 34 19,35 -3,422 -11,41 0,0 0,0760 2,14 beta-Leo 2383 2000 00 43 35,372 -17 59 11,82 1,637 3,25 13,0 0,0570 2,04 beta-Ceti 115 2000 11 03 43,666 61 45 3,22 -1,675 -6,65 -9,0 0,0310 1,79 alpha-Ursa_Major 1161 2000 05 26 17,511 28 36 26,67 0,169 -17,51 9,0 0,0180 1,65 beta-Taurus 795 2000 17 56 36,367 51 29 20,21 -0,081 -1,94 -28,0 0,0170 2,23 gamma-Draconis 2282 2000 21 44 11,164 09 52 29,92 0,207 -0,06 5,0 0,0060 2,39 eps-Pegasi 4891 2000 22 57 39,055 -29 37 20,10 2,551 -16,47 7,0 0,1440 1,16 alpha-Piscis_Austrinis 19370 2000 12 31 9,929 -57 06 47,50 0,285 -26,23 21,0 0,0000 1,63 gamma-Crucis 5272 2000 12 15 48,366 -17 32 30,97 -1,124 2,33 -4,0 0,0000 2,59 gamma-Corvi 3424 2000 14 03 49,408 -60 22 22,79 -0,426 -1,93 6,0 0,0160 0,61 beta-Centauri 5365 2000 02 07 10,403 23 27 44,66 1,383 -14,83 -14,0 0,0430 2,00 alpha-Arietis 306 2000 18 24 10,327 -34 23 4,73 -0,309 -12,41 -15,0 0,0150 1,85 eps-Sagittarii 12784 2000 14 50 42,346 74 09 19,78 -0,763 1,22 17,0 0,0310 2,08 beta-Ursa_Minor 595 2000 23 04 45,658 15 12 18,90 0,436 -4,25 -4,0 0,0300 2,49 alpha-Pegasus 4926 2000 03 02 16,773 04 05 22,93 -0,063 -7,80 -26,0 0,0090 2,53 alpha-Cetii 419 2000 14 06 40,951 -36 22 12,03 -4,293 -51,90 1,0 0,0590 2,06 theta-Centaurii 9260 2000 11 01 50,500 56 22 57,00 8,166 3,37 -12,0 0,0410 2,34 beta-Ursa_Major 1302 2000 09 13 11,957 -69 43 1,95 -3,108 10,78 -5,0 0,0380 1,68 beta-Carinae 1023 2000 03 24 19,365 49 51 40,34 0,246 -2,46 -2,0 0,0290 1,80 alpha-Perseus 917 2000 13 23 55,500 54 55 31,00 12,123 -2,20 -9,0 0,0417 2,23 theta-Ursa_Major 1603 2000 18 55 15,924 -26 17 48,23 0,099 -5,42 -11,0 0,0000 2,02 sigma-Sagittarii 13595 2000 20 25 38,852 -56 44 6,38 0,082 -8,91 2,0 0,0000 1,94 alpha-Pavonis 9674 2000 05 39 38,939 -34 04 26,78 -0,010 -2,40 35,0 0,0121 2,60 alpha-Columbae 215 2000 02 31 48,704 89 15 50,72 19,877 -1,52 -17,0 0,0070 2,02 alpha-Ursa_Minor 8 2000 07 45 18,946 28 01 34,26 -4,740 -4,59 3,0 0,0930 1,14 beta-Gemini 1463 2000 07 39 18,113 05 13 30,06 -4,755 -102,29 -3,0 0,2880 0,38 alpha-Canis_Minoris 1739 2000 17 34 56,076 12 33 36,14 0,822 -22,64 13,0 0,0560 2,08 alpha-Ophiuchi 3252 2000 10 08 22,315 11 58 1,89 -1,693 0,64 6,0 0,0390 1,35 alpha-Leo 2149 2000 05 14 32,268 -08 12 5,98 0,003 -0,13 21,0 0,0130 0,12 beta-Orionis 1063 2000 14 39 35,885 -60 50 7,44 -49,826 69,93 -22,2 0,7516 -0,01 alpha-Centaurii 5483 2000 17 10 22,681 -15 43 29,71 0,260 9,50 -1,0 0,0520 2,43 eta-Ophiuchi 4467 2000 05 47 45,400 -09 40 11,00 0,155 -0,12 21,0 0,0005 2,06 ka-Orionis 220 2000 00 40 30,450 56 32 14,46 0,636 -3,19 -4,0 0,0160 2,23 alpha-Cassiopeiae 139 2000 21 47 02,400 -16 07 38,00 1,830 -29,70 -6,0 0,0870 2,87 alpha-Capricornii 819 2000 17 33 36,534 -37 06 13,72 -0,011 -2,92 -3,0 0,0000 1,63 lamda-Scorpii 11673 2000 06 45 8,871 -16 42 57,99 -3,847 -120,53 -7,6 0,3751 -1,46 alpha-Canis_Major 1591 2000 13 25 11,587 -11 09 40,71 -0,278 -2,83 1,0 0,0210 0,97 alpha-Virgo 3672 2000 09 07 59,776 -43 25 57,38 -0,172 1,27 18,0 0,0150 2,21 lamda-Velorum 4990 2000 18 36 56,332 38 47 1,17 1,726 28,61 -14,0 0,1230 0,03 alpha-Lirae 3238 2000 14 50 52,713 -16 02 30,42 -0,734 -6,68 -10,0 0,0490 2,75 alpha-Librae 3966 nautic-1.5/data/Makefile.am0000644000175000017500000000006511554101241015462 0ustar moellermoellerdocdir = $(datadir)/@PACKAGE@ doc_DATA = star stnam nautic-1.5/sofa.h0000644000175000017500000004520611556005075013636 0ustar moellermoeller#ifndef SOFAHDEF #define SOFAHDEF /* ** - - - - - - - ** s o f a . h ** - - - - - - - ** ** Prototype function declarations for SOFA library. ** ** This file is part of the International Astronomical Union's ** SOFA (Standards Of Fundamental Astronomy) software collection. ** ** This revision: 2010 September 10 ** ** SOFA release YYYY-MM-DD ** ** Copyright (C) 2010 IAU SOFA Board. See notes at end. */ #include "math.h" #ifdef __cplusplus extern "C" { #endif /* Astronomy/Calendars */ int iauCal2jd(int iy, int im, int id, double *djm0, double *djm); double iauEpb(double dj1, double dj2); void iauEpb2jd(double epb, double *djm0, double *djm); double iauEpj(double dj1, double dj2); void iauEpj2jd(double epj, double *djm0, double *djm); int iauJd2cal(double dj1, double dj2, int *iy, int *im, int *id, double *fd); int iauJdcalf(int ndp, double dj1, double dj2, int iymdf[4]); /* Astronomy/Ephemerides */ int iauEpv00(double date1, double date2, double pvh[2][3], double pvb[2][3]); int iauPlan94(double date1, double date2, int np, double pv[2][3]); /* Astronomy/FundamentalArgs */ double iauFad03(double t); double iauFae03(double t); double iauFaf03(double t); double iauFaju03(double t); double iauFal03(double t); double iauFalp03(double t); double iauFama03(double t); double iauFame03(double t); double iauFane03(double t); double iauFaom03(double t); double iauFapa03(double t); double iauFasa03(double t); double iauFaur03(double t); double iauFave03(double t); /* Astronomy/PrecNutPolar */ void iauBi00(double *dpsibi, double *depsbi, double *dra); void iauBp00(double date1, double date2, double rb[3][3], double rp[3][3], double rbp[3][3]); void iauBp06(double date1, double date2, double rb[3][3], double rp[3][3], double rbp[3][3]); void iauBpn2xy(double rbpn[3][3], double *x, double *y); void iauC2i00a(double date1, double date2, double rc2i[3][3]); void iauC2i00b(double date1, double date2, double rc2i[3][3]); void iauC2i06a(double date1, double date2, double rc2i[3][3]); void iauC2ibpn(double date1, double date2, double rbpn[3][3], double rc2i[3][3]); void iauC2ixy(double date1, double date2, double x, double y, double rc2i[3][3]); void iauC2ixys(double x, double y, double s, double rc2i[3][3]); void iauC2t00a(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]); void iauC2t00b(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]); void iauC2t06a(double tta, double ttb, double uta, double utb, double xp, double yp, double rc2t[3][3]); void iauC2tcio(double rc2i[3][3], double era, double rpom[3][3], double rc2t[3][3]); void iauC2teqx(double rbpn[3][3], double gst, double rpom[3][3], double rc2t[3][3]); void iauC2tpe(double tta, double ttb, double uta, double utb, double dpsi, double deps, double xp, double yp, double rc2t[3][3]); void iauC2txy(double tta, double ttb, double uta, double utb, double x, double y, double xp, double yp, double rc2t[3][3]); double iauEo06a(double date1, double date2); double iauEors(double rnpb[3][3], double s); void iauFw2m(double gamb, double phib, double psi, double eps, double r[3][3]); void iauFw2xy(double gamb, double phib, double psi, double eps, double *x, double *y); void iauNum00a(double date1, double date2, double rmatn[3][3]); void iauNum00b(double date1, double date2, double rmatn[3][3]); void iauNum06a(double date1, double date2, double rmatn[3][3]); void iauNumat(double epsa, double dpsi, double deps, double rmatn[3][3]); void iauNut00a(double date1, double date2, double *dpsi, double *deps); void iauNut00b(double date1, double date2, double *dpsi, double *deps); void iauNut06a(double date1, double date2, double *dpsi, double *deps); void iauNut80(double date1, double date2, double *dpsi, double *deps); void iauNutm80(double date1, double date2, double rmatn[3][3]); double iauObl06(double date1, double date2); double iauObl80(double date1, double date2); void iauP06e(double date1, double date2, double *eps0, double *psia, double *oma, double *bpa, double *bqa, double *pia, double *bpia, double *epsa, double *chia, double *za, double *zetaa, double *thetaa, double *pa, double *gam, double *phi, double *psi); void iauPb06(double date1, double date2, double *bzeta, double *bz, double *btheta); void iauPfw06(double date1, double date2, double *gamb, double *phib, double *psib, double *epsa); void iauPmat00(double date1, double date2, double rbp[3][3]); void iauPmat06(double date1, double date2, double rbp[3][3]); void iauPmat76(double date1, double date2, double rmatp[3][3]); void iauPn00(double date1, double date2, double dpsi, double deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void iauPn00a(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void iauPn00b(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void iauPn06(double date1, double date2, double dpsi, double deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void iauPn06a(double date1, double date2, double *dpsi, double *deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3]); void iauPnm00a(double date1, double date2, double rbpn[3][3]); void iauPnm00b(double date1, double date2, double rbpn[3][3]); void iauPnm06a(double date1, double date2, double rnpb[3][3]); void iauPnm80(double date1, double date2, double rmatpn[3][3]); void iauPom00(double xp, double yp, double sp, double rpom[3][3]); void iauPr00(double date1, double date2, double *dpsipr, double *depspr); void iauPrec76(double ep01, double ep02, double ep11, double ep12, double *zeta, double *z, double *theta); double iauS00(double date1, double date2, double x, double y); double iauS00a(double date1, double date2); double iauS00b(double date1, double date2); double iauS06(double date1, double date2, double x, double y); double iauS06a(double date1, double date2); double iauSp00(double date1, double date2); void iauXy06(double date1, double date2, double *x, double *y); void iauXys00a(double date1, double date2, double *x, double *y, double *s); void iauXys00b(double date1, double date2, double *x, double *y, double *s); void iauXys06a(double date1, double date2, double *x, double *y, double *s); /* Astronomy/RotationAndTime */ double iauEe00(double date1, double date2, double epsa, double dpsi); double iauEe00a(double date1, double date2); double iauEe00b(double date1, double date2); double iauEe06a(double date1, double date2); double iauEect00(double date1, double date2); double iauEqeq94(double date1, double date2); double iauEra00(double dj1, double dj2); double iauGmst00(double uta, double utb, double tta, double ttb); double iauGmst06(double uta, double utb, double tta, double ttb); double iauGmst82(double dj1, double dj2); double iauGst00a(double uta, double utb, double tta, double ttb); double iauGst00b(double uta, double utb); double iauGst06(double uta, double utb, double tta, double ttb, double rnpb[3][3]); double iauGst06a(double uta, double utb, double tta, double ttb); double iauGst94(double uta, double utb); /* Astronomy/SpaceMotion */ int iauPvstar(double pv[2][3], double *ra, double *dec, double *pmr, double *pmd, double *px, double *rv); int iauStarpv(double ra, double dec, double pmr, double pmd, double px, double rv, double pv[2][3]); /* Astronomy/StarCatalogs */ void iauFk52h(double r5, double d5, double dr5, double dd5, double px5, double rv5, double *rh, double *dh, double *drh, double *ddh, double *pxh, double *rvh); void iauFk5hip(double r5h[3][3], double s5h[3]); void iauFk5hz(double r5, double d5, double date1, double date2, double *rh, double *dh); void iauH2fk5(double rh, double dh, double drh, double ddh, double pxh, double rvh, double *r5, double *d5, double *dr5, double *dd5, double *px5, double *rv5); void iauHfk5z(double rh, double dh, double date1, double date2, double *r5, double *d5, double *dr5, double *dd5); int iauStarpm(double ra1, double dec1, double pmr1, double pmd1, double px1, double rv1, double ep1a, double ep1b, double ep2a, double ep2b, double *ra2, double *dec2, double *pmr2, double *pmd2, double *px2, double *rv2); /* Astronomy/Geodetic/Geocentric */ int iauEform(int n, double *a, double *f); int iauGc2gd(int n, double xyz[3], double *elong, double *phi, double *height); int iauGc2gde(double a, double f, double xyz[3], double *elong, double *phi, double *height); int iauGd2gc(int n, double elong, double phi, double height, double xyz[3]); int iauGd2gce(double a, double f, double elong, double phi, double height, double xyz[3]); /* Astronomy/Timescales */ int iauD2dtf(char *scale, int ndp, double d1, double d2, int *iy, int *im, int *id, int ihmsf[4]); int iauDat(int iy, int im, int id, double fd, double *deltat); double iauDtdb(double date1, double date2, double ut, double elong, double u, double v); int iauDtf2d(char *scale, int iy, int im, int id, int ihr, int imn, double sec, double *d1, double *d2); int iauTaitt(double tai1, double tai2, double *tt1, double *tt2); int iauTaiut1(double tai1, double tai2, double dta, double *ut11, double *ut12); int iauTaiutc(double tai1, double tai2, double *utc1, double *utc2); int iauTcbtdb(double tcb1, double tcb2, double *tdb1, double *tdb2); int iauTcgtt(double tcg1, double tcg2, double *tt1, double *tt2); int iauTdbtcb(double tdb1, double tdb2, double *tcb1, double *tcb2); int iauTdbtt(double tdb1, double tdb2, double dtr, double *tt1, double *tt2); int iauTttai(double tt1, double tt2, double *tai1, double *tai2); int iauTttcg(double tt1, double tt2, double *tcg1, double *tcg2); int iauTttdb(double tt1, double tt2, double dtr, double *tdb1, double *tdb2); int iauTtut1(double tt1, double tt2, double dt, double *ut11, double *ut12); int iauUt1tai(double ut11, double ut12, double dta, double *tai1, double *tai2); int iauUt1tt(double ut11, double ut12, double dt, double *tt1, double *tt2); int iauUt1utc(double ut11, double ut12, double dut1, double *utc1, double *utc2); int iauUtctai(double utc1, double utc2, double *tai1, double *tai2); int iauUtcut1(double utc1, double utc2, double dut1, double *ut11, double *ut12); /* VectorMatrix/AngleOps */ void iauA2af(int ndp, double angle, char *sign, int idmsf[4]); void iauA2tf(int ndp, double angle, char *sign, int ihmsf[4]); int iauAf2a(int s, int ideg, int iamin, double asec, double *rad); double iauAnp(double a); double iauAnpm(double a); void iauD2tf(int ndp, double days, char *sign, int ihmsf[4]); int iauTf2a(int s, int ihour, int imin, double sec, double *rad); int iauTf2d(int s, int ihour, int imin, double sec, double *days); /* VectorMatrix/BuildRotations */ void iauRx(double phi, double r[3][3]); void iauRy(double theta, double r[3][3]); void iauRz(double psi, double r[3][3]); /* VectorMatrix/CopyExtendExtract */ void iauCp(double p[3], double c[3]); void iauCpv(double pv[2][3], double c[2][3]); void iauCr(double r[3][3], double c[3][3]); void iauP2pv(double p[3], double pv[2][3]); void iauPv2p(double pv[2][3], double p[3]); /* VectorMatrix/Initialization */ void iauIr(double r[3][3]); void iauZp(double p[3]); void iauZpv(double pv[2][3]); void iauZr(double r[3][3]); /* VectorMatrix/MatrixOps */ void iauRxr(double a[3][3], double b[3][3], double atb[3][3]); void iauTr(double r[3][3], double rt[3][3]); /* VectorMatrix/MatrixVectorProducts */ void iauRxp(double r[3][3], double p[3], double rp[3]); void iauRxpv(double r[3][3], double pv[2][3], double rpv[2][3]); void iauTrxp(double r[3][3], double p[3], double trp[3]); void iauTrxpv(double r[3][3], double pv[2][3], double trpv[2][3]); /* VectorMatrix/RotationVectors */ void iauRm2v(double r[3][3], double w[3]); void iauRv2m(double w[3], double r[3][3]); /* VectorMatrix/SeparationAndAngle */ double iauPap(double a[3], double b[3]); double iauPas(double al, double ap, double bl, double bp); double iauSepp(double a[3], double b[3]); double iauSeps(double al, double ap, double bl, double bp); /* VectorMatrix/SphericalCartesian */ void iauC2s(double p[3], double *theta, double *phi); void iauP2s(double p[3], double *theta, double *phi, double *r); void iauPv2s(double pv[2][3], double *theta, double *phi, double *r, double *td, double *pd, double *rd); void iauS2c(double theta, double phi, double c[3]); void iauS2p(double theta, double phi, double r, double p[3]); void iauS2pv(double theta, double phi, double r, double td, double pd, double rd, double pv[2][3]); /* VectorMatrix/VectorOps */ double iauPdp(double a[3], double b[3]); double iauPm(double p[3]); void iauPmp(double a[3], double b[3], double amb[3]); void iauPn(double p[3], double *r, double u[3]); void iauPpp(double a[3], double b[3], double apb[3]); void iauPpsp(double a[3], double s, double b[3], double apsb[3]); void iauPvdpv(double a[2][3], double b[2][3], double adb[2]); void iauPvm(double pv[2][3], double *r, double *s); void iauPvmpv(double a[2][3], double b[2][3], double amb[2][3]); void iauPvppv(double a[2][3], double b[2][3], double apb[2][3]); void iauPvu(double dt, double pv[2][3], double upv[2][3]); void iauPvup(double dt, double pv[2][3], double p[3]); void iauPvxpv(double a[2][3], double b[2][3], double axb[2][3]); void iauPxp(double a[3], double b[3], double axb[3]); void iauS2xpv(double s1, double s2, double pv[2][3], double spv[2][3]); void iauSxp(double s, double p[3], double sp[3]); void iauSxpv(double s, double pv[2][3], double spv[2][3]); #ifdef __cplusplus } #endif #endif /*---------------------------------------------------------------------- ** ** Copyright (C) 2010 ** Standards Of Fundamental Astronomy Board ** of the International Astronomical Union. ** ** ===================== ** SOFA Software License ** ===================== ** ** NOTICE TO USER: ** ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING TERMS AND CONDITIONS ** WHICH APPLY TO ITS USE. ** ** 1. The Software is owned by the IAU SOFA Board ("SOFA"). ** ** 2. Permission is granted to anyone to use the SOFA software for any ** purpose, including commercial applications, free of charge and ** without payment of royalties, subject to the conditions and ** restrictions listed below. ** ** 3. You (the user) may copy and distribute SOFA source code to others, ** and use and adapt its code and algorithms in your own software, ** on a world-wide, royalty-free basis. That portion of your ** distribution that does not consist of intact and unchanged copies ** of SOFA source code files is a "derived work" that must comply ** with the following requirements: ** ** a) Your work shall be marked or carry a statement that it ** (i) uses routines and computations derived by you from ** software provided by SOFA under license to you; and ** (ii) does not itself constitute software provided by and/or ** endorsed by SOFA. ** ** b) The source code of your derived work must contain descriptions ** of how the derived work is based upon, contains and/or differs ** from the original SOFA software. ** ** c) The name(s) of all routine(s) in your derived work shall not ** include the prefix "iau". ** ** d) The origin of the SOFA components of your derived work must ** not be misrepresented; you must not claim that you wrote the ** original software, nor file a patent application for SOFA ** software or algorithms embedded in the SOFA software. ** ** e) These requirements must be reproduced intact in any source ** distribution and shall apply to anyone to whom you have ** granted a further right to modify the source code of your ** derived work. ** ** Note that, as originally distributed, the SOFA software is ** intended to be a definitive implementation of the IAU standards, ** and consequently third-party modifications are discouraged. All ** variations, no matter how minor, must be explicitly marked as ** such, as explained above. ** ** 4. In any published work or commercial products which includes ** results achieved by using the SOFA software, you shall ** acknowledge that the SOFA software was used in obtaining those ** results. ** ** 5. You shall not cause the SOFA software to be brought into ** disrepute, either by misuse, or use for inappropriate tasks, or ** by inappropriate modification. ** ** 6. The SOFA software is provided "as is" and SOFA makes no warranty ** as to its use or performance. SOFA does not and cannot warrant ** the performance or results which the user may obtain by using the ** SOFA software. SOFA makes no warranties, express or implied, as ** to non-infringement of third party rights, merchantability, or ** fitness for any particular purpose. In no event will SOFA be ** liable to the user for any consequential, incidental, or special ** damages, including any lost profits or lost savings, even if a ** SOFA representative has been advised of such damages, or for any ** claim by any third party. ** ** 7. The provision of any version of the SOFA software under the terms ** and conditions specified herein does not imply that future ** versions will also be made available under the same terms and ** conditions. ** ** Correspondence concerning SOFA software should be addressed as ** follows: ** ** By email: sofa@ukho.gov.uk ** By post: IAU SOFA Center ** HM Nautical Almanac Office ** UK Hydrographic Office ** Admiralty Way, Taunton ** Somerset, TA1 2DN ** United Kingdom ** **--------------------------------------------------------------------*/ nautic-1.5/kepler.h0000644000175000017500000001051611556005075014164 0ustar moellermoeller/* * kepler.h - Constants, macros, utility routines * Copyright (C) 2010 Shiva Iyer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _KEPLER_H_ #define _KEPLER_H_ #include #include #define PROG_NAME "kepler" #define PROG_VERSION "1.0.0" #define PROG_VERSION_STRING PROG_NAME " version " PROG_VERSION "\n" #define PROG_COPYRIGHT \ "Copyright (C) 2010 Shiva Iyer \n\n" \ "This program is free software: you may redistribute and/or modify it\n" \ "under the terms of the GNU GPL .\n\n" \ "This program is distributed WITHOUT ANY WARRANTY; without even the\n" \ "implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" #define SUCCESS 0 #define ERR_INVALID_PLANET -1 #define ERR_INVALID_DATE -2 #define ERR_INVALID_ECCENTRICITY -3 #define ERR_CONVERGENCE -4 #define ERR_INVALID_DATA -5 #define PI 3.141592653589793238462643 #define TWO_PI 6.283185307179586476925287 #define SQROOT_TWO 1.414213562373095048801689 #define DEG_TO_RAD 0.01745329251994329576923691 #define ACS_TO_RAD 0.000004848136811095359935899141 #define MAS_TO_RAD 0.000000004848136811095359935899141 #define UAS_TO_RAD 0.000000000004848136811095359935899141 #define RAD_TO_DEG 57.295779513082320876798147 #define RAD_TO_ACS 206264.806247096 #define DEG_TO_HRS 0.066666666666666666666667 #define HRS_TO_DEG 15.0 #define RAD_TO_HRS 3.81971863420548805845321 #define HRS_TO_RAD 0.261799387799149436538554 #define DEGREES(d, m, s) (d + (m / 60.0) + (s / 3600.0)) #define GAUSS_GRAV_CONSTANT 0.01720209895 #define AU 149597870.691 /* 1 AU in KM */ #define EARTH_FLATTENING (1.0 / 298.25642) #define EARTH_EQU_RADIUS 6378136.6 /* Earth's equatorial radius(meters) */ #define EARTH_POL_RADIUS (EARTH_EQU_RADIUS * (1.0 - EARTH_FLATTENING)) typedef unsigned short u_short; /* Used in conversions from decimal degrees to degree/minute/second form. */ struct deg_min_sec { int degrees; int minutes; double seconds; }; /* * Identifiers for the planets in the solar system. Following the IAU's * resolutions of 2006, Pluto is not considered a planet. */ enum solar_system_planets { MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE }; /* * Returns an angle that is between 0 and limit. * * angle -- The angle to be reduced. * limit -- The maximum value for the angle. * * Return: An angle that is between 0 and limit. */ static __inline__ double reduce_angle(double angle, double limit) { while (angle < 0) angle += limit; while (angle > limit) angle -= limit; return angle; } /* * Converts an angle in decimal degrees to degrees/minutes/seconds form. * * d -- The angle to convert. * out -- Converted value. If d is negative, the members of out will be negative. */ static __inline__ void degrees_to_dms(double d, struct deg_min_sec *out) { double tmp; tmp = fabs(d); out->degrees = floor(tmp); tmp = (tmp - out->degrees) * 60; out->minutes = floor(tmp); out->seconds = (tmp - out->minutes) * 60; if (d < 0) { out->degrees *= -1; out->minutes *= -1; out->seconds *= -1; } } /* * Swaps values. * * x -- Will contain *y on return. * y -- Will contain *x on return. */ static __inline__ void swap(double *x, double *y) { double tmp; tmp = *x; *x = *y; *y = tmp; } /* * Version of the standard C function strncpy that always NULL terminates. * * dest -- Destination string. * src -- Source string. * len -- Maximum number of characters to copy. */ static __inline__ char *strncpyn(char *dest, const char *src, size_t len) { strncpy(dest, src, len); dest[len] = '\0'; return dest; } #endif