...
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include <mutex>
|
||||
|
||||
#include "mcc_ccte_iers.h"
|
||||
#include "mcc_coord.h"
|
||||
// #include "mcc_coord.h"
|
||||
#include "mcc_generics.h"
|
||||
|
||||
namespace mcc::ccte::erfa
|
||||
@@ -310,36 +310,37 @@ public:
|
||||
return icrsTo(true, ra_icrs, dec_icrs, epoch, ra_obs, dec_obs, ha_obs, az, zd, obj_params);
|
||||
}
|
||||
|
||||
error_t icrsToObs(MccSkyRADEC_ICRS const& radec_icrs,
|
||||
MccSkyRADEC_OBS* radec_obs,
|
||||
MccSkyAZZD* azzd,
|
||||
mcc_angle_c auto* ha_obs,
|
||||
obj_pars_t* obj_params = nullptr)
|
||||
{
|
||||
double ra_obs, dec_obs, az, zd, ha;
|
||||
// error_t icrsToObs(MccSkyRADEC_ICRS const& radec_icrs,
|
||||
// MccSkyRADEC_OBS* radec_obs,
|
||||
// MccSkyAZZD* azzd,
|
||||
// mcc_angle_c auto* ha_obs,
|
||||
// obj_pars_t* obj_params = nullptr)
|
||||
// {
|
||||
// double ra_obs, dec_obs, az, zd, ha;
|
||||
|
||||
auto err =
|
||||
icrsToObs(radec_icrs.x(), radec_icrs.y(), radec_icrs.epoch(), &ra_obs, &dec_obs, &ha, &az, &zd, obj_params);
|
||||
// auto err =
|
||||
// icrsToObs(radec_icrs.x(), radec_icrs.y(), radec_icrs.epoch(), &ra_obs, &dec_obs, &ha, &az, &zd,
|
||||
// obj_params);
|
||||
|
||||
if (!err) {
|
||||
if (radec_obs) {
|
||||
radec_obs->setX(ra_obs);
|
||||
radec_obs->setY(dec_obs);
|
||||
}
|
||||
// if (!err) {
|
||||
// if (radec_obs) {
|
||||
// radec_obs->setX(ra_obs);
|
||||
// radec_obs->setY(dec_obs);
|
||||
// }
|
||||
|
||||
if (azzd) {
|
||||
azzd->setEpoch(radec_obs->epoch());
|
||||
azzd->setX(az);
|
||||
azzd->setY(zd);
|
||||
}
|
||||
// if (azzd) {
|
||||
// azzd->setEpoch(radec_obs->epoch());
|
||||
// azzd->setX(az);
|
||||
// azzd->setY(zd);
|
||||
// }
|
||||
|
||||
if (ha_obs) {
|
||||
*ha_obs = ha;
|
||||
}
|
||||
}
|
||||
// if (ha_obs) {
|
||||
// *ha_obs = ha;
|
||||
// }
|
||||
// }
|
||||
|
||||
return err;
|
||||
};
|
||||
// return err;
|
||||
// };
|
||||
|
||||
|
||||
// ICRS to apparent (in vacuo)
|
||||
@@ -358,36 +359,37 @@ public:
|
||||
}
|
||||
|
||||
|
||||
error_t icrsToApp(MccSkyRADEC_ICRS const& radec_icrs,
|
||||
MccSkyRADEC_OBS* radec_app,
|
||||
MccSkyAZZD* azzd,
|
||||
mcc_angle_c auto* ha_app,
|
||||
obj_pars_t* obj_params = nullptr)
|
||||
{
|
||||
double ra_app, dec_app, az, zd, ha;
|
||||
// error_t icrsToApp(MccSkyRADEC_ICRS const& radec_icrs,
|
||||
// MccSkyRADEC_OBS* radec_app,
|
||||
// MccSkyAZZD* azzd,
|
||||
// mcc_angle_c auto* ha_app,
|
||||
// obj_pars_t* obj_params = nullptr)
|
||||
// {
|
||||
// double ra_app, dec_app, az, zd, ha;
|
||||
|
||||
auto err =
|
||||
icrsToApp(radec_icrs.x(), radec_icrs.y(), radec_icrs.epoch(), &ra_app, &dec_app, &ha, &az, &zd, obj_params);
|
||||
// auto err =
|
||||
// icrsToApp(radec_icrs.x(), radec_icrs.y(), radec_icrs.epoch(), &ra_app, &dec_app, &ha, &az, &zd,
|
||||
// obj_params);
|
||||
|
||||
if (!err) {
|
||||
if (radec_app) {
|
||||
radec_app->setX(ra_app);
|
||||
radec_app->setY(dec_app);
|
||||
}
|
||||
// if (!err) {
|
||||
// if (radec_app) {
|
||||
// radec_app->setX(ra_app);
|
||||
// radec_app->setY(dec_app);
|
||||
// }
|
||||
|
||||
if (azzd) {
|
||||
azzd->setEpoch(radec_app->epoch());
|
||||
azzd->setX(az);
|
||||
azzd->setY(zd);
|
||||
}
|
||||
// if (azzd) {
|
||||
// azzd->setEpoch(radec_app->epoch());
|
||||
// azzd->setX(az);
|
||||
// azzd->setY(zd);
|
||||
// }
|
||||
|
||||
if (ha_app) {
|
||||
*ha_app = ha;
|
||||
}
|
||||
}
|
||||
// if (ha_app) {
|
||||
// *ha_app = ha;
|
||||
// }
|
||||
// }
|
||||
|
||||
return err;
|
||||
}
|
||||
// return err;
|
||||
// }
|
||||
|
||||
|
||||
error_t obsToICRS(MccCoordPairKind obs_type,
|
||||
@@ -401,22 +403,22 @@ public:
|
||||
}
|
||||
|
||||
|
||||
error_t obsToICRS(mcc_coord_pair_c auto const& xy_obs, MccSkyRADEC_ICRS* radec_icrs)
|
||||
{
|
||||
double ra, dec;
|
||||
// error_t obsToICRS(mcc_coord_pair_c auto const& xy_obs, MccSkyRADEC_ICRS* radec_icrs)
|
||||
// {
|
||||
// double ra, dec;
|
||||
|
||||
auto err = obsToICRS(xy_obs.pair_kind, xy_obs.epoch(), xy_obs.x(), xy_obs.y(), &ra, &dec);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
// auto err = obsToICRS(xy_obs.pair_kind, xy_obs.epoch(), xy_obs.x(), xy_obs.y(), &ra, &dec);
|
||||
// if (err) {
|
||||
// return err;
|
||||
// }
|
||||
|
||||
if (radec_icrs) {
|
||||
radec_icrs->setX(ra);
|
||||
radec_icrs->setY(dec);
|
||||
}
|
||||
// if (radec_icrs) {
|
||||
// radec_icrs->setX(ra);
|
||||
// radec_icrs->setY(dec);
|
||||
// }
|
||||
|
||||
return err;
|
||||
}
|
||||
// return err;
|
||||
// }
|
||||
|
||||
|
||||
error_t appToICRS(MccCoordPairKind app_type,
|
||||
@@ -430,20 +432,20 @@ public:
|
||||
}
|
||||
|
||||
|
||||
error_t appToICRS(mcc_coord_pair_c auto const& xy_app, MccSkyRADEC_ICRS* radec_icrs)
|
||||
{
|
||||
double ra, dec;
|
||||
// error_t appToICRS(mcc_coord_pair_c auto const& xy_app, MccSkyRADEC_ICRS* radec_icrs)
|
||||
// {
|
||||
// double ra, dec;
|
||||
|
||||
auto err = appToICRS(xy_app.pair_kind, xy_app.epoch(), xy_app.x(), xy_app.y(), &ra, &dec);
|
||||
if (!err) {
|
||||
if (radec_icrs) {
|
||||
radec_icrs->setX(ra);
|
||||
radec_icrs->setY(dec);
|
||||
}
|
||||
}
|
||||
// auto err = appToICRS(xy_app.pair_kind, xy_app.epoch(), xy_app.x(), xy_app.y(), &ra, &dec);
|
||||
// if (!err) {
|
||||
// if (radec_icrs) {
|
||||
// radec_icrs->setX(ra);
|
||||
// radec_icrs->setY(dec);
|
||||
// }
|
||||
// }
|
||||
|
||||
return err;
|
||||
}
|
||||
// return err;
|
||||
// }
|
||||
|
||||
|
||||
error_t equationOrigins(mcc_coord_epoch_c auto const& epoch, mcc_angle_c auto* eo)
|
||||
|
||||
Reference in New Issue
Block a user