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.
radiansToDms( rad )
rad (floating point): angle in radiansrad
radiansToDms( rad, secFig )
rad (floating point): angle in radianssecFig (integer): number of decimal places in the seconds fieldrad
radiansToHms( rad )
rad (floating point): angle in radiansrad
radiansToHms( rad, secFig )
rad (floating point): angle in radianssecFig (integer): number of decimal places in the seconds fieldrad
dmsToRadians( dms )
dm[s], or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
dms (String): formatted DMS stringdms
hmsToRadians( hms )
hm[s], or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
hms (String): formatted HMS stringhms
dmsToRadians( deg, min, 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 (floating point): degrees part of anglemin (floating point): minutes part of anglesec (floating point): seconds part of anglehmsToRadians( hour, min, 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 (floating point): degrees part of anglemin (floating point): minutes part of anglesec (floating point): seconds part of angleskyDistanceRadians( ra1, dec1, ra2, dec2 )
ra1 (floating point): right ascension of point 1 in radiansdec1 (floating point): declination of point 1 in radiansra2 (floating point): right ascension of point 2 in radiansdec2 (floating point): declination of point 2 in radiansposAngRadians( ra1, dec1, ra2, dec2 )
ra1 (floating point): right ascension of point 1 in radiansdec1 (floating point): declination of point 1 in radiansra2 (floating point): right ascension of point 2 in radiansdec2 (floating point): declination of point 2 in radianspolarDistanceRadians( ra1, dec1, radius1, ra2, dec2, radius2 )
ra1 (floating point): right ascension of point 1 in radiansdec1 (floating point): declination of point1 in radiansradius1 (floating point): distance from origin of point1ra2 (floating point): right ascension of point 2 in radiansdec2 (floating point): declination of point2 in radiansradius2 (floating point): distance from origin of point2radius1 and radius2
hoursToRadians( hours )
hours (floating point): angle in hoursdegreesToRadians( deg )
deg (floating point): angle in degreesradiansToDegrees( rad )
rad (floating point): angle in radiansraFK4toFK5radians( raFK4, decFK4 )
raFK4 (floating point): right ascension in B1950.0 FK4 system (radians)decFK4 (floating point): declination in B1950.0 FK4 system (radians)decFK4toFK5radians( raFK4, decFK4 )
raFK4 (floating point): right ascension in B1950.0 FK4 system (radians)decFK4 (floating point): declination in B1950.0 FK4 system (radians)raFK5toFK4radians( raFK5, decFK5 )
raFK5 (floating point): right ascension in J2000.0 FK5 system (radians)decFK5 (floating point): declination in J2000.0 FK5 system (radians)decFK5toFK4radians( raFK5, decFK5 )
raFK5 (floating point): right ascension in J2000.0 FK5 system (radians)decFK5 (floating point): declination in J2000.0 FK5 system (radians)raFK4toFK5Radians( raFK4, decFK4, bepoch )
bepoch parameter is the epoch at which the position in
the FK4 frame was determined.
raFK4 (floating point): right ascension in B1950.0 FK4 system (radians)decFK4 (floating point): declination in B1950.0 FK4 system (radians)bepoch (floating point): Besselian epochdecFK4toFK5Radians( raFK4, decFK4, bepoch )
bepoch parameter is the epoch at which the position in
the FK4 frame was determined.
raFK4 (floating point): right ascension in B1950.0 FK4 system (radians)decFK4 (floating point): declination in B1950.0 FK4 system (radians)bepoch (floating point): Besselian epochraFK5toFK4Radians( raFK5, decFK5, bepoch )
raFK5 (floating point): right ascension in J2000.0 FK5 system (radians)decFK5 (floating point): declination in J2000.0 FK5 system (radians)bepoch (floating point): Besselian epochdecFK5toFK4Radians( raFK5, decFK5, bepoch )
raFK5 (floating point): right ascension in J2000.0 FK5 system (radians)decFK5 (floating point): declination in J2000.0 FK5 system (radians)bepoch (floating point): Besselian epochDEGREE_RADIANS
HOUR_RADIANS
ARC_MINUTE_RADIANS
ARC_SECOND_RADIANS