diff options
-rw-r--r-- | gps.h | 4 | ||||
-rw-r--r-- | gpsd_json.c | 10 | ||||
-rwxr-xr-x | gpsprof | 8 | ||||
-rw-r--r-- | libgpsd_core.c | 8 |
4 files changed, 15 insertions, 15 deletions
@@ -1690,8 +1690,8 @@ struct gps_data_t { char tag[MAXTAGLEN+1]; /* tag of last sentence processed */ #ifdef TIMING_ENABLE - timestamp_t cycle_start; /* timestamp start of this reporting cycle */ - unsigned long cycle_count; /* characters in the cycle */ + timestamp_t sor; /* timestamp start of this reporting cycle */ + unsigned long chars; /* characters in the cycle */ #endif /* TIMING_ENABLE */ /* pack things never reported together to reduce structure size */ diff --git a/gpsd_json.c b/gpsd_json.c index 17ed36c9..f3311d06 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -126,7 +126,7 @@ void json_tpv_dump(const struct gps_data_t *gpsdata, { char tbuf[JSON_DATE_MAX+1]; #ifdef TIMING_ENABLE - timestamp_t xmit_time = timestamp(); + timestamp_t rtime = timestamp(); #endif /* TIMING_ENABLE */ assert(replylen > 2); @@ -214,11 +214,11 @@ void json_tpv_dump(const struct gps_data_t *gpsdata, if (policy->timing) (void)snprintf(reply + strlen(reply), replylen - strlen(reply), - "\"cycle_start\":%f,\"cycle_count\":%lu,\"sats\":%2d,\"xmit_time\":%f,", - gpsdata->cycle_start, - gpsdata->cycle_count, + "\"sor\":%f,\"chars\":%lu,\"sats\":%2d,\"rtime\":%f,", + gpsdata->sor, + gpsdata->chars, gpsdata->satellites_used, - xmit_time); + rtime); #endif /* TIMING_ENABLE */ } if (reply[strlen(reply) - 1] == ',') @@ -257,13 +257,13 @@ class instrumented(plotter): def __init__(self): plotter.__init__(self) def sample(self): - if 'xmit_time' in self.session.data: + if 'rtime' in self.session.data: self.fixes.append((self.session.data['tag'], gps.misc.isotime(self.session.data['time']), - self.session.data["cycle_count"], + self.session.data["chars"], self.session.data['sats'], - self.session.data['cycle_start'], - self.session.data['xmit_time'], + self.session.data['sor'], + self.session.data['rtime'], time.time())) return True def header(self): diff --git a/libgpsd_core.c b/libgpsd_core.c index 5146a135..4fe943af 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -144,8 +144,8 @@ void gpsd_init(struct gps_device_t *session, struct gps_context_t *context, session->mag_var = NAN; session->gpsdata.dev.cycle = session->gpsdata.dev.mincycle = 1; #ifdef TIMING_ENABLE - session->gpsdata.cycle_start = 0.0; - session->gpsdata.cycle_count = 0; + session->gpsdata.sor = 0.0; + session->gpsdata.chars = 0; #endif /* TIMING_ENABLE */ /* tty-level initialization */ @@ -866,7 +866,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) gpsd_report(LOG_WARN, "cycle-start detector failed.\n"); else if (gap > quiet_time) { gpsd_report(LOG_PROG, "transmission pause of %f\n", gap); - session->gpsdata.cycle_start = now; + session->gpsdata.sor = now; session->packet.start_char = session->packet.char_counter; } } @@ -1005,7 +1005,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) #ifdef TIMING_ENABLE /* are we going to generate a report? if so, count characters */ if ((received & REPORT_IS) != 0) { - session->gpsdata.cycle_count = session->packet.char_counter - session->packet.start_char; + session->gpsdata.chars = session->packet.char_counter - session->packet.start_char; } #endif /* TIMING_ENABLE */ |