Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Maemo Mapper: GPS for the Nokia 770

    Reply
    Page 9 of 27 | Prev |   7     8   9   10     11   19 | Next | Last
    zApe | # 81 | 2006-05-14, 12:36 | Report

    Hm.... interesting, very interesting... I have setup old firmware and all worked right away! But i am was litlle disappointed in precision. thx for help.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Demostenes | # 82 | 2006-05-14, 14:30 | Report

    Originally Posted by mgedmin
    Here's a patch that adds Google satellite map support to MaemoMapper:
    http://mg.pov.lt/maemo-mapper-0.1-su...sat-maps.patch
    I've tried your patch, and it works great!.

    The problem is that I want to maintain both systems (maps and topo) and I have to change URI prefix and directory of maps every time. I am working in which it can be two different definitions for URI/directory (maps and topo) and we could exchange easily among them. I hope to have something for tomorrow (it depends how fast i can learn to programme in maemo ) . I already have something, but it crash when change each other for two times.

    Greetings. Demostenes.

    PS: Thanks for your explanation about atof and setlocale. I had no idea.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    kutibah | # 83 | 2006-05-14, 16:06 | Report

    Originally Posted by ioan
    for those who use windows at home, I made a windows application to help you download maps for maemo-mapper on your computer and transfer them on your nokia 770 when you need them. here is the link:
    http://www.barghis.com/winmapper.htm
    the app maps are comparible with maemo-mapper, I used qnuite's code (converted to delphi) to download the maps.
    the source code is included

    thanks,
    -ioan
    Thank you so much for this! I haven't used it yet, but I'll let you know how it goes when I get a chance!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mgedmin | # 84 | 2006-05-14, 19:36 | Report

    Originally Posted by zApe
    I have one problem when using maemo-mapper: I use Globalsat BT-338 as GPS receiver. Maemo-mapper can`t connect whith it. After enter MAC and "enable GPS" apears banner "Searching fo GPS receiver", after some time, when bt-338 connected to 770 banner start blinging. The GPS position be about Africa i point whith coordinates (1,1). I have waiting and i have`t right result. Can anybody help me?
    I had this problem too. In my case it was caused by gpsdrive -- it switched my NaviLock/Globalsat BT-308 into Garmin-compatible binary mode and did not switch it back into NMEA mode.

    I had to find the binary protocol description and write a Python script to switch it back into NMEA mode: http://mg.pov.lt/blog/maemo-mapper.html

    (I suppose you can find some Windows program that would let you do that. I don't have Windows.)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mgedmin | # 85 | 2006-05-14, 19:41 | Report

    Originally Posted by Demostenes
    I've tried your patch, and it works great!.

    The problem is that I want to maintain both systems (maps and topo) and I have to change URI prefix and directory of maps every time. I am working in which it can be two different definitions for URI/directory (maps and topo) and we could exchange easily among them. I hope to have something for tomorrow (it depends how fast i can learn to programme in maemo ) . I already have something, but it crash when change each other for two times.
    That would be a nice feature to have.

    In the meantime I've created two shell scripts that let me switch between street maps and sat maps while Maemo Mapper is not running. These scripts do two things: (1) change a symlink to the map directory and (2) change the map url with gconftool-2.

    Code:
    #!/bin/sh
    # Ask Maemo Mapper to use satellite maps from Google
    gconftool-2 -s /apps/maemo-mapper/map_uri_format -t string 'http://kh.google.com/kh?n=404&v=6&t=%s'
    ln -sf /media/mmc1/maps/sat /home/user/apps/maemo-mapper
    Code:
    #!/bin/sh
    # Ask Maemo Mapper to use street maps from Google
    gconftool-2 -s /apps/maemo-mapper/map_uri_format -t string 'http://mt.google.com/mt?n=404&v=w2.11&x=%d&y=%d&zoom=%d'
    ln -sf /media/mmc1/maps/street /home/user/apps/maemo-mapper

    Edit | Forward | Quote | Quick Reply | Thanks

     
    disq | # 86 | 2006-05-14, 19:57 | Report

    Originally Posted by ioan
    for those who use windows at home, I made a windows application to help you download maps for maemo-mapper on your computer and transfer them on your nokia 770 when you need them. here is the link:
    http://www.barghis.com/winmapper.htm
    the app maps are comparible with maemo-mapper, I used qnuite's code (converted to delphi) to download the maps.
    the source code is included

    thanks,
    -ioan
    great tool!

    but there's a slight problem with the lat/log parsing, if the decimal seperator in the system/locale is not "." (ie. if it's ",") then you have to fix the coordinates (replace "."'s with ","'s) or it won't parse them.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    scudderfish | # 87 | 2006-05-14, 21:00 | Report

    And here's a (very)quick and (very)dirty Python script to scrape maps.

    Code:
    #!/usr/bin/env python
    import sys,os
    from math import *
    from optparse import OptionParser
    from urllib import urlretrieve
    
    MERCATOR_SPAN=(-6.28318377773622)
    MERCATOR_TOP=(3.14159188886811)
    WORLD_SIZE_UNITS=(1 << 26)
    
    def latlon2unit(lat, lon):
    	unitx = (lon + 180.0) * (WORLD_SIZE_UNITS / 360.0) + 0.5
    	tmp = sin(lat * (pi / 180.0))
    	unity = 0.50 + (WORLD_SIZE_UNITS / MERCATOR_SPAN) * (log((1.0 + tmp) / (1.0 - tmp)) * 0.50 - MERCATOR_TOP);
    	return (unitx,unity)
    
    def tile2zunit(tile, zoom):
    	return ((tile) << (8 + zoom))
    
    def unit2ztile(munit, zoom):
    	return ((int)(munit) >> (8 + zoom))
    
    def loadImage(x,y,zoom):
    	url = "http://mt.google.com/mt?n=404&v=w2.11&x="+str(x)+"&y="+str(y)+"&zoom="+str(zoom)
    	destination = dirpath+"/"+str(y)+".jpg"
    	if(os.access(destination,os.R_OK) == False):
    		print "Downloading "+url+" to "+destination
    	else:
    		print "Already got " + destination
    	urlretrieve(url,destination)
    	
    
    parser = OptionParser()
    parser.add_option("-t", "--start-lat", dest="startlat",help="start latitude",type="float")
    parser.add_option("-l", "--start-long",dest="startlong",help="start longitude",type="float")
    parser.add_option("-b", "--end-lat", dest="endlat",help="end latitude",type="float")
    parser.add_option("-r", "--end-long",dest="endlong",help="end longitude",type="float")
    parser.add_option("-z", "--zoom",dest="zoom",help="zoom level",type="int")
    
    (options, args) = parser.parse_args()
    
    (sux,suy) = latlon2unit(options.startlat,options.startlong)
    (eux,euy) = latlon2unit(options.endlat,options.endlong)
    
    if eux < sux:
    	x = eux
    	eux = sux
    	sux = x
    
    if euy < suy:
    	y = euy
    	euy = suy
    	suy = y
    
    start_tilex = unit2ztile(sux, options.zoom + 1);
    
    start_tiley = unit2ztile(suy, options.zoom + 1);
    
    end_tilex = unit2ztile(eux, options.zoom + 1);
    
    end_tiley = unit2ztile(euy, options.zoom + 1);
    
    
    numMaps=(end_tilex-start_tilex)*(end_tiley-start_tiley)
    
    print "About to retrieve "+str(numMaps)+" maps"
    
    for x in range(start_tilex,end_tilex):
    	dirpath="maps/"+str(options.zoom)+"/"+str(x)
    	if(os.access(dirpath,os.W_OK) == False):
    		os.makedirs(dirpath)
    	for y in range(start_tiley,end_tiley):
    		loadImage(x,y,options.zoom)
    Code:
    ./getMaps.py -h
    usage: getMaps.py [options]
    
    options:
      -h, --help            show this help message and exit
      -t STARTLAT, --start-lat=STARTLAT
                            start latitude
      -l STARTLONG, --start-long=STARTLONG
                            start longitude
      -b ENDLAT, --end-lat=ENDLAT
                            end latitude
      -r ENDLONG, --end-long=ENDLONG
                            end longitude
      -z ZOOM, --zoom=ZOOM  zoom level
    use it like
    Code:
     ./getMaps.py -t 51.82 -l -0.3 -b 51.49 -r 0 -z 4

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ioan | # 88 | 2006-05-14, 22:29 | Report

    Originally Posted by disq
    great tool!
    but there's a slight problem with the lat/log parsing, if the decimal seperator in the system/locale is not "." (ie. if it's ",") then you have to fix the coordinates (replace "."'s with ","'s) or it won't parse them.
    you mean when you read from the .kml file? I knew from the moment I wrote the code that that will be a problem, but I have no idea what char they use to separate the two coordinates (what char from regional settings). if the decimal symbol is a "," will the coordinates be separated by "." ? :-) post here an example of a kml file, with your regional settings and I will fix it.

    -i

    Edit | Forward | Quote | Quick Reply | Thanks

     
    disq | # 89 | 2006-05-15, 03:29 | Report

    Originally Posted by ioan
    you mean when you read from the .kml file? I knew from the moment I wrote the code that that will be a problem, but I have no idea what char they use to separate the two coordinates (what char from regional settings). if the decimal symbol is a "," will the coordinates be separated by "." ? :-) post here an example of a kml file, with your regional settings and I will fix it.

    -i
    the coords in the .kml file are correct (with "." as the dec seperator) and are loaded OK, but when you hit "download" delphi throws out an exception saying that it can't parse the float. you edit the coords (replacing the "." with ",") and hit download again, it works.

    regional stuff in the control panel are Turkish/Turkey.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ioan | # 90 | 2006-05-15, 03:49 | Report

    Originally Posted by disq
    the coords in the .kml file are correct (with "." as the dec seperator) and are loaded OK, but when you hit "download" delphi throws out an exception saying that it can't parse the float. you edit the coords (replacing the "." with ",") and hit download again, it works.

    regional stuff in the control panel are Turkish/Turkey.
    fixed, please try now and let me know

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 9 of 27 | Prev |   7     8   9   10     11   19 | Next | Last
vBulletin® Version 3.8.8
Normal Logout