I have the following settings for elements in real life:

The radar is static, which means that it always has the same position. Element A can move, and its position can be any. From the radar, I can read the x and y A coordinates relative to the radar. I wrote the following classes to describe the position of each element:
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) {
Now, given the geographic coordinates of the radar, the x and y coordinates of A relative to the radar, and the reverse direction of the radar relative to the North, how can I calculate the absolute geographic coordinates of A ?
The curvature of the earth is not a problem, since the maximum value of x and / or y cannot be more than a couple of hundred meters.
Dimme
source share