Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Attitude Estimator Sun Vector Representation #289

Merged
merged 2 commits into from
Jan 15, 2021

Conversation

kylekrol
Copy link
Member

@kylekrol kylekrol commented Jan 7, 2021

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):

python -m psim -s 20000 -p fc/attitude,sensors/sun_sensors -ps 1 -c sensors/base,truth/base,truth/deployment -v AttitudeEstimatorTestGnc

Before the update:

broke_px
broke_py
broke_pz

After the update:

fix_px
fix_py
fix_pz

@kylekrol kylekrol requested review from shihaocao, tanishqaggarwal and stewartaslan and removed request for tanishqaggarwal January 7, 2021 19:56
@kylekrol kylekrol merged commit c6af6a9 into master Jan 15, 2021
@kylekrol kylekrol deleted the bugfix/sun-vector-repr branch January 15, 2021 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust Attitude Estimator Sun Vector Error Representation
2 participants