1

I have the longitude and latitude of a known point O(x,y) where x and y are obtained from transforming the longitude and latitude from EPSG 4326 to EPSG 32635. This is the observer point. I have another point A(x1, y1) whose coordinates I don't know, but I know the distance from O to A in meters and the azimuth from O to A in radians.

How can I compute the coordinates of A knowing only these?

A function in Qgis in C++ would be the most useful, or at least a mathematical formula would be great.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Andrew
  • 11
  • 2

2 Answers2

1

If QGIS Field calculator is an option;

enter image description here

INPUTS

  • x_32635: your input x-coordinate on EPSG:32645
  • y_32635: your input y-coordinate on EPSG:32645
  • d_m: your input distance in meters
  • az_rad: your input azimuth in radians (nb. clockwise from north)

Calculation

x_new (x-coordinate of new point on UTM35N)

x(translate(geom_from_wkt('POINT('||"x_32635"||' '||"y_32635"||')'),
            "d_m"*sin("az_rad"), "d_m"*cos("az_rad")))

y_new (y-coordinate of new point on UTM35N)

y(translate(geom_from_wkt('POINT('||"x_32635"||' '||"y_32635"||')'),
            "d_m"*sin("az_rad"), "d_m"*cos("az_rad")))

x_4326 (longitude of new point)

x(transform(translate(geom_from_wkt('POINT('||"x_32635"||' '||"y_32635"||')'), 
                       "d_m"*sin("az_rad"), "d_m"*cos("az_rad")), 
            'EPSG:32635', 'EPSG:4326'))

y_4326 (latitude of new point)

y(transform(translate(geom_from_wkt('POINT('||"x_32635"||' '||"y_32635"||')'), 
                       "d_m"*sin("az_rad"), "d_m"*cos("az_rad")), 
            'EPSG:32635', 'EPSG:4326'))
Kazuhito
  • 30,746
  • 5
  • 69
  • 149
0

Thank you everyone for your suggestions. I found the solution to be

y1 = asin(sin(y1) * qCos(d/R) + cos(y) * sin(d/R) * cos(a));

x1 = x + atan2(sin(a) * sin(d/R) * cos(y), cos(d/R) - sin(y) * sin(y1));

where R is the radius of Earth , d is the distance OA and a is the azimuth.

Andrew
  • 11
  • 2