23 #ifndef SG_MATH_DEFINITIONS_H
24 #define SG_MATH_DEFINITIONS_H
30 #include <QtCore/QString>
41 #define RAD2DEG (180.0/M_PI)
45 #define RAD2HR (12.0 /M_PI)
49 #define DEG2RAD (M_PI/180.0)
53 #define DEG2SEC (3600.0)
57 #define HR2RAD (M_PI/ 12.0)
61 #define SEC2RAD (DEG2RAD/3600.0)
65 #define RAD2SEC (RAD2DEG*3600.0)
69 #define DAY2SEC (86400.0)
73 #define RAD2MAS (RAD2SEC*1000.0)
77 #define RAD2MS (RAD2HR*3600.0*1000.0)
89 inline double signum(
const double x) {
return x<0.0 ? -1.0 : 1.0;};
90 inline double cpsign(
const double a1,
const double a2) {
return fabs(a1)*
signum(a2);};
91 inline void swap(
double &a1,
double &a2) {
double tmp=a1; a1=a2; a2=tmp;};
95 void fft(std::complex<double> x_a[], std::complex<double> x_A[],
unsigned int n,
FFT_Direction dir);
100 bool useOldEllipsoid);
103 void calcCip2IAU1980(
const SgMJD& epoch,
double dX,
double dY,
double dPsi_1980,
double dEps_1980,
104 double dPsi_2000,
double dEps_2000,
double& diffPsi,
double& diffEps);
132 extern const std::complex<double>
void geocentric2geodetic(const Sg3dVector &r, double &latitude, double &longitude, double &height, bool useOldEllipsoid)
void swap(double &a1, double &a2)
double signum(const double x)
void calcNutationFundArgs_IersConv1996(const SgMJD &tEpoch, double args[5])
void fft(std::complex< double > x_a[], std::complex< double > x_A[], unsigned int n, FFT_Direction dir)
void calcNutationFundArgs_IersConv2003(const SgMJD &tEpoch, double args[5])
unsigned int reverseBitOrder(unsigned int n, unsigned int k)
void calcCip2IAU1980(const SgMJD &epoch, double dX, double dY, double dPsi_1980, double dEps_1980, double dPsi_2000, double dEps_2000, double &diffPsi, double &diffEps)
double cpsign(const double a1, const double a2)
const std::complex< double > zI
void calcNutationFundArgs_IersStds1992(const SgMJD &tEpoch, double args[5])