I first developed the algorithm we use to reduce HETE-2 star tracker observations using Mathematica. You may obtain a copy of this notebook by clicking HERE.
If you do not have Mathematica, you may obtain MathReader from Wolfram Research's web site.