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 radians
radradiansToDms( rad, secFig )rad (floating point): angle in radians
secFig (integer): number of decimal places in the seconds field
radradiansToHms( rad )rad (floating point): angle in radians
radradiansToHms( rad, secFig )rad (floating point): angle in radians
secFig (integer): number of decimal places in the seconds field
raddmsToRadians( dms )dm[s], or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
dms (String): formatted DMS string
dmshmsToRadians( hms )hm[s], or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
hms (String): formatted HMS string
hmsdmsToRadians( 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 angle
min (floating point): minutes part of angle
sec (floating point): seconds part of angle
hmsToRadians( 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 angle
min (floating point): minutes part of angle
sec (floating point): seconds part of angle
skyDistanceRadians( ra1, dec1, ra2, dec2 )ra1 (floating point): right ascension of point 1 in radians
dec1 (floating point): declination of point 1 in radians
ra2 (floating point): right ascension of point 2 in radians
dec2 (floating point): declination of point 2 in radians
posAngRadians( ra1, dec1, ra2, dec2 )ra1 (floating point): right ascension of point 1 in radians
dec1 (floating point): declination of point 1 in radians
ra2 (floating point): right ascension of point 2 in radians
dec2 (floating point): declination of point 2 in radians
polarDistanceRadians( ra1, dec1, radius1, ra2, dec2, radius2 )ra1 (floating point): right ascension of point 1 in radians
dec1 (floating point): declination of point1 in radians
radius1 (floating point): distance from origin of point1
ra2 (floating point): right ascension of point 2 in radians
dec2 (floating point): declination of point2 in radians
radius2 (floating point): distance from origin of point2
radius1 and radius2hoursToRadians( hours )hours (floating point): angle in hours
degreesToRadians( deg )deg (floating point): angle in degrees
radiansToDegrees( rad )rad (floating point): angle in radians
raFK4toFK5radians( 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 epoch
decFK4toFK5Radians( 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 epoch
raFK5toFK4Radians( 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 epoch
decFK5toFK4Radians( 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 epoch
DEGREE_RADIANSHOUR_RADIANSARC_MINUTE_RADIANSARC_SECOND_RADIANS