Most Efficient way to solve for Euler Angles

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 3K views
Robconway
Messages
4
Reaction score
0
Hi guys, could you please help me out?

Essentially, a laser is pointing at a certain point in 3 dimensional space. There is a fixed target that the laser is specifically supposed to point to. My job is to find the most efficient way to solve for the euler angles(yaw pitch and roll) in order to sync the laser with the target point. What is the best way to do this? The values known are the direct distance from the laser to to the target, the distance from the laser to the initial point, and the distance from the initial point to the fixed target. Thank you guys, it would help a lot!
 
Mathematics news on Phys.org
You need more or different info. One set of info that would be sufficient is the cartesian coordinates of the initial point and the target with respect to the laser plus the yaw, pitch, and roll of the laser in that coordinate system. Another sufficient set is yaw, pitch, and roll of the laser plus the yaw and pitch of the target position with respect to some fixed coordinate system. It's not clear exactly what your particular situation is, but the info you've given is not sufficient to solve the problem.
 
A vector pointing from [itex](x_0, y_0, z_0)[/itex] to [itex](x_1, y_1, z_1)[/itex] can be written as [itex]\vec{v}= (x_1- x_0)\vec{i}+ (y_1- y_0)\vec{j}+ (z_1- z_0)\vec{j}[/itex]. Its length is
[tex]|\vec{v}|= r= \sqrt{(x_1-x_0)^2+ (y_1- y_0)^2+ (z_1- z_0)2}[/tex]

Finally, the unit vector in that direction is
[tex]\frac{\vec{v}}{|\vec{v}|}= \frac{x_1- x_0}{r}\vec{i}+ \frac{y_1- y_0}{r}\vec{j}+ \frac{z_1- z_0}{r}\vec{k}[/tex]

So the Euler angles are given by
[tex]cos(\theta_x)= \frac{x_1- x_0}{r}[/tex]
[tex]cos(\theta_y)= \frac{y_1- y_0}{r}[/tex]
[tex]cos(\theta_z)= \frac{z_1- z_0}{r}[/tex]

That is, the Euler angles for a given direction are the arccosines of the components of a unit vector in that direction.