Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


versalogic_vl-mpeu-g2_ntp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
versalogic_vl-mpeu-g2_ntp [2014/06/21 18:49] – [PC Engines APU / Versalogic - NTP server] adminversalogic_vl-mpeu-g2_ntp [2015/01/24 17:40] – [Leap second file] admin
Line 136: Line 136:
  
   * Install lftp. <code>apt-get install lftp</code>   * Install lftp. <code>apt-get install lftp</code>
-  * Create leap second download script **/usr/local/bin/get_leap.sh** <code>#!/bin/bash +  * Create leap second download script [[get_leap_script|/usr/local/bin/get_leap.sh]]
- +
-# This script will download the latest leap second file, +
-# update the NTP configuration and restart ntpd. +
- +
-# Leap second file location +
-#leapremote="ftp://time.nist.gov/pub/" +
-leapremote="ftp://tycho.usno.navy.mil/pub/ntp/" +
- +
-# Local file name +
-leaplocaldir="/var/lib/ntp/" +
-leaplocalfile="$leaplocaldir/leap-seconds" +
- +
-# Get latest leap second file +
-/usr/bin/lftp -e 'set net:timeout 10 ; cls -1 --sort=date | head -1 > /tmp/leap ; exit' $leapremote +
-if [ $? -ne 0 ]; then +
-  echo "FTP problem, exiting." +
-  exit 1 +
-fi +
- +
-if [ -f "$leaplocaldir$(cat /tmp/leap)" ]; then +
-  echo "File $leaplocaldir$(cat /tmp/leap) already exists. Not downloading." +
-else +
-  cd "$leaplocaldir" +
-  /usr/bin/lftp -e "set net:timeout 10 ; get $(cat /tmp/leap) ; exit" $leapremote +
-  ln -sfn "$leaplocaldir$(cat /tmp/leap)" "$leaplocalfile" +
-  service ntp restart +
-fi</code> +
-  * Change executable mode <code>chmod +x /usr/local/bin/get_leap.sh</code> +
-  * Download new file weekly. Create **/etc/cron.weekly/leapsecond** <code>#!/bin/bash +
- +
-/usr/local/bin/get_leap.sh</code>+
   * Change executable mode <code>chmod +x /etc/cron.weekly/leapsecond</code>   * Change executable mode <code>chmod +x /etc/cron.weekly/leapsecond</code>
 ====Configure, firmware update ublox NEO-7 module==== ====Configure, firmware update ublox NEO-7 module====
Line 194: Line 163:
 ===Recommended settings for timing applications=== ===Recommended settings for timing applications===
   * SBAS -> Subsystem: Disabled.   * SBAS -> Subsystem: Disabled.
-  * (not supported on u-blox 7) TMODE2 -> Survey-in. If the position is known, the receiver can provide an accurate time solution by tracking only one satellite. For an unknown position, the receiver needs a minimum of four satellites to calculate a position fix and to solve for a timing solution. This is known as survey-in and can be chosen using the UBX-CFG-TMODE2 message. It is recommended to use survey-in only for non-moving platform applications. For optimal performance a known fixed position of the antenna should be used.+  * (not supported by u-blox 7) TMODE2 -> Survey-in. If the position is known, the receiver can provide an accurate time solution by tracking only one satellite. For an unknown position, the receiver needs a minimum of four satellites to calculate a position fix and to solve for a timing solution. This is known as survey-in and can be chosen using the UBX-CFG-TMODE2 message. It is recommended to use survey-in only for non-moving platform applications. For optimal performance a known fixed position of the antenna should be used.
   * NAV5 -> Dynamic Model: Stationary   * NAV5 -> Dynamic Model: Stationary
   * NAV5 -> Min SV Elevation: 10   * NAV5 -> Min SV Elevation: 10
   * Save config, restart receiver. Receiver -> Action -> Cold start   * Save config, restart receiver. Receiver -> Action -> Cold start
versalogic_vl-mpeu-g2_ntp.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1