various Asibfm700MountConfig class fixes

This commit is contained in:
2025-10-31 12:22:16 +03:00
parent a1fa54c636
commit d69ea51b0c
5 changed files with 70 additions and 40 deletions

View File

@@ -104,6 +104,12 @@ Asibfm700Mount::error_t Asibfm700Mount::initMount()
}
logInfo("Slewing and tracking parameters have been set successfully");
using secs_t = std::chrono::duration<double>;
auto to_msecs = [](double secs) {
auto s = secs_t{secs};
return std::chrono::duration_cast<std::chrono::milliseconds>(s);
};
auto hw_cfg = _mountConfig.servoControllerConfig();
logInfo("");
logInfo("Hardware initialization ...");
@@ -116,9 +122,9 @@ Asibfm700Mount::error_t Asibfm700Mount::initMount()
logInfo(" EncoderDevSpeed: {}", hw_cfg.devConfig.EncoderDevSpeed);
logInfo(" SepEncoder: {}", hw_cfg.devConfig.SepEncoder);
logInfo(" MountReqInterval: {}", hw_cfg.devConfig.MountReqInterval);
logInfo(" EncoderReqInterval: {}", hw_cfg.devConfig.EncoderReqInterval);
logInfo(" EncoderSpeedInterval: {}", hw_cfg.devConfig.EncoderSpeedInterval);
logInfo(" MountReqInterval: {}", to_msecs(hw_cfg.devConfig.MountReqInterval));
logInfo(" EncoderReqInterval: {}", to_msecs(hw_cfg.devConfig.EncoderReqInterval));
logInfo(" EncoderSpeedInterval: {}", to_msecs(hw_cfg.devConfig.EncoderSpeedInterval));
logInfo(" XPIDC: [P: {}, I: {}, D: {}]", hw_cfg.devConfig.XPIDC.P, hw_cfg.devConfig.XPIDC.I,
hw_cfg.devConfig.XPIDC.D);
@@ -153,8 +159,8 @@ Asibfm700Mount::error_t Asibfm700Mount::initMount()
.elev = _mountConfig.siteElevation()};
if (!_mountConfig.leapSecondFilename().empty()) { // load leap seconds file
logInfo("Loading leap second file: {} ...", _mountConfig.leapSecondFilename());
if (_mountConfig.leapSecondFilename().size()) { // load leap seconds file
logInfo("Loading leap second file: '{}' ...", _mountConfig.leapSecondFilename());
bool ok = ccte_state._leapSeconds.load(_mountConfig.leapSecondFilename());
if (ok) {
logInfo("Leap second file was loaded successfully (expire date: {})", ccte_state._leapSeconds.expireDate());
@@ -166,8 +172,8 @@ Asibfm700Mount::error_t Asibfm700Mount::initMount()
logInfo("Using hardcoded leap seconds defauls (expire date: {})", ccte_state._leapSeconds.expireDate());
}
if (!_mountConfig.bulletinAFilename().empty()) { // load IERS Bulletin A file
logInfo("Loading IERS Bulletin A file: {} ...", _mountConfig.bulletinAFilename());
if (_mountConfig.bulletinAFilename().size()) { // load IERS Bulletin A file
logInfo("Loading IERS Bulletin A file: '{}' ...", _mountConfig.bulletinAFilename());
bool ok = ccte_state._bulletinA.load(_mountConfig.bulletinAFilename());
if (ok) {
logInfo("IERS Bulletin A file was loaded successfully (date range: {} - {})",