public class DomeReceiver extends AbstractShelter implements DomeOperating, DriverDepending, GlobalDepending
| Modifier and Type | Class and Description |
|---|---|
static class |
DomeReceiver.Control
Command line interface to the dome server.
|
static class |
DomeReceiver.Follow
A class for testing dome tracking.
|
static class |
DomeReceiver.Position
A class for testing dome positioning.
|
private class |
DomeReceiver.Slew
This thread never switches motors on or off!
This class acts as a thread to slew to a desired position.
|
private class |
DomeReceiver.SolTrack
A timer task that does the tracking of the anti-solar az.
|
static class |
DomeReceiver.Status
A class for retrieving dome status
|
private class |
DomeReceiver.Track
A timer task that does the tracking of the dome.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private Value |
altitude
The value that has the height of the sky position tracked.
|
private Value |
azimuth
The value that has the azimuth of the sky position tracked.
|
private DecTarget |
de
The declination in the actual sky we have to follow.
|
private static double |
DEFALLOW
We allow a maximum of 6 degrees on tracking.
|
private static double |
DEFDESIREDOFF
Default property value.
|
private static long |
DEFFASTCOOL
The time it takes the dome to stop after fast movement.
|
private static long |
DEFFASTJOIN
Maximum time fast movement is allowed.
|
private static double |
DEFFASTPRE
The fast positioning is done to that lavel.
|
private static double |
DEFHOMEPOSITION
A home position.
|
private static int |
DEFMAXFAILS
The default number of positiong retires .
|
private static double |
DEFMAXHEIGHT
No need to go here.
|
private static int |
DEFMAXRETRIES
The default number of positiong retires .
|
private static long |
DEFPOSITIONCACHE
Position is invalid after 1000 ms.
|
private static String |
DEFSITE
The default site.
|
private static long |
DEFSLEWSLEEP
Sleep intervall during slews.
|
private static long |
DEFSLOWCOOL
The time it takes the dome to stop after slow movement.
|
private static long |
DEFSLOWJOIN
Maximum time slow movement is allowed.
|
private static double |
DEFSLOWPRE
The slow positioning is done to that lavel.
|
private static long |
DEFTIMEOUT
Maximum slit time for closing.
|
private static long |
DEFTRACKREPEAT
During tracking, position is checked with this intervall.
|
private static double |
DEFTRAVELFAST
If desired position is further than this, use fast speed.
|
private static double |
DEFVELOCITYTHRESHOLD
Velocities below this deg per second are considered stopped.
|
private DomeDriver |
dome
The dome driver used for interfacing to the dome.
|
private double |
domeaz
And the azimuth.
|
private long |
dometime
The last time-stamp we retrieved the dome azimuth.
|
private TimerTask |
follow
The timer task that allows following the dome.
|
static String |
KEY_ALLOW |
static String |
KEY_DESIREDOFF |
static String |
KEY_DOMEDRIVER
The name of the dome driver to use.
|
static String |
KEY_FASTCOOL |
static String |
KEY_FASTJOIN |
static String |
KEY_FASTPRE |
static String |
KEY_HOMEPOSITION
The azimuth of the home position.
|
static String |
KEY_LATITUDE
If set, the name of the latitude parameter to use.
|
static String |
KEY_LONGITUDE
If set, the name of the longitude parameter to use.
|
static String |
KEY_MAXFAILS
The maximum number of go-to failures on position obtains.
|
static String |
KEY_MAXHEIGHT |
static String |
KEY_MAXRETRIES
The maximum number of retires for position obtains.
|
static String |
KEY_POSITIONCACHE |
static String |
KEY_SITE
If no explicit longitude or latitude, we use this site.
|
static String |
KEY_SLEWSLEEP |
static String |
KEY_SLOWCOOL |
static String |
KEY_SLOWJOIN |
static String |
KEY_SLOWPRE |
static String |
KEY_TIME
If set, this time parameter should be used from the cluster.
|
static String |
KEY_TIMEOUT |
static String |
KEY_TRACKREPEAT |
static String |
KEY_TRAVELFAST |
static String |
KEY_VELOCITYTHRESHOLD |
private double |
lastaz
And the last azimuth.
|
private ErrorEvent |
lasterror
We store the last error generated for asynchroneous retrieval.
|
private long |
lastopen
The timestamp of the last opening of the roof.
|
private long |
lastshut
The timestamp of the last closing of the roof.
|
private long |
lasttime
Prior to the last get, this was the time of dome azimuth.
|
private boolean |
motoron
Indicates that we switched on the motors.
|
private Thread |
moving
A thread indicating a moving slit/hatch.
|
private boolean |
movingannounced
A boolean to avoid repeating messages.
|
private RaTarget |
ra
The right ascension in the actual sky we have to follow.
|
private SolAzimuth |
solaz
The azimuth of the sun to avoid direct blinding.
|
private SolHeight |
solh
The height of the sun to avoid direct blinding.
|
KEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
DomeReceiver(Map<String,String> prop)
Constructs a new dome receiver used for operating the dome.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
antiSun()
Follows the anti-sun by positioning the slit always opposite to the
sun position.
|
void |
clearLastError()
Clears the last error event.
|
boolean |
close(boolean always)
Closes the dome.
|
boolean |
closeHatch()
Directly closes the hatch, if possible.
|
boolean |
closeSlit()
Directly closes the slit, if possible.
|
String |
conciseStatus() |
static DomeReceiver |
createDomeReceiver(File props)
Creates a dome receiver, initalizes the dome driver and all parameters.
|
Object |
extendedStatus()
Sends a status event back.
|
boolean |
follow(double ratel,
double detel)
Follows the object at the given ra and dec.
|
private double |
getActualDomePosition()
Returns the actual dome position if the cache-time is over, otherwise
the cached position is returned.
|
private Double |
getActualDomeVelocity()
Checks the current and the last dome position and calculates a speed
out of it, if both are valid, otherwise it returns null.
|
Date |
getLastCloseTime()
Returns the date of the last shut time if the roof is currently shut.
|
ErrorEvent |
getLastError(CommandEvent dummy)
Returns the last error that occured.
|
Date |
getLastOpenTime()
Returns the date of the last open time if the roof is currently open.
|
private boolean |
go(double to,
boolean forward,
boolean fast,
double within,
long timeout,
long cooldown)
Goes to the indicated position, in the desired direction and speed.
|
private boolean |
goTo(double azdeg)
Goes to the indicated position.
|
boolean |
home()
Moves the dome to the home position.
|
boolean |
isClosed()
Returns true if the dome is fully open.
|
private Boolean |
isMoving()
We are moving, if our absolute speed is higher than the threshold.
|
boolean |
isOpen()
Returns true if the dome is fully open.
|
boolean |
open(boolean auto)
Opens the dome.
|
boolean |
openHatch()
Directly opens the hatch, if possible.
|
boolean |
openSlit()
Directly opens the slit, if possible.
|
boolean |
position(double az)
Moves the dome to the indicated position and stops there.
|
boolean |
powerOff()
Returns true if the dome driver is present.
|
boolean |
powerOn()
Returns true if the dome driver is present.
|
boolean |
registerDriver(Driver d)
Registers the dome driver.
|
void |
registerGlobals(GlobalGrouping set)
Registers a parameter set to the roof.
|
boolean |
stop()
Stops the azimuth moter, the slit mechanism cannot be stopped once
initiated.
|
createShelterclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_DOMEDRIVER
public static final String KEY_HOMEPOSITION
public static final String KEY_MAXRETRIES
public static final String KEY_MAXFAILS
public static final String KEY_TIME
public static final String KEY_LATITUDE
public static final String KEY_LONGITUDE
public static final String KEY_SITE
public static final String KEY_DESIREDOFF
public static final String KEY_TRAVELFAST
public static final String KEY_FASTPRE
public static final String KEY_FASTJOIN
public static final String KEY_FASTCOOL
public static final String KEY_SLOWPRE
public static final String KEY_SLOWJOIN
public static final String KEY_SLOWCOOL
public static final String KEY_POSITIONCACHE
public static final String KEY_VELOCITYTHRESHOLD
public static final String KEY_SLEWSLEEP
public static final String KEY_MAXHEIGHT
public static final String KEY_ALLOW
public static final String KEY_TIMEOUT
public static final String KEY_TRACKREPEAT
private static final String DEFSITE
private static final double DEFHOMEPOSITION
private static final int DEFMAXRETRIES
private static final int DEFMAXFAILS
private static final double DEFDESIREDOFF
private static final double DEFTRAVELFAST
private static final double DEFFASTPRE
private static final double DEFSLOWPRE
private static final long DEFFASTCOOL
private static final long DEFSLOWCOOL
private static final long DEFFASTJOIN
private static final long DEFSLOWJOIN
private static final long DEFPOSITIONCACHE
private static final double DEFVELOCITYTHRESHOLD
private static final long DEFSLEWSLEEP
private static final double DEFMAXHEIGHT
private static final double DEFALLOW
private static final long DEFTIMEOUT
private static final long DEFTRACKREPEAT
private DomeDriver dome
private SolHeight solh
private SolAzimuth solaz
private RaTarget ra
private DecTarget de
private Value altitude
private Value azimuth
private boolean motoron
private long dometime
private double domeaz
private long lasttime
private double lastaz
private ErrorEvent lasterror
private long lastopen
private long lastshut
private Thread moving
private boolean movingannounced
private TimerTask follow
public boolean registerDriver(Driver d)
registerDriver in interface DriverDependingpublic void registerGlobals(GlobalGrouping set)
registerGlobals in interface GlobalDependingpublic boolean home()
home in interface DomeOperatingpublic boolean position(double az)
position in interface DomeOperatingaz - The astronomical azimuth in degrees, S=0, W=+90.public boolean antiSun()
antiSun in interface DomeOperatingpublic boolean follow(double ratel,
double detel)
follow in interface DomeOperatingratel - Right ascension, degrees, apparent equinox.detel - Declination, degress, apparent equinox.public boolean stop()
stop in interface DomeOperatingpublic boolean open(boolean auto)
open in interface Shelteringauto - True, if standard procedure (no emergency, like in automated
mode).public boolean close(boolean always)
close in interface Shelteringalways - True, if standard procedure (no emergency, like in automated
mode).public boolean openHatch()
openHatch in interface DomeOperatingpublic boolean openSlit()
openSlit in interface DomeOperatingpublic boolean closeHatch()
closeHatch in interface DomeOperatingpublic boolean closeSlit()
closeSlit in interface DomeOperatingpublic Date getLastCloseTime()
getLastCloseTime in interface Shelteringpublic Date getLastOpenTime()
getLastOpenTime in interface Shelteringpublic boolean isOpen()
isOpen in interface Shelteringpublic boolean isClosed()
isClosed in interface Shelteringpublic boolean powerOn()
powerOn in interface DomeOperatingpublic boolean powerOff()
powerOff in interface DomeOperatingpublic Object extendedStatus()
extendedStatus in interface StatusProvidingpublic String conciseStatus()
conciseStatus in interface StatusProvidingpublic ErrorEvent getLastError(CommandEvent dummy)
getLastError in interface DomeOperatingpublic void clearLastError()
clearLastError in interface DomeOperatingprivate boolean goTo(double azdeg)
KEY_TRAVELFAST. Depending on the
slewing speed chosen, we stop KEY_FASTPRE or
KEY_SLOWPRE degrees before we reach the actual position. After
the motor stopped moving, decided by #KEY_NOTMOVING, which is
a value in degrees persecond, we check if we have reached the desired
position within KEY_DESIREDOFF. If we are too far off, we
are re-entrant into this method, but only to a certain depth of
KEY_MAXRETRIES.private boolean go(double to,
boolean forward,
boolean fast,
double within,
long timeout,
long cooldown)
private double getActualDomePosition()
private Double getActualDomeVelocity()
private Boolean isMoving()
public static DomeReceiver createDomeReceiver(File props) throws IOException
IOException