2017-04-24 22:48:13 +00:00
|
|
|
/*!
|
|
|
|
* \file rtklib_tides.cc
|
|
|
|
* \brief Tidal displacement corrections
|
|
|
|
* \authors <ul>
|
|
|
|
* <li> 2007-2008, T. Takasu
|
|
|
|
* <li> 2017, Javier Arribas
|
|
|
|
* <li> 2017, Carles Fernandez
|
|
|
|
* </ul>
|
|
|
|
*
|
|
|
|
* This is a derived work from RTKLIB http://www.rtklib.com/
|
|
|
|
* The original source code at https://github.com/tomojitakasu/RTKLIB is
|
|
|
|
* released under the BSD 2-clause license with an additional exclusive clause
|
|
|
|
* that does not apply here. This additional clause is reproduced below:
|
|
|
|
*
|
|
|
|
* " The software package includes some companion executive binaries or shared
|
|
|
|
* libraries necessary to execute APs on Windows. These licenses succeed to the
|
|
|
|
* original ones of these software. "
|
|
|
|
*
|
|
|
|
* Neither the executive binaries nor the shared libraries are required by, used
|
|
|
|
* or included in GNSS-SDR.
|
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2017-04-24 22:48:13 +00:00
|
|
|
* Copyright (C) 2007-2008, T. Takasu
|
|
|
|
* Copyright (C) 2017, Javier Arribas
|
|
|
|
* Copyright (C) 2017, Carles Fernandez
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2017-04-24 22:48:13 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
|
|
|
*/
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
#include "rtklib_tides.h"
|
|
|
|
#include "rtklib_rtkcmn.h"
|
|
|
|
|
|
|
|
|
|
|
|
/* solar/lunar tides (ref [2] 7) ---------------------------------------------*/
|
2019-08-18 20:16:13 +00:00
|
|
|
// #ifndef IERS_MODEL
|
2017-04-24 22:48:13 +00:00
|
|
|
void tide_pl(const double *eu, const double *rp, double GMp,
|
2018-03-03 01:03:39 +00:00
|
|
|
const double *pos, double *dr)
|
2017-04-24 22:48:13 +00:00
|
|
|
{
|
2019-08-12 22:19:31 +00:00
|
|
|
const double H3 = 0.292;
|
|
|
|
const double L3 = 0.015;
|
|
|
|
double r;
|
|
|
|
double ep[3];
|
|
|
|
double latp;
|
|
|
|
double lonp;
|
|
|
|
double p;
|
|
|
|
double K2;
|
|
|
|
double K3;
|
|
|
|
double a;
|
|
|
|
double H2;
|
|
|
|
double L2;
|
|
|
|
double dp;
|
|
|
|
double du;
|
|
|
|
double cosp;
|
|
|
|
double sinl;
|
|
|
|
double cosl;
|
2017-04-24 22:48:13 +00:00
|
|
|
int i;
|
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(4, "tide_pl : pos=%.3f %.3f\n", pos[0] * R2D, pos[1] * R2D);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2019-02-11 20:13:02 +00:00
|
|
|
if ((r = norm_rtk(rp, 3)) <= 0.0)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2019-02-11 20:13:02 +00:00
|
|
|
for (i = 0; i < 3; i++)
|
|
|
|
{
|
|
|
|
ep[i] = rp[i] / r;
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
K2 = GMp / GME * std::pow(RE_WGS84, 2.04) * std::pow(RE_WGS84, 2.0) / (r * r * r);
|
|
|
|
K3 = K2 * RE_WGS84 / r;
|
|
|
|
latp = asin(ep[2]);
|
|
|
|
lonp = atan2(ep[1], ep[0]);
|
|
|
|
cosp = cos(latp);
|
|
|
|
sinl = sin(pos[0]);
|
|
|
|
cosl = cos(pos[0]);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* step1 in phase (degree 2) */
|
2018-03-03 01:03:39 +00:00
|
|
|
p = (3.0 * sinl * sinl - 1.0) / 2.0;
|
|
|
|
H2 = 0.6078 - 0.0006 * p;
|
|
|
|
L2 = 0.0847 + 0.0002 * p;
|
|
|
|
a = dot(ep, eu, 3);
|
|
|
|
dp = K2 * 3.0 * L2 * a;
|
|
|
|
du = K2 * (H2 * (1.5 * a * a - 0.5) - 3.0 * L2 * a * a);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* step1 in phase (degree 3) */
|
2018-03-03 01:03:39 +00:00
|
|
|
dp += K3 * L3 * (7.5 * a * a - 1.5);
|
|
|
|
du += K3 * (H3 * (2.5 * a * a * a - 1.5 * a) - L3 * (7.5 * a * a - 1.5) * a);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* step1 out-of-phase (only radial) */
|
2018-03-03 01:03:39 +00:00
|
|
|
du += 3.0 / 4.0 * 0.0025 * K2 * sin(2.0 * latp) * sin(2.0 * pos[0]) * sin(pos[1] - lonp);
|
|
|
|
du += 3.0 / 4.0 * 0.0022 * K2 * cosp * cosp * cosl * cosl * sin(2.0 * (pos[1] - lonp));
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
dr[0] = dp * ep[0] + du * eu[0];
|
|
|
|
dr[1] = dp * ep[1] + du * eu[1];
|
|
|
|
dr[2] = dp * ep[2] + du * eu[2];
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(5, "tide_pl : dr=%.3f %.3f %.3f\n", dr[0], dr[1], dr[2]);
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* displacement by solid earth tide (ref [2] 7) ------------------------------*/
|
|
|
|
void tide_solid(const double *rsun, const double *rmoon,
|
2018-03-03 01:03:39 +00:00
|
|
|
const double *pos, const double *E, double gmst, int opt,
|
|
|
|
double *dr)
|
2017-04-24 22:48:13 +00:00
|
|
|
{
|
2019-08-13 12:35:21 +00:00
|
|
|
double dr1[3] = {0.0, 0.0, 0.0};
|
|
|
|
double dr2[3] = {0.0, 0.0, 0.0};
|
2019-08-12 22:19:31 +00:00
|
|
|
double eu[3];
|
|
|
|
double du;
|
|
|
|
double dn;
|
|
|
|
double sinl;
|
|
|
|
double sin2l;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(3, "tide_solid: pos=%.3f %.3f opt=%d\n", pos[0] * R2D, pos[1] * R2D, opt);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* step1: time domain */
|
2018-03-03 01:03:39 +00:00
|
|
|
eu[0] = E[2];
|
|
|
|
eu[1] = E[5];
|
|
|
|
eu[2] = E[8];
|
|
|
|
tide_pl(eu, rsun, GMS, pos, dr1);
|
|
|
|
tide_pl(eu, rmoon, GMM, pos, dr2);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* step2: frequency domain, only K1 radial */
|
2018-03-03 01:03:39 +00:00
|
|
|
sin2l = sin(2.0 * pos[0]);
|
|
|
|
du = -0.012 * sin2l * sin(gmst + pos[1]);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
dr[0] = dr1[0] + dr2[0] + du * E[2];
|
|
|
|
dr[1] = dr1[1] + dr2[1] + du * E[5];
|
|
|
|
dr[2] = dr1[2] + dr2[2] + du * E[8];
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* eliminate permanent deformation */
|
2018-03-03 01:03:39 +00:00
|
|
|
if (opt & 8)
|
2017-04-24 22:48:13 +00:00
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
sinl = sin(pos[0]);
|
|
|
|
du = 0.1196 * (1.5 * sinl * sinl - 0.5);
|
|
|
|
dn = 0.0247 * sin2l;
|
|
|
|
dr[0] += du * E[2] + dn * E[1];
|
|
|
|
dr[1] += du * E[5] + dn * E[4];
|
|
|
|
dr[2] += du * E[8] + dn * E[7];
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(5, "tide_solid: dr=%.3f %.3f %.3f\n", dr[0], dr[1], dr[2]);
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
2019-08-18 20:16:13 +00:00
|
|
|
// #endif /* !IERS_MODEL */
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* displacement by ocean tide loading (ref [2] 7) ----------------------------*/
|
|
|
|
void tide_oload(gtime_t tut, const double *odisp, double *denu)
|
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
const double args[][5] = {
|
|
|
|
{1.40519E-4, 2.0, -2.0, 0.0, 0.00}, /* M2 */
|
|
|
|
{1.45444E-4, 0.0, 0.0, 0.0, 0.00}, /* S2 */
|
|
|
|
{1.37880E-4, 2.0, -3.0, 1.0, 0.00}, /* N2 */
|
|
|
|
{1.45842E-4, 2.0, 0.0, 0.0, 0.00}, /* K2 */
|
|
|
|
{0.72921E-4, 1.0, 0.0, 0.0, 0.25}, /* K1 */
|
|
|
|
{0.67598E-4, 1.0, -2.0, 0.0, -0.25}, /* O1 */
|
|
|
|
{0.72523E-4, -1.0, 0.0, 0.0, -0.25}, /* P1 */
|
|
|
|
{0.64959E-4, 1.0, -3.0, 1.0, -0.25}, /* Q1 */
|
|
|
|
{0.53234E-5, 0.0, 2.0, 0.0, 0.00}, /* Mf */
|
|
|
|
{0.26392E-5, 0.0, 1.0, -1.0, 0.00}, /* Mm */
|
|
|
|
{0.03982E-5, 2.0, 0.0, 0.0, 0.00} /* Ssa */
|
2017-04-24 22:48:13 +00:00
|
|
|
};
|
2018-03-03 01:03:39 +00:00
|
|
|
const double ep1975[] = {1975, 1, 1, 0, 0, 0};
|
2019-08-12 22:19:31 +00:00
|
|
|
double ep[6];
|
|
|
|
double fday;
|
|
|
|
double days;
|
|
|
|
double t;
|
|
|
|
double t2;
|
|
|
|
double t3;
|
|
|
|
double a[5];
|
|
|
|
double ang;
|
|
|
|
double dp[3] = {0};
|
|
|
|
int i;
|
|
|
|
int j;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(3, "tide_oload:\n");
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* angular argument: see subroutine arg.f for reference [1] */
|
2018-03-03 01:03:39 +00:00
|
|
|
time2epoch(tut, ep);
|
|
|
|
fday = ep[3] * 3600.0 + ep[4] * 60.0 + ep[5];
|
|
|
|
ep[3] = ep[4] = ep[5] = 0.0;
|
|
|
|
days = timediff(epoch2time(ep), epoch2time(ep1975)) / 86400.0 + 1.0;
|
|
|
|
t = (27392.500528 + 1.000000035 * days) / 36525.0;
|
|
|
|
t2 = t * t;
|
|
|
|
t3 = t2 * t;
|
|
|
|
|
|
|
|
a[0] = fday;
|
|
|
|
a[1] = (279.69668 + 36000.768930485 * t + 3.03E-4 * t2) * D2R; /* H0 */
|
|
|
|
a[2] = (270.434358 + 481267.88314137 * t - 0.001133 * t2 + 1.9E-6 * t3) * D2R; /* S0 */
|
|
|
|
a[3] = (334.329653 + 4069.0340329577 * t - 0.010325 * t2 - 1.2E-5 * t3) * D2R; /* P0 */
|
2020-07-05 18:20:02 +00:00
|
|
|
a[4] = 2.0 * GNSS_PI;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* displacements by 11 constituents */
|
2018-03-03 01:03:39 +00:00
|
|
|
for (i = 0; i < 11; i++)
|
2017-04-24 22:48:13 +00:00
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
ang = 0.0;
|
2019-02-11 20:13:02 +00:00
|
|
|
for (j = 0; j < 5; j++)
|
|
|
|
{
|
|
|
|
ang += a[j] * args[i][j];
|
|
|
|
}
|
|
|
|
for (j = 0; j < 3; j++)
|
|
|
|
{
|
|
|
|
dp[j] += odisp[j + i * 6] * cos(ang - odisp[j + 3 + i * 6] * D2R);
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
2018-03-03 01:03:39 +00:00
|
|
|
denu[0] = -dp[1];
|
|
|
|
denu[1] = -dp[2];
|
|
|
|
denu[2] = dp[0];
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(5, "tide_oload: denu=%.3f %.3f %.3f\n", denu[0], denu[1], denu[2]);
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* iers mean pole (ref [7] eq.7.25) ------------------------------------------*/
|
|
|
|
void iers_mean_pole(gtime_t tut, double *xp_bar, double *yp_bar)
|
|
|
|
{
|
2018-03-03 01:03:39 +00:00
|
|
|
const double ep2000[] = {2000, 1, 1, 0, 0, 0};
|
2019-08-12 22:19:31 +00:00
|
|
|
double y;
|
|
|
|
double y2;
|
|
|
|
double y3;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
y = timediff(tut, epoch2time(ep2000)) / 86400.0 / 365.25;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
if (y < 3653.0 / 365.25)
|
2017-04-24 22:48:13 +00:00
|
|
|
{ /* until 2010.0 */
|
2018-03-03 01:03:39 +00:00
|
|
|
y2 = y * y;
|
|
|
|
y3 = y2 * y;
|
|
|
|
*xp_bar = 55.974 + 1.8243 * y + 0.18413 * y2 + 0.007024 * y3; /* (mas) */
|
|
|
|
*yp_bar = 346.346 + 1.7896 * y - 0.10729 * y2 - 0.000908 * y3;
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
|
|
|
else
|
2018-03-03 01:03:39 +00:00
|
|
|
{ /* after 2010.0 */
|
|
|
|
*xp_bar = 23.513 + 7.6141 * y; /* (mas) */
|
|
|
|
*yp_bar = 358.891 - 0.6287 * y;
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* displacement by pole tide (ref [7] eq.7.26) --------------------------------*/
|
|
|
|
void tide_pole(gtime_t tut, const double *pos, const double *erpv,
|
2018-03-03 01:03:39 +00:00
|
|
|
double *denu)
|
2017-04-24 22:48:13 +00:00
|
|
|
{
|
2019-08-12 22:19:31 +00:00
|
|
|
double xp_bar;
|
|
|
|
double yp_bar;
|
|
|
|
double m1;
|
|
|
|
double m2;
|
|
|
|
double cosl;
|
|
|
|
double sinl;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(3, "tide_pole: pos=%.3f %.3f\n", pos[0] * R2D, pos[1] * R2D);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* iers mean pole (mas) */
|
2018-03-03 01:03:39 +00:00
|
|
|
iers_mean_pole(tut, &xp_bar, &yp_bar);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* ref [7] eq.7.24 */
|
2018-03-03 01:03:39 +00:00
|
|
|
m1 = erpv[0] / AS2R - xp_bar * 1E-3; /* (as) */
|
|
|
|
m2 = -erpv[1] / AS2R + yp_bar * 1E-3;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* sin(2*theta) = sin(2*phi), cos(2*theta)=-cos(2*phi) */
|
2018-03-03 01:03:39 +00:00
|
|
|
cosl = cos(pos[1]);
|
|
|
|
sinl = sin(pos[1]);
|
|
|
|
denu[0] = 9E-3 * sin(pos[0]) * (m1 * sinl - m2 * cosl); /* de= Slambda (m) */
|
|
|
|
denu[1] = -9E-3 * cos(2.0 * pos[0]) * (m1 * cosl + m2 * sinl); /* dn=-Stheta (m) */
|
|
|
|
denu[2] = -33E-3 * sin(2.0 * pos[0]) * (m1 * cosl + m2 * sinl); /* du= Sr (m) */
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(5, "tide_pole : denu=%.3f %.3f %.3f\n", denu[0], denu[1], denu[2]);
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* tidal displacement ----------------------------------------------------------
|
|
|
|
* displacements by earth tides
|
|
|
|
* args : gtime_t tutc I time in utc
|
|
|
|
* double *rr I site position (ecef) (m)
|
2019-07-20 10:55:46 +00:00
|
|
|
* int opt I options (one of the following)
|
2017-04-24 22:48:13 +00:00
|
|
|
* 1: solid earth tide
|
|
|
|
* 2: ocean tide loading
|
|
|
|
* 4: pole tide
|
|
|
|
* 8: elimate permanent deformation
|
|
|
|
* double *erp I earth rotation parameters (NULL: not used)
|
|
|
|
* double *odisp I ocean loading parameters (NULL: not used)
|
|
|
|
* odisp[0+i*6]: consituent i amplitude radial(m)
|
|
|
|
* odisp[1+i*6]: consituent i amplitude west (m)
|
|
|
|
* odisp[2+i*6]: consituent i amplitude south (m)
|
|
|
|
* odisp[3+i*6]: consituent i phase radial (deg)
|
|
|
|
* odisp[4+i*6]: consituent i phase west (deg)
|
|
|
|
* odisp[5+i*6]: consituent 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)
|
|
|
|
* double *dr O displacement by earth tides (ecef) (m)
|
|
|
|
* return : none
|
|
|
|
* notes : see ref [1], [2] chap 7
|
|
|
|
* see ref [4] 5.2.1, 5.2.2, 5.2.3
|
|
|
|
* ver.2.4.0 does not use ocean loading and pole tide corrections
|
|
|
|
*-----------------------------------------------------------------------------*/
|
|
|
|
void tidedisp(gtime_t tutc, const double *rr, int opt, const erp_t *erp,
|
2018-03-03 01:03:39 +00:00
|
|
|
const double *odisp, double *dr)
|
2017-04-24 22:48:13 +00:00
|
|
|
{
|
|
|
|
gtime_t tut;
|
2019-08-12 22:19:31 +00:00
|
|
|
double pos[2];
|
|
|
|
double E[9];
|
|
|
|
double drt[3];
|
|
|
|
double denu[3];
|
|
|
|
double rs[3];
|
|
|
|
double rm[3];
|
|
|
|
double gmst;
|
|
|
|
double erpv[5] = {0};
|
2017-04-24 22:48:13 +00:00
|
|
|
int i;
|
|
|
|
#ifdef IERS_MODEL
|
2018-03-03 01:03:39 +00:00
|
|
|
double ep[6], fhr;
|
|
|
|
int year, mon, day;
|
2017-04-24 22:48:13 +00:00
|
|
|
#endif
|
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(3, "tidedisp: tutc=%s\n", time_str(tutc, 0));
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2019-02-11 20:13:02 +00:00
|
|
|
if (erp)
|
|
|
|
{
|
|
|
|
geterp(erp, tutc, erpv);
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
tut = timeadd(tutc, erpv[2]);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
dr[0] = dr[1] = dr[2] = 0.0;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2019-02-11 20:13:02 +00:00
|
|
|
if (norm_rtk(rr, 3) <= 0.0)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
pos[0] = asin(rr[2] / norm_rtk(rr, 3));
|
|
|
|
pos[1] = atan2(rr[1], rr[0]);
|
|
|
|
xyz2enu(pos, E);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
if (opt & 1)
|
2017-04-24 22:48:13 +00:00
|
|
|
{ /* solid earth tides */
|
|
|
|
/* sun and moon position in ecef */
|
2018-03-03 01:03:39 +00:00
|
|
|
sunmoonpos(tutc, erpv, rs, rm, &gmst);
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
#ifdef IERS_MODEL
|
2018-03-03 01:03:39 +00:00
|
|
|
time2epoch(tutc, ep);
|
2019-08-18 10:54:16 +00:00
|
|
|
year = static_cast<int>(ep[0]);
|
|
|
|
mon = static_cast<int>(ep[1]);
|
|
|
|
day = static_cast<int>(ep[2]);
|
2018-03-03 01:03:39 +00:00
|
|
|
fhr = ep[3] + ep[4] / 60.0 + ep[5] / 3600.0;
|
2017-04-24 22:48:13 +00:00
|
|
|
|
|
|
|
/* call DEHANTTIDEINEL */
|
|
|
|
// dehanttideinel_((double *)rr,&year,&mon,&day,&fhr,rs,rm,drt);
|
|
|
|
#else
|
2018-03-03 01:03:39 +00:00
|
|
|
tide_solid(rs, rm, pos, E, gmst, opt, drt);
|
2017-04-24 22:48:13 +00:00
|
|
|
#endif
|
2019-02-11 20:13:02 +00:00
|
|
|
for (i = 0; i < 3; i++)
|
|
|
|
{
|
|
|
|
dr[i] += drt[i];
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
2018-03-03 01:03:39 +00:00
|
|
|
if ((opt & 2) && odisp)
|
2017-04-24 22:48:13 +00:00
|
|
|
{ /* ocean tide loading */
|
2018-03-03 01:03:39 +00:00
|
|
|
tide_oload(tut, odisp, denu);
|
|
|
|
matmul("TN", 3, 1, 3, 1.0, E, denu, 0.0, drt);
|
2019-02-11 20:13:02 +00:00
|
|
|
for (i = 0; i < 3; i++)
|
|
|
|
{
|
|
|
|
dr[i] += drt[i];
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
2018-03-03 01:03:39 +00:00
|
|
|
if ((opt & 4) && erp)
|
2017-04-24 22:48:13 +00:00
|
|
|
{ /* pole tide */
|
2018-03-03 01:03:39 +00:00
|
|
|
tide_pole(tut, pos, erpv, denu);
|
|
|
|
matmul("TN", 3, 1, 3, 1.0, E, denu, 0.0, drt);
|
2019-02-11 20:13:02 +00:00
|
|
|
for (i = 0; i < 3; i++)
|
|
|
|
{
|
|
|
|
dr[i] += drt[i];
|
|
|
|
}
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|
2018-03-03 01:03:39 +00:00
|
|
|
trace(5, "tidedisp: dr=%.3f %.3f %.3f\n", dr[0], dr[1], dr[2]);
|
2017-04-24 22:48:13 +00:00
|
|
|
}
|