rstub / swephR

@@ -13,6 +13,7 @@
Loading
13 13
  Problem reports can be sent to victor.reijs@gmail.com or dieter@astro.ch
14 14
  
15 15
  Copyright (c) Victor Reijs, 2008
16 +
  Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
16 17
17 18
  License conditions
18 19
  ------------------
@@ -28,17 +29,17 @@
Loading
28 29
  system. The software developer, who uses any part of Swiss Ephemeris
29 30
  in his or her software, must choose between one of the two license models,
30 31
  which are
31 -
  a) GNU public license version 2 or later
32 +
  a) GNU Affero General Public License (AGPL)
32 33
  b) Swiss Ephemeris Professional License
33 34
34 35
  The choice must be made before the software developer distributes software
35 36
  containing parts of Swiss Ephemeris to others, and before any public
36 37
  service using the developed software is activated.
37 38
38 -
  If the developer choses the GNU GPL software license, he or she must fulfill
39 +
  If the developer choses the AGPL software license, he or she must fulfill
39 40
  the conditions of that license, which includes the obligation to place his
40 -
  or her whole software project under the GNU GPL or a compatible license.
41 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
41 +
  or her whole software project under the AGPL or a compatible license.
42 +
  See https://www.gnu.org/licenses/agpl-3.0.html
42 43
43 44
  If the developer choses the Swiss Ephemeris Professional license,
44 45
  he must follow the instructions as found in http://www.astro.com/swisseph/ 
@@ -50,11 +51,13 @@
Loading
50 51
  Among other things, the License requires that the copyright notices and
51 52
  this notice be preserved on all copies.
52 53
54 +
  Authors of the Swiss Ephemeris: Dieter Koch and Alois Treindl
55 +
53 56
  The authors of Swiss Ephemeris have no control or influence over any of
54 57
  the derived works, i.e. over software or services created by other
55 58
  programmers which use Swiss Ephemeris functions.
56 59
57 -
  The names of the authors or of the copyright holder must not
60 +
  The names of the authors or of the copyright holder (Astrodienst) must not
58 61
  be used for promoting any software, product or service which uses or contains
59 62
  the Swiss Ephemeris. This copyright notice is the ONLY place where the
60 63
  names of the authors can legally appear, except in cases where they have
@@ -64,6 +67,7 @@
Loading
64 67
  for promoting such software, products or services.
65 68
*/
66 69
70 +
67 71
#include "swephexp.h"
68 72
#include "sweph.h"
69 73
#include "swephlib.h"

@@ -4,8 +4,8 @@
Loading
4 4
   modified for SWISSEPH by Dieter Koch
5 5
6 6
**************************************************************/
7 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
8 -
  
7 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
8 +
9 9
  License conditions
10 10
  ------------------
11 11
@@ -20,17 +20,17 @@
Loading
20 20
  system. The software developer, who uses any part of Swiss Ephemeris
21 21
  in his or her software, must choose between one of the two license models,
22 22
  which are
23 -
  a) GNU public license version 2 or later
23 +
  a) GNU Affero General Public License (AGPL)
24 24
  b) Swiss Ephemeris Professional License
25 25
26 26
  The choice must be made before the software developer distributes software
27 27
  containing parts of Swiss Ephemeris to others, and before any public
28 28
  service using the developed software is activated.
29 29
30 -
  If the developer choses the GNU GPL software license, he or she must fulfill
30 +
  If the developer choses the AGPL software license, he or she must fulfill
31 31
  the conditions of that license, which includes the obligation to place his
32 -
  or her whole software project under the GNU GPL or a compatible license.
33 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
32 +
  or her whole software project under the AGPL or a compatible license.
33 +
  See https://www.gnu.org/licenses/agpl-3.0.html
34 34
35 35
  If the developer choses the Swiss Ephemeris Professional license,
36 36
  he must follow the instructions as found in http://www.astro.com/swisseph/ 

@@ -9,8 +9,8 @@
Loading
9 9
  Authors: Dieter Koch and Alois Treindl, Astrodienst Zurich
10 10
11 11
************************************************************/
12 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
13 -
  
12 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
13 +
14 14
  License conditions
15 15
  ------------------
16 16
@@ -25,17 +25,17 @@
Loading
25 25
  system. The software developer, who uses any part of Swiss Ephemeris
26 26
  in his or her software, must choose between one of the two license models,
27 27
  which are
28 -
  a) GNU public license version 2 or later
28 +
  a) GNU Affero General Public License (AGPL)
29 29
  b) Swiss Ephemeris Professional License
30 30
31 31
  The choice must be made before the software developer distributes software
32 32
  containing parts of Swiss Ephemeris to others, and before any public
33 33
  service using the developed software is activated.
34 34
35 -
  If the developer choses the GNU GPL software license, he or she must fulfill
35 +
  If the developer choses the AGPL software license, he or she must fulfill
36 36
  the conditions of that license, which includes the obligation to place his
37 -
  or her whole software project under the GNU GPL or a compatible license.
38 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
37 +
  or her whole software project under the AGPL or a compatible license.
38 +
  See https://www.gnu.org/licenses/agpl-3.0.html
39 39
40 40
  If the developer choses the Swiss Ephemeris Professional license,
41 41
  he must follow the instructions as found in http://www.astro.com/swisseph/ 

@@ -5,7 +5,7 @@
Loading
5 5
  Authors: Dieter Koch and Alois Treindl, Astrodienst Zurich
6 6
7 7
**************************************************************/
8 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
8 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
9 9
10 10
  License conditions
11 11
  ------------------
@@ -21,17 +21,17 @@
Loading
21 21
  system. The software developer, who uses any part of Swiss Ephemeris
22 22
  in his or her software, must choose between one of the two license models,
23 23
  which are
24 -
  a) GNU public license version 2 or later
24 +
  a) GNU Affero General Public License (AGPL)
25 25
  b) Swiss Ephemeris Professional License
26 26
27 27
  The choice must be made before the software developer distributes software
28 28
  containing parts of Swiss Ephemeris to others, and before any public
29 29
  service using the developed software is activated.
30 30
31 -
  If the developer choses the GNU GPL software license, he or she must fulfill
31 +
  If the developer choses the AGPL software license, he or she must fulfill
32 32
  the conditions of that license, which includes the obligation to place his
33 -
  or her whole software project under the GNU GPL or a compatible license.
34 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
33 +
  or her whole software project under the AGPL or a compatible license.
34 +
  See https://www.gnu.org/licenses/agpl-3.0.html
35 35
36 36
  If the developer choses the Swiss Ephemeris Professional license,
37 37
  he must follow the instructions as found in http://www.astro.com/swisseph/ 
@@ -5062,8 +5062,10 @@
Loading
5062 5062
  double xrot, yrot, zrot;
5063 5063
  double *chcfx, *chcfy, *chcfz;
5064 5064
  double *refepx, *refepy;
5065 -
  double seps2000 = swed.oec2000.seps;
5066 -
  double ceps2000 = swed.oec2000.ceps;
5065 +
  // epsilon as used in chopt.c
5066 +
  // double eps2000 = 0.409092804;       	// eps 2000 in radians 
5067 +
  double seps2000 = 0.39777715572793088;  	// sin(eps2000) 
5068 +
  double ceps2000 = 0.91748206215761929;	// cos(eps2000) 
5067 5069
  struct plan_data *pdp = &swed.pldat[ipli];
5068 5070
  int nco = pdp->ncoe;
5069 5071
  t = pdp->tseg0 + pdp->dseg / 2;
@@ -8147,7 +8149,7 @@
Loading
8147 8149
  iflag = plaus_iflag(iflag, ipl, tjd, serr);
8148 8150
  epheflag = iflag & SEFLG_EPHMASK;
8149 8151
  // this fills in obliquity and nutation values in swed
8150 -
  swe_calc(tjd + swe_deltat_ex(tjd, epheflag, serr), SE_ECL_NUT, 0, xx, serr);
8152 +
  swe_calc(tjd + swe_deltat_ex(tjd, epheflag, serr), SE_ECL_NUT, iflag, xx, serr);
8151 8153
  iflag &= ~(SEFLG_HELCTR|SEFLG_BARYCTR);
8152 8154
  iflag2 = epheflag;
8153 8155
  iflag2 |= (SEFLG_BARYCTR|SEFLG_J2000|SEFLG_ICRS|SEFLG_TRUEPOS|SEFLG_EQUATORIAL|SEFLG_XYZ|SEFLG_SPEED);

@@ -4,7 +4,7 @@
Loading
4 4
    Author: Dieter Koch
5 5
6 6
************************************************************/
7 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
7 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
8 8
9 9
  License conditions
10 10
  ------------------
@@ -20,17 +20,17 @@
Loading
20 20
  system. The software developer, who uses any part of Swiss Ephemeris
21 21
  in his or her software, must choose between one of the two license models,
22 22
  which are
23 -
  a) GNU public license version 2 or later
23 +
  a) GNU Affero General Public License (AGPL)
24 24
  b) Swiss Ephemeris Professional License
25 25
26 26
  The choice must be made before the software developer distributes software
27 27
  containing parts of Swiss Ephemeris to others, and before any public
28 28
  service using the developed software is activated.
29 29
30 -
  If the developer choses the GNU GPL software license, he or she must fulfill
30 +
  If the developer choses the AGPL software license, he or she must fulfill
31 31
  the conditions of that license, which includes the obligation to place his
32 -
  or her whole software project under the GNU GPL or a compatible license.
33 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
32 +
  or her whole software project under the AGPL or a compatible license.
33 +
  See https://www.gnu.org/licenses/agpl-3.0.html
34 34
35 35
  If the developer choses the Swiss Ephemeris Professional license,
36 36
  he must follow the instructions as found in http://www.astro.com/swisseph/ 
@@ -4378,13 +4378,15 @@
Loading
4378 4378
{
4379 4379
  int32 retval = 0;
4380 4380
  /* Simple fast algorithm for risings and settings of 
4381 -
   * - planets Sun, Moon, Mercury - Pluto + Lunar Nodes and Fixed stars
4381 +
   * - planets Sun, Moon, Mercury - Pluto + Lunar Nodes
4382 4382
   * Does not work well for geographic latitudes
4383 4383
   * > 65 N/S for the Sun
4384 4384
   * > 60 N/S for the Moon and the planets
4385 4385
   * Beyond these limits, some risings or settings may be missed.
4386 4386
   */
4387 -
  if (1 && (rsmi & (SE_CALC_RISE|SE_CALC_SET)) 
4387 +
  AS_BOOL do_fixstar = (starname != NULL && *starname != '\0');
4388 +
  if (!do_fixstar
4389 +
    && (rsmi & (SE_CALC_RISE|SE_CALC_SET)) 
4388 4390
    && !(rsmi & SE_BIT_FORCE_SLOW_METHOD)
4389 4391
    && !(rsmi & (SE_BIT_CIVIL_TWILIGHT|SE_BIT_NAUTIC_TWILIGHT|SE_BIT_ASTRO_TWILIGHT))
4390 4392
    && (ipl >= SE_SUN && ipl <= SE_TRUE_NODE)

@@ -4,13 +4,13 @@
Loading
4 4
house and (simple) aspect calculation 
5 5
6 6
************************************************************/
7 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
8 -
  
7 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
8 +
9 9
  License conditions
10 10
  ------------------
11 11
12 12
  This file is part of Swiss Ephemeris.
13 -
  
13 +
14 14
  Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND.  No author
15 15
  or distributor accepts any responsibility for the consequences of using it,
16 16
  or for whether it serves any particular purpose or works at all, unless he
@@ -20,17 +20,17 @@
Loading
20 20
  system. The software developer, who uses any part of Swiss Ephemeris
21 21
  in his or her software, must choose between one of the two license models,
22 22
  which are
23 -
  a) GNU public license version 2 or later
23 +
  a) GNU Affero General Public License (AGPL)
24 24
  b) Swiss Ephemeris Professional License
25 -
  
25 +
26 26
  The choice must be made before the software developer distributes software
27 27
  containing parts of Swiss Ephemeris to others, and before any public
28 28
  service using the developed software is activated.
29 29
30 -
  If the developer choses the GNU GPL software license, he or she must fulfill
30 +
  If the developer choses the AGPL software license, he or she must fulfill
31 31
  the conditions of that license, which includes the obligation to place his
32 -
  or her whole software project under the GNU GPL or a compatible license.
33 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
32 +
  or her whole software project under the AGPL or a compatible license.
33 +
  See https://www.gnu.org/licenses/agpl-3.0.html
34 34
35 35
  If the developer choses the Swiss Ephemeris Professional license,
36 36
  he must follow the instructions as found in http://www.astro.com/swisseph/ 
@@ -1330,17 +1330,16 @@
Loading
1330 1330
    if (acmc < 0) {
1331 1331
      /* within polar circle we swap AC/DC if AC is on wrong side */
1332 1332
      hsp->ac = swe_degnorm(hsp->ac + 180);
1333 -
      hsp->cusp[1] = hsp->ac;
1334 1333
    }
1335 1334
    hsp->cusp[1] = swe_degnorm(hsp->ac - 15);
1336 1335
    for (i = 2; i <=12; i++)
1337 1336
      hsp->cusp[i] = swe_degnorm(hsp->cusp[1] + (i-1) * 30);
1338 -
    break;
