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

rotation: add ROTATION_ROLL_270_YAW_225 and ROTATION_ROLL_270_YAW_315 #15343

Closed
wants to merge 1 commit into from

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Jul 15, 2020

Describe problem solved by this pull request
These rotations were missing and there's no way to set completely custom ones.

Describe possible alternatives
This shows that we should enable to use custom rotations.

Test data / coverage
These were tested and used on a real vehicle.

Additional context
#14797
#15264

@MaEtUgR MaEtUgR requested a review from bkueng July 15, 2020 17:03
@MaEtUgR MaEtUgR self-assigned this Jul 15, 2020
@LorenzMeier
Copy link
Member

Who will send a PR to the QGC repo for the matching rotation ENUM? Have you checked the sync to MAVLink?

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 15, 2020

@LorenzMeier Then we should maybe keep them as our custom rotations. I honestly do not see anyone else using these exact numbers and hence I also don't see why supporting them explicitly in MAVLink and QGC is worth any effort. The system needs to allow setting an arbitrary custom mag orientation that would be worth the effort.

@@ -102,9 +102,11 @@ PARAM_DEFINE_INT32(CAL_MAG0_EN, 1);
* @value 43 Pitch 90°, Yaw 180°
* @value 44 Pitch 9°, Yaw 180°
* @value 45 Pitch 45°
* @value 46 Roll 270°, Yaw 225°
Copy link
Member

Choose a reason for hiding this comment

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

Add a value of 1000 here that means "custom". Then add three parameters for the angles (in degrees) for all three. Then wrap the rotate function (please don't add parameters into it, because those are runtime heavy) in the mag driver where it will either take one of the standard ones, or if you have set it to custom, where it will read these parameters and apply a full rotation.

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Aug 26, 2020

Since this got a placeholder for custom rotations I'm closing.

@MaEtUgR MaEtUgR closed this Aug 26, 2020
@MaEtUgR MaEtUgR deleted the add_missing_mag_rotations branch August 26, 2020 15:03
@MaEtUgR MaEtUgR restored the add_missing_mag_rotations branch January 16, 2021 07:46
@MaEtUgR MaEtUgR reopened this Jan 16, 2021
@LorenzMeier LorenzMeier deleted the add_missing_mag_rotations branch January 31, 2021 13:44
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.

2 participants