Functions for angle transformations and manipulations, with angles generally in degrees. In particular, methods for translating between degrees and HH:MM:SS.S or DDD:MM:SS.S type sexagesimal representations are provided.
degreesToDms( deg )deg (floating point): angle in degrees
degdegreesToDms( deg, secFig )deg (floating point): angle in degrees
secFig (integer): number of decimal places in the seconds field
degdegreesToHms( deg )deg (floating point): angle in degrees
degdegreesToHms( deg, secFig )deg (floating point): angle in degrees
secFig (integer): number of decimal places in the seconds field
degdmsToDegrees( dms )dm[s], or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
dms (String): formatted DMS string
dmshmsToDegrees( hms )hm[s], or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
hms (String): formatted HMS string
hmsdmsToDegrees( 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
hmsToDegrees( 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
skyDistanceDegrees( ra1, dec1, ra2, dec2 )ra1 (floating point): right ascension of point 1 in degrees
dec1 (floating point): declination of point 1 in degrees
ra2 (floating point): right ascension of point 2 in degrees
dec2 (floating point): declination of point 2 in degrees
posAngDegrees( ra1, dec1, ra2, dec2 )ra1 (floating point): right ascension of point 1 in degrees
dec1 (floating point): declination of point 1 in degrees
ra2 (floating point): right ascension of point 2 in degrees
dec2 (floating point): declination of point 2 in degrees
polarDistanceDegrees( ra1, dec1, radius1, ra2, dec2, radius2 )ra1 (floating point): right ascension of point 1 in degrees
dec1 (floating point): declination of point1 in degrees
radius1 (floating point): distance from origin of point1
ra2 (floating point): right ascension of point 2 in degrees
dec2 (floating point): declination of point2 in degrees
radius2 (floating point): distance from origin of point2
radius1 and radius2