precession.c   precession.c 
skipping to change at line 25 skipping to change at line 25
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, US A. Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, US A.
*/ */
/* /*
* Precession solution following methods from: * Precession solution following methods from:
* J. Vondrak, N. Capitaine, P. Wallace * J. Vondrak, N. Capitaine, P. Wallace
* New precession expressions, valid for long time intervals * New precession expressions, valid for long time intervals
* Astronomy&Astrophysics 534, A22 (2011) * Astronomy&Astrophysics 534, A22 (2011)
* DOI: 10.1051/0004-6361/201117274 * DOI: 10.1051/0004-6361/201117274
* J. Vondrak, N. Capitaine, P. Wallace
* New precession expressions, valid for long time intervals (Corrigendum)
* A&A 541, C1 (2012)
* DOI: 10.1051/0004-6361/201117274e
* The data are only applicable for a time range of 200.000 years around J2 000. * The data are only applicable for a time range of 200.000 years around J2 000.
* This is by far enough for Stellarium as of 2015, but just to make sure I added a few asserts. * This is by far enough for Stellarium as of 2015, but just to make sure I added a few asserts.
*/ */
#include <math.h> #include <math.h>
#include <assert.h> #include <assert.h>
/* Interval threshold (days) for re-computing these values. with 1, compute only 1/day: */ /* Interval threshold (days) for re-computing these values. with 1, compute only 1/day: */
#define PRECESSION_EPOCH_THRESHOLD 1.0 #define PRECESSION_EPOCH_THRESHOLD 1.0
/* Interval threshold (days) for re-computing nutation values. with 1/24, c ompute only every hour */ /* Interval threshold (days) for re-computing nutation values. with 1/24, c ompute only every hour */
skipping to change at line 53 skipping to change at line 57
static const double arcSec2Rad=M_PI*2.0/(360.0*3600.0); static const double arcSec2Rad=M_PI*2.0/(360.0*3600.0);
static const double PQvals[8][5]= static const double PQvals[8][5]=
{ // 1/Pn P_A:Cn Q_A:Cn P_A:Sn Q_A:Sn { // 1/Pn P_A:Cn Q_A:Cn P_A:Sn Q_A:Sn
{ 1.0/ 708.15, -5486.751211, -684.661560, 667.666730, -5523.863691 }, { 1.0/ 708.15, -5486.751211, -684.661560, 667.666730, -5523.863691 },
{ 1.0/2309.00, -17.127623, 2446.283880, -2354.886252, -549.747450 }, { 1.0/2309.00, -17.127623, 2446.283880, -2354.886252, -549.747450 },
{ 1.0/1620.00, -617.517403, 399.671049, -428.152441, -310.998056 }, { 1.0/1620.00, -617.517403, 399.671049, -428.152441, -310.998056 },
{ 1.0/ 492.20, 413.442940, -356.652376, 376.202861, 421.535876 }, { 1.0/ 492.20, 413.442940, -356.652376, 376.202861, 421.535876 },
{ 1.0/1183.00, 78.614193, -186.387003, 184.778874, -36.776172 }, { 1.0/1183.00, 78.614193, -186.387003, 184.778874, -36.776172 },
{ 1.0/ 622.00, -180.732815, -316.800070, 335.321713, -145.278396 }, { 1.0/ 622.00, -180.732815, -316.800070, 335.321713, -145.278396 },
{ 1.0/ 882.00, -87.676083, 198.296071, -185.138669, -34.744450 }, { 1.0/ 882.00, -87.676083, 198.296701, -185.138669, -34.744450 },
{ 1.0/ 547.00, 46.140315, 101.135679, -120.972830, 22.885731 }}; { 1.0/ 547.00, 46.140315, 101.135679, -120.972830, 22.885731 }};
static const double XYvals[14][5]= static const double XYvals[14][5]=
{ // 1/Pn Xa:Cn Ya:Cn Xa:Sn Ya:Sn { // 1/Pn Xa:Cn Ya:Cn Xa:Sn Ya:Sn
{ 1.0/ 256.75, -819.940624, 75004.344875, 81491.287984, 1558.515853 }, { 1.0/ 256.75, -819.940624, 75004.344875, 81491.287984, 1558.515853 },
{ 1.0/ 708.15, -8444.676815, 624.033993, 787.163481, 7774.939698 }, { 1.0/ 708.15, -8444.676815, 624.033993, 787.163481, 7774.939698 },
{ 1.0/ 274.20, 2600.009459, 1251.136893, 1251.296102, -2219.534038 }, { 1.0/ 274.20, 2600.009459, 1251.136893, 1251.296102, -2219.534038 },
{ 1.0/ 241.45, 2755.175630, -1102.212834, -1257.950837, -2523.969396 }, { 1.0/ 241.45, 2755.175630, -1102.212834, -1257.950837, -2523.969396 },
{ 1.0/2309.00, -167.659835, -2660.664980, -2966.799730, 247.850422 }, { 1.0/2309.00, -167.659835, -2660.664980, -2966.799730, 247.850422 },
{ 1.0/ 492.20, 871.855056, 699.291817, 639.744522, -846.485643 }, { 1.0/ 492.20, 871.855056, 699.291817, 639.744522, -846.485643 },
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/