2017-04-20 14:10:12 +00:00
|
|
|
/*!
|
|
|
|
* \file rtklib_preceph.h
|
|
|
|
* \brief precise ephemeris and clock functions
|
|
|
|
* \authors <ul>
|
|
|
|
* <li> 2007-2013, 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-20 14:10:12 +00:00
|
|
|
* Copyright (C) 2007-2013, 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-20 14:10:12 +00:00
|
|
|
*
|
2017-04-21 09:34:23 +00:00
|
|
|
*
|
|
|
|
* References :
|
2020-07-28 14:57:15 +00:00
|
|
|
* [1] S.Hilla, The Extended Standard Product 3 Orbit Format (SP3-c),
|
|
|
|
* 12 February, 2007
|
|
|
|
* [2] J.Ray, W.Gurtner, RINEX Extensions to Handle Clock Information,
|
|
|
|
* 27 August, 1998
|
|
|
|
* [3] D.D.McCarthy, IERS Technical Note 21, IERS Conventions 1996, July 1996
|
|
|
|
* [4] D.A.Vallado, Fundamentals of Astrodynamics and Applications 2nd ed,
|
|
|
|
* Space Technology Library, 2004
|
|
|
|
*
|
|
|
|
* -----------------------------------------------------------------------------
|
|
|
|
*/
|
2017-04-21 09:34:23 +00:00
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_RTKLIB_PRECEPH_H
|
|
|
|
#define GNSS_SDR_RTKLIB_PRECEPH_H
|
2017-04-20 14:10:12 +00:00
|
|
|
|
|
|
|
#include "rtklib.h"
|
|
|
|
|
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
const int NMAX = 10; /* order of polynomial interpolation */
|
|
|
|
const double MAXDTE = 900.0; /* max time difference to ephem time (s) */
|
|
|
|
const double EXTERR_CLK = 1e-3; /* extrapolation error for clock (m/s) */
|
|
|
|
const double EXTERR_EPH = 5e-7; /* extrapolation error for ephem (m/s^2) */
|
2017-04-20 14:10:12 +00:00
|
|
|
|
|
|
|
int code2sys(char code);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int readsp3h(FILE *fp, gtime_t *time, char *type, int *sats,
|
2018-03-03 01:03:39 +00:00
|
|
|
double *bfact, char *tsys);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int addpeph(nav_t *nav, peph_t *peph);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2018-12-11 11:38:38 +00:00
|
|
|
void readsp3b(FILE *fp, char type, int *sats, int ns, const double *bfact,
|
2018-03-03 01:03:39 +00:00
|
|
|
char *tsys, int index, int opt, nav_t *nav);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int cmppeph(const void *p1, const void *p2);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
void combpeph(nav_t *nav, int opt);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
void readsp3(const char *file, nav_t *nav, int opt);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int readsap(const char *file, gtime_t time, nav_t *nav);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int readdcbf(const char *file, nav_t *nav, const sta_t *sta);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int readdcb(const char *file, nav_t *nav, const sta_t *sta);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
double interppol(const double *x, double *y, int n);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int pephpos(gtime_t time, int sat, const nav_t *nav, double *rs,
|
2018-03-03 01:03:39 +00:00
|
|
|
double *dts, double *vare, double *varc);
|
2017-04-20 14:10:12 +00:00
|
|
|
|
|
|
|
int pephclk(gtime_t time, int sat, const nav_t *nav, double *dts,
|
2018-03-03 01:03:39 +00:00
|
|
|
double *varc);
|
2017-04-20 14:10:12 +00:00
|
|
|
|
|
|
|
void satantoff(gtime_t time, const double *rs, int sat, const nav_t *nav,
|
2018-03-03 01:03:39 +00:00
|
|
|
double *dant);
|
2019-08-14 18:06:48 +00:00
|
|
|
|
2017-04-20 14:10:12 +00:00
|
|
|
int peph2pos(gtime_t time, int sat, const nav_t *nav, int opt,
|
2018-03-03 01:03:39 +00:00
|
|
|
double *rs, double *dts, double *var);
|
2017-04-20 14:10:12 +00:00
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#endif // GNSS_SDR_RTKLIB_PRECEPH_H
|