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
deg
degreesToDms( deg, secFig )
deg
(floating point): angle in degrees
secFig
(integer): number of decimal places in the seconds field
deg
degreesToHms( deg )
deg
(floating point): angle in degrees
deg
degreesToHms( deg, secFig )
deg
(floating point): angle in degrees
secFig
(integer): number of decimal places in the seconds field
deg
dmsToDegrees( dms )
dm[s]
, or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
dms
(String): formatted DMS string
dms
hmsToDegrees( hms )
hm[s]
, or some others.
Additional spaces and leading +/- are permitted.
The :seconds part is optional.
hms
(String): formatted HMS string
hms
dmsToDegrees( 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