[Top][All Lists]

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

Re: Duplicate or near-duplicate messages on u-blox M8

From: Luke Hutchison
Subject: Re: Duplicate or near-duplicate messages on u-blox M8
Date: Wed, 26 Feb 2020 17:45:37 -0700

On Wed, Feb 26, 2020 at 4:30 PM Gary E. Miller <address@hidden> wrote:
That is info on the board, we need the GPS model.  You can find it
this way with gpsd running:
       ubxtool -p MON-VER

Here you go.. warnings and all :-) 

$ ubxtool -p MON-VER
ubxtool: poll MON-VER
 Poll request

/usr/bin/ubxtool:6715: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead
  start = time.clock()
/usr/bin/ubxtool:6716: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead
  while read_opts['input_wait'] > (time.clock() - start):
 swVersion EXT CORE 3.01 (107900)
 hwVersion 00080000
 extension ROM BASE 3.01 (107888)
 extension FWVER=SPG 3.01
 extension PROTVER=18.00
 extension MOD=NEO-M8N-0
 extension FIS=0xEF4015 (100111)
 extension GPS;GLO;GAL;BDS
 extension SBAS;IMES;QZSS

Yup.  Such are the problems with NMEA.  That is why u-blox binary
mode is preferred.

Sure, but surely cgps could simply not generate location updates with SKY messages?

Either way, the GPS should always be in binary mode as far as I am aware, if that is gpsd's default.

However, I just tried running `gpspipe -R -n 100 > /tmp/raw2.log` again, and this time the log is in NMEA mode. See attachment. I didn't even touch the receiver, other than maybe unplugging it and plugging it back in. So gpsd is not even reliably selecting binary mode for some reason. Restarting the gpsd daemon and unplugging / replugging the GPS receiver switched it back to binary mode.

> The slight drift in location during these
> non-location updates is probably due to Kalman filtering or something.

Nope.  gpsd does no filtering.

Then why would a SKY message, which contains no location information, generate a location update that was not the same as, but a tiny bit offset from, the previous location? Here's a plot of lat/long over time for a few seconds of GPS data. Note the near-double-ups (or triple-ups). (This is a plot of the lat/long/altitude table I sent in my previous message):


This combination of responses was a little bewildering:

> > Which might be the bug fixed in 3.19.  Is the delta equal to your
> > geoid separation?

I'll ask again for you geoid separation.
 > I don't know how to check delta or geoid separation, please advise.

It would be in the raw.log I asked for.
This shows us what is in your raw.log:
    ubxtool -f raw.log -v 2

As I said I didn't know what geoid separation was or how to find it. I did send the log as requested. You even opened the log attachment and found the geoid separation :-D

> I'm using 3.19 (specifically Fedora's binary gpsd-3.19-2.fc31.x86_64
> package).

3.20 is the latest release.  No idea here how Fedora may have miunged it.

gpsd 3.20 was released on 2020-01-01. Fedora 31 was released on 2019-10-29. Fedora usually only updates package versions between releases if they need to address critical bugfixes. Hopefully Fedora will update to the latest gpsd for the Fedora 32 release, due 2020-04-21.

How are you starting pgsd?  With systemd?  Or?  Are you using the "-n"
option.  These affect gpsd operation.

With systemd:

$ cat /usr/lib/systemd/system/gpsd.service
Description=GPS (Global Positioning System) Daemon
# Needed with chrony SOCK refclock

ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $OPTIONS $DEVICES


/etc/default/gpsd does not exist. /etc/sysconfig/gpsd is:

# Options for gpsd, including serial devices
# Set to 'true' to add USB devices automatically via udev

> I am using only defaults.

Are you sure?  Did you reset the device?  Many receivers get changed
from the defaults before shipping.

In that case no, I'm not sure the settings are default. I am using the device as shipped, except that I updated the firmware using the u-blox tool to the latest (3.01) release. But you also now have the output of `ubxtool -f raw.log -v 2`, so you should be able to see what the settings are -- right?
That looks very different than you sent last time.  You previously
sent NMEA as the output of your receiver, and you just sent u-blox
binary.  NMEA != binary.  So either you did not collect what you
thought you collected, or you changed something.

As I mentioned, last time I just used gpscat to capture the log, because that's what your FAQ suggested doing:

5. Capture a log that triggers the problem

If we can reproduce your gpsd problem, we can usually fix it very rapidly. If we can't reproduce it, you might get lucky or you might not — and we try hard, but all too often the result is 'not'.

Therefore the most important step you can take is to capture a log of some receiver output that reproduces the bug; gpscat will help you.

 In my previous message I followed the request from your previous message, and instead used `gpspipe -R -n 100 > raw.log`. Hence the difference. You need to update that part of the FAQ too.

This is why we need to know how you collect data that you send here.

Of course, I am trying to follow your instructions closely, but they were different from what I sent initially because I followed the FAQ closely the first time around, before posting to this mailing list. Please be patient as I catch up, I'm totally new to the GPS device and protocol world.
Notice "height" (height above the ellipsoid) is 1344.541 meters,
and hMSL (height Mean Sea Level) is 1363.357 meters.  So your
geoid separation (height - hMSL) is -18.816.

OK, thanks for explaining. I just tested this:

height = 1332.800
hMSL = 1351.616
geoid separation = -18.816 (same exact value as before for the same location, despite a drift in altitude measurement)

Now the altitude is stable between messages, but the epv, epx, epy values are oscillating. Here is the output of `gpspipe -w` for two seconds:


Notice that the message order for a single update is SKY -> TPV -> GST -> TPV. The two TPV messages differ from each other in ep* values, e.g. epv keeps switching back and forth between 28.060 and 9.600. Previously I assume the two TPV messages also differed in altitude, since xgps showed the altitude oscillating between the two at the same time as these error messages were also fluctuating. I don't know why altitude is consistent now.

> gps_umd is a gpsd client that converts gpsd updates into ROS NavSatFix
> messages:

Dunno what that means...

ROS is the Robot OS, it's a pub-sub message bus for robotics components to talk to each other. GPS is widely used in the ROS world, and unfortunately the gps_umd driver is the standard way to talk to a GPS device.

Looking at the code here:

They do not really support gpsd 3.19.

The code is junk, for sure. Do you have any specific issues you can point out, and/or pointers to a good (simple) gpsd client that could be studied to produce a better ROS gpsd client?

I say "simple" because all most ROS users care about is lat, long, altitude, and possibly covariance measures for each axis, and they just want everything to work out of the box.

Since you are not really using NMEA, the you are off in the wilderness.
You are using u-blox binary which has not GSV or GLL.

Well I'm not so sure anymore, after gpsd (or the u-blox device) randomly switched into NMEA mode from binary, as described earlier.


Attachment: raw2.log
Description: Text Data

reply via email to

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