Loading [MathJax]/extensions/TeX/AMSsymbols.js
LAL 7.7.0.1-da3b9d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Header TranslateAngles.h

Detailed Description

Module for translating between 'hms' (RA) and 'dms' (DEC) angle strings and radians.

Author
Reinhard Prix

Prototypes

int XLALTranslateHMStoRAD (REAL8 *radians, const CHAR *hms)
 Translate a string representing an angle in the form "hours:minutes:seconds" into radians. More...
 
int XLALTranslateDMStoRAD (REAL8 *radians, const CHAR *dms)
 Translate a string representing an angle in the form "degrees:minutes:seconds" into radians. More...
 
CHARXLALTranslateRADtoHMS (REAL8 radians)
 Translate (longitude, right-ascencsion, RA) radians into hours:minutes:seconds (HMS) format, returns allocated string. More...
 
CHARXLALTranslateRADtoDMS (REAL8 radians)
 Translate (latitude, declination, DEC) radians into "sign*degrees:minutes:seconds" (DMS) format, returns allocated string. More...
 

Function Documentation

◆ XLALTranslateHMStoRAD()

int XLALTranslateHMStoRAD ( REAL8 radians,
const CHAR hms 
)

Translate a string representing an angle in the form "hours:minutes:seconds" into radians.

The string could also just contain "hours:minutes" or "hours", where the absent parts are set to zero.

It requires that the hours value to be within [0, 23] hours, and the minutes and seconds values are within [0, 60). An example would be: XLALTranslateHMStoRAD( &radians, "12:05:07.765" );

Definition at line 81 of file TranslateAngles.c.

◆ XLALTranslateDMStoRAD()

int XLALTranslateDMStoRAD ( REAL8 radians,
const CHAR dms 
)

Translate a string representing an angle in the form "degrees:minutes:seconds" into radians.

The string could also just contain "degrees:minutes" or "degrees", where the absent parts are set to zero.

It requires that the minutes and seconds values are between 0 to 60. Degrees are allowed to be a positive or negative integer between [-360, 360]. An example would be: XLALTranslateDMStoRAD ( &radians, "-06:52:16.875" );

Definition at line 42 of file TranslateAngles.c.

◆ XLALTranslateRADtoHMS()

CHAR * XLALTranslateRADtoHMS ( REAL8  radians)

Translate (longitude, right-ascencsion, RA) radians into hours:minutes:seconds (HMS) format, returns allocated string.

Definition at line 113 of file TranslateAngles.c.

◆ XLALTranslateRADtoDMS()

CHAR * XLALTranslateRADtoDMS ( REAL8  radians)

Translate (latitude, declination, DEC) radians into "sign*degrees:minutes:seconds" (DMS) format, returns allocated string.

Definition at line 148 of file TranslateAngles.c.