summaryrefslogtreecommitdiff
path: root/driver_ubx.c
Commit message (Collapse)AuthorAgeFilesLines
* driver_ubx another printf/size_t issue fixed.Gary E. Miller2018-07-241-1/+1
|
* driver_ubx: fix a compiler warning in 32-bit mode.Gary E. Miller2018-07-241-1/+1
| | | | %zd is the portable way to print a size_t.
* driver_ubx: remove set, but unused fTOW.Gary E. Miller2018-07-241-2/+0
|
* driver_ubx: Put ECEF data fro mUBX-NAV-SOL into TPV.Gary E. Miller2018-06-171-11/+17
|
* u-blox: repect the often ignored readonly (-b) flag.Gary E. Miller2018-06-151-0/+4
|
* Ensure UBX device is actually switched to binary modeChris Lawrence2018-06-151-13/+20
| | | | | | | | | | | | | | | The message from the device announcing the correct port to connect to in response to UBX-CFG-PRT may arrive after the attempt to configure the output. This patch ensures a second UBX-CFG-PRT command is sent if the response indicates the initial guess is wrong (for example, on my MacBook, the device is attached to /dev/tty.usbmodemNNNN which is guessed to be a UART but is actually USB). I also took the liberty of simplifying the logic a bit; in particular there's no need to clear bits that are already clear when setting the mode, so the code can be simplified quite a bit. Signed-off-by: Gary E. Miller <gem@rellim.com>
* u-blox: Fix length test on UBX-NAV-SVINFO.Gary E. Miller2018-05-111-1/+1
| | | | | | Oddly no regression tests changed. Reported by Michael Pratt <mpratt9521@gmail.com>
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* ECEF: remove unused and unneeded ecef.valid.Gary E. Miller2018-02-121-2/+0
| | | | Gotta check each value for isfinite() anyway.
* UBX: revert end of cycle change, but make regression changes.Gary E. Miller2018-02-091-4/+3
| | | | | | | | | | 2 steps forward, one step back. Changing cycle end for UBX broke old UBX samples. Reverting that change breaks the new ECEF, that will need more work. Fixing when a UBX cycle is cleared broke the UBX regression tests, but the old way was wrong. So update the regression tests.
* Add ECEF support to u-blocx driver, data comes out in json.Gary E. Miller2018-02-081-9/+91
| | | | More work to do so cgps, xgps, etc. see the new data.
* Support UBX NAV-PVTClark Li2017-09-191-6/+117
| | | | | | | NAV-SOL has only been retained for backwards compatibility; users are recommended to use the UBX-NAV-PVT message in preference. A regression test case using ublox-neo-m8n is also added.
* Check valid flags in NAV-TIMEGPSClark Li2017-09-191-10/+22
| | | | Split 22a020ec1c2bc85eff681ecacc6d2bb79fdddc9c Support UBX NAV-PVT
* Revert "Support UBX NAV-PVT"Gary E. Miller2017-09-051-146/+19
| | | | | | | | | This reverts commit 22a020ec1c2bc85eff681ecacc6d2bb79fdddc9c. This commit broke PPS on uBlox. PPS would flip from offset 0 to offset -1, and back, every few minutes. Also stray characters (^M) in the log files.
* Support UBX NAV-PVTClark Li2017-08-071-19/+146
| | | | | | | | | | | | | NAV-SOL has only been retained for backwards compatibility; users are recommended to use the UBX-NAV-PVT message in preference. A regression test case using ublox-neo-m8n is also added. Also fix the checking on valid flags of iTOW and fTOW and process fTOW whose range is +-500us. Update test/dae/ublox-aek-4t.log.chk accordingly. Signed-off-by: Clark Li <clark.li@cohdawireless.com> Signed-off-by: Fred Wright <fw@fwright.net>
* UBX: fix xdop and ydop only updating once.Gary E. Miller2017-01-091-0/+3
| | | | Strangely, this changed no regressions....
* PPSTIME -> NTPTIMEGary E. Miller2016-04-241-2/+2
| | | | | NTPTIME is from the serial stream, it never had anything to do with PPS and it just confused everyone.
* Now we can use GOODTIME_IS in the UBX driver.Eric S. Raymond2016-03-221-1/+1
|
* Comment out a build breaker until the patch defining it lands.Eric S. Raymond2016-03-221-1/+1
|
* Don't claim to be able to deliver a 3D fix in UBX timing mode.Eric S. Raymond2016-03-201-0/+3
|
* Tighten up a validity test in the UBX driver.Eric S. Raymond2016-03-171-1/+3
|
* Autodetect and configure Spectratime iSync deviceMichael Brown2016-02-091-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Spectratime iSync devices comprise a u-blox 6 attached to a separate iSync microcontroller which drives a rubidium oscillator. The oscillator status messages may appear in the middle of the underlying GPS messages; these are handled via the "stashed partial message" support. This patch modifies the u-blox driver's parse_input() method to delegate NMEA messages to generic_parse_input() rather than nmea_parse(). This is done to allow the iSync trigger string to be detected after reactivation despite the "stickiness" of the u-blox driver. The initial delay time in gpsfake is extended from 1.0 seconds to 1.4 seconds to allow for the additional two 200ms delays introduced by the calls to gpsd_set_speed() in isync_detect(). The iSync driver legitimately uses both a probe_detect() method and a trigger string. The guard against such drivers is therefore removed from test_packet.c. The regression test data includes one artificially induced packet collision (where an oscillator status message appears in the middle of a GPS message), since this corner case is difficult to trigger deliberately in normal operation. Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
* 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-3/+3
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-22/+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.
* splint cleanup. Fixes for minor but real issues...Eric S. Raymond2015-03-281-4/+4
| | | | | ...no attempt to address the weird cross-platfprm variability we've seen lately. All regression tests pass.
* UBX-MON-VER now prints all info to LOG_INF.Gary E. Miller2015-03-191-5/+31
| | | | | Now outputs the extended version info. subtype is a bit short, just fit in there what we can.
* Break off UBX-MON-VER into separate function.Gary E. Miller2015-03-191-13/+29
|
* Remove some UBX-MON-PVT test code.Gary E. Miller2015-03-191-75/+8
| | | | | Eventually deprecated UBX-MON-SOL goes away and we must finish decoding UBX-MON-PVT. UBX-MON-PVT is not a superset of UBX-MON-SOL.
* Very preliminary cut at decoding UBX-MON-PVTGary E. Miller2015-03-191-1/+90
|
* Placeholder for decode of UBX-NAV-PVTGary E. Miller2015-03-191-0/+11
|
* Comment that UBX-NAV-SOL is depreacted, use UBX-NAV-PVT instead.Gary E. Miller2015-03-191-0/+5
| | | | No idea at what software version UBX-NAV-PVT is present.
* Fix UBX-MON-VER so we get u-blox version string.Gary E. Miller2015-03-181-6/+12
| | | | | | gpsd sends a ton of strings to the GPS on change from NMEA -> UBX mode. Most of it gets lost. So move version request later in the initialization.
* Comment polishing.Eric S. Raymond2015-03-181-2/+2
|
* Add code to request SW and HW Versions from u-blox.Gary E. Miller2015-03-181-10/+36
| | | | | scons check works, but no version working. Hitting same bug esr hit in configuring u-blox.
* Add links to u-blox M8 specs.Gary E. Miller2015-03-181-0/+3
| | | | Now with GLONASS and BeiDou
* One of the float-elimination steps busted something. Revert.Eric S. Raymond2015-03-081-3/+2
|
* A step toards float elimination. No code changes.Eric S. Raymond2015-03-081-2/+3
|
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-98/+99
| | | | | | | | | | | | | | | | 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.
* Make ntpmon autoconfigure and do subsecond polling.Eric S. Raymond2015-02-251-2/+2
|
* 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.
* Easy splint cleanups. All regression tests pass.Eric S. Raymond2015-01-211-5/+5
|
* 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.
* Almost entirely eliminate use of sats_used array.Eric S. Raymond2015-01-101-1/+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.
* Another minor code simplification. All regression tests pass.Eric S. Raymond2015-01-101-2/+3
|
* Code simplification.Eric S. Raymond2015-01-101-13/+12
|
* Fix a bug that produced duplicate satellite IDs in psesudo-NMA GSA.Eric S. Raymond2015-01-101-3/+1
| | | | Required one check file rebuild. All regressuin tests pass.
* Refactor representation of satellite data into an array of structs...Eric S. Raymond2014-09-221-9/+13
| | | | | | | | | | | | | | | | | | ...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.
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-56/+56
| | | | All regression tests pass.