summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid overexposure of an internal mask. EOF_SET -> EOF_ISEric S. Raymond2015-02-201-2/+2
| | | | | | | | Also, use PPSDRIFT_SET as a client-side status flag for JSON PPS rather than the (not yet shipped) TIMEDRIFT_SET. Next release we're probably going to add a drift object for in-line time. No logic changes. All regression tests pass.
* Fixing broken build scons minimal=on ntpshm=onJon Schlueter2015-02-181-0/+2
| | | | missing ifdef guards around pps_thread_stash_fixtime()
* Simplify NTP SHM segment creation.Eric S. Raymond2015-02-151-1/+0
| | | | | | This will avoid an object file compatibility break later. All regression tetrs pass. SHM segments allocate successfully in live testing.
* splint cleanup. All regression tests pass.Eric S. Raymond2015-02-121-0/+2
|
* Namespace cleanup.Eric S. Raymond2015-02-121-1/+1
|
* Mutex-lock the update of last-fix time.Eric S. Raymond2015-02-121-3/+3
|
* BSD compiler waening and splint cleanup.Eric S. Raymond2015-02-111-4/+4
|
* Fix the gpsmon display-trashing problem; add some documentation and asserts.Eric S. Raymond2015-02-101-4/+3
| | | | All regression tests pass.
* splint cleanup. All regressiion tests pass.Eric S. Raymond2015-02-091-5/+4
|
* Remove some remnants of the adaptive-delay experiment.Eric S. Raymond2015-02-091-21/+0
| | | | All regression tests pass.
* Build fix for when pps=no.Eric S. Raymond2015-02-031-1/+1
| | | | All regression tests pass.
* Add note where gpsmon is failing in PPS.Gary E. Miller2015-02-021-2/+2
|
* Mask a NAN in ntpshm_latch(). Cause of NAN in ppsthread.cGary E. Miller2015-02-021-0/+4
| | | | The root cause still to be found.
* Tweak init of session.Gary E. Miller2015-02-021-2/+6
|
* More session initializationGary E. Miller2015-02-021-5/+8
|
* Initialize a few time variables in session.Gary E. Miller2015-02-021-0/+13
|
* Fix insufficient precision in last_fixtime.clockGary E. Miller2015-02-011-3/+2
| | | | | | | | | | last_fixtime.clock and last_fixtime_clock were storing 63 bits of time in 53 bits of timestamp_t (double). Change timestamp_t to timespec to restore nSec precision. Along the way save some floating point that is slow in embedded systems that have no FPU.
* Note loss of precision in ntpshm_latch()Gary E. Miller2015-01-311-0/+4
| | | | | Until we see a high precision GPS timestamp this can be ignored.
* Back out the attempt to use VTIME.Eric S. Raymond2015-01-311-3/+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.
* Document why gpsd needs to die on certain mutex failures.Gary E. Miller2015-01-301-0/+9
|
* Restore hastily removed checks on pthread usage.Gary E. Miller2015-01-301-2/+14
| | | | Any failure of pthread_mutex_lock() is a fatal error.
* Assertions cleanup and new policy. All regression tests pass.Eric S. Raymond2015-01-301-6/+2
|
* Correct assertions in libgpsd_core to assert 0 == errJon Schlueter2015-01-301-2/+2
|
* Add assert()s to the mutex lock/unlock.Gary E. Miller2015-01-291-2/+6
| | | | When in doubt, always test return codes.
* Create a logic path for each driver to set tty controls.Eric S. Raymond2015-01-291-0/+3
|
* Introduce an adaptive delay into the main loop to prevent select buzzing.Eric S. Raymond2015-01-221-0/+22
| | | | | | | | | | | When select(2) returns too fast with only small amounts of data, the main loop will buzz and eat power - a significant issue on, e.g. battery-powered RasPi devices, where it was first spotted. This code watches read volume and delays when it sees lots of small bursts. All regressiion tests pass. But note: the adaptive-delay logic has to suppress delays to arrange this, otherwise we get an all too familiar class of spurious test failure.
* Simplify by using str_rstrip_char.Zbigniew Chyla2015-01-211-2/+1
| | | | | By using str_rstrip_char we explicitly show that we're removing trailing comma/space.
* Add str_{,v}appendf, use it everywhere.Zbigniew Chyla2015-01-211-5/+3
| | | | This change doesn't affect generated binary code.
* Add str_starts_with macro, use it instead of strncmp.Zbigniew Chyla2015-01-211-4/+5
| | | | This change doesn't affect generated binary code.
* Always use sizeof to get array sizeZbigniew Chyla2015-01-131-1/+1
| | | | | | Don't use constant/expression from an array's definition when referring to its size. Eliminates redundancy and avoids problems when array size changes. The change doesn't affect generated code.
* Cleanup of string function and sizeof usage. All regression tests pass.Zbigniew Chyla2015-01-131-1/+1
|
* Safety fix: ensure that SBAS satellites are never used in error modeling.Eric S. Raymond2015-01-101-1/+1
| | | | Required one check rebuild (change affects only error estimates).
* warning hunting for -Wunused-function in libgpsd_core.cJon Schlueter2015-01-091-0/+2
| | | | Mismatch in guards for static function visibilize
* Refactor representation of satellite data into an array of structs...Eric S. Raymond2014-09-221-20/+17
| | | | | | | | | | | | | | | | | | ...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.
* Fix stupid finger error in DOP computation.Eric S. Raymond2014-09-211-2/+2
|
* More instrumentation.Eric S. Raymond2014-09-211-4/+5
|
* Change the traversal order of the DOP computation loop...Eric S. Raymond2014-09-201-2/+2
| | | | | | | ...so we can easily check that it's independent of order in the list of satellites. All regression tests pass.
* Begin factoring out matrix algebra so it can be unit-tested.Eric S. Raymond2014-09-201-92/+2
| | | | | For some odd reason trying to faxtor out the symmetrize operation induces a core dump. To be investigated.
* Second attempt at DOP computation fix.Eric S. Raymond2014-09-191-12/+15
|
* Improve some instrumentation.Eric S. Raymond2014-09-191-6/+0
|
* Fix a subtle error in DOP computation. This makes a prompt release a good idea.Eric S. Raymond2014-09-191-3/+13
|
* Silence compiler warnings about array subscripts of type 'char'Matt2014-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | Cygwin GCC complains about code like isprint(c), where c is of type char. The isX() and toX() functions/macros (ISO C allows either) all accept an int, whose value should be either that of an unsigned char, or the special value EOF (== -1). So cast to unsigned char each argument to isprint, tolower, etc. Silences several warnings of the form: gpsutils.c: In function 'safe_atof': gpsutils.c:90:5: warning: array subscript has type 'char' [-Wchar-subscripts] while (isspace(*p)) { ^ gpsutils.c:188:2: warning: array subscript has type 'char' [-Wchar-subscripts] while (isdigit(*p)) { ^
* cheapfloats -> nofloats. All regression tests pass...Eric S. Raymond2014-09-061-6/+6
| | | | ...but thy won't of you turn nofloats on.
* Appease the compiler.Eric S. Raymond2014-08-281-1/+1
|
* splint/cppcheck cleanuo after the gpsd_report change.Eric S. Raymond2014-08-271-5/+9
| | | | All regression tests pass.
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-73/+73
| | | | All regression tests pass.
* Reverse linkage of gpsd_report() is abolished. All regression tests pass.Eric S. Raymond2014-08-271-30/+21
| | | | Some cleanup and testing is still required.
* More gpsd_report removal. All regression tests pass.Eric S. Raymond2014-08-271-24/+28
|
* The big leap. Most instances of gpsd_report are replaced...Eric S. Raymond2014-08-271-55/+55
| | | | | | | | | | | | | | | | ...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-62/+90
| | | | | | A major step towards eliminating reverse linkage. All regression tests pass.