📌  相关文章
📜  两点纬度经度之间的度数c#代码示例

📅  最后修改于: 2022-03-11 14:48:43.447000             🧑  作者: Mango

代码示例1
float lambda1 = (float)ConvertToRadians(lon1);
float lambda2 = (float)ConvertToRadians(lon2);
float fi1 = (float)ConvertToRadians(lon1);
float fi2 = (float)ConvertToRadians(lon2);

float y = Mathf.Sin(lambda2 - lambda1) * Mathf.Cos(fi2);
float x = Mathf.Cos(fi1) * Mathf.Sin(fi2) - Mathf.Sin(fi1) * Mathf.Cos(fi2) * Mathf.Cos(lambda2 - lambda1);
float degree = (float)ConvertToDegree(Mathf.Atan2(y, x));