| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This is to prevent a conflict with Boost version 1.67.
No functional change.
|
| |
|
|
|
|
| |
uint is now unsigned int.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While trying the regression tests on a MacBook (PowerPC), I ran across
some failures in the "Testing AIVDM decoding w/ CSV format" test. The
failing type/dac/fid cases were as follows:
6,1,14
6,1,18
6,1,30
6,1,32
8,200,10
The proximate cause is endian dependence in the CSV output, but the
real problem turns out to be that the code is broken on all platforms,
but only fails on big-endian platforms because the
incorrect-but-presumed-correct output was captured on a little-endian
processor.
The problem arises when the type 6 or type 8 case is supported by the
AIVDM parser but not by the CSV formatter. When the parser doesn't
support the case, it falls back to capturing the raw binary
bitdata. When the formatter doesn't support the case, it falls back to
dumping the raw binary bitdata. But in the offending cases, the raw
data was never correctly captured, and is instead an overlaid view of
the structured data, which is incorrect (as raw data) in all cases as
well as being endian-sensitive due to the presence of multibyte
quantities in host byte order.
The only way to make the CSV fallback work as intended would be to
change the struct ais_t type6 and type8 substructure definitions to
move the bitdata field out of the union and populate it
unconditionally. But this would increase the memory footprint and add
to the core code for the sole purpose of providing more useful output
in these cases of missing CSV formatting support, which doesn't seem
very justifiable.
The alternative is simply not to report the unavailable raw bitdata at
all in these cases, but instead to report something indicating that
the raw data is unknown. I've implemented a version of this where the
formatting remains the same (including the bit count) but the hex data
is replaced by "x" characters (which seemed safer than using "?",
given the absence of the latter in any existing cases.
After implementing the code change and before updating the test data,
I saw one additional miscompare that I'd not seen on the PPC. This was
for the 6,1,12 case, where the existing test data is too incomplete to
populate the endian-sensitive fields in the decoded form, but which
would have failed with a better version of the test case.
After updating the test data as well as the code, the test passes on
both x86_64 and PPC.
P.S.:
There are three additional uses of gpsd_hexdump in the CSV output, for
types 17, 25, and 26, but those all seem to populate the bidata field
unconditionally (and type 17 doesn't even have a "structured" flag),
so I left them alone.
Clearly the right fix would be to implement the missing CSV formatting
cases, which would render the fallback code unreachable, but it could
become reachable again if new cases were implemented in the parser and
not in the CSV formatter, so having a well-behaved fallback seems like
a good idea.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The proximate cause was that we've been seing emission of error
messages that were randomly and disturbingly variable across different
environments - notably Raspbian and Gentoo splint gave nontrivially
different results than Ubuntu 14.10 splint. And this was *not* due to
Ubuntu patches! A pristine splint built from the 3.1.2 tarball on
Ubuntu didn't match the Raspbian and Gentoo results either.
But this has been coming for a while. Easy access to more modern
static analyzers such as coverity, scan-build and cppcheck has been
decreasing the utility of splint, which is unmaintained and somewhat
buggy and not easy to use.
Only file not cleaned is ppsthread.c, because Gary has been working
on it during this cleanup.
All regression tests pass. PPS observed live on GR601-W.
|
|
|
|
|
| |
Currently, debug level 0 is actually LOG_SHOUT.
This change doesn't affect generated binary code.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to Matthias Drochner at
http://lists.lysator.liu.se/pipermail/lsh-bugs/2003q4/000151.html:
I thought I'd give lsh a try, just to see how it compares to openssh...
The client didn't work well on NetBSD, got a message like "unexpected
EWOULDBLOCK" on each keystroke.
Looked a bit deeper and found that stdin is set to O_NONBLOCK and
a raw tty mode with c_cc[VMIN] > 1 and c_cc[VTIME] > 0.
I'll append a little test program which does the same. I've tried
it on 3 operating systems (Linux, NetBSD, Digital UNIX), and it
behaves differently on each:
-on Linux, if a key is pressed, the read returns immediately with
that one character
-on NetBSD, the read returns with no data but EWOULDBLOCK
-on D'UNIX, the poll() doesn't teturn before 4 keypresses are done;
the read() returns these 4 characters
Indeed, in SUSv2's termios page is a sentence which says that if
both O_NONBLOCK and VTIME>0 are set, the behaviour is more or less
undefined.
I've solved my immediate problems by setting VMIN to 1 instead of 4
in unix_interact.c:do_make_raw(), but VTIME is still pointless,
so I wouldn't call this a clean solution.
All regression tests pass.
|
| |
|
| |
|
| |
|
|
|
|
| |
This change doesn't affect generated binary code.
|
|
|
|
|
|
| |
Required for testing the changes related to saellide-data representation.
All regression tests pass.
|
| |
|
| |
|
|
|
|
|
| |
All regression tests pass with default options (GPS tests are disabled with
minimal on, because socket_export is off).
|
|
|
|
| |
All regression tests pass.
|
|
|
|
| |
Some cleanup and testing is still required.
|
|
|
|
| |
All regression tests pass.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This involved moving some out of the AIS driver. There is a related
small change in behavior; now, if split24 is on, the Type B half of
a matched pair will be shipped with type 'both'.
All regression tests pass. PPS is live.
|
| |
|
|
|
|
| |
Now we'll know exactly what's being sent on a UBX mode change.
|
|
|
|
| |
All regression tests pass.
|
|
|
|
|
|
|
|
| |
This is a large, ugly change. But without it we can't troubleshoot the
ICP/IP-source initialization bug properly - colliding definitions of
gpsd_report() were interfering with error reporting early in gpsd runs.
More cleanup work remains to be done, but at least this is working.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ITU-R 1371-4, there are new model and serial fields carved out of
the right-hand end of vendorid, which is reduced from 7 chars to 3.
It is not clear in which minor revision this change took place. To
cope with older AIS implementations, unpack the trailing bits *both*
ways; truly revision-4-conformant implementations will have up to four
characters of trailing garbage on the vendorid, and older
implementations will have garbafe in the model and serial fields.
This commit also reverts the change to copy only 20 characters rather
than 21 when analyzing the name field in a type21. There's some mystery
about why this didn't break the rgression tests sooner.
|
|
|
|
| |
All regression tests pass.
|
| |
|
|
|
|
| |
Note there are some exit(2) instances we bneed to decide what to do with.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A test campaign was run with live data from aishub.net (ca. 25 millions
sentence, 1.2 GB of logs), the goal was to check the decoding and the JSON
parsing and dumping code.
On all the AIS data, the following tests were done:
- AIVDM decoding
- JSON scaled dump
- JSON validity check on scaled dump.
- JSON unscaled dump
- JSON validity check on unscaled dump
- JSON unscaled idempotency check
- JSON unscaled/scaled idempotency check
The last check consisted of:
- parsing the unscaled dump
- dumping it back in scaled mode
- compare it with the original scaled dump.
This test campaign has unveiled plenty of small bugs all around the AIS code.
This patch fixes all of them and adds new sentences in the regression tests.
|
|
|
|
|
|
|
| |
Currently gpsdecode doesn't care about the -u (unscaled) flag. Fix that.
This patch will allow aivdm-regress to run tests in scaled mode.
scons check passed.
|
|
|
|
| |
splint and check pass.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The few gpsd_hexdump() calls left have explicit guards.
|
| |
|