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

ADD tilt twist control (twist around z) #2782

Merged
merged 2 commits into from
Sep 22, 2021

Conversation

EwoudSmeur
Copy link
Member

This commit implements tilt twist control for vehicles that rotate slow
in the z axis compared to the other axes (like tailsitters).

The attitude error is decomposed in a tilt and a twist part, and the
tilt error is compensated assuming that the rotation around z is zero
(very slow in comparison).

I can add the test to the other algebra tests if needed.

This commit implements tilt twist control for vehicles that rotate slow
in the z axis compared to the other axes (like tailsitters).

The attitude error is decomposed in a tilt and a twist part, and the
tilt error is compensated assuming that the rotation around z is zero
(very slow in comparison).
Copy link
Member

@gautierhattenberger gautierhattenberger left a comment

Choose a reason for hiding this comment

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

the test binary file should be removed

@@ -618,6 +618,39 @@ void float_quat_of_rmat(struct FloatQuat *q, struct FloatRMat *rm)
}
}

#include <stdio.h>

Choose a reason for hiding this comment

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

to be removed

#include <stdio.h>
/**
* @brief Tilt twist decomposition of a quaternion (z axis)
*

Choose a reason for hiding this comment

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

maybe provide a bit of mathematical details ? it is not so obvious what this function does

@@ -481,6 +481,9 @@ extern void float_quat_of_orientation_vect(struct FloatQuat *q, const struct Flo
/// Quaternion from rotation matrix.
extern void float_quat_of_rmat(struct FloatQuat *q, struct FloatRMat *rm);

/// Tilt twist decomposition of quaternion
void float_quat_tilt_twist(struct FloatQuat *tilt, struct FloatQuat *twist, struct FloatQuat *quat);

Choose a reason for hiding this comment

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

add extern, for consistency, it is technically not needed

@gautierhattenberger gautierhattenberger added Airborne Enhancement Improve upon exiting functionality labels Sep 22, 2021
@EwoudSmeur
Copy link
Member Author

@gautierhattenberger thanks for your comments, sorry I guess I was a bit hasty pushing this! It is tested though 😇

Copy link
Member

@gautierhattenberger gautierhattenberger left a comment

Choose a reason for hiding this comment

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

thanks

@gautierhattenberger gautierhattenberger merged commit 5dd484e into paparazzi:master Sep 22, 2021
@EwoudSmeur EwoudSmeur deleted the tilt_twist_ctrl branch September 23, 2021 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Airborne Enhancement Improve upon exiting functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants