MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_station.h
Go to the documentation of this file.
1/*------------------------------------------------------------------------------
2 * mrtk_station.h : station position and BLQ 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_station.h
18 * @brief MRTKLIB Station Module — Site environment parameter I/O.
19 *
20 * This header provides functions for reading station-related files:
21 * elevation mask, reference positions, and ocean tide loading (BLQ)
22 * parameters, extracted from rtkcmn.c with zero algorithmic changes.
23 *
24 * @note Functions declared here are implemented in mrtk_station.c.
25 */
26#ifndef MRTK_STATION_H
27#define MRTK_STATION_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <stdint.h>
34#include <stdio.h>
35
36/*============================================================================
37 * Station Parameter I/O Functions
38 *===========================================================================*/
39
40/**
41 * @brief Read elevation mask file.
42 * @param[in] file Elevation mask file
43 * @param[out] elmask Elevation mask vector (360 x 1) (0.1 deg)
44 * elmask[i]: elevation mask at azimuth i (deg)
45 * @return Status (1:ok, 0:file open error)
46 * @note Text format: AZ EL per line. Text after %% or # is comment.
47 */
48int readelmask(const char* file, int16_t* elmask);
49
50/**
51 * @brief Read station positions from file.
52 * @param[in] file Station position file (lat lon height name per line)
53 * @param[in] rcv Station name to search
54 * @param[out] pos Station position {lat,lon,h} (rad/m)
55 * (all 0 if search error)
56 */
57void readpos(const char* file, const char* rcv, double* pos);
58
59/**
60 * @brief Read a single BLQ record (6 lines x 11 values).
61 * @param[in] fp Open file pointer
62 * @param[out] odisp Ocean tide loading parameters (6*11 values)
63 * @return 1:ok, 0:format error or EOF
64 */
65int readblqrecord(FILE* fp, double* odisp);
66
67/**
68 * @brief Read BLQ ocean tide loading parameters.
69 * @param[in] file BLQ ocean tide loading parameter file
70 * @param[in] sta Station name
71 * @param[out] odisp Ocean tide loading parameters
72 * @return Status (1:ok, 0:file open error)
73 */
74int readblq(const char* file, const char* sta, double* odisp);
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* MRTK_STATION_H */
int readelmask(const char *file, int16_t *elmask)
Read elevation mask file.
void readpos(const char *file, const char *rcv, double *pos)
Read station positions from file.
int readblq(const char *file, const char *sta, double *odisp)
Read BLQ ocean tide loading parameters.
int readblqrecord(FILE *fp, double *odisp)
Read a single BLQ record (6 lines x 11 values).