net.aerith.misao.pixy.matching
Class RetryManager

java.lang.Object
  |
  +--net.aerith.misao.pixy.matching.RetryManager

public class RetryManager
extends java.lang.Object

The RetryManager is a class to generate the initial R.A. and Decl. of the center, and the initial field of view for matching process. It generates some sets of those parameters based on the specified policy.


Field Summary
private  java.util.Vector coor_list
          The list of center R.A.
protected  Coor original_coor
          The original R.A.
protected  double original_fov_height
          The original vertical field of view.
protected  double original_fov_width
          The original horizontal field of view.
protected  int policy
          The policy.
static int POLICY_NO_RETRY
          The number of policy which implies to run the matching process only once with no retry.
static int POLICY_POSITION_SEARCH
          The number of policy which implies to search the R.A.
static int POLICY_POSITION_UNCERTAIN
          The number of policy which implies the R.A.
protected  int retry_count
          The retry count.
protected  double search_radius
          The search radius.
 
Constructor Summary
RetryManager(Coor center_coor, double fov_width, double fov_height)
          Constructs a RetryManager.
 
Method Summary
 Coor getCenterCoor()
          Gets the R.A.
 double getHorizontalFov()
          Gets the horizontal field of view for the current retry.
 double getVerticalFov()
          Gets the vertical field of view for the current retry.
 void increment()
          Increments the retry count.
 void setPolicy(int policy)
          Sets the policy.
 void setSearchRadius(double radius)
          Sets the search radius.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

POLICY_NO_RETRY

public static final int POLICY_NO_RETRY
The number of policy which implies to run the matching process only once with no retry.

POLICY_POSITION_UNCERTAIN

public static final int POLICY_POSITION_UNCERTAIN
The number of policy which implies the R.A. and Decl. is uncertain and it retries the matching process 9 times while shifting the R.A. and Decl. around the specified position.

POLICY_POSITION_SEARCH

public static final int POLICY_POSITION_SEARCH
The number of policy which implies to search the R.A. and Decl. within the specified radius, while shifting the R.A. and Decl. around the specified position.

policy

protected int policy
The policy.

original_coor

protected Coor original_coor
The original R.A. and Decl.

original_fov_width

protected double original_fov_width
The original horizontal field of view.

original_fov_height

protected double original_fov_height
The original vertical field of view.

search_radius

protected double search_radius
The search radius.

retry_count

protected int retry_count
The retry count.

coor_list

private java.util.Vector coor_list
The list of center R.A. and Decl.
Constructor Detail

RetryManager

public RetryManager(Coor center_coor,
                    double fov_width,
                    double fov_height)
Constructs a RetryManager.
Parameters:
center_coor - the R.A. and Decl. of the center.
fov_width - the horizontal field of view in degree.
fov_height - the vertical field of view in degree.
Method Detail

setSearchRadius

public void setSearchRadius(double radius)
Sets the search radius.
Parameters:
radius - the search radius.

setPolicy

public void setPolicy(int policy)
Sets the policy.
Parameters:
policy - the number of policy.

increment

public void increment()
               throws MaximumRepetitionCountException
Increments the retry count.
Throws:
MaximumRepetitionCountException - if the retry count reaches to the maximum count.

getCenterCoor

public Coor getCenterCoor()
Gets the R.A. and Decl. of the center for the current retry.
Returns:
the R.A. and Decl. of the center for the current retry.

getHorizontalFov

public double getHorizontalFov()
Gets the horizontal field of view for the current retry.
Returns:
the horizontal field of view for the current retry.

getVerticalFov

public double getVerticalFov()
Gets the vertical field of view for the current retry.
Returns:
the vertical field of view for the current retry.