1339 1337
    if (hsp->do_hspeed) {
1340 1338
      for (i = 1; i <=12; i++) {
1341 1339
	hsp->cusp_speed[i] = hsp->ac_speed;
1342 1340
      }
1343 1341
    }
1342 +
    break;
1344 1343
  case 'W':	/* equal, whole-sign houses */
1345 1344
    acmc = swe_difdeg2n(hsp->ac, hsp->mc);
1346 1345
    if (acmc < 0) {

@@ -18,8 +18,8 @@
Loading
18 18
   modulo and normalization functions
19 19
20 20
**************************************************************/
21 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
22 -
  
21 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
22 +
23 23
  License conditions
24 24
  ------------------
25 25
@@ -28,26 +28,26 @@
Loading
28 28
  Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND.  No author
29 29
  or distributor accepts any responsibility for the consequences of using it,
30 30
  or for whether it serves any particular purpose or works at all, unless he
31 -
  or she says so in writing.  
31 +
  or she says so in writing.
32 32
33 33
  Swiss Ephemeris is made available by its authors under a dual licensing
34 34
  system. The software developer, who uses any part of Swiss Ephemeris
35 35
  in his or her software, must choose between one of the two license models,
36 36
  which are
37 -
  a) GNU public license version 2 or later
37 +
  a) GNU Affero General Public License (AGPL)
38 38
  b) Swiss Ephemeris Professional License
39 39
40 40
  The choice must be made before the software developer distributes software
41 41
  containing parts of Swiss Ephemeris to others, and before any public
42 42
  service using the developed software is activated.
43 43
44 -
  If the developer choses the GNU GPL software license, he or she must fulfill
44 +
  If the developer choses the AGPL software license, he or she must fulfill
45 45
  the conditions of that license, which includes the obligation to place his
46 -
  or her whole software project under the GNU GPL or a compatible license.
47 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
46 +
  or her whole software project under the AGPL or a compatible license.
47 +
  See https://www.gnu.org/licenses/agpl-3.0.html
48 48
49 49
  If the developer choses the Swiss Ephemeris Professional license,
50 -
  he must follow the instructions as found in http://www.astro.com/swisseph/ 
50 +
  he must follow the instructions as found in http://www.astro.com/swisseph/
51 51
  and purchase the Swiss Ephemeris Professional Edition from Astrodienst
52 52
  and sign the corresponding license contract.
53 53
@@ -164,9 +164,9 @@
Loading
164 164
  x[2] = a[0]*b[1] - a[1]*b[0];
165 165
}
166 166
167 -
/*  Evaluates a given chebyshev series coef[0..ncf-1] 
167 +
/*  Evaluates a given chebyshev series coef[0..ncf-1]
168 168
 *  with ncf terms at x in [-1,1]. Communications of the ACM, algorithm 446,
169 -
 *  April 1973 (vol. 16 no.4) by Dr. Roger Broucke. 
169 +
 *  April 1973 (vol. 16 no.4) by Dr. Roger Broucke.
170 170
 */
171 171
double swi_echeb(double x, double *coef, int ncf)
172 172
{
@@ -276,7 +276,7 @@
Loading
276 276
 * for ecl. to equ.  eps must be negative
277 277
 * for equ. to ecl.  eps must be positive
278 278
 */
279 -
void swi_coortrf(double *xpo, double *xpn, double eps) 
279 +
void swi_coortrf(double *xpo, double *xpn, double eps)
280 280
{
281 281
  double sineps, coseps;
282 282
  double x[3];
@@ -286,7 +286,7 @@
Loading
286 286
  x[1] = xpo[1] * coseps + xpo[2] * sineps;
287 287
  x[2] = -xpo[1] * sineps + xpo[2] * coseps;
288 288
  xpn[0] = x[0];
289 -
  xpn[1] = x[1]; 
289 +
  xpn[1] = x[1];
290 290
  xpn[2] = x[2];
291 291
}
292 292
@@ -296,14 +296,14 @@
Loading
296 296
 * coseps            cos(eps)
297 297
 * for ecl. to equ.  sineps must be -sin(eps)
298 298
 */
299 -
void swi_coortrf2(double *xpo, double *xpn, double sineps, double coseps) 
299 +
void swi_coortrf2(double *xpo, double *xpn, double sineps, double coseps)
300 300
{
301 301
  double x[3];
302 302
  x[0] = xpo[0];
303 303
  x[1] = xpo[1] * coseps + xpo[2] * sineps;
304 304
  x[2] = -xpo[1] * sineps + xpo[2] * coseps;
305 305
  xpn[0] = x[0];
306 -
  xpn[1] = x[1]; 
306 +
  xpn[1] = x[1];
307 307
  xpn[2] = x[2];
308 308
}
309 309
@@ -311,7 +311,7 @@
Loading
311 311
 * x = l is allowed.
312 312
 * if |x| = 0, then lon, lat and rad := 0.
313 313
 */
314 -
void swi_cartpol(double *x, double *l) 
314 +
void swi_cartpol(double *x, double *l)
315 315
{
316 316
  double rxy;
317 317
  double ll[3];
@@ -340,7 +340,7 @@
Loading
340 340
/* conversion from polar (l[3]) to cartesian coordinates (x[3]).
341 341
 * x = l is allowed.
342 342
 */
343 -
void swi_polcart(double *l, double *x) 
343 +
void swi_polcart(double *l, double *x)
344 344
{
345 345
  double xx[3];
346 346
  double cosl1;
@@ -353,10 +353,10 @@
Loading
353 353
  x[2] = xx[2];
354 354
}
355 355
356 -
/* conversion of position and speed. 
357 -
 * from cartesian (x[6]) to polar coordinates (l[6]). 
356 +
/* conversion of position and speed.
357 +
 * from cartesian (x[6]) to polar coordinates (l[6]).
358 358
 * x = l is allowed.
359 -
 * if position is 0, function returns direction of 
359 +
 * if position is 0, function returns direction of
360 360
 * motion.
361 361
 */
362 362
void swi_cartpol_sp(double *x, double *l)
@@ -387,10 +387,10 @@
Loading
387 387
  ll[0] = atan2(x[1], x[0]);
388 388
  if (ll[0] < 0.0) ll[0] += TWOPI;
389 389
  ll[1] = atan(x[2] / rxy);
390 -
  /* speed: 
391 -
   * 1. rotate coordinate system by longitude of position about z-axis, 
390 +
  /* speed:
391 +
   * 1. rotate coordinate system by longitude of position about z-axis,
392 392
   *    so that new x-axis = position radius projected onto x-y-plane.
393 -
   *    in the new coordinate system 
393 +
   *    in the new coordinate system
394 394
   *    vy'/r = dlong/dt, where r = sqrt(x^2 +y^2).
395 395
   * 2. rotate coordinate system by latitude about new y-axis.
396 396
   *    vz"/r = dlat/dt, where r = position radius.
@@ -412,8 +412,8 @@
Loading
412 412
  l[2] = ll[2];
413 413
}
414 414
415 -
/* conversion of position and speed 
416 -
 * from polar (l[6]) to cartesian coordinates (x[6]) 
415 +
/* conversion of position and speed
416 +
 * from polar (l[6]) to cartesian coordinates (x[6])
417 417
 * x = l is allowed
418 418
 * explanation s. swi_cartpol_sp()
419 419
 */
@@ -507,9 +507,9 @@
Loading
507 507
  {708.15, 2309, 1620, 492.2, 1183, 622, 882, 547},
508 508
  {-5486.751211, -17.127623, -617.517403, 413.44294, 78.614193, -180.732815, -87.676083, 46.140315},
509 509
  // original publication    A&A 534, A22 (2011):
510 -
//{-684.66156, 2446.28388, 399.671049, -356.652376, -186.387003, -316.80007, 198.296071, 101.135679}, 
510 +
//{-684.66156, 2446.28388, 399.671049, -356.652376, -186.387003, -316.80007, 198.296071, 101.135679},
511 511
  // typo fixed according to A&A 541, C1 (2012)
512 -
  {-684.66156, 2446.28388, 399.671049, -356.652376, -186.387003, -316.80007, 198.296701, 101.135679}, 
512 +
  {-684.66156, 2446.28388, 399.671049, -356.652376, -186.387003, -316.80007, 198.296701, 101.135679},
513 513
  {667.66673, -2354.886252, -428.152441, 376.202861, 184.778874, 335.321713, -185.138669, -120.97283},
514 514
  {-5523.863691, -549.74745, -310.998056, 421.535876, -36.776172, -145.278396, -34.74445, 22.885731}
515 515
};
@@ -569,12 +569,12 @@
Loading
569 569
}
570 570
571 571
/*
572 -
 * Long term high precision precession, 
572 +
 * Long term high precision precession,
573 573
 * according to Vondrak/Capitaine/Wallace, "New precession expressions, valid
574 574
 * for long time intervals", in A&A 534, A22(2011).
575 575
 */
