Note that there are some explanatory texts on larger screens.

plurals
  1. POCalculate new coordinates from old coordinates and x and y
    primarykey
    data
    text
    <p>I have the following setup of items in real life:</p> <p><img src="https://i.stack.imgur.com/bZRWJ.png" alt="My setup"></p> <p>The radar is static, which means it always has the same position. The <code>A</code>-item can move and its position can be whatever. From the radar I can read the <code>x</code> and <code>y</code> coordinates of <code>A</code> in relation to the radar. I have written the following classes to describe the position of each item:</p> <pre><code>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; } </code></pre> <p>Now given the geographic coordinates of the radar, the <code>x</code> and <code>y</code> coordinates of <code>A</code> relative to the radar and the facing direction of the radar relative to the North, how can I calculate the absolute geographic coordinates of <code>A</code>?</p> <p>The curvature of the earth is not an issue since the maximum value of <code>x</code> and/or <code>y</code> cannot be more than a couple hundred meters.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload