General Purpose Geodetic Library
SgMathSupport.h File Reference
#include <math.h>
#include <complex>
#include <QtCore/QString>

Go to the source code of this file.

Macros

#define RAD2DEG   (180.0/M_PI)
 radians to degrees: More...
 
#define RAD2HR   (12.0 /M_PI)
 degrees to radians: More...
 
#define DEG2RAD   (M_PI/180.0)
 degrees to seconds: More...
 
#define DEG2SEC   (3600.0)
 hours to radians: More...
 
#define HR2RAD   (M_PI/ 12.0)
 arc seconds to radians: More...
 
#define SEC2RAD   (DEG2RAD/3600.0)
 radians to arc seconds: More...
 
#define RAD2SEC   (RAD2DEG*3600.0)
 seconds in one day: More...
 
#define DAY2SEC   (86400.0)
 radians to mas: More...
 
#define RAD2MAS   (RAD2SEC*1000.0)
 radians to ms: More...
 
#define RAD2MS   (RAD2HR*3600.0*1000.0)
 

Enumerations

enum  DIRECTION {
  X_AXIS =0 , VERTICAL =0 , Y_AXIS =1 , EAST =1 ,
  Z_AXIS =2 , NORTH =2
}
 
enum  FFT_Direction { FFT_Forward = 0 , FFT_Inverse = 1 }
 

Functions

double signum (const double x)
 
double cpsign (const double a1, const double a2)
 
void swap (double &a1, double &a2)
 
unsigned int reverseBitOrder (unsigned int n, unsigned int k)
 
void fft (std::complex< double > x_a[], std::complex< double > x_A[], unsigned int n, FFT_Direction dir)
 
void geocentric2geodetic (const Sg3dVector &r, double &latitude, double &longitude, double &height, bool useOldEllipsoid)
 
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)
 
void calcNutationFundArgs_IersConv2003 (const SgMJD &tEpoch, double args[5])
 
void calcNutationFundArgs_IersConv1996 (const SgMJD &tEpoch, double args[5])
 
void calcNutationFundArgs_IersStds1992 (const SgMJD &tEpoch, double args[5])
 

Variables

const Sg3dVector v3Zero
 
const Sg3dVector v3Unit
 
const Sg3dMatrix m3E
 
const Sg3dMatrix m3Zero
 
const std::complex< double > zI
 

Macro Definition Documentation

◆ DAY2SEC

#define DAY2SEC   (86400.0)

radians to mas:

Definition at line 71 of file SgMathSupport.h.

◆ DEG2RAD

#define DEG2RAD   (M_PI/180.0)

degrees to seconds:

Definition at line 51 of file SgMathSupport.h.

◆ DEG2SEC

#define DEG2SEC   (3600.0)

hours to radians:

Definition at line 55 of file SgMathSupport.h.

◆ HR2RAD

#define HR2RAD   (M_PI/ 12.0)

arc seconds to radians:

Definition at line 59 of file SgMathSupport.h.

◆ RAD2DEG

#define RAD2DEG   (180.0/M_PI)

radians to degrees:

radians to hours:

Definition at line 43 of file SgMathSupport.h.

◆ RAD2HR

#define RAD2HR   (12.0 /M_PI)

degrees to radians:

Definition at line 47 of file SgMathSupport.h.

◆ RAD2MAS

#define RAD2MAS   (RAD2SEC*1000.0)

radians to ms:

Definition at line 75 of file SgMathSupport.h.

◆ RAD2MS

#define RAD2MS   (RAD2HR*3600.0*1000.0)

Definition at line 77 of file SgMathSupport.h.

◆ RAD2SEC

#define RAD2SEC   (RAD2DEG*3600.0)

seconds in one day:

Definition at line 67 of file SgMathSupport.h.

◆ SEC2RAD

#define SEC2RAD   (DEG2RAD/3600.0)

radians to arc seconds:

Definition at line 63 of file SgMathSupport.h.

Enumeration Type Documentation

◆ DIRECTION

enum DIRECTION
Enumerator
X_AXIS 
VERTICAL 
Y_AXIS 
EAST 
Z_AXIS 
NORTH 

Definition at line 81 of file SgMathSupport.h.

◆ FFT_Direction

Enumerator
FFT_Forward 
FFT_Inverse 

Definition at line 82 of file SgMathSupport.h.

Function Documentation

◆ calcCip2IAU1980()

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 
)

Definition at line 182 of file SgMathSupport.cpp.

References SEC2RAD, and tEphem.

Referenced by SgSolutionReporter::reportEstimationBlock_Output4Spoolfile().

◆ calcNutationFundArgs_IersConv1996()

void calcNutationFundArgs_IersConv1996 ( const SgMJD tEpoch,
double  args[5] 
)

Definition at line 271 of file SgMathSupport.cpp.

References DEG2SEC, SEC2RAD, and tEphem.

Referenced by SgTidalUt1::SgTidalUt1().

◆ calcNutationFundArgs_IersConv2003()

void calcNutationFundArgs_IersConv2003 ( const SgMJD tEpoch,
double  args[5] 
)

Definition at line 239 of file SgMathSupport.cpp.

References DEG2SEC, SEC2RAD, and tEphem.

Referenced by SgTidalUt1::SgTidalUt1(), and SgModelEop_JMG_96_hf::calcCorrections().

◆ calcNutationFundArgs_IersStds1992()

void calcNutationFundArgs_IersStds1992 ( const SgMJD tEpoch,
double  args[5] 
)

Definition at line 304 of file SgMathSupport.cpp.

References DEG2SEC, SEC2RAD, and tEphem.

Referenced by SgTidalUt1::SgTidalUt1().

◆ cpsign()

double cpsign ( const double  a1,
const double  a2 
)
inline

Definition at line 90 of file SgMathSupport.h.

References signum().

◆ fft()

void fft ( std::complex< double >  x_a[],
std::complex< double >  x_A[],
unsigned int  n,
FFT_Direction  dir 
)

Definition at line 69 of file SgMathSupport.cpp.

References FFT_Forward, FFT_Inverse, reverseBitOrder(), and zI().

Referenced by evaluatePhaseCals(), and NsTestFour1Dialog::testPlot().

◆ geocentric2geodetic()

void geocentric2geodetic ( const Sg3dVector r,
double &  latitude,
double &  longitude,
double &  height,
bool  useOldEllipsoid 
)

◆ reverseBitOrder()

unsigned int reverseBitOrder ( unsigned int  n,
unsigned int  k 
)

Definition at line 49 of file SgMathSupport.cpp.

Referenced by fft().

◆ signum()

◆ swap()

void swap ( double &  a1,
double &  a2 
)
inline

Definition at line 91 of file SgMathSupport.h.

Variable Documentation

◆ m3E

const Sg3dMatrix m3E
extern

◆ m3Zero

const Sg3dMatrix m3Zero
extern

◆ v3Unit

const Sg3dVector v3Unit
extern

◆ v3Zero

const Sg3dVector v3Zero
extern

◆ zI

const std::complex<double> zI
extern