[Top][All Lists]

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

Re: [gpsd-users] Shared memory 'flags' set?

From: Michael Lum
Subject: Re: [gpsd-users] Shared memory 'flags' set?
Date: Tue, 12 Jun 2018 16:41:59 -0700

Hi Gary,

the problem is related to the delay in gps_waiting(). 

My original code used 500,000 as the delay (for the socket interface) and
that worked fine.

My change to use "shared memory" did not work as I expected.

I tried test_gpsmm and it worked.

The delay in test_gpsmm was 5,000,000, I've changed to that and I can see the 

Note:  the shared memory interface section of the Client HOWTO says 
gps_waiting() is not available for the interface.

I'm not sure how I can reliably determine that lat/long are valid.

I can look at the TIME data to know it (TIME) has been updated but does that
mean the lat/long are "fresh"?

Thank you

FYI, in case you are interested:

Note2:  when I tried to build with ONLY the shared memory export (no socket or 
D-bus) there were warnings during the

gcc -o libgps_core.o -c -pthread -Wextra -Wall -Wno-uninitialized 
-Wno-missing-field-initializers -Wcast-align -Wmissing-declarations 
-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -O2 
-pthread -DHAVE_SYS_TIMEPPS_H=1 libgps_core.c
libgps_core.c:121:0: warning: "CONDITIONALLY_UNUSED" redefined [enabled by 
libgps_core.c:65:0: note: this is the location of the previous definition
libgps_core.c: In function 'gps_send':
libgps_core.c:174:33: warning: unused parameter 'gpsdata' [-Wunused-parameter]
 int gps_send(struct gps_data_t *gpsdata CONDITIONALLY_UNUSED, const char *fmt 
libgps_core.c: In function 'gps_stream':
libgps_core.c:194:35: warning: unused parameter 'gpsdata' [-Wunused-parameter]
 int gps_stream(struct gps_data_t *gpsdata CONDITIONALLY_UNUSED,
libgps_core.c:195:15: warning: unused parameter 'flags' [-Wunused-parameter]
  unsigned int flags CONDITIONALLY_UNUSED,
libgps_core.c:196:8: warning: unused parameter 'd' [-Wunused-parameter]
libgps_core.c: In function 'gps_data':
libgps_core.c:208:47: warning: unused parameter 'gpsdata' [-Wunused-parameter]
 const char *gps_data(const struct gps_data_t *gpsdata CONDITIONALLY_UNUSED)

-----Original Message-----
From: gpsd-users [mailto:address@hidden On Behalf Of Michael Lum
Sent: June-12-18 4:12 PM
To: Gary E. Miller; address@hidden
Subject: Re: [gpsd-users] Shared memory 'flags' set?

Hi Gary,

I've attached a gzipped capture. 

>From the logging I looked at it seems
maybe the flags are being "lost" somehow during the shared memory copy betweem 
shm_update() and the client getting it.
(or overwritten because the Ublox messages are coming in so fast)


-----Original Message-----
From: gpsd-users [mailto:address@hidden On Behalf Of Gary E. Miller
Sent: June-12-18 12:18 PM
To: address@hidden
Subject: Re: [gpsd-users] Shared memory 'flags' set?

Yo Michael!

On Mon, 11 Jun 2018 15:59:29 -0700
Michael Lum <address@hidden> wrote:

> However, when I try to use the shared memory interface only a few of 
> the flag fields are set.

That does seem odd.  Most clients do not bother to check for the flags because 
each GPS driver sets the flags differently.

There are now way more individual data items that may or may not be set.
So most clients just look at each data itme to see if it is valid.

Can you send a raw capture file of your GPS output data?  Somehing like 
"gpspipe -w > out.raw".

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]