576 576
/* precession of the ecliptic */
577 -
static void pre_pecl(double tjd, double *vec) 
577 +
static void pre_pecl(double tjd, double *vec)
578 578
{
579 579
  int i;
580 580
  int npol = NPOL_PECL;
@@ -606,7 +606,7 @@
Loading
606 606
  z = 1 - p * p - q * q;
607 607
  if (z < 0)
608 608
    z = 0;
609 -
  else 
609 +
  else
610 610
    z = sqrt(z);
611 611
  s = sin(EPS0);
612 612
  c = cos(EPS0);
@@ -616,7 +616,7 @@
Loading
616 616
}
617 617
618 618
/* precession of the equator */
619 -
static void pre_pequ(double tjd, double *veq) 
619 +
static void pre_pequ(double tjd, double *veq)
620 620
{
621 621
  int i;
622 622
  int npol = NPOL_PEQU;
@@ -698,19 +698,19 @@
Loading
698 698
 * Owen, William M., Jr., (JPL) "A Theory of the Earth's Precession
699 699
 * Relative to the Invariable Plane of the Solar System", Ph.D.
700 700
 * Dissertation, University of Florida, 1990.
701 -
 * Implemented for time range -18000 to 14000. 
701 +
 * Implemented for time range -18000 to 14000.
702 702
 */
703 -
/* 
703 +
/*
704 704
 * p. 177: central time Tc = -160, covering time span -200 <= T <= -120
705 705
 * i.e. -14000 +- 40 centuries
706 -
 * p. 178: central time Tc = -80, covering time span -120 <= T <= -40 
707 -
 * i.e. -6000 +- 40 centuries 
708 -
 * p. 179: central time Tc = 0, covering time span -40 <= T <= +40 
709 -
 * i.e. 2000 +- 40 centuries 
710 -
 * p. 180: central time Tc = 80, covering time span 40 <= T <= 120 
711 -
 * i.e. 10000 +- 40 centuries 
706 +
 * p. 178: central time Tc = -80, covering time span -120 <= T <= -40
707 +
 * i.e. -6000 +- 40 centuries
708 +
 * p. 179: central time Tc = 0, covering time span -40 <= T <= +40
709 +
 * i.e. 2000 +- 40 centuries
710 +
 * p. 180: central time Tc = 80, covering time span 40 <= T <= 120
711 +
 * i.e. 10000 +- 40 centuries
712 712
 * p. 181: central time Tc = 160, covering time span 120 <= T <= 200
713 -
 * i.e. 10000 +- 40 centuries 
713 +
 * i.e. 10000 +- 40 centuries
714 714
 */
715 715
static const double owen_eps0_coef[5][10] = {
716 716
{23.699391439256386, 5.2330816033981775e-1, -5.6259493384864815e-2, -8.2033318431602032e-3, 6.6774163554156385e-4, 2.4931584012812606e-5, -3.1313623302407878e-6, 2.0343814827951515e-7, 2.9182026615852936e-8, -4.1118760893281951e-9,},
@@ -744,7 +744,7 @@
Loading
744 744
{6.3315163285678715e-1, 3.5241082918420464, 2.1223076605364606e-1, -1.5648122502767368e-1, -9.1964075390801980e-3, 3.3896161239812411e-3, 2.1485178626085787e-4, -6.6261759864793735e-5, -5.9257969712852667e-6, 1.3918759086160525e-6,},
745 745
};
746 746
747 -
static void get_owen_t0_icof(double tjd, double *t0, int *icof) 
747 +
static void get_owen_t0_icof(double tjd, double *t0, int *icof)
748 748
{
749 749
  int i, j = 0;
750 750
  double t0s[5] = {-3392455.5, -470455.5, 2451544.5, 5373544.5, 8295544.5, };
@@ -792,9 +792,9 @@
Loading
792 792
    chia += (k[i] * owen_chia_coef[icof][i]);
793 793
  }
794 794
  if (iflag & (SEFLG_JPLHOR | SEFLG_JPLHOR_APPROX)) {
795 -
    /* 
795 +
    /*
796 796
     * In comparison with JPL Horizons we have an almost constant offset
797 -
     * almost constant offset in ecl. longitude of about -0.000019 deg. 
797 +
     * almost constant offset in ecl. longitude of about -0.000019 deg.
798 798
     * We fix this as follows: */
799 799
    psia += -0.000018560;
800 800
  }
@@ -866,14 +866,14 @@
Loading
866 866
 * using the results of general theory," Astronomy and Astrophysics
867 867
 * 157, 59070 (1986).
868 868
 *
869 -
 * Bretagnon, P. et al.: 2003, "Expressions for Precession Consistent with 
869 +
 * Bretagnon, P. et al.: 2003, "Expressions for Precession Consistent with
870 870
 * the IAU 2000A Model". A&A 400,785
871 871
 *B03  	84381.4088  	-46.836051*t  	-1667*10-7*t2  	+199911*10-8*t3  	-523*10-9*t4  	-248*10-10*t5  	-3*10-11*t6
872 872
 *C03   84381.406  	-46.836769*t  	-1831*10-7*t2  	+20034*10-7*t3  	-576*10-9*t4  	-434*10-10*t5
873 873
 *
874 874
 *  See precess and page B18 of the Astronomical Almanac.
875 875
 */
876 -
#define OFFSET_EPS_JPLHORIZONS (35.95) 
876 +
#define OFFSET_EPS_JPLHORIZONS (35.95)
877 877
#define DCOR_EPS_JPL_TJD0  2437846.5
878 878
#define NDCOR_EPS_JPL  51
879 879
double dcor_eps_jpl[] = {
@@ -884,7 +884,7 @@
Loading
884 884
35.449, 35.409, 35.497, 35.556, 35.672, 35.760, 35.596, 35.565, 35.510, 35.394,
885 885
35.385, 35.375, 35.415,
886 886
};
887 -
double swi_epsiln(double J, int32 iflag) 
887 +
double swi_epsiln(double J, int32 iflag)
888 888
{
889 889
  double T, eps;
890 890
  double tofs, dofs, t0, t1;
@@ -897,7 +897,7 @@
Loading
897 897
  if (jplhora_model == 0) jplhora_model = SEMOD_JPLHORA_DEFAULT;
898 898
  if (iflag & SEFLG_JPLHOR)
899 899
    is_jplhor = TRUE;
900 -
  if ((iflag & SEFLG_JPLHOR_APPROX) 
900 +
  if ((iflag & SEFLG_JPLHOR_APPROX)
901 901
      && jplhora_model == SEMOD_JPLHORA_3
902 902
      && J <= HORIZONS_TJD0_DPSI_DEPS_IAU1980)
903 903
    is_jplhor = TRUE;
@@ -920,12 +920,12 @@
Loading
920 920
  } else if (prec_model == SEMOD_PREC_IAU_2000) {
921 921
    eps = (((1.813e-3*T-5.9e-4)*T-46.84024)*T+84381.406)*DEGTORAD/3600;
922 922
  } else if (prec_model_short == SEMOD_PREC_IAU_2006 && fabs(T) <= PREC_IAU_2006_CTIES) {
923 -
    eps =  (((((-4.34e-8 * T -5.76e-7) * T +2.0034e-3) * T -1.831e-4) * T -46.836769) * T + 84381.406) * DEGTORAD / 3600.0; 
923 +
    eps =  (((((-4.34e-8 * T -5.76e-7) * T +2.0034e-3) * T -1.831e-4) * T -46.836769) * T + 84381.406) * DEGTORAD / 3600.0;
924 924
  } else if (prec_model == SEMOD_PREC_NEWCOMB) {
925 925
    double Tn = (J - 2396758.0)/36525.0;
926 -
    eps = (0.0017 * Tn * Tn * Tn - 0.0085 * Tn * Tn - 46.837 * Tn + 84451.68) * DEGTORAD / 3600.0; 
926 +
    eps = (0.0017 * Tn * Tn * Tn - 0.0085 * Tn * Tn - 46.837 * Tn + 84451.68) * DEGTORAD / 3600.0;
927 927
  } else if (prec_model == SEMOD_PREC_IAU_2006) {
928 -
    eps =  (((((-4.34e-8 * T -5.76e-7) * T +2.0034e-3) * T -1.831e-4) * T -46.836769) * T + 84381.406) * DEGTORAD / 3600.0; 
928 +
    eps =  (((((-4.34e-8 * T -5.76e-7) * T +2.0034e-3) * T -1.831e-4) * T -46.836769) * T + 84381.406) * DEGTORAD / 3600.0;
929 929
  } else if (prec_model == SEMOD_PREC_BRETAGNON_2003) {
930 930
    eps =  ((((((-3e-11 * T - 2.48e-8) * T -5.23e-7) * T +1.99911e-3) * T -1.667e-4) * T -46.836051) * T + 84381.40880) * DEGTORAD / 3600.0;/* */
931 931
  } else if (prec_model == SEMOD_PREC_SIMON_1994) {
@@ -975,26 +975,26 @@
Loading
975 975
 * Changes in program structure and implementation of IAU 2003 (P03) and
976 976
 * Vondrak 2011 by Dieter Koch.
977 977
 *
978 -
 * SEMOD_PREC_VONDRAK_2011 
978 +
 * SEMOD_PREC_VONDRAK_2011
979 979
 * J. Vondrák, N. Capitaine, and P. Wallace, "New precession expressions,
980 980
 * valid for long time intervals", A&A 534, A22 (2011)
981 981
 *
982 -
 * SEMOD_PREC_IAU_2006 
982 +
 * SEMOD_PREC_IAU_2006
983 983
 * N. Capitaine, P.T. Wallace, and J. Chapront, "Expressions for IAU 2000
984 984
 * precession quantities", 2003, A&A 412, 567-586 (2003).
985 985
 * This is a "short" term model, that can be combined with other models
986 986
 *
987 -
 * SEMOD_PREC_WILLIAMS_1994 
987 +
 * SEMOD_PREC_WILLIAMS_1994
988 988
 * James G. Williams, "Contributions to the Earth's obliquity rate,
989 989
 * precession, and nutation,"  Astron. J. 108, 711-724 (1994).
990 990
 *
991 -
 * SEMOD_PREC_SIMON_1994 
991 +
 * SEMOD_PREC_SIMON_1994
992 992
 * J. L. Simon, P. Bretagnon, J. Chapront, M. Chapront-Touze', G. Francou,
993 993
 * and J. Laskar, "Numerical Expressions for precession formulae and
994 994
 * mean elements for the Moon and the planets," Astronomy and Astrophysics
995 -
 * 282, 663-683 (1994).  
995 +
 * 282, 663-683 (1994).
996 996
 *
997 -
 * SEMOD_PREC_IAU_1976 
997 +
 * SEMOD_PREC_IAU_1976
998 998
 * IAU Coefficients are from:
999 999
 * J. H. Lieske, T. Lederle, W. Fricke, and B. Morando,
1000 1000
 * "Expressions for the Precession Quantities Based upon the IAU
@@ -1002,7 +1002,7 @@
Loading
1002 1002
 * Astrophysics 58, 1-16 (1977).
1003 1003
 * This is a "short" term model, that can be combined with other models
1004 1004
 *
1005 -
 * SEMOD_PREC_LASKAR_1986 
1005 +
 * SEMOD_PREC_LASKAR_1986
1006 1006
 * Newer formulas that cover a much longer time span are from:
1007 1007
 * J. Laskar, "Secular terms of classical planetary theories
1008 1008
 * using the results of general theory," Astronomy and Astrophysics
@@ -1026,7 +1026,7 @@
Loading
1026 1026
  int i;
1027 1027
  double x[3];
1028 1028
  double sinth, costh, sinZ, cosZ, sinz, cosz, A, B;
1029 -
  if( J == J2000 ) 
1029 +
  if( J == J2000 )
1030 1030
    return(0);
1031 1031
  T = (J - J2000)/36525.0;
1032 1032
  if (prec_method == SEMOD_PREC_IAU_1976) {
@@ -1081,7 +1081,7 @@
Loading
1081 1081
*/
1082 1082
#endif
1083 1083
#if 0
1084 -
  // Newcomb from Expl. supp. 61 pg. 38 
1084 +
  // Newcomb from Expl. supp. 61 pg. 38
1085 1085
  // "Andoyar (Woolard and Clemence) expressions":
1086 1086
  } else if (prec_method == SEMOD_PREC_NEWCOMB) {
1087 1087
    double mills = 365242.198782; // trop. millennia
@@ -1161,8 +1161,8 @@
Loading
1161 1161
    x[2] =            - sinth*cosz*R[0]
1162 1162
		      - sinth*sinz*R[1]
1163 1163
                      + costh*R[2];
1164 -
  }	
1165 -
  for( i=0; i<3; i++ ) 
1164 +
  }
1165 +
  for( i=0; i<3; i++ )
1166 1166
    R[i] = x[i];
1167 1167
  return(0);
1168 1168
}
@@ -1176,11 +1176,11 @@
Loading
1176 1176
 -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3,
1177 1177
 -0.235316, 0.076, 110.5407, 50287.70000 };
1178 1178
static const double nodecof_williams[] = {
1179 -
  6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 1.9e-10, 
1179 +
  6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 1.9e-10,
1180 1180
  -3.54e-9, -1.8103e-7,  1.26e-7,  7.436169e-5,
1181 1181
  -0.04207794833,  3.052115282424};
1182 1182
static const double inclcof_williams[] = {
1183 -
  1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11, 
1183 +
  1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11,
1184 1184
  -5.4000441e-11, 1.32115526e-9, -6.012e-7, -1.62442e-5,
1185 1185
  0.00227850649, 0.0 };
1186 1186
@@ -1190,11 +1190,11 @@
Loading
1190 1190
  -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3,
1191 1191
  -0.235316, 0.07732, 111.2022, 50288.200 };
1192 1192
static const double nodecof_simon[] = {
1193 -
  6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 1.9e-10, 
1193 +
  6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 1.9e-10,
1194 1194
  -3.54e-9, -1.8103e-7, 2.579e-8, 7.4379679e-5,
1195 1195
  -0.0420782900, 3.0521126906};
1196 1196
static const double inclcof_simon[] = {
1197 -
  1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11, 
1197 +
  1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11,
1198 1198
  -5.4000441e-11, 1.32115526e-9, -5.99908e-7, -1.624383e-5,
1199 1199
  0.002278492868, 0.0 };
1200 1200
@@ -1208,11 +1208,11 @@
Loading
1208 1208
 * Units are radians.
1209 1209
 */
1210 1210
static const double nodecof_laskar[] = {
1211 -
  6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 6.3190131e-10, 
1211 +
  6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 6.3190131e-10,
1212 1212
  -3.48388152e-9, -1.813065896e-7, 2.75036225e-8, 7.4394531426e-5,
1213 1213
  -0.042078604317, 3.052112654975 };
1214 1214
static const double inclcof_laskar[] = {
1215 -
  1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11, 
1215 +
  1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11,
1216 1216
  -5.4000441e-11, 1.32115526e-9, -5.998737027e-7, -1.6242797091e-5,
1217 1217
  0.002278495537, 0.0 };
1218 1218
@@ -1225,7 +1225,7 @@
Loading
1225 1225
  const double *p;
1226 1226
  double A, B, pA, W;
1227 1227
  const double *pAcof, *inclcof, *nodecof;
1228 -
  if( J == J2000 ) 
1228 +
  if( J == J2000 )
1229 1229
    return(0);
1230 1230
  if (prec_method == SEMOD_PREC_LASKAR_1986) {
1231 1231
    pAcof = pAcof_laskar;
@@ -1249,9 +1249,9 @@
Loading
1249 1249
   * First rotate about the x axis from the initial equator
1250 1250
   * to the ecliptic. (The input is equatorial.)
1251 1251
   */
1252 -
  if( direction == 1 ) 
1252 +
  if( direction == 1 )
1253 1253
    eps = swi_epsiln(J, iflag); /* To J2000 */
1254 -
  else 
1254 +
  else
1255 1255
    eps = swi_epsiln(J2000, iflag); /* From J2000 */
1256 1256
  sineps = sin(eps);
1257 1257
  coseps = cos(eps);
@@ -1271,13 +1271,13 @@
Loading
1271 1271
   */
1272 1272
  p = nodecof;
1273 1273
  W = *p++;
1274 -
  for( i=0; i<10; i++ ) 
1274 +
  for( i=0; i<10; i++ )
1275 1275
    W = W * T + *p++;
1276 1276
  /* Rotate about z axis to the node.
1277 1277
   */
1278 -
  if( direction == 1 ) 
1278 +
  if( direction == 1 )
1279 1279
    z = W + pA;
1280 -
  else 
1280 +
  else
1281 1281
    z = W;
1282 1282
  B = cos(z);
1283 1283
  A = sin(z);
@@ -1289,9 +1289,9 @@
Loading
1289 1289
   */
1290 1290
  p = inclcof;
1291 1291
  z = *p++;
1292 -
  for( i=0; i<10; i++ ) 
1292 +
  for( i=0; i<10; i++ )
1293 1293
    z = z * T + *p++;
1294 -
  if( direction == 1 ) 
1294 +
  if( direction == 1 )
1295 1295
    z = -z;
1296 1296
  B = cos(z);
1297 1297
  A = sin(z);
@@ -1300,9 +1300,9 @@
Loading
1300 1300
  x[1] = z;
1301 1301
  /* Rotate about new z axis back from the node.
1302 1302
   */
1303 -
  if( direction == 1 ) 
1303 +
  if( direction == 1 )
1304 1304
    z = -W;
1305 -
  else 
1305 +
  else
1306 1306
    z = -W - pA;
1307 1307
  B = cos(z);
1308 1308
  A = sin(z);
@@ -1311,16 +1311,16 @@
Loading
1311 1311
  x[0] = z;
1312 1312
  /* Rotate about x axis to final equator.
1313 1313
   */
1314 -
  if( direction == 1 ) 
1314 +
  if( direction == 1 )
1315 1315
    eps = swi_epsiln(J2000, iflag);
1316 -
  else 
1316 +
  else
1317 1317
    eps = swi_epsiln(J, iflag);
1318 1318
  sineps = sin(eps);
1319 1319
  coseps = cos(eps);
1320 1320
  z = coseps * x[1] - sineps * x[2];
1321 1321
  x[2] = sineps * x[1] + coseps * x[2];
1322 1322
  x[1] = z;
1323 -
  for( i=0; i<3; i++ ) 
1323 +
  for( i=0; i<3; i++ )
1324 1324
    R[i] = x[i];
1325 1325
  return(0);
1326 1326
}
@@ -1330,7 +1330,7 @@
Loading
1330 1330
  //double T;
