MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_ppp.h
Go to the documentation of this file.
1/*------------------------------------------------------------------------------
2 * mrtk_ppp.h : precise point positioning 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_ppp.h
18 * @brief MRTKLIB Precise Point Positioning (PPP) Module.
19 *
20 * This header provides the PPP positioning functions including the main
21 * PPP filter (pppos), number-of-states query (pppnx), and solution
22 * status output (pppoutstat).
23 *
24 * @note Functions declared here are implemented in mrtk_ppp.c.
25 */
26#ifndef MRTK_PPP_H
27#define MRTK_PPP_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
35#include "mrtklib/mrtk_nav.h"
36#include "mrtklib/mrtk_obs.h"
37#include "mrtklib/mrtk_opt.h"
38#include "mrtklib/mrtk_rtkpos.h"
39
40/*============================================================================
41 * MADOCA-PPP L6D Ionospheric Correction (mdciono)
42 *===========================================================================*/
43
44/**
45 * @brief QZSS L6D message control struct.
46 *
47 * Holds state for decoding MADOCA-PPP L6D ionospheric correction messages
48 * from a single PRN (200/201).
49 */
50typedef struct {
51 gtime_t time; /**< decoded message time (GPST) */
52 int nbyte; /**< number of bytes in message buffer */
53 uint8_t buff[256]; /**< message buffer */
54 char opt[256]; /**< MADOCA-PPP L6D dependent options */
55 int rid; /**< decoded region ID */
56 miono_region_t re; /**< decoded region data */
57} mdcl6d_t;
58
59/**
60 * @brief Initialize MADOCA-PPP L6D ionospheric correction control.
61 * @param[in] gt GPST for week number determination
62 */
63extern void init_miono(gtime_t gt);
64
65/**
66 * @brief Decode QZSS L6D message.
67 * @param[in,out] mdcl6d L6D message control struct
68 * @return status (-1: error, 0: no message, 10: iono correction decoded)
69 */
71
72/**
73 * @brief Input QZSS L6D message byte-by-byte.
74 * @param[in,out] mdcl6d L6D message control struct
75 * @param[in] data L6D 1-byte data
76 * @return status (-1: error, 0: no message, 10: iono correction decoded)
77 */
78extern int input_qzssl6d(mdcl6d_t* mdcl6d, uint8_t data);
79
80/**
81 * @brief Input QZSS L6D message from file.
82 * @param[in,out] mdcl6d L6D message control struct
83 * @param[in] fp file pointer
84 * @return status (-2: EOF, -1..10: same as input_qzssl6d)
85 */
86extern int input_qzssl6df(mdcl6d_t* mdcl6d, FILE* fp);
87
88/*============================================================================
89 * PPP Engine Functions
90 *===========================================================================*/
91
92/**
93 * @brief Precise point positioning.
94 * @param[in,out] rtk RTK control/result struct
95 * @param[in] obs Observation data
96 * @param[in] n Number of observation data
97 * @param[in] nav Navigation data
98 */
99void pppos(mrtk_ctx_t* ctx, rtk_t* rtk, const obsd_t* obs, int n, const nav_t* nav);
100
101/**
102 * @brief Number of estimated states for PPP.
103 * @param[in] opt Processing options
104 * @return Number of states
105 */
106int pppnx(const prcopt_t* opt);
107
108/**
109 * @brief Write PPP solution status to buffer.
110 * @param[in,out] rtk RTK control/result struct
111 * @param[out] buff Output buffer
112 * @return Number of bytes written
113 */
114int pppoutstat(rtk_t* rtk, char* buff);
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif /* MRTK_PPP_H */
MRTKLIB Context — runtime context for processing, trace, and error handling.
struct nav_s nav_t
Definition mrtk_eph.h:40
MRTKLIB Foundation — Common types, standard includes, and system constants (MAXSAT,...
MRTKLIB Navigation Module — Navigation data types and satellite/nav utility functions.
MRTKLIB Observation Module — Observation data types and utility functions.
MRTKLIB Options Module — Processing and solution option types.
static mdcl6d_t mdcl6d[MIONO_MAX_PRN]
int pppoutstat(rtk_t *rtk, char *buff)
Write PPP solution status to buffer.
Definition mrtk_ppp.c:240
int decode_qzss_l6dmsg(mdcl6d_t *mdcl6d)
Decode QZSS L6D message.
void pppos(mrtk_ctx_t *ctx, rtk_t *rtk, const obsd_t *obs, int n, const nav_t *nav)
Precise point positioning.
Definition mrtk_ppp.c:1783
int pppnx(const prcopt_t *opt)
Number of estimated states for PPP.
Definition mrtk_ppp.c:1681
int input_qzssl6df(mdcl6d_t *mdcl6d, FILE *fp)
Input QZSS L6D message from file.
int input_qzssl6d(mdcl6d_t *mdcl6d, uint8_t data)
Input QZSS L6D message byte-by-byte.
void init_miono(gtime_t gt)
Initialize MADOCA-PPP L6D ionospheric correction control.
MRTKLIB RTK Positioning Module — relative and precise positioning.
GNSS time representation.
Definition mrtk_time.h:49
QZSS L6D message control struct.
Definition mrtk_ppp.h:50
gtime_t time
Definition mrtk_ppp.h:51
miono_region_t re
Definition mrtk_ppp.h:56
char opt[256]
Definition mrtk_ppp.h:54
int rid
Definition mrtk_ppp.h:55
uint8_t buff[256]
Definition mrtk_ppp.h:53
int nbyte
Definition mrtk_ppp.h:52
Runtime context for MRTKLIB processing.
Observation data record.
Definition mrtk_obs.h:44