add IERS Bulletins updater bash-script
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -196,14 +196,14 @@ protected:
|
||||
{
|
||||
if constexpr (pairKind != MccCoordPairKind::COORDS_KIND_GENERIC &&
|
||||
pairKind != MccCoordPairKind::COORDS_KIND_XY) {
|
||||
if constexpr (pairKind == MccCoordPairKind::COORDS_KIND_HADEC_APP ||
|
||||
pairKind == MccCoordPairKind::COORDS_KIND_HADEC_OBS) {
|
||||
_x = (double)MccAngle(_x).normalize<MccAngle::NORM_KIND_180_180>();
|
||||
} else { // RA, AZ
|
||||
_x = (double)MccAngle(_x).normalize<MccAngle::NORM_KIND_0_360>();
|
||||
}
|
||||
// if constexpr (pairKind == MccCoordPairKind::COORDS_KIND_HADEC_APP ||
|
||||
// pairKind == MccCoordPairKind::COORDS_KIND_HADEC_OBS) {
|
||||
// _x = (double)MccAngle(_x).normalize<MccAngle::NORM_KIND_180_180>();
|
||||
// } else { // RA, AZ
|
||||
// _x = (double)MccAngle(_x).normalize<MccAngle::NORM_KIND_0_360>();
|
||||
// }
|
||||
|
||||
// _x = (double)MccAngle(_x).normalize<MccAngle::NORM_KIND_0_360>();
|
||||
_x = (double)MccAngle(_x).normalize<MccAngle::NORM_KIND_0_360>();
|
||||
|
||||
// if (utils::isEqual((double)_x, MCC_TWO_PI)) {
|
||||
// _x = 0.0;
|
||||
|
||||
@@ -57,7 +57,8 @@ int main(int narg, char* argv[])
|
||||
// x - degs, y -degs, diff_x - arcsecs, diff_y - arcsecs
|
||||
fst >> x >> y >> diff_x >> diff_y;
|
||||
|
||||
std::println("\t{}\t{} {} {} {}", i++, x, y, diff_x, diff_y);
|
||||
// std::println("\t{}\t{:10.6f} {:10.6f} {:8.6f} {:8.6f}", i++, x, y, diff_x, diff_y);
|
||||
std::print("\t{}\t{:10.6f} {:10.6f} {:8.6f} {:8.6f}", i++, x, y, diff_x, diff_y);
|
||||
|
||||
tag_ha = x + diff_x / 3600.0;
|
||||
tag_dec = y + diff_y / 3600.0;
|
||||
@@ -67,6 +68,9 @@ int main(int narg, char* argv[])
|
||||
|
||||
xy = MccGenXY(MccAngleX(x, mcc_degrees), MccAngleY(y, mcc_degrees));
|
||||
|
||||
std::println("\t[encX = {:10.6f} encY = {:10.6f} HA = {} DEC = {}]", xy.x().degrees(), xy.y().degrees(),
|
||||
hadec.x().sexagesimal(true), hadec.y().sexagesimal());
|
||||
|
||||
// pcm_cstr.addPoint(sp, xy);
|
||||
pcm_cstr.addPoint(hadec, xy);
|
||||
}
|
||||
|
||||
36
update_iers_data.sh
Executable file
36
update_iers_data.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# $1 - output filename
|
||||
#
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
res_file="mcc_ccte_iers_default.h"
|
||||
else
|
||||
res_file=$1
|
||||
fi
|
||||
|
||||
|
||||
echo -e '#pragma once\n
|
||||
|
||||
#include <string>\n
|
||||
|
||||
namespace mcc::ccte::iers::defaults\n
|
||||
{
|
||||
|
||||
// https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat\n
|
||||
static std::string MCC_DEFAULT_LEAP_SECONDS_FILE = R"--(\n' > $res_file
|
||||
|
||||
wget --quiet https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat -O - >> $res_file
|
||||
|
||||
echo -e ')--";\n\n' >> $res_file
|
||||
|
||||
echo -e '// https://datacenter.iers.org/data/latestVersion/bulletinA.txt\n
|
||||
static std::string MCC_DEFAULT_IERS_BULLETIN_A_FILE = R"--(\n' >> $res_file
|
||||
|
||||
wget --quiet https://datacenter.iers.org/data/latestVersion/bulletinA.txt -O - >> $res_file
|
||||
|
||||
echo -e ')--";\n
|
||||
|
||||
|
||||
} // namespace mcc::ccte::iers::defaults\n' >> $res_file
|
||||
Reference in New Issue
Block a user