I would like to calculate the polygon area that I get from a GPS track. So basically I keep the device / user position after a while, say 5 seconds.
From this polygon of the track, I would like to calculate the area in which the track is located. For convex polygons this should not be a problem, since I think I just need to calculate the area of the triangles (when each triangular point has one starting point at the first point). Basically, as shown in the left image. (A yellow polygon is a polygon of GPS locations, dark lines are triangles for calculating area, light yellow is the desired area)
But last night I found feedback with this idea when the polygon is not convex. Not only is the part outside the polygon (upper left side) calculated in the region, it will also measure some area of the polygon more than once (look at the overlapping triangles in the lower left corner).

Does anyone have an idea on how I can achieve this? I mean, it’s still hard to understand which area should be calculated if my polygon looks like an S-shaped ... (but I could live with it ... until it gets a fairly fair result on the polygons which are (almost) closed.
My other idea of calculating the convex hull of a polygon and then calculating the area on it will not work well if the polygon is not convex. Then I will not count some areas more than once, but, as in the correct image, I would calculate a larger area than this.
It would be great if someone could help me! Thanks!
source share