I’m afraid I don’t have the answer, but because the world isn’t flat I’m not sure this is easy. The longer the hypotenuse, the more important the non-flatness becomes.
It explains the notation to the left of the diagrams, so A with a line over it is 90 degrees - angle A (the complimentary angle). I don’t understand it when used with c, and it occurs to me we’ve only changed the issue from “the Earth isn’t flat” to “the Earth isn’t a sphere either”.
I think for my purposes it’ll be close enough - I only need relative positions, so if the baseline is out, and the data is out by the same degree, it should be ok.
I might as well describe the use-case: I have a csv of many points in the UK, and I want an approximate Scottish border to check which side of it they fall. So I’m calculating the angle from the latitude at Gretna* to Berwick, so for every point I can know if it’s north or south of that line.
The further away, the greater the non-sphere effect; but simultaneously the imprecision is less significant.
I think.
PS Maybe on that scale (heck, I could cycle it in a day), I can assume a flat plane?
'* Actually Parton, then the latitude west of the datum doesn’t cut the Stranraer peninsula. I’ll just have to manually check the Solway coast.
Correct. Thanks for the suggestion: I’m flattered (as a person who can’t do basic trigonometry) that you think I know the top of a GitHub page from the bottom.
I’m using LO Calc as the summit of my technical abilities. Thankfully there are few enough points, and mostly in cities, that these very approximate polygons are good enough.
If you’re happy to approximate the border by a single straight line, then you might as well make that a straight line in latitude-longitude coordinates. Suppose you have two points on the line with (lat,lon) coordinates (x1,y1) and (x2,y2). then the equation of the line is
(y-y1)/(y2-y1) = (x-x1)/(x2-x1)
So for any given point (x,y) you can tell which side of the line it lies by looking at which of those two expressions is larger. If you have to test lots of points, then for efficiency you could first compute m=(y2-y1)/(x2-x1) once, and then compare y with m*(x-x1) + y1.