DavenportQMethod.compute_residuals¶
giant.stellar_opnav.estimators
:
This method computes the residuals between the aligned unit vectors according to Wahba’s problem definitions.
If the updated attitude has been estimated (
rotation
is notNone
) then this method computes the post-fit residuals. If not then this method computes the pre-fit residuals. The residuals are computed according to\[r_i=\frac{1}{2}\left\|\mathbf{a}_i-\mathbf{T}\mathbf{b}_i\right\|^2\]where \(r_i\) is the residual, \(\mathbf{a}_i\) is the camera direction unit vector, \(\mathbf{b}_i\) is the database direction unit vector, and \(\mathbf{T}\) is the solved for rotation matrix from the catalogue frame to the camera frame, or the identity matrix if the matrix hasn’t been solved for yet.
The output will be a length n array with each element representing the residual for the correspond unit vector pair.
- Returns:
The residuals between the aligned unit vectors
- Return type:
ndarray