public class TelescopeStatus extends ErrorEvent implements ParameterConnected, PointingKnowledge
StatusTelescope command. The four status lines
carried are of the following format:
POWER=[0/1] REFERENCED=[0/1] TRACK=[0/1] GUIDE=[0/1] AZ=[azimuth, deg] AZOFF=[AZ offset, deg] ALT=[altitude, deg] ALTOFF=[alt. offset, deg] DEROT=[derotator position, deg] FOCUS=[focus position, mm] TEMP_CABINET=[Temp. in switchboard, deg] TEMP_M2=[T of M2, deg] TEMP_M1=[T of M1, deg] TEMP_M3=[T of M3, deg] ERRORS=[error symbols]The first line is translated into booleans. It is considered false when the value is zero, true in any other case. The true telescope position is AZ+AZOFF and ALT+ALTOFF, respectively. Currently it is not clear if the inversion of the pointing model is totally accurate. It might introduce an error of a few arc seconds. The list of error symbols is specific to the controler. Their meanings are unclear in the moment. The format of the line carrying temperatures has the M2 temperature first. Internally, we threat it in the 'logical' way.
| Modifier and Type | Field and Description |
|---|---|
private double |
altitude
Telescope altitude, degrees.
|
private double |
altoffset
Telescope altitude offset, degrees.
|
private double |
azimuth
Telescope azimuth, degrees.
|
private double |
azoffset
Telescope azimuth offset, degrees.
|
private double |
derot
Derotator position, degrees.
|
private String |
errorsymbols
Error symbols active on telescope controller.
|
private static String[] |
FIRST
The variables in the first command line, index 1.
|
private double |
focus
Focus position.
|
private static String |
FOLLOWUP
The follow-up (shutdown).
|
private static String[] |
FOURTH
The variables in the fifth command line, index 4.
|
private boolean |
guide
Telescope is guiding.
|
static String |
NOERROR
To avoid empty error lists.
|
private static boolean |
PIPING
The pipe flag (false).
|
private boolean |
power
Telescope has power.
|
private boolean |
referenced
Telescope is referenced, i.e.
|
private static String[] |
SECOND
The variables in the second command line, index 2.
|
private static int |
SEVERENESS
The severness level (status message).
|
private double |
tcabinet
Temperature of the switch board.
|
private static String[] |
THIRD
The variables in the fourth command line, index 3.
|
private double |
tm1
Temperature of mirror M1.
|
private double |
tm2
Temperature of mirror M2.
|
private double |
tm3
Temperature of mirror M3.
|
private boolean |
track
Telescope is tracking.
|
ABORT_EXPOSURE, ABORT_TARGET, ALARM_OFF, ALARM_ON, BAD_SEEING, BAD_WEATHER, CLEAR_TEL, CLOSE_COVER, CLOSE_ROOF, CLOSE_SHUTTER, CONT_TIME, ERROR_TOKEN, ERRORCOMBINE, ERRORPACKAGE, GOOD_WEATHER, HIGH_WIND, MAIL_HOME, MAIL_LOCAL, MOVE_HOME, MOVE_PARK, NONE, OPEN_COVER, OPEN_SHUTTER, PIPE, REACQUIRE, REPOSITION, RESEND_COMMAND, RESET_ADAPTER, RESET_CALIBRATION, RESET_CCD, RESET_ENV, RESET_ERRORS, RESET_SPEC, RESET_TEL, SHUT_DOWN, STATUS_TOKEN, STOP_TIMESEPCHARlocalHost, sourceNamesource| Constructor and Description |
|---|
TelescopeStatus(Object src)
Constructs a new TelescopeStatus status event.
|
| Modifier and Type | Method and Description |
|---|---|
static TelescopeStatus |
createTest(Object src)
Creates a test status message.
|
double |
getAltitude()
Returns the altitude of the telescope, as read in from the encoders.
|
double |
getAltitudeOffset()
Returns the altitude offset of the telescope,
as read in from the encoders.
|
double |
getApparentAltitude()
Returns the apparent altitude of the telescope.
|
double |
getApparentAzimuth()
Returns the apparent azimuth of the telescope.
|
double |
getAzimuth()
Returns the azimuth of the telescope, as read in from the encoders.
|
double |
getAzimuthOffset()
Returns the azimuth offset of the telescope,
as read in from the encoders.
|
double |
getDerotator()
Returns the derotator position.
|
String |
getErrors()
Returns the error codes currently active on the telescope motor
controlers.
|
double |
getFocus()
Returns the focus position.
|
boolean |
getGuide()
Returns true if the telescope is guiding.
|
String |
getHuman()
Returns the human-readable part of the string.
|
String[] |
getLine()
Returns the command lines as an string array.
|
boolean |
getPower()
Returns true if the telescope has power.
|
boolean |
getReferenced()
Returns true if the telescope is referenced, i.e.
|
double |
getTempCabinet()
Returns the temperature of the cabinet.
|
double |
getTempM1()
Returns the temperature of M1.
|
double |
getTempM2()
Returns the temperature of M1.
|
double |
getTempM3()
Returns the temperature of M1.
|
boolean |
getTrack()
Returns true if the telescope is tracking.
|
boolean |
parseLine(String[] all)
Parses the command lines submitted with this status event.
|
void |
setAltitude(double z)
Sets the raw zenith distance of the status message.
|
void |
setAltitudeOffset(double zoff)
Sets the zenith distance offset in the status message.
|
void |
setAzimuth(double az)
Sets the raw azimuth of the telescope status.
|
void |
setAzimuthOffset(double azoff)
Sets the azimuth offset of the status message.
|
void |
setDerotator(double dr)
Sets the derotator position.
|
void |
setErrors(String err)
Sets the error symbols of the status message.
|
void |
setFocus(double foc)
Sets the focus position.
|
void |
setGuide(boolean doguide)
Sets the guiding flag of the status message.
|
void |
setPower(boolean poweron)
Sets the power flag in the status message.
|
void |
setReferenced(boolean isref)
Sets the referenced flag of the status message.
|
void |
setTrack(boolean dotrack)
Sets the tracking flag of the status message.
|
private void |
updateHuman()
Updates the human-readable part of the error event.
|
consume, createError, createError, createError, createError, createError, createStatus, createStatus, createStatus, extractClassName, extractFollowUp, extractPipe, getErrorClass, getFollowUp, getSevereness, isConsumed, isPipe, isStatus, parseClassName, parseHeader, setFollowUp, setHuman, setHuman, setPipecheckType, equals, equalTime, equalTime, fromAscii, getAllCommandLines, getExecuteGroupKey, getHead, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, readFromBufferedStream, setNr, setTime, setType, setValid, toSkippedString, toStringgetHost, getSourceName, setSourceNamegetSourceprivate static final int SEVERENESS
private static final String FOLLOWUP
private static final boolean PIPING
private static final String[] FIRST
private static final String[] SECOND
private static final String[] THIRD
private static final String[] FOURTH
public static final String NOERROR
private boolean power
private boolean referenced
private boolean track
private boolean guide
private double azimuth
private double azoffset
private double altitude
private double altoffset
private double derot
private double focus
private double tcabinet
private double tm1
private double tm2
private double tm3
private String errorsymbols
public boolean parseLine(String[] all)
parseLine in class ErrorEventpublic String[] getLine()
getLine in class ErrorEventpublic String getHuman()
getHuman in class ErrorEventprivate void updateHuman()
ErrorEvent.setHuman(java.lang.String) with values constructed from the internal
variables.public boolean getPower()
public boolean getReferenced()
public boolean getTrack()
public boolean getGuide()
public double getAzimuth()
getAzimuth in interface PointingKnowledgegetApparentAzimuth()public double getAzimuthOffset()
getAzimuthOffset in interface PointingKnowledgegetApparentAzimuth()public double getApparentAzimuth()
getAzimuth()public double getAltitude()
getAltitude in interface PointingKnowledgegetApparentAltitude()public double getAltitudeOffset()
getAltitudeOffset in interface PointingKnowledgegetApparentAltitude()public double getApparentAltitude()
public double getDerotator()
public double getFocus()
public double getTempCabinet()
public double getTempM1()
public double getTempM2()
public double getTempM3()
public String getErrors()
public void setPower(boolean poweron)
public void setReferenced(boolean isref)
public void setTrack(boolean dotrack)
public void setGuide(boolean doguide)
public void setAzimuth(double az)
public void setAzimuthOffset(double azoff)
getAzimuth()public void setAltitude(double z)
getApparentAltitude()public void setAltitudeOffset(double zoff)
public void setDerotator(double dr)
public void setFocus(double foc)
public void setErrors(String err)
public static final TelescopeStatus createTest(Object src)
AltTelescope and
AzTelescope parameters. All triggers are
true, the azimuth and altitude are randomly set. The error flags are
set to NOERROR.