Artificial intelligent assistant

How can I get a square starting with a latitude and longitude point? Is there a formula that given one latitude/longitude point and a radius (in kilometers ideally) would give me a square around the center? A picture is worth some quantity of words: !Description in pic I have the latitude/longitude value of point A, and I have D in kilometers; how can I get point B and C in latitude/longitude values?

I ended up using what's in this page

> **Destination point given distance and bearing from start point**
>
> Formula:
> lat2 = asin(sin(lat1)*cos(d/R) + cos(lat1)*sin(d/R)*cos(θ))
> lon2 = lon1 + atan2(sin(θ)*sin(d/R)*cos(lat1), cos(d/R)−sin(lat1)*sin(lat2))
>
> θ is the bearing (in radians, clockwise from north); d/R is the angular distance (in radians), where d is the distance travelled and R is the earth’s radius

For θ I used -45 degrees (in radians) for point B and 135 degrees for point C

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 30616ab452886226d829e5d556d492b6