gpsd-users
[Top][All Lists]
Advanced

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

Re: Gpsd information showing as nan in application


From: Luke Hutchison
Subject: Re: Gpsd information showing as nan in application
Date: Thu, 26 Mar 2020 13:09:45 -0600

What are the heuristics used to detect cycle boundaries? Is it possible to improve these heuristics to work with a wider array of update behaviors?

With my GPS unit, there's something like 0.95 seconds between a pair of updates (call them A then B), then 0.05 seconds between a pair of updates (B then A). So for a series of updates, A1 B1 A2 B2 A3 B3, either A{i} and B{i} together form a single update, or B{i} and A{i+1} form a single update. There must be some simple heuristics that could figure out which of those was correct -- e.g. looking at overlap between non-NaN fields between adjacent messages.


On Thu, Mar 26, 2020 at 12:56 PM Gary E. Miller <address@hidden> wrote:
Yo raaj!

On Thu, 26 Mar 2020 13:37:31 +0800
raaj lokanathan <address@hidden> wrote:

> Just curious, why the gpsd is not handling the NAN values itself?

Think of it the other way around, NAN is how gpsd handles unknown
values.

Step way back, to the view from above.

gpsd can handle a large number of data items.

Some things like ECEF velocity, depth below the keel, etc. never ever
show up, yet gpsd has a variable for them.

How to mark thiose variables as not set, in C code?  Set it to NAN.

Some things like Ephemeris, Alamanac, skyview, etc. come ino not at all
or every once in a while.

How to mark those variables as not set, in C code?  Set it to NAN.

Some things like altitude, latitude, longitude, speed, geoid separation,
etc. may, or may not show up every fix, depending on fix status

How to mark those variables as not set, in C code?  Set it to NAN.

Different receivers dribble their data over an unspecified number
of messages, in unspecified order, with no obvious start of cycle or
end of cycle indicator.  Even the same receiver can change all of those
depending on configuration, uptime, fix status, etc.

How is gpsd supposed to know when it hass all the data for the current
fix cycle?  It can not.  It has to guess.

When gpsd guess wrong, it may send partial data in a message, the unknown
data ia NAN.  At a later time, in the same cycle, before the next cycle,
new data may appear, so gpsd will send a new message, for the same
cycle, with all the data it knows at that later time.  The data still
unknown, is NAN.

> Which means each time I develop a application I have to check for the
> NAN is it?

Yes!  If you look at the sample C language gpsd client code, that is how
it is done.  And pay attention to the time stamps!

RGDS
GARY
---------------------------------------------------------------------------
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]