MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_antenna.h
Go to the documentation of this file.
1/*------------------------------------------------------------------------------
2 * mrtk_antenna.h : antenna model and PCV 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_antenna.h
18 * @brief MRTKLIB Antenna Module — Antenna phase center model and parameter I/O.
19 *
20 * This header provides antenna phase center variation (PCV) model
21 * computation and antenna parameter file reading functions, extracted
22 * from rtkcmn.c with zero algorithmic changes.
23 *
24 * @note Functions declared here are implemented in mrtk_antenna.c.
25 */
26#ifndef MRTK_ANTENNA_H
27#define MRTK_ANTENNA_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "mrtklib/mrtk_nav.h"
34
35/*============================================================================
36 * Antenna Parameter I/O Functions
37 *===========================================================================*/
38
39/**
40 * @brief Read antenna parameters from file (ANTEX or NGS format).
41 * @param[in] file Antenna parameter file
42 * @param[in,out] pcvs Antenna parameters
43 * @return Status (1:ok, 0:file open error)
44 * @note File with extension .atx/.ATX is recognized as ANTEX format;
45 * other files are recognized as NGS format.
46 * Only supports non-azimuth-dependent parameters.
47 */
48int readpcv(const char* file, pcvs_t* pcvs);
49
50/**
51 * @brief Search antenna parameter by satellite number or antenna type.
52 * @param[in] sat Satellite number (0: receiver antenna)
53 * @param[in] type Antenna type for receiver antenna
54 * @param[in] time Time to search parameters (GPST)
55 * @param[in] pcvs Antenna parameters
56 * @return Antenna parameter (NULL: no antenna found)
57 */
58pcv_t* searchpcv(int sat, const char* type, gtime_t time, const pcvs_t* pcvs);
59
60/*============================================================================
61 * Antenna Model Functions
62 *===========================================================================*/
63
64/**
65 * @brief Compute receiver antenna offset by antenna phase center parameters.
66 * @param[in] pcv Antenna phase center parameters
67 * @param[in] del Antenna delta {e,n,u} (m)
68 * @param[in] azel Azimuth/elevation for receiver {az,el} (rad)
69 * @param[in] opt Option (0:only offset, 1:offset+pcv)
70 * @param[out] dant Range offsets for each frequency (m)
71 * @note Current version does not support azimuth dependent terms
72 */
73void antmodel(const pcv_t* pcv, const double* del, const double* azel, int opt, double* dant);
74
75/**
76 * @brief Compute satellite antenna phase center parameters.
77 * @param[in] pcv Antenna phase center parameters
78 * @param[in] nadir Nadir angle for satellite (rad)
79 * @param[out] dant Range offsets for each frequency (m)
80 */
81void antmodel_s(const pcv_t* pcv, double nadir, double* dant);
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* MRTK_ANTENNA_H */
int readpcv(const char *file, pcvs_t *pcvs)
Read antenna parameters from file (ANTEX or NGS format).
void antmodel(const pcv_t *pcv, const double *del, const double *azel, int opt, double *dant)
Compute receiver antenna offset by antenna phase center parameters.
pcv_t * searchpcv(int sat, const char *type, gtime_t time, const pcvs_t *pcvs)
Search antenna parameter by satellite number or antenna type.
void antmodel_s(const pcv_t *pcv, double nadir, double *dant)
Compute satellite antenna phase center parameters.
MRTKLIB Navigation Module — Navigation data types and satellite/nav utility functions.
GNSS time representation.
Definition mrtk_time.h:49