Wiren Board 6: WBE2R-R-GPS GPS/GLONASS Extension Module:NTPD PPS Setup/en: различия между версиями

Материал из Wiren Board
(Новая страница: «The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file <code>/sys/class/pps/pps2/assert</code>).»)
(Новая страница: «=== Check for data in NMEA format === To verify that the system can receive data from the GPS module in NMEA format, run the following command <pre>cat /dev/tty…»)
Строка 26: Строка 26:
The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file <code>/sys/class/pps/pps2/assert</code>).
The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file <code>/sys/class/pps/pps2/assert</code>).


=== Проверяем наличие данных в формате NMEA ===
=== Check for data in NMEA format ===
Чтобы убедиться в том, что система может получать данные от GPS-модуля в формате NMEA, выполните команду  
To verify that the system can receive data from the GPS module in NMEA format, run the following command  
<pre>cat /dev/ttyMOD3</pre>
<pre>cat /dev/ttyMOD3</pre>



Версия 18:11, 19 июля 2019

Другие языки:


THE ARTICLE IS IN PROGRESS!


The WBE2R-R-GPS module allows you to autonomously synchronize the exact time of the controller by GLONASS/GPS signals and use the controller as a source of accurate NTP time on the network. The module supports PPS signal output to the controller's GPIO processor. Kernel modules are supported by module pps_gpio.


It is further assumed that the module is installed into the controller that is configured and functioning correctly checked (see section Wiren_Board 6:_WBE2R-R-GPS_GPS/GLONASS_Extension_Module/en

NMEA and PPS

The controller module is represented by two devices - serial port /dev/ttyMOD3 and signal transmission device pps /dev/pps2 Port /dev/ttyMOD3 transmits data from the module via standard Protocol NMEA, including position, receiver speed, and time and date messages. Usually the information is updated once per second. The module is made on the chip SIM68, debugging UART-port is not available in the current hardware modification.

The pps pulse is precisely synchronized with the beginning of each second, which makes it possible to increase the accuracy of the time determination on the controller with microsecond accuracy.

Check for pps signal

At the command prompt, run ppstest /dev/pps2.

Check for a pps signal

The command will sequentially display the UNIX-time timestamps with a decimal part (the timestamps can be read in the file /sys/class/pps/pps2/assert).

Check for data in NMEA format

To verify that the system can receive data from the GPS module in NMEA format, run the following command

cat /dev/ttyMOD3
Проверка поступления NMEA-данных

На рисунке красным выделены фрагменты NMEA-сообщений, показывающие, что GPS-модуль достоверно зафиксировал свою позицию и получает верные данные. Подробно смотрите описание NMEA-сообщений.

NTPD

В качестве прикладного ПО используется служба ntpd. По умолчанию сервер ntpd настроен на получение времени от других серверов в интернете по протоколу ntp. Для использования сигналов времени от GPS/GLONASS-модуля необходимо выполнить ряд шагов по настройке (см. далее).

Текущие источники точного времени для NPTD

Ntpqp inint.png

Источники точного времени помечены специальными символами:

Символ Значение
* используемый в настоящее время источник
# источник выбран, но слишком удален
o источник выбран, используется сигнал PPS
+ источник выбран, готов к использованию
x источник забракован
. источник выбран последним из списка кандидатов
- источник забракован алгоритмом выбора
пробел источник забракован


Обратите внимание на то, что драйвер ntpd 28 (shared memory driver), смотрите далее, который позволяет использовать функции gpsd, не отмечается символом 'o', даже если используется PPS. При правильной работе он будет отмечен символом '*'.

GPSD

Демон gpsd представляет собой унифицированный протокол взаимодействия с приемниками спутниковых сигналов GPS/GLONASS. В нашем случае мы будем использовать его как промежуточный слой между модулем и сервером ntpd (драйвер с кодом 28). Демон устанавливается командой

apt-get install gpsd

Настройка

Настройка gpsd

Настройка ntpd

В настройках сервера ntpd нам необходимо указать два новых источника точного времени: NMEА и PPS.