| Reply | « Previous Thread | Next Thread » |
|
hello, i would like to know if there is a way of converting latitude and longitude data (from internal gps from n95) into x and y values that can fit on my canvas size. I would like to make a python game that can use my movement in the city to control an avatar . Is there any formula for suck a task?
any hint would be aprreciated. oyuky. |
|
Quote:
You can have your own formula, but 1st you need to find out the relationship between the Latitude and Longitude values and the X & Y coordinates on the CANVAS. This has its applications in Location based Services (LBS) that make use of maps. If Someone is working on a similar project, he might be able to help you; otherwise you need to do some testing and on the basis of that devise an formula or algorithm that works. Best Regards, Croozeus |
|
Check out Nick Burch's excellent site on lat/long conversions, getting internal gps position etc. His code is here http://gagravarr.org/code/
|
|
Quote:
There is some possibly useful information at:http://www.ga.gov.au/geodesy/datums/distance.jsp Ilpo |
|
Quote:
If lat and lon from the internal GPS are N60.2 E25.00 the corresponding UTM coordinates are 389130 (Easting) 6675364 (Northing), zone 35V. Units are meters. So if you have 100px*100px canvas and 1 pixel is 100 meters, you should be able to show 10km*10km geographical area. If 389130 6675364 is in the middle, 389130 6674364 should be 10 pixels below. Python library to handle LatLongUTMconversion Some mapping guru could tell me if I'm missing something here? |
|
Quote:
I think oyuky would be quite happy with that input of yours ![]() Best Regards, Croozeus |
|
yes, thanks for the replies, that LatLongUTMconversion module is cool and works fine, i been experimenting with it, but now i have a new problem: i been trying to adapt the non blocking call of the python for s60 documentation, but instead of printing in the console im trying ti print the latitude and longitude(and the x y converted wih latlongutmconversion) in the canvas, the problem im having is when i run the script my program stays in the console window, do anybody know what is going wrong?
here is the code: import LatLongUTMconversion from LatLongUTMconversion import LLtoUTM, UTMtoLL from graphics import * import appuifw import e32 import positioning appuifw.app.screen='normal' appuifw.app.title=unicode('My Test App') canvas=appuifw.Canvas() appuifw.app.body=canvas positioning.select_module(positioning.default_module()) positioning.set_requestors([{"type":"service", "format":"application", "data":"test_app"}]) def cb(event): e = d["position"] canvas.clear() canvas.text( (2,12), unicode(str(e["latitude"]))) canvas.text( (2,24), unicode(str(e["longitude"]))) l=LLtoUTM(19, e["latitude"], e["longitude"]) canvas.text( (2,34), unicode(str(l[1]))) canvas.text( (2,46), unicode(str(l[2]))) e32.ao_yield() e32.ao_sleep(1115) d= positioning.position(course=1,satellites=1,callback=cb, interval=500000,partial=0) |
|
oops sorry for pasting not indented code, but when i pasted it itappeared indented before posting.
is there any special way for identing? |
|
You need to use the CODE tags (#) for keeping your posts to the indent.
|
|
cool, thanks
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Set Exif Gps Info Latitude. | shashishaw | General Symbian C++ | 15 | 2009-03-24 17:50 |
| Format of longitude and latitude | asparov | Location Based Services and Navigation | 6 | 2008-10-09 10:54 |
| reading latitude and longitude from EXIF header | Larry101 | Mobile Java General | 0 | 2008-03-14 11:45 |
| JSR 179 -Getting Longitude Latitude Values of Current Location | satyarajasekhar | Location Based Services and Navigation | 6 | 2007-12-31 13:55 |
| 9210 City latitude and longitude | nickct | Symbian Tools & SDKs | 1 | 2002-08-16 11:38 |