答案 0 :(得分:0)
偏航和俯仰可以按几个顺序应用。在这里,我假设首先应用偏航(围绕图像中的深度轴旋转)。根据您的坐标系和规范修改以下公式。
可以根据剩下的两个轴(在这种情况下为x和y)的坐标差异来计算偏航:
yaw = atan2(target.x - source.x, target.y - source.y)
您可能需要根据您的坐标系交换源和目标和/或x和y。
然后,音调是:
pitch = atan(target.z - source.z, sqrt((target.x - source.x)² + (target.y - source.y)²)