TwiceAsNice  2019-02-18
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Ltcs::IifServiceWorker Class Reference

This class is the wrapper of the IIF interface. More...

#include <LtcsIifServiceWorker.h>

Inheritance diagram for Ltcs::IifServiceWorker:
Inheritance graph
Collaboration diagram for Ltcs::IifServiceWorker:
Collaboration graph

Classes

struct  DeviceAsyncImpl
 
struct  DeviceCmdAsyncImpl
 This struct is the implementation of the asynchronous command status method. More...
 
struct  LBTPolynomial
 One polynomial representation of an angle over time. More...
 

Public Member Functions

 IifServiceWorker (const Nice::JointPtr &_config)
 ctor More...
 
virtual ~IifServiceWorker ()
 dtor. Closes the communicator. More...
 
virtual void init ()
 Initialize property tree. Create a proxy for the given instrument and focal station according to the configured standards. More...
 
virtual void deinit ()
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual void errorOffline ()
 set the target state to OFFLINE. More...
 
virtual void errorStandby ()
 set the target state to OFFLINE. More...
 
virtual void errorOnline ()
 set the target state to OFFLINE. More...
 
virtual void errorWorking ()
 set the target state to OFFLINE. More...
 
virtual void idleOffline ()
 wait for a state change. More...
 
virtual void idleOnline ()
 wait for a state change. More...
 
virtual void stop ()
 does nothing. More...
 
virtual void abort ()
 does nothing. More...
 
virtual bool isReachable ()
 
virtual bool enableOffsetGuiding (bool enable)
 
template<typename TTYPE >
std::string getAny (const char *ddnam, std::string propnam, const char *lognam=0)
 retrieve a generic parameter from the IIF. More...
 
virtual double getDouble (const std::string &ddnam, const std::string &lognam)
 
virtual std::string getRA ()
 Obtain the RA from the iif interface. More...
 
virtual double getRAradians ()
 read the right ascension from the IIF interface. More...
 
virtual std::string getDEC ()
 read the declination from the IIF ICE interface. More...
 
virtual double getDECradians ()
 read the declination from the IIF interface. More...
 
virtual double getParallacticAngle ()
 
virtual double getAlt ()
 
virtual double getAz ()
 
virtual double getEpoch ()
 
virtual std::string getUTC ()
 read the univeral time coordinated from the IIF interface. More...
 
virtual std::string getLST ()
 read the local siderial time from the IIF interface. More...
 
virtual std::string getHourAngle ()
 read the hour angle from the IIF interface. More...
 
virtual std::string setPresetTelescope (int _raH, int _raMin, double _raSec, int _decDeg, int _decMin, double _decSec)
 Preset the telescope to some Ra/Dec position (considered epoch 2000). More...
 
virtual std::string setPresetTelescopeCat (const lbto::SeqPos2 &stars)
 Start telescope slewing and tracking. More...
 
virtual std::string setPresetTelescopeStar (const lbto::position2 &star)
 
virtual std::string setOffsetGuiding (double _ra, double _dec, const std::string &_coordSys, const std::string &_side)
 
virtual std::string setOffsetPointing (double _ra, double _dec, const std::string &_coordSys, const std::string &_moveType, const std::string &_side)
 
virtual Nice::SeqSeqDouble getRotatorPolynomials (Nice::Date _startTime)
 
virtual Nice::SeqPoint getKFPCoordinates (const std::string &_side)
 
virtual lbto::SeqPos2 getPresetStars ()
 
void poll ()
 read RA, DEC and some other principal variables in one shot If the time defined by cfgInterval has been reached, call snapshot(), otherwise do nothing, assuming that data are recent. More...
 
void snapshot ()
 read all DD variables of interest in one shot. The only purpose of this is to be faster than calling getRA(), getDEC() etc in sequence. More...
 
bool isSlewing ()
 Flag whether one or both sides of the telescope are on source. The function polls the R_IIFOnSource or S_IIFOnSource keyword of the IIF associated with the side LINC has registered with. If these values are 1, the function returns. More...
 
 operator Nice::SkyPoint ()
 Transform the current pointing into a SkyPoint object. More...
 
virtual Basda::VinoFitsCardBox getFits (const double &_pixscal=0)
 
virtual void toKVPairFile ()
 Dump the DD entries for use in the licsGUI and GEIRS FITS headers. More...
 
virtual std::string getObject ()
 Generate an OBJECT string from pointing coordinates. More...
 
virtual std::string getLINCstation ()
 Figure out whether our instrument is on the L or R side or not on any. More...
 
virtual void getParam ()
 obtain parameters information from the IIF interface. This also updates the iifSidReg parameter, the current assignment by the telescope interface (TO). More...
 
virtual lbto::result iifAcquireRefAO (bool repointFlag, const std::string &side)
 Acquire the reference star. More...
 
virtual lbto::result iifAuthorize ()
 Check authorization to control the telescope. More...
 
virtual lbto::result iifBinocularControl (const std::string &flag)
 BinocularControl clears the target information in the PCS. More...
 
virtual lbto::result iifCheckRefAO (const std::string &side)
 Check the reference star position. More...
 
virtual lbto::result iifClearHotspot ()
 Removes the hotspot from the system. More...
 
virtual lbto::result iifClearNonSidereal (bool override)
 Removes the non-sidereal object from the system. More...
 
virtual lbto::result iifClearOffset ()
 Removes the offset from the system. More...
 
virtual lbto::result iifClearReference ()
 Removes the AO reference star from the system. More...
 
virtual lbto::result iifClearStars ()
 Removes the selected target and guide stars from the system. More...
 
virtual lbto::result iifCorrectModesAO (const lbto::SeqModes &modes, const std::string &side)
 Send 672 mode corrections to AO. More...
 
virtual lbto::result iifGetKFPCoordinates (const lbto::SeqPos &list, const std::string &side)
 Use this command to get focal plane positions for LN AO reference objects. More...
 
virtual lbto::result iifGetKFPCoordinates2 (const lbto::SeqPos2 &list, const std::string &side)
 Use this command to get focal plane positions for LN AO reference objects. More...
 
virtual lbto::result iifGetParameter (const lbto::SeqDD &_dd)
 Reads a block of entries from the data dictionary in one shot. More...
 
virtual lbto::result iifGetRotatorPolynomials (double start, int count, double interval, int order, const std::string &side)
 Use this command to get rotator polynomials. More...
 
virtual lbto::result iifGetRotatorTrajectory (double seconds, double interval, double start, const std::string &side)
 Use this command to get the rotator trajectory for the LBC. More...
 
virtual lbto::result iifLogEvent (const std::string &event, const std::string &description)
 Use this command to log a message inside the TCS's logging system. More...
 
virtual lbto::result iifMaximizeWrapTime (bool azflag, bool rotflag, const std::string &side)
 This command is to provide some control over the use of the rotator cablewrap. More...
 
virtual lbto::result iifModifyAO (int NModes, double Freq, int Nbins, double TTmod, const std::string &F1spec, const std::string &F2spec, const std::string &side)
 Modify AO. More...
 
virtual lbto::result iifMove (double x, double y, double z, double rx, double ry, double rz, int dflag, const std::string &movetype, const std::string &ope, int time, const std::string &side)
 This command combines the functionality of MoveXY, TipTilt, StepFocus and MoveFocus. More...
 
virtual lbto::result iifMoveFocus (double absPos, const std::string &ope, const std::string &side)
 Moves an OPE to a new absolute position z to adjust or to define a new focus position. More...
 
virtual lbto::result iifMoveXY (double xmov, double ymov, const std::string &ope, const std::string &side)
 MoveXY moves an OPE in X or Y direction, relative to the current position. More...
 
virtual lbto::result iifMoveXYZ (double xmov, double ymov, double zmov, const std::string &side)
 MoveXYZ moves the primary and secondary together in X, Y and Z direction. More...
 
virtual lbto::result iifOffsetGuiding (double angle, double offx, double offy, const std::string &_coordsys, const std::string &side)
 OffsetGuiding moves the telescope a small distance without changing. More...
 
virtual lbto::result iifOffsetPointing (double _rotangle, double _offx, double _offy, const std::string &_coordsys, const std::string &_ope, const std::string &_np, const std::string &_movetype, const std::string &_side)
 OffsetPointing moves the telescope a small distance, setting the value. More...
 
virtual lbto::result iifOffsetPointing2 (double _rotangle, double _offx, double _offy, const std::string &_coordsys, const std::string &_movetype, const std::string &_side)
 OffsetPointing moves the telescope a small distance, setting the value. More...
 
virtual lbto::result iifOffsetXYAO (double DeltaX, double DeltaY, const std::string &side)
 OffsetXY AO. More...
 
virtual lbto::result iifOffsetZAO (double DeltaZ, const std::string &side)
 OffsetZ AO. More...
 
virtual lbto::result iifPauseAO (const std::string &side)
 Temporarily suspends the current AO operation. More...
 
virtual lbto::result iifPauseGuiding (const std::string &side)
 Temporarily suspends the current guiding operation. More...
 
virtual lbto::result iifPresetAO (const std::string &AOMode, const std::string &side)
 Preset AO. More...
 
virtual lbto::result iifPresetFlatAO (const std::string &flat, const std::string &side)
 Request flat shape for AO. More...
 
virtual lbto::result iifPresetTelescope (double rotangle, const std::string &rotmode, const std::string &mode, const std::string &side)
 PresetTelescope slew the telescope into position in order to begin an observation cycle. More...
 
virtual lbto::result iifRefineAO (const std::string &method, const std::string &side)
 Refine AO. More...
 
virtual void iifRemove ()
 remove the IIF object More...
 
virtual lbto::result iifResumeAO (const std::string &side)
 Resumes suspended operation after a PauseAO. More...
 
virtual lbto::result iifResumeGuiding (const std::string &side)
 Resumes suspended guiding operation. More...
 
virtual lbto::result iifRotateCommon (double z, double angle, double direction, const std::string &side)
 Rotates the primary and the secondary mirror around a common point. More...
 
virtual lbto::result iifRotatePrimary (double distance, double angle, double direction, const std::string &side)
 Use this command to to rotate the primary about a point on axis. More...
 
virtual lbto::result iifRotateZ (double angle, const std::string &movetype, const std::string &side)
 the tertiary mirror is rotated to adjust the incoming beam angle for the instrument. More...
 
virtual lbto::result iifRotHold (const std::string &side)
 If the rotator is tracking or slewing, this command makes it stop moving and hold the position. More...
 
