7

私は実際に次のアイテムのセットアップを持っています:

私のセットアップ

レーダーは静的です。つまり、レーダーは常に同じ位置にあります。A-itemは移動でき、その位置は何でもかまいません。レーダーから、レーダーに関連する座標とxを読み取ることができます。各アイテムの位置を説明するために、次のクラスを作成しました。yA

public class Position {
    public enum Direction {
        EAST, WEST, NORTH, SOUTH
    };

    public final Direction latitudeDirection, longitudeDirection;
    public final float latitude, longitude, altitude;

    public Position(Direction latitudeDirection, Direction longitudeDirection,
            float latitude, float longitude, float altitude) {
        this.latitudeDirection = latitudeDirection;
        this.longitudeDirection = longitudeDirection;
        this.latitude = latitude;
        this.longitude = longitude;
        this.altitude = altitude;
    }

    public Position(float radarX, float radarY) {
        // TODO: Implement the question here
        this.altitude = Config.RADAR_POSITION.altitude;
    }

}

class Config {
    // Position of the radar
    public static final Position RADAR_POSITION = new Position(
            Position.Direction.NORTH, // Latitude direction
            Position.Direction.EAST, // Longitude direction
            55.0f, // Latitude
            13.0f, // Longitude
            60.0f); // Altitude

    // Facing direction of the radar in degrees. 0° is north, advancing
    // clockwise.
    public static final float RADAR_FACING_DIRECTION = 10.0f;
}

レーダーの地理座標、レーダーを基準にしたの座標、xおよび北を基準にしたレーダーの向きの方向が与えられた場合、の絶対地理座標を計算するにはどうすればよいですか?yAA

地球の曲率は問題ではありません。最大値xおよび/または最大値はy数百メートルを超えることはできないからです。

4

6 に答える 6

3

例として、三角関数を使用して三角形を作成し、Aの座標を見つけることができます。

三角関数の使用例

この場合、Ax =(y)(cos 10)-(x)(cos 80)であり、Ayも同様に計算できます。

このように、あなたは度で立ち往生することは決してありません、あなたは単にメートルで働いています。

堅牢な解決策は、OPでのVishalのコメントです。これは、私が描画およびスキャンしているときに投稿されました。

xnew = x * cos(theta) - y * sin(theta); 
ynew = x * sin(theta) + y * cos(theta);
于 2013-03-12T18:37:39.700 に答える
2

一般に、次の手順を使用できます。

  1. レーダーの位置(緯度、経度、高さ)をメートル法の地球中心の地球固定xyzシステム(ECEF)に変換します
  2. 次に、このメートル法で、レーダーの回転とオブジェクトの位置を表す回転と平行移動の引数/行列を使用/組み合わせることができます。
  3. 新しく取得したxzy座標をlat/lon/hに逆変換します

そのような変換のための多くのリソースがあります、これをチェックしてください、例えば:http ://www.gmat.unsw.edu.au/snap/gps/clynch_pdfs/coordcvt.pdf

必要に応じて、シーン座標系を導入することもできます(ENU)。これは、UTM、ECEF、ENU、および地理座標(Lat / lon / h)の関係を説明するかなり良い概要です: http ://www.dirsig.org/docs/new/coordinates.html

ECEFとGeodetic変換のサンプルコードが必要な場合は、matlabコードhttp://www.mathworks.de/de/help/map/ref/ecef2geodetic.htmlを参照するか、GDAL(http://www.gdal.org/

于 2013-03-12T18:39:45.053 に答える
1

この方法でそれを行うことができるはずだと思います:xy座標を極座標rとに変換しますtheta(レーダーを原点として)。レーダーの回転を減算し、デカルト座標に変換し直します。次に、緯度と経度に変換してレーダーの座標を追加するだけです。

double r = Math.hypot(radarX, radarY);
double theta = Math.atan2(radarY, radarX);
theta -= Math.toRadians(Config.RADAR_FACING_DIRECTION);
float x = (float) r * Math.cos(theta);
float y = (float) r * Math.sin(theta);
longitude = metersToLongitude(Config.RADAR_POSITION, y) + Config.RADAR_POSITION.longitude;
latitude = metersToLatitude(Config.RADAR_POSITION, x) + Config.RADAR_POSITION.latitude;

ウィキペディアで緯度と経度の長さの公式を見つけました。緯度の程度はどこでも同じですが、経度は極の近くで小さくなります。

static float metersToLatitude(Position near, float meters) {
    return meters / 110.6*1000;
}

static float metersToLongitude(Position near, float meters) {
    float lat = Math.toRadians(near.latitude);
    return meters /
        (111132.954 - 559.822 * Math.cos(2*lat) + 1.175 * Math.cos(4*lat));
}

残念ながら、これはうまくいかないようで、理由がわかりません。

座標を東/西/北/南の正の角度で表現したい場合は、それらが負であるかどうかを確認し、その場合は方向を反転する必要があります。

于 2013-03-12T18:22:02.567 に答える
1

これは変換に役立ちますか? http://en.wikipedia.org/wiki/Geodetic_system#From_geodetic_to_ECEF

于 2013-03-12T18:41:27.833 に答える
1

ついに解決しました。コードは以下に添付されています。サミュエル・エドウィン・ワードの答えが私にインスピレーションを与えたものなので、私は彼の答えを受け入れます。

public Position(float radarX, float radarY) {

    // Convert A's position to distance and bearing in relation to the North 
    double objDistance = (Math.hypot(radarX, radarY) / 6367500 /* Mean earth radius */);
    double objBearing = (Math.atan2(radarY, radarX) + Math.toRadians(Config.RADAR_BEARING));

    // Convert the Radar's geographic coordinates to radians
    double latitudeRadar = Math.toRadians(Config.RADAR_POSITION.latitude);
    double longitudeRadar = Math.toRadians(Config.RADAR_POSITION.longitude);

    // Calculate A's geographic coordinates in radians
    double latitudeObject = Math.asin(Math.sin(latitudeRadar)*Math.cos(objDistance) + 
            Math.cos(latitudeRadar)*Math.sin(objDistance)*Math.cos(objBearing));
    double longitudeObject = longitudeRadar + Math.atan2(Math.sin(objBearing)*Math.sin(objDistance)*Math.cos(latitudeRadar), 
            Math.cos(objDistance)-Math.sin(latitudeRadar)*Math.sin(latitudeObject));

    // Normalize to -180 ... +180 degrees
    longitudeObject = (longitudeObject+3*Math.PI) % (2*Math.PI) - Math.PI;  

    // Set the A's coordinates in degrees
    this.latitude = (float) Math.toDegrees(latitudeObject);
    this.longitude = (float) Math.toDegrees(longitudeObject);

    // Set the rest of the arguments
    this.latitudeDirection = Config.RADAR_POSITION.latitudeDirection;
    this.longitudeDirection = Config.RADAR_POSITION.longitudeDirection;
    this.altitude = Config.RADAR_POSITION.altitude;
}
于 2013-03-14T14:27:40.727 に答える
0

レーダーのローカルシステムのすべての座標を-10°回転すると、レーダーのx/y座標をAオブジェクトの座標に追加できます。

于 2013-03-12T18:21:24.653 に答える