Before considering the important subject of using FrameSets to convert between coordinate systems (14.2), let us return briefly to reconsider the output generated by astConvertastConvert. We used this function earlier (12), when converting between the coordinate systems represented by various kinds of FrameFrame, and indicated that it returns a FrameSetFrameSet to represent the coordinate conversion it identifies. We are now in a position to examine the structure of this FrameSet.
Take our earlier example (12.1) of converting between the celestial coordinate systems represented by two SkyFrames:
#include "ast.h" AstFrameSet *cvt; AstSkyFrame *skyframe1, *skyframe2; ... skyframe1 = astSkyFrame( "System=FK4-NO-E, Epoch=B1958, Equinox=B1960" ); skyframe2 = astSkyFrame( "System=Ecliptic, Equinox=J2010.5" ); cvt = astConvert( skyframe1, skyframe2, "" );
This will produce a pointer, ``cvt'', to the FrameSet shown in the Figure below.
As we noted earlier (12.1), the FrameSet returned by astConvert may be used both as a Mapping and as a Frame to perform most of the functions you are likely to need. However, the Mapping may be extracted for use on its own if necessary, using astGetMappingastGetMapping (13.7), for example:
AstMapping *mapping; ... mapping = astGetMapping( cvt, AST__BASE, AST__CURRENT );