This commit is contained in:
Timur A. Fatkhullin 2025-03-18 17:48:07 +03:00
parent 1f86cfedea
commit 8a336a688f
5 changed files with 706 additions and 107 deletions

View File

@ -114,10 +114,10 @@ set(CNTR_PROTO_LIB_SRC
set(CNTR_PROTO_LIB comm_proto)
add_library(${CNTR_PROTO_LIB} STATIC ${CNTR_PROTO_LIB_SRC})
set(MOUNT_SERVER_APP_SRC mount.h mount_server.cpp comm_server.h comm_server_endpoint.h mount_astrom.h)
set(MOUNT_SERVER_APP_SRC mount.h mount_server.cpp comm_server.h comm_server_endpoint.h comm_server_configfile.h mount_astrom.h
mount_astrom_default.h)
set(MOUNT_SERVER_APP mount_server)
add_executable(${MOUNT_SERVER_APP} ${MOUNT_SERVER_APP_SRC}
comm_server_configfile.h)
add_executable(${MOUNT_SERVER_APP} ${MOUNT_SERVER_APP_SRC})
target_link_libraries(${MOUNT_SERVER_APP} ${CNTR_PROTO_LIB} spdlog::spdlog_header_only)
if (WITH_TESTS)

View File

@ -6,11 +6,14 @@
#include <chrono>
#include <concepts>
#include <cstdint>
#include <fstream>
#include <functional>
#include <string_view>
#include "spdlog/sinks/null_sink.h"
#include "mcc_spdlog.h"
#include "mount_astrom.h"
#include "mount_astrom_default.h"
// low-level functions
namespace lowlevel
@ -23,8 +26,8 @@ namespace lowlevel
namespace mcc
{
enum class MccMountType : uint8_t { GERMAN_TYPE, FORK_TYPE, CROSSAXIS_TYPE, ALTAZ_TYPE };
namespace traits
{
// mount state type concept
template <typename T>
@ -35,22 +38,24 @@ concept mcc_mount_state_c = requires(T t, const T t_const) {
{ t.exit() } -> std::same_as<void>;
};
} // namespace traits
// meteo parameters (to compute refraction)
/* SOME BASIC DATA STRUCTURES DEFINITIONS */
// meteo parameters (e.g. to compute refraction)
struct MccMountMeteo {
typedef double temp_t; // Temperature in C
typedef double humid_t; // humidity in %
typedef double press_t; // atmospheric presure in hPa=mB
typedef double temp_t;
typedef double humid_t;
typedef double press_t;
temp_t temperature;
humid_t humidity;
press_t pressure;
temp_t temperature; // Temperature in C
humid_t humidity; // humidity in %
press_t pressure; // atmospheric presure in hPa=mB
};
// mount current position and related quantities
class MccMountPosition
{
public:
struct MccMountPosition {
typedef double mnt_coord_t;
typedef double mnt_speed_t;
typedef double time_point_t;
@ -81,31 +86,16 @@ public:
// PCS (pointing correction system) corrections
mnt_coord_t pcsX, pcsY; // X - HA, Y - DEC for equatorial-type mount; X - AZ, Y - ZD for horizontal-type one
bool update(const std::chrono::system_clock::time_point& utc_time)
{
//
astro::mcc_julday(utc_time, mjd);
return true;
}
protected:
bool updateTime(const std::chrono::system_clock::time_point& utc_time)
{
// UTC to TAI
double tai;
return true;
}
};
/* MOUNT BASE TEMPLATED CLASS WITH BASIC FUNCTIONALITY */
enum class MccMountType : uint8_t { GERMAN_TYPE, FORK_TYPE, CROSSAXIS_TYPE, ALTAZ_TYPE };
// implements a Finite State Machine Pattern
template <MccMountType MOUNT_TYPE>
class MccMount
class MccMount : public utils::MccSpdlogLogger
{
typedef double mnt_coord_t;
typedef double mnt_speed_t;
@ -114,11 +104,6 @@ class MccMount
public:
static constexpr MccMountType mountType = MOUNT_TYPE;
/* low-level hardware related constants */
// number of attempts to get low-level hardware data before emit an error
static constexpr uint8_t LOWLEVEL_HW_POLL_ATTEMPTS = 10;
/* mount main-cycle variable quantities (mount orientation) */
struct mount_orient_t {
// time-related
@ -151,19 +136,99 @@ public:
struct mount_config_t {
uint8_t hw_poll_attempts = LOWLEVEL_HW_POLL_ATTEMPTS;
std::string leap_seconds_filename{}; // empty to use hardcoded default value!
std::string earth_orient_filename{}; // empty to use hardcoded default value!
};
/* Constructors and destructor */
MccMount(std::shared_ptr<spdlog::logger> logger = spdlog::null_logger_mt("NULL"))
: _mountLogger(logger), _exitCurrentState([]() {})
MccMount(traits::mcc_input_char_range auto const& logger_mark = "[MOUNT]",
std::shared_ptr<spdlog::logger> logger = spdlog::null_logger_mt("NULL"))
: utils::MccSpdlogLogger(logger), _exitCurrentState([]() {})
{
std::istringstream strst;
addMarkToPatternIdx(logger_mark);
logDebug("Create MccMount class instance: thread = {}", std::this_thread::get_id());
// init time scales related databases to default (pre-defined) state
logInfo("initializing leap seconds database to default state ...");
strst.str(defaults::MCC_DEFAULT_LEAP_SECONDS_FILE);
_leapSecondsDB = astro::mcc_parse_leapsecs(strst);
logInfo("leap seconds default database expired date: {}", _leapSecondsDB.expireDate);
logInfo("initializing Earth orientation (pole coordinates, UT1-UTC) database to default state ...");
strst.clear();
strst.str(defaults::MCC_DEFAULT_IERS_BULLETIN_A_FILE);
_earthOrientDB = astro::mcc_parse_bulletinA(strst);
logInfo("Earth orientation default database (Bulletin A) date: {}", _earthOrientDB.bulletinDate);
// load time scales relates databases from files
std::ifstream fst;
logInfo("Load leap seconds and Earth orientation databases ...");
auto time_db_loader = [&fst, this](const std::string& filename, std::string_view type, auto& db) {
if (filename.empty()) {
logWarn("An empty {} filename! Skip and keep default values!", type);
return;
}
virtual ~MccMount() {}
fst.open(filename);
if (!fst.is_open()) {
logError("CANNOT open {} file '{}'!", type, filename);
logWarn("Keep {} database in default state!", type);
return;
}
template <mcc_mount_state_c StateT>
if constexpr (std::same_as<astro::leapsecond_db_t, std::decay_t<decltype(db)>>) {
db = astro::mcc_parse_leapsecs(fst);
} else if constexpr (std::same_as<astro::earth_orient_db_t, std::decay_t<decltype(db)>>) {
db = astro::mcc_parse_bulletinA(fst);
} else {
static_assert(false, "INVALID DATABASE TYPE!!!");
}
if (db.state != astro::IERS_DB_STATE_OK) {
logError("CANNOT parse {} file '{}'!", type, filename);
logWarn("Keep {} database in default state!", type);
} else {
logInfo("{} database was successfully loaded from '{}' file", type, filename);
}
fst.close();
};
astro::leapsecond_db_t ldb;
astro::earth_orient_db_t edb;
time_db_loader(_mountCurrentConfig.leap_seconds_filename, "leap seconds", ldb);
if (ldb.state == astro::IERS_DB_STATE_OK) {
_leapSecondsDB = std::move(ldb);
logInfo("leap seconds default database expired date: {}", _leapSecondsDB.expireDate);
}
time_db_loader(_mountCurrentConfig.earth_orient_filename, "Earth orientation", edb);
if (edb.state == astro::IERS_DB_STATE_OK) {
_earthOrientDB = std::move(edb);
logInfo("Earth orientation default database (Bulletin A) date: {}", _earthOrientDB.bulletinDate);
}
}
virtual ~MccMount()
{
logDebug("Delete MccMount class instance: thread = {}", std::this_thread::get_id());
}
/* Public methods */
template <traits::mcc_mount_state_c StateT>
void setMountState(StateT& state)
{
_exitCurrentState(); // exit from current state
@ -188,34 +253,16 @@ public:
protected:
mount_config_t _mountCurrentConfig;
std::shared_ptr<spdlog::logger> _mountLogger;
// std::shared_ptr<spdlog::logger> _mountLogger;
std::function<void()> _exitCurrentState;
// time scales related databases
astro::leapsecond_db_t _leapSecondsDB;
astro::earth_orient_db_t _earthOrientDB;
std::atomic<mount_orient_t> _currentMountOrient;
std::atomic<MccMountMeteo> _currentMeteo;
void updateMountState()
{
mount_orient_t orient;
lowlevel::mountdata_t hw_mdata;
// get data from encoders
decltype(mount_config_t::hw_poll_attempts) n_attempts = 0;
do {
auto ret_code = lowlevel::Mount.getMountData(&hw_mdata);
if (ret_code != lowlevel::MCC_E_OK) {
++n_attempts;
}
} while (n_attempts < _mountCurrentConfig.hw_poll_attempts);
if (n_attempts >= _mountCurrentConfig.hw_poll_attempts) {
// log error heres
return;
}
_currentMountOrient.store(orient);
}
};
} // namespace mcc

View File

@ -7,7 +7,6 @@
*********************************/
#include <chrono>
#include <unordered_map>
#include <xsimd/xsimd.hpp>
#include "utils.h"
@ -136,6 +135,9 @@ static int mcc_julday(const std::chrono::system_clock::time_point& start_time,
/*
* angles are in degrees or sexagimal string form
*
* returns
* NaN if object is non-rising or "alt_limit" < 0, Inf is circumpolar
*/
template <traits::mcc_real_or_char_range AT,
traits::mcc_real_or_char_range RT,
@ -159,6 +161,10 @@ double mcc_time_to_alt_limit(const AT& alt_limit,
alt *= utils::deg2radCoeff;
}
if (alt < 0.0) {
return std::numeric_limits<double>::quiet_NaN();
}
if constexpr (std::floating_point<RT>) {
ra = RA * utils::deg2radCoeff;
} else {
@ -180,6 +186,16 @@ double mcc_time_to_alt_limit(const AT& alt_limit,
lat *= utils::deg2radCoeff;
}
if (lat >= 0.0) { // north hemisphere
if (dec < (lat - std::numbers::pi / 2.0)) { // never rises above horizont
return std::numeric_limits<double>::quiet_NaN();
}
} else { // south hemisphere
if (dec > (lat + std::numbers::pi / 2.0)) { // never rises above horizont
return std::numeric_limits<double>::quiet_NaN();
}
}
double cos_ha = (std::sin(alt) - std::sin(dec) * std::sin(lat)) / std::cos(dec) / std::cos(lat);
if (std::abs(cos_ha) > 1.0) { // circumpolar (it never sets below horizon)
return std::numeric_limits<double>::infinity();
@ -199,6 +215,8 @@ double mcc_time_to_alt_limit(const AT& alt_limit,
*
*/
enum iers_db_state_t { IERS_DB_STATE_UNINITIALIZED, IERS_DB_STATE_OK, IERS_DB_STATE_PARSE_ERROR };
struct leapsecond_db_elem_t {
double mjd;
unsigned day, month;
@ -207,30 +225,13 @@ struct leapsecond_db_elem_t {
double tai_utc; // TAI-UTC in seconds
};
// typedef std::vector<leapsecond_db_elem_t> leapsecond_db_t;
struct leapsecond_db_t {
std::chrono::system_clock::time_point expireDate;
std::vector<leapsecond_db_elem_t> db;
iers_db_state_t state = IERS_DB_STATE_UNINITIALIZED;
std::chrono::system_clock::time_point expireDate{};
std::vector<leapsecond_db_elem_t> db{};
};
// init to some known state
static leapsecond_db_t CURRENT_LEAPSECONDS_DB;
// = {
// {41317.0, 1, 1, 1972, 10}, {41499.0, 1, 7, 1972, 11}, {41683.0, 1, 1, 1973, 12},
// {42048.0, 1, 1, 1974, 13}, {42413.0, 1, 1, 1975, 14}, {42778.0, 1, 1, 1976, 15},
// {43144.0, 1, 1, 1977, 16}, {43509.0, 1, 1, 1978, 17}, {43874.0, 1, 1, 1979, 18},
// {44239.0, 1, 1, 1980, 19}, {44786.0, 1, 7, 1981, 20}, {45151.0, 1, 7, 1982, 21},
// {45516.0, 1, 7, 1983, 22}, {46247.0, 1, 7, 1985, 23}, {47161.0, 1, 1, 1988, 24},
// {47892.0, 1, 1, 1990, 25}, {48257.0, 1, 1, 1991, 26}, {48804.0, 1, 7, 1992, 27},
// {49169.0, 1, 7, 1993, 28}, {49534.0, 1, 7, 1994, 29}, {50083.0, 1, 1, 1996, 30},
// {50630.0, 1, 7, 1997, 31}, {51179.0, 1, 1, 1999, 32}, {53736.0, 1, 1, 2006, 33},
// {54832.0, 1, 1, 2009, 34}, {56109.0, 1, 7, 2012, 35}, {57204.0, 1, 7, 2015, 36},
// {57754.0, 1, 1, 2017, 37}
// };
struct earth_orient_db_elem_t {
int year;
@ -242,19 +243,23 @@ struct earth_orient_db_elem_t {
struct earth_orient_db_t {
iers_db_state_t state = IERS_DB_STATE_UNINITIALIZED;
std::chrono::system_clock::time_point bulletinDate{};
double tt_tai = 0.0; // TT-TAI
std::vector<earth_orient_db_elem_t> db{};
};
static earth_orient_db_t CURRENT_EARTH_ORIENT_DB;
static bool mcc_parse_bulletinA(std::derived_from<std::basic_istream<char>> auto& stream, char comment_sym = '*')
static earth_orient_db_t mcc_parse_bulletinA(std::derived_from<std::basic_istream<char>> auto& stream,
char comment_sym = '*')
{
const std::regex bull_date_rx{
"^ *[0-9]{1,2} +(January|February|March|April|May|June|July|August|September|October|November|December) "
"+[0-9]{4,} +Vol\\. +[XMLCDVI]+ +No\\. +[0-9]+ *$"};
const std::regex bull_tt_tai_rx{"^ *TT += +TAI +\\+ +[0-9]+\\.[0-9]+ +seconds *$"};
const std::regex bull_tab_title_rx{"^ *MJD +x\\(arcsec\\) +y\\(arcsec\\) +UT1-UTC\\(sec\\) *$"};
// 2025 3 7 60741 0.0663 0.3341 0.04348
@ -302,6 +307,13 @@ static bool mcc_parse_bulletinA(std::derived_from<std::basic_istream<char>> auto
continue;
}
if (std::regex_match(sv.begin(), sv.end(), bull_tt_tai_rx)) {
is.str({sv.begin(), sv.end()});
std::string dummy;
is >> dummy >> dummy >> dummy >> dummy >> db.tt_tai;
continue;
}
if (std::regex_match(sv.begin(), sv.end(), bull_tab_title_rx)) {
tab_state = TAB_STATE_START;
continue;
@ -313,16 +325,17 @@ static bool mcc_parse_bulletinA(std::derived_from<std::basic_istream<char>> auto
}
if (db.db.empty()) {
return false;
db.state = IERS_DB_STATE_PARSE_ERROR;
} else {
db.state = IERS_DB_STATE_OK;
}
CURRENT_EARTH_ORIENT_DB = std::move(db);
return true;
return db;
}
static bool mcc_parse_leapsecs(std::derived_from<std::basic_istream<char>> auto& stream, char comment_sym = '#')
static leapsecond_db_t mcc_parse_leapsecs(std::derived_from<std::basic_istream<char>> auto& stream,
char comment_sym = '#')
{
// # File expires on 28 December 2025
const std::regex expr_date_rx{
@ -369,12 +382,12 @@ static bool mcc_parse_leapsecs(std::derived_from<std::basic_istream<char>> auto&
}
if (db.db.empty()) {
return false;
db.state = IERS_DB_STATE_PARSE_ERROR;
} else {
db.state = IERS_DB_STATE_OK;
}
CURRENT_LEAPSECONDS_DB = std::move(db);
return true;
return db;
}

538
cxx/mount_astrom_default.h Normal file
View File

@ -0,0 +1,538 @@
#pragma once
#include <string>
namespace mcc::defaults
{
// https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat
static std::string MCC_DEFAULT_LEAP_SECONDS_FILE = R"--(
# Value of TAI-UTC in second valid beetween the initial value until
# the epoch given on the next line. The last line reads that NO
# leap second was introduced since the corresponding date
# Updated through IERS Bulletin 69 issued in January 2025
#
#
# File expires on 28 December 2025
#
#
# MJD Date TAI-UTC (s)
# day month year
# --- -------------- ------
#
41317.0 1 1 1972 10
41499.0 1 7 1972 11
41683.0 1 1 1973 12
42048.0 1 1 1974 13
42413.0 1 1 1975 14
42778.0 1 1 1976 15
43144.0 1 1 1977 16
43509.0 1 1 1978 17
43874.0 1 1 1979 18
44239.0 1 1 1980 19
44786.0 1 7 1981 20
45151.0 1 7 1982 21
45516.0 1 7 1983 22
46247.0 1 7 1985 23
47161.0 1 1 1988 24
47892.0 1 1 1990 25
48257.0 1 1 1991 26
48804.0 1 7 1992 27
49169.0 1 7 1993 28
49534.0 1 7 1994 29
50083.0 1 1 1996 30
50630.0 1 7 1997 31
51179.0 1 1 1999 32
53736.0 1 1 2006 33
54832.0 1 1 2009 34
56109.0 1 7 2012 35
57204.0 1 7 2015 36
57754.0 1 1 2017 37
)--";
// https://datacenter.iers.org/data/latestVersion/bulletinA.txt
static std::string MCC_DEFAULT_IERS_BULLETIN_A_FILE = R"--(
**********************************************************************
* *
* I E R S B U L L E T I N - A *
* *
* Rapid Service/Prediction of Earth Orientation *
**********************************************************************
13 March 2025 Vol. XXXVIII No. 011
______________________________________________________________________
GENERAL INFORMATION:
MJD = Julian Date - 2 400 000.5 days
UT2-UT1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T)
- 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T)
where pi = 3.14159265... and T is the date in Besselian years.
TT = TAI + 32.184 seconds
DUT1= (UT1-UTC) transmitted with time signals
= 0.0 seconds beginning 26 December 2024 at 0000 UTC
Beginning 1 January 2017:
TAI-UTC = 37.000 000 seconds
***********************************************************************
* ANNOUNCEMENTS: *
* *
* There will NOT be a leap second introduced in UTC *
* at the end of June 2025. *
* *
* The primary source for IERS Rapid Service/Prediction Center (RS/PC) *
* data products is the official IERS RS/PC website: *
* https://maia.usno.navy.mil *
* *
* IERS RS/PC products are also available from: *
* NASA CDDIS: https://cddis.nasa.gov/archive/products/iers/ *
* NASA CDDIS: ftps://gdc.cddis.eosdis.nasa.gov/products/iers/ *
* IERS Central Bureau: https://datacenter.iers.org/eop.php *
* *
* Questions about IERS RS/PC products can be emailed to: *
* eopcp@us.navy.mil *
* *
* Distribution statement A: *
* Approved for public release: distribution unlimited. *
* *
***********************************************************************
________________________________________________________________________
The contributed observations used in the preparation of this Bulletin
are available at <http://www.usno.navy.mil/USNO/earth-orientation/
eo-info/general/input-data>. The contributed analysis results are based
on data from Very Long Baseline Interferometry (VLBI), Satellite Laser
Ranging (SLR), the Global Positioning System (GPS) satellites, Lunar
Laser Ranging (LLR), and meteorological predictions of variations in
Atmospheric Angular Momentum (AAM).
________________________________________________________________________
COMBINED EARTH ORIENTATION PARAMETERS:
IERS Rapid Service
MJD x error y error UT1-UTC error
" " " " s s
25 3 7 60741 0.06613 .00009 0.33411 .00009 0.043363 0.000018
25 3 8 60742 0.06541 .00009 0.33548 .00009 0.043670 0.000018
25 3 9 60743 0.06488 .00009 0.33683 .00009 0.044040 0.000018
25 3 10 60744 0.06460 .00009 0.33840 .00009 0.044258 0.000015
25 3 11 60745 0.06431 .00009 0.34031 .00009 0.044286 0.000014
25 3 12 60746 0.06374 .00009 0.34237 .00009 0.044161 0.000014
25 3 13 60747 0.06312 .00009 0.34454 .00009 0.043830 0.000009
_______________________________________________________________________
PREDICTIONS:
The following formulas will not reproduce the predictions given below,
but may be used to extend the predictions beyond the end of this table.
x = 0.1229 - 0.1349 cos A + 0.0114 sin A + 0.0748 cos C - 0.0406 sin C
y = 0.3776 + 0.0082 cos A + 0.1190 sin A - 0.0406 cos C - 0.0748 sin C
UT1-UTC = 0.0554 + 0.00014 (MJD - 60755) - (UT2-UT1)
where A = 2*pi*(MJD-60747)/365.25 and C = 2*pi*(MJD-60747)/435.
TAI-UTC(MJD 60748) = 37.0
The accuracy may be estimated from the expressions:
S x,y = 0.00068 (MJD-60747)**0.80 S t = 0.00025 (MJD-60747)**0.75
Estimated accuracies are: Predictions 10 d 20 d 30 d 40 d
Polar coord's 0.004 0.007 0.010 0.013
UT1-UTC 0.0014 0.0024 0.0032 0.0040
MJD x(arcsec) y(arcsec) UT1-UTC(sec)
2025 3 14 60748 0.0624 0.3463 0.04336
2025 3 15 60749 0.0619 0.3482 0.04285
2025 3 16 60750 0.0614 0.3498 0.04240
2025 3 17 60751 0.0610 0.3512 0.04205
2025 3 18 60752 0.0608 0.3526 0.04184
2025 3 19 60753 0.0607 0.3539 0.04178
2025 3 20 60754 0.0607 0.3552 0.04187
2025 3 21 60755 0.0608 0.3565 0.04211
2025 3 22 60756 0.0608 0.3578 0.04244
2025 3 23 60757 0.0609 0.3590 0.04283
2025 3 24 60758 0.0611 0.3603 0.04315
2025 3 25 60759 0.0612 0.3616 0.04326
2025 3 26 60760 0.0614 0.3628 0.04307
2025 3 27 60761 0.0616 0.3641 0.04253
2025 3 28 60762 0.0618 0.3653 0.04167
2025 3 29 60763 0.0621 0.3665 0.04061
2025 3 30 60764 0.0624 0.3677 0.03954
2025 3 31 60765 0.0627 0.3690 0.03864
2025 4 1 60766 0.0630 0.3702 0.03805
2025 4 2 60767 0.0634 0.3714 0.03778
2025 4 3 60768 0.0637 0.3726 0.03779
2025 4 4 60769 0.0641 0.3738 0.03795
2025 4 5 60770 0.0646 0.3750 0.03815
2025 4 6 60771 0.0650 0.3762 0.03827
2025 4 7 60772 0.0655 0.3773 0.03823
2025 4 8 60773 0.0660 0.3785 0.03800
2025 4 9 60774 0.0665 0.3797 0.03760
2025 4 10 60775 0.0671 0.3808 0.03706
2025 4 11 60776 0.0676 0.3820 0.03644
2025 4 12 60777 0.0682 0.3831 0.03584
2025 4 13 60778 0.0688 0.3843 0.03531
2025 4 14 60779 0.0695 0.3854 0.03493
2025 4 15 60780 0.0701 0.3865 0.03472
2025 4 16 60781 0.0708 0.3876 0.03469
2025 4 17 60782 0.0715 0.3887 0.03484
2025 4 18 60783 0.0723 0.3898 0.03512
2025 4 19 60784 0.0730 0.3908 0.03547
2025 4 20 60785 0.0738 0.3919 0.03579
2025 4 21 60786 0.0746 0.3929 0.03599
2025 4 22 60787 0.0754 0.3940 0.03595
2025 4 23 60788 0.0762 0.3950 0.03562
2025 4 24 60789 0.0771 0.3960 0.03496
2025 4 25 60790 0.0780 0.3970 0.03405
2025 4 26 60791 0.0789 0.3980 0.03301
2025 4 27 60792 0.0798 0.3989 0.03205
2025 4 28 60793 0.0807 0.3999 0.03132
2025 4 29 60794 0.0817 0.4008 0.03093
2025 4 30 60795 0.0826 0.4017 0.03087
2025 5 1 60796 0.0836 0.4027 0.03103
2025 5 2 60797 0.0846 0.4035 0.03127
2025 5 3 60798 0.0857 0.4044 0.03146
2025 5 4 60799 0.0867 0.4053 0.03151
2025 5 5 60800 0.0878 0.4061 0.03138
2025 5 6 60801 0.0889 0.4070 0.03108
2025 5 7 60802 0.0899 0.4078 0.03066
2025 5 8 60803 0.0911 0.4086 0.03019
2025 5 9 60804 0.0922 0.4093 0.02971
2025 5 10 60805 0.0933 0.4101 0.02932
2025 5 11 60806 0.0945 0.4109 0.02906
2025 5 12 60807 0.0956 0.4116 0.02899
2025 5 13 60808 0.0968 0.4123 0.02912
2025 5 14 60809 0.0980 0.4130 0.02945
2025 5 15 60810 0.0992 0.4136 0.02993
2025 5 16 60811 0.1005 0.4143 0.03049
2025 5 17 60812 0.1017 0.4149 0.03106
2025 5 18 60813 0.1029 0.4155 0.03154
2025 5 19 60814 0.1042 0.4161 0.03184
2025 5 20 60815 0.1055 0.4167 0.03190
2025 5 21 60816 0.1068 0.4173 0.03169
2025 5 22 60817 0.1080 0.4178 0.03124
2025 5 23 60818 0.1093 0.4183 0.03064
2025 5 24 60819 0.1107 0.4188 0.03006
2025 5 25 60820 0.1120 0.4193 0.02966
2025 5 26 60821 0.1133 0.4197 0.02956
2025 5 27 60822 0.1146 0.4202 0.02981
2025 5 28 60823 0.1160 0.4206 0.03035
2025 5 29 60824 0.1173 0.4210 0.03106
2025 5 30 60825 0.1187 0.4213 0.03177
2025 5 31 60826 0.1201 0.4217 0.03239
2025 6 1 60827 0.1214 0.4220 0.03284
2025 6 2 60828 0.1228 0.4223 0.03313
2025 6 3 60829 0.1242 0.4226 0.03330
2025 6 4 60830 0.1256 0.4228 0.03341
2025 6 5 60831 0.1270 0.4231 0.03352
2025 6 6 60832 0.1284 0.4233 0.03371
2025 6 7 60833 0.1298 0.4235 0.03402
2025 6 8 60834 0.1312 0.4237 0.03451
2025 6 9 60835 0.1326 0.4238 0.03519
2025 6 10 60836 0.1340 0.4239 0.03606
2025 6 11 60837 0.1354 0.4241 0.03710
2025 6 12 60838 0.1368 0.4241 0.03824
2025 6 13 60839 0.1382 0.4242 0.03940
2025 6 14 60840 0.1396 0.4242 0.04049
2025 6 15 60841 0.1410 0.4243 0.04144
2025 6 16 60842 0.1424 0.4243 0.04216
2025 6 17 60843 0.1438 0.4242 0.04263
2025 6 18 60844 0.1453 0.4242 0.04287
2025 6 19 60845 0.1467 0.4241 0.04295
2025 6 20 60846 0.1481 0.4240 0.04300
2025 6 21 60847 0.1495 0.4239 0.04316
2025 6 22 60848 0.1509 0.4238 0.04356
2025 6 23 60849 0.1522 0.4236 0.04427
2025 6 24 60850 0.1536 0.4234 0.04526
2025 6 25 60851 0.1550 0.4232 0.04645
2025 6 26 60852 0.1564 0.4230 0.04769
2025 6 27 60853 0.1578 0.4227 0.04885
2025 6 28 60854 0.1591 0.4225 0.04985
2025 6 29 60855 0.1605 0.4222 0.05065
2025 6 30 60856 0.1618 0.4219 0.05131
2025 7 1 60857 0.1632 0.4215 0.05187
2025 7 2 60858 0.1645 0.4212 0.05241
2025 7 3 60859 0.1658 0.4208 0.05300
2025 7 4 60860 0.1671 0.4204 0.05371
2025 7 5 60861 0.1685 0.4200 0.05457
2025 7 6 60862 0.1698 0.4195 0.05562
2025 7 7 60863 0.1710 0.4191 0.05685
2025 7 8 60864 0.1723 0.4186 0.05825
2025 7 9 60865 0.1736 0.4181 0.05975
2025 7 10 60866 0.1748 0.4176 0.06129
2025 7 11 60867 0.1761 0.4170 0.06276
2025 7 12 60868 0.1773 0.4165 0.06407
2025 7 13 60869 0.1785 0.4159 0.06515
2025 7 14 60870 0.1798 0.4153 0.06596
2025 7 15 60871 0.1809 0.4146 0.06652
2025 7 16 60872 0.1821 0.4140 0.06692
2025 7 17 60873 0.1833 0.4133 0.06726
2025 7 18 60874 0.1844 0.4127 0.06768
2025 7 19 60875 0.1856 0.4120 0.06829
2025 7 20 60876 0.1867 0.4113 0.06918
2025 7 21 60877 0.1878 0.4105 0.07033
2025 7 22 60878 0.1889 0.4098 0.07169
2025 7 23 60879 0.1900 0.4090 0.07312
2025 7 24 60880 0.1910 0.4082 0.07449
2025 7 25 60881 0.1921 0.4074 0.07570
2025 7 26 60882 0.1931 0.4066 0.07670
2025 7 27 60883 0.1941 0.4058 0.07749
2025 7 28 60884 0.1951 0.4049 0.07813
2025 7 29 60885 0.1961 0.4041 0.07870
2025 7 30 60886 0.1970 0.4032 0.07928
2025 7 31 60887 0.1980 0.4023 0.07995
2025 8 1 60888 0.1989 0.4014 0.08076
2025 8 2 60889 0.1998 0.4004 0.08174
2025 8 3 60890 0.2006 0.3995 0.08289
2025 8 4 60891 0.2015 0.3985 0.08420
2025 8 5 60892 0.2023 0.3976 0.08562
2025 8 6 60893 0.2032 0.3966 0.08709
2025 8 7 60894 0.2039 0.3956 0.08850
2025 8 8 60895 0.2047 0.3946 0.08976
2025 8 9 60896 0.2055 0.3936 0.09078
2025 8 10 60897 0.2062 0.3925 0.09151
2025 8 11 60898 0.2069 0.3915 0.09194
2025 8 12 60899 0.2076 0.3904 0.09215
2025 8 13 60900 0.2083 0.3894 0.09226
2025 8 14 60901 0.2089 0.3883 0.09242
2025 8 15 60902 0.2095 0.3872 0.09277
2025 8 16 60903 0.2101 0.3861 0.09337
2025 8 17 60904 0.2107 0.3850 0.09424
2025 8 18 60905 0.2112 0.3839 0.09532
2025 8 19 60906 0.2118 0.3827 0.09648
2025 8 20 60907 0.2123 0.3816 0.09762
2025 8 21 60908 0.2128 0.3805 0.09861
2025 8 22 60909 0.2132 0.3793 0.09938
2025 8 23 60910 0.2136 0.3781 0.09992
2025 8 24 60911 0.2140 0.3770 0.10027
2025 8 25 60912 0.2144 0.3758 0.10050
2025 8 26 60913 0.2148 0.3746 0.10070
2025 8 27 60914 0.2151 0.3734 0.10095
2025 8 28 60915 0.2154 0.3722 0.10132
2025 8 29 60916 0.2157 0.3710 0.10185
2025 8 30 60917 0.2160 0.3698 0.10255
2025 8 31 60918 0.2162 0.3686 0.10341
2025 9 1 60919 0.2164 0.3674 0.10439
2025 9 2 60920 0.2166 0.3662 0.10542
2025 9 3 60921 0.2168 0.3650 0.10643
2025 9 4 60922 0.2169 0.3637 0.10732
2025 9 5 60923 0.2170 0.3625 0.10800
2025 9 6 60924 0.2171 0.3613 0.10837
2025 9 7 60925 0.2172 0.3601 0.10843
2025 9 8 60926 0.2172 0.3588 0.10819
2025 9 9 60927 0.2172 0.3576 0.10779
2025 9 10 60928 0.2172 0.3564 0.10738
2025 9 11 60929 0.2171 0.3551 0.10713
2025 9 12 60930 0.2171 0.3539 0.10714
2025 9 13 60931 0.2170 0.3527 0.10745
2025 9 14 60932 0.2169 0.3514 0.10801
2025 9 15 60933 0.2167 0.3502 0.10870
2025 9 16 60934 0.2165 0.3490 0.10940
2025 9 17 60935 0.2164 0.3477 0.10998
2025 9 18 60936 0.2161 0.3465 0.11038
2025 9 19 60937 0.2159 0.3453 0.11056
2025 9 20 60938 0.2156 0.3441 0.11054
2025 9 21 60939 0.2153 0.3429 0.11038
2025 9 22 60940 0.2150 0.3417 0.11015
2025 9 23 60941 0.2147 0.3405 0.10994
2025 9 24 60942 0.2143 0.3393 0.10981
2025 9 25 60943 0.2139 0.3381 0.10983
2025 9 26 60944 0.2135 0.3369 0.11001
2025 9 27 60945 0.2130 0.3357 0.11037
2025 9 28 60946 0.2126 0.3345 0.11087
2025 9 29 60947 0.2121 0.3333 0.11145
2025 9 30 60948 0.2116 0.3322 0.11205
2025 10 1 60949 0.2110 0.3310 0.11257
2025 10 2 60950 0.2105 0.3299 0.11293
2025 10 3 60951 0.2099 0.3287 0.11305
2025 10 4 60952 0.2093 0.3276 0.11287
2025 10 5 60953 0.2087 0.3265 0.11239
2025 10 6 60954 0.2080 0.3254 0.11169
2025 10 7 60955 0.2073 0.3243 0.11090
2025 10 8 60956 0.2066 0.3232 0.11020
2025 10 9 60957 0.2059 0.3221 0.10974
2025 10 10 60958 0.2052 0.3210 0.10960
2025 10 11 60959 0.2044 0.3200 0.10976
2025 10 12 60960 0.2036 0.3189 0.11010
2025 10 13 60961 0.2028 0.3179 0.11050
2025 10 14 60962 0.2020 0.3169 0.11082
2025 10 15 60963 0.2011 0.3158 0.11097
2025 10 16 60964 0.2003 0.3148 0.11091
2025 10 17 60965 0.1994 0.3139 0.11066
2025 10 18 60966 0.1985 0.3129 0.11025
2025 10 19 60967 0.1975 0.3119 0.10977
2025 10 20 60968 0.1966 0.3110 0.10927
2025 10 21 60969 0.1956 0.3100 0.10886
2025 10 22 60970 0.1946 0.3091 0.10859
2025 10 23 60971 0.1936 0.3082 0.10849
2025 10 24 60972 0.1926 0.3073 0.10861
2025 10 25 60973 0.1916 0.3065 0.10892
2025 10 26 60974 0.1905 0.3056 0.10935
2025 10 27 60975 0.1895 0.3048 0.10978
2025 10 28 60976 0.1884 0.3040 0.11025
2025 10 29 60977 0.1873 0.3032 0.11058
2025 10 30 60978 0.1861 0.3024 0.11071
2025 10 31 60979 0.1850 0.3016 0.11050
2025 11 1 60980 0.1838 0.3008 0.11003
2025 11 2 60981 0.1827 0.3001 0.10928
2025 11 3 60982 0.1815 0.2994 0.10839
2025 11 4 60983 0.1803 0.2987 0.10748
2025 11 5 60984 0.1791 0.2980 0.10672
2025 11 6 60985 0.1779 0.2974 0.10615
2025 11 7 60986 0.1766 0.2967 0.10589
2025 11 8 60987 0.1754 0.2961 0.10585
2025 11 9 60988 0.1741 0.2955 0.10581
2025 11 10 60989 0.1728 0.2949 0.10574
2025 11 11 60990 0.1715 0.2943 0.10560
2025 11 12 60991 0.1702 0.2938 0.10528
2025 11 13 60992 0.1689 0.2933 0.10474
2025 11 14 60993 0.1676 0.2928 0.10409
2025 11 15 60994 0.1663 0.2923 0.10341
2025 11 16 60995 0.1649 0.2918 0.10272
2025 11 17 60996 0.1636 0.2914 0.10207
2025 11 18 60997 0.1622 0.2909 0.10157
2025 11 19 60998 0.1609 0.2905 0.10128
2025 11 20 60999 0.1595 0.2902 0.10111
2025 11 21 61000 0.1581 0.2898 0.10109
2025 11 22 61001 0.1567 0.2895 0.10126
2025 11 23 61002 0.1553 0.2891 0.10147
2025 11 24 61003 0.1539 0.2888 0.10174
2025 11 25 61004 0.1525 0.2886 0.10196
2025 11 26 61005 0.1511 0.2883 0.10209
2025 11 27 61006 0.1497 0.2881 0.10200
2025 11 28 61007 0.1483 0.2879 0.10179
2025 11 29 61008 0.1469 0.2877 0.10139
2025 11 30 61009 0.1454 0.2875 0.10083
2025 12 1 61010 0.1440 0.2874 0.10023
2025 12 2 61011 0.1426 0.2873 0.09972
2025 12 3 61012 0.1412 0.2872 0.09946
2025 12 4 61013 0.1397 0.2871 0.09945
2025 12 5 61014 0.1383 0.2871 0.09980
2025 12 6 61015 0.1368 0.2870 0.10029
2025 12 7 61016 0.1354 0.2870 0.10078
2025 12 8 61017 0.1340 0.2870 0.10111
2025 12 9 61018 0.1325 0.2871 0.10128
2025 12 10 61019 0.1311 0.2871 0.10122
2025 12 11 61020 0.1297 0.2872 0.10095
2025 12 12 61021 0.1282 0.2873 0.10058
2025 12 13 61022 0.1268 0.2874 0.10030
2025 12 14 61023 0.1254 0.2876 0.10010
2025 12 15 61024 0.1240 0.2878 0.10002
2025 12 16 61025 0.1225 0.2880 0.10014
2025 12 17 61026 0.1211 0.2882 0.10046
2025 12 18 61027 0.1197 0.2884 0.10090
2025 12 19 61028 0.1183 0.2887 0.10151
2025 12 20 61029 0.1169 0.2890 0.10227
2025 12 21 61030 0.1155 0.2893 0.10306
2025 12 22 61031 0.1141 0.2896 0.10381
2025 12 23 61032 0.1128 0.2899 0.10433
2025 12 24 61033 0.1114 0.2903 0.10460
2025 12 25 61034 0.1100 0.2907 0.10461
2025 12 26 61035 0.1087 0.2911 0.10444
2025 12 27 61036 0.1073 0.2916 0.10402
2025 12 28 61037 0.1060 0.2920 0.10333
2025 12 29 61038 0.1047 0.2925 0.10261
2025 12 30 61039 0.1034 0.2930 0.10209
2025 12 31 61040 0.1020 0.2935 0.10180
2026 1 1 61041 0.1008 0.2940 0.10174
2026 1 2 61042 0.0995 0.2946 0.10186
2026 1 3 61043 0.0982 0.2952 0.10206
2026 1 4 61044 0.0969 0.2958 0.10214
2026 1 5 61045 0.0957 0.2964 0.10199
2026 1 6 61046 0.0945 0.2970 0.10164
2026 1 7 61047 0.0932 0.2977 0.10115
2026 1 8 61048 0.0920 0.2984 0.10052
2026 1 9 61049 0.0908 0.2991 0.09986
2026 1 10 61050 0.0896 0.2998 0.09927
2026 1 11 61051 0.0885 0.3005 0.09879
2026 1 12 61052 0.0873 0.3013 0.09846
2026 1 13 61053 0.0862 0.3021 0.09837
2026 1 14 61054 0.0851 0.3029 0.09845
2026 1 15 61055 0.0840 0.3037 0.09869
2026 1 16 61056 0.0829 0.3045 0.09907
2026 1 17 61057 0.0818 0.3053 0.09946
2026 1 18 61058 0.0808 0.3062 0.09980
2026 1 19 61059 0.0797 0.3071 0.10003
2026 1 20 61060 0.0787 0.3080 0.10009
2026 1 21 61061 0.0777 0.3089 0.09997
2026 1 22 61062 0.0768 0.3098 0.09963
2026 1 23 61063 0.0758 0.3107 0.09910
2026 1 24 61064 0.0749 0.3117 0.09850
2026 1 25 61065 0.0739 0.3127 0.09785
2026 1 26 61066 0.0730 0.3137 0.09733
2026 1 27 61067 0.0722 0.3147 0.09707
2026 1 28 61068 0.0713 0.3157 0.09707
2026 1 29 61069 0.0705 0.3167 0.09732
2026 1 30 61070 0.0697 0.3177 0.09776
2026 1 31 61071 0.0689 0.3188 0.09820
2026 2 1 61072 0.0681 0.3199 0.09846
2026 2 2 61073 0.0673 0.3210 0.09849
2026 2 3 61074 0.0666 0.3221 0.09826
2026 2 4 61075 0.0659 0.3232 0.09784
2026 2 5 61076 0.0652 0.3243 0.09737
2026 2 6 61077 0.0646 0.3254 0.09699
2026 2 7 61078 0.0639 0.3265 0.09675
2026 2 8 61079 0.0633 0.3277 0.09669
2026 2 9 61080 0.0627 0.3289 0.09675
2026 2 10 61081 0.0621 0.3300 0.09697
2026 2 11 61082 0.0616 0.3312 0.09741
2026 2 12 61083 0.0611 0.3324 0.09793
2026 2 13 61084 0.0606 0.3336 0.09847
2026 2 14 61085 0.0601 0.3348 0.09894
2026 2 15 61086 0.0597 0.3360 0.09931
2026 2 16 61087 0.0592 0.3372 0.09950
2026 2 17 61088 0.0588 0.3385 0.09944
2026 2 18 61089 0.0585 0.3397 0.09914
2026 2 19 61090 0.0581 0.3409 0.09863
2026 2 20 61091 0.0578 0.3422 0.09802
2026 2 21 61092 0.0575 0.3434 0.09745
2026 2 22 61093 0.0572 0.3447 0.09702
2026 2 23 61094 0.0570 0.3460 0.09688
2026 2 24 61095 0.0568 0.3472 0.09691
2026 2 25 61096 0.0566 0.3485 0.09716
2026 2 26 61097 0.0564 0.3498 0.09754
2026 2 27 61098 0.0563 0.3511 0.09790
2026 2 28 61099 0.0562 0.3523 0.09820
2026 3 1 61100 0.0561 0.3536 0.09830
2026 3 2 61101 0.0560 0.3549 0.09818
2026 3 3 61102 0.0560 0.3562 0.09786
2026 3 4 61103 0.0560 0.3575 0.09743
2026 3 5 61104 0.0560 0.3588 0.09701
2026 3 6 61105 0.0560 0.3601 0.09667
2026 3 7 61106 0.0561 0.3614 0.09648
2026 3 8 61107 0.0562 0.3627 0.09646
2026 3 9 61108 0.0563 0.3639 0.09656
2026 3 10 61109 0.0564 0.3652 0.09675
2026 3 11 61110 0.0566 0.3665 0.09700
2026 3 12 61111 0.0568 0.3678 0.09726
2026 3 13 61112 0.0570 0.3691 0.09747
These predictions are based on all announced leap seconds.
CELESTIAL POLE OFFSET SERIES:
NEOS Celestial Pole Offset Series
MJD dpsi error deps error
(msec. of arc)
60725 -111.67 1.26 -7.68 0.22
60726 -111.71 1.26 -7.88 0.22
60727 -111.65 1.26 -8.21 0.22
60728 -111.46 1.28 -8.53 0.18
60729 -111.26 1.21 -8.69 0.18
60730 -111.26 1.21 -8.72 0.18
60731 -111.55 1.00 -8.79 0.19
60732 -111.84 0.89 -8.92 0.27
60733 -111.81 0.89 -8.93 0.27
60734 -111.52 0.89 -8.69 0.27
IAU2000A Celestial Pole Offset Series
MJD dX error dY error
(msec. of arc)
60725 0.495 0.501 -0.202 0.220
60726 0.490 0.501 -0.208 0.220
60727 0.480 0.501 -0.215 0.220
60728 0.465 0.511 -0.223 0.180
60729 0.445 0.483 -0.233 0.184
60730 0.420 0.483 -0.244 0.184
60731 0.393 0.397 -0.258 0.192
60732 0.362 0.353 -0.273 0.266
60733 0.330 0.353 -0.290 0.266
60734 0.296 0.353 -0.308 0.266
)--";
} // namespace mcc::defaults

View File

@ -64,15 +64,16 @@ int main(int argc, char* argv[])
exit(1);
}
bool ok = mcc::astro::mcc_parse_bulletinA(ist);
auto db_a = mcc::astro::mcc_parse_bulletinA(ist);
if (!ok) {
if (db_a.state != mcc::astro::IERS_DB_STATE_OK) {
std::cout << "Cannot parse input IERS Bulletin A file!\n";
ecode = 1;
} else {
std::cout << "IERS Bulletin A data:\n";
std::cout << "Date: " << mcc::astro::CURRENT_EARTH_ORIENT_DB.bulletinDate << "\n";
for (auto& el : mcc::astro::CURRENT_EARTH_ORIENT_DB.db) {
std::cout << "Date: " << db_a.bulletinDate << "\n";
std::cout << "TT-TAI: " << db_a.tt_tai << "\n";
for (auto& el : db_a.db) {
std::cout << "MJD: " << el.mjd << "\tDUT1 = " << el.dut1 << "\n";
}
}
@ -82,15 +83,15 @@ int main(int argc, char* argv[])
std::cout << "\n\n\n";
std::istringstream isst(leap_secs_file);
ok = mcc::astro::mcc_parse_leapsecs(isst);
auto db_ls = mcc::astro::mcc_parse_leapsecs(isst);
if (!ok) {
if (db_ls.state != mcc::astro::IERS_DB_STATE_OK) {
std::cout << "Cannot parse input IERS leap seconds file!\n";
ecode = 1;
} else {
std::cout << "IERS leap seconds data:\n";
std::cout << "Expire date: " << mcc::astro::CURRENT_LEAPSECONDS_DB.expireDate << "\n";
for (auto& el : mcc::astro::CURRENT_LEAPSECONDS_DB.db) {
std::cout << "Expire date: " << db_ls.expireDate << "\n";
for (auto& el : db_ls.db) {
std::cout << "MJD: " << el.mjd << "\tTAI-UTC = " << el.tai_utc << "\n";
}
}