【问题标题】:how to calculate geo cordinates of sector points given center and azimuth如何计算给定中心和方位角的扇区点的坐标
【发布时间】:2021-08-30 19:22:31
【问题描述】:

我有中心点的地理坐标,半径和方位角以及扇形角也是已知的。基于这些参数,我想计算扇区点的 GEO 坐标。请检查图片以了解确切的问题。

我检查了以下问题,但不完全是我想要的。我完全了解 GEO 空间几何。

How to calculate endPoint using initial point, distance and azimuth?

【问题讨论】:

  • 已知方位角是多少?图片不显示。
  • 扇区的方向以度为单位。
  • 行业方向是什么?请在图片上标注

标签: geolocation geometry geo


【解决方案1】:

以下应该为您提供所需的端点。我参考了Geo Distance with Azimuth。 您只需要更改扇区点的方位角。

type GeoPoint struct {
    Longitude float64
    Latitude  float64
}

findEndPoint(lon float64, lat float64, azimuth float64, distance float64) GeoPoint {
    b := distance / 6371.0

    a := math.Acos(math.Cos(b)*math.Cos(convertToRadians(90-lat)) + math.Sin(convertToRadians(90-lat))*math.Sin(b)*math.Cos(convertToRadians(azimuth)))
    B := math.Asin(math.Sin(b) * math.Sin(convertToRadians(azimuth)) / math.Sin(a))

    lat2 := 90 - convertToDegrees(a)
    lon2 := convertToDegrees(B) + lon

    return GeoPoint{lon2, lat2}
}

point1 := findEndPoint(lon, lat, azimuth-(beamWidth/2), distance)
point2 := findEndPoint(lon, lat, azimuth+(beamWidth/2), distance)

【讨论】:

    猜你喜欢
    • 2021-08-04
    • 1970-01-01
    • 2011-09-07
    • 2014-04-11
    • 2011-05-30
    • 1970-01-01
    • 2010-10-27
    • 2016-07-26
    • 2022-08-19
    相关资源
    最近更新 更多