# How to find if an aircraft is inside an airspace using latitude and longitude? [closed]

I have the data of latitude and longitude of $n$ points on the boundary of the airspace of a country. I also have the coordinates of the current location of an aircraft. Using this data, how do I find out of the aircraft is inside the airspace or outside.

For the sake of simplicity we can assume the boundaries of the airspace form a convex polygon.

• What have you tried to do? This sounds more like a geometry problem (i.e. "is this point inside this area?") than an aviation one. – Federico Jul 3 '18 at 7:49
• I am still trying to solve it. All aviation engineering problems are eventually physics and mathematics problems so I don't see and issue with. As far as this is concerned this is a very common question so I am sure current airlines have some methods to answer this? I am looking for that method. – Wright Brother Jul 3 '18 at 8:20
• Such low level problem solving might not be public knowledge, if they have developed their own algorithms, but you can always ask for general purpose algorithms on math.se. Here, it depends if people are interested in it. Still, it is missing what have you tried and why you cannot find the answer. – Federico Jul 3 '18 at 8:24
• My trying is still in progress and I hope to crack it but then don't have to wait until I finish my trying to ask a question. Why reinvent the wheel if it is already invented. It is a mathematically tough problem for that reason you don't see too many solutions in the internet which can both mathematically accurate and practically implementable. – Wright Brother Jul 3 '18 at 8:29
• If you don't get a good answer here, you might also try gis.SE. And depending on exactly what you mean by "airspace", you might have to consider the aircraft's altitude too. – Pondlife Jul 3 '18 at 10:34