私は実際に次のアイテムのセットアップを持っています:
レーダーは静的です。つまり、レーダーは常に同じ位置にあります。A
-itemは移動でき、その位置は何でもかまいません。レーダーから、レーダーに関連する座標とx
を読み取ることができます。各アイテムの位置を説明するために、次のクラスを作成しました。y
A
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
および北を基準にしたレーダーの向きの方向が与えられた場合、の絶対地理座標を計算するにはどうすればよいですか?y
A
A
地球の曲率は問題ではありません。最大値x
および/または最大値はy
数百メートルを超えることはできないからです。