ESOQ2.compute_residuals

giant.stellar_opnav.estimators.esoq2:

static ESOQ2.compute_residuals(target_frame_directions, base_frame_directions, rotation)

This method computes the residuals between the aligned unit vectors according to Wahba’s problem definitions.

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 base frame to the target frame.

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

Parameters:
  • target_frame_directions (ndarray[tuple[Any, ...], dtype[float64]])

  • base_frame_directions (ndarray[tuple[Any, ...], dtype[float64]])

  • rotation (Rotation)

Return type:

float