gpsd-users
[Top][All Lists]
Advanced

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

Re: How to avoid 1Hz batching of 10Hz GPS fixes?


From: Chris Dew
Subject: Re: How to avoid 1Hz batching of 10Hz GPS fixes?
Date: Fri, 18 Oct 2024 11:48:31 +0100
User-agent: Mozilla Thunderbird

Hi Gary,

Thanks for your help.

But, before you do any of that, update to gpsd 3.25 or better yet git head.
Now using HEAD:

{"class":"VERSION","release":"3.25.1~dev","rev":"release-3.25-658-gd3a6e3924","proto_major":3,"proto_minor":15}

    serial or USB connection,  
serial
What speed?
9600

{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttymxc1","driver":"u-blox","activated":"2024-10-18T10:23:38.545Z","flags":1,"native":1,"bps":9600,"parity":"N","stop...

Send the output of "ubxtool -P CONFIG" and "ubxtool -P STATUS"
root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool -P CONFIG
usage: ubxtool [OPTIONS] [host[:port[:device]]]
ubxtool: error: argument -P/--protver: invalid float value: 'CONFIG'

root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool -P STATUS
usage: ubxtool [OPTIONS] [host[:port[:device]]]
ubxtool: error: argument -P/--protver: invalid float value: 'STATUS'


I know this isn't the output you were looking for, but nothing was obvious from --help:

root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool -V
ubxtool: Version 3.25.1~dev
root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool --help | grep -i CONFIG
                        Configure receiver speed to SETSPEED
root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool --help | grep -I STATUS
root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool --help | grep P
usage: ubxtool [OPTIONS] [host[:port[:device]]]
  -g ITEM,LAYER,POSITION, --getitem ITEM,LAYER,POSITION
                        Get ITEM from LAYER and POSITION. LAYER and POSITION
  -i PORTID, -portid PORTID
                        Specifies receiver PORTID (interface) for port-related
  --port PORT           The gpsd port to connect to. [Default 2947]
  -p PRESET, --preset PRESET
                        Poll the receiver for PRESET. May be used multiple
  -P PROTVER, --protver PROTVER
                        Protocol version for sending commands. [Default 10.0]
  -r, --readonly        Read only. Do not send anything to the GPS.
  -s SPEED, --inspeed SPEED
                        Set local serial port speed to SPEED bps.
  -S SPEED, --setspeed SPEED
                        Configure receiver speed to SETSPEED.
BSD terms apply: see the file COPYING in the distribution root for details.
Options can be placed in the UBXOPTS environment variable.
UBXOPTS is processed before the CLI options.


Or "ubxtool -t".  Try ubstool both with, and without gpsd running.
Using ubxtool -t when gpsd is running shows 8 and 9 batched UBX-NAV_PVT messages per second.

Notice that the (bold/underlined) arrival times are batched, but that the "nano" times are correctly 100ms apart.

root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool -t
1729247505.8588
UBX-NAV-PVT:
  iTOW 469910700 time 2024/10/18 10:31:32 valid x37
  tAcc 23 nano 699792212 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990801 lat 522227097 height 91896
  hMSL 43663 hAcc 1075 vAcc 1243
  velN 3 velE 18 velD -23 gSpeed 19 headMot 643516
  sAcc 130 headAcc 4493776 pDOP 199 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247505.8604
UBX-NAV-PVT:
  iTOW 469910800 time 2024/10/18 10:31:32 valid x37
  tAcc 23 nano 799792222 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990799 lat 522227099 height 91930
  hMSL 43698 hAcc 1075 vAcc 1244
  velN -36 velE 29 velD -31 gSpeed 46 headMot 643516
  sAcc 102 headAcc 4493878 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247505.8610
UBX-NAV-POSECEF:
  iTOW 469910800 ecefX 391257603 Y -15024309 Z 501809461 pAcc 164

1729247505.8620
UBX-NAV-PVT:
  iTOW 469910900 time 2024/10/18 10:31:32 valid x37
  tAcc 23 nano 899792231 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990797 lat 522227102 height 91984
  hMSL 43751 hAcc 1075 vAcc 1244
  velN 48 velE 37 velD -47 gSpeed 60 headMot 643516
  sAcc 161 headAcc 4494040 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247505.8633
UBX-NAV-PVT:
  iTOW 469911000 time 2024/10/18 10:31:33 valid x37
  tAcc 23 nano -207758 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990798 lat 522227103 height 91986
  hMSL 43754 hAcc 1076 vAcc 1245
  velN 37 velE -83 velD -29 gSpeed 91 headMot 643516
  sAcc 111 headAcc 4494151 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247505.8639
UBX-NAV-DOP:
  iTOW 469911100 gDOP 261 pDOP 221 tDOP 139 vDOP 184
  hDOP 123 nDOP 109 eDOP 58

1729247505.8642
UBX-NAV-TIMEGPS:
  iTOW 469911100 fTOW -207748 week 2336 leapS 18 valid x7 tAcc 3

1729247505.8652
UBX-NAV-PVT:
  iTOW 469911200 time 2024/10/18 10:31:33 valid x37
  tAcc 23 nano 199792261 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990794 lat 522227104 height 92038
  hMSL 43806 hAcc 1076 vAcc 1246
  velN -43 velE 0 velD -37 gSpeed 43 headMot 643516
  sAcc 95 headAcc 4494359 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247505.8657
UBX-NAV-EOE:
 iTOW 469911200

1729247505.8660
UBX-NAV-POSECEF:
  iTOW 469911300 ecefX 391257604 Y -15024305 Z 501809474 pAcc 165

1729247505.8671
UBX-NAV-PVT:
  iTOW 469911400 time 2024/10/18 10:31:33 valid x37
  tAcc 23 nano 399792280 fixType 3 flags x1 flags2 xea
  numSV 13 lon -21990792 lat 522227106 height 92058
  hMSL 43825 hAcc 1076 vAcc 1247
  velN 41 velE 37 velD -12 gSpeed 55 headMot 643516
  sAcc 136 headAcc 4494643 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247505.8678
UBX-NAV-POSECEF:
  iTOW 469911400 ecefX 391257604 Y -15024304 Z 501809476 pAcc 165

1729247505.8681
UBX-NAV-VELECEF:
  iTOW 469911400 ecef: VX -2 VY 4 VZ 3 vAcc:14

1729247505.8691
UBX-NAV-PVT:
  iTOW 469911500 time 2024/10/18 10:31:33 valid x37
  tAcc 23 nano 499792290 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990792 lat 522227105 height 92065
  hMSL 43832 hAcc 1077 vAcc 1248
  velN -43 velE -19 velD -17 gSpeed 47 headMot 643516
  sAcc 109 headAcc 4494752 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247505.8703
UBX-NAV-PVT:
  iTOW 469911700 time 2024/10/18 10:31:33 valid x37
  tAcc 23 nano 699792310 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990789 lat 522227109 height 92140
  hMSL 43908 hAcc 1077 vAcc 1249
  velN -43 velE -60 velD -24 gSpeed 74 headMot 643516
  sAcc 86 headAcc 4494951 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9207
UBX-NAV-PVT:
  iTOW 469911800 time 2024/10/18 10:31:33 valid x37
  tAcc 23 nano 799792319 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990787 lat 522227111 height 92146
  hMSL 43913 hAcc 1077 vAcc 1249
  velN 136 velE 86 velD -2 gSpeed 161 headMot 2099617
  sAcc 135 headAcc 3956064 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9222
UBX-NAV-PVT:
  iTOW 469911900 time 2024/10/18 10:31:33 valid x37
  tAcc 23 nano 899792329 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990787 lat 522227110 height 92151
  hMSL 43918 hAcc 1077 vAcc 1250
  velN -47 velE -35 velD 2 gSpeed 59 headMot 2099617
  sAcc 133 headAcc 3956215 pDOP 221 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9228
UBX-NAV-POSECEF:
  iTOW 469911900 ecefX 391257607 Y -15024300 Z 501809486 pAcc 165

1729247506.9239
UBX-NAV-PVT:
  iTOW 469912000 time 2024/10/18 10:31:34 valid x37
  tAcc 23 nano -207660 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990785 lat 522227114 height 92212
  hMSL 43979 hAcc 1077 vAcc 1250
  velN 59 velE -25 velD -26 gSpeed 65 headMot 2099617
  sAcc 168 headAcc 3956406 pDOP 199 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9245
UBX-NAV-POSECEF:
  iTOW 469912000 ecefX 391257607 Y -15024299 Z 501809493 pAcc 165

1729247506.9254
UBX-NAV-PVT:

  iTOW 469912100 time 2024/10/18 10:31:34 valid x37
  tAcc 23 nano 99792349 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990785 lat 522227112 height 92206
  hMSL 43973 hAcc 1077 vAcc 1250
  velN -65 velE -28 velD -2 gSpeed 70 headMot 2099617
  sAcc 141 headAcc 3956567 pDOP 204 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9267
UBX-NAV-PVT:
  iTOW 469912200 time 2024/10/18 10:31:34 valid x37
  tAcc 23 nano 199792359 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990783 lat 522227114 height 92225
  hMSL 43993 hAcc 1078 vAcc 1251
  velN 29 velE 49 velD 8 gSpeed 57 headMot 2099617
  sAcc 93 headAcc 3956672 pDOP 204 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9279
UBX-NAV-PVT:
  iTOW 469912300 time 2024/10/18 10:31:34 valid x37
  tAcc 23 nano 299792368 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990782 lat 522227119 height 92302
  hMSL 44070 hAcc 1078 vAcc 1251
  velN 54 velE -41 velD -19 gSpeed 67 headMot 2099617
  sAcc 148 headAcc 3956841 pDOP 204 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9291
UBX-NAV-PVT:
  iTOW 469912400 time 2024/10/18 10:31:34 valid x37
  tAcc 23 nano 399792378 fixType 3 flags x1 flags2 xea
  numSV 14 lon -21990782 lat 522227116 height 92281
  hMSL 44048 hAcc 1078 vAcc 1251
  velN -75 velE -26 velD 16 gSpeed 80 headMot 2099617
  sAcc 161 headAcc 3957024 pDOP 204 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9304
UBX-NAV-PVT:
  iTOW 469912500 time 2024/10/18 10:31:34 valid x37
  tAcc 23 nano 499792388 fixType 3 flags x1 flags2 xea
  numSV 13 lon -21990779 lat 522227122 height 92364
  hMSL 44131 hAcc 1078 vAcc 1251
  velN 81 velE 13 velD -25 gSpeed 82 headMot 2099617
  sAcc 174 headAcc 3957222 pDOP 204 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

1729247506.9316
UBX-NAV-PVT:
  iTOW 469912600 time 2024/10/18 10:31:34 valid x37
  tAcc 23 nano 599792398 fixType 3 flags x1 flags2 xea
  numSV 13 lon -21990779 lat 522227121 height 92364
  hMSL 44132 hAcc 1078 vAcc 1252
  velN -26 velE -19 velD -7 gSpeed 32 headMot 2099617
  sAcc 111 headAcc 3957349 pDOP 204 reserved1 0 16476 12118
  headVeh 3102272 magDec 0 magAcc 0

without gpsd running.
Using ubxtool -t when gpsd is stopped:

root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool -t
ubxtool: failed to connect to gpsd [Errno 111] Connection refused


Can I make ubxtool connect directly to /dev/ttymxc1, without gpsd?  I tried:

root@999AAAAA:~/gpsd# ./gpsd-3.25.1~dev/clients/ubxtool --device=/dev/ttymxc1
ubxtool: failed to connect to gpsd [Errno 111] Connection refused



All the best, Chris.



On 16/10/2024 21:08, Gary E. Miller wrote:
Yo Chris!

On Wed, 16 Oct 2024 10:46:11 +0100
Chris Dew <chris.dew@thorcom.co.uk> wrote:

    what version gpsd,  
root@C934E761:~# gpsd --version
gpsd: *3.22* (revision 3.22)
That is almost 4 year old.  A lot of fix and improvements since then

    gpsd binary from where,  
root@C934E761:~# dpkg --list | grep gpsd | head -1
ii  gpsd 3.22-4+devuan2                     arm64        Global 
Positioning System - daemon
You need to file a bug with them.  Shame on them for shipping old stuff.

    what hardware are you running on  
iMX8M
That is a family name, not a model number.  What model number?
Quad core?  A a lot of unused CPU?

    what command line to start gpsd,  
root@C934E761:~# ps -ef | grep gpsd | head -1
gpsd      3332     1  0 08:10 ?        00:00:07 /usr/sbin/gpsd -n -P 
/run/gpsd.pid */dev/ttymxc1
Should be fine, what is that asterisk doing there?

    serial or USB connection,  
serial
What speed?

    how are you measuring "arrival"  
By eyeball.  Do you know of a time-stamping gpsd client?
Many good ways.  "gpspipe -w -t", or send the gpsd log to a timestamping
syslog.  Or "ubxtool -t".  Try ubstool both with, and without gpsd running.

Or, run gpsd under strace.

Could you suggest a way that I could see whether the traffic from 
/dev/ttymxc1 into gpsd is also batched?  This might be a ublox issue, 
rather than gpsd.
Send the output of "ubxtool -P CONFIG" and "ubxtool -P STATUS"

But, before you do any of that, update to gpsd 3.25 or better yet git head.

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

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


--

Chris Dew / Senior Developer
Email: chris.dew@thorcom.co.uk

Thorcom Systems Limited
Office: +44 (0)1905 756 700
Unit 4, 96B Blackpole Trading Estate West, Worcester, WR3 8TJ, England, UK
Registered in England & Wales 02704696 / VAT Number GB487925681

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed.
Any views or opinions expressed are solely those of the author and do not necessarily represent those of Thorcom Systems Limited.
If you are not the intended recipient of this email, you must take any action based upon its contents or disclose it to any third-party.
Please contact the sender if you believe you have received this email in error.


reply via email to

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