|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
MRTKLIB Astronomy Module — Implementation. More...
#include "mrtklib/mrtk_astro.h"#include <math.h>#include "mrtklib/mrtk_coords.h"#include "mrtklib/mrtk_mat.h"#include "mrtklib/mrtk_trace.h"Go to the source code of this file.
Macros | |
| #define | PI 3.1415926535897932 /* pi */ |
| #define | D2R (PI / 180.0) /* deg to rad */ |
| #define | AS2R (D2R / 3600.0) /* arc sec to radian */ |
| #define | AU 149597870691.0 /* 1 AU (m) */ |
| #define | RE_WGS84 6378137.0 /* earth semimajor axis (WGS84) (m) */ |
Functions | |
| static void | ast_args (double t, double *f) |
| void | sunmoonpos_eci (gtime_t tut, double *rsun, double *rmoon) |
| Compute sun and moon position in ECI. | |
| void | sunmoonpos (gtime_t tutc, const double *erpv, double *rsun, double *rmoon, double *gmst) |
| Compute sun and moon position in ECEF. | |
MRTKLIB Astronomy Module — Implementation.
All functions and static data in this file are cut-and-paste extractions from the legacy rtkcmn.c with zero algorithmic changes.
Definition in file mrtk_astro.c.
| #define AS2R (D2R / 3600.0) /* arc sec to radian */ |
Definition at line 42 of file mrtk_astro.c.
| #define AU 149597870691.0 /* 1 AU (m) */ |
Definition at line 43 of file mrtk_astro.c.
Referenced by sunmoonpos_eci().
| #define D2R (PI / 180.0) /* deg to rad */ |
Definition at line 41 of file mrtk_astro.c.
| #define PI 3.1415926535897932 /* pi */ |
Definition at line 40 of file mrtk_astro.c.
| #define RE_WGS84 6378137.0 /* earth semimajor axis (WGS84) (m) */ |
Definition at line 44 of file mrtk_astro.c.
|
static |
Definition at line 51 of file mrtk_astro.c.
Referenced by sunmoonpos_eci().
|
extern |
Compute sun and moon position in ECEF.
| [in] | tutc | Time in UTC (GPST) |
| [in] | erpv | ERP value {xp,yp,ut1_utc,lod} (rad,rad,s,s/d) |
| [out] | rsun | Sun position in ECEF (m) (NULL: not output) |
| [out] | rmoon | Moon position in ECEF (m) (NULL: not output) |
| [out] | gmst | GMST (rad) (NULL: not output) |
Definition at line 135 of file mrtk_astro.c.
References eci2ecef(), matmul(), sunmoonpos_eci(), time_str(), timeadd(), and trace().
Referenced by sat_yaw(), satantoff(), testeclipse(), tidedisp(), and windupcorr().
|
extern |
Compute sun and moon position in ECI.
| [in] | tut | Time in UT1 (GPST) |
| [out] | rsun | Sun position in ECI (m) (NULL: not output) |
| [out] | rmoon | Moon position in ECI (m) (NULL: not output) |
Definition at line 78 of file mrtk_astro.c.
References ast_args(), AU, D2R, epoch2time(), RE_WGS84, time_str(), timediff(), and trace().
Referenced by sunmoonpos().