[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: |
Fri, 19 May 2023 15:16:06 -0700 |
Yo Владимир!
On Fri, 19 May 2023 23:31:40 +0300
Владимир Калачихин <v.kalachikhin@gmail.com> wrote:
> gpsd: 3.22 in scaled mode.
gpsd version 3.25 is the released version. The patches to your previous
issues are in git head. 3.22 is almost 3 years old. Please move your
testing to git head.
> Message 1: The COG value == 3600 interpreted by gpsd as 360, but not
> null. https://www.navcen.uscg.gov/ais-class-a-reports
JSON does not support "null". In JSON, numeric values MUST be numeric.
Only.
> It is a bug.
Nope. As the AIS spec says:
Latitude in 1/10 000 min (±90°, North = positive (as per 2’s
complement), South = negative (as per 2’s complement). 91°
(3412140h) = not available = default)
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.
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.
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
pgp7bvReCXWc4.pgp
Description: OpenPGP digital signature