sofa.h   sofa.h 
skipping to change at line 14 skipping to change at line 14
/* /*
** - - - - - - - ** - - - - - - -
** s o f a . h ** s o f a . h
** - - - - - - - ** - - - - - - -
** **
** Prototype function declarations for SOFA library. ** Prototype function declarations for SOFA library.
** **
** This file is part of the International Astronomical Union's ** This file is part of the International Astronomical Union's
** SOFA (Standards Of Fundamental Astronomy) software collection. ** SOFA (Standards Of Fundamental Astronomy) software collection.
** **
** This revision: 2010 September 10 ** This revision: 2012 February 23
** **
** SOFA release YYYY-MM-DD ** SOFA release 2012-03-01
** **
** Copyright (C) 2010 IAU SOFA Board. See notes at end. ** Copyright (C) 2012 IAU SOFA Board. See notes at end.
*/ */
#include "math.h" #include "math.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Astronomy/Calendars */ /* Astronomy/Calendars */
int iauCal2jd(int iy, int im, int id, double *djm0, double *djm); int iauCal2jd(int iy, int im, int id, double *djm0, double *djm);
skipping to change at line 218 skipping to change at line 218
int iauGc2gd(int n, double xyz[3], int iauGc2gd(int n, double xyz[3],
double *elong, double *phi, double *height); double *elong, double *phi, double *height);
int iauGc2gde(double a, double f, double xyz[3], int iauGc2gde(double a, double f, double xyz[3],
double *elong, double *phi, double *height); double *elong, double *phi, double *height);
int iauGd2gc(int n, double elong, double phi, double height, int iauGd2gc(int n, double elong, double phi, double height,
double xyz[3]); double xyz[3]);
int iauGd2gce(double a, double f, int iauGd2gce(double a, double f,
double elong, double phi, double height, double xyz[3]); double elong, double phi, double height, double xyz[3]);
/* Astronomy/Timescales */ /* Astronomy/Timescales */
int iauD2dtf(char *scale, int ndp, double d1, double d2, int iauD2dtf(const char *scale, int ndp, double d1, double d2,
int *iy, int *im, int *id, int ihmsf[4]); int *iy, int *im, int *id, int ihmsf[4]);
int iauDat(int iy, int im, int id, double fd, double *deltat); int iauDat(int iy, int im, int id, double fd, double *deltat);
double iauDtdb(double date1, double date2, double iauDtdb(double date1, double date2,
double ut, double elong, double u, double v); double ut, double elong, double u, double v);
int iauDtf2d(char *scale, int iy, int im, int id, int iauDtf2d(const char *scale, int iy, int im, int id,
int ihr, int imn, double sec, double *d1, double *d2); int ihr, int imn, double sec, double *d1, double *d2);
int iauTaitt(double tai1, double tai2, double *tt1, double *tt2); int iauTaitt(double tai1, double tai2, double *tt1, double *tt2);
int iauTaiut1(double tai1, double tai2, double dta, int iauTaiut1(double tai1, double tai2, double dta,
double *ut11, double *ut12); double *ut11, double *ut12);
int iauTaiutc(double tai1, double tai2, double *utc1, double *utc2); int iauTaiutc(double tai1, double tai2, double *utc1, double *utc2);
int iauTcbtdb(double tcb1, double tcb2, double *tdb1, double *tdb2); int iauTcbtdb(double tcb1, double tcb2, double *tdb1, double *tdb2);
int iauTcgtt(double tcg1, double tcg2, double *tt1, double *tt2); int iauTcgtt(double tcg1, double tcg2, double *tt1, double *tt2);
int iauTdbtcb(double tdb1, double tdb2, double *tcb1, double *tcb2); int iauTdbtcb(double tdb1, double tdb2, double *tcb1, double *tcb2);
int iauTdbtt(double tdb1, double tdb2, double dtr, int iauTdbtt(double tdb1, double tdb2, double dtr,
double *tt1, double *tt2); double *tt1, double *tt2);
skipping to change at line 253 skipping to change at line 253
double *tt1, double *tt2); double *tt1, double *tt2);
int iauUt1utc(double ut11, double ut12, double dut1, int iauUt1utc(double ut11, double ut12, double dut1,
double *utc1, double *utc2); double *utc1, double *utc2);
int iauUtctai(double utc1, double utc2, double *tai1, double *tai2); int iauUtctai(double utc1, double utc2, double *tai1, double *tai2);
int iauUtcut1(double utc1, double utc2, double dut1, int iauUtcut1(double utc1, double utc2, double dut1,
double *ut11, double *ut12); double *ut11, double *ut12);
/* VectorMatrix/AngleOps */ /* VectorMatrix/AngleOps */
void iauA2af(int ndp, double angle, char *sign, int idmsf[4]); void iauA2af(int ndp, double angle, char *sign, int idmsf[4]);
void iauA2tf(int ndp, double angle, char *sign, int ihmsf[4]); void iauA2tf(int ndp, double angle, char *sign, int ihmsf[4]);
int iauAf2a(int s, int ideg, int iamin, double asec, double *rad); int iauAf2a(char s, int ideg, int iamin, double asec, double *rad);
double iauAnp(double a); double iauAnp(double a);
double iauAnpm(double a); double iauAnpm(double a);
void iauD2tf(int ndp, double days, char *sign, int ihmsf[4]); void iauD2tf(int ndp, double days, char *sign, int ihmsf[4]);
int iauTf2a(int s, int ihour, int imin, double sec, double *rad); int iauTf2a(char s, int ihour, int imin, double sec, double *rad);
int iauTf2d(int s, int ihour, int imin, double sec, double *days); int iauTf2d(char s, int ihour, int imin, double sec, double *days);
/* VectorMatrix/BuildRotations */ /* VectorMatrix/BuildRotations */
void iauRx(double phi, double r[3][3]); void iauRx(double phi, double r[3][3]);
void iauRy(double theta, double r[3][3]); void iauRy(double theta, double r[3][3]);
void iauRz(double psi, double r[3][3]); void iauRz(double psi, double r[3][3]);
/* VectorMatrix/CopyExtendExtract */ /* VectorMatrix/CopyExtendExtract */
void iauCp(double p[3], double c[3]); void iauCp(double p[3], double c[3]);
void iauCpv(double pv[2][3], double c[2][3]); void iauCpv(double pv[2][3], double c[2][3]);
void iauCr(double r[3][3], double c[3][3]); void iauCr(double r[3][3], double c[3][3]);
skipping to change at line 337 skipping to change at line 337
void iauSxpv(double s, double pv[2][3], double spv[2][3]); void iauSxpv(double s, double pv[2][3], double spv[2][3]);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
** **
** Copyright (C) 2010 ** Copyright (C) 2012
** Standards Of Fundamental Astronomy Board ** Standards Of Fundamental Astronomy Board
** of the International Astronomical Union. ** of the International Astronomical Union.
** **
** ===================== ** =====================
** SOFA Software License ** SOFA Software License
** ===================== ** =====================
** **
** NOTICE TO USER: ** NOTICE TO USER:
** **
** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING TERMS AND CONDITIONS ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
** WHICH APPLY TO ITS USE. ** CONDITIONS WHICH APPLY TO ITS USE.
** **
** 1. The Software is owned by the IAU SOFA Board ("SOFA"). ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
** **
** 2. Permission is granted to anyone to use the SOFA software for any ** 2. Permission is granted to anyone to use the SOFA software for any
** purpose, including commercial applications, free of charge and ** purpose, including commercial applications, free of charge and
** without payment of royalties, subject to the conditions and ** without payment of royalties, subject to the conditions and
** restrictions listed below. ** restrictions listed below.
** **
** 3. You (the user) may copy and distribute SOFA source code to others, ** 3. You (the user) may copy and distribute SOFA source code to others,
** and use and adapt its code and algorithms in your own software, ** and use and adapt its code and algorithms in your own software,
skipping to change at line 374 skipping to change at line 374
** a) Your work shall be marked or carry a statement that it ** a) Your work shall be marked or carry a statement that it
** (i) uses routines and computations derived by you from ** (i) uses routines and computations derived by you from
** software provided by SOFA under license to you; and ** software provided by SOFA under license to you; and
** (ii) does not itself constitute software provided by and/or ** (ii) does not itself constitute software provided by and/or
** endorsed by SOFA. ** endorsed by SOFA.
** **
** b) The source code of your derived work must contain descriptions ** b) The source code of your derived work must contain descriptions
** of how the derived work is based upon, contains and/or differs ** of how the derived work is based upon, contains and/or differs
** from the original SOFA software. ** from the original SOFA software.
** **
** c) The name(s) of all routine(s) in your derived work shall not ** c) The names of all routines in your derived work shall not
** include the prefix "iau". ** include the prefix "iau" or "sofa" or trivial modifications
** thereof such as changes of case.
** **
** d) The origin of the SOFA components of your derived work must ** d) The origin of the SOFA components of your derived work must
** not be misrepresented; you must not claim that you wrote the ** not be misrepresented; you must not claim that you wrote the
** original software, nor file a patent application for SOFA ** original software, nor file a patent application for SOFA
** software or algorithms embedded in the SOFA software. ** software or algorithms embedded in the SOFA software.
** **
** e) These requirements must be reproduced intact in any source ** e) These requirements must be reproduced intact in any source
** distribution and shall apply to anyone to whom you have ** distribution and shall apply to anyone to whom you have
** granted a further right to modify the source code of your ** granted a further right to modify the source code of your
** derived work. ** derived work.
** **
** Note that, as originally distributed, the SOFA software is ** Note that, as originally distributed, the SOFA software is
** intended to be a definitive implementation of the IAU standards, ** intended to be a definitive implementation of the IAU standards,
** and consequently third-party modifications are discouraged. All ** and consequently third-party modifications are discouraged. All
** variations, no matter how minor, must be explicitly marked as ** variations, no matter how minor, must be explicitly marked as
** such, as explained above. ** such, as explained above.
** **
** 4. In any published work or commercial products which includes ** 4. You shall not cause the SOFA software to be brought into
** results achieved by using the SOFA software, you shall
** acknowledge that the SOFA software was used in obtaining those
** results.
**
** 5. You shall not cause the SOFA software to be brought into
** disrepute, either by misuse, or use for inappropriate tasks, or ** disrepute, either by misuse, or use for inappropriate tasks, or
** by inappropriate modification. ** by inappropriate modification.
** **
** 6. The SOFA software is provided "as is" and SOFA makes no warranty ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
** as to its use or performance. SOFA does not and cannot warrant ** as to its use or performance. SOFA does not and cannot warrant
** the performance or results which the user may obtain by using the ** the performance or results which the user may obtain by using the
** SOFA software. SOFA makes no warranties, express or implied, as ** SOFA software. SOFA makes no warranties, express or implied, as
** to non-infringement of third party rights, merchantability, or ** to non-infringement of third party rights, merchantability, or
** fitness for any particular purpose. In no event will SOFA be ** fitness for any particular purpose. In no event will SOFA be
** liable to the user for any consequential, incidental, or special ** liable to the user for any consequential, incidental, or special
** damages, including any lost profits or lost savings, even if a ** damages, including any lost profits or lost savings, even if a
** SOFA representative has been advised of such damages, or for any ** SOFA representative has been advised of such damages, or for any
** claim by any third party. ** claim by any third party.
** **
** 7. The provision of any version of the SOFA software under the terms ** 6. The provision of any version of the SOFA software under the terms
** and conditions specified herein does not imply that future ** and conditions specified herein does not imply that future
** versions will also be made available under the same terms and ** versions will also be made available under the same terms and
** conditions. ** conditions.
*
** In any published work or commercial product which uses the SOFA
** software directly, acknowledgement (see www.iausofa.org) is
** appreciated.
** **
** Correspondence concerning SOFA software should be addressed as ** Correspondence concerning SOFA software should be addressed as
** follows: ** follows:
** **
** By email: sofa@ukho.gov.uk ** By email: sofa@ukho.gov.uk
** By post: IAU SOFA Center ** By post: IAU SOFA Center
** HM Nautical Almanac Office ** HM Nautical Almanac Office
** UK Hydrographic Office ** UK Hydrographic Office
** Admiralty Way, Taunton ** Admiralty Way, Taunton
** Somerset, TA1 2DN ** Somerset, TA1 2DN
 End of changes. 14 change blocks. 
