Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to SOFA 2015-02-09 #26

Merged
merged 5 commits into from
Feb 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in this source distribution.
Differences from SOFA
---------------------

This version of ERFA (v1.1.1) is based on SOFA version "20131202_c", with the
This version of ERFA (v1.2.1) is based on SOFA version "20150209", with the
differences outlined below.

ERFA branding
Expand All @@ -34,7 +34,9 @@ Bugfixes
ERFA includes smaller changes that may or may not eventually make it into SOFA,
addressing localized bugs or similar smaller issues:

* `Issue #14 <https://github.com/liberfa/erfa/pull/14>`_: Check for possible buffer underrun in ``dat.c``
* Fixes a possible compiler warning in eraDat. This fix was in SOFA
issue 2013-02-02d but inadvertently dropped from SOFA issue 2015-02-09.
ERFA retains the fix, which will be included in a future SOFA release.

Building and installing ERFA
----------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ dtf2d.c ee00a.c ee00b.c ee00.c ee06a.c eect00.c eform.c eo06a.c \
eors.c epb2jd.c epb.c epj2jd.c epj.c epv00.c eqeq94.c era00.c \
fad03.c fae03.c faf03.c faju03.c fal03.c falp03.c fama03.c \
fame03.c fane03.c faom03.c fapa03.c fasa03.c faur03.c fave03.c \
fk52h.c fk5hip.c fk5hz.c fw2m.c fw2xy.c gc2gd.c gc2gde.c gd2gc.c \
fk52h.c fk5hip.c fk5hz.c fw2m.c fw2xy.c g2icrs.c gc2gd.c gc2gde.c gd2gc.c \
gd2gce.c gmst00.c gmst06.c gmst82.c gst00a.c gst00b.c gst06a.c \
gst06.c gst94.c h2fk5.c hfk5z.c ir.c jd2cal.c jdcalf.c ld.c \
gst06.c gst94.c h2fk5.c hfk5z.c icrs2g.c ir.c jd2cal.c jdcalf.c ld.c \
ldn.c ldsun.c num00a.c num00b.c num06a.c numat.c nut00a.c nut00b.c \
nut06a.c nut80.c nutm80.c obl06.c obl80.c p06e.c p2pv.c p2s.c pap.c \
pas.c pb06.c pdp.c pfw06.c plan94.c pmat00.c pmat06.c pmat76.c \
Expand Down
5 changes: 2 additions & 3 deletions src/a2af.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ void eraA2af(int ndp, double angle, char *sign, int idmsf[4])
** case where angle is very nearly 2pi and rounds up to 360 degrees,
** by testing for idmsf[0]=360 and setting idmsf[0-3] to zero.
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
/* Hours to degrees * radians to turns */
const double F = 15.0 / ERFA_D2PI;


/* Scale then use days to h,m,s function. */
eraD2tf(ndp, angle*F, sign, idmsf);

