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

mc_pos_control move to matrix lib #9141

Merged
merged 1 commit into from
Mar 23, 2018
Merged

mc_pos_control move to matrix lib #9141

merged 1 commit into from
Mar 23, 2018

Conversation

dagar
Copy link
Member

@dagar dagar commented Mar 22, 2018

The motivation for doing this now is to kill off the old mathlib matrix/vector entirely, freeing enough flash for Flight Tasks on px4fmu-v2.

MaEtUgR
MaEtUgR previously approved these changes Mar 23, 2018
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

I don't spot any error, should be fine.

@@ -2708,7 +2706,7 @@ MulticopterPositionControl::calculate_thrust_setpoint()
* project the desired thrust force vector F onto the real vehicle's thrust axis in NED:
* body thrust axis [0,0,-1]' rotated by R is: R*[0,0,-1]' = -R_z */
matrix::Vector3f R_z(_R(0, 2), _R(1, 2), _R(2, 2));
matrix::Vector3f F(thrust_sp.data);
matrix::Vector3f F(thrust_sp);
Copy link
Member

Choose a reason for hiding this comment

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

The extra variable F was only for interface conversion to matrix library. You can delete this line and just write the next one: float thrust_body_z = thrust_sp.dot(-R_z);

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, updated.

@dagar dagar force-pushed the pr-mc_pos_matrix_lib branch 2 times, most recently from 5e4b8c1 to 133a01d Compare March 23, 2018 15:30
@dagar dagar force-pushed the pr-mc_pos_matrix_lib branch from 133a01d to e19feee Compare March 23, 2018 15:32
@dagar dagar merged commit d2712dc into master Mar 23, 2018
@dagar dagar deleted the pr-mc_pos_matrix_lib branch March 23, 2018 16:53
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.

2 participants