1331 1331
  double x[3], pmat[9];
1332 1332
  int i, j;
1333 -
  if( J == J2000 ) 
1333 +
  if( J == J2000 )
1334 1334
    return(0);
1335 1335
  /* Each precession angle is specified by a polynomial in
1336 1336
   * T = Julian centuries from J2000.0.  See AA page B18.
@@ -1382,7 +1382,7 @@
Loading
1382 1382
  if (jplhora_model == 0) jplhora_model = SEMOD_JPLHORA_DEFAULT;
1383 1383
  if (iflag & SEFLG_JPLHOR)
1384 1384
    is_jplhor = TRUE;
1385 -
  if ((iflag & SEFLG_JPLHOR_APPROX) 
1385 +
  if ((iflag & SEFLG_JPLHOR_APPROX)
1386 1386
      && jplhora_model == SEMOD_JPLHORA_3
1387 1387
      && J <= HORIZONS_TJD0_DPSI_DEPS_IAU1980)
1388 1388
    is_jplhor = TRUE;
@@ -1391,7 +1391,7 @@
Loading
1391 1391
  if (is_jplhor) {
1392 1392
    if (J > 2378131.5 && J < 2525323.5) { // between 1.1.1799 and 1.1.2202
1393 1393
      return precess_1(R, J, direction, SEMOD_PREC_IAU_1976);
1394 -
    } else { 
1394 +
    } else {
1395 1395
      return precess_3(R, J, direction, iflag, SEMOD_PREC_OWEN_1990);
1396 1396
    }
1397 1397
  /* Use IAU 1976 formula for a few centuries.  */
@@ -1419,7 +1419,7 @@
Loading
1419 1419
    return precess_2(R, J, iflag, direction, SEMOD_PREC_SIMON_1994);
