簡體   English   中英

Gpsd錯誤的時間

[英]Gpsd Wrong Timing

大家好!

我有這個問題:

我正在使用我工作的公司的舊GPS-Sirf / NMEA模塊通過GPSD為ntp服務(目前在我的筆記本電腦上)。

讓我們忘了Ntpd ..一旦啟動gpsd,盡管gpsmon中的日期和時間是正確的, 但是如果我運行ntpshmmon ,則在標記為“真實”的列中我的時間是負數(約- 69年,以秒為單位),假定是我的SHM的時鍾信息(而de列“ Clock”實際上是接收到的信息)

如果更換模塊並使用U-blox,一切正常,SHM時鍾恢復為+46年。 有沒有辦法通過NTP管理GPS信息交換? 還是要在不知道確切的GPS模塊是什么的情況下配置GPS?

抱歉,如果我的問題是某種童話般的...我希望有人也遇到了同樣的問題,並且可以發現線索...

謝謝! :)

FL

第一條規則是: 不要驚慌

嘗試在您的/etc/ntp.conf插入tinker panic 0

ntpd的反應取決於系統時鍾和參考時間之間的差異。

對於一個很小的偏移量,ntpd將照常調整本地時鍾。 對於較小和較大的偏移量,ntpd會暫時拒絕參考時間。 在后一種情況下,操作系統的時鍾將繼續執行最后的更正,而新的參考時間將被拒絕。 一段時間后,較小的偏移量(顯着小於一秒鍾)將被擺轉(緩慢調整),而較大的偏移量將使時鍾步進(重新設置)。 巨大的偏移量將被拒絕,並且ntpd會終止自身,以為一定發生了非常奇怪的事情。 引文

將panic設置為零可以使ntpd避免出現大偏移量引起的奇怪想法。

我們使用一個看起來像

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

tinker panic 0

# Specify one or more NTP servers.
server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 time1 0.420 refid GPS
server 127.127.28.1 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.1 refid GPS1

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org

# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM