我不需要編程語言的幫助,我需要某人的幫助來計算特定距離的點的GPS座標,即相距22英尺一圈的圓周。我知道開始的GPS座標和半徑。我非常確定半束縛,或者餘弦的球形定律有答案,但是從我使用任何三角公式開始,我已經很長時間了,我無法弄清楚。我正在使用十進制度,並在這個vb.net編程。如果有人能夠幫我解決這個問題,這將是一個很大的幫助。沿着已知距離的已知圓的圓周計算經度和緯度
1
A
回答
0
據我所知,您有:
- 座標 圓周的中心。
- 之間的距離 圈的圓周上的兩點。
- 圓周半徑。
在我看來,這是不足以計算其他點的座標。您應該擁有至少一個點座標,因爲我們只能猜測點在圓周上的位置。
0
這裏的基本算法:
Calculate the angular measure whose arc length is 22 feet, with the given radius
numPoints = Math.PI * 2/angularMeasure
for i in range(numPoints):
calculate proportion around the circle we are, in terms of degrees or radians
calculate the location of the endpoint of a great circle or rhumb arc from the center point moving in the specific azimuth direction (from the proportion around the circle) the given radius
最後這一點是最難的部分。這裏的代碼來自世界風SDK(提供:http://worldwind.arc.nasa.gov/java/)(注意:你必須計算的角度,你可以做很容易給定半徑的地球/周長方面半徑)
/*
Copyright (C) 2001, 2006 United States Government
as represented by the Administrator of the
National Aeronautics and Space Administration.
All Rights Reserved.
*/
/**
* Computes the location on a rhumb line with the given starting location, rhumb azimuth, and arc distance along the
* line.
*
* @param p LatLon of the starting location
* @param rhumbAzimuth rhumb azimuth angle (clockwise from North)
* @param pathLength arc distance to travel
*
* @return LatLon location on the rhumb line.
*/
public static LatLon rhumbEndPosition(LatLon p, Angle rhumbAzimuth, Angle pathLength)
{
if (p == null)
{
String message = Logging.getMessage("nullValue.LatLonIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (rhumbAzimuth == null || pathLength == null)
{
String message = Logging.getMessage("nullValue.AngleIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
double lat1 = p.getLatitude().radians;
double lon1 = p.getLongitude().radians;
double azimuth = rhumbAzimuth.radians;
double distance = pathLength.radians;
if (distance == 0)
return p;
// Taken from http://www.movable-type.co.uk/scripts/latlong.html
double lat2 = lat1 + distance * Math.cos(azimuth);
double dPhi = Math.log(Math.tan(lat2/2.0 + Math.PI/4.0)/Math.tan(lat1/2.0 + Math.PI/4.0));
double q = (lat2 - lat1)/dPhi;
if (Double.isNaN(dPhi) || Double.isNaN(q) || Double.isInfinite(q))
{
q = Math.cos(lat1);
}
double dLon = distance * Math.sin(azimuth)/q;
// Handle latitude passing over either pole.
if (Math.abs(lat2) > Math.PI/2.0)
{
lat2 = lat2 > 0 ? Math.PI - lat2 : -Math.PI - lat2;
}
double lon2 = (lon1 + dLon + Math.PI) % (2 * Math.PI) - Math.PI;
if (Double.isNaN(lat2) || Double.isNaN(lon2))
return p;
return new LatLon(
Angle.fromRadians(lat2).normalizedLatitude(),
Angle.fromRadians(lon2).normalizedLongitude());
}
0
你正在尋找所謂的「小圈子」的方程式。查看this book獲取小圓的方程和該小圓的圓弧長方程。但是,因爲您的距離太小,您可以考慮將您的區域放平並使用更簡單的幾何體。使用UTM座標將使計算比使用緯度/經度更簡單。
haversine公式涉及到大圓,而不是小圓圈......
相關問題
- 1. 如何計算沿着大圓的給定距離的經度和緯度?
- 2. 經緯度是已知點時計算100米距離
- 3. 沿已知角度繪製已知距離的線
- 4. 計算距離另一緯度/經度點米的緯度和經度
- 5. 計算經度和緯度數組的道路距離
- 6. J2ME - 計算2緯度和經度之間的距離
- 7. 如何計算經度和緯度兩點之間的距離?
- 8. 使用緯度和經度計算到位置的距離
- 9. 如何使用緯度和經度計算距離和方位?
- 10. 使用API查找已知位置的經度和緯度?
- 11. 計算距離給出2分,緯度和經度
- 12. C++ - 緯度和經度距離計算器
- 13. 楠使用緯度和經度計算距離
- 14. 如何計算距離另一點一定距離的點的緯度/經度?
- 15. SQL Server計算2組經度/緯度列之間的距離
- 16. 計算兩個緯度 - 經度點之間的距離? - 鈦
- 17. 如何計算「沿着」單位圓的弧度點
- 18. 計算邊界框距離Java中的緯度/經度座標一定距離
- 19. 從已知位置確定預測的經度/緯度
- 20. 從距離計算經度
- 21. 獲取從緯度/經度點沿折線距離
- 22. 什麼距離計算(經度,緯度)更精確?
- 23. 我需要使用現有的緯度/經度,距離和方向來計算經緯度
- 24. 獲取經緯度和緯度的距離
- 25. 如何使用angulajs計算兩個緯度和經度之間的距離?
- 26. 使用緯度經度和海拔(海拔)計算兩點之間的距離
- 27. 計算兩個緯度和經度地理座標之間的距離
- 28. 優化SQL WHERE計算經度和緯度位置之間的距離
- 29. 從經緯度計算出一個點的距離
- 30. 使用MapKit計算經緯度之間的距離
您需要先定義你的假設。哪個地球模型(球形,橢圓球體,基準面和橢球面)?地理座標或投影座標? – Benjamin 2011-01-24 17:49:03
感謝所有的答案,我會對小圓方程進行一些研究。我可能可以使用UTM座標,因爲我使用這些點爲收益圖構建shp文件,絕對地理位置不如一致性重要。你能告訴我如何用UTM座標來做到這一點嗎?如果我需要使用十進制度數,我發現相當複雜的公式轉換回十進制度。 – gw73 2011-01-26 13:59:32