This is a slightly unusual topic .
I have been writing a utility program to extract lots of information from the Cassini SPICE kernels, for example determining exactly what Cassini's cameras 'see' at a given time. I'm using the CSPICE toolkit.
I have had no problems determining Cassini's location in either the J2000 or the IAU_<target> reference frames and subsequently the subspacecraft longitude/latitude, distance and illumination geometry using spkezr_c, subpt_c etc.
However, determining the camera pointing and then using it to determine the location of the subspacecraft point in the image as well as the north azimuth has been problematic. This is trivial if I know the camera angles (right ascension, declination and twist), see e.g. appendix A in Cooper et. al., Icarus 181 (2006), 223-234. However if I don't know these angles I need to extract a C-matrix from one of the CK kernel files. This works but these files contain only the rotation of the entire spacecraft (this is not unexpected since the instruments are body fixed so this can be used to determine where they are looking). However, I have had problems using this C-matrix to determine the exact viewing geometry. I need to somehow 'convert' it to a C-matrix that gives me the camera angles. My code is very close to working but one of the camera angles is always off by 180 degrees. I will probably eventually figure this out but I know there are some people here who have done something similar, in particular jmknapp (however, he has been inactive for several weeks now) so I decided to try asking here.
Has anyone here done something similar to what I'm doing ?