This commit is contained in:
2025-08-02 14:40:05 +03:00
parent 9bfe1c3ad5
commit 25438960e6
9 changed files with 87 additions and 71 deletions

View File

@@ -1,23 +1,28 @@
#include <fstream>
// #include <fstream>
#include <iostream>
// #include "../mcc_coord.h"
#include "../mcc_mount_astro_erfa.h"
#include "../mcc_mount_pz.h"
#include "../mount_astrom.h"
// #include "../mount_astrom.h"
#include "../mcc_mount_pec.h"
#include "../mcc_mount_telemetry.h"
// BTA coords from maps.yandex.ru: 43.646711, 41.440732
struct tel_data_t {
typedef mcc::MccAngle coord_t;
typedef std::chrono::system_clock::time_point time_point_t;
// struct tel_data_t {
// typedef mcc::MccAngle coord_t;
// typedef std::chrono::system_clock::time_point time_point_t;
time_point_t time_point;
coord_t mntRA, mntDEC, mntHA;
coord_t mntAZ, mntALT;
coord_t mntPosX, mntPosY;
coord_t mntRateX, mntRateY;
};
// time_point_t time_point;
// coord_t tagRA, tagDEC, tagHA;
// coord_t tagAZ, tagALT;
// coord_t mntRA, mntDEC, mntHA;
// coord_t mntAZ, mntALT;
// coord_t mntPosX, mntPosY;
// coord_t mntRateX, mntRateY;
// };
int main(int argc, char* argv[])
{
@@ -209,7 +214,13 @@ int main(int argc, char* argv[])
mcc::MccMinAltPZ minalt_pz(10.0_degs, state.lat);
mcc::MccMaxAltPZ maxalt_pz(85.0_degs, state.lat);
tel_data_t tdata{std::chrono::system_clock::now(), ra_o, dec_o, ha1, az1, alt1, 0.0, 0.0, 0.0, 0.0};
// tel_data_t tdata{std::chrono::system_clock::now(), ra_o, dec_o, ha1, az1, alt1, 0.0, 0.0, 0.0, 0.0};
mcc::MccMountTelemetryData<engine_t> tdata{.time_point = engine_t::timePointNow(),
.mntRA = ra_o,
.mntDEC = dec_o,
.mntHA = ha1,
.mntAZ = az1,
.mntALT = alt1};
bool ask = minalt_pz.inZone(tdata);
std::cout << "in zone? " << std::boolalpha << ask << "\n";
@@ -244,7 +255,13 @@ int main(int argc, char* argv[])
std::cout << "DEC_app = " << dec_o.sexagesimal() << "\n";
tdata = {std::chrono::system_clock::now(), ra_o, dec_o, ha1, az1, alt1, 0.0, 0.0, 0.0, 0.0};
// tdata = {std::chrono::system_clock::now(), ra_o, dec_o, ha1, az1, alt1, 0.0, 0.0, 0.0, 0.0};
tdata = {.time_point = engine_t::timePointNow(),
.mntRA = ra_o,
.mntDEC = dec_o,
.mntHA = ha1,
.mntAZ = az1,
.mntALT = alt1};
jd.mjd += 1.0;
res = erfa.icrs2obs(ra1, dec1, jd, ra_o, dec_o, ha1, az1, alt1, eor);