edu.nrao.sss.model.resource.evla
Class EvlaTelescopeMotionSimulator

java.lang.Object
  extended by edu.nrao.sss.model.resource.evla.EvlaTelescopeMotionSimulator

public class EvlaTelescopeMotionSimulator
extends Object

TODO: Verify ALL constants returned by this class!!


Nested Class Summary
static class EvlaTelescopeMotionSimulator.Error
           
 
Constructor Summary
EvlaTelescopeMotionSimulator()
          Creates a EvlaTelescopeMotionSimulator
EvlaTelescopeMotionSimulator(Angle startAz, Angle startEl)
          Creates a EvlaTelescopeMotionSimulator with an initial position of startAz and startEl.
EvlaTelescopeMotionSimulator(Longitude startAz, Latitude startEl, AntennaWrap wrap)
          Creates a EvlaTelescopeMotionSimulator with an initial position of startAz and startEl that is on wrap wrap.
 
Method Summary
static Angle getAzimuthDefault()
          Returns the default azimuth value for EVLA antenna pointings.
static Angle getAzimuthMaximum()
          Returns the maximum azimuth value for EVLA antenna pointings.
static Angle getAzimuthMinimum()
          Returns the minimum azimuth value for EVLA antenna pointings.
 Angle getCurrentAntennaAzimuth()
          -85 to 445 degrees
 Angle getCurrentAntennaElevation()
          8 to 125 degrees
 AntennaWrap getCurrentAntennaWrap()
          Returns which AntennaWrap this simulator is currently on using the following rules.
static Angle getElevationDefault()
          Returns the default elevation value for EVLA antenna pointings.
static Angle getElevationMaximum()
          Returns the maximum elevation value for EVLA antenna pointings.
static Angle getElevationMinimum()
          Returns the minimum elevation value for EVLA antenna pointings.
 List<EvlaTelescopeMotionSimulator.Error> getErrors()
          Returns a list of any errrors that may have occured during the lastest call to the moveTo method.
 TimeDuration moveTo(Longitude azStart, Latitude elStart, Longitude azEnd, Latitude elEnd, AntennaWrap wrap, boolean goOverTheTop)
          Returns the estimated move time from our current saved position to az, el.
 void setCurrentAntennaAzimuth(Angle a)
          sets the current Antenna Az to a clone of a if a is within range.
 void setCurrentAntennaAzimuth(Longitude a, AntennaWrap w)
          sets the current Antenna Az to a Angle equivalent to a at wrap w.
 void setCurrentAntennaElevation(Angle a)
          sets the current Antenna El to a clone of a if a is within range.
 void setCurrentAntennaElevation(Latitude a)
          sets the current Antenna Az to a Angle equivalent to a at wrap w.
static Angle toAntennaAzimuth(Longitude az, AntennaWrap w)
          Returns an Angle in degrees between -85 and 445 degrees that represents az at AntennaWrap w.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvlaTelescopeMotionSimulator

public EvlaTelescopeMotionSimulator()
Creates a EvlaTelescopeMotionSimulator


EvlaTelescopeMotionSimulator

public EvlaTelescopeMotionSimulator(Angle startAz,
                                    Angle startEl)
Creates a EvlaTelescopeMotionSimulator with an initial position of startAz and startEl.

Throws:
IllegalArgumentException - if startAz or startEl are out of range.

EvlaTelescopeMotionSimulator

public EvlaTelescopeMotionSimulator(Longitude startAz,
                                    Latitude startEl,
                                    AntennaWrap wrap)
Creates a EvlaTelescopeMotionSimulator with an initial position of startAz and startEl that is on wrap wrap.

Throws:
IllegalArgumentException - if startEl is out of range.
Method Detail

moveTo

public TimeDuration moveTo(Longitude azStart,
                           Latitude elStart,
                           Longitude azEnd,
                           Latitude elEnd,
                           AntennaWrap wrap,
                           boolean goOverTheTop)
Returns the estimated move time from our current saved position to az, el. For the very first calculation, a starting position due south at 65 degrees elevation is assumed. The method takes into account antenna wrap by calculating 4 different move times and returning the smallest valid move time. The 4 cases are as follows:
  1. The position we're moving to is on the COUNTERCLOCKWISE (left) wrap. We simple rotate the antenna to that position and see how long it takes. This is a valid option only if wrap is not CLOCKWISE and goOverTheTop is false.
  2. The position is on the CLOCKWISE (right) wrap. Again, we calculate how long it will take to rotate the antenna to that position on that wrap. This is a valid option only if wrap is not COUNTERCLOCKWISE and goOverTheTop is false.
  3. We rotate the antenna 180 degrees and then go over the top to get to our target position. (i.e. we're subtracting 180 degrees from the AZ in case 1 above.) This is only valid if goOverTheTop is true and the elevation is greater than 55 degrees (180 - MAX_EL).
  4. The same as 3 above, but we add 180 to the az instead of subtracting.
This method also clears and refills the list of errors encountered while attempting this move.


getErrors

public List<EvlaTelescopeMotionSimulator.Error> getErrors()
Returns a list of any errrors that may have occured during the lastest call to the moveTo method.


getCurrentAntennaWrap

public AntennaWrap getCurrentAntennaWrap()
Returns which AntennaWrap this simulator is currently on using the following rules. If the currentAz is greater than 275 degrees (MIN_AZ + 360) then we're in the CLOCKWISE (right) wrap. Otherwise we're in the COUNTERCLOCKWISE (left) wrap. XXX This could be changed to split the range in half: greater than 180 degrees is CLOCKWISE, the rest is COUNTERCLOCKWISE. As it is now, you are only in the CLOCKWISE wrap if you are in the overlapping region.


getCurrentAntennaAzimuth

public Angle getCurrentAntennaAzimuth()
-85 to 445 degrees


setCurrentAntennaAzimuth

public void setCurrentAntennaAzimuth(Angle a)
sets the current Antenna Az to a clone of a if a is within range.


setCurrentAntennaAzimuth

public void setCurrentAntennaAzimuth(Longitude a,
                                     AntennaWrap w)
sets the current Antenna Az to a Angle equivalent to a at wrap w.


getCurrentAntennaElevation

public Angle getCurrentAntennaElevation()
8 to 125 degrees


setCurrentAntennaElevation

public void setCurrentAntennaElevation(Angle a)
sets the current Antenna El to a clone of a if a is within range.


setCurrentAntennaElevation

public void setCurrentAntennaElevation(Latitude a)
sets the current Antenna Az to a Angle equivalent to a at wrap w.


toAntennaAzimuth

public static Angle toAntennaAzimuth(Longitude az,
                                     AntennaWrap w)
Returns an Angle in degrees between -85 and 445 degrees that represents az at AntennaWrap w.


getAzimuthMinimum

public static Angle getAzimuthMinimum()
Returns the minimum azimuth value for EVLA antenna pointings.


getAzimuthMaximum

public static Angle getAzimuthMaximum()
Returns the maximum azimuth value for EVLA antenna pointings.


getAzimuthDefault

public static Angle getAzimuthDefault()
Returns the default azimuth value for EVLA antenna pointings.


getElevationMinimum

public static Angle getElevationMinimum()
Returns the minimum elevation value for EVLA antenna pointings.


getElevationMaximum

public static Angle getElevationMaximum()
Returns the maximum elevation value for EVLA antenna pointings.


getElevationDefault

public static Angle getElevationDefault()
Returns the default elevation value for EVLA antenna pointings.



Copyright © 2009. All Rights Reserved.