virtual lbto::result iifRotReady (bool enable, const std::string &side)
 Readies the cable wrap and rotator. More...
 
virtual lbto::result iifRotServicePosition (double angle, const std::string &side)
 Makes the rotator move to the specified angle in the specified coordinate frame and hold at that position. More...
 
virtual lbto::result iifRotTrack (const std::string &side)
 Makes rotator begin tracking according to the polynomial stream it is currently receiving from the PCS. More...
 
virtual lbto::result iifRunAO (const std::string &repointFlag, const std::string &side)
 Do AcquireRefAO, StartAO. More...
 
virtual lbto::result iifSendWavefront (const lbto::SeqWF &wfs, const std::string &OPE, const std::string &side)
 Sends an array of 28 Zernike polynomial coefficients to be compensated by the actuators. More...
 
virtual lbto::result iifSetAGWFilter (int filterNumber, const std::string &side)
 Use this command to set the AGw filter. More...
 
virtual lbto::result iifSetGuidingBinning (int factor, const std::string &side)
 Use this command to set the AGw filter. More...
 
virtual lbto::result iifSetGuidingHotspot (double coord1, double coord2, const std::string &movetype, const std::string &side)
 Sets guider hotspot. More...
 
virtual lbto::result iifSetHotspot (double _offx, double _offy)
 Set the hotspot coordinates to be used by PresetTelescope command. More...
 
virtual lbto::result iifSetNonSidereal (const lbto::nonsidereal &target, bool override)
 Set the non-sidereal values to be used by PresetTelescope. More...
 
virtual lbto::result iifSetOffset (double _offx, double _offy, const std::string &_coordsys)
 Set the offset coordinates to be used by PresetTelescope. More...
 
virtual lbto::result iifSetOffset2 (double coord1, double coord2, const std::string &system, const std::string &movetype)
 Set the offset coordinates to be used by PresetTelescope. More...
 
virtual lbto::result iifSetParameter (const lbto::SeqDD &list)
 Sets the values of the specified data dictionary entries on the TCS in one shot. More...
 
virtual lbto::result iifSetPMTerm (const std::string &_name, double value, const std::string &side)
 SetPMTerm sets a singel term in the pointing model. More...
 
virtual lbto::result iifSetPMTerm2 (const std::string &_name, double value, const std::string &movetype, const std::string &side)
 SetPMTerm sets a singel term in the pointing model. More...
 
virtual lbto::result iifSetReference (const lbto::SeqPos &list)
 Sets the AO reference star. More...
 
virtual lbto::result iifSetReference2 (const lbto::SeqPos2 &list)
 Sets the AO reference star. More...
 
virtual lbto::result iifSetStars (const lbto::SeqPos &_stars)
 Sets the target, and eventually, the guide stars. More...
 
virtual lbto::result iifSetStars2 (const lbto::SeqPos2 &list)
 Sets the target, and eventually, the guide stars. More...
 
virtual lbto::result iifSetTarget (double coord1, double coord2, const std::string &coordsys, double epoch, float wl)
 Set the target information to be used by PresetTelescope. More...
 
virtual lbto::result iifStandby (int level, const std::string &side)
 Use this command to set the standby level. More...
 
virtual lbto::result iifStartAO (const std::string &side)
 Start AO operation. More...
 
virtual lbto::result iifStepFocus (double relPos, const std::string &ope, const std::string &side)
 StepFocus moves the respective focus position, by moving the OPE. More...
 
virtual lbto::result iifStopAO (const std::string &reason, const std::string &side)
 Stop AO operation. More...
 
virtual lbto::result iifTipTilt (double xrot, double yrot, const std::string &ope, const std::string &side)
 TipTilt moves an OPE in tip or tilt direction, relative to the current position. More...
 
virtual lbto::result iifUpdateNonSiderealTarget (double RArate, double DECrate)
 Update the non-sidereal values. More...
 
virtual lbto::result iifUpdatePointingReference (const std::string &offset_coord, const std::string &side)
 This command allows the user to use the current sky or focal plane location achieved via the. More...
 
virtual lbto::result iifUpdateTargetWavelength (float wavelength, const std::string &side)
 Updates the target effective wavelength without issuing a new preset. More...
 
- Public Member Functions inherited from Ltcs::IifServiceWorkerSkeleton
 IifServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~IifServiceWorkerSkeleton ()
 
 IifServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~IifServiceWorkerSkeleton ()
 
- Public Member Functions inherited from Basda::ServiceWorkerSkeleton
const Nice::PropertyPtrcmd ()
 
void setCompletion (const Nice::Completion &_c)
 
void cmdStart (const std::string &_action="")
 
void cmdDone ()
 
void cmdWarning (const std::string &_l)
 
void cmdWarning (const Nice::LoggerObject &_o)
 
void cmdError (const std::string &_l)
 
void cmdError (const Nice::LoggerObject &_o)
 
void cmdError (const Nice::SeqLoggerObject &_oo)
 
void cmdPercent (Nice::Int _v)
 
void cmdAction (Nice::Int _v, const std::string &_s)
 
virtual void cmd (const Nice::Completion &_c)
 
template<typename DataType >
Nice::Completion exec (const Nice::Completion &_c, DataType &_localdata, const DataType &_indata=DataType())
 if currently online, push the state into WORKING More...
 
template<typename DataType >
void execCommand (DataType _cmd)
 
const Nice::PropertyPtrcmd ()
 
void setCompletion (const Nice::Completion &_c)
 
void cmdStart (const std::string &_action="")
 
void cmdDone ()
 
void cmdWarning (const std::string &_l)
 
void cmdWarning (const Nice::LoggerObject &_o)
 
void cmdError (const std::string &_l)
 
void cmdError (const Nice::LoggerObject &_o)
 
void cmdError (const Nice::SeqLoggerObject &_oo)
 
void cmdPercent (Nice::Int _v)
 
void cmdAction (Nice::Int _v, const std::string &_s)
 
virtual void cmd (const Nice::Completion &_c)
 
template<typename DataType >
Nice::Completion exec (const Nice::Completion &_c, DataType &_localdata, const DataType &_indata=DataType())
 
template<typename DataType >
void execCommand (DataType _cmd)
 
- Public Member Functions inherited from Basda::ServiceWorker
const Nice::JointPtrconfig ()
 
Nice::JointPtr cfg ()
 
Nice::JointPtr var ()
 
virtual const std::string & name ()
 
virtual WorkerThreadPtr worker ()
 
virtual Nice::Monitormonitor ()
 
virtual void lock ()
 
virtual void unlock ()
 
bool stateIsSettled ()
 
bool stateHasChanged ()
 
void changeState (Basda::ServiceState _state)
 change state to a new state If the state is the current state, or a negative state, do nothing. Otherwise change the "next" state in the state machine and notify all threads. More...
 
bool tryChangeState (Basda::ServiceState _state, const Nice::Time &_timeout=Nice::Time::seconds(0.0))
 change state to a new state More...
 
void waitForState (Basda::ServiceState _state)
 wait (indefinitely) until the worker has reached a spcifici state More...
 
bool timedWaitForState (Basda::ServiceState _state, const Nice::Time &_timeout)
 wait (indefinitely) until the worker has reached a specific state More...
 
bool changeStateOnlyFromTo (Basda::ServiceState _from, Basda::ServiceState _to)
 wait (indefinitely) until the worker has reached a spcifici state More...
 
Basda::ServiceState state ()
 
Basda::ServiceState stateNow ()
 
Basda::ServiceState stateNext ()
 
Basda::ServiceState stateLast ()
 
bool isTransit ()
 
bool isTerminated ()
 
const Nice::JointPtrconfig ()
 
Nice::JointPtr cfg ()
 
Nice::JointPtr var ()
 
virtual const std::string & name ()
 
virtual WorkerThreadPtr worker ()
 
virtual Nice::Monitormonitor ()
 
virtual void lock ()
 
virtual void unlock ()
 
bool stateIsSettled ()
 
bool stateHasChanged ()
 
void changeState (Basda::ServiceState _state)
 
bool tryChangeState (Basda::ServiceState _state, const Nice::Time &_timeout=Nice::Time::seconds(0.0))
 
void waitForState (Basda::ServiceState _state)
 
bool timedWaitForState (Basda::ServiceState _state, const Nice::Time &_timeout)
 
bool changeStateOnlyFromTo (Basda::ServiceState _from, Basda::ServiceState _to)
 
Basda::ServiceState state ()
 
Basda::ServiceState stateNow ()
 
Basda::ServiceState stateNext ()
 
Basda::ServiceState stateLast ()
 
bool isTransit ()
 
bool isTerminated ()
 

Static Public Member Functions

static double hexToDeg (const std::string &hdms)
 

Public Attributes

string fMonit
 Name of the file with DD keys and values . More...
 
string fFtpl
 Name of the ASCII template file. More...
 
Ltcs::IifSide iifSidReg
 The SX/DX side(s) at which the instrument is registered by the telescope operator/TCS (not necessarily authorized !), left, right, both or none. More...
 
Ltcs::IifSide iifSidCfg
 The SX/DX side(s) at which the instrument is configured according to iif-svc.cfg left, right or both. More...
 
Ltcs::IifInstrum lbtInstr
 The current instrument (LINC, LUCI,....) More...
 
vector< Ltcs::Iif2fitsKwkeys
 The set of keywords to be reported (FITS and liifSnapshotGUI) More...
 
lbto::SeqDD ddents
 The DD entries to be requested from the IIF The type is typedef'd in src/iif/Interface/LbtoIIFInterface.h . More...
 
lbto::SeqPos2 scat
 The star set of the most recent preset. More...
 
