[Top][All Lists]

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

Re: So I took a look at the gps_read section of Dire Wolf

From: Gary E. Miller
Subject: Re: So I took a look at the gps_read section of Dire Wolf
Date: Wed, 5 Jan 2022 14:09:32 -0800

Yo Don!

On Wed, 5 Jan 2022 16:52:33 -0500
Don Rolph <> wrote:

> If one looks at the dire3.log file one sees that the first TPV message
> after a 3D fix has been received by the rest of the code well over 100
> times.  The messages are all identical.  They do not show up in the
> log data from gpsd received by gpspipe -W.

Asked and answered.  The Dire worlf code is bad, from a bad
stackexchange example.  loop++.

> I did a quick scan of the code, and the following seems salient.  The
> reading of the gpsd data all occurs in the routine read_gpsd_thread

Yes, since there are very few lines of gpsd code in Dire Wolf, it is
probably in there, somewhere.

> A highly edited version of the source is below:

Please don't do that.  The problem is where you refuse to look.

> So it appears that the process reads a record and then prints a
> record.  To print a new it first has to read a new record.

I suggestt you re-read the gps_read() man page.

> And we are receiving over 100 identical records which are not in the
> gpsd message debug log.

And yet you complain about a bug in gpsd...

> This would seem to indicate that gps_read is generating the spurious
> messages since between the gps_read and the print there is no code to
> cause a loop or generate a record.

I suggestt you re-read the gps_read() man page.

> Now I am not a c specialist, so I may have made an error here. But if
> so, the nature of the error should be able to be identified by others.

Yup.  And if you had not over simplified the loop, you might see it

> So do we know for sure that there is not a potential edge condition
> which can cause gps_read to generate multiple spurious identical
> spurious records?

Yup, we know it, documented in fact.  How about you do some RTFM with
the examples in "man libgps".  Compare that known good code, with the
ode you helpfully removed and ignored.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

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

Attachment: pgp65tsr2hth4.pgp
Description: OpenPGP digital signature

reply via email to

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