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

java.lang.Object
  extended by edu.nrao.sss.model.resource.evla.EvlaPointingPosition
All Implemented Interfaces:
Cloneable

public class EvlaPointingPosition
extends Object
implements Cloneable

The position to which the EVLA antennas should point.

The main reason for the existence of this class is to be able to allow azimuth values that go beyond the normal range of 0 - 360 and elevation values that go beyond the normal range of -90 - +90.

Version Info:

$Revision$
$Date$
$Author$ (last person to modify)

Since:
2009-02-18
Author:
David M. Harland

Constructor Summary
EvlaPointingPosition()
          Creates a new AZ / EL position where both dimensions are at their midpoints.
 
Method Summary
 EvlaPointingPosition clone()
          Returns a copy of this position.
 boolean equals(Object o)
          Returns true if o is equal to this position.
 CelestialCoordinateSystem getCoordinateSystem()
          Returns the coordinate system used by this position.
 Angle getLatitude()
          Returns the latitude of this position.
 Angle getLatitudeMaximum()
          Returns the maximum latitude for this pointing position, given the chosen coordinate system.
 Angle getLatitudeMinimum()
          Returns the minimum latitude for this pointing position, given the chosen coordinate system.
 String getLatitudeText()
           
 Angle getLongitude()
          Returns the longitude of this position.
 Angle getLongitudeMaximum()
          Returns the maximum longitude for this pointing position, given the chosen coordinate system.
 Angle getLongitudeMinimum()
          Returns the minimum longitude for this pointing position, given the chosen coordinate system.
 String getLongitudeText()
           
 int hashCode()
          Returns a hash code value for this position.
 boolean latitudeIsValid()
          Returns true if this position's latitude value is valid with respect to its coordinate system.
 boolean longitudeIsValid()
          Returns true if this position's longitude value is valid with respect to its coordinate system.
 void setCoordinateSystem(CelestialCoordinateSystem newSystem)
          Sets the coordinate system used by this position.
 void setLatitude(Angle newLatitude)
          Sets the latitude of this position.
 void setLatitude(String text)
           
 void setLongitude(Angle newLongitude)
          Sets the longitude of this position.
 void setLongitude(String text)
           
 SkyPosition toSkyPosition()
          Converts this pointing position to a sky position.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvlaPointingPosition

public EvlaPointingPosition()
Creates a new AZ / EL position where both dimensions are at their midpoints.

Method Detail

getLatitude

public Angle getLatitude()
Returns the latitude of this position. This value is guaranteed not to be null. It is also a copy of the one held internally by this position.

Returns:
the latitude of this position.

setLatitude

public void setLatitude(Angle newLatitude)
Sets the latitude of this position.

Parameters:
newLatitude - the new latitude of this position.
Throws:
IllegalArgumentException - if the parameter is null or out of bounds.
See Also:
getLatitudeMaximum(), getLatitudeMinimum()

getLongitude

public Angle getLongitude()
Returns the longitude of this position. This value is guaranteed not to be null. It is also a copy of the one held internally by this position.

Returns:
the longitude of this position.

setLongitude

public void setLongitude(Angle newLongitude)
Sets the longitude of this position.

Parameters:
newLongitude - the new longitude of this position.
Throws:
IllegalArgumentException - if the parameter is null or out of bounds.
See Also:
getLongitudeMaximum(), getLongitudeMinimum()

getCoordinateSystem

public CelestialCoordinateSystem getCoordinateSystem()
Returns the coordinate system used by this position.

Returns:
the coordinate system used by this position.

setCoordinateSystem

public void setCoordinateSystem(CelestialCoordinateSystem newSystem)
Sets the coordinate system used by this position.

It is possible that current the latitude and/or longitude of this position will not be compatible with the new system. Note that this method will not automatically correct the positions, nor will it complain about the new system. Clients who are concerned about this possibility should call the latitudeIsValid() and longitudeIsValid() methods.

Parameters:
newSystem - a new coordinate system for this position.

getLatitudeText

public String getLatitudeText()

getLongitudeText

public String getLongitudeText()

setLatitude

public void setLatitude(String text)

setLongitude

public void setLongitude(String text)

latitudeIsValid

public boolean latitudeIsValid()
Returns true if this position's latitude value is valid with respect to its coordinate system.


longitudeIsValid

public boolean longitudeIsValid()
Returns true if this position's longitude value is valid with respect to its coordinate system.


getLatitudeMaximum

public Angle getLatitudeMaximum()
Returns the maximum latitude for this pointing position, given the chosen coordinate system.


getLatitudeMinimum

public Angle getLatitudeMinimum()
Returns the minimum latitude for this pointing position, given the chosen coordinate system.


getLongitudeMaximum

public Angle getLongitudeMaximum()
Returns the maximum longitude for this pointing position, given the chosen coordinate system.


getLongitudeMinimum

public Angle getLongitudeMinimum()
Returns the minimum longitude for this pointing position, given the chosen coordinate system.


toSkyPosition

public SkyPosition toSkyPosition()
Converts this pointing position to a sky position. The latitude and longitude values of this class will be normalized according to the rules of the Latitude and Longitude classes. Also, equatorial (RA, Dec) coordinates are assumed to be J2000.

Returns:
the sky position that is equivalent to this pointing position.

clone

public EvlaPointingPosition clone()
Returns a copy of this position.

If anything goes wrong during the cloning procedure, a RuntimeException will be thrown.

Overrides:
clone in class Object

equals

public boolean equals(Object o)
Returns true if o is equal to this position.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this position.

Overrides:
hashCode in class Object


Copyright © 2009. All Rights Reserved.