Since you only want to calculate the number roughly and the distance of a mile is small compared to the Earth's radius, it should be sufficient to use a linear approximation with the surface element of the transformation to Cartesian coordinates. For a rough calculation, we can take the Earth as spherical and assume that the latitude and longitude are spherical coordinates $\theta$ and $\phi$, respectively. The surface element for spherical coordinates is $r^2\sin\theta\mathrm d\theta\mathrm d\phi$. Loosely speaking, that means that an infinitesimal area $\mathrm d\theta\mathrm d\phi$ in the coordinate space corresponds to an infinitesimal surface area $r^2\sin\theta\mathrm d\theta\mathrm d\phi$ on the actual surface of the sphere. For your purposes, we can take $\sin\theta$ as constant, in which case the areas are simply proportional to each other, with proportionality constant $r^2\sin\theta$. For your purposes, we can calculate the area of the circle as if it were flat, so a circle with a radius of one mile has an area $A$ of $\pi$ square miles. The radius $r$ of the Earth is roughly $4000$ miles, and at latitude $\theta=41.174104^\circ$ we have $\sin\theta\approx0.66$, so the corresponding area in coordinate space is $A/(r^2\sin\theta)\approx\pi/(4000^2\cdot0.66)\approx3\cdot10^{-7}$. The area per grid point in a grid of coordinates with $d$ decimals is $(10^{-d})^2=10^{-2d}$, so for instance if you use $d=6$ digits you'd have roughly $3\cdot10^{-7}/10^{-12}=3\cdot10^5$ different coordinates within a one-mile radius, whereas if you use $d=3$ digits the result is $3\cdot10^{-7}/10^{-6}=0.3$, so you wouldn't expect any other coordinates within that radius.
Once we know the coordinates of P then the problem revers to a well known answer. To get the coordinates of $P=(x, y)$ we take three measurements. I have moved the coordinate system onto one corner and named the objects accordingly, with $a$ the horizontal side and $b$ the vertical side. In addition, we are going to find the coordinates of P in polar notation, with the distance $r$ and angle $\theta$.
Measuring $\vec{AP}$ we get the distance $r$. Measuring $\vec{BP}$ gives us the cosine and measuring $\vec{DP}$ gives us the sine, by means of the law of cosines.
$$ \cos\theta = \frac{r^2+a^2-d_{BP}^2}{2 a r} $$
$$ \sin\theta = \frac{r^2+b^2-d_{DP}^2}{2 b r} $$
So the location of P is
$$ x = r \cos\theta = d_{AP} \frac{r^2+a^2-d_{BP}^2}{2 a r} $$
$$ y = r \sin\theta = d_{AP} \frac{r^2+b^2-d_{DP}^2}{2 b r} $$
The point is inside if $x>=0$ and $x<=a$ and $y>=0$ and $y<=b$.
I have checked this with the above C#
code
static void Main(string[] args)
{
double a=2;
double b=1;
Point A=new Point(0, 0);
Point B=new Point(a, 0);
Point D=new Point(0, b);
for(double x=-5; x<=5; x+=0.5)
{
for(double y=-5; y<=5; y+=0.5)
{
Point P=new Point(x, y);
double d_AP=A.DistanceTo(P);
double d_BP=B.DistanceTo(P);
double d_DP=D.DistanceTo(P);
double r=d_AP;
double cos=(a*a+r*r-d_BP*d_BP)/(2*a*r);
double sin=(b*b+r*r-d_DP*d_DP)/(2*b*r);
double x_P=r*cos;
double y_P=r*sin;
P.inside=(x_P>=0&&x_P<=a)&&(y_P>=0&&y_P<=b);
Point Q=new Point(x_P, y_P);
if(P.DistanceTo(Q)>1e-6)
{
Console.WriteLine("({0},{1}) - ({2},{3})", x, y, x_P, y_P);
}
}
}
}
public struct Point
{
double x, y; //private, not visible
public bool inside;
public Point(double x, double y)
{
this.x=x;
this.y=y;
this.inside=false;
}
public double DistanceTo(Point p)
{
return Math.Sqrt((p.x-x)*(p.x-x)+(p.y-y)*(p.y-y));
}
}
and it all checks out ok. No need to check for signs and quadrants. It all works out cleanly.
Best Answer
Let's suppose your original point is $(\theta,\phi)$ in radians.
Let $s$ be arc length, in your case, $s=3$, $r$ be the radius of sphere. If you are talking about earth, then $r$ is the radius of earth in miles.
The new latitude will be $\theta\pm \frac{s}{r}$. The new longitude will be $\phi \pm \frac{s}{r}$.
$\pm$ means $+$ or $-$. So the new points are: $(\theta+\frac{s}{r}, \phi +\frac{s}{r}), (\theta+\frac{s}{r}, \phi -\frac{s}{r}), (\theta-\frac{s}{r}, \phi +\frac{s}{r}), (\theta-\frac{s}{r}, \phi -\frac{s}{r})$, in the order of upper right, lower right, upper left, lower left.