[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AIS message 1, Rate of turn
From: |
Gary E. Miller |
Subject: |
Re: AIS message 1, Rate of turn |
Date: |
Fri, 19 May 2023 16:04:25 -0700 |
Yo Владимир!
On Fri, 19 May 2023 20:27:40 +0300
Владимир Калачихин <v.kalachikhin@gmail.com> wrote:
> 18.05.2023 22:04, Gary E. Miller пишет:
> > That's just the way twos complement binary works.
>
> Yes,it is. But:
> In attachment NMEA AIS log with not null 'Rate of turn' fields.
JSON has no concept of "null" fields.
> The
> turn has different positive and negative values, and +- 127 values.
Doing this:
gpsdecode < /tmp/digitrafficAIS.log
I only see:
"turn":0
"turn":1
"turn":3
"turn":"fastleft"
"turn":"fastright"
> gpsd decode +-127 values as fastright and fastleft and positive other
> values. But not negative values.
So, yes.
Getting the unscaled this way:
gpsdecode -u < /tmp/digitrafficAIS.log
I see:
"turn":127
"turn":5
"turn":-1
"turn":-8
"turn":-8
"turn":-127
So that decode is busted.
I also see that the "turn" is supposed to be "scaled", bug gpsd does not
do that.
to +126 = turning right at up to 708° per min or higher
0 to –126 = turning left at up to 708° per min or higher
Values between 0 and 708° per min coded by
ROTAIS = 4.733 SQRT(ROTsensor) degrees per min
where ROTsensor is the Rate of Turn as input by an external Rate of Turn
Indicator (TI). ROTAIS is rounded to the nearest integer value.
+127 = turning right at more than 5° per 30 s (No TI available)
–127 = turning left at more than 5° per 30 s (No TI available)
–128 (80 hex) indicates no turn information available (default).
ROT data should not be derived from COG information.
Bugs like this make me wonder if anyone really uses the gpsd AIS..
> Maybe I generate a bad coded AIS messages
They look food to me. I'll look into a fix. You will not see it is you
stick with 3.22 instead of git head.
Naming all your log files digitrafficAIS.log makes it hard for
me to keep them separate.
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
pgp3GXdsbPy7C.pgp
Description: OpenPGP digital signature
- AIS message 1, Rate of turn, Владимир Калачихин, 2023/05/18
- Re: AIS message 1, Rate of turn, Gary E. Miller, 2023/05/18
- Re: AIS message 1, Rate of turn, Владимир Калачихин, 2023/05/19
- Re: AIS message 1, Rate of turn,
Gary E. Miller <=
- Re: AIS message 1, Rate of turn, Charles Douglass, 2023/05/19
- Re: AIS message 1, Rate of turn, Gary E. Miller, 2023/05/19
- Re: AIS message 1, Rate of turn, Charles Douglass, 2023/05/19
- Re: AIS message 1, Rate of turn, Gary E. Miller, 2023/05/19
- Re: AIS message 1, Rate of turn, Gary E. Miller, 2023/05/19
- Re: AIS message 1, Rate of turn, Владимир Калачихин, 2023/05/20