map reference conversion

General discussion about trigpoints, the TrigpointingUK website etc

map reference conversion

Postby simon.ritchie » Thu Jul 18, 2019 6:03 pm

This site uses OS map references to specify the positions of the trig points. Unfortunately, some GPS devices use longitude and latitude, so we need a way to convert from one to the other.

Initially I used the Movable Type web page, but I found that it uses a very simple algorithm and can be fairly inaccurate: https://www.movable-type.co.uk/scripts/ ... idref.html

I then discovered a web page run by the Ordnance Survey, which is much more accurate and handles all the formats that I know about, converting from one to all the others: https://www.ordnancesurvey.co.uk/gps/transformation/

I'd like to be able to do this conversion using a program. If anybody knows of a library that can do it accurately, preferably one that can be used from C or C++, I'd be grateful to know about it.

By the way, I also found this site useful. Given an OS map reference it displays a local map - very useful for figuring out how to get to a trig point: https://gridreferencefinder.com/
simon.ritchie
 
Posts: 5
Joined: Thu Jul 18, 2019 5:26 pm

Re: map reference conversion

Postby agentmancuso » Thu Jul 18, 2019 11:05 pm

Wouldn't it be easier to change the GPSr coordinate setting to use BNG?
User avatar
agentmancuso
 
Posts: 186
Joined: Sun Jun 01, 2014 5:59 pm
Location: EK

Re: map reference conversion

Postby clochandighter » Thu Jul 18, 2019 11:52 pm

Is this of any help?

http://www.fieldenmaps.info/cconv/cconv_gb.html

To be honest, I agree with agentmancuso. If you have an interest in trigs, their referenced positions were all calibrated on the National Grid. Is it possible your GPSr is capable of working on the British grid? I am aware that there are others here using the Lat/Long system, possibly navigating with car SatNav system.

Out in the field, I still navigate with paper maps! :-)


Rgds,

G.
clochandighter
 
Posts: 39
Joined: Sun Jun 15, 2014 2:02 pm

Re: map reference conversion

Postby stripybadger » Fri Jul 19, 2019 8:29 am

Hi Simon, to try to answer your question about a library to do it, I've previously used proj4js (which is actually a javascript port of the c++ library 'proj'). I've generally found that the inaccuracy introduced by the conversion does not make things worse than the inaccuracy in the original reference, but I don't have any stats to back that up.

However you also have to consider the accuracy of the thing you're using to display those coords. Whether you're displaying them on an online map or entering them into a gps device, the coords probably get transformed into yet another format, which will potentially introduce yet more inaccuracy - and if using a handheld gps, you've then got yet more inaccuracy from the actual gps location to add to this, which I'd guess would be much greater than any inaccuracy in your original transformation.
stripybadger
 
Posts: 16
Joined: Thu Sep 15, 2016 6:45 pm

Re: map reference conversion

Postby simon.ritchie » Fri Jul 19, 2019 12:49 pm

> Wouldn't it be easier to change the GPSr coordinate setting to use BNG?

The OS web page takes a set of coordinates in any form and converts it to all the other forms, so you can do whatever is convenient. I'm using the trigs to calibrate my GPS equipment. I choose a suitable trig, get the map reference, convert it to longitude. latitude and ellipsoidal height, and note down the result. Then I take the equipment to the trig, get the position and compare it with the expected result. Doing it that way means that I don't have to cart around a computer to do the conversions at the trig.

Of course, an accurate GPS device that produced an OS map reference would be much handier. That's why I would like to know about any programmatic solutions.

Regards

Simon
simon.ritchie
 
Posts: 5
Joined: Thu Jul 18, 2019 5:26 pm

Re: map reference conversion

Postby agentmancuso » Fri Jul 19, 2019 1:10 pm

Isn't it likely that the transformational error in converting coords in one format to another is at least as great as the error in satellite-derived position, assuming the GPS equipment we're talking about is something more substantial than an etrex?
User avatar
agentmancuso
 
Posts: 186
Joined: Sun Jun 01, 2014 5:59 pm
Location: EK

Re: map reference conversion

Postby simon.ritchie » Fri Jul 19, 2019 6:15 pm

Concerning accuracy, a GPS device like an eTrex is only accurate to about four metres(?) so, yes, the inaccuracy in the conversion would just be in the noise.

The equipment I'm testing is the new U-Blox ZED-F9P which claims to be much more accurate, and the inaccuracy in the conversion starts to matter. The Movable Type page wasn't up to the job.

Once I've finished my testing, I'll be able to say just how accurate this device is in practice.
simon.ritchie
 
Posts: 5
Joined: Thu Jul 18, 2019 5:26 pm

Re: map reference conversion

Postby agentmancuso » Fri Jul 19, 2019 7:28 pm

I see, it starts to make sense now! I used to use the BGS site for batch conversion of coordinates, but I'm afraid programme language stuff is beyond me. Good luck finding something more suitable; it would be interesting to hear how you get on in the end.
User avatar
agentmancuso
 
Posts: 186
Joined: Sun Jun 01, 2014 5:59 pm
Location: EK

Re: map reference conversion

Postby simon.ritchie » Wed Oct 09, 2019 11:51 am

I've got a little further with my research.

My GPS equipment claims to be accurate to two cm. I've now figured out that the data I'm getting from the OS is not nearly as accurate as that, so I can't use it for my testing. That's a tad unfortunate because at present I have nothing else.

