Перейти к содержанию

Навигация

Получение точного времени через GPS/Glonass/en: различия между версиями

Новая страница: «stratum=0, refid=GPSP, flags=1 Then configure NTP as we need to and so on.»
(Новая страница: «To put libcap-dev – without it NTP with settings of a cat by default in system will not work and after a rebut everything will break and it is necessary to clea…»)
(Новая страница: «stratum=0, refid=GPSP, flags=1 Then configure NTP as we need to and so on.»)
 
(не показано 8 промежуточных версий этого же участника)
Строка 16: Строка 16:
cp /usr/local/bin/ntp* /usr/bin/ && sudo cp /usr/local/sbin/ntp* /usr/sbin/ #system NTP new model improved
cp /usr/local/bin/ntp* /usr/bin/ && sudo cp /usr/local/sbin/ntp* /usr/sbin/ #system NTP new model improved


Далее настраиваем нтп – надо создать алиалсы для драйвера 20 (https://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html)
Now you can set NTP to start aliasy driver 20 (https://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html)


vi /etc/udev/rules.d/10-gps.rules  
vi /etc/udev/rules.d/10-gps.rules  
Строка 26: Строка 26:




Можно еще использовать драйвер 22 – нтп + драйвер 20 (нмеа) или 28 (гпсд)
You can still use driver 22 – NTP + driver 20 (NMEA) or 28 (GPSD)
Но 20 и так умеет ппс (flag1 1) и экспериментально я остановился на нем. (https://www.eecis.udel.edu/~mills/ntp/html/refclock.html)
But 20 and so keeps managing PPP (flag1 1) and experimentally I alighted on it. (https://www.eecis.udel.edu/~mills/ntp/html/refclock.html)


Правим /etc/ntp.conf
Edit /etc/ntp.conf


server 127.127.20.0 mode 17 minpoll 4 maxpoll 4 iburst prefer
server 127.127.20.0 mode 17 minpoll 4 maxpoll 4 iburst prefer
Строка 35: Строка 35:
fudge 127.127.20.0 flag1 1 flag2 0 time2 1.0 refid GPSP
fudge 127.127.20.0 flag1 1 flag2 0 time2 1.0 refid GPSP


time2 1.0 - это смещение времени гпс от ппс тк гпс и ппс асинхронны и если нет смещения то нтп отбранкует драйвер 20 – подбирается экспериментально по методике ниже (но думаю что для всех виренбордов 5 будет 1.0 (для пи2 у меня получилось 0.7)) https://support.ntp.org/bin/view/Support/ConfiguringNMEARefclocks
time2 1.0 is a time offset from GPS TK GPS PPP and asynchronous PPP and if there is no offset of the NTP tranchet driver 20 – selected experimentally by the method below (but I think that all firebord 5 will be 1.0 (for PI2 I got 0.7)) https://support.ntp.org/bin/view/Support/ConfiguringNMEARefclocks


if you want a good estimation for fudge time2 (perhaps because PPS is not an option for you) you could use the following procedure:
if you want a good estimation for fudge time2 (perhaps because PPS is not an option for you) you could use the following procedure:
Строка 46: Строка 46:




Перезагружаемся и смотрим что есть наши алиасы
Reboot and see what our aliases are


root@wirenboard:~# ls /dev/gps*   
root@wirenboard:~# ls /dev/gps*   


/dev/gps0  /dev/gpspps0
/dev/gps0  /dev/gpspps0


Далее ждем минут 10 и ntpq -nc peer -c as -c rl
Next, wait for 10 minutes and ntpq -nc peer -c as -c rl
Буква о у 127.127.20.0 – значит что последняя синхронизации с ппс (http://citrin.ru/net:ntpq)
The letter o at 127.127.20.0 means that the last sync with PPP (http://citrin.ru/net:ntpq)


root@wirenboard:~#  ntpq -nc peer -c as -c rl
root@wirenboard:~#  ntpq -nc peer -c as -c rl
Строка 102: Строка 103:
clk_jitter=0.008, clk_wander=0.000
clk_jitter=0.008, clk_wander=0.000


Это чтобы посмотреть ошибки и что выдает гпс
This is to view mistakes and that gives GPS


root@wirenboard:~# ntpq -c clockvar
root@wirenboard:~# ntpq -c clockvar
Строка 117: Строка 118:
Дальше настраиваем нтп как нам надо – кому что можно откуда и так далее.
Then configure NTP as we need to and so on.
12 063

правки