Forum: General Topics

Forums / General Topics / UTM

 

Subject:UTM 

yano

10:48
Monday
24-Nov-2008

Location:
Germany

Phone Model:
SE K610i

Hi!

Any plan to extend the position with UTM coordinates? WGS84 and EUR50 datum would be appreciated ... :)

Thanks for your reply and for your great job!!

Cheers,
yano
 

Stephen

20:05
Monday
24-Nov-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Yano,

(Sorry I forgot to reply to your off-list email!!)

I have got UTM coordinates on my 'to-do' list, but the problem is that I'm not too familiar with the WGS84 - UTM conversion formulae, I suspect the calculations might be pretty hideous! Were you just thinking of having an extra field on the Text page giving the UTM position?

Cheers,
Stephen
 

yano

11:18
Tuesday
25-Nov-2008

Location:
Germany

Phone Model:
SE K610i

Hi Stephen,

(no prob at all!)

I don't know the conversion formulae either but there are several javascript UTM <-> LAT/LON converters in the internet; maybe you might think of "grabbing&adapting" the codes ... so simple, isn't it ?! :) - just kidding: I can imagine that it's not so stright forward.

Actually I was just thinking of an extension of the Settings\Units menu ...
My "problem" is that I trek on the Italian Dolomites for which 1:25,000 detailed paper maps (Tabacco pub.) are available in shop but I cannot scan&convert into .TMJ format. Fortunately they have nowadays also the UTM grid (unfortunately still EUR50 Datum). It would be great to be able to locate my position on the paper map when in doubt and of course make use of the rest of your features w/o map ...

Cheers,
yano

 

Stephen

11:57
Tuesday
25-Nov-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Yano,

I'll see what I can find out about UTM, probably won't be in the next version though...

In the meantime you might find some use in creating a TMJ map using the OpenStreetMap CycleMap rendering. Since this rendering includes topography you might find it slightly easier to locate your position on the paper map by comparing the nearby contour lines. Just a thought...!

Cheers,
Stpehen
 

yano

9:41
Wednesday
26-Nov-2008

Location:
Germany

Phone Model:
SE K610i

Hi Stephen,

great hint but it leads to another new problem (not actually related to TMJ :) ) which is ... how can I export SUCCESFULLY a map on openstreet ?!
Maybe I'm a "dummy" user but I've tried the [export] button with all the possible options and everytime what I get is an empty png or jpg file ... :( unfortunately the help doesn't help further ... I've tried with IE and Firefox and I'm a registered openstreet user ... any idea what I miss ?! 

Back to UTM: I'm also searching the internet for the conversion formulae ... if I find somenthing "comprehensible" I'll let you know :)

Cheers,
yano
 

Stephen

11:44
Wednesday
26-Nov-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Yano,

I've also noticed myself that the OSM Export page sometimes doesn't work properly - it was working fine yesterday, but not today. I suspect it might be related to the weekly Planet file update - perhaps the server that handles the exporting is currently being updated with the new map data (which generally happens on a Wednesday). Only a guess, but see if it works any better later on today or tomorrow...

Incidentally, if you were only exporting the map for use in TMJ you don't need to do this - just use the MapOrganiser to grab the tiles directly...

Cheers,
Stephen
 

yano

15:26
Wednesday
26-Nov-2008

Location:
Germany

Phone Model:
SE K610i

Hi again!

Sorry for boring you - just want to inform you about my progress ... :)

Well, yes indeed now (04:00PM UTC+1) the OSM export works! :) BUT it doesn't export a CycleMap ... :(

So now I'm trying your last hint: using your MapOrganiser (w/ CycleMap option, thank you!) to grab "on-the-fly" from OSM :) BUT it ends with empty tiles and the message "Tiles fetched from Cache:0, from Web: 0" ... :( Maybe because I'm behind a firewall ?! Btw, I've tried also your predefined locations like Central London with the same (empty) result ... :(

Cheers
 

ChrisM

16:54
Wednesday
26-Nov-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

Haha, me again...
I'll try and hijack this thread too.

If you're talking about displaying alternative coordinate systems, can I ask you to consider the possibility of looking into the chances of being able to display OS coordinates? :-)

I understand that this would only be useful within the UK, and I'm not sure what percentage of your users are from here, (indeed, taking this Forum as a typical cross-section then maybe not a particulary high one) so if you feel that it is not worth spending too much time on this(or if the maths involved is going to give you screaming nightmares!!), then fair enough. It's not a 'killer feature' as far as I'm concerned, but it would be b****y useful on occasions...

Chris.
 

Stephen

9:33
Thursday
27-Nov-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Yano,
" Tiles fetched from Cache:0, from Web: 0" ... :( Maybe because I'm behind a firewall ?! "

Yes, if you're running it from work they may have more stringent network security that might block access to the net from Java applications. Try experimenting with the settings in Control Panel/Java/Network Settings (assuming you're using WindowsXP), or maybe your IT dept can assist with the Proxy server settings.

Failing that, if you let me know the lat-lon bounding box for the region that you're after I can create the map for you from here...

Chris,
" can I ask you to consider the possibility of looking into the chances of being able to display OS coordinates "

This is also one that I'd like to implement, again its the horrible maths thats so far put me off! Interestingly, that document suggests that the UK National Grid is also based on the UTM projection, so maybe once I do one then the other will become more straightforward...!

Cheers,
Stephen
 

ChrisM

11:57
Thursday
27-Nov-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

" again its the horrible maths thats so far put me off! "
Blimey!! Looking at that link, it's not surprising it's put you off!! I think Stephen Hawkings might think twice about trying to make sense of that!! :-)
Surely though, there must be some libraries somewhere in the public domain that will do the worst of it, rather than having to code that little lot yourself...
If fact, just had a quick look, and there is some C++ code here, which might help with the lat/long to UTM at least...
http://www.gpsy.com/gpsinfo/geotoutm/gantz/LatLong-UTMconversion.h.txt
http://www.gpsy.com/gpsinfo/geotoutm/gantz/LatLong-UTMconversion.cpp.txt
I haven't got time at the moment to look at the code too closely, but the individual steps seem to be fairly straightforward... its just putting it all together!!

Cheers,
Chris.
 

ChrisM

12:17
Thursday
27-Nov-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

A few more pieces of the C++ example that I missed...

Think this one is the most important (of those I missed)
http://www.gpsy.com/gpsinfo/geotoutm/gantz/constants.h.txt


http://www.gpsy.com/gpsinfo/geotoutm/gantz/UTMConversions.cpp.txt
http://www.gpsy.com/gpsinfo/geotoutm/gantz/SwissGrid.cpp.txt

The whole lot are linked to about 1/4 of the way down this page
http://www.gpsy.com/gpsinfo/geotoutm/
Which contains quite a bit of info and links that might be helpful
Cheers,

Chris.
 

yano

11:33
Friday
28-Nov-2008

Location:
Germany

Phone Model:
SE K610i

Hi Stephen!

finally I succeeded to let it work! :) It was the bloody firewall indeed; from at home I can download&convert all the cycle maps I need thanks to your MapOrganizer! :)

Cheers,
yano
 

yano

14:28
Friday
28-Nov-2008

Location:
Germany

Phone Model:
SE K610i

Hi again Stephen! :)

I've found an Excel file that converts LL <-> UTM with even different datum! Maybe you could use the code behind it ... :)

http://www.uwgb.edu/dutchs/UsefulData/UTMConversions1.xls


Related home page with some background:

http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.htm

Cheers,
yano
 

Stephen

18:02
Friday
28-Nov-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Yano/Chris,

Thanks for all the links. In a way I'd rather work from the original formulas rather than copying other programs since I'm then a bit more familiar with how it all works, and it also means I'm not infringing anyone elses copyright (not to mention that trying to understand C++ can be a nightmare)!

Anyhow, I spent yesterday evening ploughing through that Ordnance Survey formula page, which actually turned out not to be as horrific as it first looked! I've now got TMJ displaying both UK National Grid and UTM coordinates (only via the Debug screen at the moment), though I'm a bit unsure if I'm using the right datums, etc.

For instance, the location 51.507778,-0.128056 (roughly Nelsons Column in London) gets displayed as:
UK Grid: TQ29948052
UTM: Zone 30 699297E 5710205N

