Next Previous Up Contents
Next: Activation Functions
Up: General Functions
Previous: Lists
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 )
 Converts an angle in degrees to a formatted degrees:minutes:seconds
string. No fractional part of the seconds field is given.

degreesToDms( deg, secFig )
 Converts an angle in degrees to a formatted degrees:minutes:seconds
string with a given number of decimal places in the seconds field.

degreesToHms( deg )
 Converts an angle in degrees to a formatted hours:minutes:seconds
string. No fractional part of the seconds field is given.

degreesToHms( deg, secFig )
 Converts an angle in degrees to a formatted hours:minutes:seconds
string with a given number of decimal places in the seconds field.

dmsToDegrees( dms )
 Converts a formatted degrees:minutes:seconds string to an angle
in degrees. Delimiters may be colon, space, characters
dm[s]
, or some others.
Additional spaces and leading +/ are permitted.
The :seconds part is optional.

hmsToDegrees( hms )
 Converts a formatted hours:minutes:seconds string to an angle
in degrees. Delimiters may be colon, space, characters
hm[s]
, or some others.
Additional spaces and leading +/ are permitted.
The :seconds part is optional.

dmsToDegrees( deg, min, sec )
 Converts degrees, minutes, seconds to an angle in degrees.
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.

hmsToDegrees( hour, min, sec )
 Converts hours, minutes, seconds to an angle in degrees.
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).

skyDistanceDegrees( ra1, dec1, ra2, dec2 )
 Calculates the separation (distance around a great circle) of
two points on the sky in degrees.

posAngDegrees( ra1, dec1, ra2, dec2 )
 Calculates the position angle between two points on the sky in degrees.
The result is in the range +/180.
If point 2 is due east of point 1, the result is +90.
Zero is returned if the points are coincident.

polarDistanceDegrees( ra1, dec1, radius1, ra2, dec2, radius2 )
 Calculates the distance in three dimensional space
between two points specified in spherical polar coordinates.
Next Previous Up Contents
Next: Activation Functions
Up: General Functions
Previous: Lists
TOPCAT  Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page:
http://www.starlink.ac.uk/topcat/
Author email:
m.b.taylor@bristol.ac.uk
Mailing list:
topcatuser@jiscmail.ac.uk