2011-01-24 18 views
1

プログラミング言語の助けが必要ではない、特定の距離、すなわち22フィート離れたポイントのGPS座標を計算するには誰かから助けが必要です円の円周。私は最初のGPS座標と半径を知っています。私は非常に確信していますか、またはコサインの球形の法則は答えを持っていますが、私は三角式を使用していて、それを理解することができないので、長い時間でした。私は十進数を使用しており、このvb.netでプログラミングしています。誰かが私のためにこれを黙らせることができれば、それは大きな助けになるでしょう。既知の距離を持つ既知の円周に沿った緯度と経度を計算する

+0

...大円ではなく、小さな円にも関します。どの地球モデル(球、長方形の回転楕円体、基準と楕円体)ですか?地理座標または投影座標? – Benjamin

+0

すべての答えをありがとう、私は小さな円の方程式についていくつかの研究を行います。私はおそらくUTM座標を使うことができます。なぜなら、これらの点を使ってイールドマップ用のshpファイルを作成しているからです。絶対地理的位置は一貫性ほど重要ではありません。代わりにUTM座標でこれを行う方法を教えてください。小数点以下の桁数を使用する必要がある場合は、10進数に戻すためのかなり複雑な式が見つかりました。 – gw73

答えて

0

私はあなたが持って理解したよう:

  1. が 円周の中心の座標。
  2. 円の円周上の2点間の距離が である。
  3. 円周の半径。

私の意見では、これは他のポイントの座標を計算するのに十分ではありません。点は円周上のどこに配置されているかを推測できるだけなので、最小でも1点の座標が必要です。

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 

この最後の点は、最も難しい部分です。 (あなたはかなり簡単に地球の半径/円周を与えないことができ、角度の面で半径を計算する必要がありますノート・)

/* 
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

地面上の円の円周上にある点の座標を取得する方法を質問しています。私はどのようにその円が菱形の線で表現されるのか見ていない、軸受、円の異なる場所で変更されます。むしろ、我々は小さな円について話している:http://en.wikipedia.org/wiki/Small_circle – Benjamin

0

あなたは:ここでのWorldWind SDKからコード(http://worldwind.arc.nasa.gov/java/利用可能)があります「小さな円」と呼ばれるものの方程式を探しています。小さな円の方程式とその小さな円の円弧長方程式についてはthis bookを見てください。しかし、あなたの距離が非常に小さいので、あなたはあなたのエリアをフラットと考え、より単純なジオメトリを使用することができます。 UTM座標を使用すると、緯度/経度を使用するよりも計算がはるかに簡単になります。

半正矢式は、あなたが最初に自分の想定を定義する必要があります

関連する問題