-
Notifications
You must be signed in to change notification settings - Fork 3
/
gps.notes.txt
82 lines (48 loc) · 1.47 KB
/
gps.notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
global stat gps reciever
BU-353-S4
sudo apt-get install gpsd-clients tangogps o
# http://stackoverflow.com/questions/16435302/ubuntu-getting-gps-coordinates-from-dongle-bu-353
sudo gpsctl -n /dev/ttyUSB0
sudo stty -F /dev/ttyUSB0 ispeed 4800
gpsd -b /dev/ttyUSB0
# NMEA output format
http://aprs.gids.nl/nmea/
http://aprs.gids.nl/nmea/#gga
# get gpsd to work
sudo killall gpsd && sudo gpsd -D 5 -N -n /dev/ttyUSB0 > /dev/null
# gpsdrive with device
sudo gpsdrive -X /dev/ttyUSB0
#foxtrotgps
run gpsd
$foxtrotgps
# try viking
https://apps.ubuntu.com/cat/applications/viking/
# navit
routing?
# automatically run script when usb is plugged in:
http://askubuntu.com/questions/284224/autorun-a-script-after-i-plugged-or-unplugged-a-usb-device
===================================
#!/bin/bash
export gps_device=$(ls /dev/ttyU*)
echo $gps_device
### Enable gps
sudo pgrep gpsd | xargs -I{} sudo kill -9 {}
sudo stty -F $gps_device ispeed 4800
sudo gpsctl -f -n $gps_device
sudo gpsd -n -b $gps_device
===================
# TIMING
#sync'ing system time with gps
1) add the following to /etc/ntp.conf(see gpsd man page)
server 127.127.28.0
fudge 127.127.28.0 time1 0.420 refid GPS
server 127.127.28.1 prefer
fudge 127.127.28.1 refid GPS1
2) restart ntp server
sudo service ntp restart
3) check the results:
ntpq -p
# convert dates (format from rtl_power)
date -d "2015-06-02 00:23:58" +%s
=> to epoch time
data -d @1433219038