net.aerith.misao.util
Class Coor

java.lang.Object
  |
  +--net.aerith.misao.util.Coor
Direct Known Subclasses:
AstrometricError

public class Coor
extends java.lang.Object
implements Coordinates

The Coor represents a set of R.A. and Decl. They are expressed in double value of degree.


Field Summary
static byte ACCURACY_100M_ARCMIN
          The number of accuracy to output, representing 12h34m.56 +01o23'.4.
static byte ACCURACY_100M_ARCMIN_HOURSEC
          The number of accuracy to output, representing 12h34m56s +01o23'.4.
static byte ACCURACY_100M_ARCSEC
          The number of accuracy to output, representing 12h34m56s.78 +01o23'45".6.
static byte ACCURACY_10M_ARCSEC
          The number of accuracy to output, representing 12h34m56s.789 +01o23'45".67.
static byte ACCURACY_1M_ARCSEC
          The number of accuracy to output, representing 12h34m56s.7890 +01o23'45".678.
static byte ACCURACY_ARCMIN
          The number of accuracy to output, representing 12h34m.5 +01o23'.
static byte ACCURACY_ARCSEC
          The number of accuracy to output, representing 12h34m56s.7 +01o23'45".
static byte ACCURACY_ROUGH_ARCSEC
          The number of accuracy to output, representing 12h34m56s +01o23'45".
protected  double decl
          Decl.
protected  double ra
          R.A.
 
Constructor Summary
Coor()
          Constructs an empty Coor.
Coor(Coordinates source_coor)
          Constructs a Coor by copy of a Coor.
Coor(double initial_ra, double initial_decl)
          Constructs a Coor with R.A.
Coor(int ra_h, int ra_m, double ra_s, boolean south_flag, int decl_d, int decl_m, double decl_s)
          Constructs a Coor with R.A.
 
Method Summary
 Xyz convertToXyz()
          Converts this R.A.
static Coor create(java.lang.String string)
          Creates a Coor object from the String object which represents the R.A.
 int getAbsDecl_d()
          Gets absolute degree value of Decl.
 int getAbsDecl_m()
          Gets absolute arcmin value of Decl.
 double getAbsDecl_s()
          Gets absolute arcsec value of Decl.
