MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_peph.h
Go to the documentation of this file.
1/*------------------------------------------------------------------------------
2 * mrtk_peph.h : precise ephemeris and ERP type definitions and functions
3 *
4 * Copyright (C) 2026 H.SHIONO (MRTKLIB Project)
5 * Copyright (C) 2023-2025 Cabinet Office, Japan
6 * Copyright (C) 2024-2025 Lighthouse Technology & Consulting Co. Ltd.
7 * Copyright (C) 2023-2025 Japan Aerospace Exploration Agency
8 * Copyright (C) 2023-2025 TOSHIBA ELECTRONIC TECHNOLOGIES CORPORATION
9 * Copyright (C) 2015- Mitsubishi Electric Corp.
10 * Copyright (C) 2014 Geospatial Information Authority of Japan
11 * Copyright (C) 2014 T.SUZUKI
12 * Copyright (C) 2007-2023 T.TAKASU
13 *
14 * SPDX-License-Identifier: BSD-2-Clause
15 *----------------------------------------------------------------------------*/
16/**
17 * @file mrtk_peph.h
18 * @brief MRTKLIB Precise Ephemeris Module — Earth rotation parameter types
19 * and ERP I/O functions.
20 *
21 * This header provides the ERP (Earth Rotation Parameter) data types and
22 * the associated I/O and interpolation functions extracted from rtkcmn.c.
23 *
24 * @note Precise ephemeris types (peph_t, pclk_t) and functions that depend
25 * on nav_t remain in rtklib.h / preceph.c to avoid MAXSAT and nav_t
26 * dependencies in the mrtklib layer.
27 *
28 * @note All functions in this module are pure cut-and-paste extractions
29 * from rtkcmn.c with zero algorithmic changes.
30 */
31#ifndef MRTK_PEPH_H
32#define MRTK_PEPH_H
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
39#include "mrtklib/mrtk_time.h"
40
41/*============================================================================
42 * Earth Rotation Parameter Types
43 *===========================================================================*/
44
45/**
46 * @brief ERP (earth rotation parameter) data type.
47 */
48typedef struct {
49 double mjd; /* mjd (days) */
50 double xp, yp; /* pole offset (rad) */
51 double xpr, ypr; /* pole offset rate (rad/day) */
52 double ut1_utc; /* ut1-utc (s) */
53 double lod; /* length of day (s/day) */
54} erpd_t;
55
56/**
57 * @brief ERP (earth rotation parameter) type.
58 */
59typedef struct {
60 int n, nmax; /* number and max number of data */
61 erpd_t* data; /* earth rotation parameter data */
62} erp_t;
63
64/*============================================================================
65 * Earth Rotation Parameter Functions
66 *===========================================================================*/
67
68/**
69 * @brief Read earth rotation parameters from IGS ERP file (ver.2).
70 * @param[in] file IGS ERP file path
71 * @param[out] erp Earth rotation parameters
72 * @return Status (1:ok, 0:file open error)
73 */
74int readerp(const char* file, erp_t* erp);
75
76/**
77 * @brief Get earth rotation parameter values at specified time.
78 * @param[in] erp Earth rotation parameters
79 * @param[in] time Time (GPST)
80 * @param[out] erpv ERP values {xp,yp,ut1_utc,lod} (rad,rad,s,s/d)
81 * @return Status (1:ok, 0:error)
82 */
83int geterp(const erp_t* erp, gtime_t time, double* erpv);
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* MRTK_PEPH_H */
MRTKLIB Foundation — Common types, standard includes, and system constants (MAXSAT,...
int readerp(const char *file, erp_t *erp)
Read earth rotation parameters from IGS ERP file (ver.2).
Definition mrtk_peph.c:99
int geterp(const erp_t *erp, gtime_t time, double *erpv)
Get earth rotation parameter values at specified time.
Definition mrtk_peph.c:146
MRTKLIB Time Module — GNSS time types and conversion functions.
ERP (earth rotation parameter) type.
Definition mrtk_peph.h:59
int n
Definition mrtk_peph.h:60
erpd_t * data
Definition mrtk_peph.h:61
int nmax
Definition mrtk_peph.h:60
ERP (earth rotation parameter) data type.
Definition mrtk_peph.h:48
double ypr
Definition mrtk_peph.h:51
double xp
Definition mrtk_peph.h:50
double yp
Definition mrtk_peph.h:50
double ut1_utc
Definition mrtk_peph.h:52
double mjd
Definition mrtk_peph.h:49
double xpr
Definition mrtk_peph.h:51
double lod
Definition mrtk_peph.h:53
GNSS time representation.
Definition mrtk_time.h:49