1420 1420
  } else if (prec_model == SEMOD_PREC_WILLIAMS_1994 || prec_model == SEMOD_PREC_WILL_EPS_LASK) {
1421 1421
    return precess_2(R, J, iflag, direction, SEMOD_PREC_WILLIAMS_1994);
1422 -
  } else if (prec_model == SEMOD_PREC_OWEN_1990) { 
1422 +
  } else if (prec_model == SEMOD_PREC_OWEN_1990) {
1423 1423
    return precess_3(R, J, direction, iflag, SEMOD_PREC_OWEN_1990);
1424 1424
  } else { /* SEMOD_PREC_VONDRAK_2011 */
1425 1425
    //int i;
@@ -1463,7 +1463,7 @@
Loading
1463 1463
 * form (a + bT) * sin(W). The terms for nutation in obliquity
1464 1464
 * are of the form (c + dT) * cos(W).  The coefficients
1465 1465
 * are arranged in the tabulation as follows:
1466 -
 * 
1466 +
 *
1467 1467
 * Coefficient:
1468 1468
 * i  j  k  l  m      a      b      c     d
1469 1469
 * 0, 0, 0, 0, 1, -171996, -1742, 92025, 89,
@@ -1484,7 +1484,7 @@
Loading
1484 1484
 * .0123	.0880		.0224	.0905
1485 1485
 * .0386	.1808		.0895	.1129
1486 1486
 */
1487 -
static const short nt[] = {  
1487 +
static const short nt[] = {
1488 1488
/* LS and OC are units of 0.0001"
1489 1489
 *LS2 and OC2 are units of 0.00001"
1490 1490
 *MM,MS,FF,DD,OM, LS, LS2,OC, OC2 */
@@ -1548,7 +1548,7 @@
Loading
1548 1548
 1, 0, 2,-2, 1,     6,  0,   -3,  0,
1549 1549
 0, 0, 0,-2, 1,    -5,  0,    3,  0,
1550 1550
 1,-1, 0, 0, 0,     5,  0,    0,  0,
1551 -
 2, 0, 2, 0, 1,    -5,  0,    3,  0, 
1551 +
 2, 0, 2, 0, 1,    -5,  0,    3,  0,
1552 1552
 0, 1, 0,-2, 0,    -4,  0,    0,  0,
1553 1553
 1, 0,-2, 0, 0,     4,  0,    0,  0,
1554 1554
 0, 0, 0, 1, 0,    -4,  0,    0,  0,
@@ -1704,14 +1704,14 @@
Loading
1704 1704
    sv = 0.0;
1705 1705
    for( m=0; m<5; m++ ) {
1706 1706
      j = p[m];
1707 -
      if (j > 100) 
1707 +
      if (j > 100)
1708 1708
	j = 0; /* p[0] is a flag */
1709 1709
      if( j ) {
1710 1710
	k = j;
1711 -
	if( j < 0 ) 
1711 +
	if( j < 0 )
1712 1712
	  k = -k;
1713 1713
	su = ss[m][k-1]; /* sin(k*angle) */
1714 -
	if( j < 0 ) 
1714 +
	if( j < 0 )
1715 1715
	  su = -su;
1716 1716
	cu = cc[m][k-1];
1717 1717
	if( k1 == 0 ) { /* set first angle */
@@ -1728,11 +1728,11 @@
Loading
1728 1728
    }
1729 1729
    /* longitude coefficient, in 0.0001" */
1730 1730
    f  = p[5] * 0.0001;
1731 -
    if( p[6] != 0 ) 
1731 +
    if( p[6] != 0 )
1732 1732
      f += 0.00001 * T * p[6];
1733 1733
    /* obliquity coefficient, in 0.0001" */
1734 1734
    g = p[7] * 0.0001;
1735 -
    if( p[8] != 0 ) 
1735 +
    if( p[8] != 0 )
1736 1736
      g += 0.00001 * T * p[8];
1737 1737
    if (*p >= 100) { 	/* coefficients in 0.00001" */
1738 1738
      f *= 0.1;
@@ -1763,17 +1763,17 @@
Loading
1763 1763
  return(0);
1764 1764
}
1765 1765
1766 -
/* Nutation IAU 2000A model 
1766 +
/* Nutation IAU 2000A model
1767 1767
 * (MHB2000 luni-solar and planetary nutation, without free core nutation)
1768 1768
 *
1769 -
 * Function returns nutation in longitude and obliquity in radians with 
1769 +
 * Function returns nutation in longitude and obliquity in radians with
1770 1770
 * respect to the equinox of date. For the obliquity of the ecliptic
1771 1771
 * the calculation of Lieske & al. (1977) must be used.
1772 1772
 *
1773 1773
 * The precision in recent years is about 0.001 arc seconds.
1774 1774
 *
1775 1775
 * The calculation includes luni-solar and planetary nutation.
1776 -
 * Free core nutation, which cannot be predicted, is omitted, 
1776 +
 * Free core nutation, which cannot be predicted, is omitted,
1777 1777
 * the error being of the order of a few 0.0001 arc seconds.
1778 1778
 *
1779 1779
 * References:
@@ -1789,7 +1789,7 @@
Loading
1789 1789
 * Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
1790 1790
 * and precession   New nutation series for nonrigid Earth and
1791 1791
 * insights into the Earth's interior", J.Geophys.Res., 107, B4,
1792 -
 * 2002.  
1792 +
 * 2002.
1793 1793
 *
1794 1794
 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
1795 1795
 * Francou, G., Laskar, J., A & A 282, 663-683 (1994).
@@ -1800,7 +1800,7 @@
Loading
1800 1800
 * Wallace, P.T., "Software for Implementing the IAU 2000
1801 1801
 * Resolutions", in IERS Workshop 5.1 (2002).
1802 1802
 *
1803 -
 * Nutation IAU 2000A series in: 
1803 +
 * Nutation IAU 2000A series in:
1804 1804
 * Kaplan, G.H., United States Naval Observatory Circular No. 179 (Oct. 2005)
1805 1805
 * aa.usno.navy.mil/publications/docs/Circular_179.html
1806 1806
 *
@@ -1810,7 +1810,7 @@
Loading
1810 1810
 */
1811 1811
1812 1812
#include "swenut2000a.h"
1813 -
static int calc_nutation_iau2000ab(double J, double *nutlo) 
1813 +
static int calc_nutation_iau2000ab(double J, double *nutlo)
1814 1814
{
1815 1815
  int i, j, k, inls;
1816 1816
  double M, SM, F, D, OM;
@@ -1874,7 +1874,7 @@
Loading
1874 1874
  nutlo[0] = dpsi * O1MAS2DEG;
1875 1875
  nutlo[1] = deps * O1MAS2DEG;
1876 1876
  if (nut_model == SEMOD_NUT_IAU_2000A) {
1877 -
    /* planetary nutation 
1877 +
    /* planetary nutation
1878 1878
     * note: The MHB2000 code computes the luni-solar and planetary nutation
1879 1879
     * in different routines, using slightly different Delaunay
1880 1880
     * arguments in the two cases.  This behaviour is faithfully
@@ -1929,10 +1929,10 @@
Loading
1929 1929
    nutlo[0] += dpsi * O1MAS2DEG;
1930 1930
    nutlo[1] += deps * O1MAS2DEG;
1931 1931
#if 1
1932 -
    /* changes required by adoption of P03 precession 
1932 +
    /* changes required by adoption of P03 precession
1933 1933
     * according to Capitaine et al. A & A 412, 366 (2005) = IAU 2006 */
1934 1934
    dpsi = -8.1 * sin(OM) - 0.6 * sin(2 * F - 2 * D + 2 * OM);
1935 -
    dpsi += T * (47.8 * sin(OM) + 3.7 * sin(2 * F - 2 * D + 2 * OM) + 0.6 * sin(2 * F + 2 * OM) - 0.6 * sin(2 * OM)); 
1935 +
    dpsi += T * (47.8 * sin(OM) + 3.7 * sin(2 * F - 2 * D + 2 * OM) + 0.6 * sin(2 * F + 2 * OM) - 0.6 * sin(2 * OM));
1936 1936
    deps = T * (-25.6 * cos(OM) - 1.6 * cos(2 * F - 2 * D + 2 * OM));
1937 1937
    nutlo[0] += dpsi / (3600.0 * 1000000.0);
1938 1938
    nutlo[1] += deps / (3600.0 * 1000000.0);
@@ -1944,7 +1944,7 @@
Loading
1944 1944
}
1945 1945
1946 1946
/* an incomplete implementation of nutation Woolard 1953 */
1947 -
static int calc_nutation_woolard(double J, double *nutlo) 
1947 +
static int calc_nutation_woolard(double J, double *nutlo)
1948 1948
{
1949 1949
  double deps, dpsi;
1950 1950
  double ls, ld;	/* sun's mean longitude, moon's mean longitude */
@@ -2006,11 +2006,11 @@
Loading
2006 2006
  int i, iy, k;
2007 2007
  double ans, p, B, d[6];
2008 2008
  if (t <= 0) {
2009 -
    ans = v[0]; 
2009 +
    ans = v[0];
2010 2010
    goto done;
2011 -
  } 
2011 +
  }
2012 2012
  if (t >= n - 1) {
2013 -
    ans = v[n - 1]; 
2013 +
    ans = v[n - 1];
2014 2014
    goto done;
2015 2015
  }
2016 2016
  p = floor(t);
@@ -2028,7 +2028,7 @@
Loading
2028 2028
  /* Make table of first differences */
2029 2029
  k = iy - 2;
2030 2030
  for (i = 0; i < 5; i++) {
2031 -
    if((k < 0) || (k + 1 >= n)) 
2031 +
    if((k < 0) || (k + 1 >= n))
2032 2032
      d[i] = 0;
2033 2033
    else
2034 2034
      d[i] = v[k+1] - v[k];
@@ -2077,8 +2077,8 @@
Loading
2077 2077
  if (jplhora_model == 0) jplhora_model = SEMOD_JPLHORA_DEFAULT;
2078 2078
  if (iflag & SEFLG_JPLHOR)
2079 2079
    is_jplhor = TRUE;
2080 -
  if ((iflag & SEFLG_JPLHOR_APPROX) && 
2081 -
      jplhora_model == SEMOD_JPLHORA_3 
2080 +
  if ((iflag & SEFLG_JPLHOR_APPROX) &&
2081 +
      jplhora_model == SEMOD_JPLHORA_3
2082 2082
      && J <= HORIZONS_TJD0_DPSI_DEPS_IAU1980)
2083 2083
    is_jplhor = TRUE;
2084 2084
  if (is_jplhor) {
@@ -2157,7 +2157,7 @@
Loading
2157 2157
  return retc;
2158 2158
}
2159 2159
2160 -
#define OFFSET_JPLHORIZONS (-52.3) 
2160 +
#define OFFSET_JPLHORIZONS (-52.3)
2161 2161
#define DCOR_RA_JPL_TJD0  2437846.5
2162 2162
#define NDCOR_RA_JPL  51
2163 2163
double dcor_ra_jpl[] = {
@@ -2169,7 +2169,7 @@
Loading
2169 2169
-52.165, -52.141, -52.255,
2170 2170
};
2171 2171
2172 -
static void swi_approx_jplhor(double *x, double tjd, int32 iflag, AS_BOOL backward) 
2172 +
static void swi_approx_jplhor(double *x, double tjd, int32 iflag, AS_BOOL backward)
2173 2173
{
2174 2174
  double t0, t1;
2175 2175
  double t = (tjd - DCOR_RA_JPL_TJD0) / 365.25;
@@ -2194,7 +2194,7 @@
Loading
2194 2194
  }
2195 2195
  dofs /= (1000.0 * 3600.0);
2196 2196
  swi_cartpol(x, x);
2197 -
  if (backward) 
2197 +
  if (backward)
2198 2198
    x[0] -= dofs * DEGTORAD;
2199 2199
  else
2200 2200
    x[0] += dofs * DEGTORAD;
@@ -2209,7 +2209,7 @@
Loading
2209 2209
  double dpsi_bias = -0.041775 * DAS2R;
2210 2210
  double deps_bias = -0.0068192 * DAS2R;
2211 2211
  double dra0 = -0.0146 * DAS2R;
2212 -
  double deps2000 = 84381.448 * DAS2R; 
2212 +
  double deps2000 = 84381.448 * DAS2R;
2213 2213
#endif
2214 2214
  double xx[6], rb[3][3];
2215 2215
  int i;
@@ -2258,7 +2258,7 @@
Loading
2258 2258
rb[2][1] = +0.0000000330604145;
2259 2259
rb[0][2] = -0.0000000805621715;
2260 2260
rb[1][2] = -0.0000000330604145;
2261 -
rb[2][2] = +0.9999999999999962; 
2261 +
rb[2][2] = +0.9999999999999962;
2262 2262
#endif
2263 2263
  if (backward) {
2264 2264
    swi_approx_jplhor(x, tjd, iflag, TRUE);
@@ -2302,7 +2302,7 @@
Loading
2302 2302
  rb[0][0] = +0.9999999999999928;
2303 2303
  rb[0][1] = +0.0000001110223287;
2304 2304
  rb[0][2] = +0.0000000441180557;
2305 -
  rb[1][0] = -0.0000001110223330; 
2305 +
  rb[1][0] = -0.0000001110223330;
2306 2306
  rb[1][1] = +0.9999999999999891;
2307 2307
  rb[1][2] = +0.0000000964779176;
2308 2308
  rb[2][0] = -0.0000000441180450;
@@ -2333,17 +2333,17 @@
Loading
2333 2333
}
2334 2334
2335 2335
/* DeltaT = Ephemeris Time - Universal Time, in days.
2336 -
 * 
2337 -
 * Before 1955 we use the data developed by 
2336 +
 *
2337 +
 * Before 1955 we use the data developed by
2338 2338
 * Stephenson, Morrison, and Hohenkerk (2016),
2339 2339
 *
2340 2340
 * 1955 - today + a couple of years:
2341 2341
 * ---------------------------------
2342 2342
 * The tabulated values of deltaT from the Astronomical
2343 -
 * Alamanc (AA 1997 etc. pp. K8-K9) are used. Some 
2343 +
 * Alamanc (AA 1997 etc. pp. K8-K9) are used. Some
2344 2344
 * more recent values have been taken from IERS
2345 2345
 * (http://maia.usno.navy.mil/ser7/deltat.data).
2346 -
 * Bessel's interpolation formula is implemented to obtain fourth 
2346 +
 * Bessel's interpolation formula is implemented to obtain fourth
2347 2347
 * order interpolated values at intermediate times.
2348 2348
 * The values are adjusted depending on the ephemeris used
2349 2349
 * and its inherent value of secular tidal acceleration ndot.
@@ -2366,8 +2366,8 @@
Loading
2366 2366
 * Borkowski, K. M., "ELP2000-85 and the Dynamical Time
2367 2367
 * - Universal Time relation," Astronomy and Astrophysics
2368 2368
 * 205, L8-L10 (1988)
2369 -
 * Borkowski's formula is derived from partly doubtful eclipses 
2370 -
 * going back to 2137 BC and uses lunar position based on tidal 
2369 +
 * Borkowski's formula is derived from partly doubtful eclipses
2370 +
 * going back to 2137 BC and uses lunar position based on tidal
2371 2371
 * coefficient of -23.9 arcsec/cy^2.
2372 2372
 *
2373 2373
 * Chapront-Touze, Michelle, and Jean Chapront, _Lunar Tables
@@ -2378,35 +2378,35 @@
Loading
2378 2378
 * Stephenson, F. R., and M. A. Houlden, _Atlas of Historical
2379 2379
 * Eclipse Maps_, Cambridge U. Press (1986)
2380 2380
 *
2381 -
 * Stephenson, F.R. & Morrison, L.V., "Long-Term Fluctuations in 
2382 -
 * the Earth's Rotation: 700 BC to AD 1990", Philosophical 
2383 -
 * Transactions of the Royal Society of London, 
2384 -
 * Ser. A, 351 (1995), 165-202. 
2381 +
 * Stephenson, F.R. & Morrison, L.V., "Long-Term Fluctuations in
2382 +
 * the Earth's Rotation: 700 BC to AD 1990", Philosophical
2383 +
 * Transactions of the Royal Society of London,
2384 +
 * Ser. A, 351 (1995), 165-202.
2385 2385
 *
2386 -
 * Stephenson, F. Richard, _Historical Eclipses and Earth's 
2386 +
 * Stephenson, F. Richard, _Historical Eclipses and Earth's
2387 2387
 * Rotation_, Cambridge U. Press (1997)
2388 2388
 *
2389 -
 * Morrison, L. V., and F.R. Stephenson, "Historical Values of the Earth's 
2390 -
 * Clock Error DT and the Calculation of Eclipses", JHA xxxv (2004), 
2389 +
 * Morrison, L. V., and F.R. Stephenson, "Historical Values of the Earth's
2390 +
 * Clock Error DT and the Calculation of Eclipses", JHA xxxv (2004),
2391 2391
 * pp.327-336
2392 2392
 *
2393 2393
 * Stephenson, F.R., Morrison, L.V., and Hohenkerk, C.Y., "Measurement of the
2394 -
 * Earth's Rotation: 720 BC to AD 2015", Royal Society Proceedings A 
2394 +
 * Earth's Rotation: 720 BC to AD 2015", Royal Society Proceedings A
2395 2395
 * 7 Dec 2016,
2396 2396
 * http://rspa.royalsocietypublishing.org/lookup/doi/10.1098/rspa.2016.0404
2397 -
 * 
2397 +
 *
2398 2398
 * Table from AA for 1620 through today
2399 2399
 * Note, Stephenson and Morrison's table starts at the year 1630.
2400 2400
 * The Chapronts' table does not agree with the Almanac prior to 1630.
2401 2401
 * The actual accuracy decreases rapidly prior to 1780.
2402 2402
 *
2403 2403
 * Jean Meeus, Astronomical Algorithms, 2nd edition, 1998.
2404 -
 * 
2404 +
 *
2405 2405
 * For a comprehensive collection of publications and formulae, see:
2406 2406
 * http://www.phys.uu.nl/~vgent/deltat/deltat_modern.htm
2407 2407
 * http://www.phys.uu.nl/~vgent/deltat/deltat_old.htm
2408 -
 * 
2409 -
 * For future values of delta t, the following data from the 
2408 +
 *
2409 +
 * For future values of delta t, the following data from the
2410 2410
 * Earth Orientation Department of the US Naval Observatory can be used:
2411 2411
 * (TAI-UTC) from: ftp://maia.usno.navy.mil/ser7/tai-utc.dat
2412 2412
 * (UT1-UTC) from: ftp://maia.usno.navy.mil/ser7/finals.all (cols. 59-68)
@@ -2414,7 +2414,7 @@
Loading
2414 2414
 * file description in: ftp://maia.usno.navy.mil/ser7/readme.finals
2415 2415
 * Delta T = TAI-UT1 + 32.184 sec = (TAI-UTC) - (UT1-UTC) + 32.184 sec
2416 2416
 *
2417 -
 * Also, there is the following file: 
2417 +
 * Also, there is the following file:
2418 2418
 * http://maia.usno.navy.mil/ser7/deltat.data, but it is about 3 months
2419 2419
 * behind (on 3 feb 2009); and predictions:
2420 2420
 * http://maia.usno.navy.mil/ser7/deltat.preds
@@ -2425,7 +2425,7 @@
Loading
2425 2425
 */
2426 2426
#define TABSTART 	1620
2427 2427
#define TABEND 		2028
2428 -
#define TABSIZ 		(TABEND-TABSTART+1) 
2428 +
#define TABSIZ 		(TABEND-TABSTART+1)
2429 2429
/* we make the table greater for additional values read from external file */
2430 2430
#define TABSIZ_SPACE 	(TABSIZ+100)
2431 2431
static TLS double dt[TABSIZ_SPACE] = {
@@ -2488,10 +2488,10 @@
Loading
2488 2488
/* 2010.0 - 2018.0 */
2489 2489
66.0699, 66.3246, 66.6030, 66.9069, 67.2810, 67.6439, 68.1024, 68.5927, 68.9676, 69.2202,
2490 2490
/* 2020.0 -        */
2491 -
69.3612,
2492 -
/* Extrapolated values: 
2491 +
69.3612, 69.3593,
2492 +
/* Extrapolated values:
2493 2493
 * 2021 - 2028 */
2494 -
         69.4271, 70.00,   70.50,   71.00,   71.50,   72.00,   72.50,   73.00,
2494 +
                  69.2581,   69.50,   70.00,   70.50,   71.00,   71.50,   72.00,
2495 2495
};
2496 2496
2497 2497
#define TAB2_SIZ	27
@@ -2507,11 +2507,11 @@
Loading
2507 2507
/*    0   100   200   300   400   500   600   700   800   900*/
2508 2508
10580, 9600, 8640, 7680, 6700, 5710, 4740, 3810, 2960, 2200,
2509 2509
/* 1000  1100  1200  1300  1400  1500  1600,                 */
2510 -
 1570, 1090,  740,  490,  320,  200,  120,  
2510 +
 1570, 1090,  740,  490,  320,  200,  120,
2511 2511
};
2512 2512
2513 2513
/* Table for -500 through 1600, from Stephenson & Morrison (1995).
2514 -
 * 
2514 +
 *
2515 2515
 * The first value for -550 has been added from Borkowski
2516 2516
 * in order to make this table fit with the Borkowski formula
2517 2517
 * for times before -550.
@@ -2535,7 +2535,7 @@
Loading
2535 2535
2536 2536
/* returns DeltaT (ET - UT) in days
2537 2537
 * double tjd 	= 	julian day in UT
2538 -
 * delta t is adjusted to the tidal acceleration that is compatible 
2538 +
 * delta t is adjusted to the tidal acceleration that is compatible
2539 2539
 * with the ephemeris flag contained in iflag and with the ephemeris
2540 2540
 * files made accessible through swe_set_ephe_path() or swe_set_jplfile().
2541 2541
 * If iflag = -1, then the default tidal acceleration is ussed (i.e.
@@ -2564,7 +2564,7 @@
Loading
2564 2564
    denum = swed.jpldenum;
2565 2565
    if (epheflag & SEFLG_SWIEPH) denum = swed.fidat[SEI_FILE_MOON].sweph_denum;
2566 2566
    if (swi_init_swed_if_start() == 1 && !(epheflag & SEFLG_MOSEPH)) {
2567 -
      if (serr != NULL) 
2567 +
      if (serr != NULL)
2568 2568
	strcpy(serr, "Please call swe_set_ephe_path() or swe_set_jplfile() before calling swe_deltat_ex()");
2569 2569
      retc = swi_set_tid_acc(tjd, epheflag, denum, NULL);  /* _set_ saves tid_acc in swed */
2570 2570
    } else {
@@ -2576,14 +2576,14 @@
Loading
2576 2576
  Y = 2000.0 + (tjd - J2000)/365.25;
2577 2577
  Ygreg = 2000.0 + (tjd - J2000)/365.2425;
2578 2578
  /* Model for epochs before 1955, currently default in Swiss Ephemeris:
2579 -
   * Stephenson/Morrison/Hohenkerk 2016 
2580 -
   * (we switch over to Astronomical Almanac K8-K9 and IERS at 1 Jan. 1955. 
2581 -
   * To make the curve continuous we apply some linear term over 
2579 +
   * Stephenson/Morrison/Hohenkerk 2016
2580 +
   * (we switch over to Astronomical Almanac K8-K9 and IERS at 1 Jan. 1955.
2581 +
   * To make the curve continuous we apply some linear term over
2582 2582
   * 1000 days before this date.)
2583 2583
   * Delta T according to Stephenson/Morrison/Hohenkerk 2016 is based on
2584 2584
   * ancient, medieval, and modern observations of eclipses and occultations.
2585 2585
   * Values of Deltat T before 1955 depend on this kind of observations.
2586 -
   * For more recent data we want to use the data provided by IERS 
2586 +
   * For more recent data we want to use the data provided by IERS
2587 2587
   * (or Astronomical Almanac K8-K9).
2588 2588
   */
2589 2589
  if (deltat_model == SEMOD_DELTAT_STEPHENSON_ETC_2016 && tjd < 2435108.5) { // tjd < 2432521.453645833) {
@@ -2594,9 +2594,9 @@
Loading
2594 2594
    return iflag;
2595 2595
  }
2596 2596
  /* Model used SE 1.77 - 2.05.01, for epochs before 1633:
2597 -
   * Polynomials by Espenak & Meeus 2006, 
2597 +
   * Polynomials by Espenak & Meeus 2006,
2598 2598
   * derived from Stephenson & Morrison 2004.
2599 -
   * deltat_model == SEMOD_DELTAT_ESPENAK_MEEUS_2006: 
2599 +
   * deltat_model == SEMOD_DELTAT_ESPENAK_MEEUS_2006:
2600 2600
   * This method is used only for epochs before 1633. (For more recent
2601 2601
   * epochs, we use the data provided by Astronomical Almanac K8-K9.)
2602 2602
   */
@@ -2608,15 +2608,15 @@
Loading
2608 2608
   * Stephenson & Morrison 2004;
2609 2609
   * before 1620 */
2610 2610
  if (deltat_model == SEMOD_DELTAT_STEPHENSON_MORRISON_2004 && Y < TABSTART) {
2611 -
    // before 1600: 
2611 +
    // before 1600:
2612 2612
    if (Y < TAB2_END) {
2613 2613
      *deltat = deltat_stephenson_morrison_2004_1600(tjd, tid_acc);
2614 2614
      return iflag;
2615 2615
    } else {
2616 2616
      /* between 1600 and 1620:
2617 -
       * linear interpolation between 
2617 +
       * linear interpolation between
2618 2618
       * end of table dt2 and start of table dt */
2619 -
      if (Y >= TAB2_END) { 
2619 +
      if (Y >= TAB2_END) {
2620 2620
	B = TABSTART - TAB2_END;
2621 2621
	iy = (TAB2_END - TAB2_START) / TAB2_STEP;
2622 2622
	dd = (Y - TAB2_END) / B;
@@ -2631,15 +2631,15 @@
Loading
2631 2631
   * Stephenson 1997;
2632 2632
   * before 1620 */
2633 2633
  if (deltat_model == SEMOD_DELTAT_STEPHENSON_1997 && Y < TABSTART) {
2634 -
    // before 1600: 
2634 +
    // before 1600:
2635 2635
    if (Y < TAB97_END) {
2636 2636
      *deltat = deltat_stephenson_morrison_1997_1600(tjd, tid_acc);
2637 2637
      return iflag;
2638 2638
    } else {
2639 2639
      /* between 1600 and 1620:
2640 -
       * linear interpolation between 
2640 +
       * linear interpolation between
2641 2641
       * end of table dt2 and start of table dt */
2642 -
      if (Y >= TAB97_END) { 
2642 +
      if (Y >= TAB97_END) {
2643 2643
	B = TABSTART - TAB97_END;
2644 2644
	iy = (TAB97_END - TAB97_START) / TAB97_STEP;
2645 2645
	dd = (Y - TAB97_END) / B;
@@ -2650,8 +2650,8 @@
Loading
2650 2650
      }
2651 2651
    }
2652 2652
  }
2653 -
  /* delta t model used before SE 1.64: 
2654 -
   * Stephenson/Morrison 1984 with Borkowski 1988; 
2653 +
  /* delta t model used before SE 1.64:
2654 +
   * Stephenson/Morrison 1984 with Borkowski 1988;
2655 2655
   * before 1620 */
2656 2656
  if (deltat_model == SEMOD_DELTAT_STEPHENSON_MORRISON_1984 && Y < TABSTART) {
2657 2657
    if( Y >= 948.0 ) {
@@ -2668,8 +2668,8 @@
Loading
2668 2668
    return iflag;
2669 2669
  }
2670 2670
  /* 1620 - today + a few years (tabend):
2671 -
   * Tabulated values of deltaT from Astronomical Almanac 
2672 -
   * (AA 1997etc., pp. K8-K9) and from IERS  
2671 +
   * Tabulated values of deltaT from Astronomical Almanac
2672 +
   * (AA 1997etc., pp. K8-K9) and from IERS
2673 2673
   * (http://maia.usno.navy.mil/ser7/deltat.data).
2674 2674
   */
2675 2675
  if (Y >= TABSTART) {
@@ -2716,10 +2716,10 @@
Loading
2716 2716
}
2717 2717
2718 2718
/* The tabulated values of deltaT, in hundredths of a second,
2719 -
 * were taken from The Astronomical Almanac 1997etc., pp. K8-K9.  
2719 +
 * were taken from The Astronomical Almanac 1997etc., pp. K8-K9.
2720 2720
 * Some more recent values are taken from IERS
2721 2721
 * http://maia.usno.navy.mil/ser7/deltat.data .
2722 -
 * Bessel's interpolation formula is implemented to obtain fourth 
2722 +
 * Bessel's interpolation formula is implemented to obtain fourth
2723 2723
 * order interpolated values at intermediate times.
2724 2724
 * The values are adjusted depending on the ephemeris used
2725 2725
 * and its inherent value of secular tidal acceleration ndot.
@@ -2761,7 +2761,7 @@
Loading
2761 2761
    /* Make table of first differences */
2762 2762
    k = iy - 2;
2763 2763
    for( i=0; i<5; i++ ) {
2764 -
      if( (k < 0) || (k+1 >= tabsiz) ) 
2764 +
      if( (k < 0) || (k+1 >= tabsiz) )
2765 2765
	d[i] = 0;
2766 2766
      else
2767 2767
	d[i] = dt[k+1] - dt[k];
@@ -2799,8 +2799,8 @@
Loading
2799 2799
    ans = adjust_for_tidacc(ans, Y, tid_acc, SE_TIDAL_26, FALSE);
2800 2800
    return ans / 86400.0;
2801 2801
  }
2802 -
  /* today - future: 
2803 -
   * 3rd degree polynomial based on data given by 
2802 +
  /* today - future:
2803 +
   * 3rd degree polynomial based on data given by
2804 2804
   * Stephenson/Morrison/Hohenkerk 2016 here:
2805 2805
   * http://astro.ukho.gov.uk/nao/lvm/
2806 2806
   */
@@ -2816,7 +2816,7 @@
Loading
2816 2816
      B = 0.01 * (Y - 2000);
2817 2817
      ans = B * B * 32.5 + 42.5;
2818 2818
    }
2819 -
  /* 
2819 +
  /*
2820 2820
   * Formula Stephenson (1997; p. 507),
2821 2821
   * with modification to avoid jump at end of AA table,
2822 2822
   * similar to what Meeus 1998 had suggested.
@@ -2896,7 +2896,7 @@
Loading
2896 2896
  double Y = 2000.0 + (tjd - J2000)/365.2425;
2897 2897
  /* double Y = 2000.0 + (tjd - J2000)/365.25;*/
2898 2898
  /* before -1000:
2899 -
   * formula by Stephenson & Morrison (2004; p. 335) but adjusted to fit the 
2899 +
   * formula by Stephenson & Morrison (2004; p. 335) but adjusted to fit the
2900 2900
   * starting point of table dt2. */
2901 2901
  if( Y < TAB2_START ) { // before -1000
2902 2902
    ans = deltat_longterm_morrison_stephenson(tjd);
@@ -2917,9 +2917,9 @@
Loading
2917 2917
      ans = ans - dd * B;
2918 2918
    }
2919 2919
  }
2920 -
  /* between -1000 and 1600: 
2920 +
  /* between -1000 and 1600:
2921 2921
   * linear interpolation between values of table dt2 (Stephenson & Morrison 2004) */
2922 -
  if (Y >= TAB2_START && Y < TAB2_END) { 
2922 +
  if (Y >= TAB2_START && Y < TAB2_END) {
2923 2923
    double Yjul = 2000 + (tjd - 2451557.5) / 365.25;
2924 2924
    p = floor(Yjul);
2925 2925
    iy = (int) ((p - TAB2_START) / TAB2_STEP);
@@ -2932,7 +2932,7 @@
Loading
2932 2932
  return ans;
2933 2933
}
2934 2934
2935 -
/* 
2935 +
/*
2936 2936
 * These coefficients represent the spline approximation discussed in the
2937 2937
 * paper "Measurement of the Earth's Rotation: 720 BC to AD 2015",
2938 2938
 * Stephenson, F.R., Morrison, L.V., and Hohenkerk, C.Y., published by
@@ -2940,7 +2940,7 @@
Loading
2940 2940
 * http://rspa.royalsocietypublishing.org/lookup/doi/10.1098/rspa.2016.0404.
2941 2941
 * Year numbers have been replaced by Julian day numbers by D. Koch.
2942 2942
 */
2943 -
#define NDTCF16 54 
2943 +
#define NDTCF16 54
2944 2944
double dtcf16[NDTCF16][6] =
2945 2945
{
2946 2946
/*00*/ {1458085.5, 1867156.5, 20550.593,-21268.478, 11863.418, -4541.129}, /* ybeg=-720, yend= 400 */
@@ -3025,8 +3025,8 @@
Loading
3025 3025
    dt = -320 + 32.5 * t * t;
3026 3026
    dt += 269.4790417; // to make curve continous on 1 Jan 2016 (D. Koch)
3027 3027
  }
3028 -
  /* The parameter adjust_after_1955 must be TRUE here, because the 
3029 -
   * Stephenson 2016 curve is based on occultation data alone, 
3028 +
  /* The parameter adjust_after_1955 must be TRUE here, because the
3029 +
   * Stephenson 2016 curve is based on occultation data alone,
3030 3030
   * not on IERS data.
3031 3031
   * Note, however, the current function deltat_stephenson_etc_2016()
3032 3032
   * is called only for dates before 1 Jan 1955. */
@@ -3100,10 +3100,10 @@
Loading
3100 3100
  /* no error message if file is missing */
3101 3101
  if ((fp = swi_fopen(-1, "swe_deltat.txt", swed.ephepath, NULL)) == NULL
3102 3102
    && (fp = swi_fopen(-1, "sedeltat.txt", swed.ephepath, NULL)) == NULL)
3103 -
    return TABSIZ; 
3103 +
    return TABSIZ;
3104 3104
  while(fgets(s, AS_MAXCH, fp) != NULL) {
3105 3105
    sp = s;
3106 -
    while (strchr(" \t", *sp) != NULL && *sp != '\0') 
3106 +
    while (strchr(" \t", *sp) != NULL && *sp != '\0')
3107 3107
      sp++;	/* was *sp++  fixed by Alois 2-jul-2003 */
3108 3108
    if (*sp == '#' || *sp == '\n')
3109 3109
      continue;
@@ -3111,7 +3111,7 @@
Loading
3111 3111
    tab_index = year - TABSTART;
3112 3112
    /* table space is limited. no error msg, if exceeded */
3113 3113
    if (tab_index >= TABSIZ_SPACE)
3114 -
      continue; 
3114 +
      continue;
3115 3115
    sp += 4;
3116 3116
    while (strchr(" \t", *sp) != NULL && *sp != '\0')
3117 3117
      sp++;	/* was *sp++  fixed by Alois 2-jul-2003 */
@@ -3123,7 +3123,7 @@
Loading
3123 3123
/* find table size */
3124 3124
tabsiz = 2001 - TABSTART + 1;
3125 3125
for (i = tabsiz - 1; i < TABSIZ_SPACE; i++) {
3126 -
  if (dt[i] == 0) 
3126 +
  if (dt[i] == 0)
3127 3127
    break;
3128 3128
  else
3129 3129
    tabsiz++;
@@ -3160,7 +3160,7 @@
Loading
3160 3160
 * t_acc can be either
3161 3161
 * - the value of the tidal acceleration in arcsec/cty^2
3162 3162
 *   of the Moon will be set consistent with that ephemeris.
3163 -
 * - SE_TIDAL_AUTOMATIC, 
3163 +
 * - SE_TIDAL_AUTOMATIC,
3164 3164
 */
3165 3165
void CALL_CONV swe_set_tid_acc(double t_acc)
3166 3166
{
@@ -3176,7 +3176,7 @@
Loading
3176 3176
void CALL_CONV swe_set_delta_t_userdef(double dt)
3177 3177
{
3178 3178
  if (dt == SE_DELTAT_AUTOMATIC) {
3179 -
    swed.delta_t_userdef_is_set = FALSE; 
3179 +
    swed.delta_t_userdef_is_set = FALSE;
3180 3180
  } else {
3181 3181
    swed.delta_t_userdef_is_set = TRUE;
3182 3182
    swed.delta_t_userdef = dt;
@@ -3230,6 +3230,8 @@
Loading
3230 3230
    case 422: *tid_acc = SE_TIDAL_DE422; break;
3231 3231
    case 430: *tid_acc = SE_TIDAL_DE430; break;
3232 3232
    case 431: *tid_acc = SE_TIDAL_DE431; break;
3233 +
    case 440: *tid_acc = SE_TIDAL_DE441; break;
3234 +
    case 441: *tid_acc = SE_TIDAL_DE441; break;
3233 3235
    default: denum = SE_DE_NUMBER; *tid_acc = SE_TIDAL_DEFAULT; break;
3234 3236
  }
3235 3237
  *denumret = denum;
@@ -3266,7 +3268,7 @@
Loading
3266 3268
}
3267 3269
3268 3270
/*
3269 -
 * The time range of DE431 requires a new calculation of sidereal time that 
3271 +
 * The time range of DE431 requires a new calculation of sidereal time that
3270 3272
 * gives sensible results for the remote past and future.
3271 3273
 * The algorithm is based on the formula of the mean earth by Simon & alii,
3272 3274
 * "Precession formulae and mean elements for the Moon and the Planets",
@@ -3275,7 +3277,7 @@
Loading
3275 3277
 * is calculated and then precessed to the equinox of date, using the
3276 3278
 * default precession model of the Swiss Ephmeris. Afte that,
3277 3279
 * sidereal time is derived.
3278 -
 * The algoritm provides exact agreement for epoch 1 Jan. 2003 with the 
3280 +
 * The algoritm provides exact agreement for epoch 1 Jan. 2003 with the
3279 3281
 * definition of sidereal time as given in the IERS Convention 2010.
3280 3282
 */
3281 3283
/*#define SIDT_LTERM   TRUE
@@ -3310,7 +3312,7 @@
Loading
3310 3312
  swi_cartpol(xs, xs);
3311 3313
  xs[0] *= RADTODEG;
3312 3314
  dhour = fmod(tjd_ut - 0.5, 1) * 360;
3313 -
  /* mean to true (if nut != 0) */ 
3315 +
  /* mean to true (if nut != 0) */
3314 3316
  if (eps == 0)
3315 3317
    xs[0] += xobl[2] * cos(xobl[0] * DEGTORAD);
3316 3318
  else
@@ -3323,16 +3325,16 @@
Loading
3323 3325
/*#endif*/
3324 3326
3325 3327
/* Apparent Sidereal Time at Greenwich with equation of the equinoxes
3326 -
 *  ERA-based expression for for Greenwich Sidereal Time (GST) based 
3327 -
 *  on the IAU 2006 precession and IAU 2000A_R06 nutation 
3328 +
 *  ERA-based expression for for Greenwich Sidereal Time (GST) based
3329 +
 *  on the IAU 2006 precession and IAU 2000A_R06 nutation
3328 3330
 *  ftp://maia.usno.navy.mil/conv2010/chapter5/tab5.2e.txt
3329 3331
 *
3330 3332
 * returns sidereal time in hours.
3331 3333
 *
3332 -
 * program returns sidereal hours since sidereal midnight 
3334 +
 * program returns sidereal hours since sidereal midnight
3333 3335
 * tjd 		julian day UT
3334 -
 * eps 		obliquity of ecliptic, degrees 
3335 -
 * nut 		nutation, degrees 
3336 +
 * eps 		obliquity of ecliptic, degrees
3337 +
 * nut 		nutation, degrees
3336 3338
 */
3337 3339
/*  C'_{s,j})_i     C'_{c,j})_i */
3338 3340
#define SIDTNTERM 33
@@ -3423,7 +3425,7 @@
Loading
3423 3425
  delm[3] = swe_radnorm(5.198466741 + 7771.3771468121 * tt);
3424 3426
  /* OM Mean longitude of the ascending node of the Moon. */
3425 3427
  delm[4] = swe_radnorm(2.18243920 - 33.757045 * tt);
3426 -
  /* Planetary longitudes, Mercury through Neptune (Souchay et al. 1999). 
3428 +
  /* Planetary longitudes, Mercury through Neptune (Souchay et al. 1999).
3427 3429
   * LME, LVE, LEA, LMA, LJU, LSA, LUR, LNE */
3428 3430
  delm[5] = swe_radnorm(4.402608842 + 2608.7903141574 * tt);
3429 3431
  delm[6] = swe_radnorm(3.176146697 + 1021.3285546211 * tt);
@@ -3448,7 +3450,7 @@
Loading
3448 3450
}
3449 3451
3450 3452
/*
3451 -
 * SEMOD_SIDT_IAU_2006 
3453 +
 * SEMOD_SIDT_IAU_2006
3452 3454
 * N. Capitaine, P.T. Wallace, and J. Chapront, "Expressions for IAU 2000
3453 3455
 * precession quantities", 2003, A&A 412, 567-586 (2003), p. 582.
3454 3456
 * This is a "short" term model, that can be combined with other models
@@ -3496,7 +3498,7 @@
Loading
3496 3498
  secs *= 86400.0;
3497 3499
  tu = (jd0 - J2000)/36525.0; /* UT1 in centuries after J2000 */
3498 3500
  if (sidt_model == SEMOD_SIDT_IERS_CONV_2010 || sidt_model == SEMOD_SIDT_LONGTERM) {
3499 -
    /*  ERA-based expression for Greenwich Sidereal Time (GST) based 
3501 +
    /*  ERA-based expression for Greenwich Sidereal Time (GST) based
3500 3502
     *  on the IAU 2006 precession */
3501 3503
    jdrel = tjd - J2000;
3502 3504
    tt = (tjd + swe_deltat_ex(tjd, -1, NULL) - J2000) / 36525.0;
@@ -3557,7 +3559,7 @@
Loading
3557 3559
{
3558 3560
  if (swed.do_interpolate_nut == do_interpolate)
3559 3561
    return;
3560 -
  if (do_interpolate) 
3562 +
  if (do_interpolate)
3561 3563
    swed.do_interpolate_nut = TRUE;
3562 3564
  else
3563 3565
    swed.do_interpolate_nut = FALSE;
@@ -3581,7 +3583,7 @@
Loading
3581 3583
  double eps, nutlo[2], tsid;
3582 3584
  double tjde;
3583 3585
  /* delta t adjusted to default tidal acceleration of the moon */
3584 -
  tjde = tjd_ut + swe_deltat_ex(tjd_ut, -1, NULL); 
3586 +
  tjde = tjd_ut + swe_deltat_ex(tjd_ut, -1, NULL);
3585 3587
  swi_init_swed_if_start();
3586 3588
  eps = swi_epsiln(tjde, 0) * RADTODEG;
3587 3589
  swi_nutation(tjde, 0, nutlo);
@@ -3597,7 +3599,7 @@
Loading
3597 3599
 * swephpl.m30, where
3598 3600
 *
3599 3601
 * "sweph"              	"swiss ephemeris"
3600 -
 * "pl","mo","as"               planet, moon, or asteroid 
3602 +
 * "pl","mo","as"               planet, moon, or asteroid
3601 3603
 * "m"  or "_"                  BC or AD
3602 3604
 *
3603 3605
 * "30"                         start century
@@ -3605,8 +3607,8 @@
Loading
3605 3607
 * ipli       	= number of planet
3606 3608
 * fname      	= ephemeris file name
3607 3609
 */
3608 -
void swi_gen_filename(double tjd, int ipli, char *fname) 
3609 -
{  
3610 +
void swi_gen_filename(double tjd, int ipli, char *fname)
3611 +
{
3610 3612
  int icty;
3611 3613
  int ncties = (int) NCTIES;
3612 3614
  short gregflag;
@@ -3642,7 +3644,7 @@
Loading
3642 3644
        sprintf(fname, "sat%ssepm%d.%s", DIR_GLUE, ipli, SE_FILE_SUFFIX);
3643 3645
      } else {
3644 3646
	sform = "ast%d%sse%05d.%s";
3645 -
	if (ipli - SE_AST_OFFSET > 99999) 
3647 +
	if (ipli - SE_AST_OFFSET > 99999)
3646 3648
	  sform = "ast%d%ss%06d.%s";
3647 3649
	sprintf(fname, sform, (ipli - SE_AST_OFFSET) / 1000, DIR_GLUE, ipli - SE_AST_OFFSET, SE_FILE_SUFFIX);
3648 3650
      }
@@ -3676,14 +3678,14 @@
Loading
3676 3678
    icty = END_YEAR / 100 - ncties;
3677 3679
#endif
3678 3680
  /* B.C. or A.D. */
3679 -
  if (icty < 0) 
3681 +
  if (icty < 0)
3680 3682
    strcat(fname, "m");
3681 -
  else 
3683 +
  else
3682 3684
    strcat(fname, "_");
3683 3685
  icty = abs(icty);
3684 3686
  sprintf(fname + strlen(fname), "%02d.%s", icty, SE_FILE_SUFFIX);
3685 3687
#if 0
3686 -
  printf("fname  %s\n", fname); 
3688 +
  printf("fname  %s\n", fname);
3687 3689
  fflush(stdout);
3688 3690
#endif
3689 3691
}
@@ -3739,7 +3741,7 @@
Loading
3739 3741
 * significant byte first, and each of the bits within a byte is sent most
3740 3742
 * significant bit first, as in FDDI. You will need to twiddle with it to do
3741 3743
 * Ethernet CRC, i.e., BigEndian/LittleEndian byte/bit order.
3742 -
 * 
3744 +
 *
3743 3745
 * The CRCs this code generates agree with the vendor-supplied Verilog models
3744 3746
 * of several of the popular FDDI "MAC" chips.
3745 3747
 */
@@ -3787,7 +3789,7 @@
Loading
3787 3789
*************************************/
3788 3790
centisec CALL_CONV swe_csnorm(centisec p)
3789 3791
{
3790 -
  if (p < 0) 
3792 +
  if (p < 0)
3791 3793
    do { p += DEG360; } while (p < 0);
3792 3794
  else if (p >= DEG360)
3793 3795
    do { p -= DEG360; } while (p >= DEG360);
@@ -3799,12 +3801,12 @@
Loading
3799 3801
normalized to [0..360[
3800 3802
**************************************/
3801 3803
centisec CALL_CONV swe_difcsn (centisec p1, centisec p2)
3802 -
{ 
3804 +
{
3803 3805
  return (swe_csnorm(p1 - p2));
3804 3806
}
3805 3807
3806 3808
double CALL_CONV swe_difdegn (double p1, double p2)
3807 -
{ 
3809 +
{
3808 3810
  return (swe_degnorm(p1 - p2));
3809 3811
}
3810 3812
@@ -3835,8 +3837,8 @@
Loading
3835 3837
3836 3838
/*************************************
3837 3839
round second, but at 29.5959 always down
3838 -
*************************************/ 
3839 -
centisec CALL_CONV swe_csroundsec(centisec x)	
3840 +
*************************************/
3841 +
centisec CALL_CONV swe_csroundsec(centisec x)
3840 3842
{
3841 3843
  centisec t;
3842 3844
  t = (x + 50) / 100 *100L;	/* round to seconds */
@@ -3847,8 +3849,8 @@
Loading
3847 3849
3848 3850
/*************************************
3849 3851
double to int32 with rounding, no overflow check
3850 -
*************************************/ 
3851 -
int32 CALL_CONV swe_d2l(double x)		
3852 +
*************************************/
3853 +
int32 CALL_CONV swe_d2l(double x)
3852 3854
{
3853 3855
  if (x >=0)
3854 3856
    return ((int32) (x + 0.5));
@@ -3875,7 +3877,7 @@
Loading
3875 3877
  s = t % 60L;
3876 3878
  m = (t / 60) % 60L;
3877 3879
  h = t / 3600 % 100L;
3878 -
  if (s == 0 && suppressZero)  
3880 +
  if (s == 0 && suppressZero)
3879 3881
    a[5] = '\0';
3880 3882
  else {
3881 3883
    a [6] = (char) (s / 10 + '0');
@@ -3900,7 +3902,7 @@
Loading
3900 3902
  s = t % 60L;
3901 3903
  m = t / 60 % 60L;
3902 3904
  h = t / 3600 % 1000L;
3903 -
  if (s == 0)  
3905 +
  if (s == 0)
3904 3906
    a[6] = '\0';   /* cut off seconds */
3905 3907
  else {
3906 3908
    a [7] = (char) (s / 10 + '0');
@@ -3926,7 +3928,7 @@
Loading
3926 3928
  t = t  / 100 % (30L*3600L); /* truncate to seconds */
3927 3929
  s = t % 60L;
3928 3930
  m = t / 60 % 60L;
3929 -
  h = t / 3600 % 100L;	/* only 0..99 degrees */ 
3931 +
  h = t / 3600 % 100L;	/* only 0..99 degrees */
3930 3932
  sprintf(a, "%2d%s%02d'%02d", h, ODEGREE_STRING, m, s);
3931 3933
  return (a);
3932 3934
} /* swe_cs2degstr() */
@@ -3935,11 +3937,11 @@
Loading
3935 3937
 * decimal degrees in zodiac to nakshatra position, deg, min, sec *
3936 3938
 * for definition of input see function swe_split_deg().
3937 3939
 * output:
3938 -
 * ideg 	degrees, 
3939 -
 * imin 	minutes, 
3940 -
 * isec 	seconds, 
3941 -
 * dsecfr	fraction of seconds 
3942 -
 * inak	nakshatra number; 
3940 +
 * ideg 	degrees,
3941 +
 * imin 	minutes,
3942 +
 * isec 	seconds,
3943 +
 * dsecfr	fraction of seconds
3944 +
 * inak	nakshatra number;
3943 3945
 ******************************************************************/
3944 3946
static void split_deg_nakshatra(double ddeg, int32 roundflag, int32 *ideg, int32 *imin, int32 *isec, double *dsecfr, int32 *inak)
3945 3947
{
@@ -3986,7 +3988,7 @@
Loading
3986 3988
 * splitting decimal degrees into (zod.sign,) deg, min, sec. *
3987 3989
 * input:
3988 3990
 * ddeg 	decimal degrees, ecliptic longitude
3989 -
 * roundflag    by default there is no rounding. if rounding is 
3991 +
 * roundflag    by default there is no rounding. if rounding is
3990 3992
 *              required, the following bits can be set:
3991 3993
# define SE_SPLIT_DEG_ROUND_SEC    1
3992 3994
# define SE_SPLIT_DEG_ROUND_MIN    2
@@ -3995,21 +3997,21 @@
Loading
3995 3997
# define SE_SPLIT_DEG_NAKSHATRA 1024   * split into nakshatras *
3996 3998
# define SE_SPLIT_DEG_KEEP_SIGN   16   * don't round to next zodiac sign,
3997 3999
                                       * e.g. 29.9999998 will be rounded
3998 -
				       * to 29°59'59" (or 29°59' or 29°) * 
4000 +
				       * to 29°59'59" (or 29°59' or 29°) *
3999 4001
				       * or next nakshatra:
4000 4002
                                       * e.g. 13.3333332 will be rounded
4001 -
				       * to 13°19'59" (or 13°19' or 13°) * 
4003 +
				       * to 13°19'59" (or 13°19' or 13°) *
4002 4004
# define SE_SPLIT_DEG_KEEP_DEG    32   * don't round to next degree
4003 4005
                                       * e.g. 10.9999999 will be rounded
4004 -
				       * to 10d59'59" (or 10d59' or 10d) * 
4006 +
				       * to 10d59'59" (or 10d59' or 10d) *
4005 4007
 * output:
4006 -
 *  ideg 	degrees, 
4007 -
 *  imin 	minutes, 
4008 -
 *  isec 	seconds, 
4009 -
 *  dsecfr	fraction of seconds 
4010 -
 *  isgn	zodiac sign number; 
4008 +
 *  ideg 	degrees,
4009 +
 *  imin 	minutes,
4010 +
 *  isec 	seconds,
4011 +
 *  dsecfr	fraction of seconds
4012 +
 *  isgn	zodiac sign number;
4011 4013
 *              or +/- sign
4012 -
 *  
4014 +
 *
4013 4015
 *********************************************************/
4014 4016
void CALL_CONV swe_split_deg(double ddeg, int32 roundflag, int32 *ideg, int32 *imin, int32 *isec, double *dsecfr, int32 *isgn)
4015 4017
{
@@ -4069,7 +4071,7 @@
Loading
4069 4071
    while(dE > 1e-12) {
4070 4072
      E0 = E;
4071 4073
      /*
4072 -
       * Alois 21-jul-2000: workaround an optimizer problem in gcc 
4074 +
       * Alois 21-jul-2000: workaround an optimizer problem in gcc
4073 4075
       * swi_mod2PI sees very small negative argument e-322 and returns +2PI;
4074 4076
       * we avoid swi_mod2PI for small x.
4075 4077
       */
@@ -4127,15 +4129,15 @@
Loading
4127 4129
    sp = sp2 + 1;
4128 4130
    pmodel[i] = atoi(sp);
4129 4131
    i++;
4130 -
  } 
4132 +
  }
4131 4133
}
4132 4134
4133 4135
4134 4136
/*
4135 4137
 * Function for inhouse testing of old SE versions.
4136 4138
 *
4137 -
 * Values of the following macros are defined in swephexp.h 
4138 -
 * and must be identical to the ones used in the defines below 
4139 +
 * Values of the following macros are defined in swephexp.h
4140 +
 * and must be identical to the ones used in the defines below
4139 4141
D1 SEMOD_DELTAT_STEPHENSON_MORRISON_1984
4140 4142
D2 SEMOD_DELTAT_STEPHENSON_1997
4141 4143
D3 SEMOD_DELTAT_STEPHENSON_MORRISON_2004
@@ -4168,7 +4170,7 @@
Loading
4168 4170
S2 SEMOD_SIDT_IAU_2006
4169 4171
S3 SEMOD_SIDT_IERS_CONV_2010
4170 4172
S4 SEMOD_SIDT_LONGTERM
4171 -
 *                           D P P N B J J S 
4173 +
 *                           D P P N B J J S
4172 4174
 */
4173 4175
# define AMODELS_SE_1_00    "1,3,1,1,1,0,0,1"
4174 4176
# define AMODELS_SE_1_64    "2,3,1,1,1,0,0,1"
@@ -4202,7 +4204,7 @@
Loading
4202 4204
      set_astro_models(AMODELS_SE_2_00);
4203 4205
    } else if (dversion >= 2.00) {
4204 4206
      set_astro_models(AMODELS_SE_2_00);
4205 -
      if (swi_get_denum(SEI_SUN, iflag) == 431) 
4207 +
      if (swi_get_denum(SEI_SUN, iflag) == 431)
4206 4208
        swe_set_tid_acc(SE_TIDAL_DE406);
4207 4209
    } else if (dversion >= 1.80) {
4208 4210
      set_astro_models(AMODELS_SE_1_80);
@@ -4295,13 +4297,13 @@
Loading
4295 4297
    case SEMOD_DELTAT_STEPHENSON_MORRISON_2004:
4296 4298
    strcpy(s, "Stephenson/Morrison 2004 (before 1600)");
4297 4299
    break;
4298 -
    case SEMOD_DELTAT_STEPHENSON_1997:  
4300 +
    case SEMOD_DELTAT_STEPHENSON_1997:
4299 4301
    strcpy(s, "Stephenson 1997 (before 1600)");
4300 4302
    break;
4301 4303
    case SEMOD_DELTAT_STEPHENSON_MORRISON_1984:
4302 4304
    strcpy(s, "Stephenson/Morrison 1984 (before 1600)");
4303 4305
    break;
4304 -
    case SEMOD_DELTAT_STEPHENSON_ETC_2016:  
4306 +
    case SEMOD_DELTAT_STEPHENSON_ETC_2016:
4305 4307
    strcpy(s, "Stephenson/Morrison/Hohenkerk 2016 (before 1955)");
4306 4308
    break;
4307 4309
  }
@@ -4336,7 +4338,7 @@
Loading
4336 4338
    break;
4337 4339
  }
4338 4340
  if (iflag & SEFLG_JPLEPH) {
4339 -
    if (iflag & SEFLG_JPLHOR) 
4341 +
    if (iflag & SEFLG_JPLHOR)
4340 4342
      strcpy(s, "IAU 1980 (Wahr)");
4341 4343
    if (iflag & SEFLG_JPLHOR) {
4342 4344
      strcat(s, "\n+ daily corrections to dpsi/deps 1962-today");
@@ -4430,17 +4432,17 @@
Loading
4430 4432
    }
4431 4433
    sprintf(samod0 + strlen(samod0), "%d,", imod);
4432 4434
  }
4433 -
  /*if (samod != NULL) 
4435 +
  /*if (samod != NULL)
4434 4436
    strcpy(samod, samod0);*/
4435 4437
  *sdet = '\0';
4436 4438
  if (sdet != NULL) {
4437 4439
    /* JPL ephemeris number and tidal acceleration used with it */
4438 -
    sprintf(sdet + strlen(sdet), "JPL eph. %d; tidal acc. Moon used by SE: %.4f\n", 
4440 +
    sprintf(sdet + strlen(sdet), "JPL eph. %d; tidal acc. Moon used by SE: %.4f\n",
4439 4441
      swi_get_denum(SEI_SUN, iflag), swe_get_tid_acc());
4440 4442
    if (iflag & SEFLG_JPLEPH) {
4441 -
      if (iflag & SEFLG_JPLHOR) 
4443 +
      if (iflag & SEFLG_JPLHOR)
4442 4444
	strcat(sdet, "JPL Horizons method:\n");
4443 -
      if (iflag & SEFLG_JPLHOR_APPROX) 
4445 +
      if (iflag & SEFLG_JPLHOR_APPROX)
4444 4446
	strcat(sdet, "JPL Horizons method (approximation):\n");
4445 4447
    } else if (iflag & SEFLG_SWIEPH) {
4446 4448
      strcat(sdet, "Swiss Ephemeris compressed files sepl*/semo*\n");
@@ -4554,7 +4556,7 @@
Loading
4554 4556
{
4555 4557
  swi_trace_count++;
4556 4558
  if (swi_trace_count >= TRACE_COUNT_MAX) {
4557 -
    if (swi_trace_count == TRACE_COUNT_MAX) { 
4559 +
    if (swi_trace_count == TRACE_COUNT_MAX) {
4558 4560
      if (serr != NULL)
4559 4561
	sprintf(serr, "trace stopped, %d calls exceeded.", TRACE_COUNT_MAX);
4560 4562
      if (swi_fp_trace_out != NULL)
@@ -4587,9 +4589,9 @@
Loading
4587 4589
	sprintf(serr, "could not open trace output file '%s'", fname);
4588 4590
      }
4589 4591
    } else {
4590 -
      fputs("#include \"sweodef.h\"\n", swi_fp_trace_c);   
4591 -
      fputs("#include \"swephexp.h\"\n\n", swi_fp_trace_c);   
4592 -
      fputs("void main()\n{\n", swi_fp_trace_c);   
4592 +
      fputs("#include \"sweodef.h\"\n", swi_fp_trace_c);
4593 +
      fputs("#include \"swephexp.h\"\n\n", swi_fp_trace_c);
4594 +
      fputs("void main()\n{\n", swi_fp_trace_c);
4593 4595
      fputs("  double tjd, t, nut, eps; int i, ipl, retc; int32 iflag;\n", swi_fp_trace_c);
4594 4596
      fputs("  double armc, geolat, cusp[12], ascmc[10]; int hsys;\n", swi_fp_trace_c);
4595 4597
      fputs("  double xx[6]; int32 iflgret;\n", swi_fp_trace_c);

@@ -3,8 +3,8 @@
Loading
3 3
 * Steve Moshier's analytical lunar ephemeris
4 4
5 5
**************************************************************/
6 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
7 -
  
6 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
7 +
8 8
  License conditions
9 9
  ------------------
10 10
@@ -19,17 +19,17 @@
Loading
19 19
  system. The software developer, who uses any part of Swiss Ephemeris
20 20
  in his or her software, must choose between one of the two license models,
21 21
  which are
22 -
  a) GNU public license version 2 or later
22 +
  a) GNU Affero General Public License (AGPL)
23 23
  b) Swiss Ephemeris Professional License
24 24
25 25
  The choice must be made before the software developer distributes software
26 26
  containing parts of Swiss Ephemeris to others, and before any public
27 27
  service using the developed software is activated.
28 28
29 -
  If the developer choses the GNU GPL software license, he or she must fulfill
29 +
  If the developer choses the AGPL software license, he or she must fulfill
30 30
  the conditions of that license, which includes the obligation to place his
31 -
  or her whole software project under the GNU GPL or a compatible license.
32 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
31 +
  or her whole software project under the AGPL or a compatible license.
32 +
  See https://www.gnu.org/licenses/agpl-3.0.html
33 33
34 34
  If the developer choses the Swiss Ephemeris Professional license,
35 35
  he must follow the instructions as found in http://www.astro.com/swisseph/ 

@@ -1,18 +1,17 @@
Loading
1 1
/*********************************************************
2 -
  version 15-feb-89 16:30
3 2
  
4 3
  swe_date_conversion()
5 4
  swe_revjul()
6 5
  swe_julday()
7 6
8 7
************************************************************/
9 -
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland.  All rights reserved.
10 -
  
8 +
/* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
9 +
11 10
  License conditions
12 11
  ------------------
13 12
14 13
  This file is part of Swiss Ephemeris.
15 -
  
14 +
16 15
  Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND.  No author
17 16
  or distributor accepts any responsibility for the consequences of using it,
18 17
  or for whether it serves any particular purpose or works at all, unless he
@@ -22,17 +21,17 @@
Loading
22 21
  system. The software developer, who uses any part of Swiss Ephemeris
23 22
  in his or her software, must choose between one of the two license models,
24 23
  which are
25 -
  a) GNU public license version 2 or later
24 +
  a) GNU Affero General Public License (AGPL)
26 25
  b) Swiss Ephemeris Professional License
27 -
  
26 +
28 27
  The choice must be made before the software developer distributes software
29 28
  containing parts of Swiss Ephemeris to others, and before any public
30 29
  service using the developed software is activated.
31 30
32 -
  If the developer choses the GNU GPL software license, he or she must fulfill
31 +
  If the developer choses the AGPL software license, he or she must fulfill
33 32
  the conditions of that license, which includes the obligation to place his
34 -
  or her whole software project under the GNU GPL or a compatible license.
35 -
  See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
33 +
  or her whole software project under the AGPL or a compatible license.
34 +
  See https://www.gnu.org/licenses/agpl-3.0.html
36 35
37 36
  If the developer choses the Swiss Ephemeris Professional license,
38 37
  he must follow the instructions as found in http://www.astro.com/swisseph/ 
Files Coverage
R 56.00%
src 49.21%
Project Totals (13 files) 49.23%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
    patch:
10
      default:
11
        target: auto
12
        threshold: 1%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading