I suspect that this is just me (all things internet related seem to go wrong with me involved)....
However, just in case it is not me I have tried to search for a TP by a grid reference (SD 65113 72134) and although the desired trig point (intersected station) did appear in the list it was 7th in the list and given as 5.7 km to the W.
If anyone can enlighten me on what I am doing wrong please do so but please use words of one syllable.
Searching for a TP
Re: Searching for a TP
tl;dr: a bug, blame AI, now fixed, thanks!
Polysyllabic version:
One significant difference between the old and new websites is the coordinate systems used. The old site stored locations as OSGB grid references and used simple Pythagorus to calculate straight line distances. Whereas the new one stores WGS84 coordinates and uses the Haversine formula to calculate great circle distances.
(As an aside, you may have noticed some slowness as a result of this. I've also switched from MySQL to PostGIS for the database, hoping it'll let me speed things up a bit.)
So, when entering an OSGB grid reference for a location search, it must be first converted to WGS84 coordinates. I have not yet implemented the Ordnance Survey's accurate OSTN15 "rubber sheet" transformation, so I told the AI that's been helping me with the code migration that it was OK to use an approximation. I expected it to use the reasonably accurate Helmert transformation we've been using elsewhere.
Instead it chose Affine transformation, which is basically a fancy way of saying "use Pythagorus on spherical coordinates, multiplying one half by the cosine of Birmingham". Good enough for putting dots on the little maps that are scattered around the site, but not good enough for calculating distances... as you've seen.
(Thanks for the heads up, by the way, I'd completely missed this!)
We're now using the Helmert transformation, which should be sufficiently accurate for lists of nearby trigpoints.
Polysyllabic version:
One significant difference between the old and new websites is the coordinate systems used. The old site stored locations as OSGB grid references and used simple Pythagorus to calculate straight line distances. Whereas the new one stores WGS84 coordinates and uses the Haversine formula to calculate great circle distances.
(As an aside, you may have noticed some slowness as a result of this. I've also switched from MySQL to PostGIS for the database, hoping it'll let me speed things up a bit.)
So, when entering an OSGB grid reference for a location search, it must be first converted to WGS84 coordinates. I have not yet implemented the Ordnance Survey's accurate OSTN15 "rubber sheet" transformation, so I told the AI that's been helping me with the code migration that it was OK to use an approximation. I expected it to use the reasonably accurate Helmert transformation we've been using elsewhere.
Instead it chose Affine transformation, which is basically a fancy way of saying "use Pythagorus on spherical coordinates, multiplying one half by the cosine of Birmingham". Good enough for putting dots on the little maps that are scattered around the site, but not good enough for calculating distances... as you've seen.
(Thanks for the heads up, by the way, I'd completely missed this!)
We're now using the Helmert transformation, which should be sufficiently accurate for lists of nearby trigpoints.
-
We TRye hard
- Posts: 7
- Joined: Fri Apr 07, 2017 9:14 pm
Re: Searching for a TP
Thanks for the fix and also taking your time to explain the cause - this was above and beyond the call of duty!