Using this converter the UTM figure appears to be spot on (when selecting WGS84 as the Grid Area), although the UK grid reference is a few metres out according to streetmap.co.uk (I think I'm supposed to convert the WGS84 GPS coordinates into Airy1830, which is a bit frustrating!)...

Yano, I can't find much info defining the EUR50 datum that you mentioned (I need values for the constants as defined on page 40 of this document) - do you have any info about this? Or is the UTM format given above sufficient for what you're after?

Cheers,
Stephen
 

ChrisM

20:59
Friday
28-Nov-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

Stephen,

Well done! sounds like you're making some good progress!!
and congratulations of wanting to derive your own code! Very brave... :)

I was looking at those formulae yesterday, and like you say, if you take them step by step, they're not (quite) as sacry as they look... still pretty complicated tho.
My understanding also was that you need to use the Airy1830 ellipsoid to get OS eastings and northings, though from what I can gather, it is 'just' a case of plugging the right set of values into the formula...

Good luck with getting it all to work!!

Cheers,

Chris.
 

yano

13:14
Monday
1-Dec-2008

Location:
Germany

Phone Model:
SE K610i

Hi Stephen!

WOW - WELL DONE !! :))

" For instance, the location 51.507778,-0.128056 (roughly Nelsons Column in London) gets displayed as:
UTM: Zone 30 699297E 5710205N
Using this converter the UTM figure appears to be spot on (when selecting WGS84 as the Grid Area) "


I can confirm your UTM WGS84 result up to the last meter using my preferred converter "GeoTrans" (http://earth-info.nga.mil/GandG/geotrans/index.html) !! :)


" Yano, I can't find much info defining the EUR50 datum that you mentioned (I need values for the constants as defined on page 40 of this document)
do you have any info about this? Or is the UTM format given above sufficient for what you're after? "


For my personal usage I would need both UTM datum WGS84 and datum EUR50 (some Tabacco ed. maps use the former, others use the latter ... !)

GOOD NEWS: the datum "ED50" (ellipsoid International 1924) on page 40 of the above document *IS* EUR50 !!! :))))

and here we go with missing Transverse Mercator projections used in Italy and missing on page 40 of the above doc:

UTM zone 32 - Scale Factor: 0.9996  True Origin: lat0° long9°E   Map Coord.: E 500 000 N 0  Ellipsoid: International 1924
UTM zone 33 - Scale Factor: 0.9996  True Origin: lat0° long15°E  Map Coord.: E 500 000 N 0  Ellipsoid: International 1924

(see http://www.gis.ethz.ch/teaching/lecture/milak/script/03_Koordinaten_und_Projektionen.pdf on page 22)

It seems we have finally collected all the needed parameters!! :)))
I'm looking forward to seeing TMJ-Mobile v0.6.5 !! :)) Thank you for your great job!!

Cheers,
yano
 

Stephen

14:10
Monday
1-Dec-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

" My understanding also was that you need to use the Airy1830 ellipsoid to get OS eastings and northings, though from what I can gather, it is 'just' a case of plugging the right set of values into the formula... "

Think I've got it sorted now - the change of ellipsoid/datum made it all a lot more complex, just to get those extra few meters of accuracy (have to first convert lat/lng to x/y/z then apply a Helmert transform, then convert back to lat/lng with a slow iterative formula!), but the OS grid refs now look about right.

" GOOD NEWS: the datum "ED50" (ellipsoid International 1924) on page 40 of the above document *IS* EUR50 !!! "

Doh, so it is - thanks! Hopefully I'll be able to reuse the 'Helmert' formula to change the WGS84 to ED50, then use the same UTM code to get the coords in the new datum. Will have a go at this later on...

One problem with all this extra Maths is that it does put more strain on the phone, therefore I'm intending to just update the new readouts every 5 or 10 seconds or so - do you think that will be sufficient?

Cheers,
Stephen
 

yano

14:33
Monday
1-Dec-2008

Location:
Germany

Phone Model:
SE K610i

Stephen,

for trekking purposes, 5-10 seconds are fine! ;)

Cheers,
yano
 
 

ChrisM

15:43
Monday
1-Dec-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

5-10 seconds is fine for me too

Chris.
 

(You must be logged in to post a reply to this thread)