summaryrefslogtreecommitdiff
path: root/gpsdecode.c
Commit message (Collapse)AuthorAgeFilesLines
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-8/+0
| | | | | | | | | | | | | | | | | | | 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.
* Use LOG_* symbol when setting/comparing log levelZbigniew Chyla2015-03-221-1/+1
| | | | | Currently, debug level 0 is actually LOG_SHOUT. This change doesn't affect generated binary code.
* cppcheck and Coverity cleanup; all regression tests pass.Eric S. Raymond2015-02-091-1/+1
|
* splint cleanup. All regressiion tests pass.Eric S. Raymond2015-02-091-1/+1
|
* Back out the attempt to use VTIME.Eric S. Raymond2015-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* splint cleanup for gpsdecode -m implementation.Eric S. Raymond2015-01-291-2/+2
|
* Add gpsdecode -m option for dumping minimum packet lengths.Eric S. Raymond2015-01-291-1/+31
|
* Easy splint cleanups. All regression tests pass.Eric S. Raymond2015-01-211-1/+1
|
* Add str_{,v}appendf, use it everywhere.Zbigniew Chyla2015-01-211-51/+38
| | | | This change doesn't affect generated binary code.
* Add -n option to gpsdecode to dump pseudo-NMEA.Eric S. Raymond2014-09-221-3/+41
| | | | | | Required for testing the changes related to saellide-data representation. All regression tests pass.
* Make -D option of gpsdecode effective again.Eric S. Raymond2014-09-181-5/+4
|
* Magic-number elimination. All regression tests pass.Eric S. Raymond2014-09-121-5/+6
|
* Minimal option requires conditionalization of some code.Eric S. Raymond2014-09-061-0/+2
| | | | | All regression tests pass with default options (GPS tests are disabled with minimal on, because socket_export is off).
* splint/cppcheck cleanuo after the gpsd_report change.Eric S. Raymond2014-08-271-4/+3
| | | | All regression tests pass.
* Reverse linkage of gpsd_report() is abolished. All regression tests pass.Eric S. Raymond2014-08-271-11/+6
| | | | Some cleanup and testing is still required.
* Structure member name change: packet -> lexer. No logic changes.Eric S. Raymond2014-08-271-5/+5
| | | | All regression tests pass.
* Eliminate reverse linkage of gpsd_write. All regression tests pass.Eric S. Raymond2014-08-261-8/+0
|
* Allow gpsedecode to dump SKY reports.Eric S. Raymond2014-08-251-1/+2
|
* Make interpretation of the split24 flag propperly per-subscriber.Eric S. Raymond2013-11-101-1/+7
| | | | | | | | 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.
* Make all hex-dumping truly thread-safe.Eric S. Raymond2013-10-131-5/+11
|
* We can now monitor low-level string sends through gpsmon.Eric S. Raymond2013-10-041-0/+8
| | | | Now we'll know exactly what's being sent on a UBX mode change.
* Properly label debug reports from different programs.Eric S. Raymond2013-09-291-0/+11
| | | | All regression tests pass.
* Change gpsd_report to no longer use a global. All regression tests pass.Eric S. Raymond2013-09-291-16/+0
| | | | | | | | 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.
* Extract ITU-R 1371-4 model and serial fields from AIS Type24 messages.Eric S. Raymond2013-09-151-1/+7
| | | | | | | | | | | | | | 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.
* Split Type 24 reporting, including the -s option to gpsdecode.Eric S. Raymond2013-09-141-1/+7
| | | | All regression tests pass.
* Nuke trailing whitespace in C source.Eric S. Raymond2012-09-071-11/+11
|
* Replace exit({0,1}) with exit(EXIT_{SUCCESS,FAILURE})Eric S. Raymond2012-09-071-5/+5
| | | | Note there are some exit(2) instances we bneed to decide what to do with.
* splint indicated yet another followup to the waterlevel signedness fix in AIS.Eric S. Raymond2012-07-021-1/+1
|
* [AIS] Fix plenty of small bugs unveiled by aishub test campaign.Christian Gagneraud2012-06-201-2/+14
| | | | | | | | | | | | | | | | | | | | | | 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.
* gpsdecode: honor scale flagChristian Gagneraud2012-06-201-0/+4
| | | | | | | 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.
* [AIS] Do scaling/offset operations only in json dumpChristian Gagneraud2012-06-051-1/+1
| | | | splint and check pass.
* [AIS] Met/Hydro: fixes and improvementsChristian Gagneraud2012-06-051-0/+41
|
* Clean up a couple of string-format errors. All regression tests pass.Eric S. Raymond2012-06-021-2/+2
|
* [AIS] Add UK/ROI AtoN monitoring data message handlingChristian Gagneraud2012-05-231-5/+28
|
* Appease splint, which can't parse declarations after executable code.Eric S. Raymond2012-05-211-3/+3
|
* [AIS] Use a dedicated stucture for IMO236 met/hydro messageChristian Gagneraud2012-05-201-5/+56
|
* More Coverity-spawned fixes. All regression tests pass.Eric S. Raymond2012-05-091-2/+3
|
* Improve error messages.Eric S. Raymond2012-03-041-0/+6
|
* const and splint cleanup.Eric S. Raymond2011-10-091-4/+5
|
* Ensure that enabling timing won't break object file compatibility.Eric S. Raymond2011-10-091-1/+1
|
* A step towards fixing the socket_export=no build.Eric S. Raymond2011-08-261-3/+13
|
* Make gpsdecode interpret "Date:" comments. All regression tests pass.Eric S. Raymond2011-06-231-0/+2
|
* Make gpsdecode initialize its time context the same way gpsd does.Eric S. Raymond2011-06-231-0/+1
|
* Elimination of gpsd_hexdump_level.Eric S. Raymond2011-06-171-1/+0
| | | | The few gpsd_hexdump() calls left have explicit guards.
* Bug fixed, all regression tests now pass with PASSTHROUGH_ENABLED.Eric S. Raymond2011-06-151-2/+2
|
* Improve some error messages.Eric S. Raymond2011-06-141-0/+2
|
* First xut at JSON passthrough code.Eric S. Raymond2011-06-141-4/+8
| | | | Not turned in by default yet; it interferes with RTCM2 decoding.
* More code slimming.Eric S. Raymond2011-06-111-1/+1
|
* Splint cleanup.Eric S. Raymond2011-04-251-5/+7
|
* Inplement -t option of gpsdecode for type filtering.Eric S. Raymond2011-04-211-2/+39
| | | | Intended mainly for selective reports from very large AIS logs.