Hi!
The startracker outputs a list of stars in the body frame and the celestial frame.
For the kalman filter, this is a great place to start:
The unscented filter is, in my opinion, the easiest to use - you generate a set of 2N+1 points, with the same covariance as your measurement, centered around the measurement itself. Example:
(I apologize for the notation - I have been using matlab a lot recently and it has rotted my brain)
sigma=sqrt(POS_VARIANCE)*PIXSCALE*pi/(3600*180) %values are in calibration.txt
v=[s.x s.y s.z] %measurment
k=[eye(3)*sigma;0 0 0;-eye(3)*sigma]*sqrt(3)+repmat(v,[7,1])
k=k./sqrt(sum(k.^2,2)) %normalize
P_meas=cov(k)+eps*eye(3) %note: eps is a builtin that gives you a very small number - it's good to add this along the diagonal of the covariance matrix to account for rounding error and help with numerical stability
If you'd rather just have an attitude + an attitude covariance matrix, you can try this:
I have also put together a reference guide on the kalman filter - mainly for my own reference, but perhaps it will be useful to you:
If there is anything that still doesn't make sense, let me know!