Just to answer one question in this thread: why don't I just get my equipment to display OS map references? Firstly, it doesn't, and secondly, if it did, that could be a source of significant error, as shown below.

We tend to assume (well, I do anyway) that OS trig points are very accurate position markers, but compared with modern equipment, that's no longer so.  I thought people might be interested in knowing how accurate they are.

A related issue is this:  GPS devices don't work in terms of OS map references, not internally at least.  If your tracker device gives you a position in that form, it's done a conversion.  How accurate is that?

The GPS device in a typical tracker is accurate to maybe three metres, so the position you see on the screen will always be a bit wrong.  If you get it to display your position in OS map reference form. the conversion introduces an extra error, so the result will be even more wrong.  As pointed out in another posting, if the extra error is small, it gets lost in the noise. However, errors are additive, so if it's big enough, then yes it does matter.

GPS equipment is improving, which is why I'm doing this work, so in the future you will be able to buy a much more accurate tracker, but if you ask it to display results as OS map references, the conversion may introduce so much error that the extra quality is compromised. To get the most accurate fix you will need to use longitude and latitude or Cartesian coordinates.

Getting back to my investigations: the Trigpointing website gives the map ref of each trig point, which I believe comes from a spreadsheet that the OS publish. They also offer a web page that can convert a map ref to other forms including Cartesian coordinates:  https://www.ordnancesurvey.co.uk/gps/transformation/

To test my equipment, I take the OS map ref of a trig point, convert it to Cartesian form,  visit the trig point, get the position in Cartesian form from my device and compare the two.
The results are typically out by at least half a metre.  Is my equipment faulty, or is the OS data wrong.  How accurate is the published position of the trig point and, when I use the OS web page to convert that to Cartesian form, how accurate is that?

This OS document was very enlightening:  https://www.ordnancesurvey.co.uk/legacy/docs/gps/updated-transformations-uk-ireland-geoid-model.pdf. It explains how GPS Cartesian coordinates work, which is useful.  It reminds me that OS maps pretend that the Earth is flat, which introduces an error, but that's tiny, and for my purposes it can be ignored.  It explains how accurate you can expect the published measurements of trig point positions to be - they can be out by as much as 60 cm!  In general, the document stresses that there is no sure-fire way to convert a position from one system to another.  The result will always be inaccurate.

So now I know that the published positions of the trig points are a bit wrong, but how accurate is the conversion from OS map ref to Cartesian form?

OS map references plus height above sea level and Cartesian coordinates both specify a position using a 3D coordinate system.  The origin and the direction of the axes are different in each system so you can't compare them directly. However, the distances between two points should be the same regardless of which system you use.  If you have two points in the same coordinate system (a1,b1,c1) and (a2,b2,c2) and the difference along each axis is a,b and c then by Pythagoras the distance between them is

    the square root of (a squared plus b squared plus c squared)

If you have two points in a different coordinate system representing the same two positions, the distance between them should be the same.

So I can test the accuracy of the conversion from OS map references to Cartesian.  In the table below, on the left, we have the trig points at Box Hill and Leith Hill in OS map reference form, the difference along each axis and below that the resulting distance.  On the right we have the same calculation but using the Cartesian coordinates from the OS conversion page.

Below that I do the same comparison, this time using the trig point at Mickleham Down and the one at Leith Hill.

In both cases, the distances are out by over two metres. The error introduced by the conversion is much bigger than the error in the original map reference of the trig point.

If you have a GPS tracker and it uses a similar method to convert from its internal format to an OS map reference, the result will not be three metres out, it will be as much as five metres out.

As for my own purposes, I'm trying to test equipment which is supposed to be accurate to two cm using data that is out by at least two metres.  That's not going to work.  I need something more accurate to compare my results with.

Here are the tables of results. Note that these are purely from OS data and the OS conversion page, not from my equipment:

Code: Select all
                         OS Map Ref                            Cartesian 
       
                Box Hill Leith Hill   Difference         Box Hill  Leith Hill Difference
easting        517971.06  513949.28      4021.78     x 4000676.63  4006902.33   -6225.70
northing       151163.16  143161.71      8001.45     y  -21724.35   -25963.72    4239.37
height above      171.97     307.00      -135.03     z 4950992.32  4946141.89    4850.43
sea level       
       
distance                    8956.35                                 8958.70
       
       
                Mickleham  Leith  Hill  Difference      Mickleham  Leith  Hill Difference
easting         517891.74    513949.28     3942.46    x 3998820.07  4006902.33   -8082.26
northing        153518.13    143161.71    10356.42    y  -21739.43   -25963.72    4224.29
height above       142.73  307.00  -164.27            z 4952444.39  4946141.89    6302.49
sea  level             
             
distance                     11082.66                               11085.53 
simon.ritchie
 
Posts: 5
Joined: Thu Jul 18, 2019 5:26 pm

Re: map reference conversion

Postby agentmancuso » Thu Oct 10, 2019 4:43 pm

Impressive stuff Simon. It can't be an accident that the general conclusion you reach matches pretty closely the working methodology used by the editors of the Database of British & Irish Hills when converting user-submitted handheld GPSr readings for inclusion in the database: OS gridrefs derived from GPSr standard internal conversions are quite probably up to 5m or so out. You may well be familiar with their work already, but if not then some of the articles they've published might be of interest to you.
User avatar
agentmancuso
 
Posts: 186
Joined: Sun Jun 01, 2014 5:59 pm
Location: EK

Next

Return to TrigpointingUK Forum

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

cron