summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2006-02-17 00:48:33 +0000
committerEric S. Raymond <esr@thyrsus.com>2006-02-17 00:48:33 +0000
commit29c7151d90fa7ab73f62fa9b2e6901b45b026618 (patch)
tree52706b6e5f605e92da6cbf12a2e4f90832f97ef7
parentfd1c7d4f7829daf4be79d171f5e5ce89de5a835f (diff)
downloadgpsd-29c7151d90fa7ab73f62fa9b2e6901b45b026618.tar.gz
Pre 2.31 minor bugfixes.
-rw-r--r--AUTHORS1
-rw-r--r--HACKING6
-rw-r--r--TODO7
-rw-r--r--cgps.c2
-rw-r--r--gpsd.c3
-rw-r--r--gpsd.spec.in10
-rw-r--r--gpsd_dbus.c35
-rw-r--r--gpsd_dbus.h2
-rw-r--r--gpxlogger.c62
-rw-r--r--libgps.c4
-rw-r--r--libgpsd_core.c4
-rw-r--r--timebase.h20
-rw-r--r--www/hardware.html57
-rw-r--r--xgps.c3
14 files changed, 131 insertions, 85 deletions
diff --git a/AUTHORS b/AUTHORS
index c09ed7bb..25dc560e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,3 +4,4 @@ Russ Nelson <nelson@crynwyr.com>
Eric S. Raymond <esr@thyrsus.com>
Gary E. Miller <gem@rellim.com>
Jeff Francis <jeff@gritch.org>
+Amaury Jacquot <sxpert@esitcom.org>
diff --git a/HACKING b/HACKING
index e266b557..c8984ce3 100644
--- a/HACKING
+++ b/HACKING
@@ -479,9 +479,9 @@ is so you can use it to set the system clock.
*** Hotplug interface problems
The hotplug interface works pretty nicely for telling gpsd which
-device to look at, at least on my FC3 Linux machines. The fly in the
-ointment is that I'm using a deprecated version of the interface, the
-old-style /etc/hotplug version with usermap files.
+device to look at, at least on my FC3 and FC4 Linux machines. The fly
+in the ointment is that I'm using a deprecated version of the
+interface, the old-style /etc/hotplug version with usermap files.
It is unlikely this interface will be dropped by distro makers any
time soon, because it's supporting a bunch of popular USB cameras.
diff --git a/TODO b/TODO
index 6a5d1386..a1b638da 100644
--- a/TODO
+++ b/TODO
@@ -118,13 +118,6 @@ RTCM packets to port 2101. Here's the plan for the rest of it:
8) Generate and broadcast RTCM corrections from an attached device?
Might not be possible -- appears to need nanosecond timing.
-*** Translate contrib/gpxlogger.pl to Python
-
-gpxlogger.pl is now clearly superior to the C version.
-Somebody should translate it to Python so we can put it
-in the main directory without adding yet another runtime
-dependency to the project.
-
*** Do the research to figure out just what is going on with status bits
NMEA actually has *four* kinds of validity bits: Mode, Status, the
diff --git a/cgps.c b/cgps.c
index e992c460..aa6e3fa5 100644
--- a/cgps.c
+++ b/cgps.c
@@ -489,7 +489,7 @@ int main(int argc, char *argv[])
/* Clear the spewage area. */
case 'c':
- werase(messages);
+ (void)werase(messages);
break;
default:
diff --git a/gpsd.c b/gpsd.c
index 123f9150..c228d9dd 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -259,7 +259,7 @@ static int filesock(char *filename)
}
(void)strcpy(addr.sun_path, filename);
/*@i1@*/addr.sun_family = AF_UNIX;
- (void)bind(sock, (struct sockaddr *) &addr, sizeof (addr));
+ (void)bind(sock, (struct sockaddr *) &addr, (int)sizeof(addr));
if (listen(sock, QLEN) < 0) {
gpsd_report(0, "can't listen on local socket %s\n", filename);
return -1;
@@ -421,7 +421,6 @@ static bool allocation_policy(struct gps_device_t *channel,
return true;
else
return false;
- return true;
}
/*@ -branchstate -usedef -globstate @*/
diff --git a/gpsd.spec.in b/gpsd.spec.in
index e86e0ec4..d5be7e27 100644
--- a/gpsd.spec.in
+++ b/gpsd.spec.in
@@ -7,7 +7,7 @@ Group: System Environment/Daemons
Provides: gpsd
URL: http://developer.berlios.de/projects/gpsd/
Source0: %{name}-%{version}.tar.gz
-BuildRequires: ncurses-devel gcc4
+BuildRequires: ncurses-devel gcc
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
#Destinations: mailto:gpsd-announce@lists.berlios.de, mailto:gpsd-users@lists.berlios.de, mailto:gpsd-dev@lists.berlios.de
@@ -60,10 +60,9 @@ can run on a serial terminal or terminal emulator.
%setup -q
%build
-#CC=gcc4 ./autogen.sh
+./autogen.sh
%configure
-# Requires gcc4 to compile the RTCM104 support correctly.
-CC=gcc4 make -e CFLAGS=-D_GNU_SOURCE %{?_smp_mflags}
+make -e CFLAGS=-D_GNU_SOURCE %{?_smp_mflags}
%install
[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
@@ -145,7 +144,8 @@ cp gps.py gpsfake.py "$RPM_BUILD_ROOT"%{_libdir}/python${PYVERSION}/site-package
* Thu Dec 22 2005 Eric S. Raymond <esr@snark.thyrsus.com> - 2.31-1
- Now builds and runs under Cygwin. Correct the speed units in synthetic
NMEA. Slightly better time handling under NMEA. Daemon now builds with
- all but NMEA disabled. This is a minor point release.
+ all but NMEA disabled. Update the leap-second offset. Fix bad unit
+ conversion in V output. Upgrade to DBUS 0.60 conformance.
* Wed Sep 14 2005 Eric S. Raymond <esr@snark.thyrsus.com> - 2.30-1
- Prevent core dump on -d option. The .log option is no longer required for
diff --git a/gpsd_dbus.c b/gpsd_dbus.c
index c04f7d8b..17c10f35 100644
--- a/gpsd_dbus.c
+++ b/gpsd_dbus.c
@@ -27,7 +27,7 @@ void send_dbus_fix(struct gps_device_t* channel) {
struct gps_data_t* gpsdata;
struct gps_fix_t* gpsfix;
DBusMessage* message;
- DBusMessageIter iter;
+ /*DBusMessageIter iter;*/
dbus_uint32_t serial; /* collected, but not used */
/* if the connection is non existent, return without doing anything */
@@ -40,24 +40,25 @@ void send_dbus_fix(struct gps_device_t* channel) {
"/org/gpsd",
"org.gpsd",
"fix");
- dbus_message_iter_init(message, &iter);
/* add the interesting information to the message */
- dbus_message_iter_append_double(&iter, gpsfix->time);
- dbus_message_iter_append_int32(&iter, gpsfix->mode);
- dbus_message_iter_append_double(&iter, gpsfix->ept);
- dbus_message_iter_append_double(&iter, gpsfix->latitude);
- dbus_message_iter_append_double(&iter, gpsfix->longitude);
- dbus_message_iter_append_double(&iter, gpsfix->eph);
- dbus_message_iter_append_double(&iter, gpsfix->altitude);
- dbus_message_iter_append_double(&iter, gpsfix->epv);
- dbus_message_iter_append_double(&iter, gpsfix->track);
- dbus_message_iter_append_double(&iter, gpsfix->epd);
- dbus_message_iter_append_double(&iter, gpsfix->speed);
- dbus_message_iter_append_double(&iter, gpsfix->eps);
- dbus_message_iter_append_double(&iter, gpsfix->climb);
- dbus_message_iter_append_double(&iter, gpsfix->epc);
-
+ dbus_message_append_args (message,
+ DBUS_TYPE_DOUBLE, &(gpsfix->time),
+ DBUS_TYPE_INT32, &(gpsfix->mode),
+ DBUS_TYPE_DOUBLE, &(gpsfix->ept),
+ DBUS_TYPE_DOUBLE, &(gpsfix->latitude),
+ DBUS_TYPE_DOUBLE, &(gpsfix->longitude),
+ DBUS_TYPE_DOUBLE, &(gpsfix->eph),
+ DBUS_TYPE_DOUBLE, &(gpsfix->altitude),
+ DBUS_TYPE_DOUBLE, &(gpsfix->epv),
+ DBUS_TYPE_DOUBLE, &(gpsfix->track),
+ DBUS_TYPE_DOUBLE, &(gpsfix->epd),
+ DBUS_TYPE_DOUBLE, &(gpsfix->speed),
+ DBUS_TYPE_DOUBLE, &(gpsfix->eps),
+ DBUS_TYPE_DOUBLE, &(gpsfix->climb),
+ DBUS_TYPE_DOUBLE, &(gpsfix->epc),
+ DBUS_TYPE_INVALID);
+
dbus_message_set_no_reply(message, TRUE);
/* message is complete time to send it */
diff --git a/gpsd_dbus.h b/gpsd_dbus.h
index 948e8e29..281ea9df 100644
--- a/gpsd_dbus.h
+++ b/gpsd_dbus.h
@@ -4,7 +4,7 @@
#ifndef _gpsd_dbus_h_
#define _gpsd_dbus_h_
-#define DBUS_API_SUBJECT_TO_CHANGE
+//#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
#include <gpsd.h>
diff --git a/gpxlogger.c b/gpxlogger.c
index 17f5b813..b244568a 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -19,6 +19,7 @@ static char *author = "Amaury Jacquot";
static char *copyright = "GPL v 2.0";
static int intrack = 0;
+static int first = 1;
static time_t tracklimit = 5; /* seconds */
static struct {
@@ -55,45 +56,30 @@ static void print_gpx_trk_end (void) {
static DBusHandlerResult handle_gps_fix (DBusMessage* message) {
DBusMessageIter iter;
+ DBusError error;
double temp_time;
-
- if (!dbus_message_iter_init (message, &iter)) {
- /* we have a problem */
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- }
- /* this should be smarter :D */
- temp_time = dbus_message_iter_get_double (&iter);
- gpsfix.time = floor(temp_time);
- dbus_message_iter_next (&iter);
- gpsfix.mode = dbus_message_iter_get_int32 (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.ept = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.latitude = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.longitude = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.eph = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.altitude = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.epv = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.track = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.epd = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.speed = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.eps = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.climb = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- gpsfix.epc = dbus_message_iter_get_double (&iter);
- dbus_message_iter_next (&iter);
- //gpsfix.separation = dbus_message_iter_get_double (&iter);
+ dbus_error_init (&error);
+ dbus_message_get_args (message,
+ &error,
+ DBUS_TYPE_DOUBLE, &temp_time,
+ DBUS_TYPE_INT32, &gpsfix.mode,
+ DBUS_TYPE_DOUBLE, &gpsfix.ept,
+ DBUS_TYPE_DOUBLE, &gpsfix.latitude,
+ DBUS_TYPE_DOUBLE, &gpsfix.longitude,
+ DBUS_TYPE_DOUBLE, &gpsfix.eph,
+ DBUS_TYPE_DOUBLE, &gpsfix.altitude,
+ DBUS_TYPE_DOUBLE, &gpsfix.epv,
+ DBUS_TYPE_DOUBLE, &gpsfix.track,
+ DBUS_TYPE_DOUBLE, &gpsfix.epd,
+ DBUS_TYPE_DOUBLE, &gpsfix.speed,
+ DBUS_TYPE_DOUBLE, &gpsfix.eps,
+ DBUS_TYPE_DOUBLE, &gpsfix.climb,
+ DBUS_TYPE_DOUBLE, &gpsfix.epc,
+ DBUS_TYPE_INVALID);
+ gpsfix.time = floor(temp_time);
+
/*
* we have a fix there - log the point
*/
@@ -105,7 +91,7 @@ static DBusHandlerResult handle_gps_fix (DBusMessage* message) {
* backwards in time. The clock sometimes jump
* backward when gpsd is submitting junk on the
* dbus. */
- if (fabs(gpsfix.time - gpsfix.old_time) > tracklimit) {
+ if (fabs(gpsfix.time - gpsfix.old_time) > tracklimit && !first) {
print_gpx_trk_end();
intrack = 0;
}
@@ -113,6 +99,8 @@ static DBusHandlerResult handle_gps_fix (DBusMessage* message) {
if (!intrack) {
print_gpx_trk_start();
intrack = 1;
+ if (first)
+ first = 0;
}
gpsfix.old_time = gpsfix.time;
diff --git a/libgps.c b/libgps.c
index 68490aa6..a0410ec7 100644
--- a/libgps.c
+++ b/libgps.c
@@ -5,7 +5,9 @@
#include <string.h>
#include <errno.h>
#include <sys/time.h>
-#include <pthread.h>
+#ifndef S_SPLINT_S
+#include <pthread.h> /* pacifies OpenBSD's compiler */
+#endif
#include <math.h>
#include "gpsd.h"
diff --git a/libgpsd_core.c b/libgpsd_core.c
index c577b08f..6cea94d2 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -14,7 +14,9 @@
#include "gpsd.h"
#if defined(PPS_ENABLE) && defined(TIOCMIWAIT)
-#include <pthread.h>
+#ifndef S_SPLINT_S
+#include <pthread.h> /* pacifies OpenBSD's compiler */
+#endif
#endif
diff --git a/timebase.h b/timebase.h
index 67947392..6a429d00 100644
--- a/timebase.h
+++ b/timebase.h
@@ -4,15 +4,23 @@
* The current (fixed) leap-second correction, and the future Unix
* time after which to start hunting leap-second corrections from GPS
* subframe data if the GPS doesn't supply them any more readily.
- * Currently 1 Jan 2006, as the current fixed correction is expected
- * to be good until at least then. Deferring the check is a hack to
- * speed up fix acquisition -- subframe data is bulky enough to
- * substantially increase latency. To update LEAP_SECONDS and
- * START_SUBFRAME, see the IERS leap-second bulletin page at:
+ *
+ * Deferring the check is a hack to speed up fix acquisition --
+ * subframe data is bulky enough to substantially increase latency.
+ * To update LEAP_SECONDS and START_SUBFRAME, see the IERS leap-second
+ * bulletin page at:
* <http://hpiers.obspm.fr/eop-pc/products/bulletins/bulletins.html>
+ *
+ * You can use the Python expression
+ * time.mktime(time.strptime(... , "%d %b %Y %H:%M:%S"))
+ * to generate an integer value for START_SUBFRAME.
*/
#define LEAP_SECONDS 14
-#define START_SUBFRAME 1136091600
+
+/* IERS says "NO positive leap second will be introduced at the end of
+ * June 2006, so start subframe checking at the *next* 6-month boundary.
+ */
+#define START_SUBFRAME 1167627600 /* 1 Jan 2007 00:00:00 */
/*
* This is used only when an NMEA device issues a two-digit year in a GPRMC
diff --git a/www/hardware.html b/www/hardware.html
index 24ce1713..c527080c 100644
--- a/www/hardware.html
+++ b/www/hardware.html
@@ -155,6 +155,37 @@ PGRMZ</td>
</tr>
<!-- End Garmin Geko -->
+<!-- Begin Garmin GPS 76 -->
+<tr>
+<td>Garmin GPS 76</td>
+<td>Good</td>
+<td>Garmin+PL2303)</td>
+<td>USB</td>
+<td><a href="http://www.garmin.com">Garmin</a></td>
+<td>2.13</td>
+<td>?</td>
+<td>
+GPBOD<br/>
+GPBWC<br/>
+GPGGA<br/>
+GPGLL<br/>
+GPRMB<br/>
+GPRMC<br/>
+GPSD<br/>
+GPVTG<br/>
+GPXTE<br/>
+HCHDG<br/>
+PGRME<br/>
+PGRMM<br/>
+PGRMZ<br/>
+</td>
+<td>
+Sebastian Niehaus &lt;killedbythoughts&#x40;mindcrime.net&gt;
+He says it's "Software Version 3.70".
+</td>
+</tr>
+<!-- End Garmin GPS 76 -->
+
<!-- Begin Haicom HI-303S -->
<tr>
<td><a href="http://www.haicom.com.tw/gps303s.shtml">HI-303S</a></td>
@@ -741,12 +772,34 @@ rs232 cable or a pda cable. Submitted by Koos van den Hout,
</tr>
<!-- End Rikaline GPS-6010-X5 -->
+<!-- Begin Globalsat BT-338 -->
+<tr>
+<td><a href='http://www.globalsat.com.tw/english/products_detail.php?main_id=20&p_id=74'>Globalsat BT-338</a></td>
+<td>Good</td>
+<td>SiRFStar-III</td>
+<td>Bluetooth</td>
+<td><a href='http://www.globalsat.com.tw/english/products.php'>GlobalSat</a></td>
+<td>2.13</td>
+<td>?</td>
+<td>
+GGA(1sec)<br/>
+GSA(5sec)<br/>
+GSV(5sec)<br/>
+RMC(1sec)<br/>
+VTG(1sec)</td>
+<td>
+Michal Panczyk &lt;mpanczyk&#x40;gmail.com&gt;
+</td>
+</tr>
+<!-- End Globalsat BT-338 -->
+
<!--
<tr>
-<td>name, link to technical reference</td>
+<td>name<br/>
+ link to technical reference</td>
<td>how well it works</td>
<td>chipset (eg, SiRFII+PL2303)</td>
-<td>interface (USB, RS232, CF, Blutooth...)</td>
+<td>interface (USB, RS232, CF, Bluetooth...)</td>
<td>vendor, with link to site</td>
<td>gpsd version used for testing</td>
<td>NMEA version it emits</td>
diff --git a/xgps.c b/xgps.c
index 0a7d0d93..cb93c199 100644
--- a/xgps.c
+++ b/xgps.c
@@ -25,10 +25,9 @@
* Widget and window sizes.
*/
#define MAX_FONTSIZE 18 /* maximum fontsize we handle*/
-#define MAX_CHANNELS 12 /* count of channels to display */
#define ROOT_SIZE "700x570" /* size of entire xgps display */
/* height of satellite-data display */
-#define SATDATA_HEIGHT MAX_FONTSIZE*(MAX_CHANNELS+1)
+#define SATDATA_HEIGHT MAX_FONTSIZE*(MAXCHANNELS+1)
#define LEFTSIDE_WIDTH 205 /* width of data-display side */
#define SATDIAG_SIZE 400 /* size of satellite diagram */