[ntp:questions] Motorola Oncore Surveyed Position

Thomas Laus lausts at acm.org
Tue Sep 6 14:31:01 UTC 2011


On 2011-09-06, Miguel Gon?alves <mail at miguelgoncalves.com> wrote:
> I switched again to mode 4 and started again to see if I missed something. I
> believe I'll only have to wait 10000 seconds = 2 hours and 46 minutes... not
> much. :-)
>
> Unfortunatelly clockstats doesn't show position, only time. I believe this
> is because it's in position lock (0D?) mode. Here's a sample:
>
> By the way... I was looking at the clockstats file and noticed that when I
> switched to mode 4 as I said earlier I got this
>
> 55810 40560.366 127.127.30.0 ONCORE[0]: Loading Posn from SHMEM
> 55810 40560.367 127.127.30.0 ONCORE[0]: Setting Posn and Time after Loading
> Almanac
> 55810 40562.091 127.127.30.0 ONCORE[0]: Posn:
> 55810 40562.091 127.127.30.0 ONCORE[0]: Lat = N  41.1745319deg,    Long =
> W   8.6560764deg,    Alt = 146.72m (481.36ft) GPS
> 55810 40562.091 127.127.30.0 ONCORE[0]: Lat = N  41deg 10.4719m,   Long =
> W   8deg 39.36458m,  Alt =  146.72m ( 481.36ft) GPS
> 55810 40562.091 127.127.30.0 ONCORE[0]: Lat = N  41deg 10m 28.32s, Long =
> W   8deg 39m 21.88s, Alt =  146.72m ( 481.36ft) GPS
> 55810 40564.365 127.127.30.0 ONCORE[0]: Waiting for Almanac
> 55810 40567.365 127.127.30.0 ONCORE[0]: Have now loaded an ALMANAC
> 55810 40567.365 127.127.30.0 ONCORE[0]: state = ONCORE_RUN
>
> It seems this is my location... :-) Now you know where I live! :-)
>
> So the position is stored in the shared memory and when I reset the unit
> (mode 4) it uses the position stored in there.
>
> Anyone help care to comment this?
>
This is from the refclock_oncore.c file.

/*
 * If we don't find any then we don't have the cable delay or PPS
 * offset and we choose MODE (4) below.
 *
 * Five Choices for MODE
 *    (0) ONCORE is preinitialized, don't do anything to change it.
 *        nb, DON'T set 0D mode, DON'T set Delay, position...
 *    (1) NO RESET, Read Position, delays from data file, lock it in,
 *        go to 0D mode.
 *    (2) NO RESET, Read Delays from data file, do SITE SURVEY to get
 *        position, lock this in, go to 0D mode.
 *    (3) HARD RESET, Read Position, delays from data file, lock it
 *        in, go to 0D mode.
 *    (4) HARD RESET, Read Delays from data file, do SITE SURVEY to
 *        get position, lock this in, go to 0D mode.
 *     NB. If a POSITION is specified in the config file with
 *     mode=(2,4) [SITE SURVEY] then this position is set as the INITIAL position of the
 *     ONCORE.  This can reduce the time to first fix.
 *
 -------------------------------------------------------------------------------
 * Note that an Oncore UT without a battery backup retains NO
 information if it is power cycled, with a Battery Backup it remembers the almanac,
 etc. For an Oncore VP, there is an eeprom that will contain this data,
 along with the option of Battery Backup.

 * So a UT without Battery Backup is equivalent to doing a HARD RESET
 on each power cycle, since there is nowhere to store the data.
 If we open one or the other of the files, we read it looking for
 MODE, LAT, LON, (HT, HTGPS, HTMSL), DELAY, OFFSET, ASSERT, CLEAR,
 HARDPPS, STATUS, POSN3D, POSN2D, CHAN, TRAIM then initialize using
 method MODE.  For Mode = (1,3) all of (LAT, LON, HT) must be present
 or mode reverts to (2,4).
*/
Your ntp.oncore.0 file will need to list your location:

This is from my file

HARDPPS
PPS_CAPTUREASSERT
MODE 1
LON -84.2017844758
LAT 40.7762210511
HT 223.445
DELAY 92.1 ns

This skips the receiver reset and loads my coordinates.  Once the
receiver has a valid almanac, it will serve time.  I am also using
FreeBSD, but don't use SHMEM.  You should be able to just link your
serial port to the correct device using devfs.conf

oncore.pps.0 ->cuau0
oncore.serial.0 ->cuau0

Tom

-- 
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF




More information about the questions mailing list