Find Yaw and Pitch of center point of a line segment with respect to static frame

14 visualizzazioni (ultimi 30 giorni)
Assuming I have 2 points in 3D space A (x1,y1,z1) and B(x2, y2, z2) with respect to the same reference frame.
3D reference frame is a right handed coordinate frame with +Z-axis up, +X-axis front and +Y-axis left
Q1: I need to calculate the position and orientation (roll, pitch, yaw) of the center point between these two points in 6DoF with respect to the origin frme. Aka the orientation of the center point of the line connecting this two points wrt to the origin frame.
To get the position coordinates of centroid point wrt to origin C: C ( (x1+x2)/2 , (y1+y2)/2 ,(z1+z2)/2).
To calculate yaw:
project both points on to the XY plane. then calculate the angle between the projection segment and the Y-axis.
Q2: Do both points need to be coplanar on the Z axis?
TO CALCULATE THE PITCH.
Q2: I try to calculate it by projecting the points into the ZX axis and calculating the angle between the segment connecting the projected points and the X axis. Is this approach correct?
If you have any suggestions or can correct me if my thinking is wrong here please. thank you for your help.
  1 Commento
Paul
Paul il 22 Dic 2022
Hi VR,
The axes in the figure do not form a right-handed coordinate frame. It looks like the x- and y-axes are reversed relative to the description in the question.

Accedi per commentare.

Risposta accettata

William Rose
William Rose il 22 Dic 2022
It is not possible to "calculate the position and orientation (roll, pitch, yaw) of the center point". A point does not have a roll, pitch, and yaw. A line segment (such as the segment from A to B) also does not have a roll pitch , and yaw. To get roll, pitch, and yaw, you need at least 3 non-colinear points, and you need a rule which defines a coordinate system in terms of those three points. Your point C will not suffice, since it is on the same line as A and B.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by