MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_astro.h
Go to the documentation of this file.
1/*------------------------------------------------------------------------------
2 * mrtk_astro.h : astronomical 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_astro.h
18 * @brief MRTKLIB Astronomy Module — Sun and moon position computation.
19 *
20 * This header provides functions for computing the positions of the
21 * Sun and Moon in ECI and ECEF coordinate frames, extracted from
22 * rtkcmn.c with zero algorithmic changes.
23 *
24 * @note Functions declared here are implemented in mrtk_astro.c.
25 */
26#ifndef MRTK_ASTRO_H
27#define MRTK_ASTRO_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "mrtklib/mrtk_time.h"
34
35/*============================================================================
36 * Sun / Moon Position Functions
37 *===========================================================================*/
38
39/**
40 * @brief Compute sun and moon position in ECI.
41 * @param[in] tut Time in UT1 (GPST)
42 * @param[out] rsun Sun position in ECI (m) (NULL: not output)
43 * @param[out] rmoon Moon position in ECI (m) (NULL: not output)
44 * @note See reference [4] 5.1.1, 5.2.1
45 */
46void sunmoonpos_eci(gtime_t tut, double* rsun, double* rmoon);
47
48/**
49 * @brief Compute sun and moon position in ECEF.
50 * @param[in] tutc Time in UTC (GPST)
51 * @param[in] erpv ERP value {xp,yp,ut1_utc,lod} (rad,rad,s,s/d)
52 * @param[out] rsun Sun position in ECEF (m) (NULL: not output)
53 * @param[out] rmoon Moon position in ECEF (m) (NULL: not output)
54 * @param[out] gmst GMST (rad) (NULL: not output)
55 */
56void sunmoonpos(gtime_t tutc, const double* erpv, double* rsun, double* rmoon, double* gmst);
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* MRTK_ASTRO_H */
void sunmoonpos(gtime_t tutc, const double *erpv, double *rsun, double *rmoon, double *gmst)
Compute sun and moon position in ECEF.
Definition mrtk_astro.c:135
void sunmoonpos_eci(gtime_t tut, double *rsun, double *rmoon)
Compute sun and moon position in ECI.
Definition mrtk_astro.c:78
MRTKLIB Time Module — GNSS time types and conversion functions.
GNSS time representation.
Definition mrtk_time.h:49