Go up one levelGo to Previous Go to Next

World Coordinates in C

We also support conversion between hh:mm:ss [+-]dd:mm:ss format and floating point degrees for plain, ANSI C based applications.

The following structs, defined in worldCoords.h , represent the world coordinate values:

 
typedef struct {  
    int hours;  
    int min; 
    double sec; 
    double val;		 
WC_HMS; 
typedef struct {  
    WC_HMS ra, dec; 
} WC;

A number of routines are defined to operate on the WC struct, so that you can specify the coordinates of an object as doubles in degrees or in hh:mm:ss [+-]dd:mm:ss format:

World Coordinate C Utility Routines

Routine

Description

wcInitNull

initialize null world coordinates

wcIsNull

return true if the given coords are null

wcInitFromStrings

initialize world coords from char strings containing RA and DEC

wcInitFromHMS

initialize from RA, DEC in H:M:S D:M:S format and equinox

wcInitFromDeg

initialize from RA, DEC in degrees and equinox

wcPrint

print RA and DEC to the given buffers in the given equinox

See worldCoords(3) for more details.


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory