02-06-2008 05:13 PM
02-06-2008 09:42 PM - edited 02-06-2008 09:49 PM
It's been a while since I've had to think about these math/geometry type problems. Here is an idea.
You know the 4 GPS locations and their X Y coordinates. Call them A, B, C, D. Calculate the area of the quadrilateral. Assume A, B, C, D are labelled clockwise, and they are a convex quad, but don't have to be a square, rectangle, parallelogram .... You can calculate the area by summing the area of triangle A, B, and C and triangle BCD. You can google to find some methods to do this.
You have your point of interest, call it P. Calculate the area of the triangle between it and each of the 4 sides. So triangle PAB, PBC, PCD, and PDA.
If P is inside of Quad ABCD, then the sum of those 4 triangular areas would equal the area of the quad.
If P is outside the quadrilateral, then the sum of the areas would have to be greater than the area of the quadrilateral because the 4 triangles would all encompass area that is outside of the quadrilateral.
02-06-2008 10:33 PM
02-11-2008 06:58 AM