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

조회 수: 2 (최근 30일)
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
Paul
Paul 2022년 12월 22일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

William Rose
William Rose 2022년 12월 22일
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.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by