summaryrefslogtreecommitdiff
path: root/subframe.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2011-01-04 19:39:38 -0800
committerGary E. Miller <gem@rellim.com>2011-01-04 19:39:38 -0800
commit27d9f07b01de6c3661713c3d6c8ee4b1e2c49125 (patch)
treee057139a65c42f8caf9e21a5eadf124a59bc424c /subframe.c
parent866b24778872a4f1e33789905bf50d1b83fa68d0 (diff)
downloadgpsd-27d9f07b01de6c3661713c3d6c8ee4b1e2c49125.tar.gz
Dump subframe 4 almanac to JSON too.
Diffstat (limited to 'subframe.c')
-rw-r--r--subframe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/subframe.c b/subframe.c
index f0a6e886..3be97b98 100644
--- a/subframe.c
+++ b/subframe.c
@@ -190,6 +190,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
*/
subp->pageid = (words[2] >> 16) & 0x00003F; /* only in frames 4 & 5 */
subp->data_id = (words[2] >> 22) & 0x3; /* only in frames 4 & 5 */
+ subp->is_almanac = 0;
switch (subp->subframe_num) {
case 1:
@@ -736,6 +737,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
; /* no op */
}
if ( -1 < sv ) {
+ subp->is_almanac = 1;
subframe_almanac(subp->tSVID, words, subp->subframe_num,
sv, subp->data_id, &subp->sub4.almanac);
} else if ( -2 == sv ) {
@@ -753,6 +755,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
* reference time, the almanac reference week number.
*/
if ( 25 > subp->pageid ) {
+ subp->is_almanac = 1;
subframe_almanac(subp->tSVID, words, subp->subframe_num,
subp->pageid, subp->data_id, &subp->sub5.almanac);
} else if ( 51 == subp->pageid ) {