Blog Code Forum

GPS

From Wiki.cyring.fr

(Difference between revisions)
Jump to: navigation, search
(GPS setup)
(GPS setup)
Line 1: Line 1:
=== GPS setup ===
=== GPS setup ===
-
<syntaxhighlight lang="bash">
+
<syntaxhighlight lang="text">
# hciconfig
# hciconfig
hci0:  Type: BR/EDR  Bus: USB
hci0:  Type: BR/EDR  Bus: USB
Line 19: Line 19:
# chmod o+r /dev/rfcomm0
# chmod o+r /dev/rfcomm0
 +
</syntaxhighlight>
 +
=== Navit ===
 +
<syntaxhighlight lang="text">
 +
$ nano ~/.navit/navit.xml
 +
 +
                <!-- Vehicle with GPS enabled for gpsd on unix -->
 +
                <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file://dev/rfcomm0" gpsd_query="w+xj">
 +
                <!-- Vehicle with GPS enabled for direct communication on windows. Remove the line above if you use this. -->
 +
                <!-- <vehicle name="Local GPS" profilename="car" follow="1" enabled="yes" active="1"
 +
                                source="serial:COM4 baud=4800 parity=N data=8 stop=1" > -->
 +
 +
                        <!-- Navit can write a tracklog in several formats (gpx, nmea or textfile): -->
 +
                        <log enabled="no" type="gpx" attr_types="position_time_iso8601,position_direction,position_speed,profilename,position_radius" data="track_%Y%m%d-%%i.gpx" flush_size="1000" flush_time="30"/>
 +
                </vehicle>
 +
 +
                <!-- If you dont want to use the sample map, either set enabled="no" in the next line or remove the xml file from the maps directory -->
 +
                <mapset enabled="no">
 +
                        <xi:include href="$NAVIT_SHAREDIR/maps/*.xml"/>
 +
                </mapset>
 +
 +
                <!-- Mapset template for openstreetmaps -->
 +
                <mapset enabled="yes">
 +
                        <map type="binfile" enabled="yes" data="/home/cyril/Download/GPS/maps/osm/osm_idf.bin"/>
 +
                </mapset>
</syntaxhighlight>
</syntaxhighlight>

Revision as of 12:44, 31 August 2013

GPS setup

# hciconfig
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 10:20:30:40:50:60  ACL MTU: 192:8  SCO MTU: 64:8
        UP RUNNING PSCAN 
        RX bytes:991486 acl:56018 sco:0 events:1228 errors:0
        TX bytes:16043 acl:1179 sco:0 commands:33 errors:0
 
# hciconfig hci0 up
 
# hcitool scan
Scanning ...
        10:20:30:40:50:60       GSpace GS-R238
 
# rfcomm connect rfcomm0 10:20:30:40:50:60
Connected /dev/rfcomm0 to 10:20:30:40:50:60 on channel 1
Press CTRL-C for hangup
 
# chmod o+r /dev/rfcomm0

Navit

$ nano ~/.navit/navit.xml
 
                <!-- Vehicle with GPS enabled for gpsd on unix -->
                <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file://dev/rfcomm0" gpsd_query="w+xj">
                <!-- Vehicle with GPS enabled for direct communication on windows. Remove the line above if you use this. -->
                <!-- <vehicle name="Local GPS" profilename="car" follow="1" enabled="yes" active="1" 
                                source="serial:COM4 baud=4800 parity=N data=8 stop=1" > -->
 
                        <!-- Navit can write a tracklog in several formats (gpx, nmea or textfile): -->
                        <log enabled="no" type="gpx" attr_types="position_time_iso8601,position_direction,position_speed,profilename,position_radius" data="track_%Y%m%d-%%i.gpx" flush_size="1000" flush_time="30"/>
                </vehicle>
 
                <!-- If you dont want to use the sample map, either set enabled="no" in the next line or remove the xml file from the maps directory -->
                <mapset enabled="no">
                        <xi:include href="$NAVIT_SHAREDIR/maps/*.xml"/>
                </mapset>
 
                <!-- Mapset template for openstreetmaps -->
                <mapset enabled="yes">
                        <map type="binfile" enabled="yes" data="/home/cyril/Download/GPS/maps/osm/osm_idf.bin"/>
                </mapset>
Personal tools