Expand All @@ -68,7 +67,7 @@ void eraA2af(int ndp, double angle, char *sign, int idmsf[4])
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
4 changes: 2 additions & 2 deletions src/a2tf.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void eraA2tf(int ndp, double angle, char *sign, int ihmsf[4])
** case where angle is very nearly 2pi and rounds up to 24 hours,
** by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero.
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
Expand All @@ -64,7 +64,7 @@ void eraA2tf(int ndp, double angle, char *sign, int ihmsf[4])
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/ab.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ void eraAb(double pnat[3], double v[3], double s, double bm1,
** Called:
** eraPdp scalar product of two p-vectors
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
int i;
double pdv, w1, w2, r2, w, p[3], r;


pdv = eraPdp(pnat, v);
w1 = 1.0 + pdv/(1.0 + bm1);
w2 = ERFA_SRS/s;
Expand All @@ -76,7 +75,7 @@ void eraAb(double pnat[3], double v[3], double s, double bm1,
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
4 changes: 2 additions & 2 deletions src/af2a.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int eraAf2a(char s, int ideg, int iamin, double asec, double *rad)
** 3) If there are multiple errors, the status value reflects only the
** first, the smallest taking precedence.
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
Expand All @@ -55,7 +55,7 @@ int eraAf2a(char s, int ideg, int iamin, double asec, double *rad)
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/anp.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ double eraAnp(double a)
** Returned (function value):
** double angle in range 0-2pi
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
double w;


w = fmod(a, ERFA_D2PI);
if (w < 0) w += ERFA_D2PI;

Expand All @@ -30,7 +29,7 @@ double eraAnp(double a)
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/anpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ double eraAnpm(double a)
** Returned (function value):
** double angle in range +/-pi
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
double w;


w = fmod(a, ERFA_D2PI);
if (fabs(w) >= ERFA_DPI) w -= ERFA_DSIGN(ERFA_D2PI, a);

Expand All @@ -30,7 +29,7 @@ double eraAnpm(double a)
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/apcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,14 @@ void eraApcg(double date1, double date2,
** Called:
** eraApcs astrometry parameters, ICRS-GCRS, space observer
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
/* Geocentric observer */
double pv[2][3] = { { 0.0, 0.0, 0.0 },
{ 0.0, 0.0, 0.0 } };


/* Compute the star-independent astrometry parameters. */
eraApcs(date1, date2, pv, ebpv, ehp, astrom);

Expand All @@ -120,7 +119,7 @@ void eraApcg(double date1, double date2,
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/apcg13.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ void eraApcg13(double date1, double date2, eraASTROM *astrom)
** eraEpv00 Earth position and velocity
** eraApcg astrometry parameters, ICRS-GCRS, geocenter
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
double ehpv[2][3], ebpv[2][3];


/* Earth barycentric & heliocentric position/velocity (au, au/d). */
(void) eraEpv00(date1, date2, ehpv, ebpv);

Expand All @@ -123,7 +122,7 @@ void eraApcg13(double date1, double date2, eraASTROM *astrom)
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
4 changes: 2 additions & 2 deletions src/apci.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void eraApci(double date1, double date2,
** eraApcg astrometry parameters, ICRS-GCRS, geocenter
** eraC2ixys celestial-to-intermediate matrix, given X,Y and s
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
Expand All @@ -129,7 +129,7 @@ void eraApci(double date1, double date2,
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/apci13.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,12 @@ void eraApci13(double date1, double date2,
** eraApci astrometry parameters, ICRS-CIRS
** eraEors equation of the origins, given NPB matrix and s
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
double ehpv[2][3], ebpv[2][3], r[3][3], x, y, s;


/* Earth barycentric & heliocentric position/velocity (au, au/d). */
(void) eraEpv00(date1, date2, ehpv, ebpv);

Expand All @@ -141,7 +140,7 @@ void eraApci13(double date1, double date2,
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/apco.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,12 @@ void eraApco(double date1, double date2,
** eraApcs astrometry parameters, ICRS-GCRS, space observer
** eraCr copy r-matrix
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
double sl, cl, r[3][3], pvc[2][3], pv[2][3];


/* Longitude with adjustment for TIO locator s'. */
astrom->along = elong + sp;

Expand Down Expand Up @@ -203,7 +202,7 @@ void eraApco(double date1, double date2,
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/apco13.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,14 @@ int eraApco13(double utc1, double utc2, double dut1,
** eraApco astrometry parameters, ICRS-observed
** eraEors equation of the origins, given NPB matrix and s
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
int j;
double tai1, tai2, tt1, tt2, ut11, ut12, ehpv[2][3], ebpv[2][3],
r[3][3], x, y, s, theta, sp, refa, refb;


/* UTC to other time scales. */
j = eraUtctai(utc1, utc2, &tai1, &tai2);
if ( j < 0 ) return -1;
Expand Down Expand Up @@ -226,7 +225,7 @@ int eraApco13(double utc1, double utc2, double dut1,
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/apcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void eraApcs(double date1, double date2, double pv[2][3],
** eraPn decompose p-vector into modulus and direction
** eraIr initialize r-matrix to identity
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
Expand All @@ -135,7 +135,6 @@ void eraApcs(double date1, double date2, double pv[2][3],
int i;
double dp, dv, pb[3], vb[3], ph[3], v2, w;


/* Time since reference epoch, years (for proper motion calculation). */
astrom->pmt = ( (date1 - ERFA_DJ00) + date2 ) / ERFA_DJY;

Expand Down Expand Up @@ -172,7 +171,7 @@ void eraApcs(double date1, double date2, double pv[2][3],
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
5 changes: 2 additions & 3 deletions src/apcs13.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ void eraApcs13(double date1, double date2, double pv[2][3],
** eraEpv00 Earth position and velocity
** eraApcs astrometry parameters, ICRS-GCRS, space observer
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
double ehpv[2][3], ebpv[2][3];


/* Earth barycentric & heliocentric position/velocity (au, au/d). */
(void) eraEpv00(date1, date2, ehpv, ebpv);

Expand All @@ -130,7 +129,7 @@ void eraApcs13(double date1, double date2, double pv[2][3],
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
4 changes: 2 additions & 2 deletions src/aper.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void eraAper(double theta, eraASTROM *astrom)
** aberration and parallax (unless subsumed into the ICRS <-> GCRS
** transformation), and atmospheric refraction.
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
Expand All @@ -101,7 +101,7 @@ void eraAper(double theta, eraASTROM *astrom)
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
4 changes: 2 additions & 2 deletions src/aper13.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void eraAper13(double ut11, double ut12, eraASTROM *astrom)
** eraAper astrometry parameters: update ERA
** eraEra00 Earth rotation angle, IAU 2000
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** Derived, with permission, from the SOFA library. See notes at end of file.
*/
{
Expand All @@ -120,7 +120,7 @@ void eraAper13(double ut11, double ut12, eraASTROM *astrom)
/*----------------------------------------------------------------------
**
**
** Copyright (C) 2013-2014, NumFOCUS Foundation.
** Copyright (C) 2013-2015, NumFOCUS Foundation.
** All rights reserved.
**
** This library is derived, with permission, from the International
Expand Down
Loading