Difference between revisions of "Maemo"

From Navit's Wiki
Jump to: navigation, search
(Compiling Navit from source)
(Compiling Navit from source)
Line 32: Line 32:
 
As of SVN 1843 you need to get libgpsbt-dev before compiling. Execute <tt>fakeroot apt-get install libgpsbt-dev</tt> in scratchbox.
 
As of SVN 1843 you need to get libgpsbt-dev before compiling. Execute <tt>fakeroot apt-get install libgpsbt-dev</tt> in scratchbox.
  
To build the icons in various sizes, you will need to install librsvg2. Execute <tt>fakeroot apt-get librsvg2</tt> in scratchbox.
+
The above will build Navit along with pre-scaled icons. Prescaling the icons is known to greatly improve rendering of the gui/internal displays.
  
A [http://tech.visser-scully.ca debian directory] is available so that you can build your own packages. Download and unpack in your top Navit source directory. Build a .deb  file by using 'fakeroot ./debian/rules binary'. The .deb  file  will appear in the directory above where you are.
+
navit/xpm/navit_svg2png uses ksvg2png to pre-build the icons. If you don't have kde installed (which you wouldn't have inside scratchbox) then you will need to install librsvg2. Execute <tt>fakeroot apt-get librsvg2</tt> in scratchbox. You will need to change the <tt>navit_svg2png</tt> script to use <tt>rsvg-convert -w $w -h $h $svg.svg -o $png</tt> in two places in the file.
 +
 
 +
A [http://tech.visser-scully.ca debian directory] is available so that you can build your own packages. Download and unpack in your top Navit source directory. Build a .deb  file by using <tt>fakeroot ./debian/rules binary</tt>. The .deb  file  will appear in the directory above where you are. This works best after you have done at least one build using the full set of commands above.
  
 
--[[User:Gerritv|Gerritv]] 05:53, 4 February 2009 (CET) simplified the build instructions.
 
--[[User:Gerritv|Gerritv]] 05:53, 4 February 2009 (CET) simplified the build instructions.
  
BTW: The Hildon support seems not to be that perfect yet. Presently it consists only of +,- and full  screen buttonns plus gpsd autostart.
+
BTW: The Hildon support seems not to be that perfect yet. Presently it consists only of +,- and full  screen buttons plus gpsd autostart.
  
 
=== Configuration options ===
 
=== Configuration options ===

Revision as of 05:00, 4 February 2009

Installing Navit on the Nokia n770/n800/n810

General instructions

  1. Install Navit. There's a Maemo project which provides some (currently rather dated) binaries. Alternatively, there are some "bleeding edge" binaries available in the download section.
  2. Get maps. It is possible to use Garmin maps, but maps of openstreetmap, a wiki like world map, also should do a good job. There are several sources where you can download Navit maps based on openstreetmap data. Save them anywhere on your device, e.g. somewhere on the flash memory.
  3. Configure Navit. Search for the file navit.xml as superuser root. Replace the path to the map file to fit your device and configuration:
<mapset enabled="yes">
<map type="binfile" enabled="yes" data="/media/mmc2/map/planet.bin"/>
</mapset>

A better option for the N8x0 is to copy the navit.xml file into your /user/home/.navit directory. Tehn you can edit using XTerm (and don't need to be root).

Compiling Navit from source

Developers may need to compile the source within the scratchbox environment. You need to have Scratchbox and the Nokia SDK installed. Place the source inside the scratchbox environment, log in to scratchbox, cd to the source directory and execute the following commands:

export SBOX_DEFAULT_AUTOMAKE=1.9
./autogen.sh
./configure --prefix=/usr --disable-binding-python --disable-gui-sdl --enable-avoid-float --enable-avoid-unaligned --enable-svg2png-scaling-flag="32 48" --enable-svg2png-scaling-nav="8 16 32 48"
make
make install

If you don't want/need the sample map then add --disable-samplemap to the above command.

Others have used slightly different options for configure:

./configure --prefix=/home/user/navit --disable-garmin --disable-samplemap --disable-hildon --disable-binding-python --disable-graphics-sdl --disable-gui-sdl --disable-postgresql --disable-svg2png
./configure -q -disable-binding-python -disable-gui-sdl -disable-samplemap -enable-avoid-float -enable-avoid-unaligned -prefix=/usr

As of SVN 1843 you need to get libgpsbt-dev before compiling. Execute fakeroot apt-get install libgpsbt-dev in scratchbox.

The above will build Navit along with pre-scaled icons. Prescaling the icons is known to greatly improve rendering of the gui/internal displays.

navit/xpm/navit_svg2png uses ksvg2png to pre-build the icons. If you don't have kde installed (which you wouldn't have inside scratchbox) then you will need to install librsvg2. Execute fakeroot apt-get librsvg2 in scratchbox. You will need to change the navit_svg2png script to use rsvg-convert -w $w -h $h $svg.svg -o $png in two places in the file.

A debian directory is available so that you can build your own packages. Download and unpack in your top Navit source directory. Build a .deb file by using fakeroot ./debian/rules binary. The .deb file will appear in the directory above where you are. This works best after you have done at least one build using the full set of commands above.

--Gerritv 05:53, 4 February 2009 (CET) simplified the build instructions.

BTW: The Hildon support seems not to be that perfect yet. Presently it consists only of +,- and full screen buttons plus gpsd autostart.

Configuration options

  • Navit offers several GUIs. If you are not pleased with the GTK GUI, maybe you want to use the "internal" GUI. You can switch it on via the navit.xml configuration file.

The n810 for driving is best used with the internal GUI. it is not entirely obvious how to configure the OSD options required to show information. The way to configure navit changed in Navit svn1979 The below is an example of laying out the information on an n810

       <gui type="internal" /> 
       <osd enabled="no" type="compass"/>
       <osd enabled="yes" type="text" label="ETA:${navigation.item.destination_time[arrival]}\nTL:${navigation.item.destination_time[remaining]}
                                             \nDist:${navigation.item.destination_length[named]}\nSpeed:${vehicle.position_speed}\n
                                             Max:${tracking.item.route_speed}" x="10" y="-180" font_size="550" h="180" w="270" />
       <osd enabled="yes" type="text" label="Currently On\n${navigation.item.street_name}/${navigation.item.street_name_systematic}\nTurn Onto
                                             \n${navigation.item[1].street_name}/${navigation.item[1].street_name_systematic}\nS
                                             at:${vehicle.position_sats_signal}/${vehicle.position_qual}" x="285" y="-180" font_size="500" h="180" w="580" />
       <osd enabled="yes" type="text" label="${navigation.item[1].length[named]}m" x="-200" y="100" w="180" h="80" font_size="550"/>
       <osd enabled="yes" type="navigation_next_turn" x="-200" y="180" font_size="650" w="180" h="50"/> 
       
       <osd enabled="yes" type="button" x="0" y="-300" command="gui_internal_fullscreen" src="toggle_fullscreen.xpm"/> 
       <osd enabled="no" type="button" x="-96" y="0" command="gui_internal_menu" src="menu.xpm"/>
       <osd enabled="yes" type="button" x="0" y="0" command="zoom_in" src="zoom_in.xpm"/>
       <osd enabled="yes" type="button" x="-96" y="0" command="zoom_out" src="zoom_out.xpm"/> 

gives: N810osd.png

Note the above linewraps are added to make it display nicely, but you'll want each osd items as a single line in the navit.xml file The important settings are w (width) and h (height) which allow you to set the boxes big enough to then use a large font. I'm using 550 point to be able to comfortably read the information whilst I'm driving. Also this layout only looks right full screen.

The new style has type="text" which are effectively free text fields that understand \n for newline and a number of variables which get switched for information values. eg ${navigation.item.destination_time[arrival]} shows the time at which you are expected to arrive at destination. All the text is added for my own preference as a first pass. Please add additional layout variations that you'd like to share.

To make updating this item easier, and maybe sharing different OSD setups easier you can replace the OSD entries in navit.xml with:

       <xi:include href="/home/user/.navit/navitOSD.xml"/>

Then you can create a new file navitOSD.xml in which you place all the OSD items. This means you can create and share layouts by providing just the navitOSD.xml file and people can drop them into place without having to hand edit their navit.xml files. The same trick will work for any subset part of the navit.xml file

I'll try to update this when I figure out new settings, and keep it showing a reasonable setup for the n810

---Daniel Would

Here's another option with each item in its' own text box. The layout also works without overlaping when in windowed mode.

<-- Satellite Information (${vehicle.position_sats_used} not displayed) / Compass-->

       <osd enabled="yes" type="text" label="Sats\n${vehicle.position_sats_signal}/${vehicle.position_qual}" x="5" y="5" font_size="300" w="60" h="35"/>
       <osd enabled="yes" type="compass" x="5" y="45" font_size="250" w="60" h="80"/>  	

<-- Speed - (Max Speed) /${tracking.item.route_speed} not displayed-->

       <osd enabled="yes" type="text" label="${vehicle.position_speed}" x="5" y="130" font_size="400" w="120" h="35" />

<-- ETA / Header / Distance Remaining / Time Remaining-->

       <osd enabled="yes" type="text" label="ETA: ${navigation.item.destination_time[arrival]}" x="5" y="-220" font_size="400" w="170" h="30"/> 
       <osd enabled="yes" type="text" label="Left to Go" x="5" y="-185" font_size="400" w="170" h="30"/>
       <osd enabled="yes" type="text" label="${navigation.item.destination_length[named]}" x="5" y="-150" font_size="400" w="170" h="30"/>
       <osd enabled="yes" type="text" label="${navigation.item.destination_time[remaining]}" x="5" y="-115" font_size="400" w="170" h="30"/>

<-- Distance to Turn / Next Turn / Next Street /${navigation.item[1].street_name_systematic} not displayed-->

       <osd enabled="yes" type="text" label="In ${navigation.item[1].length[named]} " x="5" y="-40" font_size="500" w="235" h="35"/> 
       <osd enabled="yes" type="navigation_next_turn" x="245" y="-45" font_size="500" w="60" h="40"/>  
       <osd enabled="yes" type="text" label="onto ${navigation.item[1].street_name}" x="310" y="-40"  font_size="500" w="485" h="35"/>

<-- Current Street Name /${navigation.item.street_name_systematic} not displayed-->

       <osd enabled="yes" type="text" label="${navigation.item.street_name}" x="150" y="5"  font_size="500" w="500" h="35"/> 	

<-- Right Side Controls -->

       <osd enabled="yes" type="button" x="-80" y="0" command="zoom_in" src="zoom_in.xpm"/>
       <osd enabled="yes" type="toggle_announcer" x="-53" y="95" w="48" h="48"/>
       <osd enabled="yes" type="button" x="-80" y="170" command="zoom_out" src="zoom_out.xpm"/> 
       <osd enabled="yes" type="button" x="-80" y="280" command="gui_internal_fullscreen" src="toggle_fullscreen.xpm"/> 


<-- Items Not Displayed -->

       <osd enabled="no" type="speed_warner" x="-60" y="180" w="60" h="60"/> 
       <osd enabled="no" type="button" x="0" y="0" command="gui_internal_menu" src="menu.xpm"/>

Gives: Osd.png

This is after a day of tweaking. I actually changed the "of" in the satellites to a "/". I'm pretty happy with the settings now. I didn't display max speed as I think it comes from navit.xml settings and doesn't reflect the real speed limits of the streets I travel on (Navit shows the highway I take as 50mph/80kph when it is 65mph). This setup also scales well in windowed mode with no overlapping.

---lemmyslender



  • It is possible to make Navit recording and displaying a track. First let Navit record the track in the vehicle section, then add the resulting file to the mapset section:
<log type="textfile" data="/home/user/.navit/tracks/ActiveLog.txt" flush_size="1000" overwrite="30" />
...
<map type="textfile" enabled="yes" data="/home/user/.navit/tracks/ActiveLog.txt"/>

Using Navit

If everything went fine, Navit can be started from the menu and you should see the map on the display. In the upper panel of the tablet, you should see a satellite icon with a green tail, indicating that your device has a GPS fix. If so, Navit should show your current position on the map.

Starting GPSd manually

Navit does not necessarily start the GPS subsystem (driver and gpsd) on the Tablet. Therefore you need to do this by starting another application (Map, Gpxview) which is capable of starting it. This "helper application" needs to run as long as you want to use Navit.

As of SVN 1843 (Dec 19, 2008) Navit for N800 will autostart gpsd if your GPS BT receiver is on. For N810 this will work witht he internal GPS receiver as well.

Starting GPSd automatically

Some additional details (Nov 28, 2008): I spent an evening getting Navit working on my N800, here are what else you need to do on Diablo with a Bluetooth GPS

  1. Install bluez-utils-test, have to get this from a Chinook repository for now
  2. Follow the instructions here [1]
  3. Change your navit.xml vehicle definition to use file:/dev/rfcomm0 instead of gpsd

Now each time you start Navit, the GPS connection gets made for you. This avoids workarounds such as starting Map or gpsview.

As of SVN 1843 (Dec 19, 2008) Navit for N8x0 will autostart gpsd for you. But the info above might be of use so I left it here.

Notes