MATLAB: How to get horizontal coordinates a few mile from given coordinates

scircle1

hello! I'm trying to find the coordinates a few miles horizontally away from given coordinates.
It's like find (38, y) which is 5 nm right side of (38, 125).
I tried drawing 5nm radius circle from (38,125) with scircle1, but as the circle is comprised of
given points. It;s hard to get exact 38.
Is there any trick to find exact coordinates?

Best Answer

I assume that 38,135 are the latitude and longitude of the center, and that you want the latitude and longitude for a point on a circle of radius 5 nm about that center. Let d=circle radius, R=Earth radius (same units as d), δ=d/R, ()=latitude, longitude of center, and ()=latitude, longitude of points on the circle. Then
If the distance d is small compared to the Earth radius R, then the following approximation (flat-Earth approximation) is quite accurate: