|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.func.CoordsRadians
public class CoordsRadians
Functions for angle transformations and manipulations, based on radians rather than degrees. In particular, methods for translating between radians and HH:MM:SS.S or DDD:MM:SS.S type sexagesimal representations are provided.
Field Summary | |
---|---|
static double |
ARC_MINUTE_RADIANS
The size of one arcminute in radians. |
static double |
ARC_SECOND_RADIANS
The size of one arcsecond in radians. |
static double |
DEGREE_RADIANS
The size of one degree in radians. |
static double |
HOUR_RADIANS
The size of one hour of right ascension in radians. |
Method Summary | |
---|---|
static double |
decFK4toFK5radians(double raFK4,
double decFK4)
Converts a B1950.0 FK4 position to J2000.0 FK5 at an epoch of B1950.0 yielding Declination This assumes zero proper motion in the FK5 frame. |
static double |
decFK4toFK5Radians(double raFK4,
double decFK4,
double bepoch)
Converts a B1950.0 FK4 position to J2000.0 FK5 yielding Declination. |
static double |
decFK5toFK4radians(double raFK5,
double decFK5)
Converts a J2000.0 FK5 position to B1950.0 FK4 at an epoch of B1950.0 yielding Declination. |
static double |
decFK5toFK4Radians(double raFK5,
double decFK5,
double bepoch)
Converts a J2000.0 FK5 position to B1950.0 FK4 yielding Declination. |
static double |
degreesToRadians(double deg)
Converts degrees to radians. |
static double |
dmsToRadians(double deg,
double min,
double sec)
Converts degrees, minutes, seconds to an angle in radians. |
static double |
dmsToRadians(String dms)
Converts a formatted degrees:minutes:seconds string to an angle in radians. |
static double |
hmsToRadians(double hour,
double min,
double sec)
Converts hours, minutes, seconds to an angle in radians. |
static double |
hmsToRadians(String hms)
Converts a formatted hours:minutes:seconds string to an angle in radians. |
static double |
hoursToRadians(double hours)
Converts hours to radians. |
static double |
radiansToDegrees(double rad)
Converts radians to degrees. |
static String |
radiansToDms(double rad)
Converts an angle in radians to a formatted degrees:minutes:seconds string. |
static String |
radiansToDms(double rad,
int secFig)
Converts an angle in radians to a formatted degrees:minutes:seconds string with a given number of decimal places in the seconds field. |
static String |
radiansToHms(double rad)
Converts an angle in radians to a formatted hours:minutes:seconds string. |
static String |
radiansToHms(double rad,
int secFig)
Converts an angle in radians to a formatted hours:minutes:seconds string with a given number of decimal places in the seconds field. |
static double |
raFK4toFK5radians(double raFK4,
double decFK4)
Converts a B1950.0 FK4 position to J2000.0 FK5 at an epoch of B1950.0 yielding Right Ascension. |
static double |
raFK4toFK5Radians(double raFK4,
double decFK4,
double bepoch)
Converts a B1950.0 FK4 position to J2000.0 FK5 yielding Right Ascension. |
static double |
raFK5toFK4radians(double raFK5,
double decFK5)
Converts a J2000.0 FK5 position to B1950.0 FK4 at an epoch of B1950.0 yielding Declination. |
static double |
raFK5toFK4Radians(double raFK5,
double decFK5,
double bepoch)
Converts a J2000.0 FK5 position to B1950.0 FK4 yielding Declination. |
static double |
skyDistanceRadians(double ra1,
double dec1,
double ra2,
double dec2)
Calculates the separation (distance around a great circle) of two points on the sky in radians. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEGREE_RADIANS
public static final double HOUR_RADIANS
public static final double ARC_MINUTE_RADIANS
public static final double ARC_SECOND_RADIANS
Method Detail |
---|
public static String radiansToDms(double rad)
rad
- angle in radians
rad
public static String radiansToDms(double rad, int secFig)
rad
- angle in radianssecFig
- number of decimal places in the seconds field
rad
public static String radiansToHms(double rad)
rad
- angle in radians
rad
public static String radiansToHms(double rad, int secFig)
rad
- angle in radianssecFig
- number of decimal places in the seconds field
rad
public static double dmsToRadians(String dms)
dm[s]
, or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
dms
- formatted DMS string
dms
NumberFormatException
- if dms
can't be parsed as
a degrees:minutes:seconds stringpublic static double hmsToRadians(String hms)
hm[s]
, or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
hms
- formatted HMS string
hms
NumberFormatException
- if dms
can't be parsed as
an hours:minutes:seconds stringpublic static double dmsToRadians(double deg, double min, double sec)
In conversions of this type, one has to be careful to get the
sign right in converting angles which are between 0 and -1 degrees.
This routine uses the sign bit of the deg
argument,
taking care to distinguish between +0 and -0 (their internal
representations are different for floating point values).
It is illegal for the min
or sec
arguments
to be negative.
deg
- degrees part of anglemin
- minutes part of anglesec
- seconds part of angle
IllegalArgumentException
- if an argument after the first
non-zero one is negativepublic static double hmsToRadians(double hour, double min, double sec)
In conversions of this type, one has to be careful to get the
sign right in converting angles which are between 0 and -1 hours.
This routine uses the sign bit of the hour
argument,
taking care to distinguish between +0 and -0 (their internal
representations are different for floating point values).
hour
- degrees part of anglemin
- minutes part of anglesec
- seconds part of angle
IllegalArgumentException
- if an argument after the first
non-zero one is negativepublic static double skyDistanceRadians(double ra1, double dec1, double ra2, double dec2)
ra1
- right ascension of point 1 in radiansdec1
- declination of point 1 in radiansra2
- right ascension of point 2 in radiansdec2
- declination of point 2 in radians
public static double hoursToRadians(double hours)
hours
- angle in hours
public static double degreesToRadians(double deg)
deg
- angle in degrees
public static double radiansToDegrees(double rad)
rad
- angle in radians
public static double raFK4toFK5radians(double raFK4, double decFK4)
raFK4
- right ascension in B1950.0 FK4 system (radians)decFK4
- declination in B1950.0 FK4 system (radians)
Pal.Fk45z(uk.ac.starlink.pal.AngleDR, double)
public static double decFK4toFK5radians(double raFK4, double decFK4)
raFK4
- right ascension in B1950.0 FK4 system (radians)decFK4
- declination in B1950.0 FK4 system (radians)
Pal.Fk45z(uk.ac.starlink.pal.AngleDR, double)
public static double raFK5toFK4radians(double raFK5, double decFK5)
raFK5
- right ascension in J2000.0 FK5 system (radians)decFK5
- declination in J2000.0 FK5 system (radians)
Pal.Fk54z(uk.ac.starlink.pal.AngleDR, double)
public static double decFK5toFK4radians(double raFK5, double decFK5)
raFK5
- right ascension in J2000.0 FK5 system (radians)decFK5
- declination in J2000.0 FK5 system (radians)
Pal.Fk54z(uk.ac.starlink.pal.AngleDR, double)
public static double raFK4toFK5Radians(double raFK4, double decFK4, double bepoch)
bepoch
parameter is the epoch at which the position in
the FK4 frame was determined.
raFK4
- right ascension in B1950.0 FK4 system (radians)decFK4
- declination in B1950.0 FK4 system (radians)bepoch
- Besselian epoch
Pal.Fk45z(uk.ac.starlink.pal.AngleDR, double)
public static double decFK4toFK5Radians(double raFK4, double decFK4, double bepoch)
bepoch
parameter is the epoch at which the position in
the FK4 frame was determined.
raFK4
- right ascension in B1950.0 FK4 system (radians)decFK4
- declination in B1950.0 FK4 system (radians)bepoch
- Besselian epoch
Pal.Fk45z(uk.ac.starlink.pal.AngleDR, double)
public static double raFK5toFK4Radians(double raFK5, double decFK5, double bepoch)
raFK5
- right ascension in J2000.0 FK5 system (radians)decFK5
- declination in J2000.0 FK5 system (radians)bepoch
- Besselian epoch
Pal.Fk54z(uk.ac.starlink.pal.AngleDR, double)
public static double decFK5toFK4Radians(double raFK5, double decFK5, double bepoch)
raFK5
- right ascension in J2000.0 FK5 system (radians)decFK5
- declination in J2000.0 FK5 system (radians)bepoch
- Besselian epoch
Pal.Fk54z(uk.ac.starlink.pal.AngleDR, double)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |