Once you have converted pixel coordinates into world coordinates (§3.7), you may want to format them as text before displaying them. Typically, this would convert from (say) radians into something more comprehensible. Using the FrameSetFrameSet pointer “wcsinfo” obtained in §3.4 and a pair of world coordinates “xw” and “yw” (e.g. see §3.7), you could proceed as follows:
Here, the second argument to astFormatastFormat is the axis number.
With celestial coordinates, this will usually result in sexagesimal notation, such as “12:34:56.7”. However, the same method may be applied to any type of coordinates and appropriate formatting will be employed.
For more information about formatting coordinate values and how to
control the style of formatting used, see
§7.6 and
§8.6. If necessary, also see
§7.7 for details of how to “normalise” a set of
coordinates so that they lie within the standard range (e.g. 0
to 24 hours for right ascension and for
declination).