21 lines changed or deleted 21 lines changed or added


 sofam.h   sofam.h 
skipping to change at line 14 skipping to change at line 14
/* /*
** - - - - - - - - ** - - - - - - - -
** s o f a m . h ** s o f a m . h
** - - - - - - - - ** - - - - - - - -
** **
** Macros used by SOFA library. ** Macros used by SOFA library.
** **
** This file is part of the International Astronomical Union's ** This file is part of the International Astronomical Union's
** SOFA (Standards Of Fundamental Astronomy) software collection. ** SOFA (Standards Of Fundamental Astronomy) software collection.
** **
** This revision: 2010 May 16 ** Please note that the constants defined below are to be used only in
** the context of the SOFA software, and have no other official IAU
** status.
** **
** SOFA release YYYY-MM-DD ** This revision: 2012 February 23
** **
** Copyright (C) 2010 IAU SOFA Board. See notes at end. ** SOFA release 2012-03-01
**
** Copyright (C) 2012 IAU SOFA Board. See notes at end.
*/ */
#include "sofa.h" #include "sofa.h"
/* Seconds of time per radian */
#define DS2R (7.272205216643039903848712e-5)
/* Pi */ /* Pi */
#define DPI (3.141592653589793238462643) #define DPI (3.141592653589793238462643)
/* 2Pi */ /* 2Pi */
#define D2PI (6.283185307179586476925287) #define D2PI (6.283185307179586476925287)
/* Degrees to radians */ /* Degrees to radians */
#define DD2R (1.745329251994329576923691e-2) #define DD2R (1.745329251994329576923691e-2)
/* Radians to arcseconds */ /* Radians to arcseconds */
#define DR2AS (206264.8062470963551564734) #define DR2AS (206264.8062470963551564734)
/* Arcseconds to radians */ /* Arcseconds to radians */
#define DAS2R (4.848136811095359935899141e-6) #define DAS2R (4.848136811095359935899141e-6)
/* Seconds of time to radians */
#define DS2R (7.272205216643039903848712e-5)
/* Arcseconds in a full circle */ /* Arcseconds in a full circle */
#define TURNAS (1296000.0) #define TURNAS (1296000.0)
/* Milliarcseconds to radians */ /* Milliarcseconds to radians */
#define DMAS2R (DAS2R / 1e3) #define DMAS2R (DAS2R / 1e3)
/* Length of tropical year B1900 (days) */ /* Length of tropical year B1900 (days) */
#define DTY (365.242198781) #define DTY (365.242198781)
/* Seconds per day. */ /* Seconds per day. */
skipping to change at line 97 skipping to change at line 101
#define ELB (1.550519768e-8) #define ELB (1.550519768e-8)
#define TDB0 (-6.55e-5) #define TDB0 (-6.55e-5)
/* dint(A) - truncate to nearest whole number towards zero (double) */ /* dint(A) - truncate to nearest whole number towards zero (double) */
#define dint(A) ((A)<0.0?ceil(A):floor(A)) #define dint(A) ((A)<0.0?ceil(A):floor(A))
/* dnint(A) - round to nearest whole number (double) */ /* dnint(A) - round to nearest whole number (double) */
#define dnint(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5)) #define dnint(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5))
/* dsign(A,B) - magnitude of A with sign of B (double) */ /* dsign(A,B) - magnitude of A with sign of B (double) */
#define dsign(A,B) ((B)<0.0?-(A):(A)) #define dsign(A,B) ((B)<0.0?-fabs(A):fabs(A))
/* Reference ellipsoids */
#define WGS84 1
#define GRS80 2
#define WGS72 3
#endif #endif
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
** **
** Copyright (C) 2010 ** Copyright (C) 2012
** Standards Of Fundamental Astronomy Board ** Standards Of Fundamental Astronomy Board
** of the International Astronomical Union. ** of the International Astronomical Union.
** **
** ===================== ** =====================
** SOFA Software License ** SOFA Software License
** ===================== ** =====================
** **
** NOTICE TO USER: ** NOTICE TO USER:
** **
** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING TERMS AND CONDITIONS ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
** WHICH APPLY TO ITS USE. ** CONDITIONS WHICH APPLY TO ITS USE.
** **
** 1. The Software is owned by the IAU SOFA Board ("SOFA"). ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
** **
** 2. Permission is granted to anyone to use the SOFA software for any ** 2. Permission is granted to anyone to use the SOFA software for any
** purpose, including commercial applications, free of charge and ** purpose, including commercial applications, free of charge and
** without payment of royalties, subject to the conditions and ** without payment of royalties, subject to the conditions and
** restrictions listed below. ** restrictions listed below.
** **
** 3. You (the user) may copy and distribute SOFA source code to others, ** 3. You (the user) may copy and distribute SOFA source code to others,
** and use and adapt its code and algorithms in your own software, ** and use and adapt its code and algorithms in your own software,
skipping to change at line 140 skipping to change at line 149
** a) Your work shall be marked or carry a statement that it ** a) Your work shall be marked or carry a statement that it
** (i) uses routines and computations derived by you from ** (i) uses routines and computations derived by you from
** software provided by SOFA under license to you; and ** software provided by SOFA under license to you; and
** (ii) does not itself constitute software provided by and/or ** (ii) does not itself constitute software provided by and/or
** endorsed by SOFA. ** endorsed by SOFA.
** **
** b) The source code of your derived work must contain descriptions ** b) The source code of your derived work must contain descriptions
** of how the derived work is based upon, contains and/or differs ** of how the derived work is based upon, contains and/or differs
** from the original SOFA software. ** from the original SOFA software.
** **
** c) The name(s) of all routine(s) in your derived work shall not ** c) The names of all routines in your derived work shall not
** include the prefix "iau". ** include the prefix "iau" or "sofa" or trivial modifications
** thereof such as changes of case.
** **
** d) The origin of the SOFA components of your derived work must ** d) The origin of the SOFA components of your derived work must
** not be misrepresented; you must not claim that you wrote the ** not be misrepresented; you must not claim that you wrote the
** original software, nor file a patent application for SOFA ** original software, nor file a patent application for SOFA
** software or algorithms embedded in the SOFA software. ** software or algorithms embedded in the SOFA software.
** **
** e) These requirements must be reproduced intact in any source ** e) These requirements must be reproduced intact in any source
** distribution and shall apply to anyone to whom you have ** distribution and shall apply to anyone to whom you have
** granted a further right to modify the source code of your ** granted a further right to modify the source code of your
** derived work. ** derived work.
** **
** Note that, as originally distributed, the SOFA software is ** Note that, as originally distributed, the SOFA software is
** intended to be a definitive implementation of the IAU standards, ** intended to be a definitive implementation of the IAU standards,
** and consequently third-party modifications are discouraged. All ** and consequently third-party modifications are discouraged. All
** variations, no matter how minor, must be explicitly marked as ** variations, no matter how minor, must be explicitly marked as
** such, as explained above. ** such, as explained above.
** **
** 4. In any published work or commercial products which includes ** 4. You shall not cause the SOFA software to be brought into
** results achieved by using the SOFA software, you shall
** acknowledge that the SOFA software was used in obtaining those
** results.
**
** 5. You shall not cause the SOFA software to be brought into
** disrepute, either by misuse, or use for inappropriate tasks, or ** disrepute, either by misuse, or use for inappropriate tasks, or
** by inappropriate modification. ** by inappropriate modification.
** **
** 6. The SOFA software is provided "as is" and SOFA makes no warranty ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
** as to its use or performance. SOFA does not and cannot warrant ** as to its use or performance. SOFA does not and cannot warrant
** the performance or results which the user may obtain by using the ** the performance or results which the user may obtain by using the
** SOFA software. SOFA makes no warranties, express or implied, as ** SOFA software. SOFA makes no warranties, express or implied, as
** to non-infringement of third party rights, merchantability, or ** to non-infringement of third party rights, merchantability, or
** fitness for any particular purpose. In no event will SOFA be ** fitness for any particular purpose. In no event will SOFA be
** liable to the user for any consequential, incidental, or special ** liable to the user for any consequential, incidental, or special
** damages, including any lost profits or lost savings, even if a ** damages, including any lost profits or lost savings, even if a
** SOFA representative has been advised of such damages, or for any ** SOFA representative has been advised of such damages, or for any
** claim by any third party. ** claim by any third party.
** **
** 7. The provision of any version of the SOFA software under the terms ** 6. The provision of any version of the SOFA software under the terms
** and conditions specified herein does not imply that future ** and conditions specified herein does not imply that future
** versions will also be made available under the same terms and ** versions will also be made available under the same terms and
** conditions. ** conditions.
*
** In any published work or commercial product which uses the SOFA
** software directly, acknowledgement (see www.iausofa.org) is
** appreciated.
** **
** Correspondence concerning SOFA software should be addressed as ** Correspondence concerning SOFA software should be addressed as
** follows: ** follows:
** **
** By email: sofa@ukho.gov.uk ** By email: sofa@ukho.gov.uk
** By post: IAU SOFA Center ** By post: IAU SOFA Center
** HM Nautical Almanac Office ** HM Nautical Almanac Office
** UK Hydrographic Office ** UK Hydrographic Office
** Admiralty Way, Taunton ** Admiralty Way, Taunton
** Somerset, TA1 2DN ** Somerset, TA1 2DN
 End of changes. 13 change blocks. 
20 lines changed or deleted 29 lines changed or added

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