summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bits.c2
-rw-r--r--driver_evermore.c32
-rw-r--r--driver_garmin.c20
-rw-r--r--driver_nmea.c30
-rw-r--r--driver_sirf.c28
-rw-r--r--drivers.c10
-rw-r--r--gpsd.c22
-rw-r--r--gpsd_json.c6
8 files changed, 75 insertions, 75 deletions
diff --git a/bits.c b/bits.c
index 4e5299a6..ba546f9d 100644
--- a/bits.c
+++ b/bits.c
@@ -1,5 +1,5 @@
/* bits.c - bitfield extraction code
- *
+ *
* This file is Copyright (c)2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
*
diff --git a/driver_evermore.c b/driver_evermore.c
index 37256087..39706faa 100644
--- a/driver_evermore.c
+++ b/driver_evermore.c
@@ -6,7 +6,7 @@
*
* The vendor site is <http://www.emt.com.tw>.
*
- * This driver was written by Petr Slansky based on a framework by Eric S.
+ * This driver was written by Petr Slansky based on a framework by Eric S.
* Raymond. The following remarks are by Petr Slansky.
*
* Snooping on the serial the communication between a Windows program and
@@ -25,7 +25,7 @@
* 10 02 06 8D 00 D8 00 65 10 03 switch to datum ID 217 (WGS-72)
*
* These don't entail a reset of GPS as the 0x80 message does.
- *
+ *
* 10 02 04 38 85 bd 10 03 answer from GPS to 0x85 message; ACK message
* 10 02 04 38 8d c5 10 03 answer from GPS to 0x8d message; ACK message
* 10 02 04 38 8e c6 10 03 answer from GPS to 0x8e message; ACK message
@@ -54,7 +54,7 @@
* 2 clock hold only (2 sat)
* 3 direction hold then clock hold (1 sat)
* 4 clock hold then direction hold (1 sat)
- *
+ *
* Message $PEMT,100 could be forced with message 0x85 (restart):
* 10 02 12 85 00 00 00 00 00 01 01 00 00 00 00 00 00 00 00 87 10 03
* 0x85 ID, Restart
@@ -70,18 +70,18 @@
* 0x0000 Longtitude WGS-84 (+/-1800, 1/10 degree, + for E, int16)
* 0x0000 Altitude WGS-84 (-1000..+18000, meters, int16)
* 0x87 CRC
- *
+ *
* With message 0x8e it is possible to define how often each NMEA
* message is sent (0-255 seconds). It is possible with message 0x8e
* to activate PEMT,101 messages that have information about time,
* position, velocity and HDOP.
- *
+ *
* $PEMT,101,1,02,00.0,300906190446,5002.5062,N,01427.6166,E,00259,000,0000*27
* $PEMT,101,2,06,02.1,300906185730,5002.7546,N,01426.9524,E,00323,020,0011*26
* 101 - message type, Compact Navigation Solution
* 2 - position status (1,2,3,4,5,6)
* (1 invalid, 2 2D fix, 3 3D fix, 4 2D with DIFF, 5 3D with DIFF,
- * 6 2/1 sat degrade mode)
+ * 6 2/1 sat degrade mode)
* 06 - number of used satelites
* 02.1 - DOP (00.0 no fix, HDOP 2D fix, PDOP 3D fix)
* 300906185730 - date and time, UTC ddmmyyHHMMSS (30/09/2006 18:57:30)
@@ -90,11 +90,11 @@
* 00323 - Altitude (323 metres)
* 020 - heading (20 degrees from true north)
* 0011 - speed over ground (11 metres per second); documentation says km per h
- *
- * This is an exampe of an 0x8e message that activates all NMEA sentences
+ *
+ * This is an exampe of an 0x8e message that activates all NMEA sentences
* with 1s period:
* 10 02 12 8E 7F 01 01 01 01 01 01 01 01 00 00 00 00 00 00 15 10 03
- *
+ *
* There is a way to probe for this chipset. When binary message 0x81 is sent:
* 10 02 04 81 13 94 10 03
*
@@ -103,7 +103,7 @@
* bytes marked with * are fixed
* Message in reply is information about logging configuration of GPS
*
- * Another way to detect the EverMore chipset is to send one of the messages
+ * Another way to detect the EverMore chipset is to send one of the messages
* 0x85, 0x8d, 0x8e or 0x8f and check for a reply.
* The reply message from an EverMore GPS will look like this:
* *10 *02 *04 *38 8d c5 *10 *03
@@ -111,7 +111,7 @@
* c5 is EverMore checksum, other bytes are fixed
*
* This file is Copyright (c) 2010 by the GPSD project
- * BSD terms apply: see the file COPYING in the distribution root for details.
+ * BSD terms apply: see the file COPYING in the distribution root for details.
*/
#include <sys/types.h>
@@ -341,17 +341,17 @@ gps_mask_t evermore_parse(struct gps_device_t * session, unsigned char *buf,
session->context->leap_seconds;
/*@ end @*/
visible = (unsigned char)getub(buf2, 10);
- /*
+ /*
* Note: This code is untested. It was written from the manual.
* The results need to be sanity-checked against a GPS with
* known-good raw decoding and the same skyview.
*
- * We can get pseudo range (m), delta-range (m/s), doppler (Hz)
+ * We can get pseudo range (m), delta-range (m/s), doppler (Hz)
* and status for each channel from the chip. We cannot get
* codephase or carrierphase.
*/
-#define SBITS(sat, s, l) sbits((char *)buf, 10 + (sat*14) + s, l)
-#define UBITS(sat, s, l) ubits((char *)buf, 10 + (sat*14) + s, l)
+#define SBITS(sat, s, l) sbits((char *)buf, 10 + (sat*14) + s, l)
+#define UBITS(sat, s, l) ubits((char *)buf, 10 + (sat*14) + s, l)
for (k = 0; k < visible; k++) {
int prn = (int)UBITS(k, 4, 5);
/* this is so we can tell which never got set */
@@ -373,7 +373,7 @@ gps_mask_t evermore_parse(struct gps_device_t * session, unsigned char *buf,
#undef UBITS
gpsd_report(LOG_DATA, "MDO 0x04: time=%.2f mask={TIME|RAW}\n",
session->newdata.time);
- return TIME_IS|RAW_IS;
+ return TIME_IS | RAW_IS;
case 0x20: /* LogConfig Info, could be used as a probe for EverMore GPS */
gpsd_report(LOG_IO, "LogConfig EverMore packet, length %zd: %s\n",
diff --git a/driver_garmin.c b/driver_garmin.c
index 7735ae9f..6071b507 100644
--- a/driver_garmin.c
+++ b/driver_garmin.c
@@ -12,12 +12,12 @@
* serial port. These receivers provide adequate NMEA support, so it
* often makes sense to just put them into NMEA mode.
*
- * On Linux, USB Garmins (091e:0003) need the Linux garmin_gps driver and
- * will not function without it. On other operating systems, it is clear
- * garmin_usb_binary_old does not work since it requires the Linux
+ * On Linux, USB Garmins (091e:0003) need the Linux garmin_gps driver and
+ * will not function without it. On other operating systems, it is clear
+ * garmin_usb_binary_old does not work since it requires the Linux
* garmin_gps module.
*
- * This code has been tested and at least at one time is known to work on
+ * This code has been tested and at least at one time is known to work on
* big- and little-endian CPUs and 32 and 64 bit cpu modes.
*
*
@@ -30,7 +30,7 @@
* An older version of iop_spec.pdf that describes only Serial Binary
* is available at:
* http://vancouver-webpages.com/pub/peter/iop_spec.pdf
- * Information about the GPS 18
+ * Information about the GPS 18
* http://www.garmin.com/manuals/425_TechnicalSpecification.pdf
*
* There is one physical link protocol for serial which uses DLE/ETX
@@ -810,11 +810,11 @@ static void Build_Send_SER_Packet(struct gps_device_t *session,
/*
* is_usb_device() - is a specified device USB matching given vendor/product?
*
- * BUG: Doesn't actually match against path yet. Must finish this function
+ * BUG: Doesn't actually match against path yet. Must finish this function
* by querying /sys/dev/char, either directly or using libudev. Greg KH
* assures this is possible, though he is vague about how.
*
- * libudev: http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/
+ * libudev: http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/
*/
/*@-compdef -usedef@*/
static bool is_usb_device(const char *path UNUSED, int vendor, int product)
@@ -871,20 +871,20 @@ static bool is_usb_device(const char *path UNUSED, int vendor, int product)
#endif /* HAVE_LIBUSB || S_SPLINT_S */
/*
- * garmin_usb_detect() - detect a Garmin USB device connected to ession fd.
+ * garmin_usb_detect() - detect a Garmin USB device connected to ession fd.
*
* This is ONLY for USB devices reporting as: 091e:0003.
*
* This driver ONLY works in Linux and ONLY when the the garmin_gps kernel
* module is installed.
*
- * This is only necessary because under Linux Garmin USB devices need a
+ * This is only necessary because under Linux Garmin USB devices need a
* kernel module rather than being normal USB-serial devices.
*
* The actual wire protocol from the Garmin device is very strange. There
* are no delimiters. End of packet is signaled by a zero-length read
* on the USB device, and start of packet is the next read. You can't just
- * ignore the zero reads and pass the data through - you'd never be able
+ * ignore the zero reads and pass the data through - you'd never be able
* to tell where the packet boundaries are.
*
* The garmin_usb module's job is to grab the packet and frame it in
diff --git a/driver_nmea.c b/driver_nmea.c
index 356f9d30..870b4858 100644
--- a/driver_nmea.c
+++ b/driver_nmea.c
@@ -140,7 +140,7 @@ static gps_mask_t processGPRMC(int count, char *field[],
/*
* RMC,225446.33,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E,A*68
* 1 225446.33 Time of fix 22:54:46 UTC
- * 2 A Status of Fix: A = Autonomous, valid;
+ * 2 A Status of Fix: A = Autonomous, valid;
* D = Differential, valid; V = invalid
* 3,4 4916.45,N Latitude 49 deg. 16.45 min North
* 5,6 12311.12,W Longitude 123 deg. 11.12 min West
@@ -152,7 +152,7 @@ static gps_mask_t processGPRMC(int count, char *field[],
* A=autonomous, D=differential, E=Estimated,
* N=not valid, S=Simulator, M=Manual input mode
* *68 mandatory nmea_checksum
- *
+ *
* * SiRF chipsets don't return either Mode Indicator or magnetic variation.
*/
gps_mask_t mask = 0;
@@ -220,16 +220,16 @@ static gps_mask_t processGPGLL(int count, char *field[],
/* Geographic position - Latitude, Longitude */
{
/* Introduced in NMEA 3.0.
- *
+ *
* $GPGLL,4916.45,N,12311.12,W,225444,A,A*5C
- *
+ *
* 1,2: 4916.46,N Latitude 49 deg. 16.45 min. North
* 3,4: 12311.12,W Longitude 123 deg. 11.12 min. West
* 5: 225444 Fix taken at 22:54:44 UTC
* 6: A Data valid
* 7: A Autonomous mode
* 8: *5C Mandatory NMEA checksum
- *
+ *
* 1,2 Latitude, N (North) or S (South)
* 3,4 Longitude, E (East) or W (West)
* 5 UTC of position
@@ -241,12 +241,12 @@ static gps_mask_t processGPGLL(int count, char *field[],
* M = Manual Input Mode
* S = Simulated Mode
* N = Data Not Valid
- *
+ *
* I found a note at <http://www.secoh.ru/windows/gps/nmfqexep.txt>
* indicating that the Garmin 65 does not return time and status.
* SiRF chipsets don't return the Mode Indicator.
* This code copes gracefully with both quirks.
- *
+ *
* Unless you care about the FAA indicator, this sentence supplies nothing
* that GPRMC doesn't already. But at least one Garmin GPS -- the 48
* actually ships updates in GPLL that aren't redundant.
@@ -638,10 +638,10 @@ static gps_mask_t processGPZDA(int c UNUSED, char *field[],
* 5) Local zone description, 00 to +- 13 hours
* 6) Local zone minutes description, apply same sign as local hours
* 7) Checksum
- *
+ *
* Note: some devices, like the uBlox ANTARIS 4h, are known to ship ZDAs
* with some fields blank under poorly-understood circumstances (probably
- * when they don't have satellite lock yet).
+ * when they don't have satellite lock yet).
*/
gps_mask_t mask;
@@ -744,7 +744,7 @@ static gps_mask_t processOHPR(int c UNUSED, char *field[],
1. Azimuth
2. Pitch Angle
3. Roll Angle
- 4. Sensor temp, degrees centigrade
+ 4. Sensor temp, degrees centigrade
5. Depth (feet)
6. Magnetic Vector Length
7-9. 3 axis Magnetic Field readings x,y,z
@@ -893,10 +893,10 @@ gps_mask_t nmea_parse(char *sentence, struct gps_device_t * session)
*
* 1. A Garmin GPS in NMEA mode is detected.
*
- * 2. PGRMC is sent to reconfigure to Garmin binary mode.
+ * 2. PGRMC is sent to reconfigure to Garmin binary mode.
* If successful, the GPS echoes the phrase.
*
- * 3. nmea_parse() sees the echo as RMC because the talker ID is
+ * 3. nmea_parse() sees the echo as RMC because the talker ID is
* ignored, and fails to recognize the echo as PGRMC and ignore it.
*
* 4. The mode is changed back to NMEA, resulting in an infinite loop.
@@ -1024,11 +1024,11 @@ gps_mask_t nmea_parse(char *sentence, struct gps_device_t * session)
session->newdata.time =
(double)mkgmtime(&session->driver.nmea.date) +
session->driver.nmea.subseconds;
- gpsd_report(LOG_DATA,
+ gpsd_report(LOG_DATA,
"%s time (nearest sec) is %2f = %d-%d-%dT%d:%d%d\n",
session->driver.nmea.field[0], session->newdata.time,
- 1900+session->driver.nmea.date.tm_year,
- session->driver.nmea.date.tm_mon+1,
+ 1900 + session->driver.nmea.date.tm_year,
+ session->driver.nmea.date.tm_mon + 1,
session->driver.nmea.date.tm_mday,
session->driver.nmea.date.tm_hour,
session->driver.nmea.date.tm_min,
diff --git a/driver_sirf.c b/driver_sirf.c
index 925c6541..1d898d03 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -6,7 +6,7 @@
* The disadvantages: Doesn't return PDOP or VDOP, just HDOP.
*
* Chris Kuethe, our SiRF expert, tells us:
- *
+ *
* "I don't see any indication in any of my material that PDOP, GDOP
* or VDOP are output. There are quantities called Estimated
* {Horizontal Position, Vertical Position, Time, Horizonal Velocity}
@@ -14,9 +14,9 @@
* active."
*
* "(SiRFdrive is their Dead Reckoning augmented firmware. It
- * allows you to feed odometer ticks, gyro and possibly
- * accelerometer inputs to the chip to allow it to continue
- * to navigate in the absence of satellite information, and
+ * allows you to feed odometer ticks, gyro and possibly
+ * accelerometer inputs to the chip to allow it to continue
+ * to navigate in the absence of satellite information, and
* to improve fixes when you do have satellites.)"
*
* "[When we need RINEX data, we can get it from] SiRF Message #5.
@@ -49,7 +49,7 @@
#ifdef ALLOW_RECONFIGURE
/*@ +charint @*/
-/* message to enable:
+/* message to enable:
* MID 7 Clock Status
* MID 8 50Bps subframe data
* MID 17 Differential Corrections
@@ -201,8 +201,8 @@ static bool sirf_speed(int ttyfd, speed_t speed, char parity, int stopbits)
/*@ +charint @*/
static unsigned char msg[] = {
0xa0, 0xa2, 0x00, 0x09,
- 0x86, /* byte 4:
- * Set Binary Serial Port
+ 0x86, /* byte 4:
+ * Set Binary Serial Port
* MID 134 */
0x00, 0x00, 0x12, 0xc0, /* bytes 5-8: 4800 bps */
0x08, /* byte 9: 8 data bits */
@@ -523,7 +523,7 @@ static gps_mask_t sirf_msg_svinfo(struct gps_device_t *session,
session->driver.sirf.time_seen |= TIME_SEEN_GPS_1;
mask |= TIME_IS;
/*
- * This time stamp, at 4800bps, is so close to 1 sec old as to
+ * This time stamp, at 4800bps, is so close to 1 sec old as to
* be confusing to ntpd, but ntpshm_put() will ignore it if a better
* time already seen
*/
@@ -660,8 +660,8 @@ static gps_mask_t sirf_msg_navsol(struct gps_device_t *session,
so for a while) don't report a valid time field, leading to annoying
twice-per-second jitter in client displays.
-2) What we wanted out of this that MND didn't give us was horizontal and
- vertical error estimates. But we have to do our own error estimation by
+2) What we wanted out of this that MND didn't give us was horizontal and
+ vertical error estimates. But we have to do our own error estimation by
computing DOPs from the skyview covariance matrix anyway, because we
want separate epx and epy errors a la NMEA 3.0.
@@ -729,7 +729,7 @@ static gps_mask_t sirf_msg_geodetic(struct gps_device_t *session,
struct tm unpacked_date;
double subseconds;
/*
- * Early versions of the SiRF protocol manual don't document
+ * Early versions of the SiRF protocol manual don't document
* this sentence at all. Some that do incorrectly
* describe UTC Day, Hour, and Minute as 2-byte quantities,
* not 1-byte. Chris Kuethe, our SiRF expert, tells us:
@@ -743,10 +743,10 @@ static gps_mask_t sirf_msg_geodetic(struct gps_device_t *session,
* To work around the incomplete implementation of this
* packet in 231, we used to assume that only the altitude field
* from this packet is valid. But even this doesn't necessarily
- * seem to be the case. Instead, we do our own computation
+ * seem to be the case. Instead, we do our own computation
* of geoid separation now.
*
- * UTC is left all zeros in 231 and older firmware versions,
+ * UTC is left all zeros in 231 and older firmware versions,
* and misdocumented in version 1.4 of the Protocol Reference.
* Documented: Real:
* UTC year 2 2
@@ -1184,7 +1184,7 @@ static void sirfbin_event_hook(struct gps_device_t *session, event_t event)
/* do this every time */
{
/*@ +charint @*/
- /* Poll Navigation Parameters MID 152
+ /* Poll Navigation Parameters MID 152
* query for MID 19 */
static unsigned char navparams[] = {
0xa0, 0xa2, 0x00, 0x02,
diff --git a/drivers.c b/drivers.c
index a9c76977..31ab2753 100644
--- a/drivers.c
+++ b/drivers.c
@@ -64,7 +64,7 @@ gps_mask_t nmea_parse_input(struct gps_device_t * session)
} else { /* session->packet.type == NMEA_PACKET) */
gps_mask_t st = 0;
- /*
+ /*
* Some packets do not end in \n, append one
* for good logging
*/
@@ -140,7 +140,7 @@ static void nmea_event_hook(struct gps_device_t *session, event_t event)
* Thus the only reliable probe is to try to flip the SiRF into
* binary mode, cluing in the library to revert it on close.
*
- * SiRFs dominate the GPS-mouse market, so we used to put this test
+ * SiRFs dominate the GPS-mouse market, so we used to put this test
* first. Unfortunately this causes problems for gpsctl, as it cannot
* select the NMEA driver without switching the device back to
* binary mode! Fix this if we ever find a nondisruptive probe string.
@@ -283,8 +283,8 @@ static void garmin_nmea_event_hook(struct gps_device_t *session,
*/
switch (session->packet.counter) {
case 0:
- /* reset some config, AutoFix, WGS84, PPS
- * Set the PPS pulse length to 40ms which leaves the Garmin 18-5hz
+ /* reset some config, AutoFix, WGS84, PPS
+ * Set the PPS pulse length to 40ms which leaves the Garmin 18-5hz
* with a 160ms low state.
* NOTE: new PPS only takes effect after next power cycle
*/
@@ -776,7 +776,7 @@ static void oceanserver_event_hook(struct gps_device_t *session,
static const struct gps_type_t oceanServer = {
.type_name = "OceanServer Digital Compass OS5000", /* full name of type */
.packet_type = NMEA_PACKET, /* associated lexer packet type */
- .trigger = "$OHPR,", /* detect their main sentence */
+ .trigger = "$OHPR,", /* detect their main sentence */
.channels = 0, /* not an actual GPS at all */
.probe_detect = NULL,
.get_packet = generic_get, /* how to get a packet */
diff --git a/gpsd.c b/gpsd.c
index 1f8254c7..8a3e7902 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1,6 +1,6 @@
/*
- * This is the main sequence of the gpsd daemon. The IO dispatcher, main
- * select loop, and user command handling lives here.
+ * This is the main sequence of the gpsd daemon. The IO dispatcher, main
+ * select loop, and user command handling lives here.
*
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
@@ -124,7 +124,7 @@
#define QLEN 5
-/*
+/*
* If ntpshm is enabled, we renice the process to this priority level.
* For precise timekeeping increase priority.
*/
@@ -308,8 +308,8 @@ The following driver types are compiled into this gpsd instance:\n",
static int passivesock_af(int af, char *service, char *tcp_or_udp, int qlen)
/* bind a passive command socket for the daemon */
{
- /*
- * af = address family,
+ /*
+ * af = address family,
* service = IANA protocol name or number.
* tcp_or_udp = TCP or UDP
* qlen = maximum wait-queue length for connections
@@ -361,12 +361,12 @@ static int passivesock_af(int af, char *service, char *tcp_or_udp, int qlen)
memset((char *)&sat.sa_in6, 0, sin_len);
sat.sa_in6.sin6_family = (sa_family_t) AF_INET6;
if (listen_global) {
- /* BAD: sat.sa_in6.sin6_addr = in6addr_any;
+ /* BAD: sat.sa_in6.sin6_addr = in6addr_any;
* the simple assignment will not work (except as an initializer)
- * because sin6_addr is an array not a simple type
+ * because sin6_addr is an array not a simple type
* we could do something like this:
* memcpy(sat.sa_in6.sin6_addr, in6addr_any, sizeof(sin6_addr));
- * BUT, all zeros is IPv6 wildcard, and we just zeroed the array
+ * BUT, all zeros is IPv6 wildcard, and we just zeroed the array
* so really nothing to do here
*/
} else
@@ -419,7 +419,7 @@ static int passivesock_af(int af, char *service, char *tcp_or_udp, int qlen)
}
/* *INDENT-OFF* */
-static int passivesocks(char *service, char *tcp_or_udp,
+static int passivesocks(char *service, char *tcp_or_udp,
int qlen, /*@out@*/int socks[])
{
int numsocks = AFCOUNT;
@@ -1701,7 +1701,7 @@ int main(int argc, char *argv[])
continue;
/* *INDENT-OFF* */
- /*
+ /*
* NMEA and other textual sentences are simply
* copied to all clients that are in raw or nmea
* mode.
@@ -1763,7 +1763,7 @@ int main(int argc, char *argv[])
device->cycle_end_reliable ? "" : "un");
if (device->cycle_end_reliable) {
/*
- * Driver returns reliable end of cycle,
+ * Driver returns reliable end of cycle,
* report only when that is signaled.
*/
if ((changed & REPORT_IS) != 0)
diff --git a/gpsd_json.c b/gpsd_json.c
index 126dea24..1d7be8de 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -57,7 +57,7 @@ char *json_stringify( /*@out@*/ char *to,
char *tp;
tp = to;
- /*
+ /*
* The limit is len-6 here because we need to be leave room for
* each character to generate an up to 6-character Java-style
* escape
@@ -815,8 +815,8 @@ void aivdm_json_dump(const struct ais_t *ais, bool scaled,
ais->type5.to_port, ais->type5.to_starboard,
epfd_legends[ais->type5.epfd], ais->type5.month,
ais->type5.day, ais->type5.hour, ais->type5.minute,
- ais->type5.draught / 10.0,
- json_stringify(buf3, sizeof(buf3),
+ ais->type5.draught / 10.0,
+ json_stringify(buf3, sizeof(buf3),
ais->type5.destination),
ais->type5.dte);
/* *INDENT-ON* */