diff --git a/CHANGELOG.md b/CHANGELOG.md
index 126aeaa1ed9beb993ea6e43171c6f6d709ffc458..3cf5e1132aab5f969838e735eee115e42342c83c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -91,4 +91,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/
## Fixed
issue #518 - In case of communication error we set a dummy value (100000) for the temperature properties, and the related timestamp keeps the value of the last communication timestamp.
issue #525 - When in LOCAL mode the receivers can turn on/off the noise mark and LNAs. There is no more MNG_FAILURE logging in case of LOCAL mode: only the LOCAL/REMOTE status (during component activation) and the change of status (LOCAL to REMOTE and viceversa) are written to the logfile.
-## Changed
+## Changed
+ issue #545 - Oscillation checks enabled for Mc and Nt telescopes, this setting is now under control of a CDB argument
diff --git a/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml b/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml
index 3db80b764575c56b07ec27c82c351843749532ae..0dca04b5fb042fc19cbd7d7762322fc8fd34648e 100644
--- a/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml
+++ b/Medicina/CDB/alma/ANTENNA/Mount/Mount.xml
@@ -15,6 +15,7 @@
ControlThreadPeriod="200000"
RepetitionCacheTime="2000000"
RepetitionExpireTime="5000000"
+ CheckOscillation="true"
OscillationThreshold="0.01"
OscillationAlarmDuration="2000000"
OscillationNumberThreshold="4"
diff --git a/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml b/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml
index 3db80b764575c56b07ec27c82c351843749532ae..0dca04b5fb042fc19cbd7d7762322fc8fd34648e 100644
--- a/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml
+++ b/Medicina/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml
@@ -15,6 +15,7 @@
ControlThreadPeriod="200000"
RepetitionCacheTime="2000000"
RepetitionExpireTime="5000000"
+ CheckOscillation="true"
OscillationThreshold="0.01"
OscillationAlarmDuration="2000000"
OscillationNumberThreshold="4"
diff --git a/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd b/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd
index c5fdf0fcf1cabd50da005a3f7f7b61e69990aa84..7dbd347358286a71c69ca20c0a0db90c4da7ae54 100644
--- a/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd
+++ b/Medicina/Servers/MedicinaMount/config/CDB/schemas/MedicinaMount.xsd
@@ -100,7 +100,9 @@
-
+
+
+
diff --git a/Medicina/Servers/MedicinaMount/include/Configuration.h b/Medicina/Servers/MedicinaMount/include/Configuration.h
index 7379de9520b824d3aa7aa3fee2c279d35bc2fe9b..dcee4e1e1d239012ec375be0da12c9f44db8851b 100644
--- a/Medicina/Servers/MedicinaMount/include/Configuration.h
+++ b/Medicina/Servers/MedicinaMount/include/Configuration.h
@@ -99,6 +99,9 @@ public:
/** Gets the number of times the oscillation has to be hit before an oscillation is declared*/
inline DWORD oscillationNumberThreashold() const { return m_dwoscNumberThreshold; }
+ /** Flag that indicates whether the oscillation chek must performed or not. */
+ inline bool checkForOscillation() const { return m_checkOsc; }
+
/**
* This member function is used to configure component by reading the configuration parameter from the CDB.
* This must be the first call before using any other function of this class.
@@ -147,6 +150,7 @@ private:
DDWORD m_dwoscAlarmDuration;
WORD m_dwoscNumberThreshold;
DDWORD m_dwoscRecoverTime;
+ bool m_checkOsc;
};
diff --git a/Medicina/Servers/MedicinaMount/src/Configuration.cpp b/Medicina/Servers/MedicinaMount/src/Configuration.cpp
index 7b9b8d6040074ae82214bb64ed7c40fe92abb023..f7504523db58f2cbb26c7b5b3853cde418ebef2a 100644
--- a/Medicina/Servers/MedicinaMount/src/Configuration.cpp
+++ b/Medicina/Servers/MedicinaMount/src/Configuration.cpp
@@ -24,7 +24,7 @@
} \
else { \
FIELD=tmpw; \
- ACS_DEBUG_PARAM("CConfiguration::Init()",DESCR" %lu",tmpw); \
+ ACS_DEBUG_PARAM("CConfiguration::Init()",DESCR" %u",tmpw); \
} \
}
@@ -43,6 +43,7 @@
void CConfiguration::Init(maci::ContainerServices *Services) throw (ComponentErrors::CDBAccessExImpl)
{
+ IRA::CString check;
ACS_TRACE("::CConfiguration::Init()");
// get ACU IP and port number from the database.
_GET_STRING_ATTRIBUTE("IPAddress","IP Address:",m_sACUAddress,"");
@@ -62,7 +63,9 @@ void CConfiguration::Init(maci::ContainerServices *Services) throw (ComponentErr
m_elevationRateInfo.lowerLimit=-m_elevationRateInfo.upperLimit;
_GET_DOUBLE_ATTRIBUTE("maxAzimuthRate","Azimuth rate(degrees/sec):",m_azimuthRateInfo.upperLimit,"DataBlock/Mount");
m_azimuthRateInfo.lowerLimit=-m_azimuthRateInfo.upperLimit;
- _GET_DOUBLE_ATTRIBUTE("cw_ccw_limit","CW/CCW limit (degrees):",m_cwLimit,"DataBlock/Mount");
+ _GET_DOUBLE_ATTRIBUTE("cw_ccw_limit","CW/CCW limit (degrees):",m_cwLimit,"DataBlock/Mount");
+
+ _GET_STRING_ATTRIBUTE("CheckOscillation","Check oscillation during tracking: ",check,"");
_GET_DOUBLE_ATTRIBUTE("OscillationThreshold","Oscillation theshold (deg):",m_doscThreashold,"");
_GET_DWORD_ATTRIBUTE("OscillationAlarmDuration","Oscillation alarm duration (uSec):",m_dwoscAlarmDuration,"");
_GET_DWORD_ATTRIBUTE("OscillationNumberThreshold","Oscillation number threashold:",m_dwoscNumberThreshold,"");
@@ -70,4 +73,6 @@ void CConfiguration::Init(maci::ContainerServices *Services) throw (ComponentErr
m_dwoscAlarmDuration*=10;
m_dwoscRecoverTime*=10;
m_dwcontrolThreadPeriod*=10;
+ check.MakeUpper();
+ m_checkOsc=(check=="TRUE");
}
diff --git a/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp b/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp
index c603ab53c6bc2413e3fd591da494c5647df6f811..d1d91065518e9577f43d76bf45a0364d14d62f2d 100644
--- a/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp
+++ b/Medicina/Servers/MedicinaMount/src/MedicinaMountImpl.cpp
@@ -18,8 +18,8 @@
using namespace AntennaErrors;
using namespace ComponentErrors;
-static char *rcsId="@(#) $Id: MedicinaMountImpl.cpp,v 1.17 2011-04-22 17:15:07 a.orlati Exp $";
-static void *use_rcsId = ((void)&use_rcsId,(void *) &rcsId);
+//static char *rcsId="@(#) $Id: MedicinaMountImpl.cpp,v 1.17 2011-04-22 17:15:07 a.orlati Exp $";
+//static void *use_rcsId = ((void)&use_rcsId,(void *) &rcsId);
MedicinaMountImpl::MedicinaMountImpl(const ACE_CString &CompName,maci::ContainerServices *containerServices) :
diff --git a/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp b/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp
index 054810d23010775553754979ecd2a42d62af928a..bf3694a17e448aed5e7e69ffb1124713a1aed24e 100644
--- a/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp
+++ b/Medicina/Servers/MedicinaMount/src/MedicinaMountSocket.cpp
@@ -842,6 +842,8 @@ double CMedicinaMountSocket::getHWAzimuth(double destination,const CACUInterface
void CMedicinaMountSocket::detectOscillation() throw (ConnectionExImpl,SocketErrorExImpl,TimeoutExImpl,AntennaErrors::NakExImpl,AntennaBusyExImpl)
{
TIMEVALUE now;
+ // if oscillation is not to be checked then exit immediately
+ if (!m_configuration->checkForOscillation()) return;
double azError=getAzimuthError(); // throw (ConnectionExImpl,SocketErrorExImpl,TimeoutExImpl)
IRA::CIRATools::getTime(now);
CACUInterface::TAxeModes mode=m_Data.getLastCommandedMode();
diff --git a/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp b/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp
index 4612967858ec5d38483d2e7ba86f72677b52e890..695d389de19c01725a9c09316bf8b19d8cdeb131 100644
--- a/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp
+++ b/Medicina/Servers/MedicinaMount/src/MedicinaMountThread.cpp
@@ -50,8 +50,7 @@ void CMedicinaMountControlThread::runLoop()
currentJob.Release(); // this is important in order to avoid possible deadlock.
CSecAreaResourceWrapper socket=m_pACUControl->Get();
socket->updateComponent(); // before commenting out or deleting consider that inside this method the flushing of pending event of the log dike object is called
- // oscillation detection disabled as it seems the effect disappeared after tuning of servo system parameters
- //socket->detectOscillation();
+ socket->detectOscillation();
if (currentJobID!=0) {
ACSErr::Completion_var comp;
if (socket->updateLongJobs(currentJobID,comp.out())) {
diff --git a/Noto/CDB/alma/ANTENNA/Mount/Mount.xml b/Noto/CDB/alma/ANTENNA/Mount/Mount.xml
index 62b2a8d3bb1610c61f34d0e899d0970a84f21e81..44c2fc8ea4ff976d3a35d2b81c98b4b32da5a4d3 100644
--- a/Noto/CDB/alma/ANTENNA/Mount/Mount.xml
+++ b/Noto/CDB/alma/ANTENNA/Mount/Mount.xml
@@ -15,6 +15,7 @@
ControlThreadPeriod="200000"
RepetitionCacheTime="2000000"
RepetitionExpireTime="5000000"
+ CheckOscillation="true"
OscillationThreshold="0.01"
OscillationAlarmDuration="2000000"
OscillationNumberThreshold="4"
diff --git a/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml b/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml
index 62b2a8d3bb1610c61f34d0e899d0970a84f21e81..44c2fc8ea4ff976d3a35d2b81c98b4b32da5a4d3 100644
--- a/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml
+++ b/Noto/Configuration/CDB/alma/ANTENNA/Mount/Mount.xml
@@ -15,6 +15,7 @@
ControlThreadPeriod="200000"
RepetitionCacheTime="2000000"
RepetitionExpireTime="5000000"
+ CheckOscillation="true"
OscillationThreshold="0.01"
OscillationAlarmDuration="2000000"
OscillationNumberThreshold="4"
diff --git a/SystemMake/Makefile b/SystemMake/Makefile
index 404a25456b47ca720ea1f0c456c2c7ea1e5a05b9..cc8fd1f9c0ce405b866338739b9b3bd918aaa799 100644
--- a/SystemMake/Makefile
+++ b/SystemMake/Makefile
@@ -120,7 +120,7 @@ ifeq ($(STATION),Medicina)
SlaLibrary IRALibrary TextWindowLibrary ParserLibrary ComponentProxy ModbusChannel XarcosLibrary \
PyTestingLibrary \
AntennaBoss Observatory OTF PointingModel Refraction SkySource Moon FitsWriter Scheduler ReceiversBoss ExternalClients CalibrationTool \
- Metrology TotalPower NoiseGenerator MedicinaMount MedWeatherStation CustomLogger XBackend MedicinaMinorServo\
+ TotalPower NoiseGenerator MedicinaMount MedWeatherStation CustomLogger XBackend MedicinaMinorServo\
AntennaBossTextClient ObservatoryTextClient GenericBackendTextClient ReceiversBossTextClient SystemTerminal CaltoolClient SchedulerTextClient MinorServoBossTextClient\
MedicinaMountTextClient CustomLoggingClient\
Plotter KStars Scripts MedScripts