ESOQ2¶
giant.stellar_opnav.estimators.esoq2
:
Implements the ESOQ2 (Second Estimator of the Optimal Quaternion) solution to Wahba’s problem.
This is a faster technique than Davenport’s Q-Method solution but slightly less accurate.
This class is relatively easy to use. After you initialize the class, simply specify the target_frame_directions unit vectors (:math:` extbf{a}_i` from the
estimators
documentation) as a 3xn array of vectors (each column is a vector) and the base_frame_directions unit vectors (:math:` extbf{b}_i` from theestimators
documentation) as a 3xn array of vectors (each column is a vector) in the call toestimate()
. Here the target_frame_directions unit vectors are expressed in the end frame (the frame you want to rotate to) and the base_frame_directions unit vectors are expressed in the starting frame (the frame you want to rotate from). Each column of target_frame_directions and base_frame_directions should correspond to each other as a pair (i.e. column 1 in target_frame_directions is paired with column ` in base_frame_directions.Optionally, you can set the
weighted_estimation
value to True and then provide the weights input toestimate()
to specify whether to use weighted estimation or not, and what weights to use if you are using weighted estimation. The weights input should be a length n array of the weights to apply to each unit vector pair.The
estimate()
method can be called to compute the attitude quaternion that best aligns the two frames. When theestimate()
method completes, the solved for rotation is returned as anRotation
object. In addition, the formal post fit covariance matrix of the estimate can be found in thepost_fit_covariance
attribute. Note that as with all attitude quaternions, the post fit covariance matrix will be rank deficient since there are only 3 true degrees of freedom.- Parameters:
options (ESOQ2Options | None) – the options dataclass to use to configure this class
Number of iterations for lambda computation in ESOQ2 algorithm.
Determine the options input to the dataclass.
This property method will ignore all internal properties and functions
Get the original configuration options.
- Returns:
OptionsT: The original options used during initialization.
Warning
Modifying the returned object will affect reset behavior.
A flag specifying whether to use weights in the estimation of the rotation.
This returns the post-fit covariance after calling the
estimate
method as a 4x4 numpy array.This should be only be called after the estimate method has been called, otherwise it raises a ValueError
Note that this uses the same covariance as Davenport’s Q-Method solution, which is technically the lower bound.
Summary of Methods
Update the options as attributes of the object class |
|
Computes the attitude profile matrix for the provided vector sets |
|
Compares each attribute of self to other and stores the result in a dict mapping the attribute to the comparison result. |
|
This method computes the residuals between the aligned unit vectors according to Wahba's problem definitions. |
|
This function uses the ESOQ2 algorithm to determine the optimal attitude quaternion given sets of observed and reference unit vectors. |
|
this is used to overwrite options in variables only used in __init__ |
|
This method is used for special cases when certain options should be overwritten |
|
Resets the class to the state it was originally initialized with. |