HLCC Documentation 3.0.1
Loading...
Searching...
No Matches
activityDoEstimation.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2020-2025 European Southern Observatory (ESO)
2//
3// SPDX-License-Identifier: LGPL-3.0-only
4
13#ifndef HLCC_TRKSIM_ACTIVITYDOESTIMATION_HPP
14#define HLCC_TRKSIM_ACTIVITYDOESTIMATION_HPP
15
16#include <string>
17
18#include <rad/configurableActivity.hpp>
19#include <rad/activity.hpp>
20#include <rad/smAdapter.hpp>
21#include <ptk/angles.hpp>
22#include <ptk/posastro.hpp>
23
24#include "trksim/monitoring.hpp"
25#include "trksim/logger.hpp"
26
27
28
29
30namespace hlcc::trksim {
31
32class DataContext;
33
37class ActivityDoEstimation : public rad::ConfigurableActivity {
38public:
39 ActivityDoEstimation(const std::string& id,
40 rad::SMAdapter& sm,
42 virtual ~ActivityDoEstimation();
43
44 void Run() override;
45
50 void Initialize() override;
51
58 void Configure(const std::vector<std::string>& keys) override;
59
62
63private:
64
69 void ComputePointingKernelPositions(
70 ::taiclock::TaiClock::time_point now_tai,
71 ElapsedTimeStats& stats);
72
73 const log4cplus::Logger m_logger;
74 rad::SMAdapter& m_sm;
75 DataContext& m_data_context;
76
80 static constexpr std::chrono::milliseconds PERIOD = std::chrono::milliseconds{50};
81
88 ptk::HorizonPositionEso m_alt_az_previous;
89
104 const ptk::Radians m_moving_min_per_s;
105
106 // The tolerable distance (error) between actual and commanded position,
107 // where we still consider the telescope to be tracking.
108 // Not sure if 0.5 arcsec makes sense.
109 // We want to avoid accidental transitions from TRACKING to PRESETTING.
110 // This value is loaded from configuration. where it is stored in arcsec and converted to rad on loading
111 const ptk::Radians m_tracking_error; // read from config (~0.5 arcsec)
112
116 const ptk::CirsObservedConverter m_cirs_obs_conv;
117
118};
119
120
121} // namespace hlcc::trksim
122
123#endif // HLCC_TRKSIM_ACTIVITYDOESTIMATION_HPP
void Initialize() override
Definition activityDoEstimation.cpp:263
ActivityDoEstimation(const ActivityDoEstimation &)=delete
void Configure(const std::vector< std::string > &keys) override
Definition activityDoEstimation.cpp:267
ActivityDoEstimation & operator=(const ActivityDoEstimation &)=delete
Disable copy constructor.
virtual ~ActivityDoEstimation()
Definition activityDoEstimation.cpp:41
ActivityDoEstimation(const std::string &id, rad::SMAdapter &sm, DataContext &data)
Definition activityDoEstimation.cpp:27
void Run() override
Definition activityDoEstimation.cpp:45
Definition dataContext.hpp:53
Definition monitoring.hpp:31
Definition actionMgr.cpp:35
ccsinsdetifllnetio::PointingKernelPositions data
Definition pkp_llnetio_subscriber.cpp:29
Default logger name.
Performance and other monitoring.