[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get raw data from gpsd?
From: |
Gary E. Miller |
Subject: |
Re: How to get raw data from gpsd? |
Date: |
Mon, 22 Apr 2024 11:45:38 -0700 |
Yo 张延涛!
On Mon, 22 Apr 2024 20:04:12 +0800
张延涛 <zh6tao@gmail.com> wrote:
> I just submitted a PR
> <https://gitlab.com/gpsd/gpsd/-/merge_requests/405> regarding how to
> filter binary data sent by ALLYSTAR. When using the ALLYSTAR chip,
> filtering out binary data first can alleviate the parsing pressure on
> gpsd (perhaps filtering out known garbage data first can reduce time
> complexity), thus addressing the issue of missing bytes in raw data.
That's not gonna work. Comments in the MR.
> Additionally, I have a small question to consult about. Why do I get
> so many 0 values printed within one second when using
> `while(1){gps_read();}` to obtain satellites_visible?
Because not all messages you read contain satellite data. And the sample
that uo sent previsouly had no datellite data at all. This is a common
mistake, have you read the gpsd client examples?
https://gpsd.io/gpsd-client-example-code.html
> Moreover, the
> value of satellites_visible dynamically increases within one second.
Yes. Of course. The ALLYSTAR chips talks to gpsd over a serial link, one
satellite at a time, and gpsd has to accumualte that data.
> My understanding is that this dynamic increase process is gpsd
> collecting statistical data.
Uh, no.
> Could we design the `gps_read()`
> interface to only report statistical results without reporting the
> statistical process?
It is the job of you client to take what it needs and ignore the reset from
the JSON feed.
Before we go further:
I have asked many times: what version gpsd are you using?
For me to see what you see, I need a good sample of the raw data you see.
YOur last serial capture was corrupted.
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
pgpX5HDY_vVT6.pgp
Description: OpenPGP digital signature