static byte getAccuracy(java.lang.String string)
          Gets the accuracy of Coor object from the String object which represents the R.A.
 double getAngularDistanceTo(Coordinates coor)
          Gets the angular distance from this R.A.
 double getDecl()
          Gets Decl.
 java.lang.String getOutputString()
          Returns a string representation of the state of this object, in such a format as 12h34m56s.78 +01o23'45".6.
 java.lang.String getOutputStringTo100mArcminHoursecWithoutSpace()
          Returns a string representation of the state of this object, in such a format as 123456 +0123.4.
 java.lang.String getOutputStringTo100mArcminHoursecWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34 56 +01 23.4.
 java.lang.String getOutputStringTo100mArcminHoursecWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m56s +01o23'.4.
 java.lang.String getOutputStringTo100mArcminWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34.56 +01 23.4.
 java.lang.String getOutputStringTo100mArcminWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m.56 +01o23'.4.
 java.lang.String getOutputStringTo100mArcsecWithoutSpace()
          Returns a string representation of the state of this object, in such a format as 123456.78 +012345.6.
 java.lang.String getOutputStringTo100mArcsecWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34 56.78 +01 23 45.6.
 java.lang.String getOutputStringTo100mArcsecWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m56s.78 +01o23'45".6.
 java.lang.String getOutputStringTo10mArcsecWithoutSpace()
          Returns a string representation of the state of this object, in such a format as 123456.789 +012345.67.
 java.lang.String getOutputStringTo10mArcsecWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34 56.789 +01 23 45.67.
 java.lang.String getOutputStringTo10mArcsecWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m56s.789 +01o23'45".67.
 java.lang.String getOutputStringTo1mArcsecWithoutSpace()
          Returns a string representation of the state of this object, in such a format as 123456.7890 +012345.678.
 java.lang.String getOutputStringTo1mArcsecWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34 56.7890 +01 23 45.678.
 java.lang.String getOutputStringTo1mArcsecWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m56s.7890 +01o23'45".678.
 java.lang.String getOutputStringToArcminWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34.5 +01 23.
 java.lang.String getOutputStringToArcminWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m.5 +01o23'.
 java.lang.String getOutputStringToArcsecWithoutSpace()
          Returns a string representation of the state of this object, in such a format as 123456.7 +012345.
 java.lang.String getOutputStringToArcsecWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34 56.7 +01 23 45.
 java.lang.String getOutputStringToArcsecWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m56s.7 +01o23'45".
 java.lang.String getOutputStringToRoughArcsecWithoutSpace()
          Returns a string representation of the state of this object, in such a format as 123456 +012345.
 java.lang.String getOutputStringToRoughArcsecWithoutUnit()
          Returns a string representation of the state of this object, in such a format as 12 34 56 +01 23 45.
 java.lang.String getOutputStringToRoughArcsecWithUnit()
          Returns a string representation of the state of this object, in such a format as 12h34m56s +01o23'45".
 double getPositionAngleTo(Coordinates coor)
          Gets the position angle from this R.A.
 int getRA_h()
          Gets hour of R.A.
 int getRA_m()
          Gets minute of R.A.
 double getRA_s()
          Gets second of R.A.
 double getRA()
          Gets R.A.
 void move(double distance, double pa)
          Moves this coordinates to the specified angular distance into the specified position angle.
 void precession(JulianDay src_jd, JulianDay dst_jd)
          Changes the precession.
 Coor residual(Coor coor)
          Calculates the residuals from the specified Coor.
 Coor rotate(double angle)
          Rotates the coordinates.
 void setDecl(double new_decl)
          Sets Decl.
 void setRA(double new_ra)
          Sets R.A.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

ra

protected double ra
R.A.

decl

protected double decl
Decl.

ACCURACY_100M_ARCSEC

public static final byte ACCURACY_100M_ARCSEC
The number of accuracy to output, representing 12h34m56s.78 +01o23'45".6.

ACCURACY_10M_ARCSEC

public static final byte ACCURACY_10M_ARCSEC
The number of accuracy to output, representing 12h34m56s.789 +01o23'45".67.

ACCURACY_ARCSEC

public static final byte ACCURACY_ARCSEC
The number of accuracy to output, representing 12h34m56s.7 +01o23'45".

ACCURACY_ROUGH_ARCSEC

public static final byte ACCURACY_ROUGH_ARCSEC
The number of accuracy to output, representing 12h34m56s +01o23'45".

ACCURACY_100M_ARCMIN

public static final byte ACCURACY_100M_ARCMIN
The number of accuracy to output, representing 12h34m.56 +01o23'.4.

ACCURACY_100M_ARCMIN_HOURSEC

public static final byte ACCURACY_100M_ARCMIN_HOURSEC
The number of accuracy to output, representing 12h34m56s +01o23'.4.

ACCURACY_ARCMIN

public static final byte ACCURACY_ARCMIN
The number of accuracy to output, representing 12h34m.5 +01o23'.

ACCURACY_1M_ARCSEC

public static final byte ACCURACY_1M_ARCSEC
The number of accuracy to output, representing 12h34m56s.7890 +01o23'45".678.
Constructor Detail

Coor

public Coor()
Constructs an empty Coor. The R.A. and Decl. are set at (0,0).

Coor

public Coor(Coordinates source_coor)
Constructs a Coor by copy of a Coor.
Parameters:
source_coor - the source R.A. and Decl. to be copied.

Coor

public Coor(double initial_ra,
            double initial_decl)
Constructs a Coor with R.A. and Decl.
Parameters:
initial_ra - the R.A in degree.
initial_decl - the Decl.

Coor