Nice::SeqPoint kfpHash [2]
 The KFP coordinates of scat (hashed from a previous getKFPCoordinates() call. More...
 
bool offsetGuidingEna
 True if the offset guide commands are forwarded to the TCS. More...
 

Protected Member Functions

Basda::VinoFitsCardBox getFitsWithWcs (const double pixsc=0., const double ctrpx[]=0, const double wcsAng=std::numeric_limits< double >::quiet_NaN())
 
- Protected Member Functions inherited from Ltcs::IifServiceWorkerSkeleton
const char * isReachableNode ()
 
const char * enableOffsetGuidingNode ()
 
void enableOffsetGuidingInit (bool _enable)
 
const char * getRANode ()
 
const char * getDECNode ()
 
const char * getParallacticAngleNode ()
 
const char * getUTCNode ()
 
const char * getLSTNode ()
 
const char * getHourAngleNode ()
 
const char * getAltNode ()
 
const char * getAzNode ()
 
const char * getEpochNode ()
 
const char * getRAradiansNode ()
 
const char * getDECradiansNode ()
 
const char * setOffsetGuidingNode ()
 
void setOffsetGuidingInit (double _offx, double _offy, const std::string &__coordsys, const std::string &__side)
 
const char * setOffsetPointingNode ()
 
void setOffsetPointingInit (double _offx, double _offy, const std::string &__coordsys, const std::string &__move_type, const std::string &__side)
 
const char * getRotatorPolynomialsNode ()
 
void getRotatorPolynomialsInit (double __starttime, int __count, double __interval, int __order, const std::string &__side)
 
const char * getKFPCoordinatesNode ()
 
void getKFPCoordinatesInit (const std::string &__side)
 
const char * getPresetStarsNode ()
 
const char * getLINCstationNode ()
 
const char * isSlewingNode ()
 
const char * getFitsNode ()
 
void getFitsInit (const double &__pixscal)
 
const char * setPresetTelescopeNode ()
 
void setPresetTelescopeInit (int __rah, int __ramin, double __rasec, int __decdeg, int __decmin, double __decsec)
 
const char * setPresetTelescopeCatNode ()
 
void setPresetTelescopeCatInit (const lbto::SeqPos2 &_stars)
 
const char * iifAcquireRefAONode ()
 
void iifAcquireRefAOInit (bool _repointflag, const std::string &_side)
 
const char * iifAuthorizeNode ()
 
const char * iifBinocularControlNode ()
 
void iifBinocularControlInit (const std::string &_flag)
 
const char * iifCheckRefAONode ()
 
void iifCheckRefAOInit (const std::string &_side)
 
const char * iifClearHotspotNode ()
 
const char * iifClearNonSiderealNode ()
 
void iifClearNonSiderealInit (bool _override)
 
const char * iifClearOffsetNode ()
 
const char * iifClearReferenceNode ()
 
const char * iifClearStarsNode ()
 
const char * iifCorrectModesAONode ()
 
void iifCorrectModesAOInit (const lbto::SeqModes &_modes, const std::string &_side)
 
const char * iifGetKFPCoordinates2Node ()
 
void iifGetKFPCoordinates2Init (const lbto::SeqPos2 &_list, const std::string &_side)
 
const char * iifGetParameterNode ()
 
void iifGetParameterInit (const lbto::SeqDD &__dd)
 
const char * iifGetRotatorPolynomialsNode ()
 
void iifGetRotatorPolynomialsInit (double _start, int _count, double _interval, int _order, const std::string &_side)
 
const char * iifGetRotatorTrajectoryNode ()
 
void iifGetRotatorTrajectoryInit (double _seconds, double _interval, double _start, const std::string &_side)
 
const char * iifLogEventNode ()
 
void iifLogEventInit (const std::string &_event, const std::string &_description)
 
const char * iifMaximizeWrapTimeNode ()
 
void iifMaximizeWrapTimeInit (bool _azflag, bool _rotflag, const std::string &_side)
 
const char * iifModifyAONode ()
 
void iifModifyAOInit (int _nmodes, double _freq, int _nbins, double _ttmod, const std::string &_f1spec, const std::string &_f2spec, const std::string &_side)
 
const char * iifMoveNode ()
 
void iifMoveInit (double _x, double _y, double _z, double _rx, double _ry, double _rz, int _dflag, const std::string &_movetype, const std::string &_ope, int _time, const std::string &_side)
 
const char * iifMoveFocusNode ()
 
void iifMoveFocusInit (double _abspos, const std::string &_ope, const std::string &_side)
 
const char * iifMoveXYNode ()
 
void iifMoveXYInit (double _xmov, double _ymov, const std::string &_ope, const std::string &_side)
 
const char * iifMoveXYZNode ()
 
void iifMoveXYZInit (double _xmov, double _ymov, double _zmov, const std::string &_side)
 
const char * iifOffsetGuidingNode ()
 
void iifOffsetGuidingInit (double _angle, double _offx, double _offy, const std::string &__coordsys, const std::string &_side)
 
const char * iifOffsetPointing2Node ()
 
void iifOffsetPointing2Init (double __rotangle, double __offx, double __offy, const std::string &__coordsys, const std::string &__movetype, const std::string &__side)
 
const char * iifOffsetXYAONode ()
 
void iifOffsetXYAOInit (double _deltax, double _deltay, const std::string &_side)
 
const char * iifOffsetZAONode ()
 
void iifOffsetZAOInit (double _deltaz, const std::string &_side)
 
const char * iifPauseAONode ()
 
void iifPauseAOInit (const std::string &_side)
 
const char * iifPauseGuidingNode ()
 
void iifPauseGuidingInit (const std::string &_side)
 
const char * iifPresetAONode ()
 
void iifPresetAOInit (const std::string &_aomode, const std::string &_side)
 
const char * iifPresetFlatAONode ()
 
void iifPresetFlatAOInit (const std::string &_flat, const std::string &_side)
 
const char * iifPresetTelescopeNode ()
 
void iifPresetTelescopeInit (double _rotangle, const std::string &_rotmode, const std::string &_mode, const std::string &_side)
 
const char * iifRefineAONode ()
 
void iifRefineAOInit (const std::string &_method, const std::string &_side)
 
const char * iifRemoveNode ()
 
const char * iifResumeAONode ()
 
void iifResumeAOInit (const std::string &_side)
 
const char * iifResumeGuidingNode ()
 
void iifResumeGuidingInit (const std::string &_side)
 
const char * iifRotateCommonNode ()
 
void iifRotateCommonInit (double _z, double _angle, double _direction, const std::string &_side)
 
const char * iifRotatePrimaryNode ()
 
void iifRotatePrimaryInit (double _distance, double _angle, double _direction, const std::string &_side)
 
const char * iifRotateZNode ()
 
void iifRotateZInit (double _angle, const std::string &_movetype, const std::string &_side)
 
const char * iifRotHoldNode ()
 
void iifRotHoldInit (const std::string &_side)
 
const char * iifRotReadyNode ()
 
void iifRotReadyInit (bool _enable, const std::string &_side)
 
const char * iifRotServicePositionNode ()
 
void iifRotServicePositionInit (double _angle, const std::string &_side)
 
const char * iifRotTrackNode ()
 
void iifRotTrackInit (const std::string &_side)
 
const char * iifRunAONode ()
 
void iifRunAOInit (const std::string &_repointflag, const std::string &_side)
 
const char * iifSendWavefrontNode ()
 
void iifSendWavefrontInit (const lbto::SeqWF &_wfs, const std::string &_ope, const std::string &_side)
 
const char * iifSetAGWFilterNode ()
 
void iifSetAGWFilterInit (int _filternumber, const std::string &_side)
 
const char * iifSetGuidingBinningNode ()
 
void iifSetGuidingBinningInit (int _factor, const std::string &_side)
 
const char * iifSetGuidingHotspotNode ()
 
void iifSetGuidingHotspotInit (double _coord1, double _coord2, const std::string &_movetype, const std::string &_side)
 
const char * iifSetHotspotNode ()
 
void iifSetHotspotInit (double __offx, double __offy)
 
const char * iifSetNonSiderealNode ()
 
void iifSetNonSiderealInit (const lbto::nonsidereal &_target, bool _override)
 
const char * iifSetOffset2Node ()
 
void iifSetOffset2Init (double _coord1, double _coord2, const std::string &_system, const std::string &_movetype)
 
const char * iifSetParameterNode ()
 
void iifSetParameterInit (const lbto::SeqDD &_list)
 
const char * iifSetPMTerm2Node ()
 
void iifSetPMTerm2Init (const std::string &__name, double _value, const std::string &_movetype, const std::string &_side)
 
const char * iifSetReference2Node ()
 
void iifSetReference2Init (const lbto::SeqPos2 &_list)
 
const char * iifSetStars2Node ()
 
void iifSetStars2Init (const lbto::SeqPos2 &_list)
 
const char * iifSetTargetNode ()
 
void iifSetTargetInit (double _coord1, double _coord2, const std::string &_coordsys, double _epoch, float _wl)
 
const char * iifStandbyNode ()
 
void iifStandbyInit (int _level, const std::string &_side)
 
const char * iifStartAONode ()
 
void iifStartAOInit (const std::string &_side)
 
const char * iifStepFocusNode ()
 
void iifStepFocusInit (double _relpos, const std::string &_ope, const std::string &_side)
 
const char * iifStopAONode ()
 
void iifStopAOInit (const std::string &_reason, const std::string &_side)
 
const char * iifTipTiltNode ()
 
void iifTipTiltInit (double _xrot, double _yrot, const std::string &_ope, const std::string &_side)
 
const char * iifUpdateNonSiderealTargetNode ()
 
void iifUpdateNonSiderealTargetInit (double _rarate, double _decrate)
 
const char * iifUpdatePointingReferenceNode ()
 
void iifUpdatePointingReferenceInit (const std::string &_offset_coord, const std::string &_side)
 
const char * iifUpdateTargetWavelengthNode ()
 
void iifUpdateTargetWavelengthInit (float _wavelength, const std::string &_side)
 
virtual void work ()
 
const char * isReachableNode ()
 
const char * enableOffsetGuidingNode ()
 
void enableOffsetGuidingInit (bool _enable)
 
const char * getRANode ()
 
const char * getDECNode ()
 
const char * getParallacticAngleNode ()
 
const char * getUTCNode ()
 
const char * getLSTNode ()
 
const char * getHourAngleNode ()
 
const char * getAltNode ()
 
const char * getAzNode ()
 
const char * getEpochNode ()
 
const char * getRAradiansNode ()
 
const char * getDECradiansNode ()
 
const char * setOffsetGuidingNode ()
 
void setOffsetGuidingInit (double _offx, double _offy, const std::string &__coordsys, const std::string &__side)
 
const char * setOffsetPointingNode ()
 
void setOffsetPointingInit (double _offx, double _offy, const std::string &__coordsys, const std::string &__move_type, const std::string &__side)
 
const char * getRotatorPolynomialsNode ()
 
void getRotatorPolynomialsInit (double __starttime, int __count, double __interval, int __order, const std::string &__side)
 
const char * getKFPCoordinatesNode ()
 
void getKFPCoordinatesInit (const std::string &__side)
 
const char * getPresetStarsNode ()
 
const char * getLINCstationNode ()
 
const char * isSlewingNode ()
 
const char * getFitsNode ()
 
void getFitsInit (const double &__pixscal)
 
const char * setPresetTelescopeNode ()
 
void setPresetTelescopeInit (int __rah, int __ramin, double __rasec, int __decdeg, int __decmin, double __decsec)
 
const char * setPresetTelescopeCatNode ()
 
void setPresetTelescopeCatInit (const lbto::SeqPos2 &_stars)
 
const char * iifAcquireRefAONode ()
 
void iifAcquireRefAOInit (bool _repointflag, const std::string &_side)
 
const char * iifAuthorizeNode ()
 
const char * iifBinocularControlNode ()
 
void iifBinocularControlInit (const std::string &_flag)
 
const char * iifCheckRefAONode ()
 
void iifCheckRefAOInit (const std::string &_side)
 
const char * iifClearHotspotNode ()
 
const char * iifClearNonSiderealNode ()
 
void iifClearNonSiderealInit (bool _override)
 
const char * iifClearOffsetNode ()
 
const char * iifClearReferenceNode ()
 
const char * iifClearStarsNode ()
 
const char * iifCorrectModesAONode ()
 
void iifCorrectModesAOInit (const lbto::SeqModes &_modes, const std::string &_side)
 
const char * iifGetKFPCoordinates2Node ()
 
void iifGetKFPCoordinates2Init (const lbto::SeqPos2 &_list, const std::string &_side)
 
const char * iifGetParameterNode ()
 
void iifGetParameterInit (const lbto::SeqDD &__dd)
 
const char * iifGetRotatorPolynomialsNode ()
 
void iifGetRotatorPolynomialsInit (double _start, int _count, double _interval, int _order, const std::string &_side)
 
const char * iifGetRotatorTrajectoryNode ()
 
void iifGetRotatorTrajectoryInit (double _seconds, double _interval, double _start, const std::string &_side)
 
const char * iifLogEventNode ()
 
void iifLogEventInit (const std::string &_event, const std::string &_description)
 
const char * iifMaximizeWrapTimeNode ()
 
void iifMaximizeWrapTimeInit (bool _azflag, bool _rotflag, const std::string &_side)
 
const char * iifModifyAONode ()
 
void iifModifyAOInit (int _nmodes, double _freq, int _nbins, double _ttmod, const std::string &_f1spec, const std::string &_f2spec, const std::string &_side)
 
const char * iifMoveNode ()
 
void iifMoveInit (double _x, double _y, double _z, double _rx, double _ry, double _rz, int _dflag, const std::string &_movetype, const std::string &_ope, int _time, const std::string &_side)
 
const char * iifMoveFocusNode ()
 
void iifMoveFocusInit (double _abspos, const std::string &_ope, const std::string &_side)
 
const char * iifMoveXYNode ()
 
void iifMoveXYInit (double _xmov, double _ymov, const std::string &_ope, const std::string &_side)
 
const char * iifMoveXYZNode ()
 
void iifMoveXYZInit (double _xmov, double _ymov, double _zmov, const std::string &_side)
 
const char * iifOffsetGuidingNode ()
 
void iifOffsetGuidingInit (double _angle, double _offx, double _offy, const std::string &__coordsys, const std::string &_side)
 
const char * iifOffsetPointing2Node ()
 
void iifOffsetPointing2Init (double __rotangle, double __offx, double __offy, const std::string &__coordsys, const std::string &__movetype, const std::string &__side)
 
const char * iifOffsetXYAONode ()
 
void iifOffsetXYAOInit (double _deltax, double _deltay, const std::string &_side)
 
const char * iifOffsetZAONode ()
 
void iifOffsetZAOInit (double _deltaz, const std::string &_side)
 
const char * iifPauseAONode ()
 
void iifPauseAOInit (const std::string &_side)
 
const char * iifPauseGuidingNode ()
 
void iifPauseGuidingInit (const std::string &_side)
 
const char * iifPresetAONode ()
 
void iifPresetAOInit (const std::string &_aomode, const std::string &_side)
 
const char * iifPresetFlatAONode ()
 
void iifPresetFlatAOInit (const std::string &_flat, const std::string &_side)
 
const char * iifPresetTelescopeNode ()
 
void iifPresetTelescopeInit (double _rotangle, const std::string &_rotmode, const std::string &_mode, const std::string &_side)
 
const char * iifRefineAONode ()
 
void iifRefineAOInit (const std::string &_method, const std::string &_side)
 
const char * iifRemoveNode ()
 
const char * iifResumeAONode ()
 
void iifResumeAOInit (const std::string &_side)
 
const char * iifResumeGuidingNode ()
 
void iifResumeGuidingInit (const std::string &_side)
 
const char * iifRotateCommonNode ()
 
void iifRotateCommonInit (double _z, double _angle, double _direction, const std::string &_side)
 
const char * iifRotatePrimaryNode ()
 
void iifRotatePrimaryInit (double _distance, double _angle, double _direction, const std::string &_side)
 
const char * iifRotateZNode ()
 
void iifRotateZInit (double _angle, const std::string &_movetype, const std::string &_side)
 
const char * iifRotHoldNode ()
 
void iifRotHoldInit (const std::string &_side)
 
const char * iifRotReadyNode ()
 
void iifRotReadyInit (bool _enable, const std::string &_side)
 
const char * iifRotServicePositionNode ()
 
void iifRotServicePositionInit (double _angle, const std::string &_side)
 
const char * iifRotTrackNode ()
 
void iifRotTrackInit (const std::string &_side)
 
const char * iifRunAONode ()
 
void iifRunAOInit (const std::string &_repointflag, const std::string &_side)
 
const char * iifSendWavefrontNode ()
 
void iifSendWavefrontInit (const lbto::SeqWF &_wfs, const std::string &_ope, const std::string &_side)
 
const char * iifSetAGWFilterNode ()
 
void iifSetAGWFilterInit (int _filternumber, const std::string &_side)
 
const char * iifSetGuidingBinningNode ()
 
void iifSetGuidingBinningInit (int _factor, const std::string &_side)
 
const char * iifSetGuidingHotspotNode ()
 
void iifSetGuidingHotspotInit (double _coord1, double _coord2, const std::string &_movetype, const std::string &_side)
 
const char * iifSetHotspotNode ()
 
void iifSetHotspotInit (double __offx, double __offy)
 
const char * iifSetNonSiderealNode ()
 
void iifSetNonSiderealInit (const lbto::nonsidereal &_target, bool _override)
 
const char * iifSetOffset2Node ()
 
void iifSetOffset2Init (double _coord1, double _coord2, const std::string &_system, const std::string &_movetype)
 
const char * iifSetParameterNode ()
 
void iifSetParameterInit (const lbto::SeqDD &_list)
 
const char * iifSetPMTerm2Node ()
 
void iifSetPMTerm2Init (const std::string &__name, double _value, const std::string &_movetype, const std::string &_side)
 
const char * iifSetReference2Node ()
 
void iifSetReference2Init (const lbto::SeqPos2 &_list)
 
const char * iifSetStars2Node ()
 
void iifSetStars2Init (const lbto::SeqPos2 &_list)
 
const char * iifSetTargetNode ()
 
void iifSetTargetInit (double _coord1, double _coord2, const std::string &_coordsys, double _epoch, float _wl)
 
const char * iifStandbyNode ()
 
void iifStandbyInit (int _level, const std::string &_side)
 
const char * iifStartAONode ()
 
void iifStartAOInit (const std::string &_side)
 
const char * iifStepFocusNode ()
 
void iifStepFocusInit (double _relpos, const std::string &_ope, const std::string &_side)
 
const char * iifStopAONode ()
 
void iifStopAOInit (const std::string &_reason, const std::string &_side)
 
const char * iifTipTiltNode ()
 
void iifTipTiltInit (double _xrot, double _yrot, const std::string &_ope, const std::string &_side)
 
const char * iifUpdateNonSiderealTargetNode ()
 
void iifUpdateNonSiderealTargetInit (double _rarate, double _decrate)
 
const char * iifUpdatePointingReferenceNode ()
 
void iifUpdatePointingReferenceInit (const std::string &_offset_coord, const std::string &_side)
 
const char * iifUpdateTargetWavelengthNode ()
 
void iifUpdateTargetWavelengthInit (float _wavelength, const std::string &_side)
 
virtual void work ()
 
- Protected Member Functions inherited from Basda::ServiceWorkerSkeleton
 ServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
 ServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
- Protected Member Functions inherited from Basda::ServiceWorker
 ServiceWorker (const Nice::JointPtr &_jointPtr)
 ctor More...
 
virtual ~ServiceWorker ()
 dtor Does nothing (in this base class) More...
 
void triggerState (const Basda::ServiceStateMachine &_state)
 change state to a new state More...
 
void sendStateStatus (const std::string &_action, int _percent)
 
void setState (Basda::ServiceState _next)
 
virtual void waitForNewState ()
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual void preinit ()
 
virtual void packin ()
 schedule ONLINE as the next target state. More...
 
virtual void terminate ()
 schedule EXIT as the next target state. More...
 
virtual void idleStandby ()
 wait for a state change. More...
 
 ServiceWorker (const Nice::JointPtr &_jointPtr)
 
virtual ~ServiceWorker ()
 
void triggerState (const Basda::ServiceStateMachine &_state)
 
void sendStateStatus (const std::string &_action, int _percent)
 
void setState (Basda::ServiceState _next)
 
virtual void waitForNewState ()
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual void preinit ()
 
virtual void packin ()
 
virtual void terminate ()
 
virtual void idleStandby ()
 

Private Member Functions

void logResults (const lbto::result _res, const std::string _cmd)
 generate a line in the log files More...
 
void status ()
 
void setReachable (bool _reachable)
 
virtual Nice::SeqSeqDouble getRotatorPolynomials (double _starttime, int _count, double _interval, int _order, const std::string &_side)
 This command returns a rotator trajectory for the future. More...
 
void initXml ()
 Read the XML configuration file to create a sequence of interesting keys. More...
 
void initDD (const Ltcs::IifSide station)
 Assembly of the list of dictionary entries. This fills the ddents[] and dd2keys[] vectors supposed the keys[] are already instantiated. More...
 
Ltcs::IifSide getAuthoriz ()
 Query the ICE interface for the sides on which we're authorized. The major difference versus the information in iifSidReg ist that the latter means that the instrument is assigned on one of the sides, but not necessarily authorized. More...
 

Private Attributes

Ice::CommunicatorPtr m_communicator
 
lbto::FactoryPrx m_factory
 
lbto::IIFServerPrx m_iif [2]
 
vector< int > dd2keys
 dd2keys[i] is the index in keys() associated with ddents[i]. More...
 

Additional Inherited Members

- Protected Types inherited from Basda::ServiceWorker
typedef void(ServiceWorker::* ServiceWorkerMemFn) ()
 
typedef Branch BranchTable[6][6]
 
typedef IceUtil::Handle< WorkerThreadWorkerThreadPtr
 
typedef void(ServiceWorker::* ServiceWorkerMemFn) ()
 
typedef Branch BranchTable[6][6]
 
typedef IceUtil::Handle< WorkerThreadWorkerThreadPtr
 
- Protected Attributes inherited from Basda::ServiceWorkerSkeleton
Nice::Completion m_completion
 
Nice::I64 m_id
 
Nice::PropertyPtr m_cmd
 
- Protected Attributes inherited from Basda::ServiceWorker
Nice::JointPtr m_config
 
Nice::PropertyPtr m_state
 
std::string m_name
 
- Static Protected Attributes inherited from Basda::ServiceWorker
static BranchTable s_stateTable
 A table which tells which state should go via which intermediate state to a target state. The 6 states are SHUTDOWN, OFFLINE, STANDBY, ONLINE, WORKING and ERROR. The principles are that. More...
 

Detailed Description

This class is the wrapper of the IIF interface.

Constructor & Destructor Documentation

◆ IifServiceWorker()

Ltcs::IifServiceWorker::IifServiceWorker ( const Nice::JointPtr _config)

ctor


Parameters
_configThe TAN configuration node.

◆ ~IifServiceWorker()

Ltcs::IifServiceWorker::~IifServiceWorker ( )
virtual

dtor. Closes the communicator.


Member Function Documentation

◆ abort()

virtual void Ltcs::IifServiceWorker::abort ( void  )
inlinevirtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.

◆ activate()

void Ltcs::IifServiceWorker::activate ( )
virtual

Implements Basda::ServiceWorker.

◆ deactivate()

void Ltcs::IifServiceWorker::deactivate ( )
virtual

Implements Basda::ServiceWorker.

◆ deinit()

void Ltcs::IifServiceWorker::deinit ( )
virtual

Implements Basda::ServiceWorker.

◆ enableOffsetGuiding()

bool Ltcs::IifServiceWorker::enableOffsetGuiding ( bool  enable)
virtual

◆ errorOffline()

void Ltcs::IifServiceWorker::errorOffline ( )
virtual

set the target state to OFFLINE.


Reimplemented from Basda::ServiceWorker.

◆ errorOnline()

void Ltcs::IifServiceWorker::errorOnline ( )
virtual

set the target state to OFFLINE.


Reimplemented from Basda::ServiceWorker.

◆ errorStandby()

void Ltcs::IifServiceWorker::errorStandby ( )
virtual

set the target state to OFFLINE.


Reimplemented from Basda::ServiceWorker.

◆ errorWorking()

void Ltcs::IifServiceWorker::errorWorking ( )
virtual

set the target state to OFFLINE.


Reimplemented from Basda::ServiceWorker.

◆ getAlt()

double Ltcs::IifServiceWorker::getAlt ( )
virtual

◆ getAny()

template<typename TTYPE >
std::string Ltcs::IifServiceWorker::getAny ( const char *  ddnam,
std::string  propnam,
const char *  lognam = 0 
)

retrieve a generic parameter from the IIF.


Parameters
ddnamAssociated name of the data dictionary
propnamThe Nice property name
lognamstring to be shown in the logs. No log is created if this is NULL.
Returns
the value of the IIF in the string format (as returned).
Since
2016-11-11
Author
R. J. Mathar

◆ getAuthoriz()

Ltcs::IifSide Ltcs::IifServiceWorker::getAuthoriz ( )
private

Query the ICE interface for the sides on which we're authorized. The major difference versus the information in iifSidReg ist that the latter means that the instrument is assigned on one of the sides, but not necessarily authorized.


Returns
SIDE_NONE, SIDE_LEFT, SIDE_RIGHT or SIDE_BOTH indicating on which side the instrument is authorized.
Since
2018-06-29
Author
Richard J. Mathar

◆ getAz()

double Ltcs::IifServiceWorker::getAz ( )
virtual

◆ getDEC()

std::string Ltcs::IifServiceWorker::getDEC ( )
virtual

read the declination from the IIF ICE interface.


Returns
A string of the +-DD:MM.SS.ssss format.
Since
2016-11-11 forwarded bo getAny<std::string>(...)

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getDECradians()

double Ltcs::IifServiceWorker::getDECradians ( )
virtual

read the declination from the IIF interface.


Returns
the value in radians.
Since
2016-11-11
Author
R. J. Mathar

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getDouble()

double Ltcs::IifServiceWorker::getDouble ( const std::string &  ddnam,
const std::string &  lognam 
)
virtual

◆ getEpoch()

double Ltcs::IifServiceWorker::getEpoch ( )
virtual

◆ getFits()

Basda::VinoFitsCardBox Ltcs::IifServiceWorker::getFits ( const double &  _pixscal = 0)
virtual

◆ getFitsWithWcs()

Basda::VinoFitsCardBox Ltcs::IifServiceWorker::getFitsWithWcs ( const double  pixsc = 0.,
const double  ctrpx[] = 0,
const double  wcsAng = std::numeric_limits<double>::quiet_NaN() 
)
protected

◆ getHourAngle()

std::string Ltcs::IifServiceWorker::getHourAngle ( )
virtual

read the hour angle from the IIF interface.


Since
2016-11-11 Forwarded to getAny<std::string>(...)

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getKFPCoordinates()

Nice::SeqPoint Ltcs::IifServiceWorker::getKFPCoordinates ( const std::string &  _side)
virtual

◆ getLINCstation()

std::string Ltcs::IifServiceWorker::getLINCstation ( )
virtual

Figure out whether our instrument is on the L or R side or not on any.

Returns
"none", "left", "right" or "both" depending on whether this is not a {LR}_Instrument, Left or Right or both. This reflects the online (current) TO setting within the dictionary, not the TaN configuration or authorization!
Since
2016-10-13

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getLST()

std::string Ltcs::IifServiceWorker::getLST ( )
virtual

read the local siderial time from the IIF interface.


Returns
A string in the HH:MM:SS.sss format.
Since
2016-11-11 Forwarded to getAny<std::string>(...)

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getObject()

std::string Ltcs::IifServiceWorker::getObject ( )
virtual

Generate an OBJECT string from pointing coordinates.


Since
2017-11-28
Author
Richard J. Mathar

◆ getParallacticAngle()

double Ltcs::IifServiceWorker::getParallacticAngle ( )
virtual

◆ getParam()

void Ltcs::IifServiceWorker::getParam ( )
virtual

obtain parameters information from the IIF interface. This also updates the iifSidReg parameter, the current assignment by the telescope interface (TO).


Since
2016-10-12
Author
Richard J. Mathar

Split the full set of dictionary entries into chunks because it appears that there is some undocumented upper limit in the number of keywords handeled by the GetParameter() function at a time.

◆ getPresetStars()

lbto::SeqPos2 Ltcs::IifServiceWorker::getPresetStars ( )
virtual

◆ getRA()

std::string Ltcs::IifServiceWorker::getRA ( )
virtual

Obtain the RA from the iif interface.


Returns
a string of the "HH:MM:SS.sss" format.

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getRAradians()

double Ltcs::IifServiceWorker::getRAradians ( )
virtual

read the right ascension from the IIF interface.


Returns
the value in radians.
Since
2016-11-11
Author
R. J. Mathar

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getRotatorPolynomials() [1/2]

Nice::SeqSeqDouble Ltcs::IifServiceWorker::getRotatorPolynomials ( double  _starttime,
int  _count,
double  _interval,
int  _order,
const std::string &  _side 
)
privatevirtual

This command returns a rotator trajectory for the future.

This is essentially (up to sign and offset) a parallactic angle predicted by the PCS.

Parameters
_startimethe start time in UTC scale and in MJD format
_countthe number of polynomials wanted
_intervalthe time interval between polynomials in [seconds]
_orderthe polynomial order in the range 0, 1 or 2.
_sidethe command side. possible values: "left", "right", "both"
Returns
rotator polynomial

The command returns an ORDER+2 array of t0, p, [v, [a/2]] values for each polynomial requested in the result strings. v is returned if the order is greater than 0, and a/2 is returned if the order is greater than 1. t0 is in MJD days UT, p is in radians, v is in radians/sec, and a is in radians/sec^2. Thus the position of the rotator at time t is P(t)=p + v*(t-t0)v+ (a/2)*(t-t0)^2. Where (t-t0) is in seconds. Note that a/2, the polynomial coefficient (not a, the second derivative) is returned by the command.

Implements Ltcs::IifServiceWorkerSkeleton.

◆ getRotatorPolynomials() [2/2]

Nice::SeqSeqDouble Ltcs::IifServiceWorker::getRotatorPolynomials ( Nice::Date  _startTime)
virtual

◆ getUTC()

std::string Ltcs::IifServiceWorker::getUTC ( )
virtual

read the univeral time coordinated from the IIF interface.


Returns
a string of the "HH:mm:ss.ssss" format
Since
2016-11-11 Forwarded to getAny<std::string>(...)
Warning
In the TCS simulation on linc2.mpia.de the value may be off by 1 minute (NTP synchronized?)

Implements Ltcs::IifServiceWorkerSkeleton.

◆ hexToDeg()

double Ltcs::IifServiceWorker::hexToDeg ( const std::string &  hdms)
static

Parameters
hdmsa string of the form HH:MM::ss[.sss] or [+-]DD:MM:ss[.sss]

The two colons are mandatory. The sign in front of the second format is mandatory. There must be no sign in front of the first format. Re-implements Nice::DMS::fromString() .

Returns
the value converted from hours or degrees to degrees.
Since
2016-12-14

◆ idleOffline()

void Ltcs::IifServiceWorker::idleOffline ( )
virtual

wait for a state change.


Reimplemented from Basda::ServiceWorker.

◆ idleOnline()

void Ltcs::IifServiceWorker::idleOnline ( )
virtual

wait for a state change.


Reimplemented from Basda::ServiceWorker.

◆ iifAcquireRefAO()

lbto::result Ltcs::IifServiceWorker::iifAcquireRefAO ( bool  repointFlag,
const std::string &  side 
)
virtual

Acquire the reference star.

Parameters
repointFlagflag to request the telescope to repoint.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifAuthorize()

lbto::result Ltcs::IifServiceWorker::iifAuthorize ( )
virtual

Check authorization to control the telescope.

Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifBinocularControl()

lbto::result Ltcs::IifServiceWorker::iifBinocularControl ( const std::string &  flag)
virtual

BinocularControl clears the target information in the PCS.

Parameters
flagPreset control flag: CLEARPRESET, SYNCPRESET, SYNCOFFSET, ADJUSTBALANCE.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifCheckRefAO()

lbto::result Ltcs::IifServiceWorker::iifCheckRefAO ( const std::string &  side)
virtual

Check the reference star position.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifClearHotspot()

lbto::result Ltcs::IifServiceWorker::iifClearHotspot ( )
virtual

Removes the hotspot from the system.

Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifClearNonSidereal()

lbto::result Ltcs::IifServiceWorker::iifClearNonSidereal ( bool  override)
virtual

Removes the non-sidereal object from the system.

Parameters
overridenon-sidereal override flag
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifClearOffset()

lbto::result Ltcs::IifServiceWorker::iifClearOffset ( )
virtual

Removes the offset from the system.

Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifClearReference()

lbto::result Ltcs::IifServiceWorker::iifClearReference ( )
virtual

Removes the AO reference star from the system.

Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifClearStars()

lbto::result Ltcs::IifServiceWorker::iifClearStars ( )
virtual

Removes the selected target and guide stars from the system.

Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifCorrectModesAO()

lbto::result Ltcs::IifServiceWorker::iifCorrectModesAO ( const lbto::SeqModes modes,
const std::string &  side 
)
virtual

Send 672 mode corrections to AO.

Parameters
modesmodes list
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifGetKFPCoordinates()

lbto::result Ltcs::IifServiceWorker::iifGetKFPCoordinates ( const lbto::SeqPos list,
const std::string &  side 
)
virtual

Use this command to get focal plane positions for LN AO reference objects.

Parameters
listthe list of stars.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

◆ iifGetKFPCoordinates2()

lbto::result Ltcs::IifServiceWorker::iifGetKFPCoordinates2 ( const lbto::SeqPos2 list,
const std::string &  side 
)
virtual

Use this command to get focal plane positions for LN AO reference objects.

Parameters
listthe list of stars.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifGetParameter()

lbto::result Ltcs::IifServiceWorker::iifGetParameter ( const lbto::SeqDD _dd)
virtual

Reads a block of entries from the data dictionary in one shot.

If FITS information is defined here, it will be included in the FITS headers (only used by the IRTC client).

Parameters
listDD entry list
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifGetRotatorPolynomials()

lbto::result Ltcs::IifServiceWorker::iifGetRotatorPolynomials ( double  start,
int  count,
double  interval,
int  order,
const std::string &  side 
)
virtual

Use this command to get rotator polynomials.

Parameters
startthe start time in MJD (UT days)
countthe number of points in the trajectory
intervalthe time between points (seconds)
orderthe desired polynomial order (0,1,2)
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27
2018-12-18 If not authorized create mockup polynomials.
Todo:
get a realistic local sidereal time via sofa
Parameters
startthe start time in MJD (UT days)
countthe number of points in the trajectory
intervalthe time between points (seconds)
orderthe desired polynomial order (0,1,2)
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27
Todo:
get a realistic local sidereal time via sofa

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifGetRotatorTrajectory()

lbto::result Ltcs::IifServiceWorker::iifGetRotatorTrajectory ( double  seconds,
double  interval,
double  start,
const std::string &  side 
)
virtual

Use this command to get the rotator trajectory for the LBC.

Parameters
secondsthe number of seconds in the trajectory
intervalthe time between points
startthe start time in MJD
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifLogEvent()

lbto::result Ltcs::IifServiceWorker::iifLogEvent ( const std::string &  event,
const std::string &  description 
)
virtual

Use this command to log a message inside the TCS's logging system.

Parameters
eventan event name that the instrument desires to log
descriptionthe descriptive text that the instrument desires to log
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifMaximizeWrapTime()

lbto::result Ltcs::IifServiceWorker::iifMaximizeWrapTime ( bool  azflag,
bool  rotflag,
const std::string &  side 
)
virtual

This command is to provide some control over the use of the rotator cablewrap.

Parameters
azflagflag to control AZ wrap.
rotflagflag to control rotator wrap.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifModifyAO()

lbto::result Ltcs::IifServiceWorker::iifModifyAO ( int  NModes,
double  Freq,
int  Nbins,
double  TTmod,
const std::string &  F1spec,
const std::string &  F2spec,
const std::string &  side 
)
virtual

Modify AO.

Parameters
NModesthe number of corrected modes.
Freqthe CCD integration frequency.
Nbinsthe CCD binning.
TTModTip-Tilt internal mirror modulation.
F1specthe selected position of filter wheel #1.
F2specthe selected position of filter wheel #2.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifMove()

lbto::result Ltcs::IifServiceWorker::iifMove ( double  x,
double  y,
double  z,
double  rx,
double  ry,
double  rz,
int  dflag,
const std::string &  movetype,
const std::string &  ope,
int  time,
const std::string &  side 
)
virtual

This command combines the functionality of MoveXY, TipTilt, StepFocus and MoveFocus.

Parameters
xmovement in x [millimeter]
ymovement in y [millimeter]
zmovement in z [millimeter]
rxrotation in x [microradian]
ryrotation in y [microradian]
rzrotation in z [microradian]
dflag6 bits with a bit for each of the preceding 6 variables. Bit 0 enables X, bit 1 enables Y, bit 2 enables Z, and so on.
movetypemovement type: ABS, REL
opeOptical element: DEFAULT, M1, M2, M3, M1M2, M1M3, M2M3, M1M2M3
timelookahead time for the collimation correction [sec]
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifMoveFocus()

lbto::result Ltcs::IifServiceWorker::iifMoveFocus ( double  absPos,
const std::string &  ope,
const std::string &  side 
)
virtual

Moves an OPE to a new absolute position z to adjust or to define a new focus position.

Parameters
absPosdistance to move the OPE [millimeter]
opeOptical element : M1 or M2 or M3 or M1M2
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifMoveXY()

lbto::result Ltcs::IifServiceWorker::iifMoveXY ( double  xmov,
double  ymov,
const std::string &  ope,
const std::string &  side 
)
virtual

MoveXY moves an OPE in X or Y direction, relative to the current position.

Parameters
xmovmovement in x [millimeter]
ymovmovement in y [millimeter]
opeOptical element: M1 or M2
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifMoveXYZ()

lbto::result Ltcs::IifServiceWorker::iifMoveXYZ ( double  xmov,
double  ymov,
double  zmov,
const std::string &  side 
)
virtual

MoveXYZ moves the primary and secondary together in X, Y and Z direction.

Parameters
xmovmovement in x [millimeter]
ymovmovement in y [millimeter]
zmovmovement in z [millimeter]
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifOffsetGuiding()

lbto::result Ltcs::IifServiceWorker::iifOffsetGuiding ( double  angle,
double  offx,
double  offy,
const std::string &  _coordsys,
const std::string &  side 
)
virtual

OffsetGuiding moves the telescope a small distance without changing.

the value of the pointing coordinates.

Parameters
rotangleRotator angle [radian]
offxOffset in X [radian/pixels]
offyOffset in Y [radian/pixels]
_coordsysCoordinate system: RADEC, AZALT, DETXY, GALACTIC
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifOffsetPointing()

lbto::result Ltcs::IifServiceWorker::iifOffsetPointing ( double  _rotangle,
double  _offx,
double  _offy,
const std::string &  _coordsys,
const std::string &  _ope,
const std::string &  _np,
const std::string &  _movetype,
const std::string &  _side 
)
virtual

OffsetPointing moves the telescope a small distance, setting the value.

of the telescope pointing coordinates to the new position.

Parameters
rotangleRotator angle in the range -2*pi to 2*pi [radian]
offxOffset in X [radian or seconds]
offyOffset in Y [radian]
coordsysCoordinate system: RADEC, AZALT, DETXY, GALACTIC
opeOptical element : DEFAULT, M1, M2, M3, HEXAPOD, MOUNT This is a dummy parameter which will be ignored.
npNew position flag. This is a dummy parameter which will be ignored.
movetypemovement type to apply: "REL" or "ABS" meaning Relative / Absolute. A "CS" can be appended for RADEC or GALACTIC to indicate a coordinate system offset.
sidethe telescope side this command applies to. "left" or "right" or "both"
Returns
Result object.
Since
2017-05-27

◆ iifOffsetPointing2()

lbto::result Ltcs::IifServiceWorker::iifOffsetPointing2 ( double  _rotangle,
double  _offx,
double  _offy,
const std::string &  _coordsys,
const std::string &  _movetype,
const std::string &  _side 
)
virtual

OffsetPointing moves the telescope a small distance, setting the value.

of the telescope pointing coordinates to the new position.

Parameters
_rotangleRotator offset [radian]
_offxOffset in X [radians or seconds]
_offyOffset in Y [radian]
_coordsysCoordinate system: RADEC, AZALT, DETXY, GALACTIC
_movetypemovement type to apply: "REL", "RELCS", "ABS", "ABSCS"
_sidethe side this command applies to. "left" "right" or "both".
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifOffsetXYAO()

lbto::result Ltcs::IifServiceWorker::iifOffsetXYAO ( double  DeltaX,
double  DeltaY,
const std::string &  side 
)
virtual

OffsetXY AO.

Parameters
DeltaXthe X offset.
DeltaYthe Y offset.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifOffsetZAO()

lbto::result Ltcs::IifServiceWorker::iifOffsetZAO ( double  DeltaZ,
const std::string &  side 
)
virtual

OffsetZ AO.

Parameters
DeltaZthe Z offset.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifPauseAO()

lbto::result Ltcs::IifServiceWorker::iifPauseAO ( const std::string &  side)
virtual

Temporarily suspends the current AO operation.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifPauseGuiding()

lbto::result Ltcs::IifServiceWorker::iifPauseGuiding ( const std::string &  side)
virtual

Temporarily suspends the current guiding operation.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifPresetAO()

lbto::result Ltcs::IifServiceWorker::iifPresetAO ( const std::string &  AOMode,
const std::string &  side 
)
virtual

Preset AO.

Parameters
AOModethe AO operatin mode.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifPresetFlatAO()

lbto::result Ltcs::IifServiceWorker::iifPresetFlatAO ( const std::string &  flat,
const std::string &  side 
)
virtual

Request flat shape for AO.

Parameters
flatthe flat name.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifPresetTelescope()

lbto::result Ltcs::IifServiceWorker::iifPresetTelescope ( double  rotangle,
const std::string &  rotmode,
const std::string &  mode,
const std::string &  side 
)
virtual

PresetTelescope slew the telescope into position in order to begin an observation cycle.

Parameters
rotangleinitial rotator angle [radian]
rotmoderotator mode: POSITION, PARALLACTIC, NATIVE, GRAVITATIONAL, IDLE.
modeOperation mode: STATIC, TRACK, ACQUIRE, GUIDE, ADAPTIVE, ACTIVE, INTERFEROMETRIC.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRefineAO()

lbto::result Ltcs::IifServiceWorker::iifRefineAO ( const std::string &  method,
const std::string &  side 
)
virtual

Refine AO.

Parameters
methodthe method used for refinement.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRemove()

void Ltcs::IifServiceWorker::iifRemove ( )
virtual

remove the IIF object

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifResumeAO()

lbto::result Ltcs::IifServiceWorker::iifResumeAO ( const std::string &  side)
virtual

Resumes suspended operation after a PauseAO.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifResumeGuiding()

lbto::result Ltcs::IifServiceWorker::iifResumeGuiding ( const std::string &  side)
virtual

Resumes suspended guiding operation.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRotateCommon()

lbto::result Ltcs::IifServiceWorker::iifRotateCommon ( double  z,
double  angle,
double  direction,
const std::string &  side 
)
virtual

Rotates the primary and the secondary mirror around a common point.

Parameters
zrotation point [millimeter]
anglerotation angle [radian]
directiondirection angle [radian]
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRotatePrimary()

lbto::result Ltcs::IifServiceWorker::iifRotatePrimary ( double  distance,
double  angle,
double  direction,
const std::string &  side 
)
virtual

Use this command to to rotate the primary about a point on axis.

Parameters
distancethe distance above the mirror about which to rotate
anglethe rotation angle
directionthe direction in shich to rotate
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRotateZ()

lbto::result Ltcs::IifServiceWorker::iifRotateZ ( double  angle,
const std::string &  movetype,
const std::string &  side 
)
virtual

the tertiary mirror is rotated to adjust the incoming beam angle for the instrument.

Parameters
anglerotation angle [radian]
movetypemovement type: ABS, REL
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRotHold()

lbto::result Ltcs::IifServiceWorker::iifRotHold ( const std::string &  side)
virtual

If the rotator is tracking or slewing, this command makes it stop moving and hold the position.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRotReady()

lbto::result Ltcs::IifServiceWorker::iifRotReady ( bool  enable,
const std::string &  side 
)
virtual

Readies the cable wrap and rotator.

Parameters
enableflag to ready/unready the rotator.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRotServicePosition()

lbto::result Ltcs::IifServiceWorker::iifRotServicePosition ( double  angle,
const std::string &  side 
)
virtual

Makes the rotator move to the specified angle in the specified coordinate frame and hold at that position.

Parameters
angle[radian]
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRotTrack()

lbto::result Ltcs::IifServiceWorker::iifRotTrack ( const std::string &  side)
virtual

Makes rotator begin tracking according to the polynomial stream it is currently receiving from the PCS.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifRunAO()

lbto::result Ltcs::IifServiceWorker::iifRunAO ( const std::string &  repointFlag,
const std::string &  side 
)
virtual

Do AcquireRefAO, StartAO.

Parameters
repointFlagflag to request the telescope to repoint in AcquireRefAO.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSendWavefront()

lbto::result Ltcs::IifServiceWorker::iifSendWavefront ( const lbto::SeqWF wfs,
const std::string &  OPE,
const std::string &  side 
)
virtual

Sends an array of 28 Zernike polynomial coefficients to be compensated by the actuators.

of the primary or secondary mirror.

Parameters
wfscoefficients list
OPEOptical element: M1, M2
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetAGWFilter()

lbto::result Ltcs::IifServiceWorker::iifSetAGWFilter ( int  filterNumber,
const std::string &  side 
)
virtual

Use this command to set the AGw filter.

Parameters
filterNumberthe number of the filter.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetGuidingBinning()

lbto::result Ltcs::IifServiceWorker::iifSetGuidingBinning ( int  factor,
const std::string &  side 
)
virtual

Use this command to set the AGw filter.

Parameters
factor
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetGuidingHotspot()

lbto::result Ltcs::IifServiceWorker::iifSetGuidingHotspot ( double  coord1,
double  coord2,
const std::string &  movetype,
const std::string &  side 
)
virtual

Sets guider hotspot.

Parameters
coord1coordinate x [pixel].
coord2coordinate y [pixel].
movetypethe move type, REL or ABS.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetHotspot()

lbto::result Ltcs::IifServiceWorker::iifSetHotspot ( double  _offx,
double  _offy 
)
virtual

Set the hotspot coordinates to be used by PresetTelescope command.

Parameters
coord1Coordinate x [pixel]
coord2Coordinate y [pixel]
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetNonSidereal()

lbto::result Ltcs::IifServiceWorker::iifSetNonSidereal ( const lbto::nonsidereal target,
bool  override 
)
virtual

Set the non-sidereal values to be used by PresetTelescope.

Parameters
targetnon-sidereal target
overridenon-sidereal override flag
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetOffset()

lbto::result Ltcs::IifServiceWorker::iifSetOffset ( double  _offx,
double  _offy,
const std::string &  _coordsys 
)
virtual

Set the offset coordinates to be used by PresetTelescope.

Parameters
_offxCoordinate x [radian/pixel]
_offyCoordinate y [radian/pixel]
_coordsysCoordinate system: RADEC, AZALT, DETXY, GALACTIC.
Returns
Result object.
Since
2017-05-27

◆ iifSetOffset2()

lbto::result Ltcs::IifServiceWorker::iifSetOffset2 ( double  coord1,
double  coord2,
const std::string &  system,
const std::string &  movetype 
)
virtual

Set the offset coordinates to be used by PresetTelescope.

Parameters
coord1Coordinate x [radian/pixel]
coord2Coordinate y [radian/pixel]
systemCoordinate system: RADEC, AZALT, DETXY, GALACTIC.
movetype
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetParameter()

lbto::result Ltcs::IifServiceWorker::iifSetParameter ( const lbto::SeqDD list)
virtual

Sets the values of the specified data dictionary entries on the TCS in one shot.

Parameters
listDD entry list with entry-value pairs
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetPMTerm()

lbto::result Ltcs::IifServiceWorker::iifSetPMTerm ( const std::string &  _name,
double  value,
const std::string &  side 
)
virtual

SetPMTerm sets a singel term in the pointing model.

Parameters
_namename of term (only "CA" and "IE" are allowed)
valuevalue of term
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

◆ iifSetPMTerm2()

lbto::result Ltcs::IifServiceWorker::iifSetPMTerm2 ( const std::string &  _name,
double  value,
const std::string &  movetype,
const std::string &  side 
)
virtual

SetPMTerm sets a singel term in the pointing model.

Parameters
_namename of term (only "CA" and "IE" are allowed)
valuevalue of term
movetype
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetReference()

lbto::result Ltcs::IifServiceWorker::iifSetReference ( const lbto::SeqPos list)
virtual

Sets the AO reference star.

Parameters
listList of objects.
Returns
Result object
Since
2017-05-27

◆ iifSetReference2()

lbto::result Ltcs::IifServiceWorker::iifSetReference2 ( const lbto::SeqPos2 list)
virtual

Sets the AO reference star.

Parameters
listList of objects.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetStars()

lbto::result Ltcs::IifServiceWorker::iifSetStars ( const lbto::SeqPos _stars)
virtual

Sets the target, and eventually, the guide stars.

(first element on the list is used as target)

Parameters
listList of objects.
Returns
Result object
Since
2017-05-27

◆ iifSetStars2()

lbto::result Ltcs::IifServiceWorker::iifSetStars2 ( const lbto::SeqPos2 list)
virtual

Sets the target, and eventually, the guide stars.

(first element on the list is used as target)

Parameters
listList of objects.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifSetTarget()

lbto::result Ltcs::IifServiceWorker::iifSetTarget ( double  coord1,
double  coord2,
const std::string &  coordsys,
double  epoch,
float  wl 
)
virtual

Set the target information to be used by PresetTelescope.

Parameters
coord1Coordinate x [radian]
coord2Coordinate y [radian]
coordsysCoordinate system: RADEC, AZALT, GALACTIC
epoch
wlTarget wavelength
Returns
Result object.
Since
2017-05-27
Deprecated:
use iifSetStars2 instead
Parameters
coord1Coordinate x [radian]
coord2Coordinate y [radian]
coordsysCoordinate system: RADEC, AZALT, GALACTIC
epoch
wlTarget wavelength
Returns
Result object.
Since
2017-05-27
Deprecated:
use iifSetStars2 instead

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifStandby()

lbto::result Ltcs::IifServiceWorker::iifStandby ( int  level,
const std::string &  side 
)
virtual

Use this command to set the standby level.

Parameters
levelthe standby level
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifStartAO()

lbto::result Ltcs::IifServiceWorker::iifStartAO ( const std::string &  side)
virtual

Start AO operation.

Parameters
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifStepFocus()

lbto::result Ltcs::IifServiceWorker::iifStepFocus ( double  relPos,
const std::string &  ope,
const std::string &  side 
)
virtual

StepFocus moves the respective focus position, by moving the OPE.

a given distance in the direction of of the telescope's Z axis.

Parameters
relPosdistance to move the OPE [millimeter]
opeOptical element : M1 or M2 or M3 or M1M2
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifStopAO()

lbto::result Ltcs::IifServiceWorker::iifStopAO ( const std::string &  reason,
const std::string &  side 
)
virtual

Stop AO operation.

Parameters
reasonthe reason for stopping.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifTipTilt()

lbto::result Ltcs::IifServiceWorker::iifTipTilt ( double  xrot,
double  yrot,
const std::string &  ope,
const std::string &  side 
)
virtual

TipTilt moves an OPE in tip or tilt direction, relative to the current position.

Parameters
xrotrotation in x [microradian]
yrotrotation in y [microradian]
opeOptical element: M1 or M2 or M3
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifUpdateNonSiderealTarget()

lbto::result Ltcs::IifServiceWorker::iifUpdateNonSiderealTarget ( double  RArate,
double  DECrate 
)
virtual

Update the non-sidereal values.

Parameters
RAratethe new RArate
DECratethe new DECrate
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifUpdatePointingReference()

lbto::result Ltcs::IifServiceWorker::iifUpdatePointingReference ( const std::string &  offset_coord,
const std::string &  side 
)
virtual

This command allows the user to use the current sky or focal plane location achieved via the.

OffsetPointing command and update the previous values; To be used in conjunction with the OffsetPointing cmd.

Parameters
offset_coordthe offset coordinate system.
sidethe side this command applies to.
Returns
Result object
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ iifUpdateTargetWavelength()

lbto::result Ltcs::IifServiceWorker::iifUpdateTargetWavelength ( float  wavelength,
const std::string &  side 
)
virtual

Updates the target effective wavelength without issuing a new preset.

Parameters
wavelengthnew target wavelength. Range is [0.3, 15.0] [microns]
sidethe side this command applies to.
Returns
Result object.
Since
2017-05-27

Implements Ltcs::IifServiceWorkerSkeleton.

◆ init()

void Ltcs::IifServiceWorker::init ( )
virtual

Initialize property tree. Create a proxy for the given instrument and focal station according to the configured standards.


Implements Basda::ServiceWorker.

◆ initDD()

void Ltcs::IifServiceWorker::initDD ( const Ltcs::IifSide  station)
private

Assembly of the list of dictionary entries. This fills the ddents[] and dd2keys[] vectors supposed the keys[] are already instantiated.


Parameters
station0=None, 1=left, 2= right, 3=both This acts like a filter on whether the L_ or R_ entries are considered.
Since
2014-03-24
Author
Richard J. Mathar

◆ initXml()

void Ltcs::IifServiceWorker::initXml ( )
private

Read the XML configuration file to create a sequence of interesting keys.


For each entry in the file that is not marked by use="false", we generate a keys[] entry, and two of them (L_*, R_*) if the dictionary name starts with S_.

Since
2014-03-24
Author
Richard J. Mathar

◆ isReachable()

bool Ltcs::IifServiceWorker::isReachable ( )
virtual

◆ isSlewing()

bool Ltcs::IifServiceWorker::isSlewing ( )
virtual

Flag whether one or both sides of the telescope are on source. The function polls the R_IIFOnSource or S_IIFOnSource keyword of the IIF associated with the side LINC has registered with. If these values are 1, the function returns.


Returns
true if the source is acquired, false if not.
Since
2017-06-08

Implements Ltcs::IifServiceWorkerSkeleton.

◆ logResults()

void Ltcs::IifServiceWorker::logResults ( const lbto::result  _res,
const std::string  _cmd 
)
private

generate a line in the log files


Parameters
_resThe response/result from the IIF.
_cmdThe command that generated the response

◆ operator Nice::SkyPoint()

Ltcs::IifServiceWorker::operator Nice::SkyPoint ( )

Transform the current pointing into a SkyPoint object.


This asks the IIF for the current (ra/dec) pair and generates a SkyPoint object. This may be used with the SkyPoint member functions then for example to generate Alt/Az without asking again the IIF (at least in the limit of neglecting refraction etc.)

Note that the azimuth convention (North=0, East=+90 deg) seems to be the same for the LBT IIF queries and for the SkyPoint member functions. So one does not need to add 180 degrees or construct the complement with respect to 180 to us map both conventions. See also https://cgit.kde.org/kstars.git/tree/kstars/skyobjects/skypoint.cpp .

Returns
Sky coordinates RA and DEC embodied by a SkyPoint object.
Since
2016-11-16

◆ poll()

void Ltcs::IifServiceWorker::poll ( )

read RA, DEC and some other principal variables in one shot If the time defined by cfgInterval has been reached, call snapshot(), otherwise do nothing, assuming that data are recent.


Since
2016-12-13

◆ setOffsetGuiding()

std::string Ltcs::IifServiceWorker::setOffsetGuiding ( double  offx,
double  offy,
const std::string &  _coordSys,
const std::string &  _side 
)
virtual

Parameters
offxfirst coordinate in units of radians or seconds (depending on _coordSys)
offysecond coordinate in units of radians.
_coordSysThe coordinate system of the first two parameters, like "RADEC" or "DETXY"
_side"left" or "right" "both"
Since
2017-10-31
Returns

Implements Ltcs::IifServiceWorkerSkeleton.

◆ setOffsetPointing()

std::string Ltcs::IifServiceWorker::setOffsetPointing ( double  offx,
double  offy,
const std::string &  _coordSys,
const std::string &  _moveType,
const std::string &  _side 
)
virtual

Parameters
offxfirst coordinate in units of radians or seconds (depending on _coordSys)
offysecond coordinate in units of radians.
_coordSysThe coordinate system of the first two parameters, "RADEC" or "DETXY". Currently only "RADEC" and "DETXY" are supported, not "AZALT"
_moveTyperelative or absolute flag, "REL", "ABS", "RELCS", "ABSCS"
_side"left" or "right" "both"
Since
2017-05-30 use iifOffsetPointing2, not iifOffsetPointing.
Returns

Implements Ltcs::IifServiceWorkerSkeleton.

◆ setPresetTelescope()

std::string Ltcs::IifServiceWorker::setPresetTelescope ( int  _raH,
int  _raMin,
double  _raSec,
int  _decDeg,
int  _decMin,
double  _decSec 
)
virtual

Preset the telescope to some Ra/Dec position (considered epoch 2000).


Parameters
_raHThe hour component of RA. Range 0-23.
_raMinThe minute component of RA. Range 0-59.
_raSecThe seconds component of RA. Range 0-60.
_decDegThe degree component of DEC. Range -90 to +90.
_decMinThe minute component of DEC (generally unsigned positive value)
_decSecThe seconds component of DEC (generally unsigned positive value) To instantiate small but negative declinations in the range from 0 to minus 1 degrees, where _decDeg =0 and perhaps also _decMin=0, use a negative value of at least one of the three _decDeg, _decMin or _decSec. This means the absolute value of the declination angle is the sum of the three positive values |_decDeg|+|_decMin|/60+|_decSec|/3600, and the sign is negative if at least one of the _decDeg, _decMin and _decSec is negative.

Implements Ltcs::IifServiceWorkerSkeleton.

◆ setPresetTelescopeCat()

std::string Ltcs::IifServiceWorker::setPresetTelescopeCat ( const lbto::SeqPos2 stars)
virtual

Start telescope slewing and tracking.

Initiate telescope slewing and tracking.


Parameters
[in]catThe catalogue to be used.
Author
R. J. Mathar
Since
2017-03-17

Implements Ltcs::IifServiceWorkerSkeleton.

◆ setPresetTelescopeStar()

std::string Ltcs::IifServiceWorker::setPresetTelescopeStar ( const lbto::position2 star)
virtual

Parameters
[in]starThe point on the sky to be reached. See LbtoIIFIngterface.ice for the structures position and position2 This is currently used by the base GUI interface. There are various reasons not to call this function: one will not have any information about the rest of the AO stars, so any update of ds9 GUI's or lookup tables for the kernel focal plane coordinates may fail later on.
Author
R. J. Mathar
Since
2017-01-21

◆ setReachable()

void Ltcs::IifServiceWorker::setReachable ( bool  _reachable)
private

◆ snapshot()

void Ltcs::IifServiceWorker::snapshot ( )

read all DD variables of interest in one shot. The only purpose of this is to be faster than calling getRA(), getDEC() etc in sequence.


The string data are pushed into the properties in the same format as with the other getXXX functions.

Since
2016-12-13
2017-05-22 use XML configuration to fill keys[]

◆ status()

void Ltcs::IifServiceWorker::status ( )
private

◆ stop()

virtual void Ltcs::IifServiceWorker::stop ( )
inlinevirtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.

◆ toKVPairFile()

void Ltcs::IifServiceWorker::toKVPairFile ( )
virtual

Dump the DD entries for use in the licsGUI and GEIRS FITS headers.


Since
2017-05-22
2017-06-23 generate also the FITS template file for GEIRS
2018-11-29 No CREATOR because the FITS file will be assembled somewhere else
Author
Richard J. Mathar

Since
2017-05-22
2017-06-23 generate also the FITS template file for GEIRS
Author
Richard J. Mathar

Member Data Documentation

◆ dd2keys

vector<int> Ltcs::IifServiceWorker::dd2keys
private

dd2keys[i] is the index in keys() associated with ddents[i].

◆ ddents

lbto::SeqDD Ltcs::IifServiceWorker::ddents

The DD entries to be requested from the IIF The type is typedef'd in src/iif/Interface/LbtoIIFInterface.h .

◆ fFtpl

string Ltcs::IifServiceWorker::fFtpl

Name of the ASCII template file.

The file contents follows the standard of the cfitsio template header cards. Typically $INSROOT/var/log/ltcsSnapshot.tpl .

Since
2017-06-23

◆ fMonit

string Ltcs::IifServiceWorker::fMonit

Name of the file with DD keys and values .

The file contents shows keys and values separated by a blank Typically $INSROOT/var/log/IifSnapshot

◆ iifSidCfg

Ltcs::IifSide Ltcs::IifServiceWorker::iifSidCfg

The SX/DX side(s) at which the instrument is configured according to iif-svc.cfg left, right or both.

◆ iifSidReg

Ltcs::IifSide Ltcs::IifServiceWorker::iifSidReg

The SX/DX side(s) at which the instrument is registered by the telescope operator/TCS (not necessarily authorized !), left, right, both or none.

◆ keys

vector<Ltcs::Iif2fitsKw> Ltcs::IifServiceWorker::keys

The set of keywords to be reported (FITS and liifSnapshotGUI)

◆ kfpHash

Nice::SeqPoint Ltcs::IifServiceWorker::kfpHash[2]

The KFP coordinates of scat (hashed from a previous getKFPCoordinates() call.

◆ lbtInstr

Ltcs::IifInstrum Ltcs::IifServiceWorker::lbtInstr

The current instrument (LINC, LUCI,....)

Since
2018-01-12

◆ m_communicator

Ice::CommunicatorPtr Ltcs::IifServiceWorker::m_communicator
private

◆ m_factory

lbto::FactoryPrx Ltcs::IifServiceWorker::m_factory
private

◆ m_iif

lbto::IIFServerPrx Ltcs::IifServiceWorker::m_iif[2]
private

◆ offsetGuidingEna

bool Ltcs::IifServiceWorker::offsetGuidingEna

True if the offset guide commands are forwarded to the TCS.

False if the offset guide commands are blocked internally. This variable is basically en/disabling the auto guider.

◆ scat

lbto::SeqPos2 Ltcs::IifServiceWorker::scat

The star set of the most recent preset.


The documentation for this class was generated from the following files: