summaryrefslogtreecommitdiff
path: root/subframe.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-27 20:26:01 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-27 20:26:56 -0400
commit068a90a92337d8476a69ed0048723e7587f6209f (patch)
treefdf92a4fad19701d7469d827feeb4ae5b51c4fb2 /subframe.c
parent7b0feb181260ff4e005547a3ae870ebc545b1e85 (diff)
downloadgpsd-068a90a92337d8476a69ed0048723e7587f6209f.tar.gz
Now that the transition is done we can restore the gpsd_report name.
All regression tests pass.
Diffstat (limited to 'subframe.c')
-rw-r--r--subframe.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/subframe.c b/subframe.c
index 416deb48..802bfce6 100644
--- a/subframe.c
+++ b/subframe.c
@@ -22,7 +22,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session,
speed_t speed = gpsd_get_speed(session);
if (speed < 38400)
- gpsd_notify(&session->context->errout, LOG_WARN,
+ gpsd_report(&session->context->errout, LOG_WARN,
"speed less than 38,400 may cause data lag and loss of functionality\n");
}
@@ -44,7 +44,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session,
* word is inverted.
*
*/
- gpsd_notify(&session->context->errout, LOG_DATA,
+ gpsd_report(&session->context->errout, LOG_DATA,
"50B: gpsd_interpret_subframe_raw: "
"%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
words[0], words[1], words[2], words[3], words[4],
@@ -55,7 +55,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session,
words[0] ^= 0x3fffffc0; /* invert */
} else if (preamble != 0x74) {
/* strangely this is very common, so don't log it */
- gpsd_notify(&session->context->errout, LOG_DATA,
+ gpsd_report(&session->context->errout, LOG_DATA,
"50B: gpsd_interpret_subframe_raw: bad preamble 0x%x\n",
preamble);
return 0;
@@ -72,7 +72,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session,
}
parity = (uint32_t)isgps_parity((isgps30bits_t)words[i]);
if (parity != (words[i] & 0x3f)) {
- gpsd_notify(&session->context->errout, LOG_DATA,
+ gpsd_report(&session->context->errout, LOG_DATA,
"50B: gpsd_interpret_subframe_raw parity fail words[%d] 0x%x != 0x%x\n",
i, parity, (words[i] & 0x1));
return 0;
@@ -86,7 +86,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session,
/* you can find up to date almanac data for comparision here:
* https://gps.afspc.af.mil/gps/Current/current.alm
*/
-static void subframe_almanac(const struct errout_t *errout,
+static void subframe_almanac(const struct gpsd_errout_t *errout,
uint8_t tSVID, uint32_t words[],
uint8_t subframe, uint8_t sv,
uint8_t data_id,
@@ -126,7 +126,7 @@ static void subframe_almanac(const struct errout_t *errout,
almp->af0 |= ((words[9] >> 2) & 0x000007);
almp->af0 = (short)uint2int(almp->af0, 11);
almp->d_af0 = pow(2.0,-20) * almp->af0;
- gpsd_notify(errout, LOG_PROG,
+ gpsd_report(errout, LOG_PROG,
"50B: SF:%d SV:%2u TSV:%2u data_id %d e:%g toa:%lu "
"deltai:%.10e Omegad:%.5e svh:%u sqrtA:%.10g Omega0:%.10e "
"omega:%.10e M0:%.11e af0:%.5e af1:%.5e\n",
@@ -164,7 +164,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
/* FIXME!! I really doubt this is Big Endian compatible */
uint8_t preamble;
struct subframe_t *subp = &session->gpsdata.subframe;
- gpsd_notify(&session->context->errout, LOG_DATA,
+ gpsd_report(&session->context->errout, LOG_DATA,
"50B: gpsd_interpret_subframe: (%d) "
"%06x %06x %06x %06x %06x %06x %06x %06x %06x %06x\n",
tSVID, words[0], words[1], words[2], words[3], words[4],
@@ -177,7 +177,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
words[0] ^= 0xffffff;
}
if (preamble != 0x74) {
- gpsd_notify(&session->context->errout, LOG_WARN,
+ gpsd_report(&session->context->errout, LOG_WARN,
"50B: gpsd_interpret_subframe bad preamble: 0x%x header 0x%x\n",
preamble, words[0]);
return 0;
@@ -190,7 +190,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->subframe_num = ((words[1] >> 2) & 0x07);
subp->alert = (bool)((words[1] >> 6) & 0x01);
subp->antispoof = (bool)((words[1] >> 6) & 0x01);
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:%d SV:%2u TOW17:%7lu Alert:%u AS:%u IF:%d\n",
subp->subframe_num, subp->tSVID, subp->l_TOW17,
(unsigned)subp->alert, (unsigned)subp->antispoof,
@@ -234,7 +234,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub1.d_af0 = pow(2.0, -31) * subp->sub1.af0;
subp->sub1.IODC <<= 8;
subp->sub1.IODC |= ((words[7] >> 16) & 0x00FF);
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:1 SV:%2u WN:%4u IODC:%4u"
" L2:%u ura:%u hlth:%u L2P:%u Tgd:%g toc:%lu af2:%.4g"
" af1:%.6e af0:%.7e\n",
@@ -279,7 +279,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub2.fit = ((words[9] >> 7) & 0x000001);
subp->sub2.AODO = ((words[9] >> 2) & 0x00001F);
subp->sub2.u_AODO = subp->sub2.AODO * 900;
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:2 SV:%2u IODE:%3u Crs:%.6e deltan:%.6e "
"M0:%.11e Cuc:%.6e e:%f Cus:%.6e sqrtA:%.11g "
"toe:%lu FIT:%u AODO:%5u\n",
@@ -323,7 +323,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub3.IDOT = (int16_t)((words[9] >> 2) & 0x003FFF);
subp->sub3.IDOT = uint2int(subp->sub3.IDOT, 14);
subp->sub3.d_IDOT = pow(2.0, -43) * subp->sub3.IDOT;
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:3 SV:%2u IODE:%3u I IDOT:%.6g Cic:%.6e Omega0:%.11e "
" Cis:%.7g i0:%.11e Crc:%.7g omega:%.11e Omegad:%.6e\n",
subp->tSVID, subp->sub3.IODE, subp->sub3.d_IDOT,
@@ -477,7 +477,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
}
/*@-charint@*/
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:4-13 data_id %d ai:%u "
"ERD1:%d ERD2:%d ERD3:%d ERD4:%d "
"ERD5:%d ERD6:%d ERD7:%d ERD8:%d "
@@ -556,7 +556,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub4_25.svhx[6] = ((words[9] >> 12) & 0x00003F);
subp->sub4_25.svhx[7] = ((words[9] >> 6) & 0x00003F);
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:4-25 data_id %d "
"SV1:%u SV2:%u SV3:%u SV4:%u "
"SV5:%u SV6:%u SV7:%u SV8:%u "
@@ -663,7 +663,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub4_17.str[i++] = (words[9] >> 8) & 0xff;
subp->sub4_17.str[i] = '\0';
/*@ +type @*/
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:4-17 system message: %.24s\n",
subp->sub4_17.str);
break;
@@ -714,7 +714,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
/* leap second future */
subp->sub4_18.lsf = (int8_t)((words[9] >> 16) & 0x0000FF);
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:4-18 a0:%.5g a1:%.5g a2:%.5g a3:%.5g "
"b0:%.5g b1:%.5g b2:%.5g b3:%.5g "
"A1:%.11e A0:%.11e tot:%.5g WNt:%u "
@@ -758,7 +758,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
&subp->sub4.almanac);
} else if ( -2 == sv ) {
/* unknown or secret page */
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:4-%d data_id %d\n",
subp->pageid, subp->data_id);
return 0;
@@ -808,7 +808,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub5_25.sv[22] = ((words[7] >> 12) & 0x00003F);
subp->sub5_25.sv[23] = ((words[7] >> 6) & 0x00003F);
subp->sub5_25.sv[24] = ((words[7] >> 0) & 0x00003F);
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:5-25 SV:%2u ID:%u toa:%lu WNa:%u "
"SV1:%u SV2:%u SV3:%u SV4:%u "
"SV5:%u SV6:%u SV7:%u SV8:%u "
@@ -832,7 +832,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub5_25.sv[23], subp->sub5_25.sv[24]);
} else {
/* unknown page */
- gpsd_notify(&session->context->errout, LOG_PROG,
+ gpsd_report(&session->context->errout, LOG_PROG,
"50B: SF:5-%d data_id %d uknown page\n",
subp->pageid, subp->data_id);
return 0;