summaryrefslogtreecommitdiff
path: root/driver_sirf.c
Commit message (Collapse)AuthorAgeFilesLines
* driver_sirf: add gnssid:svid.Gary E. Miller2018-09-241-4/+16
| | | | Not hard since SiRF only uses GPS and SBAS.
* gps.h: remove wrong SBAS_PRN()Gary E. Miller2018-09-191-1/+1
| | | | | This macro was wrong, and causing valid sats to not be included in the COP calculations.
* driver_sirf: Report ECEF in TPV.Gary E. Miller2018-06-171-9/+12
|
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* SiRF: TDOP only computed once, on gpsd startup.Gary E. Miller2017-01-091-0/+2
| | | | | | | Any DOP not provided from the GPS must be reset so that the next SATELLITE_SET will recompute it. This problem is not only on SiRF and not only on TDOP. But I do not have the proper fixes yet.
* bzero() is gone in POSIX 2008. Use memset()Gary E. Miller2016-08-151-1/+1
| | | | Also two #defines for gpspipe.c
* PPSTIME -> NTPTIMEGary E. Miller2016-04-241-4/+4
| | | | | NTPTIME is from the serial stream, it never had anything to do with PPS and it just confused everyone.
* Add Coverity suppressions for new invariant checks.Eric S. Raymond2016-01-291-0/+1
|
* Prevent a subtle bug in the SiRF driver that sometimes caused NTP problems.Eric S. Raymond2016-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simon Hradecky <shradecky@nomissoft.com> writes: I just verified a bug in the driver_sirf.c (version 3.15, I just discovered 3.16 was released a few days ago, didn't yet check this version), routine sirf_time_offset: Line 637: double retval = NAN; This sets the default offset to NAN, which later results in the real time in ntp shared memory etc. to be set to 0 with a valid time stamp, further causing the NTP daemon to suddenly jump to year 1970, if the SIRF last status is not known to the driver. I believe, this default offset would be correct to read: double retval = 0; The problem with the real time set to 0 as result of the NAN time offset in the SIRF driver (while the clock time was correct) in ntp shared memory segment occurs frequently (but not always) with GlobalSat SIRF modules, in our case EB5531RE. This can happen at any time of operation, it is possible that the gpsd starts out entirely correct with proper time stamps in all fields and suddenly forces the NTP to 0 seconds since 1970 because the offset becomes NAN.
* Address Savannah bug #46082 - Can't explicitly build with NMEA drivers.Eric S. Raymond2015-10-011-2/+2
|
* A drowning deluge of whitespace hacks.Gary E. Miller2015-04-301-6/+6
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-25/+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.
* Narrow the driver-type-reversion logic a bit. All regression tests pass.Eric S. Raymond2015-03-191-1/+1
|
* One of the float-elimination steps busted something. Revert.Eric S. Raymond2015-03-081-2/+2
|
* A step toards float elimination. No code changes.Eric S. Raymond2015-03-081-2/+2
|
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-217/+217
| | | | | | | | | | | | | | | | This change is done so we can add a "log" hook to the pps_thread_t structure (this is not done yet) and harmonize with the name of the outer logging function. If that name had been left as gpsd_report() there would have been scope for bad confusion with the report_hook member. Also, remove two stray duplicative printf calls from the NMEA2000 driver (drivers shouldn't have printfs!) and fix one typo. This is a step towards factoring out ntplib. For that to happen, the PPS thread code needs to be decoupled from the core session structure. No logic changes. Object compatibility preserved. All regression tests pass.
* Back out the attempt to use VTIME.Eric S. Raymond2015-01-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add a minimum packet length to every driver.Eric S. Raymond2015-01-291-0/+1
| | | | Length 0 means the minimum is unknown and the driver should use character I/O.
* Fully initialized fields in some time structures.Eric S. Raymond2015-01-231-2/+5
| | | | This fixes an hour-offset bug due to the tm_isdst member being uninitialized.
* cppcheck cleanup.Eric S. Raymond2015-01-221-2/+1
|
* Coverity/splint cleanup.Eric S. Raymond2015-01-211-0/+6
| | | | | Turned up a bug in where a counter was incremented un the Navcom driver; this required one test rebuild.
* Easy splint cleanups. All regression tests pass.Eric S. Raymond2015-01-211-6/+7
|
* Add str_{,v}appendf, use it everywhere.Zbigniew Chyla2015-01-211-7/+4
| | | | This change doesn't affect generated binary code.
* Almost entirely eliminate use of sats_used array.Eric S. Raymond2015-01-101-5/+1
| | | | | | | Instead, set the used member in the satellites array directly where possible. The NMEA0183 and TSIP drivers still need a local equivalent. This changes pseudo-NMEA GSA output in several binary-protocol tests.
* Revise SiRF driver to be get satellites-used info from the skyview sentence.Eric S. Raymond2015-01-091-18/+25
| | | | | | | | | | | Before, that information was partly coming from the navigation-solution message and being pieced together with related data from svinfo. This way of doing things is more consistent. While this change required a rebuild of four check files, the effects are minor. Fixes don't change, but some generated pseudo-NMEA does and the error modeler can sometimes compute error estimates in cases where the old code could not because of a determinant-zero condition.
* Tweak to ifdef guard for RECONFIGURE_ENABLE in driver_sirfJon Schlueter2015-01-091-1/+1
| | | | | | | Warning cleanup that one of the nav message was not used if RECONFIGURE_ENABLE was not defined. Inspection shows that it is only used from within code guarded by the same ifdef guard so adjusted to clear the compile warning.
* Better way to avoid glibc dependency.Eric S. Raymond2014-09-291-3/+3
| | | | | | | Returns us to something amost identical to the original code. Sigh. Timezones are a swamp. All regression tests pass.
* Remove some custom code, at the cost of introducing a glibc depenency.Eric S. Raymond2014-09-251-2/+2
| | | | Dependency soon to be fixed. All regression tests pass.
* Refactor representation of satellite data into an array of structs...Eric S. Raymond2014-09-221-11/+16
| | | | | | | | | | | | | | | | | | ...from a set of parallel arrays. This change flushed out a longstanding bug in the computation of DOPs for estimated error bars. Some test-load rebuilds were required: geostar-geos1m-binary.log.chk: With this change error estimates are computed and reported. trimble-lassen_iq-3dfix.log, trimble-lassen_iq-3dfix.log: the change revealed a bug in the computation of satellite-seen bits. Error estimates did not change. navcom.log: Error estimates changed. With these rebuilds, all regression tests pass.
* Add some warnings about SiRF-IV flakiness, and remove a related TO-DO item.Eric S. Raymond2014-08-291-0/+7
|
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-89/+89
| | | | All regression tests pass.
* The big leap. Most instances of gpsd_report are replaced...Eric S. Raymond2014-08-271-89/+89
| | | | | | | | | | | | | | | | ...with calls to gps_notify(), which indirects to its output method through a slot in an errout structure. Usually the errout structure lives inside the session context, but because struct errout_t is its own thing this does not have to be the case. One large clique of gpsd_notify() calls, in packet.c and isgps.c, looks at a struct errout_t copy in a lexer control block This change is not complete. Remnant gpsd_report calls need to be changed, and gpsmon needs to be tweaked so that the struct_error_t in its context is a non-defaukt hook updating the cuses display rather than simply dumping to stderr. Also the report label functionality needs to be added. All regression tests pass.
* Introduce struct errout_t to encapsulate error-reporting hooks.Eric S. Raymond2014-08-271-89/+89
| | | | | | A major step towards eliminating reverse linkage. All regression tests pass.
* Structure member name change: packet -> lexer. No logic changes.Eric S. Raymond2014-08-271-6/+6
| | | | All regression tests pass.
* Another step away from reverse linkage. No logic changes.Eric S. Raymond2014-08-271-46/+51
| | | | All regression tests pass.
* Satisfy an order dependency in SiRF initialization.Eric S. Raymond2014-08-271-17/+20
| | | | Follows a tip from Michael Tatarinov.
* Split firmwqre version query out of the init method.Eric S. Raymond2014-08-251-10/+12
| | | | | | This enables us to force readonly off while it's being called. The practical effect is that gpsmon can get a firmware version (if this is possible) without reconfiguring the device.
* splint/ccpcheck cleanup.Eric S. Raymond2014-08-241-4/+4
|
* Eliminate the tag field entirely, even internally.Eric S. Raymond2014-08-241-6/+5
| | | | All regression tests pass.
* Drop the obsolete tag field from JSON output. Bump the minor protocol number.Eric S. Raymond2014-08-241-6/+5
| | | | | | | Required a regression-test rebuild, of course. The field is still set by the TSIP and SiRF drivers; the SiRF driver actually uses it. It may be possible to eliminate the TSIP uses, but so far attempting this has produced odd regression-test failures.
* Document sSiRF sentence suppressions better.Eric S. Raymond2014-08-211-15/+17
|
* Revert "Remove dodgy sentence-suppresion code in SiRF driver."Eric S. Raymond2014-08-211-0/+6
| | | | Dodgy code turned out to be right after all - just needs documentation.
* Remove dodgy sentence-suppresion code in SiRF driver.Eric S. Raymond2014-08-211-6/+0
| | | | All regression tests pass.
* Turn off GND in SiRF binary mode, as we don't use it.Eric S. Raymond2014-08-201-9/+14
| | | | | | This is in response to a report by Jeff WEoolsey on gpsd-dev indicating that it masy be *required* to turn this off to get accurate time...
* Revert "Constify some storage. All regressions tests pass."Eric S. Raymond2014-08-201-16/+16
| | | | It failed on a live GPS, in the configuration code.
* Constify some storage. All regressions tests pass.Eric S. Raymond2014-08-191-16/+16
|
* Refactor initialization, and again disable wait on ACK.Eric S. Raymond2014-05-191-14/+23
| | | | | With this code, direct-mode gpsmon speed changes work on SiRF II, III, and IV. Direct-mode gpsctl speed changes work on SiRF II and III, fail on SiRF IV.
* Instrument so we can tell when a SiRF control is sent out with ACK pending.Eric S. Raymond2014-05-181-1/+23
|
* Back out my attempt at ACK synchrinization, it fails on SiRF III.Eric S. Raymond2014-05-181-27/+0
|
* Cut down on the sentence mix transmitted from the device.Eric S. Raymond2014-05-181-2/+11
| | | | | | | From a patch by Michael Tatarinov. Does no harm, and may be required for SiRF IV to work. All regressiion tests pass.