Why do so many people fail on the simplest of problems? *sigh* Oh well...
Ever heard of a² + b² = c² ? You can easily calculate the distance between two points in a X/Y coordinate system by calculating
dist = sqrt(Xdist² + Ydist²), where
Xdist = Xcirle - Xcar and
Ydist = Ycircle - Ycar. With this distance you then only need to check if it's shorter or longer than the circle's radius to determine whether the car is inside the circle or outside.
Just make yourself a Circle class like this...
public class Circle
{
private double x, y, r;
public Circle(double x, double y, double r)
{
this.x = x;
this.y = y;
this.r = r;
}
public bool Contains(double carX, double carY)
{
return Math.Sqrt(Math.Pow(x - carX, 2) + Math.Pow(y - carY, 2)) <= r;
}
}
Then somewhere you define your sumo area and do your checks as required...
Circle sumoArea = new Circle(0, 0, 15 * 65535); //Right in the middle of the map (x=0, y=0) with 15 metres radius
...
if (!sumoArea.Contains(car.X, car.Y))
{ //you lose! }
I haven't tested it, but you get the idea. You can also incorporate automatic conversion of LFS units to metres to make the defining of circle areas a bit more intuitive.