116 lines
5.2 KiB
C++
116 lines
5.2 KiB
C++
#pragma once
|
|
|
|
/* AstroSib FORK MOUNT FM-700 CONTROL LIBRARY */
|
|
|
|
|
|
/* COMMON LIBRARY DEFINITIONS */
|
|
|
|
|
|
#include <mcc_moving_model_common.h>
|
|
#include <mcc_pcm.h>
|
|
#include <mcc_pzone_container.h>
|
|
#include <mcc_spdlog.h>
|
|
|
|
#include "asibfm700_servocontroller.h"
|
|
#include "mcc_ccte_erfa.h"
|
|
|
|
namespace asibfm700
|
|
{
|
|
|
|
static constexpr mcc::MccMountType asibfm700MountType = mcc::MccMountType::FORK_TYPE;
|
|
|
|
typedef mcc::ccte::erfa::MccCCTE_ERFA Asibfm700CCTE;
|
|
typedef mcc::MccDefaultPCM<asibfm700MountType> Asibfm700PCM;
|
|
typedef mcc::MccPZoneContainer<mcc::MccTimeDuration> Asibfm700PZoneContainer;
|
|
typedef mcc::utils::MccSpdlogLogger Asibfm700Logger;
|
|
|
|
|
|
/* MOUNT CONFIGURATION CLASS */
|
|
|
|
struct Asibfm700MountConfig1 {
|
|
std::chrono::milliseconds hardwarePollingPeriod{100}; // main cycle period
|
|
|
|
// CCTE-related configuration
|
|
mcc::MccAngle siteLatitude{43.646711_degs}; // in radians
|
|
mcc::MccAngle siteLongitude{41.440732_degs}; // in radians
|
|
double siteElevation{2070.0}; // in meters
|
|
double refractWavelength{0.55}; // in mkm
|
|
|
|
std::string leapSecondFilename{""}; // an empty filename means default precompiled string
|
|
std::string bulletinAFilename{""}; // an empty filename means default precompiled string
|
|
|
|
|
|
// PCM-related configuration (no B-spline term, all coefficients are zero)
|
|
Asibfm700PCM::pcm_data_t pcmData{.type = mcc::MccDefaultPCMType::PCM_TYPE_GEOMETRY,
|
|
.siteLatitude = siteLatitude,
|
|
.geomCoefficients = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
|
|
|
|
// servo controller configuration
|
|
AsibFM700ServoController::hardware_config_t servoControllerConfig{};
|
|
|
|
// slew and track parameters
|
|
mcc::MccSimpleMovingModelParams movingModelParams{};
|
|
|
|
// prohibited zones parameters
|
|
mcc::MccAngle pzMinAltitude{10.0_degs}; // in radians
|
|
mcc::MccAngle pzLimitSwitchHAMin{}; // in radians
|
|
mcc::MccAngle pzLimitSwitchHAMax{}; // in radians
|
|
};
|
|
|
|
|
|
/* MOUNT CONFIGURATION FILE DEFAULTS */
|
|
|
|
struct Asibfm700MountConfigFileDefailts {
|
|
std::string hardwarePollingPeriod{"100"}; // main cycle period in millisecs
|
|
|
|
std::string siteLatitude{"43.646711"}; // site latitude in degrees or sexagesimal format
|
|
std::string siteLongitude{"41.440732"}; // site longitude in degrees or sexagesimal format
|
|
std::string siteElevation{"2070.0"}; // site elevation in meters
|
|
|
|
std::string refractWavelength{"0.55"}; // wavelength at which refraction is calculated (in mkm)
|
|
|
|
std::string leapSecondFilename{""}; // an empty filename means default precompiled string
|
|
std::string bulletinAFilename{""}; // an empty filename means default precompiled string
|
|
|
|
// pointing correction model
|
|
|
|
std::string pcmType{"GEOMETRY"};
|
|
std::vector<std::string> pcmGeomCoeffs{"0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"};
|
|
std::vector<std::string> pcmBsplineDegree{"3", "3"};
|
|
// [0, 360]
|
|
std::vector<std::string> pcmBsplineXknots{"0.0", "0.6981317", "1.3962634", "2.0943951", "2.7925268",
|
|
"3.4906585", "4.1887902", "4.88692191", "5.58505361", "6.28318531"};
|
|
// [-30, 90]
|
|
std::vector<std::string> pcmBsplineYknots{"-0.52359878", "-0.29088821", "-0.05817764", "0.17453293", "0.40724349",
|
|
"0.63995406", "0.87266463", "1.10537519", "1.33808576", "1.57079633"};
|
|
|
|
std::vector<std::string> pcmBsplineXcoeffs{};
|
|
std::vector<std::string> pcmBsplineYcoeffs{};
|
|
|
|
// slewing and tracking parameters
|
|
|
|
std::string sideralRate{"15.0410686"}; // arcseconds per second
|
|
std::string telemetryTimeout{"3"}; // timeout for telemetry updating in seconds
|
|
std::string minTimeToPZone{"10"}; // minimal time in seconds to prohibited zone
|
|
// a time interval to update prohibited zones related quantities
|
|
std::string updatingPZoneInterval{"5000"}; // in millisecs
|
|
std::string slewToleranceRadius{"5.0"}; // coordinates difference in arcsecs to stop slewing
|
|
std::string adjustCoordDiff{"50.0"}; // target-mount coordinate difference in arcsecs to start adjusting of slewing
|
|
std::string adjustCycleInterval{"300"}; // minimum time in millisecs between two successive adjustments
|
|
std::string slewTimeout{"3600"}; // slew process timeout
|
|
// a time shift into future to compute target position in future (UT1-scale time duration)
|
|
std::string timeShiftToTargetPoint{"10000"}; // in millisecs
|
|
std::string trackingCycleInterval{"300"}; // minimum time in millisecs between two successive tracking corrections
|
|
|
|
// prohibited zones
|
|
std::string pzMinAltitude{"10.0"}; // minimal altitude in degrees
|
|
std::string pzLimitSwitchHAMin{""}; // HA-axis limit switch minimal value
|
|
std::string pzLimitSwitchHAMax{""}; // HA-axis limit switch maximal value
|
|
|
|
// hardware
|
|
std::string hwMaxRateHA{""}; // maximal moving rate along HA-axis (Y-axis of Sidereal servo microcontroller)
|
|
std::string hwMaxRateDEC{""}; // maximal moving rate along DEC-axis (X-axis of Sidereal servo microcontroller)
|
|
};
|
|
|
|
} // namespace asibfm700
|