DavenportQMethod.estimate

giant.stellar_opnav.estimators.davenport_q_method:

DavenportQMethod.estimate(target_frame_directions, base_frame_directions, weights)[source]

This method solves for the rotation matrix that best aligns the unit vectors in base_frame_directions with the unit vectors in target_frame_directions using Davenport’s Q-Method solution to Wahba’s Problem.

Once the appropriate attributes have been set, simply call this method with no arguments and the solved for rotation will be stored in the rotation attribute as an Rotation object.

Parameters:
  • target_frame_directions (ndarray[tuple[Any, ...], dtype[float64]]) – Matrix of observed unit vectors (3xN)

  • base_frame_directions (ndarray[tuple[Any, ...], dtype[float64]]) – Matrix of reference unit vectors (3xN)

  • weights (ndarray[tuple[Any, ...], dtype[float64]] | None) – Vector of weights for each observation (N,) or None

  • n_iter – Number of iterations for lambda computation (default=5, use 0 for lam=1)

Returns:

Optimal attitude quaternion

Return type:

Rotation