计算坐标/线之间的角度

问题描述:

我对如何计算坐标/线之间的角度有疑问。

我有四个标签,用XY坐标逗号分隔。

我应该使用哪些C#代码在Label_Angle_Result中获得所需的值



首选路线

固定点A. Label_FP_A 的。 X,Y

固定点B。 Label_FK_B 的。 X,Y



GPS的测量点

GPS点A. Label_GPS_A 的。 X,Y

GPS点B。 Label_GPS_B 的。 X,Y



结果

角度 Label_Angle_Result 。号码



我尝试了什么:



我看一下CAD解决方案,但我没有找到任何好的连接..

I have a question about how the calculate angles between coordinates / lines.
I have four labels filled with XY coordinates comma delimited.
Which C# code should I use to get the desired value in Label_Angle_Result

Preferred route
Fixed Point A . Label_FP_A . X,Y
Fixed Point B . Label_FK_B . X,Y

Measured point of GPS
GPS Point A . Label_GPS_A . X,Y
GPS Point B . Label_GPS_B . X,Y

Result
Angle Label_Angle_Result . number

What I have tried:

I look in the CAD solutions but I have not found anything good here in connection..

因为你有3个组件我们正在谈论3D空间中的向量(为什么?).. 。

要计算角度,你必须知道两件事:



1.两个向量的点积......

As you have 3 components we are talking about vectors in the 3D space (Why?)...
To calculate the angle you have to know two things:

1. Dot product of two vectors...


\vec {a} \cdot \ vec {b}
\vec{a} \cdot \vec{b}




哪个是


Which is