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.