public Coor(int ra_h,
            int ra_m,
            double ra_s,
            boolean south_flag,
            int decl_d,
            int decl_m,
            double decl_s)
Constructs a Coor with R.A. and Decl.
Parameters:
ra_h - the hour of R.A.
ra_m - the minute of R.A.
ra_s - the second of R.A.
south_flag - true if the Decl. is in southern hemisphere.
decl_d - the absolute degree value of Decl.
decl_m - the absolute minute value of Decl.
decl_s - the absolute second value of Decl.
Method Detail

getRA

public double getRA()
Gets R.A.
Specified by:
getRA in interface Coordinates
Returns:
the R.A.

getRA_h

public int getRA_h()
Gets hour of R.A.
Returns:
the hour of R.A.

getRA_m

public int getRA_m()
Gets minute of R.A.
Returns:
the minute of R.A.

getRA_s

public double getRA_s()
Gets second of R.A.
Returns:
the second of R.A.

setRA

public void setRA(double new_ra)
Sets R.A.
Parameters:
new_ra - the new R.A.

getDecl

public double getDecl()
Gets Decl.
Specified by:
getDecl in interface Coordinates
Returns:
the Decl.

getAbsDecl_d

public int getAbsDecl_d()
Gets absolute degree value of Decl.
Returns:
the absolute degree value of Decl.

getAbsDecl_m

public int getAbsDecl_m()
Gets absolute arcmin value of Decl.
Returns:
the absolute arcmin value of Decl.

getAbsDecl_s

public double getAbsDecl_s()
Gets absolute arcsec value of Decl.
Returns:
the absolute arcsec value of Decl.

setDecl

public void setDecl(double new_decl)
Sets Decl.
Parameters:
new_decl - the new Decl.

getAngularDistanceTo

public double getAngularDistanceTo(Coordinates coor)
Gets the angular distance from this R.A. and Decl. to the specified R.A. and Decl.
Parameters:
coor - the target R.A. and Decl.
Returns:
the angular distance in degree.

getPositionAngleTo

public double getPositionAngleTo(Coordinates coor)
Gets the position angle from this R.A. and Decl. to the specified R.A. and Decl.
Parameters:
coor - the target R.A. and Decl.
Returns:
the position angle.

move

public void move(double distance,
                 double pa)
Moves this coordinates to the specified angular distance into the specified position angle.
Parameters:
distance - the angular distance to move in degree.
pa - the positoin angle to move.

residual

public Coor residual(Coor coor)
Calculates the residuals from the specified Coor.
Parameters:
coor - the R.A. and Decl. to calculate residuals from.
Returns:
a set of residuals of R.A. and Decl.

convertToXyz

public Xyz convertToXyz()
Converts this R.A. and Decl. to the (x,y,z) position. The length of the new vector is 1.
Returns:
the (x,y,z) position.

rotate

public Coor rotate(double angle)
Rotates the coordinates.
Parameters:
angle - the angle to rotate.
Returns:
the rotated coordinates.

precession

public void precession(JulianDay src_jd,
                       JulianDay dst_jd)
Changes the precession. The result is stored in this object.
Parameters:
src_jd - the Julian Day of the source precession.
dst_jd - the Julian Day of the destination precession.

create

public static Coor create(java.lang.String string)
Creates a Coor object from the String object which represents the R.A. and Decl. in various formats.
Parameters:
string - the string which represents R.A. and Decl.
Returns:
a new Coor of the specified string.

getAccuracy

public static byte getAccuracy(java.lang.String string)
Gets the accuracy of Coor object from the String object which represents the R.A. and Decl. in various formats.
Parameters:
string - the string which represents R.A. and Decl.
Returns:
the accuracy.

getOutputString

public java.lang.String getOutputString()
Returns a string representation of the state of this object, in such a format as 12h34m56s.78 +01o23'45".6.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcsecWithUnit

public java.lang.String getOutputStringTo100mArcsecWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m56s.78 +01o23'45".6.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcsecWithoutUnit

