MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_tides.c File Reference

MRTKLIB Tides Module — Tidal displacement corrections. More...

#include "mrtklib/mrtk_tides.h"
#include <math.h>
#include "mrtklib/mrtk_astro.h"
#include "mrtklib/mrtk_coords.h"
#include "mrtklib/mrtk_mat.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_tides.c:

Go to the source code of this file.

Macros

#define SQR(x)
#define AS2R   (D2R / 3600.0) /* arc sec to radian */
#define GME   3.986004415E+14 /* earth gravitational constant */
#define GMS   1.327124E+20 /* sun gravitational constant */
#define GMM   4.902801E+12 /* moon gravitational constant */

Functions

static void tide_pl (const double *eu, const double *rp, double GMp, const double *pos, double *dr)
static void tide_solid (const double *rsun, const double *rmoon, const double *pos, const double *E, double gmst, int opt, double *dr)
void tide_oload (gtime_t tut, const double *odisp, double *denu)
 Compute displacement by ocean tide loading (11 constituents).
static void iers_mean_pole (gtime_t tut, double *xp_bar, double *yp_bar)
static void tide_pole (gtime_t tut, const double *pos, const double *erpv, double *denu)
void tidedisp (gtime_t tutc, const double *rr, int opt, const erp_t *erp, const double *odisp, double *dr)
 Compute displacements by earth tides.

Variables

static const double PI = 3.1415926535897932
static const double D2R = 3.1415926535897932 / 180.0
static const double R2D = 180.0 / 3.1415926535897932
static const double RE_WGS84 = 6378137.0

Detailed Description

MRTKLIB Tides Module — Tidal displacement corrections.

options : -DIERS_MODEL use IERS tide model

references : [1] D.D.McCarthy, IERS Technical Note 21, IERS Conventions 1996, July 1996 [2] D.D.McCarthy and G.Petit, IERS Technical Note 32, IERS Conventions 2003, November 2003 [3] D.A.Vallado, Fundamentals of Astrodynamics and Applications 2nd ed, Space Technology Library, 2004 [4] J.Kouba, A Guide to using International GNSS Service (IGS) products, May 2009 [5] G.Petit and B.Luzum (eds), IERS Technical Note No. 36, IERS Conventions (2010), 2010

Definition in file mrtk_tides.c.

Macro Definition Documentation

◆ AS2R

#define AS2R   (D2R / 3600.0) /* arc sec to radian */

Definition at line 52 of file mrtk_tides.c.

◆ GME

#define GME   3.986004415E+14 /* earth gravitational constant */

Definition at line 53 of file mrtk_tides.c.

◆ GMM

#define GMM   4.902801E+12 /* moon gravitational constant */

Definition at line 55 of file mrtk_tides.c.

Referenced by tide_solid().

◆ GMS

#define GMS   1.327124E+20 /* sun gravitational constant */

Definition at line 54 of file mrtk_tides.c.

Referenced by tide_solid().

◆ SQR

#define SQR ( x)
Value:
((x) * (x))

Definition at line 50 of file mrtk_tides.c.

Referenced by tide_pl().

Function Documentation

◆ iers_mean_pole()

void iers_mean_pole ( gtime_t tut,
double * xp_bar,
double * yp_bar )
static

Definition at line 198 of file mrtk_tides.c.

References epoch2time(), and timediff().

Referenced by tide_pole().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tide_oload()

void tide_oload ( gtime_t tut,
const double * odisp,
double * denu )
extern

Compute displacement by ocean tide loading (11 constituents).

Parameters
[in]tutTime in UT
[in]odispOcean tide loading parameters (6*11 values)
[out]denuDisplacement in ENU (m)

Definition at line 146 of file mrtk_tides.c.

References D2R, epoch2time(), PI, time2epoch(), timediff(), and trace().

Referenced by ocean_tide_clasgrid(), and tidedisp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tide_pl()

void tide_pl ( const double * eu,
const double * rp,
double GMp,
const double * pos,
double * dr )
static

Definition at line 65 of file mrtk_tides.c.

References dot(), GME, norm(), R2D, RE_WGS84, SQR, and trace().

Referenced by tide_solid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tide_pole()

void tide_pole ( gtime_t tut,
const double * pos,
const double * erpv,
double * denu )
static

Definition at line 215 of file mrtk_tides.c.

References AS2R, iers_mean_pole(), R2D, and trace().

Referenced by tidedisp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tide_solid()

void tide_solid ( const double * rsun,
const double * rmoon,
const double * pos,
const double * E,
double gmst,
int opt,
double * dr )
static

Definition at line 111 of file mrtk_tides.c.

References GMM, GMS, R2D, tide_pl(), and trace().

Referenced by tidedisp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tidedisp()

void tidedisp ( gtime_t tutc,
const double * rr,
int opt,
const erp_t * erp,
const double * odisp,
double * dr )

Compute displacements by earth tides.

Parameters
[in]tutcTime in UTC
[in]rrSite position (ECEF) (m)
[in]optOptions (bitwise OR): 1: solid earth tide 2: ocean tide loading 4: pole tide 8: eliminate permanent deformation
[in]erpEarth rotation parameters (NULL: not used)
[in]odispOcean loading parameters (NULL: not used) odisp[0+i*6]: constituent i amplitude radial (m) odisp[1+i*6]: constituent i amplitude west (m) odisp[2+i*6]: constituent i amplitude south (m) odisp[3+i*6]: constituent i phase radial (deg) odisp[4+i*6]: constituent i phase west (deg) odisp[5+i*6]: constituent i phase south (deg) (i=0:M2,1:S2,2:N2,3:K2,4:K1,5:O1,6:P1,7:Q1, 8:Mf,9:Mm,10:Ssa)
[out]drDisplacement by earth tides (ECEF) (m)

Definition at line 261 of file mrtk_tides.c.

References geterp(), matmul(), norm(), sunmoonpos(), tide_oload(), tide_pole(), tide_solid(), time2epoch(), time_str(), timeadd(), trace(), utc2gpst(), and xyz2enu().

Referenced by clas_osr_zdres(), pppos(), zdres(), and zdres().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ D2R

const double D2R = 3.1415926535897932 / 180.0
static

Definition at line 44 of file mrtk_tides.c.

◆ PI

const double PI = 3.1415926535897932
static

Definition at line 43 of file mrtk_tides.c.

◆ R2D

const double R2D = 180.0 / 3.1415926535897932
static

Definition at line 45 of file mrtk_tides.c.

◆ RE_WGS84

const double RE_WGS84 = 6378137.0
static

Definition at line 46 of file mrtk_tides.c.