gpsd-users
[Top][All Lists]
Advanced

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

Re: Gpsd clear fix and merge fix


From: raaj lokanathan
Subject: Re: Gpsd clear fix and merge fix
Date: Thu, 2 Apr 2020 11:13:48 +0800

Hi Gary,

Now in the gpsd has the nan checking right. I believe gpsd is the one doing all the checkings. I added a few printf messages to check the value of my track. As you said it shows me the track values. No issues on that.

But why I have to do the same checking in my application layer too? Isn’t the gpsd supposed to already handle the NaN and store the track information. Then when my libgps request it I can directly get the values from the gps data structure without having a second check in my application layer.

Please correct me if I am wrong about this. If that’s the case every application has to do the NaN checking?

This is how my application is outputting the track information now

Track: 187.6
Track: 187.6
Track: nan
Track: 187.6
Track: nan
Track: nan
Track: 187.6

On Thu, 2 Apr 2020 at 9:04 AM, Gary E. Miller <address@hidden> wrote:
Yo raaj!

On Thu, 2 Apr 2020 08:55:03 +0800
raaj lokanathan <address@hidden> wrote:

> Does this causes the NaN values?

Depends on what you mean by 'cause'.  I would say the opposite,
all data is NAN, until something causes it to not be NAN.

> Are there any ways to not to use the isfinite checking in my
> application?

Sure.  Many.  Always a dozen ways to do anything in C.  You could let
the NAN show to the user.  You could use printf to put the NAN in a
string, then string check for the string "NAN'.  But isfinite() is the
easiest and most obvious.

> Because I believe  since gpsd already done the isfinite
> checking when it store it into the structure why it has to do the
> checking in the application too?

Sigh.  We have gone over this many times before.  What was unclear
about my prior description in this email:

https://lists.nongnu.org/archive/html/gpsd-users/2020-03/msg00186.html

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
--
Thanks and regards,

Raaj Lokanathan

reply via email to

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