|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
PFIPController.ADCTCSTrack
public class ADCTCSTrack
The purpose of this class is to provide a thread in the PFIP controller which will monitor the position of the telescope and set the ADC according to the zenith angle upon which the telescope is currently set at. It acceses the OCSCorbaDramaBridge CORBA server in order to access the telescope positional data and then uses the CORBA subactions which can be used to move the ADC elements.
This process is run as part of a thread which is run every 10 seconds.
It takes care not to move the ADC unless the amount to be moved exceeds the granularity of the encoders associated with the ADCs.
Note that the calculation takes into effect the telescope slewing to a new position on the sky (that is to say that it does not simply take the mid-slew position and base the calculation of the ADC based on that position).
Field Summary | |
---|---|
private boolean |
ADCTCSTrackModeEnabled
Whether or not ADC update mode is enabled, by default, ADC positional updates are performed. |
private org.omg.CORBA.Any |
ADCUpdateNoticeBoardItem
This will be used when updating the parameter noticeboard and will contain the current status of ADC updates. |
private static java.util.Timer |
ADCUpdateTimer
This is a Timer object which will be used to schedule updates of the ADC. |
private SubAction |
ADIMoveSubaction
A remote CORBA reference to the subaction which can be used to move the ADI mechanism. |
private SubAction |
ADOMoveSubaction
A remote CORBA reference to the subaction which can be used to move the ADO mechanism. |
private double |
LastDemandedADCPosition
This is the last demanded position of the ADC, we only request that the 4MS changes the position of the ADC elements when the telescope zenith position changes significantly. |
private org.omg.CORBA.ORB |
Orb
ORB used by the class to do all sorts of CORBA type things. |
private boolean |
OutOfRange
A flag used to moderate the reporting of errors when the calculation of the ADC position goes out of range |
private iParameterNoticeBoard.ParameterNoticeBoardSupplier |
ParameterNoticeBoard
This is a reference to the remote proxy CORBA object which will be used to access the parameter notice board so that we may store associated status information such as the current update status of the ADC. |
private org.omg.PortableServer.POA |
Poa
The POA used by the class |
private org.omg.CosNaming.NamingContextExt |
RootNamingServiceContext
A reference to the CORBA name service so that it may find the remote subaction objects which an be used to move the ADC elements. |
private MessageHandler |
SyslogMessageHandler
This is a syslog object which will be used to report errors etc. |
private boolean |
TCSAccessAlarmReported
Whether an alarm has been reported in the case that we cannot talk to the TCS , we only report the alarm once when we cannot connect to the TCS |
private OCSCorbaDrama.TCSInterface |
TCSInformationSupplier
Remote CORBA object reference which will be used to provide us with TCS positional information on demand. |
Constructor Summary | |
---|---|
ADCTCSTrack(org.omg.PortableServer.POA Poa,
org.omg.CORBA.ORB Orb,
org.omg.CosNaming.NamingContextExt RootNamingServiceContext,
MessageHandler SyslogMessageHandler)
This is the constructor. |
Method Summary | |
---|---|
private double |
calculateADCAngle(double ZenithDistance)
Calculate the ADC element angle, given the telescope zenith distance. |
boolean |
getADCUpdateMode()
Returns the current status of ADC updates, whether they are enabled or not. |
void |
run()
This implements this classes contractual obligation to the TimerTask interface by implementing the run method. |
void |
setADCUpdateMode(boolean EnableADCUpdate)
Allows the ADC positional updates to be enabled or disabled. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean TCSAccessAlarmReported
private boolean OutOfRange
private iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard
private double LastDemandedADCPosition
private org.omg.CORBA.Any ADCUpdateNoticeBoardItem
private static final java.util.Timer ADCUpdateTimer
private OCSCorbaDrama.TCSInterface TCSInformationSupplier
private SubAction ADOMoveSubaction
private SubAction ADIMoveSubaction
private boolean ADCTCSTrackModeEnabled
private org.omg.CORBA.ORB Orb
private org.omg.PortableServer.POA Poa
private org.omg.CosNaming.NamingContextExt RootNamingServiceContext
private MessageHandler SyslogMessageHandler
Constructor Detail |
---|
public ADCTCSTrack(org.omg.PortableServer.POA Poa, org.omg.CORBA.ORB Orb, org.omg.CosNaming.NamingContextExt RootNamingServiceContext, MessageHandler SyslogMessageHandler)
It attempts to use the reference to the the name service provided as part of the call to the constructor.
Poa
- A reference to a portable object adapter which is to be used by this classOrb
- A reference to an ORB which can be used by this class.RootNamingServiceContext
- This is a reference to the naming service which will be used to
resolve the subactions which can be used to control the
positions of the ADCs in the PFIP controller.SyslogMessageHandler
- This object will be used to send messages to the syslogMethod Detail |
---|
public void setADCUpdateMode(boolean EnableADCUpdate)
The current status of ADC updates will be written into the parameter noticeboard in the parameter named PFIP.CONTROLLER.ADCUPDATESTATUS.
EnableADCUpdate
- This should be set to true to indicate that the ADC position
should be updated periodicallypublic boolean getADCUpdateMode()
public void run()
If the telescope is slewing rather than tracking, the ADC position will be set to the position that the telescope will be once the telescope has completed slewing, that is to say, it's new target position.
The method will further ensure that only significant changes in the position of the telescope will result in the an attempt to move the ADC mechanisms
run
in interface java.lang.Runnable
run
in class java.util.TimerTask
private double calculateADCAngle(double ZenithDistance)
The value returned is rounded to the nearest 0.1 degs to ensure that ADC movement is only requested when the required element angle change is measurable.
When the calculated element angle is illegal (this occurs at a ZD of about 73 degs or more ) then announce (once) that there is a problem and return an element angle of 90 deg.
Note that this method was completely cribbed from the original PFIP D-task code and converted to Java. There is a file which contains a list of zenith angles and expected ADC compensation values (taken from headers from the FITS files created using the VAX control system) in the project file PFIPController/docs/miscellaneous in the PFIPController CVS module so that it is possible to cross reference the values which are calculated by this method to be verified against.
ZenithDistance
- This is the distance that the telescope is from the zenith
expressed as radians
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |