summaryrefslogtreecommitdiff
path: root/libgps_json.c
Commit message (Collapse)AuthorAgeFilesLines
* JSON/RAW: Add sigid, if non-zero.Gary E. Miller2019-05-171-3/+8
| | | | | Only affects ZED-F9P for now. Easier than decoding the obs_code.
* libgs_json: Fix SKY json_types.Gary E. Miller2019-05-171-3/+3
| | | | Broken for big-endian machines. Was overrunning the buffers.
* libgps_json: Fix json_types for meas_t.Gary E. Miller2019-05-171-14/+14
| | | | json_types are the C types, not really the JSON types.
* JSON: Add sigid to PRN in SKY.Gary E. Miller2019-04-191-0/+1
| | | | Update doc to match. Not used, yet.
* libgps_json: Decode datum in the client.Gary E. Miller2019-03-251-0/+2
| | | | No clients use it yet...
* Split epe into eph and sep.Gary E. Miller2019-03-221-9/+13
| | | | | | | | Try to do it with forward and backward compatibility, which is challenging with current miscojson. Sometimes epe was used to 2D estimated erro. Sometimes for 3D error. So make it explicit eph is 2D, and sep is 3D.
* libgps_json.c: Add missing epe. This was breaking cgps.Gary E. Miller2019-03-201-0/+2
| | | | microjson still aborts on unknown attributes...
* libgps_json: remove duplicate CLIMB_SET testGary E. Miller2019-03-121-2/+0
|
* POSIX_C_SOURCE: Not just a linux define. 200112L is a minimum.Gary E. Miller2018-12-261-2/+2
| | | | Don't force _POSIX_C_SOURCE 200112L, just make it a minimum.
* In the client library, ignore unkown JSON attributes from GPSD.Eric S. Raymond2018-11-201-30/+37
| | | | Supports forward copatibility in case of protocol extensions.
* libgps_json: Give leapseconds a default of 0.Gary E. Miller2018-11-191-1/+2
| | | | Without a default, fails when connecting to older clients.
* LICENSE: Update licenses for consistency. No functional changes.Gary E. Miller2018-11-191-1/+1
|
* libgps_json: Add decode for leapseconds. Where to put it?Gary E. Miller2018-11-191-0/+3
| | | | No place to put leapseconds in gps_data_t?
* RAW: Add c2c and l2c measurements.Gary E. Miller2018-11-121-0/+4
| | | | Those are C/A L2 pseudo-range and carrierphase.
* rawdata: Add locktime field.Gary E. Miller2018-11-061-0/+1
| | | | So a client can see Carrier Phase slips.
* rawdata: Add lli to JSON data, use NAN for invalid cpMeas and prMeasGary E. Miller2018-11-051-0/+1
|
* lobgps_jons: Another fix for RAW decode.Gary E. Miller2018-11-011-3/+6
|
* json: Fis encode/decode of rawdata_t.Gary E. Miller2018-10-301-3/+3
|
* gps.h: Add RAW_SET flag. Now clients can tell if they get RAW data.Gary E. Miller2018-10-301-1/+1
|
* libgps_json: Decode new parts of RAW message.Gary E. Miller2018-10-291-6/+8
|
* rawdata_t: Split mtime into time and nsec.Gary E. Miller2018-10-291-4/+10
| | | | And have to use t_real for mtime bacause json.c has no t_long type.
* libgps_json: Add RAW decode.Gary E. Miller2018-10-261-0/+49
|
* libgps_json: minor style tweak, line up columns.Gary E. Miller2018-09-191-2/+2
|
* libgps_json: Decode gnssid:svid in SKY.Gary E. Miller2018-09-191-13/+12
| | | | Also fix a bunch of memset() nits.
* update gpsd to send arbitrary data to GPS from clientGary E. Miller2018-07-141-0/+2
| | | | New ?DEVICE:{"hexdata":"data" option.
* libgps_json.c: change isnan() to isfinite()Gary E. Miller2018-07-101-15/+23
| | | | | | Odd, +Ing and -Inf are NaN, but isnan() says they are not! This can lead to client crash. Use isfinite() instead, changing the sense of the test.
* $GPVTG Added parsing, storage, output of magnetic courseDaniel_M_Williams2018-06-121-0/+4
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* ECEF: jiggle the ECEF data structure, add missing accuracies to client.Gary E. Miller2018-02-161-4/+4
|
* isfinite(): Another try at getting Ubuntu to see isfinite()Gary E. Miller2018-02-131-2/+3
| | | | | Their man page says _POSIX_C_SOURCE >= 200112L should work. It did not.
* isfinite(): add define for POSIX 2011LGary E. Miller2018-02-131-0/+3
| | | | Almost 20 years after C99, Ubuntu still does not use it as default...
* ECEF: pass ECEF parts of fix to gps client library.Gary E. Miller2018-02-121-3/+15
|
* cppcheck: style - remove unused variable.Robert Norris2017-02-091-2/+2
| | | | | TESTED: 'scons build-all check' passes.
* Add "status" to TPV for DGPS notificationGary E. Miller2016-04-061-1/+2
| | | | | Also update the affected regression files. gpsd had been throwing away the DGPS status.
* Add concept of a GPS-disciplined oscillatorMichael Brown2016-02-091-0/+41
| | | | Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
* Address Savannah bug #46804: JSON satellite view parsing is somewhat broken.Fred Wright2016-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fred Wright <fhgwright> writes: While trying the regression tests on a MacBook (PowerPC), I ran across some failures in the JSON unit test. Although this is ostensibly an endian issue, it turns out that the code for parsing satellite view data is actually incorrect for all processors, albeit more so for big-endian processors. The problem is that the three "integer" fields in struct satellite_t are defined as shorts, but parsed as ints by the JSON parser. On a big-endian processor, this causes the values to be misaddressed and hence have incorrect values, but even on a little-endian processor this is incorrect since it's storing four-byte values into two-byte fields. The unit tests don't catch this aspect, since the fields are favorably ordered such that the clobbered fields are clobbered before being written pseudo-correctly. I was able to demonstrate the "buffer overflow" misbehavior by modifying the test data for the last satellite to provide the fields in the reverse order from their order in the structure. The simple fix for this would be just to change the shorts to ints in the definition of struct satellite_t. On most processors, this doesn't even cost any memory, since the presence of the double forces eight-bye alignment, so the padded structure is 24 bytes regardless of whether the three fields in question are shorts or ints. However, there might be some processors with less strict alignment requirements where using shorts would actually be helpful. With the existing layout, the only possible fix is to add support for shorts to the JSON parser, and adjust the satellite-view parsing accordingly. The attached patch does that, as well as adding u_short support for completeness (though it's not currently used). It also provides the aforementioned change in the test data, in keeping with the philosophy of "create a test for what just failed, so it doesn't happen again". Note that using shorts for these fields would be more effective if the "used" field were also reduced to a short, instead of inheriting "int" from "bool". That would shrink the structure to 16 bytes. It could be further reduced to 12 bytes by using a float instead of a double for the "ss" field (and even a float is gross overkill for this purpose). This could all be more significant when MAXCHANNELS needs to be increased (again) to accommodate the deployment of the newer GNSSes.
* Fix a dodgy comment.Gary E. Miller2015-04-061-4/+2
|
* Add client-library parsing of PPS precision.Eric S. Raymond2015-04-041-2/+2
| | | | Data is currently discarded, pending the next gps_data_t structure break.
* Add a JSON test for the PPS message.Gary E. Miller2015-04-021-0/+1
| | | | Still need a place for PPS precision.
* Add precision to the JSON decoder. Throw away the result.Gary E. Miller2015-04-011-0/+3
| | | | Next rev of gps_data_t->pps needs to add a field for precision.
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-47/+9
| | | | | | | | | | | | | | | | | | | 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.
* TOFF JSON message implemented and documented.Eric S. Raymond2015-02-231-0/+47
| | | | | | All regression tests pass. PPS observed live with gosmon. gpsmon presently ignores this message, but shout display its contents near PPS.
* Abolish all confusing uses of the word 'drift' for a time delta.Eric S. Raymond2015-02-231-6/+6
| | | | No logic changes. All regression tesrs pass. Live PPS observed.
* Avoid overexposure of an internal mask. EOF_SET -> EOF_ISEric S. Raymond2015-02-201-1/+1
| | | | | | | | 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.
* Fix improper timespec type casting.Gary E. Miller2015-02-021-4/+4
|
* In client library, "dip" member was missing from ATT parsing.Eric S. Raymond2015-01-241-0/+2
| | | | | | Should fix Savannah bug #43789: Dip and mag_x are not available in gps_data_t All regression test pass.
* Complete splint cleanup.Eric S. Raymond2015-01-211-0/+1
|
* Use str_starts_with instead of local macro.Zbigniew Chyla2015-01-211-15/+14
| | | | This change doesn't affect generated binary code.
* Last change to STARTSWITH was buggy. All regression tests pass.Eric S. Raymond2015-01-131-1/+1
|
* The STARTSWITH macro in libgps_json.c uses sizeof when it means strlen.Matt2015-01-081-1/+1
|