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] correct pseudo_mag projection #2803

Merged
merged 1 commit into from Nov 30, 2021

Conversation

gautierhattenberger
Copy link
Member

The projection of the magnetometer was not correct. The invariant INS require to have the mag correctly projected in 3D and not only in the horizontal plane.

The PR #2779 is also doing the wrong projection when sending Abi MAG message. It would be better to merge the different ways to produce virtual MAG data from GPS course, or maybe create a dedicated message REMOTE_MAG to send the correct measurement from the ground independently from the REMOTE_GPS message.

Copy link
Member

@EwoudSmeur EwoudSmeur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me, ok with merging.
However, it looks like the final comparison with the expected field is in 2D, so it may be possible to simplify this a bit. However, this is more complete.

I agree with your idea of the remote mag message. I think it would be a neater way of doing it. Having this same computation in every INS seems redundant.

@gautierhattenberger
Copy link
Member Author

Actually, the "virtual" mag vector is in 3D (even if the virtual field is along the x/north axis only). The comparison (computation of Eb in error function) is in full 3D and requires a correct projection (so not only turning measure vector around psi).
I will open en issue as a reminder to make a correct remote mag sensor.

@gautierhattenberger gautierhattenberger merged commit 8a62481 into paparazzi:master Nov 30, 2021
@gautierhattenberger gautierhattenberger deleted the fix_ins_inv_mag branch November 30, 2021 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants