Configuration (old)

From Navit's Wiki
Revision as of 19:19, 4 December 2012 by Usul (talk | contribs) (attention, will do cleaning this weeks!)
Jump to: navigation, search


Foreword

Structure of the default navit.xml

Setting up Navit is done by editing a configuration file called "navit.xml".

Now editing this file in a text editor is simple, it's just a plain text XML file. Just remember to turn off 'save UTF8 byte mark' in Preferences or navit may complain very much on the first byte of the file... An xml editor also eases wrinting the file, as it will suggest tags and values as you write.

Navit comes preshipped with an navit.xml that can be stored at various locations (depending on your system):

  • in ~/.navit/navit.xml : e.g : /home/myusername/.navit/navit.xml (This is probably to best place to customize your settings!)
  • in /usr/share/navit or /etc/navit

Navit will look for it in the following order:

  • in the current directory (used on Windows)
  • location supplied as first argument on the command line, e.g.: navit /home/myusername/navittestconfig.xml (Used mainly for development)
  • in the current directory as navit.xml.local (Used mainly for development)

Full List of Options

For the power users, or those who've already read through this guide a few times, a full list of options is available.

Graphical User Interface

Navit provides various graphical user interfaces via its plugin mechanism. For instructions on how to setup each GUI please refer to the Graphics Driver section of this page.

Below are previews of the different guis as well as more information that can be accessed for each GUI.

GUI:Internal

Example of Internal GUI with OSD

The internal GUI is the most recent GUI and is aimed for touchscreen devices. This GUI is still in heavy development but should be fully functional for most day to day uses of Navit.

  • For a detailed look at how the Internal GUI looks and operates please refer to the Internal GUI guide.
  • For further information on how to modify the OSD elements of the internal GUI please refer to the On Screen Display guide.
  • For a list of Internal GUI layouts that can be applied please refer to the OSD Layouts guide.


To enable this GUI please refer to the Graphics Driver section of this page.

Internal-specific configuration items:

  • menu_on_map_click - "1"-single click on map will switch to gui,"0"-Gui could be switched only by command (see OSD item gui.menu() )
  • a nice way to enable and disable menu_on_map_click interactively is to define an OSD command like

<osd enabled="yes" type="button" x="-70" y="290" command="gui.menu_on_map_click=!gui.menu_on_map_click" src="gui_active.png"/>


GUI:GTK

Example of GTK GUI

At this point the documentation for the GTK GUI is minimal. More documentation will be placed at the Custom GTK GUI Tutorial.

While being the default GUI in the past, the GTK GUI is still good for desktop use.

  • menubar="0" will disable the menu bar. Useful on devices with small screens
  • toolbar="0" will disable the tool bar. Useful on devices with small screens
  • statusbar="0" will disable the status bar. Useful on devices with small screens


To enable this GUI please refer to the Graphics Driver section of this page.

Settings you might need to change

Starting position

You might want to change the starting position of navit, especially if you are using Navit without a GPS. You can get your coordinates here: http://itouchmap.com/latlong.html

You can change the starting position in navit.xml, here :

<navit gui="..." graphics="..." center="4808 N 1134 E" zoom="128" >

The latitude and longitude are written as multiplied by 100, i.e. you won't see the decimal point. For example, instead of 48.08, enter 4808.

Mapset

Navit only delivers a default map of Munich (Germany).
At this time Navit has the ability to utilize many different map providers. There are features and limitations for each map so please refer to the list below for more information on these maps and how to apply them.

Vehicle

This is where you will define your gps data source. In genereal NAVIT supports:

  • NMEA plain text GPS (baud rate should be 4800 in most cases)

You can use one of the following:

Windows:

  • source="serial:COM[:port] baud=115200 parity=N data=8 stop=1" (>build 3650)

Windows Mobile:

  • source="wince:GPD1:" internal GPS driver (configured from WinCE [Remote] GPS Settings)
  • source="wince:COM1:" baudrate="4800" - using the GPS data from the COM port directly, you need to know the actual COM port your GPS unit is connected to.
    • To discover on which port your GPS is, use SirfTECH Tool. It can automatically scan existing serial ports trying different baudrates to detect GPS source.
    • To use a BT GPS it must be configured as outgoing com port and paired, then selected as hardware port in GPS Settings.
    • To start bluetooth on navit startup add bluetooth="yes". When exiting navit, the previous bluetooth state is recovered.

Linux:

  • source="file:/dev/ttyS0" - /dev/ttyS0 for serial GPS connected to the first serial port
  • source="file:/dev/rfcomm0" - BlueTooth GPS, /dev/rfcomm0 must be configured in /etc/bluetooth/rfcomm.conf
  • source="gpsd://host[:port]" - gpsd://localhost, the default one, will try to connect to gpsd on localhost
  • source="socket:ipaddr:2947:r=1" - connect to gpsd in nmea mode (gpsd versions 2.39 or older)
  • source='socket:ipaddr:2947:?WATCH={"enable":true,"nmea":true};' - connect to gpsd in nmea mode (gpsd versions newer than 2.39)

Tricks:

  • source="socket:ipaddr:post" - socket connection (expects nmea stream)
  • source="gypsy://connectstring" - gypsy
  • source="file:/home/myhome/mynmea.log"  : replay the nmea logfile mynmea.log (Windows it is currently not possible!)
  • source="pipe:/usr/bin/gpspipe -r" - any executable that produces NMEA output - gpsbabel, gpspipe, ...
  • source="demo://" : to use the demo vehicle. Set your Position and Destination, and vehicle will follow the calculated route. Useful if you have no nmea data source.

Example of code for a Garmin GPS using gpsd on linux, and write track log. The pro