M1M3 Support System
Loading...
Searching...
No Matches
ForceControllerSafetySettings.h
1/*
2 * This file is part of LSST M1M3 support system package.
3 *
4 * Developed for the Vera C. Rubin Telescope and Site System.
5 * This product includes software developed by the LSST Project
6 * (https://www.lsst.org).
7 * See the COPYRIGHT file at the top-level directory of this distribution
8 * for details of code ownership.
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#ifndef FORCECONTROLLERSAFETYSETTINGS_H_
25#define FORCECONTROLLERSAFETYSETTINGS_H_
26
27#include <spdlog/spdlog.h>
28#include <yaml-cpp/yaml.h>
29
34public:
35 bool FaultOnSafetyLimit;
36 bool FaultOnXMomentLimit;
37 bool FaultOnYMomentLimit;
38 bool FaultOnZMomentLimit;
39 bool FaultOnNearNeighborCheck;
40 bool FaultOnMagnitudeLimit;
41 bool FaultOnFarNeighborCheck;
42 bool FaultOnElevationForceClipping;
43 bool FaultOnAzimuthForceClipping;
44 bool FaultOnThermalForceClipping;
45 bool FaultOnBalanceForceClipping;
46 bool FaultOnAccelerationForceClipping;
47 bool FaultOnActiveOpticNetForceCheck;
48 bool FaultOnActiveOpticForceClipping;
49 bool FaultOnStaticForceClipping;
50 bool FaultOnOffsetForceClipping;
51 bool FaultOnVelocityForceClipping;
52 bool FaultOnForceClipping;
53
54 void set(YAML::Node node) {
55 FaultOnSafetyLimit = node["FaultOnSafetyLimit"].as<bool>();
56 FaultOnXMomentLimit = node["FaultOnXMomentLimit"].as<bool>();
57 FaultOnYMomentLimit = node["FaultOnYMomentLimit"].as<bool>();
58 FaultOnZMomentLimit = node["FaultOnZMomentLimit"].as<bool>();
59 FaultOnNearNeighborCheck = node["FaultOnNearNeighborCheck"].as<bool>();
60 FaultOnMagnitudeLimit = node["FaultOnMagnitudeLimit"].as<bool>();
61 configured_FaultOnFarNeighborCheck = FaultOnFarNeighborCheck =
62 node["FaultOnFarNeighborCheck"].as<bool>();
63 FaultOnElevationForceClipping = node["FaultOnElevationForceClipping"].as<bool>();
64 FaultOnAzimuthForceClipping = node["FaultOnAzimuthForceClipping"].as<bool>();
65 FaultOnThermalForceClipping = node["FaultOnThermalForceClipping"].as<bool>();
66 FaultOnBalanceForceClipping = node["FaultOnBalanceForceClipping"].as<bool>();
67 FaultOnAccelerationForceClipping = node["FaultOnAccelerationForceClipping"].as<bool>();
68 FaultOnActiveOpticNetForceCheck = node["FaultOnActiveOpticNetForceCheck"].as<bool>();
69 FaultOnActiveOpticForceClipping = node["FaultOnActiveOpticForceClipping"].as<bool>();
70 FaultOnStaticForceClipping = node["FaultOnStaticForceClipping"].as<bool>();
71 FaultOnOffsetForceClipping = node["FaultOnOffsetForceClipping"].as<bool>();
72 FaultOnVelocityForceClipping = node["FaultOnVelocityForceClipping"].as<bool>();
73 FaultOnForceClipping = node["FaultOnForceClipping"].as<bool>();
74 }
75
80 SPDLOG_TRACE("ForceControllerSafetySettings: enterBumpTesting()");
81 FaultOnFarNeighborCheck = false;
82 }
83
88 SPDLOG_TRACE("ForceControllerSafetySettings: exitBumpTesting()");
89 FaultOnFarNeighborCheck = configured_FaultOnFarNeighborCheck;
90 }
91
92private:
93 bool configured_FaultOnFarNeighborCheck;
94};
95
96#endif /* FORCECONTROLLERSAFETYSETTINGS_H_ */
Force Controller Safety settings - which force checks should be run.
Definition ForceControllerSafetySettings.h:33
void exitBumpTesting()
Retores settings for nominal, non-FA bump testing operation.
Definition ForceControllerSafetySettings.h:87
void enterBumpTesting()
Sets safety settings for FA bump testing.
Definition ForceControllerSafetySettings.h:79