gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] UBX-TIM-TP on F9T?


From: Anders Wallin
Subject: Re: [gpsd-users] UBX-TIM-TP on F9T?
Date: Sun, 6 Oct 2019 21:04:14 +0300

I might be slowly making progress..
the scons options are now: https://pastebin.com/CgC76V29

I've now connected two serial-ports, one for the serial data stream from the F9T (as previously), and a new one with the electrical 1PPS connected to DCD.
Then through much googling I found how to create a pps-device with "ldattach PPS /dev/ttyUSB1"
Now ppstest and ppswatch work:
$ sudo ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1570384096.000150158, sequence: 4853 - clear  1570384095.100165092, sequence: 4853
source 0 - assert 1570384096.000150158, sequence: 4853 - clear  1570384096.100178407, sequence: 4854
$ sudo ppswatch /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
timestamp: 1570384123, sequence: 4881, offset:  99547497
timestamp: 1570384124, sequence: 4882, offset:  99560566

I have tried to make it use the 'assert' edge instead of the 'clear' edge, but this doesn't seem to do anything:
$ sudo ppsctl -fa /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
(ppswatch and ppstest still give similar results as above, where offset corresponds to the 100ms long pps-pulse, since it seems to trigger on clear)

Now, starting gpsd with
$ sudo gpsd -D 5 -N -n /dev/pps0 /dev/ttyUSB0
I get output like so:
gpsd:INFO: PPS:/dev/pps0 Assert hooks called clock:  1570384257.000356140 real:  1570384257.000000000: accepted
gpsd:PROG: PPS:/dev/pps0 Assert accepted @  1570384257.000356140 offset -0.000356140
gpsd:PROG: KPPS:/dev/pps0 assert  1570384257.000356140, sequence: 5014, clear   1570384257.100358775, sequence: 5015 - using: clear
gpsd:PROG: KPPS:/dev/pps0 Clear cycle: 1000012, duration:  100002 @  1570384257.100358775
gpsd:PROG: PPS:/dev/pps0 Clear cycle: 1000012, duration:  100002 @  1570384257.100358775
gpsd:PROG: PPS:/dev/pps0 Clear ignored 1Hz trailing edge
(maybe that is all OK?)

modifying /etc/ntp.conf to used shared memory drivers also seems to work: (I have used fudge, to correct for the 100ms long pps-pulse)
$ ntpq -np
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 127.127.28.0    .GPS.            0 l    -    8  377    0.000    0.188   0.408
 127.127.28.1    .PPS.            0 l    7    8  377    0.000    3.361   0.242

However I still don't get a PPS JSON message, connecting with e.g. cgps, or a simple python script (below).
the JSON classes I see are: RAW, TOFF, TPV
(SKY has disappeared, for some reason..)
I don't understand how the WATCH-bitmask works, since I'm trying to enable WATCH_TIMING, but the JSON WATCH message shows false.

thanks,
Anders

--python test client--------------------------
session = gps.gps()

session.stream(gps.WATCH_ENABLE | gps.WATCH_TIMING | gps.WATCH_PPS)

try:
    for report in session:
        print(report['class'])
        if report['class']=="WATCH" or report['class']=="VERSION" or report['class']=="TOFF" or report['class']=="D
EVICES":
            print report
------------------output------------------
$ python test_gps.py
VERSION
<dictwrapper: {u'release': u'3.19.1~dev', u'proto_major': 3, u'rev': u'release-3.19-661-g66c711e09', u'class': u'VERSION', u'proto_minor': 14}>
DEVICES
<dictwrapper: {u'class': u'DEVICES', u'devices': [{u'path': u'/dev/pps0', u'driver': u'PPS', u'class': u'DEVICE', u'activated': u'2019-10-06T17:52:52.000Z'}, {u'parity': u'N', u'activated': u'2019-10-06T17:56:34.104Z', u'driver': u'u-blox', u'subtype': u'SW EXT CORE 1.00 (264600),HW 00190000,ROM BASE 0x118B2060,FWVER=TIM 2.00,PROTVER=29.00,MOD=ZED-F9T,GPS;GLO;GAL;BDS,SBAS;QZSS', u'bps': 115200, u'flags': 1, u'stopbits': 1, u'path': u'/dev/ttyUSB0', u'cycle': 1.0, u'class': u'DEVICE', u'native': 1}]}>
WATCH
<dictwrapper: {u'pps': True, u'enable': True, u'scaled': False, u'raw': 0, u'json': True, u'nmea': False, u'timing': False, u'class': u'WATCH', u'split24': False}>
RAW
TOFF
<dictwrapper: {u'clock_sec': 1570384595, u'class': u'TOFF', u'device': u'/dev/ttyUSB0', u'real_sec': 1570384595, u'clock_nsec': 109164451, u'real_nsec': 249441}>
TPV
--------------------------



On Sat, Oct 5, 2019 at 8:53 PM Gary E. Miller <address@hidden> wrote:
Yo Anders!

On Sat, 5 Oct 2019 14:35:40 +0300
Anders Wallin <address@hidden> wrote:

> > the latest from gitlab (3.19-661) does build OK for me.
> > I will try to look for the PPS message with an F9T later today and
> > report what I find..
> > 
>
> I tried, but could not get a PPS-message from gpsd.

What did you try?

> Using u-center (which runs on wine) I do see the qErr value, and
> u-center can plot a graph of it over time which shows a saw-tooth
> from -4ns to +4ns, as expected.

You can't run u-center while gpsd is running, and gpsd reprograms
the receiver, so that is not a good test.

> ubxtool does show the UBX-TIM-TP message OK.

ubxtool standalone, or while gpsd is running?  gpsd reprogramms the
receiver so the only good test is when gpsd is running.

> the output from my python client is below.

Not helpful with no code.

What I asked for is the config.log and the output when you built
gpsd.  Many config options to get wrong.

> This might be tied to having a separate pps-device (?), but I don't
> have (or need) a separate /dev/pps0 device, I would just want to log
> the qErr value.

What model receiver?  How is it connected?  Full serial port (RS-232),
partial serial port (Raspberry Pi), I2C, USB?  They all connect PPS is
different ways.

> In time-transfer, the electrical PPS output from the receiver is used
> for other things.

But how does it get to gpsd?  No PPS signal into gpsd, then no PPS JSON
out.

> -------python client output----------
[...]
>  u'/dev/ttyUSB0',

Uh, oh.  Is your PPS really on USB?  Not good.  Are you 100% sure the
PPS signal is being carried on the USB?  If so, how do you know?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]