From aa006f20d82767f203f64a22b5c6921a431f3c8b Mon Sep 17 00:00:00 2001 From: Chris Kuethe Date: Thu, 17 Aug 2006 22:11:16 +0000 Subject: SiRF name cleanup. 1) the product line is called SiRFstar 2) I don't have any original SiRFstar receivers but my documentation says the protocol remained mostly the same between SS1, SS2 and SS3; it just got richer as time went by. At least with my SS2 and SS3 receivers, this holds true. 3) elsewhere in the code there are SIRF_THIS and SIRF_THAT, which implies (correctly) independence of chipset version. --- TODO | 2 +- configure.ac | 18 +++++++++--------- drivers.c | 34 +++++++++++++++++----------------- gpsd.h | 6 +++--- gpsd.spec.in | 6 +++--- gpsd.xml | 24 ++++++++++++------------ gpsfake.py | 2 +- gpsfake.xml | 2 +- gpsflash.c | 2 +- gpsprof.xml | 4 ++-- libgpsd_core.c | 10 +++++----- nmea_parse.c | 4 ++-- packet.c | 12 ++++++------ packet_states.h | 4 ++-- sirf.c | 10 +++++----- sirfflash.c | 4 ++-- 16 files changed, 72 insertions(+), 72 deletions(-) diff --git a/TODO b/TODO index 7eb3bc67..586032fc 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,7 @@ the hacking.html file in the www subdirectory or on the project website. There's a report that RoyalTek support broke between 2.25 and 2.28 by David Mandala . His workaround is to condition out -SiRF-II support; it works OK in NMEA mode. The Royaltek died in an +SiRF support; it works OK in NMEA mode. The Royaltek died in an accident, so we're stuck until someone else can test this. *** Axiom Sandpiper II OEM NMEA GPS Module gets mistaken for an FV-18 diff --git a/configure.ac b/configure.ac index 76c4f585..8f4816f2 100644 --- a/configure.ac +++ b/configure.ac @@ -137,15 +137,15 @@ else AC_MSG_RESULT([no]) fi -dnl check for SiRF-II support -AC_ARG_ENABLE(sirfII, - AC_HELP_STRING([--disable-sirfII], - [disable SiRF-II chipset support]), - [ac_sirfII=$enableval], [ac_sirfII=yes]) -AC_MSG_CHECKING([for SiRF-II support]) -if test x"$ac_sirfII" = "xyes"; then +dnl check for SiRF support +AC_ARG_ENABLE(sirf, + AC_HELP_STRING([--disable-sirf], + [disable SiRF chipset support]), + [ac_sirf=$enableval], [ac_sirf=yes]) +AC_MSG_CHECKING([for SiRF support]) +if test x"$ac_sirf" = "xyes"; then AC_MSG_RESULT([yes]) - AC_DEFINE([SIRFII_ENABLE], 1, [SiRF-II chipset support]) + AC_DEFINE([SIRF_ENABLE], 1, [SiRF chipset support]) else AC_MSG_RESULT([no]) fi @@ -456,7 +456,7 @@ echo "$PACKAGE $VERSION" echo "------------------------------------------" echo "NMEA : $ac_nmea" echo "FV-18 : $ac_fv18" -echo "SiRF-II : $ac_sirfII" +echo "SiRF : $ac_sirf" echo "Trimble TSIP : $ac_tsip" echo "Tripmate : $ac_tripmate" echo "Earthmate : $ac_earthmate" diff --git a/drivers.c b/drivers.c index 6b89b91d..15724deb 100644 --- a/drivers.c +++ b/drivers.c @@ -11,7 +11,7 @@ extern struct gps_type_t zodiac_binary; -#if defined(NMEA_ENABLE) || defined(SIRFII_ENABLE) || defined(EVERMORE_ENABLE) || defined(ITALK_ENABLE) +#if defined(NMEA_ENABLE) || defined(SIRF_ENABLE) || defined(EVERMORE_ENABLE) || defined(ITALK_ENABLE) ssize_t pass_rtcm(struct gps_device_t *session, char *buf, size_t rtcmbytes) /* most GPSes take their RTCM corrections straight up */ { @@ -30,11 +30,11 @@ gps_mask_t nmea_parse_input(struct gps_device_t *session) { if (session->packet_type == SIRF_PACKET) { gpsd_report(2, "SiRF packet seen when NMEA expected.\n"); -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE return sirf_parse(session, session->outbuffer, session->outbuflen); #else return 0; -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ } else if (session->packet_type == EVERMORE_PACKET) { gpsd_report(2, "EverMore packet seen when NMEA expected.\n"); #ifdef EVERMORE_ENABLE @@ -94,10 +94,10 @@ static void nmea_initializer(struct gps_device_t *session) /* probe for Garmin serial GPS */ (void)nmea_send(session->gpsdata.gps_fd, "$PGRMCE"); #endif /* NMEA_ENABLE */ -#ifdef SIRFII_ENABLE - /* probe for SiRF-II */ +#ifdef SIRF_ENABLE + /* probe for SiRF */ (void)nmea_send(session->gpsdata.gps_fd, "$PSRF105,1"); -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #ifdef ITRAX_ENABLE /* probe for iTrax, looking for "OK" */ (void)nmea_send(session->gpsdata.gps_fd, "$PFST"); @@ -188,7 +188,7 @@ static struct gps_type_t fv18 = { /************************************************************************** * - * SiRF-II NMEA + * SiRF NMEA * * This NMEA -mode driver is a fallback in case the SiRF chipset has * firmware too old for binary to be useful, or we're not compiling in @@ -213,7 +213,7 @@ static bool sirf_switcher(struct gps_device_t *session, int nmea, unsigned int s } static bool sirf_speed(struct gps_device_t *session, unsigned int speed) -/* change the baud rate, remaining in SiRF NMWA mode */ +/* change the baud rate, remaining in SiRF NMEA mode */ { return sirf_switcher(session, 1, speed); } @@ -222,19 +222,19 @@ static void sirf_mode(struct gps_device_t *session, int mode) /* change mode to SiRF binary, speed unchanged */ { if (mode == 1) { - (void)gpsd_switch_driver(session, "SiRF-II binary"); + (void)gpsd_switch_driver(session, "SiRF binary"); session->gpsdata.driver_mode = (unsigned int)sirf_switcher(session, 0, session->gpsdata.baudrate); } else session->gpsdata.driver_mode = 0; } -static struct gps_type_t sirfII_nmea = { - .typename = "SiRF-II NMEA", /* full name of type */ -#ifndef SIRFII_ENABLE +static struct gps_type_t sirf_nmea = { + .typename = "SiRF NMEA", /* full name of type */ +#ifndef SIRF_ENABLE .trigger = "$Ack Input105.", /* expected response to SiRF PSRF105 */ #else .trigger = NULL, /* let the binary driver have it */ -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ .channels = 12, /* consumer-grade GPS */ .probe = NULL, /* no probe */ .initializer = sirf_initializer, /* turn off debugging messages */ @@ -296,7 +296,7 @@ static struct gps_type_t tripmate = { * Zodiac EarthMate textual mode * * Note: This is the pre-2003 version using Zodiac binary protocol. - * It has been replaced with a design that uses a SiRF-II chipset. + * It has been replaced with a design that uses a SiRF chipset. * **************************************************************************/ @@ -494,7 +494,7 @@ extern struct gps_type_t evermore_binary, italk_binary, trueNorth; static struct gps_type_t *gpsd_driver_array[] = { #ifdef NMEA_ENABLE &nmea, - &sirfII_nmea, + &sirf_nmea, #if FV18_ENABLE &fv18, &garmin, @@ -515,9 +515,9 @@ static struct gps_type_t *gpsd_driver_array[] = { #if GARMIN_ENABLE &garmin_binary, #endif /* GARMIN_ENABLE */ -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE &sirf_binary, -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #ifdef TSIP_ENABLE &tsip_binary, #endif /* TSIP_ENABLE */ diff --git a/gpsd.h b/gpsd.h index d3e6f975..e04e237a 100644 --- a/gpsd.h +++ b/gpsd.h @@ -13,7 +13,7 @@ #ifdef EARTHMATE_ENABLE #define ZODIAC_ENABLE #endif -#if defined(ZODIAC_ENABLE) || defined(SIRFII_ENABLE) || defined(GARMIN_ENABLE) || defined(TSIP_ENABLE) || defined(EVERMORE_ENABLE) || defined(ITALK_ENABLE) +#if defined(ZODIAC_ENABLE) || defined(SIRF_ENABLE) || defined(GARMIN_ENABLE) || defined(TSIP_ENABLE) || defined(EVERMORE_ENABLE) || defined(ITALK_ENABLE) #define BINARY_ENABLE #endif #if defined(TRIPMATE_ENABLE) || defined(BINARY_ENABLE) @@ -168,7 +168,7 @@ struct gps_device_t { } nmea; #endif /* NMEA_ENABLE */ #ifdef BINARY_ENABLE -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE struct { unsigned int driverstate; /* for private use */ #define SIRF_LT_231 0x01 /* SiRF at firmware rev < 231 */ @@ -182,7 +182,7 @@ struct gps_device_t { #define TIME_SEEN_UTC_1 0x04 /* Seen UTC time variant 1? */ #define TIME_SEEN_UTC_2 0x08 /* Seen UTC time variant 2? */ } sirf; -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #ifdef TSIP_ENABLE struct { int16_t gps_week; /* Current GPS week number */ diff --git a/gpsd.spec.in b/gpsd.spec.in index 776ed140..364fe1cc 100644 --- a/gpsd.spec.in +++ b/gpsd.spec.in @@ -334,9 +334,9 @@ cp gps.py gpsfake.py "$RPM_BUILD_ROOT"%{_libdir}/python${PYVERSION}/site-package handling of units options in xgps and xgpsspeed. Bumped library major version, since seen_sentences is now exposed and drivers have more capabilities. Stricter NMEA buffer validation. Withdrew the - change that always passed up a timestamp; on SiRF-IIs, the year part - is garbage when the PVT fields are garbage. Can now recognize - SiRF-II GPSes. Experimental baud-switching support for Zodiac. + change that always passed up a timestamp; on SiRF receivers, the year + part is garbage when the PVT fields are garbage. Can now recognize + SiRF GPSes. Experimental baud-switching support for Zodiac. * Tue Feb 15 2005 Eric S. Raymond - 2.12-1 - Fixed core-dump bug in processing of the GLL variant that does not diff --git a/gpsd.xml b/gpsd.xml index 1b7cfd2d..be8fa300 100644 --- a/gpsd.xml +++ b/gpsd.xml @@ -52,16 +52,16 @@ protocol for it. that speaks either the standard textual NMEA 0183 protocol, or the binary Rockwell protocol used by EarthMate and some other GPSes, the TSIP binary protocol used by Trimble GPSes, or the binary SiRF -protocol used by SiRf-II and SiRF-Star chipsets, or the Garmin binary -protocol used by the USB version of the Garmin 18 and other Garmin USB -GPSes, or the binary protocol used by Evermore chipsets, or the -extended NMEA used by iTrax. gpsd -effectively hides the differences among these. It also knows about and -uses commands that tune the GPS for lower latency, decreased bandwidth -usage, or increased accuracy on the San Jose Navigation FV18, the Sony -CXD2951, the uBlox, and the Motorola OnCore GT+. It can read heading -and attitude information from the True North Technologies Revolution -2X Digital compass. +protocol used by SiRFstar chipsets, or the Garmin binary protocol used +by the USB version of the Garmin 18 and other Garmin USB GPSes, or the +binary protocol used by Evermore chipsets, or the extended NMEA used +by iTrax. gpsd effectively hides the +differences among these. It also knows about and uses commands that +tune the GPS for lower latency, decreased bandwidth usage, or +increased accuracy on the San Jose Navigation FV18, the Sony CXD2951, +the uBlox, and the Motorola OnCore GT+. It can read heading and +attitude information from the True North Technologies Revolution 2X +Digital compass. gpsd can use differential-GPS corrections from a DGPS radio or over the net, from a ground station @@ -556,7 +556,7 @@ support super-raw mode. u Current rate of climb as "U=%f" in meters per second. -Some GPSes (non-Sirf-II based) do not report this, in that case +Some GPSes (not SiRF-based) do not report this, in that case gpsd computes it using the altitude from the last fix (if available). @@ -814,7 +814,7 @@ remote refid st t when poll reach delay offset jitter When the value under "reach" remains zero, check that gpsd is running; and some application is connected to it or the '-n' option was used. Make sure the receiver is locked on to at least one satellite, -and the receiver is in SiRF-II, Garmin binary or NMEA/PPS mode. Plain +and the receiver is in SiRF binary, Garmin binary or NMEA/PPS mode. Plain NMEA will also drive ntpd, but the accuracy as bad as one second. When the SHM(0) line does not appear at all, check the system logs for error messages from ntpd. diff --git a/gpsfake.py b/gpsfake.py index 11bfd3c0..6b3864d1 100644 --- a/gpsfake.py +++ b/gpsfake.py @@ -126,7 +126,7 @@ class TestLoad: self.legend = "gpsfake: packet %d" self.textual = True elif self.sentences[0][0] == '\xa0': - self.packtype = "SiRF-II binary" + self.packtype = "SiRF binary" self.legend = "gpsfake: packet %d" self.textual = False elif self.type == "RTCM": diff --git a/gpsfake.xml b/gpsfake.xml index 2eee2d48..189edd6d 100644 --- a/gpsfake.xml +++ b/gpsfake.xml @@ -47,7 +47,7 @@ GPS. privileges, and can be run concurrently with a production gpsd instance without causing problems. -The logfile may be of NMEA, SiRF-II packets, or Zodiac packets. +The logfile may be of NMEA, SiRF packets, or Zodiac packets. Leading lines beginning with # will be treated as comments and ignored. diff --git a/gpsflash.c b/gpsflash.c index c436d6e2..f5e35cc9 100644 --- a/gpsflash.c +++ b/gpsflash.c @@ -287,7 +287,7 @@ expect(int pfd, const char *str, size_t len, time_t timeout) } -#if defined(SIRFII_ENABLE) && defined(BINARY_ENABLE) +#if defined(SIRF_ENABLE) && defined(BINARY_ENABLE) /* add new types by adding pointers to their driver blocks to this list */ /*@ -nullassign @*/ static struct flashloader_t *types[] = {&sirf_type, NULL}; diff --git a/gpsprof.xml b/gpsprof.xml index 05285268..061d1f7f 100644 --- a/gpsprof.xml +++ b/gpsprof.xml @@ -146,8 +146,8 @@ multiples of the cycle time, above which reports are discarded. is 100. The -s option sets the baud rate. Note, this will only work if -the chipset accepts a speed-change command (SiRF-II supports this -feature). +the chipset accepts a speed-change command (SiRFstarII and SiRFstarIII +support this feature). The -t option sets a text string to be included in the plot title. diff --git a/libgpsd_core.c b/libgpsd_core.c index fee8dbd5..3a0b1e0e 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -164,9 +164,9 @@ int gpsd_activate(struct gps_device_t *session) return -1; else { session->gpsdata.online = timestamp(); -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE session->driver.sirf.satcounter = 0; -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ session->char_counter = 0; session->retry_counter = 0; gpsd_report(1, "gpsd_activate: opened GPS (%d)\n", session->gpsdata.gps_fd); @@ -508,11 +508,11 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) session->packet_type); if (session->packet_type != BAD_PACKET) { switch (session->packet_type) { -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE case SIRF_PACKET: - (void)gpsd_switch_driver(session, "SiRF-II binary"); + (void)gpsd_switch_driver(session, "SiRF binary"); break; -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #ifdef TSIP_ENABLE case TSIP_PACKET: (void)gpsd_switch_driver(session, "Trimble TSIP"); diff --git a/nmea_parse.c b/nmea_parse.c index 696b8361..509fc682 100644 --- a/nmea_parse.c +++ b/nmea_parse.c @@ -328,7 +328,7 @@ static gps_mask_t processGPGSA(int count, char *field[], struct gps_device_t *se * this: "$GPGSA,A,1,,,,*32" when it has no fix. This is broken * in at least two ways: it's got the wrong number of fields, and * it claims to be a valid sentence (A flag) when it isn't. - * Alarmingly, it's possible this error may be generic to SiRF-IIIs. + * Alarmingly, it's possible this error may be generic to SiRFstarIII. */ if (count < 17) return ONLINE_SET; @@ -415,7 +415,7 @@ static gps_mask_t processGPGSV(int count, char *field[], struct gps_device_t *se return ERROR_SET; } /* - * This sanity check catches an odd behavior of SiRF-II based GPSes. + * This sanity check catches an odd behavior of SiRFstarII receivers. * When they can't see any satellites at all (like, inside a * building) they sometimes cough up a hairball in the form of a * GSV packet with all the azimuth entries 0 (but nonzero diff --git a/packet.c b/packet.c index 41e32848..2d64a9c2 100644 --- a/packet.c +++ b/packet.c @@ -87,12 +87,12 @@ static void nextstate(struct gps_device_t *session, unsigned char c) break; } #endif -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE if (c == 0xa0) { session->packet_state = SIRF_LEADER_1; break; } -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #if defined(TSIP_ENABLE) || defined(EVERMORE_ENABLE) if (c == 0x10) { session->packet_state = DLE_LEADER; @@ -298,7 +298,7 @@ static void nextstate(struct gps_device_t *session, unsigned char c) session->packet_state = GROUND_STATE; break; #endif /* NMEA_ENABLE */ -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE case SIRF_LEADER_1: if (c == 0xa2) session->packet_state = SIRF_LEADER_2; @@ -338,7 +338,7 @@ static void nextstate(struct gps_device_t *session, unsigned char c) else session->packet_state = GROUND_STATE; break; -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #if defined(TSIP_ENABLE) || defined(EVERMORE_ENABLE) case DLE_LEADER: #ifdef EVERMORE_ENABLE @@ -663,7 +663,7 @@ ssize_t packet_parse(struct gps_device_t *session, size_t newdata) packet_discard(session); break; #endif /* NMEA_ENABLE */ -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE } else if (session->packet_state == SIRF_RECOGNIZED) { unsigned char *trailer = session->inbufptr-4; unsigned int checksum = (unsigned)((trailer[0] << 8) | trailer[1]); @@ -677,7 +677,7 @@ ssize_t packet_parse(struct gps_device_t *session, size_t newdata) session->packet_state = GROUND_STATE; packet_discard(session); break; -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #ifdef TSIP_ENABLE } else if (session->packet_state == TSIP_RECOGNIZED) { if ((session->inbufptr - session->inbuffer) >= 4) diff --git a/packet_states.h b/packet_states.h index 7b2d8519..713a15a7 100644 --- a/packet_states.h +++ b/packet_states.h @@ -31,7 +31,7 @@ EARTHA_5, /* EARTHA leader H */ #endif /* EARTHMATE_ENABLE */ -#ifdef SIRFII_ENABLE +#ifdef SIRF_ENABLE SIRF_LEADER_1, /* we've seen first character of SiRF leader */ SIRF_LEADER_2, /* seen second character of SiRF leader */ SIRF_LENGTH_1, /* seen first byte of SiRF length */ @@ -39,7 +39,7 @@ SIRF_DELIVERED, /* saw last byte of SiRF payload/checksum */ SIRF_TRAILER_1, /* saw first byte of SiRF trailer */ SIRF_RECOGNIZED, /* saw second byte of SiRF trailer */ -#endif /* SIRFII_ENABLE */ +#endif /* SIRF_ENABLE */ #ifdef ZODIAC_ENABLE ZODIAC_EXPECTED, /* expecting Zodiac packet */ diff --git a/sirf.c b/sirf.c index 08c5a45a..9cc6928c 100644 --- a/sirf.c +++ b/sirf.c @@ -1,5 +1,5 @@ /* - * This is the gpsd driver for SiRF-II GPSes operating in binary mode. + * This is the gpsd driver for SiRF GPSes operating in binary mode. * It also handles uBlox, a SiRF derivative. * * The advantage: Reports climb/sink rate (raw-mode clients won't see this). @@ -36,7 +36,7 @@ #include "gpsd.h" #include "bits.h" -#if defined(SIRFII_ENABLE) && defined(BINARY_ENABLE) +#if defined(SIRF_ENABLE) && defined(BINARY_ENABLE) #define HI(n) ((n) >> 8) #define LO(n) ((n) & 0xff) @@ -114,7 +114,7 @@ static bool sirf_to_nmea(int ttyfd, speed_t speed) static void sirfbin_mode(struct gps_device_t *session, int mode) { if (mode == 0) { - (void)gpsd_switch_driver(session, "SiRF-II NMEA"); + (void)gpsd_switch_driver(session, "SiRF NMEA"); (void)sirf_to_nmea(session->gpsdata.gps_fd,session->gpsdata.baudrate); session->gpsdata.driver_mode = 0; } @@ -716,7 +716,7 @@ static bool sirfbin_speed(struct gps_device_t *session, speed_t speed) /* this is everything we export */ struct gps_type_t sirf_binary = { - .typename = "SiRF-II binary", /* full name of type */ + .typename = "SiRF binary", /* full name of type */ .trigger = "$Ack Input105.", /* expected response to SiRF PSRF105 */ .channels = SIRF_CHANNELS, /* consumer-grade GPS */ .probe = NULL, /* no probe */ @@ -731,4 +731,4 @@ struct gps_type_t sirf_binary = .wrapup = NULL, /* no close hook */ .cycle = 1, /* updates every second */ }; -#endif /* defined(SIRFII_ENABLE) && defined(BINARY_ENABLE) */ +#endif /* defined(SIRF_ENABLE) && defined(BINARY_ENABLE) */ diff --git a/sirfflash.c b/sirfflash.c index cc815ff2..21837f8c 100644 --- a/sirfflash.c +++ b/sirfflash.c @@ -49,7 +49,7 @@ #include "gpsd.h" #include "gpsflash.h" -#if defined(SIRFII_ENABLE) && defined(BINARY_ENABLE) +#if defined(SIRF_ENABLE) && defined(BINARY_ENABLE) /* From the SiRF protocol manual... may as well be consistent */ #define PROTO_SIRF 0 @@ -288,4 +288,4 @@ struct flashloader_t sirf_type = { .stage3_command = wait5seconds, .port_wrapup = sirfPortWrapup, /* after signals unblock */ }; -#endif /* defined(SIRFII_ENABLE) && defined(BINARY_ENABLE) */ +#endif /* defined(SIRF_ENABLE) && defined(BINARY_ENABLE) */ -- cgit v1.2.1