The attitude estimator was having difficulty in processing sun vectors when the expected measurement was nearly aligned with the body z axis. Given the filter used a spherical angle sun vector representation, some of the generated sigma points would have phi values nearly 180 degrees apart from one another (if a sigma point rotation tipped the expected sun vector measurement over top of the z axis). This caused the filter to have severe stability issues.
To remedy this, an extra transformation bringing the sun vector to the x axis is applied to all measurements. This ensures our noise representation is spherical coordinates doesn't exhibit large nonlinearities.
Testing
Plots were generated using the following command (note PRs through #288 are required for testing):
Fix Attitude Estimator Sun Vector Representation
Fixes #229.
Summary of changes
The attitude estimator was having difficulty in processing sun vectors when the expected measurement was nearly aligned with the body z axis. Given the filter used a spherical angle sun vector representation, some of the generated sigma points would have
phi
values nearly 180 degrees apart from one another (if a sigma point rotation tipped the expected sun vector measurement over top of the z axis). This caused the filter to have severe stability issues.To remedy this, an extra transformation bringing the sun vector to the x axis is applied to all measurements. This ensures our noise representation is spherical coordinates doesn't exhibit large nonlinearities.
Testing
Plots were generated using the following command (note PRs through #288 are required for testing):
Before the update:
After the update: