public class CoordsRadians extends Object
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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 |
polarDistanceRadians(double ra1,
double dec1,
double radius1,
double ra2,
double dec2,
double radius2)
Calculates the distance in three dimensional space
between two points specified in spherical polar coordinates.
|
static double |
posAngRadians(double ra1,
double dec1,
double ra2,
double dec2)
Calculates the position angle between two points on the sky in 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.
|
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
public static String radiansToDms(double rad)
rad
- angle in radiansrad
public static String radiansToDms(double rad, int secFig)
rad
- angle in radianssecFig
- number of decimal places in the seconds fieldrad
public static String radiansToHms(double rad)
rad
- angle in radiansrad
public static String radiansToHms(double rad, int secFig)
rad
- angle in radianssecFig
- number of decimal places in the seconds fieldrad
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 stringdms
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 stringhms
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 angleIllegalArgumentException
- 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 angleIllegalArgumentException
- 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 radianspublic static double posAngRadians(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 radianspublic static double polarDistanceRadians(double ra1, double dec1, double radius1, double ra2, double dec2, double radius2)
ra1
- right ascension of point 1 in radiansdec1
- declination of point1 in radiansradius1
- distance from origin of point1ra2
- right ascension of point 2 in radiansdec2
- declination of point2 in radiansradius2
- distance from origin of point2radius1
and radius2
public static double hoursToRadians(double hours)
hours
- angle in hourspublic static double degreesToRadians(double deg)
deg
- angle in degreespublic static double radiansToDegrees(double rad)
rad
- angle in radianspublic 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 epochPal.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 epochPal.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 epochPal.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 epochPal.Fk54z(uk.ac.starlink.pal.AngleDR, double)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.