public java.lang.String getOutputStringTo100mArcsecWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34 56.78 +01 23 45.6.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcsecWithoutSpace

public java.lang.String getOutputStringTo100mArcsecWithoutSpace()
Returns a string representation of the state of this object, in such a format as 123456.78 +012345.6.
Returns:
a string representation of the state of this object.

getOutputStringTo1mArcsecWithUnit

public java.lang.String getOutputStringTo1mArcsecWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m56s.7890 +01o23'45".678.
Returns:
a string representation of the state of this object.

getOutputStringTo1mArcsecWithoutUnit

public java.lang.String getOutputStringTo1mArcsecWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34 56.7890 +01 23 45.678.
Returns:
a string representation of the state of this object.

getOutputStringTo1mArcsecWithoutSpace

public java.lang.String getOutputStringTo1mArcsecWithoutSpace()
Returns a string representation of the state of this object, in such a format as 123456.7890 +012345.678.
Returns:
a string representation of the state of this object.

getOutputStringTo10mArcsecWithUnit

public java.lang.String getOutputStringTo10mArcsecWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m56s.789 +01o23'45".67.
Returns:
a string representation of the state of this object.

getOutputStringTo10mArcsecWithoutUnit

public java.lang.String getOutputStringTo10mArcsecWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34 56.789 +01 23 45.67.
Returns:
a string representation of the state of this object.

getOutputStringTo10mArcsecWithoutSpace

public java.lang.String getOutputStringTo10mArcsecWithoutSpace()
Returns a string representation of the state of this object, in such a format as 123456.789 +012345.67.
Returns:
a string representation of the state of this object.

getOutputStringToArcsecWithUnit

public java.lang.String getOutputStringToArcsecWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m56s.7 +01o23'45".
Returns:
a string representation of the state of this object.

getOutputStringToArcsecWithoutUnit

public java.lang.String getOutputStringToArcsecWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34 56.7 +01 23 45.
Returns:
a string representation of the state of this object.

getOutputStringToArcsecWithoutSpace

public java.lang.String getOutputStringToArcsecWithoutSpace()
Returns a string representation of the state of this object, in such a format as 123456.7 +012345.
Returns:
a string representation of the state of this object.

getOutputStringToRoughArcsecWithUnit

public java.lang.String getOutputStringToRoughArcsecWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m56s +01o23'45".
Returns:
a string representation of the state of this object.

getOutputStringToRoughArcsecWithoutUnit

public java.lang.String getOutputStringToRoughArcsecWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34 56 +01 23 45.
Returns:
a string representation of the state of this object.

getOutputStringToRoughArcsecWithoutSpace

public java.lang.String getOutputStringToRoughArcsecWithoutSpace()
Returns a string representation of the state of this object, in such a format as 123456 +012345.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcminWithUnit

public java.lang.String getOutputStringTo100mArcminWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m.56 +01o23'.4.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcminWithoutUnit

public java.lang.String getOutputStringTo100mArcminWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34.56 +01 23.4.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcminHoursecWithUnit

public java.lang.String getOutputStringTo100mArcminHoursecWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m56s +01o23'.4.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcminHoursecWithoutUnit

public java.lang.String getOutputStringTo100mArcminHoursecWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34 56 +01 23.4.
Returns:
a string representation of the state of this object.

getOutputStringTo100mArcminHoursecWithoutSpace

public java.lang.String getOutputStringTo100mArcminHoursecWithoutSpace()
Returns a string representation of the state of this object, in such a format as 123456 +0123.4.
Returns:
a string representation of the state of this object.

getOutputStringToArcminWithUnit

public java.lang.String getOutputStringToArcminWithUnit()
Returns a string representation of the state of this object, in such a format as 12h34m.5 +01o23'.
Returns:
a string representation of the state of this object.

getOutputStringToArcminWithoutUnit

public java.lang.String getOutputStringToArcminWithoutUnit()
Returns a string representation of the state of this object, in such a format as 12 34.5 +01 23.
Returns:
a string representation of the state of this object.