[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: course of AIS targets
From: |
Gary E. Miller |
Subject: |
Re: course of AIS targets |
Date: |
Sat, 20 May 2023 11:48:07 -0700 |
Yo Владимир!
On Sat, 20 May 2023 12:06:35 +0300
Владимир Калачихин <v.kalachikhin@gmail.com> wrote:
> 20.05.2023 01:16, Gary E. Miller пишет:
> > Since JSON has no "null" value, and numerics must be numeric, it is
> > normal to follow the spec and use 360.0 as "not available".
> > Exactly as the spec says to do.
>
> Spec says about 3600...
> Ok, but for speed gpsd use 'nan' instead 1023, and for ROT - 'nan'
> instead 128.
JSON has no way to send NaN (or null) in a numeric. Nor does AIS, thus
the 3600.
> > If you prefer, since the COG is "not available", I could change
> > gpsd_json.c sp that when 360.0 == COG, to not output the field at
> > all. Would you prefer that.
>
> Yes.
I'm not sure what clients that may break. The only benefit is maybe
better style. Balancing maringal gains versus actual harm to existing
clients: I'll leave it.
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
pgpq_pRLRGPvK.pgp
Description: OpenPGP digital signature