It is often necessary to refer to the base and current Frames
() within a FrameSet, but it can be
cumbersome having to obtain their indices from the Base and Current
attributes on each occasion. To make this easier, two macros,
AST__BASE and AST__CURRENT, are defined in the ``ast.h'' header
file and may be used to represent the indices of the base and current
Frames respectively. They may be used whenever a Frame index is
required.
For example, when adding a new Frame to a FrameSet
(), you could use the following to indicate
that the new Frame is related to the existing current Frame, whatever
its index happens to be:
AstFrame *frame; AstMapping *mapping; ... astAddFrame( frameset, AST__CURRENT, mapping, frame );
Of course, the Frame you added would then become the new current Frame.
AST A Library for Handling World Coordinate Systems in Astronomy