[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: altitude validity
From: |
Gary E. Miller |
Subject: |
Re: altitude validity |
Date: |
Wed, 5 Feb 2020 11:59:35 -0800 |
Yo Greg!
On Wed, 05 Feb 2020 09:31:21 -0500
Greg Troxel <address@hidden> wrote:
> "Gary E. Miller" <address@hidden> writes:
>
> > Suggestions welcome. But it seems to me anyone doing floating point
> > that fails to frequently check for NaNs has no business in the code.
> > That should have been in everyones CS 101.
>
> THis is totally unfair. The question here is about what is guaranteed
> by interfaces, and that being documented. This is basically an
> Eiffel/Design-By-Contract notino.
I told you exactly where it is documented: IEEE 754. gpsd also expects
c99, POSIX 2008, and the RFCs. The gpsd doc does not explain how
to code in C99, or how to use IEEE754, those are assumed skills.
And I did ask you for doc improvements if you have an improvement.
There really is no doc for libgps data structures, only for gpsd_json.
Feel free to add some to libgps.3
gps.h has said this for a while:
* All double values use NAN to indicate data not available.
And I added this yesterday:
/* WARNING: Check all flaots and doubles with isfinite() before using them!
* isnan() is not sufficient.
*/
And this to the new gps_log_t:
* Check all doubles with isfinite() before using
Any other suggestions for improvement?
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
pgpKRMuVZWhod.pgp
Description: OpenPGP digital signature