stella.telescope
Class Waltz

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.telescope.Waltz
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class Waltz
extends PropertyBundles

Brings an arbitrary number of telescope understanding ATIS to dance.


Nested Class Summary
static class Waltz.Positions
          Reads the coreography file and prints out the calculated ra/dec.
private  class Waltz.WaltzTask
          A task that moves the telescope to the provided position.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  List atis
          The telescopes.
private  Timer choreography
          The timer for the coreography.
private static String DEFSITE
          Properties of the telescopes.
static String KEY_SITE
          Properties of the telescopes.
static String KEY_TELESCOPES
          Properties of the telescopes.
private  Latitude phi
          Latitude of site.
private  SiderealTime sidereal
          Sidereal time at site.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
Waltz(Map prop)
          Constructs a new Waltz instance.
 
Method Summary
private  void createParameters()
          Creates our parameters.
private  List generateTimerTasks(List lines)
          Converts ascii-lines into timer-tasks that can be put onto a timer.
 void init()
          Initializes and opens the command launchers talking to ATIS telescopes.
static void main(String[] arg)
          First command line are the properties of the waltz, second the configuration file of the coreography.
private  void startDance(List steps)
          Starts the dance by putting all timer tasks constructed from the ascii- lines onto a timer object.
private  Vector2D toRaDec(Vector2D azalt)
          Converts a pair of az (index 0)-alt (index 1) coordinates into ra/dec for proper transfering to the telescope.
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
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, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, 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, stringProperties
 

Field Detail

KEY_TELESCOPES

public static final String KEY_TELESCOPES
Properties of the telescopes.

See Also:
Constant Field Values

KEY_SITE

public static final String KEY_SITE
Properties of the telescopes.

See Also:
Constant Field Values

DEFSITE

private static final String DEFSITE
Properties of the telescopes.

See Also:
Constant Field Values

atis

private List atis
The telescopes.


phi

private Latitude phi
Latitude of site.


sidereal

private SiderealTime sidereal
Sidereal time at site.


choreography

private Timer choreography
The timer for the coreography.

Constructor Detail

Waltz

public Waltz(Map prop)
Constructs a new Waltz instance. Telescope command suppliers are constructed and initialized in the init section.

Method Detail

init

public void init()
Initializes and opens the command launchers talking to ATIS telescopes.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyResources

createParameters

private void createParameters()
Creates our parameters.


toRaDec

private Vector2D toRaDec(Vector2D azalt)
Converts a pair of az (index 0)-alt (index 1) coordinates into ra/dec for proper transfering to the telescope.

Parameters:
azalt - A pair of azimuth and altitude in degress.

generateTimerTasks

private List generateTimerTasks(List lines)
Converts ascii-lines into timer-tasks that can be put onto a timer.


startDance

private void startDance(List steps)
Starts the dance by putting all timer tasks constructed from the ascii- lines onto a timer object.


main

public static void main(String[] arg)
First command line are the properties of the waltz, second the configuration file of the coreography.