GPS
From Wiki.cyring.fr
(Difference between revisions)
(→GPS setup) |
(→Software requirements) |
||
(9 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
+ | === Software requirements === | ||
+ | * [https://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide ArchLinux]<br /> | ||
+ | * [https://wiki.archlinux.org/index.php/Bluetooth Bluetooth]<br /> | ||
+ | * [https://aur.archlinux.org/packages/navit-svn/ Navit (svn)]<br /> | ||
+ | * [https://wiki.archlinux.org/index.php/GpsDrive GpsDrive]<br /> | ||
+ | <br /> | ||
+ | |||
=== GPS setup === | === GPS setup === | ||
- | <syntaxhighlight lang=" | + | <syntaxhighlight lang="text"> |
# hciconfig | # hciconfig | ||
hci0: Type: BR/EDR Bus: USB | hci0: Type: BR/EDR Bus: USB | ||
Line 19: | Line 26: | ||
# chmod o+r /dev/rfcomm0 | # chmod o+r /dev/rfcomm0 | ||
+ | </syntaxhighlight><br /> | ||
+ | === Navit === | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | $ nano ~/.navit/navit.xml | ||
+ | </syntaxhighlight><br /> | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <!-- Vehicle with GPS enabled for bluetooth on unix --> | ||
+ | <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file://dev/rfcomm0" gpsd_query="w+xj"> | ||
+ | |||
+ | <!-- 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><br /> | ||
+ | === Gpsdrive === | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | $ nano .gpsdrive/gpsdriverc | ||
+ | </syntaxhighlight><br /> | ||
+ | <syntaxhighlight lang="ini"> | ||
+ | geoinfofile = /home/cyril/.gpsdrive/geoinfo.db | ||
+ | mapnik_font_path = /usr/share/fonts/TTF | ||
+ | </syntaxhighlight><br /> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | $ sudo systemctl start gpsd | ||
+ | $ systemctl status gpsd | ||
+ | gpsd.service - GPS (Global Positioning System) Daemon | ||
+ | Loaded: loaded (/usr/lib/systemd/system/gpsd.service; static) | ||
+ | Active: active (running) since sam. 2013-08-31 14:58:55 CEST; 3s ago | ||
+ | Main PID: 18186 (gpsd) | ||
+ | CGroup: name=systemd:/system/gpsd.service | ||
+ | └─18186 /usr/bin/gpsd -N /dev/rfcomm0 | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 13:18, 31 August 2013
Contents |
Software requirements
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
$ nano ~/.navit/navit.xml
<!-- Vehicle with GPS enabled for bluetooth on unix --> <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file://dev/rfcomm0" gpsd_query="w+xj"> <!-- 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>
Gpsdrive
$ nano .gpsdrive/gpsdriverc
geoinfofile = /home/cyril/.gpsdrive/geoinfo.db mapnik_font_path = /usr/share/fonts/TTF
$ sudo systemctl start gpsd $ systemctl status gpsd gpsd.service - GPS (Global Positioning System) Daemon Loaded: loaded (/usr/lib/systemd/system/gpsd.service; static) Active: active (running) since sam. 2013-08-31 14:58:55 CEST; 3s ago Main PID: 18186 (gpsd) CGroup: name=systemd:/system/gpsd.service └─18186 /usr/bin/gpsd -N /dev/rfcomm0