Sign in to follow this  

calculate pitch and roll from vector

This topic is 1603 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

 

I'm working on a simple plane sim that can only roll and pitch. It cannot yaw. There is no inertia or slippage so that all velocity is in the x direction in the body frame (y being to my right, z is my down) like this. Say I'm given a second vector that I want to try and align myself with. If the vector is in the +- z direction, I can pitch to get there. But if there is any y component to the vector (in my body frame), then I will have to do some combination of roll and pitch to get there. For example, if it's in my x-y plane but directly to my left, I'll have to roll by -pi/2, then pitch until I'm aligned. Or I could start pitching while rolling. It seems to me like there would be multiple ways to achieve the same action.

Is there a standard way to compute this sort of thing? I've seen a good number of examples where yaw is not constrained, in which case you can do something like yaw=atan2(-vel.y, vel.x);  Any idea for the yaw-constrained case?

Share this post


Link to post
Share on other sites

This topic is 1603 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this