...
This commit is contained in:
@@ -8,6 +8,32 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
|
||||
find_package(ASIO QUIET)
|
||||
if (ASIO_FOUND)
|
||||
# message(STATUS "ASIO library was found")
|
||||
else()
|
||||
message(STATUS "ASIO library was not found! Try to download it!")
|
||||
|
||||
include(FetchContent)
|
||||
include(ExternalProject)
|
||||
|
||||
FetchContent_Declare(asio_lib
|
||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/asio_lib
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}
|
||||
GIT_REPOSITORY "https://github.com/chriskohlhoff/asio"
|
||||
GIT_TAG "asio-1-32-0"
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_SUBMODULES ""
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(asio_lib)
|
||||
# FetchContent_GetProperties(asio_lib SOURCE_DIR asio_SOURCE_DIR)
|
||||
|
||||
set(ASIO_INSTALL_DIR ${CMAKE_BINARY_DIR}/asio_lib/asio)
|
||||
find_package(ASIO)
|
||||
endif()
|
||||
|
||||
|
||||
set(ASIBFM700_LIB_SRC asibfm700_common.h asibfm700_servocontroller.h asibfm700_servocontroller.cpp)
|
||||
|
||||
set(ASIBFM700_LIB asibfm700mount)
|
||||
|
||||
@@ -23,6 +23,9 @@ typedef mcc::MccDefaultPCM<asibfm700MountType> Asibfm700PCM;
|
||||
typedef mcc::MccPZoneContainer<mcc::MccTimeDuration> Asibfm700PZoneContainer;
|
||||
typedef mcc::utils::MccSpdlogLogger Asibfm700Logger;
|
||||
|
||||
|
||||
/* MOUNT CONFIGURATION CLASS */
|
||||
|
||||
struct Asibfm700MountConfig {
|
||||
std::chrono::milliseconds hardwarePollingPeriod{100}; // main cycle period
|
||||
|
||||
@@ -32,11 +35,11 @@ struct Asibfm700MountConfig {
|
||||
double siteElevation{2070.0}; // in meters
|
||||
double refractWavelength{0.55}; // in mkm
|
||||
|
||||
std::string leapSecondFilename{};
|
||||
std::string bulletinAFilename{};
|
||||
std::string leapSecondFilename{""}; // an empty filename means default precompiled string
|
||||
std::string bulletinAFilename{""}; // an empty filename means default precompiled string
|
||||
|
||||
|
||||
// PCM-related configuration
|
||||
// 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}};
|
||||
@@ -53,4 +56,55 @@ struct Asibfm700MountConfig {
|
||||
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 pzLimitSwitchHAMaz{""}; // HA-axis limit switch maximal value
|
||||
};
|
||||
|
||||
} // namespace asibfm700
|
||||
|
||||
Reference in New Issue
Block a user