Browse Source

Imported Upstream version 2.91

master
Bernd Zeimetz 10 years ago
parent
commit
9015d91b81
100 changed files with 4833 additions and 4680 deletions
  1. +36
    -34
      Makefile.am
  2. +86
    -125
      Makefile.in
  3. +16
    -1
      NEWS
  4. +34
    -66
      TODO
  5. +10
    -6
      ais_json.c
  6. +467
    -0
      ais_json.i
  7. +7
    -6
      bsd-base64.c
  8. +3
    -3
      bsd-base64.h
  9. +68
    -32
      cgps.c
  10. +0
    -1
      cgpxlogger.1
  11. +30
    -155
      configure
  12. +9
    -27
      configure.ac
  13. +187
    -10
      driver_aivdm.c
  14. +4
    -2
      driver_garmin.c
  15. +1
    -2
      driver_italk.c
  16. +14
    -6
      driver_nmea.c
  17. +32
    -3
      driver_oncore.c
  18. +5
    -2
      driver_rtcm3.c
  19. +141
    -76
      driver_sirf.c
  20. +5
    -5
      driver_ubx.c
  21. +2
    -2
      driver_zodiac.c
  22. +11
    -2
      drivers.c
  23. +3
    -4
      geoid.c
  24. +68
    -61
      gps.1
  25. +236
    -195
      gps.h
  26. +0
    -673
      gps.py
  27. +77
    -67
      gps.xml
  28. +168
    -78
      gpscap.ini
  29. +5
    -5
      gpscap.py
  30. +11
    -8
      gpscat
  31. +5
    -5
      gpscat.1
  32. +11
    -8
      gpscat.in
  33. +4
    -5
      gpscat.xml
  34. +82
    -0
      gpsclient.c
  35. +2
    -2
      gpsctl.1
  36. +9
    -4
      gpsctl.c
  37. +1
    -1
      gpsctl.xml
  38. +46
    -315
      gpsd.8
  39. +190
    -768
      gpsd.c
  40. +1001
    -0
      gpsd.h
  41. +2
    -1
      gpsd.h-head
  42. +7
    -4
      gpsd.h-tail
  43. +2
    -2
      gpsd.hotplug.wrapper
  44. +4
    -4
      gpsd.php
  45. +11
    -11
      gpsd.rules
  46. +114
    -561
      gpsd.xml
  47. +16
    -7
      gpsd_config.h
  48. +15
    -6
      gpsd_config.h.in
  49. +129
    -105
      gpsd_json.c
  50. +6
    -2
      gpsd_report.c
  51. +23
    -6
      gpsdclient.c
  52. +2
    -2
      gpsdecode.1
  53. +30
    -16
      gpsdecode.c
  54. +1
    -1
      gpsdecode.xml
  55. +6
    -6
      gpsfake
  56. +2
    -2
      gpsfake.1
  57. +6
    -6
      gpsfake.in
  58. +0
    -529
      gpsfake.py
  59. +1
    -1
      gpsfake.xml
  60. +0
    -38
      gpslib.c
  61. +2
    -2
      gpsmon.1
  62. +1
    -3
      gpsmon.c
  63. +1
    -1
      gpsmon.xml
  64. +6
    -6
      gpspacket.c
  65. +7
    -7
      gpspipe.1
  66. +53
    -68
      gpspipe.c
  67. +8
    -7
      gpspipe.xml
  68. +2
    -2
      gpsprof.1
  69. +1
    -1
      gpsprof.xml
  70. +61
    -44
      gpsutils.c
  71. +18
    -8
      gpxlogger.c
  72. +46
    -46
      json.c
  73. +6
    -4
      json.h
  74. +9
    -7
      jsongen.py.in
  75. +55
    -13
      lcdgps.c
  76. +78
    -22
      libgps.3
  77. +107
    -36
      libgps.xml
  78. +122
    -35
      libgps_core.c
  79. +98
    -98
      libgps_json.c
  80. +67
    -18
      libgpsd_core.c
  81. +6
    -2
      libgpsmm.cpp
  82. +2
    -1
      libgpsmm.h
  83. +25
    -4
      monitor_oncore.c
  84. +3
    -4
      monitor_sirf.c
  85. +13
    -6
      net_dgpsip.c
  86. +6
    -2
      net_gnss_dispatch.c
  87. +15
    -8
      net_ntrip.c
  88. +84
    -41
      netlib.c
  89. +90
    -11
      ntpshm.c
  90. +4
    -11
      packaging/gpsd.spec
  91. +3
    -10
      packaging/gpsd.spec.in
  92. +17
    -7
      packet.c
  93. +165
    -0
      packet_names.h
  94. +12
    -5
      pseudonmea.c
  95. +110
    -0
      regress-driver
  96. +1
    -1
      revision.h
  97. +2
    -2
      rtcm-104.5
  98. +1
    -1
      rtcm-104.xml
  99. +59
    -59
      rtcm2_json.c
  100. +3
    -2
      serial.c

+ 36
- 34
Makefile.am View File

@@ -1,5 +1,5 @@
# Automake description for gpsd
# $Id: Makefile.am 6709 2009-12-04 20:41:03Z esr $
# $Id: Makefile.am 7013 2010-03-01 05:18:44Z esr $

CLEANFILES =

@@ -28,9 +28,6 @@ XMLTO = xmlto
if HAVE_NCURSES
CURSESPROGS = cgps gpsmon
endif
if HAVE_MOTIF
MOTIF_PROGS = xgps
endif
if HAVE_XAW
XAW_PROGS = xgpsspeed
endif
@@ -48,25 +45,18 @@ endif
bin_PROGRAMS = $(MOTIF_PROGS) $(XAW_PROGS) $(RTCM104PROGS) $(CURSESPROGS) gpsctl gpspipe gpxlogger lcdgps
sbin_PROGRAMS = gpsd

check_PROGRAMS = test_float test_bits test_packet test_mkgmtime test_geoid test_json
check_PROGRAMS = test_float test_trig test_bits test_packet test_mkgmtime test_geoid test_json
if LIBGPSMM_ENABLE
check_PROGRAMS += test_gpsmm
endif

PYTHONPAGES_DIST = gpsprof.1 gpsfake.1 gpscat.1
if HAVE_PYTHON
dist_bin_SCRIPTS = gpsprof gpsfake gpscat
python_PYTHON = gps.py gpsfake.py gpscap.py
nodist_python_PYTHON = gpspacket.so gpslib.so
dist_bin_SCRIPTS = gpsprof gpsfake gpscat xgps
python_PYTHON = gpscap.py
PYTHONPAGES = $(PYTHONPAGES_DIST)
endif

#
# Build xgps
#
xgps_SOURCES = xgps.c
xgps_LDADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(XM_LIBS) $(XT_LIBS) $(X_LIBS) $(X_PRE_LIBS) libgps.la -lm

#
# Build xgpsspeed
#
@@ -184,6 +174,7 @@ libgpsd_c_sources = \
driver_zodiac.c

libgpsd_h_sources = \
sockaddr.h \
bsd-base64.h \
timebase.h \
bits.h \
@@ -222,7 +213,7 @@ maskdump.c: gpsd.h-tail maskaudit.py
libgps_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \
driver_rtcm2.h packet_states.h

# Warning: This overrides autoconf's normal link-line generatyion process
# Warning: This overrides autoconf's normal link-line generation process
if LIBGPSMM_ENABLE
libgps_la_SOURCES += libgpsmm.cpp
libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link g++ $(libgps_la_LDFLAGS) -o $@
@@ -236,8 +227,6 @@ libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
#
# Build Python binding
#
# install may require --root depending on what you're doing.
# python setup.py install --root=$DESTIR --prefix=$PREFIX
if HAVE_PYTHON
PYEXTENSIONS = gpspacket.so gpslib.so
noinst_SCRIPTS = gpspacket.so gpslib.so setup.py
@@ -248,7 +237,7 @@ $(PYEXTENSIONS): stamp-python-modules
+@WITNESS=stamp-python-modules; $(MULTIOUT_RECOVER_DELETED)
# TODO: Should the dependency on libgps.la be enforced inside
# setup.py? (See the variable 'needed_files' in setup.py.)
stamp-python-modules: gpspacket.c gpslib.c libgps.la setup.py
stamp-python-modules: gpspacket.c gpsclient.c libgps.la setup.py
@rm -f '$@' '$@.tmp'
@echo 'timestamp for $@' > '$@.tmp'
(cd '$(srcdir)' && \
@@ -261,16 +250,21 @@ stamp-python-modules: gpspacket.c gpslib.c libgps.la setup.py
--mangenerator '$(MANGENERATOR)') && \
mv -f '$@.tmp' '$@'
CLEANFILES += stamp-python-modules stamp-python-modules.tmp
endif
# Clean up after Python
clean-local:
rm -rf build

# Install Python modules
install-exec-local:
$(PYTHON) setup.py install --prefix=${prefix} # --root=$(DESTDIR)
endif

if LIBGPSMM_ENABLE
TESTBINS = test_float test_gpsmm test_bits test_packet test_geoid \
TESTBINS = test_float test_trig test_gpsmm test_bits test_packet test_geoid \
test_mkgmtime test_json
else
TESTBINS = test_float test_bits test_packet test_geoid \
TESTBINS = test_float test_trig test_bits test_packet test_geoid \
test_mkgmtime test_json
endif

@@ -280,6 +274,12 @@ endif
test_float_SOURCES = test_float.c
test_float_LDADD = $(LIBC) libgps.la -lm

#
# Build test_trig
#
test_trig_SOURCES = test_trig.c
test_trig_LDADD = $(LIBC) libgps.la -lm

if LIBGPSMM_ENABLE
#
# Build test_gpsmm
@@ -324,7 +324,6 @@ MANPAGES_BASE = \
xgpsspeed.1 \
cgps.1 \
lcdgps.1 \
cgpxlogger.1 \
libgps.3 \
libgpsmm.3 \
libgpsd.3 \
@@ -363,7 +362,7 @@ BUILT_MANPAGES = $(MANPAGES_DIST)
$(MANGENERATOR) $(MANFLAGS) $(MANTARGET) $<

# Another instance of the multiple-outputs hack.
gps.1 xgps.1 xgpsspeed.1 cgps.1 lcdgps.1 cgpxlogger.1: stamp-gps-manpages
gps.1 xgps.1 xgpsspeed.1 cgps.1 lcdgps.1: stamp-gps-manpages
+@WITNESS=stamp-gps-manpages; $(MULTIOUT_RECOVER_DELETED)
stamp-gps-manpages: gps.xml
@rm -f '$@' '$@.tmp'
@@ -387,8 +386,11 @@ include_HEADERS = gps.h
endif

# Note: packaging/gpsd.spec is generated, but it needs to be in the
# tarball in order for 'make diat-rpm' to work.
# tarball in order for 'make diat-rpm' to work. The BUILT_SOURCES
# files are here in order to minimize build dependencies for package
# builders who never alter anything, especially the Python dependency.
EXTRA_DIST = \
$(BUILT_SOURCES) \
revision.h \
autogen.sh \
README \
@@ -401,6 +403,7 @@ EXTRA_DIST = \
maskaudit.py.in \
dgpsip-servers \
test_float.c \
test_trig.c \
gpsd.php \
gpsd.xml \
gpsd.h-head \
@@ -419,7 +422,6 @@ EXTRA_DIST = \
rtcm-104.xml \
srec.xml \
$(MANPAGES_DIST) \
xgps.ad \
xgpsspeed.ad \
gpsd.rules \
gpsd.hotplug \
@@ -428,7 +430,7 @@ EXTRA_DIST = \
valgrind-audit \
valgrind-suppressions \
gpspacket.c \
gpslib.c \
gpsclient.c \
driver_proto.c \
monitor_proto.c \
setup.py \
@@ -439,7 +441,9 @@ EXTRA_DIST = \
packaging/gpsd.spec \
packaging/etc_default_gpsd \
packaging/etc_init.d_gpsd \
packaging/etc_init.d_gpsd_rpm
packaging/etc_init.d_gpsd_rpm \
regress-driver \
test

#dist-hook:
# $(MKDIR_P) '$(distdir)/contrib' && \
@@ -453,7 +457,7 @@ pkgconfig_DATA = libgps.pc libgpsd.pc
pkgconfigdir = $(libdir)/pkgconfig

# These are not distributed
libgps: libgps_core.c .libs/libgps.a
libgps: libgps_core.c gps.h .libs/libgps.a
$(CC) $(CFLAGS) -o libgps -lm -DTESTMAIN $(LIBPTHREAD) -g libgps_core.c .libs/libgps.a

# Report splint warnings
@@ -461,8 +465,6 @@ SPLINTOPTS = -I/usr/include/dbus-1.0/ +quiet
splint: gpsd.h packet_names.h
@echo "Running splint on daemon and libraries..."
-splint $(SPLINTOPTS) -exportlocal -redef $(gpsd_c_sources) $(libgpsd_c_sources)
@echo "Running splint on xgps..."
-splint $(SPLINTOPTS) -exportlocal $(xgps_SOURCES)
@echo "Running splint on cgps..."
-splint $(SPLINTOPTS) -exportlocal $(cgps_SOURCES)
@echo "Running splint on xgpsspeed..."
@@ -486,6 +488,10 @@ splint: gpsd.h packet_names.h
@echo "Running splint on test_json test harness..."
-splint $(SPLINTOPTS) $(test_json_SOURCES)

# Report cppcheck warnings. Requires 1.40 or later.
cppcheck: gpsd.h packet_names.h
cppcheck --template gcc --all --force .

# Re-indenting to a uniform style would be nice, and we leave this here
# as a rough guide to the project style, but it turns out that indent is
# an excessively blunt instrument. As of 2.2.10 it doesn't honor -nfca
@@ -497,10 +503,6 @@ indent:
chmod u-w maskdump.c
@echo "Diff lines:" `svn diff | wc -l`

# Bogon-checking the Python tools
pychecker:
for f in gps.py gpsfake.py leapsecond.py; do pychecker $$f; done

version:
@echo $(VERSION)



+ 86
- 125
Makefile.in View File

@@ -16,7 +16,7 @@
@SET_MAKE@

# Automake description for gpsd
# $Id: Makefile.am 6709 2009-12-04 20:41:03Z esr $
# $Id: Makefile.am 7013 2010-03-01 05:18:44Z esr $



@@ -42,15 +42,15 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
$(am__EXEEXT_4) gpsctl$(EXEEXT) gpspipe$(EXEEXT) \
gpxlogger$(EXEEXT) lcdgps$(EXEEXT)
gpsctl$(EXEEXT) gpspipe$(EXEEXT) gpxlogger$(EXEEXT) \
lcdgps$(EXEEXT)
sbin_PROGRAMS = gpsd$(EXEEXT)
check_PROGRAMS = test_float$(EXEEXT) test_bits$(EXEEXT) \
test_packet$(EXEEXT) test_mkgmtime$(EXEEXT) \
test_geoid$(EXEEXT) test_json$(EXEEXT) $(am__EXEEXT_5)
check_PROGRAMS = test_float$(EXEEXT) test_trig$(EXEEXT) \
test_bits$(EXEEXT) test_packet$(EXEEXT) test_mkgmtime$(EXEEXT) \
test_geoid$(EXEEXT) test_json$(EXEEXT) $(am__EXEEXT_4)
@LIBGPSMM_ENABLE_TRUE@am__append_1 = test_gpsmm

# Warning: This overrides autoconf's normal link-line generatyion process
# Warning: This overrides autoconf's normal link-line generation process
@LIBGPSMM_ENABLE_TRUE@am__append_2 = libgpsmm.cpp
@HAVE_PYTHON_TRUE@am__append_3 = stamp-python-modules stamp-python-modules.tmp
@HAVE_XSLT_PROCESSOR_TRUE@am__append_4 = stamp-gps-manpages stamp-gps-manpages.tmp
@@ -101,11 +101,10 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(pythondir)" "$(DESTDIR)$(pythondir)" \
"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
"$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" \
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \
"$(DESTDIR)$(includedir)"
"$(DESTDIR)$(pythondir)" "$(DESTDIR)$(man1dir)" \
"$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" \
"$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libgps_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -121,8 +120,8 @@ am__libgps_la_SOURCES_DIST = ais_json.c bits.c bsd-base64.c crc24q.c \
driver_italk.c driver_navcom.c driver_nmea.c driver_oncore.c \
driver_rtcm2.c driver_rtcm3.c driver_sirf.c \
driver_superstar2.c driver_tsip.c driver_ubx.c driver_zodiac.c \
bsd-base64.h timebase.h bits.h crc24q.h driver_rtcm2.h \
packet_states.h libgpsmm.cpp
sockaddr.h bsd-base64.h timebase.h bits.h crc24q.h \
driver_rtcm2.h packet_states.h libgpsmm.cpp
am__objects_1 = ais_json.lo bits.lo bsd-base64.lo crc24q.lo \
gpsd_report.lo gpsutils.lo geoid.lo gpsd_json.lo hex.lo \
isgps.lo json.lo libgps_core.lo libgps_json.lo gpsdclient.lo \
@@ -141,11 +140,10 @@ am_libgps_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
nodist_libgps_la_OBJECTS =
libgps_la_OBJECTS = $(am_libgps_la_OBJECTS) \
$(nodist_libgps_la_OBJECTS)
@HAVE_MOTIF_TRUE@am__EXEEXT_1 = xgps$(EXEEXT)
@HAVE_XAW_TRUE@am__EXEEXT_2 = xgpsspeed$(EXEEXT)
@HAVE_RTCM104V2_TRUE@am__EXEEXT_3 = gpsdecode$(EXEEXT)
@HAVE_NCURSES_TRUE@am__EXEEXT_4 = cgps$(EXEEXT) gpsmon$(EXEEXT)
@LIBGPSMM_ENABLE_TRUE@am__EXEEXT_5 = test_gpsmm$(EXEEXT)
@HAVE_XAW_TRUE@am__EXEEXT_1 = xgpsspeed$(EXEEXT)
@HAVE_RTCM104V2_TRUE@am__EXEEXT_2 = gpsdecode$(EXEEXT)
@HAVE_NCURSES_TRUE@am__EXEEXT_3 = cgps$(EXEEXT) gpsmon$(EXEEXT)
@LIBGPSMM_ENABLE_TRUE@am__EXEEXT_4 = test_gpsmm$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
am_cgps_OBJECTS = cgps.$(OBJEXT)
cgps_OBJECTS = $(am_cgps_OBJECTS)
@@ -205,12 +203,9 @@ test_mkgmtime_DEPENDENCIES = $(am__DEPENDENCIES_1) libgps.la
am_test_packet_OBJECTS = test_packet.$(OBJEXT)
test_packet_OBJECTS = $(am_test_packet_OBJECTS)
test_packet_DEPENDENCIES = $(am__DEPENDENCIES_1) libgps.la
am_xgps_OBJECTS = xgps.$(OBJEXT)
xgps_OBJECTS = $(am_xgps_OBJECTS)
xgps_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libgps.la
am_test_trig_OBJECTS = test_trig.$(OBJEXT)
test_trig_OBJECTS = $(am_test_trig_OBJECTS)
test_trig_DEPENDENCIES = $(am__DEPENDENCIES_1) libgps.la
am__objects_5 = xgpsspeed.$(OBJEXT) Tachometer.$(OBJEXT)
am_xgpsspeed_OBJECTS = $(am__objects_5)
xgpsspeed_OBJECTS = $(am_xgpsspeed_OBJECTS)
@@ -218,7 +213,7 @@ xgpsspeed_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) libgps.la $(am__DEPENDENCIES_1)
am__dist_bin_SCRIPTS_DIST = gpsprof gpsfake gpscat
am__dist_bin_SCRIPTS_DIST = gpsprof gpsfake gpscat xgps
SCRIPTS = $(dist_bin_SCRIPTS) $(noinst_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -249,15 +244,16 @@ SOURCES = $(libgps_la_SOURCES) $(nodist_libgps_la_SOURCES) \
$(test_float_SOURCES) $(test_geoid_SOURCES) \
$(test_gpsmm_SOURCES) $(test_json_SOURCES) \
$(test_mkgmtime_SOURCES) $(test_packet_SOURCES) \
$(xgps_SOURCES) $(xgpsspeed_SOURCES)
$(test_trig_SOURCES) $(xgpsspeed_SOURCES)
DIST_SOURCES = $(am__libgps_la_SOURCES_DIST) $(cgps_SOURCES) \
$(gpsctl_SOURCES) $(gpsd_SOURCES) $(gpsdecode_SOURCES) \
$(gpsmon_SOURCES) $(gpspipe_SOURCES) $(gpxlogger_SOURCES) \
$(lcdgps_SOURCES) $(test_bits_SOURCES) $(test_float_SOURCES) \
$(test_geoid_SOURCES) $(am__test_gpsmm_SOURCES_DIST) \
$(test_json_SOURCES) $(test_mkgmtime_SOURCES) \
$(test_packet_SOURCES) $(xgps_SOURCES) $(xgpsspeed_SOURCES)
am__python_PYTHON_DIST = gps.py gpsfake.py gpscap.py
$(test_packet_SOURCES) $(test_trig_SOURCES) \
$(xgpsspeed_SOURCES)
am__python_PYTHON_DIST = gpscap.py
py_compile = $(top_srcdir)/py-compile
man1dir = $(mandir)/man1
man3dir = $(mandir)/man3
@@ -374,9 +370,7 @@ X11_LIBS = @X11_LIBS@
XAW_LIBS = @XAW_LIBS@
XEXT_LIBS = @XEXT_LIBS@
XMKMF = @XMKMF@
XM_LIBS = @XM_LIBS@
XPM_LIBS = @XPM_LIBS@
XP_LIBS = @XP_LIBS@
XT_LIBS = @XT_LIBS@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
@@ -471,24 +465,16 @@ XMLTO = xmlto
# Conditionally add programs depending on libraries that may or may not be present.
#
@HAVE_NCURSES_TRUE@CURSESPROGS = cgps gpsmon
@HAVE_MOTIF_TRUE@MOTIF_PROGS = xgps
@HAVE_XAW_TRUE@XAW_PROGS = xgpsspeed
@HAVE_DBUS_TRUE@INCLUDES = $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) -DDBUS_API_SUBJECT_TO_CHANGE=1
RTCM104PAGES_DIST = gpsdecode.1
@HAVE_RTCM104V2_TRUE@RTCM104PROGS = gpsdecode
@HAVE_RTCM104V2_TRUE@RTCM104PAGES = $(RTCM104PAGES_DIST)
PYTHONPAGES_DIST = gpsprof.1 gpsfake.1 gpscat.1
@HAVE_PYTHON_TRUE@dist_bin_SCRIPTS = gpsprof gpsfake gpscat
@HAVE_PYTHON_TRUE@python_PYTHON = gps.py gpsfake.py gpscap.py
@HAVE_PYTHON_TRUE@nodist_python_PYTHON = gpspacket.so gpslib.so
@HAVE_PYTHON_TRUE@dist_bin_SCRIPTS = gpsprof gpsfake gpscat xgps
@HAVE_PYTHON_TRUE@python_PYTHON = gpscap.py
@HAVE_PYTHON_TRUE@PYTHONPAGES = $(PYTHONPAGES_DIST)

#
# Build xgps
#
xgps_SOURCES = xgps.c
xgps_LDADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(XM_LIBS) $(XT_LIBS) $(X_LIBS) $(X_PRE_LIBS) libgps.la -lm

#
# Build xgpsspeed
#
@@ -608,6 +594,7 @@ libgpsd_c_sources = \
driver_zodiac.c

libgpsd_h_sources = \
sockaddr.h \
bsd-base64.h \
timebase.h \
bits.h \
@@ -624,14 +611,12 @@ libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
#
# Build Python binding
#
# install may require --root depending on what you're doing.
# python setup.py install --root=$DESTIR --prefix=$PREFIX
@HAVE_PYTHON_TRUE@PYEXTENSIONS = gpspacket.so gpslib.so
@HAVE_PYTHON_TRUE@noinst_SCRIPTS = gpspacket.so gpslib.so setup.py
@LIBGPSMM_ENABLE_FALSE@TESTBINS = test_float test_bits test_packet test_geoid \
@LIBGPSMM_ENABLE_FALSE@TESTBINS = test_float test_trig test_bits test_packet test_geoid \
@LIBGPSMM_ENABLE_FALSE@ test_mkgmtime test_json

@LIBGPSMM_ENABLE_TRUE@TESTBINS = test_float test_gpsmm test_bits test_packet test_geoid \
@LIBGPSMM_ENABLE_TRUE@TESTBINS = test_float test_trig test_gpsmm test_bits test_packet test_geoid \
@LIBGPSMM_ENABLE_TRUE@ test_mkgmtime test_json


@@ -641,6 +626,12 @@ libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
test_float_SOURCES = test_float.c
test_float_LDADD = $(LIBC) libgps.la -lm

#
# Build test_trig
#
test_trig_SOURCES = test_trig.c
test_trig_LDADD = $(LIBC) libgps.la -lm

#
# Build test_gpsmm
#
@@ -682,7 +673,6 @@ MANPAGES_BASE = \
xgpsspeed.1 \
cgps.1 \
lcdgps.1 \
cgpxlogger.1 \
libgps.3 \
libgpsmm.3 \
libgpsd.3 \
@@ -717,8 +707,11 @@ nodist_include_HEADERS = gpsd.h
@LIBGPSMM_ENABLE_TRUE@include_HEADERS = gps.h libgpsmm.h

# Note: packaging/gpsd.spec is generated, but it needs to be in the
# tarball in order for 'make diat-rpm' to work.
# tarball in order for 'make diat-rpm' to work. The BUILT_SOURCES
# files are here in order to minimize build dependencies for package
# builders who never alter anything, especially the Python dependency.
EXTRA_DIST = \
$(BUILT_SOURCES) \
revision.h \
autogen.sh \
README \
@@ -731,6 +724,7 @@ EXTRA_DIST = \
maskaudit.py.in \
dgpsip-servers \
test_float.c \
test_trig.c \
gpsd.php \
gpsd.xml \
gpsd.h-head \
@@ -749,7 +743,6 @@ EXTRA_DIST = \
rtcm-104.xml \
srec.xml \
$(MANPAGES_DIST) \
xgps.ad \
xgpsspeed.ad \
gpsd.rules \
gpsd.hotplug \
@@ -758,7 +751,7 @@ EXTRA_DIST = \
valgrind-audit \
valgrind-suppressions \
gpspacket.c \
gpslib.c \
gpsclient.c \
driver_proto.c \
monitor_proto.c \
setup.py \
@@ -769,7 +762,9 @@ EXTRA_DIST = \
packaging/gpsd.spec \
packaging/etc_default_gpsd \
packaging/etc_init.d_gpsd \
packaging/etc_init.d_gpsd_rpm
packaging/etc_init.d_gpsd_rpm \
regress-driver \
test

pkgconfig_DATA = libgps.pc libgpsd.pc
pkgconfigdir = $(libdir)/pkgconfig
@@ -1035,9 +1030,9 @@ test_mkgmtime$(EXEEXT): $(test_mkgmtime_OBJECTS) $(test_mkgmtime_DEPENDENCIES)
test_packet$(EXEEXT): $(test_packet_OBJECTS) $(test_packet_DEPENDENCIES)
@rm -f test_packet$(EXEEXT)
$(LINK) $(test_packet_OBJECTS) $(test_packet_LDADD) $(LIBS)
xgps$(EXEEXT): $(xgps_OBJECTS) $(xgps_DEPENDENCIES)
@rm -f xgps$(EXEEXT)
$(LINK) $(xgps_OBJECTS) $(xgps_LDADD) $(LIBS)
test_trig$(EXEEXT): $(test_trig_OBJECTS) $(test_trig_DEPENDENCIES)
@rm -f test_trig$(EXEEXT)
$(LINK) $(test_trig_OBJECTS) $(test_trig_LDADD) $(LIBS)
xgpsspeed$(EXEEXT): $(xgpsspeed_OBJECTS) $(xgpsspeed_DEPENDENCIES)
@rm -f xgpsspeed$(EXEEXT)
$(LINK) $(xgpsspeed_OBJECTS) $(xgpsspeed_LDADD) $(LIBS)
@@ -1150,7 +1145,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_json.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mkgmtime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_packet.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgps.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_trig.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgpsspeed.Po@am__quote@

.c.o:
@@ -1203,44 +1198,6 @@ clean-libtool:

distclean-libtool:
-rm -f libtool config.lt
install-nodist_pythonPYTHON: $(nodist_python_PYTHON)
@$(NORMAL_INSTALL)
test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)"
@list='$(nodist_python_PYTHON)'; dlist=; list2=; test -n "$(pythondir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
$(am__strip_dir) \
dlist="$$dlist $$f"; \
list2="$$list2 $$b$$p"; \
else :; fi; \
done; \
for file in $$list2; do echo $$file; done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythondir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pythondir)" || exit $$?; \
done || exit $$?; \
if test -n "$$dlist"; then \
if test -z "$(DESTDIR)"; then \
PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythondir)" $$dlist; \
else \
PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythondir)" $$dlist; \
fi; \
else :; fi

uninstall-nodist_pythonPYTHON:
@$(NORMAL_UNINSTALL)
@list='$(nodist_python_PYTHON)'; test -n "$(pythondir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
filesc=`echo "$$files" | sed 's|$$|c|'`; \
fileso=`echo "$$files" | sed 's|$$|o|'`; \
echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pythondir)" && rm -f $$files || exit $$?; \
echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$filesc ")"; \
cd "$(DESTDIR)$(pythondir)" && rm -f $$filesc || exit $$?; \
echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$fileso ")"; \
cd "$(DESTDIR)$(pythondir)" && rm -f $$fileso
install-pythonPYTHON: $(python_PYTHON)
@$(NORMAL_INSTALL)
test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)"
@@ -1805,7 +1762,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
install-binPROGRAMS: install-libLTLIBRARIES

installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -1836,6 +1793,8 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
@HAVE_PYTHON_FALSE@install-exec-local:
@HAVE_PYTHON_FALSE@clean-local:
clean: clean-am

clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
@@ -1862,15 +1821,15 @@ info: info-am
info-am:

install-data-am: install-includeHEADERS install-man \
install-nodist_includeHEADERS install-nodist_pythonPYTHON \
install-pkgconfigDATA install-pythonPYTHON
install-nodist_includeHEADERS install-pkgconfigDATA \
install-pythonPYTHON

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am: install-binPROGRAMS install-dist_binSCRIPTS \
install-libLTLIBRARIES install-sbinPROGRAMS
install-exec-local install-libLTLIBRARIES install-sbinPROGRAMS

install-html: install-html-am

@@ -1915,8 +1874,8 @@ ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \
uninstall-includeHEADERS uninstall-libLTLIBRARIES \
uninstall-man uninstall-nodist_includeHEADERS \
uninstall-nodist_pythonPYTHON uninstall-pkgconfigDATA \
uninstall-pythonPYTHON uninstall-sbinPROGRAMS
uninstall-pkgconfigDATA uninstall-pythonPYTHON \
uninstall-sbinPROGRAMS

uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
uninstall-man8
@@ -1933,22 +1892,21 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-binPROGRAMS install-data \
install-data-am install-dist_binSCRIPTS install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-includeHEADERS install-info \
install-info-am install-libLTLIBRARIES install-man \
install-man1 install-man3 install-man5 install-man8 \
install-nodist_includeHEADERS install-nodist_pythonPYTHON \
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
install-ps-am install-pythonPYTHON install-sbinPROGRAMS \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \
uninstall-includeHEADERS uninstall-libLTLIBRARIES \
uninstall-man uninstall-man1 uninstall-man3 uninstall-man5 \
uninstall-man8 uninstall-nodist_includeHEADERS \
uninstall-nodist_pythonPYTHON uninstall-pkgconfigDATA \
install-dvi-am install-exec install-exec-am install-exec-local \
install-html install-html-am install-includeHEADERS \
install-info install-info-am install-libLTLIBRARIES \
install-man install-man1 install-man3 install-man5 \
install-man8 install-nodist_includeHEADERS install-pdf \
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
install-pythonPYTHON install-sbinPROGRAMS install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
uninstall-libLTLIBRARIES uninstall-man uninstall-man1 \
uninstall-man3 uninstall-man5 uninstall-man8 \
uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA \
uninstall-pythonPYTHON uninstall-sbinPROGRAMS


@@ -1986,7 +1944,7 @@ maskdump.c: gpsd.h-tail maskaudit.py
@HAVE_PYTHON_TRUE@ +@WITNESS=stamp-python-modules; $(MULTIOUT_RECOVER_DELETED)
# TODO: Should the dependency on libgps.la be enforced inside
# setup.py? (See the variable 'needed_files' in setup.py.)
@HAVE_PYTHON_TRUE@stamp-python-modules: gpspacket.c gpslib.c libgps.la setup.py
@HAVE_PYTHON_TRUE@stamp-python-modules: gpspacket.c gpsclient.c libgps.la setup.py
@HAVE_PYTHON_TRUE@ @rm -f '$@' '$@.tmp'
@HAVE_PYTHON_TRUE@ @echo 'timestamp for $@' > '$@.tmp'
@HAVE_PYTHON_TRUE@ (cd '$(srcdir)' && \
@@ -1998,9 +1956,14 @@ maskdump.c: gpsd.h-tail maskaudit.py
@HAVE_PYTHON_TRUE@ --include-dirs '$(srcdir):.'\
@HAVE_PYTHON_TRUE@ --mangenerator '$(MANGENERATOR)') && \
@HAVE_PYTHON_TRUE@ mv -f '$@.tmp' '$@'

# Clean up after Python
clean-local:
rm -rf build
@HAVE_PYTHON_TRUE@clean-local:
@HAVE_PYTHON_TRUE@ rm -rf build

# Install Python modules
@HAVE_PYTHON_TRUE@install-exec-local:
@HAVE_PYTHON_TRUE@ $(PYTHON) setup.py install --prefix=${prefix} # --root=$(DESTDIR)

@HAVE_XSLT_PROCESSOR_TRUE@.xml.1:
@HAVE_XSLT_PROCESSOR_TRUE@ $(MANGENERATOR) $(MANFLAGS) $(MANTARGET) $<
@@ -2015,7 +1978,7 @@ clean-local:
@HAVE_XSLT_PROCESSOR_TRUE@ $(MANGENERATOR) $(MANFLAGS) $(MANTARGET) $<

# Another instance of the multiple-outputs hack.
@HAVE_XSLT_PROCESSOR_TRUE@gps.1 xgps.1 xgpsspeed.1 cgps.1 lcdgps.1 cgpxlogger.1: stamp-gps-manpages
@HAVE_XSLT_PROCESSOR_TRUE@gps.1 xgps.1 xgpsspeed.1 cgps.1 lcdgps.1: stamp-gps-manpages
@HAVE_XSLT_PROCESSOR_TRUE@ +@WITNESS=stamp-gps-manpages; $(MULTIOUT_RECOVER_DELETED)
@HAVE_XSLT_PROCESSOR_TRUE@stamp-gps-manpages: gps.xml
@HAVE_XSLT_PROCESSOR_TRUE@ @rm -f '$@' '$@.tmp'
@@ -2024,13 +1987,11 @@ clean-local:
@HAVE_XSLT_PROCESSOR_TRUE@ mv -f '$@.tmp' '$@'

# These are not distributed
libgps: libgps_core.c .libs/libgps.a
libgps: libgps_core.c gps.h .libs/libgps.a
$(CC) $(CFLAGS) -o libgps -lm -DTESTMAIN $(LIBPTHREAD) -g libgps_core.c .libs/libgps.a
splint: gpsd.h packet_names.h
@echo "Running splint on daemon and libraries..."
-splint $(SPLINTOPTS) -exportlocal -redef $(gpsd_c_sources) $(libgpsd_c_sources)
@echo "Running splint on xgps..."
-splint $(SPLINTOPTS) -exportlocal $(xgps_SOURCES)
@echo "Running splint on cgps..."
-splint $(SPLINTOPTS) -exportlocal $(cgps_SOURCES)
@echo "Running splint on xgpsspeed..."
@@ -2054,6 +2015,10 @@ splint: gpsd.h packet_names.h
@echo "Running splint on test_json test harness..."
-splint $(SPLINTOPTS) $(test_json_SOURCES)

# Report cppcheck warnings. Requires 1.40 or later.
cppcheck: gpsd.h packet_names.h
cppcheck --template gcc --all --force .

# Re-indenting to a uniform style would be nice, and we leave this here
# as a rough guide to the project style, but it turns out that indent is
# an excessively blunt instrument. As of 2.2.10 it doesn't honor -nfca
@@ -2065,10 +2030,6 @@ indent:
chmod u-w maskdump.c
@echo "Diff lines:" `svn diff | wc -l`

# Bogon-checking the Python tools
pychecker:
for f in gps.py gpsfake.py leapsecond.py; do pychecker $$f; done

version:
@echo $(VERSION)



+ 16
- 1
NEWS View File

@@ -1,9 +1,24 @@
* Mon Mar 1 2010 Eric S. Raymond <esr@snark.thyrsus.com> - 2.91
We have support for NMEA GLONASS sentences, and a regression test.
Clients now get a DEVICE dotification on every driver switch. It is
possible to specify a TCP/IP AIS feed such as AISHub as a data
source. Serious bitrot in the NTRIP support has been fixed - it was
probably nonfunctional for several releases before this. Fixed
buggy display of satellite-used flags in cgps. xgps is replaced by
a rewrite in Python that uses pygtk, eliminating a dependency on
Motif; also, it now displays AIS information. Uniform treatment of
display-unit defaulting and -u in xgps, cgps, and lcdgps. Support
for AIS message types 25 and 26. Support for IPv6. A numeric
instability in the earth_distance() function affecting track error
modeling has been fixed. Old protocol has been removed from the
daemon; the library still speaks it.

* Fri Dec 4 2009 Eric S. Raymond <esr@snark.thyrsus.com> - 2.90
GPSD-NG, the new JSON-based command protocol, is now deployed; as a
consequence, AIS is now fully supported in both daemon and client.
Detection of end of a fix-reporting cycle is now reliable;
accordingly data is accumulated from cycle start and the "J"
(nojitter) opoption on both server and client side is gone. We have
(nojitter) option on both server and client side is gone. We have
abandoned the gpsflash subproject since it has become apparent that
we can't do it without more vendor cooperation than we're likely to
get. Increase major version of shared library due to significant API


+ 34
- 66
TODO View File

@@ -1,4 +1,4 @@
$Id: TODO 6705 2009-12-04 12:59:50Z esr $
$Id: TODO 7011 2010-03-01 02:22:09Z esr $

This is the gpsd to-do list. If you're viewing it with Emacs, try
doing Ctl-C Ctl-t and browsing through the outline headers. Ctl-C Ctl-a
@@ -26,23 +26,36 @@ to reverse his refusal to send us an eval unit.

*** Driver issues

**** bu303-nofix.log.ck:
**** Geodetic fix computation is numerically unstable:

Test returns a bogus altitude (large and negative) on NetBSD 5.0
i386, but not on Intel 64. This is probably a 32-vs.64-bit port problem.
In the bu303-nofix.log test, the expected-correct output has an
altitude of -6378137m, about earth radius, with lat/lon of 180,0. On
NetBSD 5.0/i386, the altitude is -6378253m, on NetBSD 5.0/amd64 it is
-6378253m, and on NetBSD 5.0/sparc64 it is -6378171m. On Linux/i386,
it is -6378143m.

**** navcom.chk:
Altitude is computed by geoid.c:ecef_to_wgs84fix(), which is a pile of
trig calculations. As usual, sin() and cos() aren't guaranteed to be
cross-architecture stable throughout their range. Note that bu303 logs
with valid fixes have not been problematic. It is not clear that
anyone has hand-validated the expected output.

This testfile triggers a numeric instability in the sin() and cos()
functions inside earth_distance(). The result is that epd is unstable.
(amd64 is what NetBSD labels all implementations of AMD's 64-bit
architecture; the machine in question above is an Intel CPU under
Xen.)

**** superstar2.chk:

Packet detection appears to fail completely on big-endian machines.
Greg Troxel reports this from netbsd-5/sparc64. Output at
<http://www.lexort.com/gpsd/>. The problem is very likely in the
packet-checksum computation, which looks a bit dodgy.

** To do:

*** Ship a DEVICE notification on every driver change
*** Finish gpssim

There's a race condition where if you start cgps at just the right
time while an NMEA device is being probed, it may switch to a binary
type but never update the type display.
It's blocked on skyview computation.

*** Complete and test the speed/parity/stopbit methods in the drivers

@@ -60,12 +73,6 @@ These are used for the '?DEVICE' (old 'B') command. All work for 8N1.
SiRF, UBX, TSIP, and even Zodiac can support non-8N1 modes; these need
to be tested.

*** Rewrite xgps

The Motif/Lesstif dependency is a pain in the butt, the code is a
maintainability problem, and we'd like to extend it to display AIS
messages. Probably the thing to do is write something pygtk-based.

*** Support the D-Bus signals recognized by libgypsy

Ian Holmes's Gypsy daemon is a pale shadow of GPSD, but his ideas
@@ -80,48 +87,6 @@ available, gpsd ships them to the serial device from which the GPS is
reporting fix data. Some GPSes have auxiliary ports for RTCM;
there should be a (privileged) command to redirect RTCM connections.

*** libgps should try to automatically try to reconnect when a poll fails

Petter Reinholdtsen suggests:

At the moment, when a gpsd client using libgps is connected to the
gpsd server, and the server is restarted, the client loses the
connection and do not update any more.

It would be nice if gps_poll() would try to reconnect to the server if
the read() and write() calls on the tcp socket fail.

To test this, start gpsd first (/etc/init.d/gpsd start), xgps second,
and then restart gpsd (/etc/init.d/gpsd restart). The xgps client
will fail to update any more.

I realised how nice this feature would be while comparing the xgps
client to the roadgps client (part of the roadmap package). The
roadgps client would reconnect to the new server and keep updating as
soon as the server was available. :)

On second thought, and after discussing this on the gpsd mailing list,
I believe the reconnect need to be handled by the applications in
addition to the library. Applications will commonly use the file
descriptor to detect incoming data, and this file descriptor will
change on reconnect.

So I rephrase my wish, and ask for reconnect functionality in xgps
instead. It will make sure the library support reconnects, and also
provide an example for other clients using the library.

(ESR thinks maybe this ought to be done at library level anyway, with
users warned that the gps_fd member of the gps_data_t structure may
change on reconnect and shouldn't be cached. This wouldn't be hard to
implement, but it would change gps_data_t and require a library
version bump.)

This is Berlios FR #3789.

*** Full Python wrapper for libgpsd

This would be useful for test code of all kinds.

*** Per-driver restore of changed config settings on exit.

This is a solved problem for generic NMEA, EverMore, TripMate,
@@ -151,13 +116,6 @@ checking to see if it's already on, and stops navigation methods on
wrapup. It also forces the set of sentences issued. There doesn't
seem to be any way to query these settings.

*** Merge cgps and xgps

Possibly cgps and xgps should merge into a single test client that honors the
GPSD_UNITS environment variable and chooses its UI mode depending on
whether or not it's running under X. There is controversy about this
proposal on the dev list.

*** Industry-standard format dumping of raw satellite data

It would be useful to be able to extract RINEX (or some other standard)
@@ -342,6 +300,16 @@ http://www.twinsun.com/tz/tz-link.htm
Free time-zone maps of the U.S.
http://www.manifold.net/download/freemaps.html

** Documentation

*** GeoClue

Figure out how gpsd should relate to GeoClue and explain this. A
particular question is the dbus interface to gpsd and the GeoClue
provider interface. There is quite possibly nothing to do; GeoClue
using gpsd's published interfaces seems sensible.
http://www.freedesktop.org/wiki/Software/GeoClue

Local variables:
mode: outline
paragraph-separate: "[ ]*$"


+ 10
- 6
ais_json.c View File

@@ -36,16 +36,20 @@ int json_ais_read(const char *buf,
struct ais_t *ais,
/*@null@*/const char **endptr)
{
/* collected but not actually used yet */
bool scaled;
/*@-compdef@*//* splint is confused by storage declared in the .i file */
/*@-nullstate@*/

#define AIS_HEADER \
{"class", check, .dflt.check = "AIS"}, \
{"type", uinteger, .addr.uinteger = &ais->type}, \
{"device", string, .addr.string = path, \
.len = pathlen}, \
{"repeat", uinteger, .addr.uinteger = &ais->repeat}, \
{"mmsi", uinteger, .addr.uinteger = &ais->mmsi}
{"class", t_check, .dflt.check = "AIS"}, \
{"type", t_uinteger, .addr.uinteger = &ais->type}, \
{"device", t_string, .addr.string = path, \
.len = pathlen}, \
{"repeat", t_uinteger, .addr.uinteger = &ais->repeat}, \
{"scaled", t_boolean, .addr.boolean = &scaled, \
.dflt.boolean = false}, \
{"mmsi", t_uinteger, .addr.uinteger = &ais->mmsi}

int status;



+ 467
- 0
ais_json.i View File

@@ -0,0 +1,467 @@
/*
* This is code generated by jsongen.py. Do not hand-hack it!
*/
/*@ -fullinitblock */


const struct json_attr_t json_ais1[] = {
AIS_HEADER,
{"status", t_uinteger, .addr.uinteger = &ais->type1.status,
.dflt.uinteger = 0},
{"turn", t_integer, .addr.integer = &ais->type1.turn,
.dflt.integer = AIS_TURN_NOT_AVAILABLE},
{"speed", t_uinteger, .addr.uinteger = &ais->type1.speed,
.dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
{"accuracy", t_boolean, .addr.boolean = &ais->type1.accuracy,
.dflt.boolean = false},
{"lon", t_integer, .addr.integer = &ais->type1.lon,
.dflt.integer = AIS_LON_NOT_AVAILABLE},
{"lat", t_integer, .addr.integer = &ais->type1.lat,
.dflt.integer = AIS_LAT_NOT_AVAILABLE},
{"course", t_uinteger, .addr.uinteger = &ais->type1.course,
.dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
{"heading", t_uinteger, .addr.uinteger = &ais->type1.heading,
.dflt.uinteger = AIS_HEADING_NOT_AVAILABLE},
{"second", t_uinteger, .addr.uinteger = &ais->type1.second,
.dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
{"maneuver", t_uinteger, .addr.uinteger = &ais->type1.maneuver,
.dflt.uinteger = AIS_SEC_INOPERATIVE},
{"raim", t_boolean, .addr.boolean = &ais->type1.raim,
.dflt.boolean = false},
{"radio", t_uinteger, .addr.uinteger = &ais->type1.radio,
.dflt.uinteger = 0},
{NULL},
};

char timestamp[JSON_VAL_MAX+1];
const struct json_attr_t json_ais4[] = {
AIS_HEADER,
{"timestamp", t_string, .addr.string = timestamp,
.len = sizeof(timestamp)},
{"accuracy", t_boolean, .addr.boolean = &ais->type4.accuracy,
.dflt.boolean = true},
{"lon", t_integer, .addr.integer = &ais->type4.lon,
.dflt.integer = AIS_LON_NOT_AVAILABLE},
{"lat", t_integer, .addr.integer = &ais->type4.lat,
.dflt.integer = AIS_LAT_NOT_AVAILABLE},
{"epfd", t_uinteger, .addr.uinteger = &ais->type4.epfd,
.dflt.uinteger = 0},
{"raim", t_boolean, .addr.boolean = &ais->type4.raim,
.dflt.boolean = false},
{"radio", t_uinteger, .addr.uinteger = &ais->type4.radio,
.dflt.uinteger = 0},
{NULL},
};

char eta[JSON_VAL_MAX+1];
const struct json_attr_t json_ais5[] = {
AIS_HEADER,
{"imo", t_uinteger, .addr.uinteger = &ais->type5.imo,
.dflt.uinteger = 0},
{"ais_version", t_uinteger, .addr.uinteger = &ais->type5.ais_version,
.dflt.uinteger = 0},
{"callsign", t_string, .addr.string = ais->type5.callsign,
.len = sizeof(ais->type5.callsign)},
{"shipname", t_string, .addr.string = ais->type5.shipname,
.len = sizeof(ais->type5.shipname)},
{"shiptype", t_uinteger, .addr.uinteger = &ais->type5.shiptype,
.dflt.uinteger = 0},
{"to_bow", t_uinteger, .addr.uinteger = &ais->type5.to_bow,
.dflt.uinteger = 0},
{"to_stern", t_uinteger, .addr.uinteger = &ais->type5.to_stern,
.dflt.uinteger = 0},
{"to_port", t_uinteger, .addr.uinteger = &ais->type5.to_port,
.dflt.uinteger = 0},
{"to_starboard", t_uinteger, .addr.uinteger = &ais->type5.to_starboard,
.dflt.uinteger = 0},
{"epfd", t_uinteger, .addr.uinteger = &ais->type5.epfd,
.dflt.uinteger = 0},
{"eta", t_string, .addr.string = eta,
.len = sizeof(eta)},
{"draught", t_uinteger, .addr.uinteger = &ais->type5.draught,
.dflt.uinteger = 0},
{"destination", t_string, .addr.string = ais->type5.destination,
.len = sizeof(ais->type5.destination)},
{"dte", t_uinteger, .addr.uinteger = &ais->type5.dte,
.dflt.uinteger = 1},
{NULL},
};

char data[JSON_VAL_MAX+1];
const struct json_attr_t json_ais6[] = {
AIS_HEADER,
{"seqno", t_uinteger, .addr.uinteger = &ais->type6.seqno,
.dflt.uinteger = 0},
{"dest_mmsi", t_uinteger, .addr.uinteger = &ais->type6.dest_mmsi,
.dflt.uinteger = 0},
{"retransmit", t_boolean, .addr.boolean = &ais->type6.retransmit,
.dflt.boolean = false},
{"app_id", t_uinteger, .addr.uinteger = &ais->type6.app_id,
.dflt.uinteger = 0},
{"data", t_string, .addr.string = data,
.len = sizeof(data)},
{NULL},
};

const struct json_attr_t json_ais7[] = {
AIS_HEADER,
{"mmsi1", t_uinteger, .addr.uinteger = &ais->type7.mmsi1,
.dflt.uinteger = 0},
{"mmsi2", t_uinteger, .addr.uinteger = &ais->type7.mmsi2,
.dflt.uinteger = 0},
{"mmsi3", t_uinteger, .addr.uinteger = &ais->type7.mmsi3,
.dflt.uinteger = 0},
{"mmsi4", t_uinteger, .addr.uinteger = &ais->type7.mmsi4,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais8[] = {
AIS_HEADER,
{"app_id", t_uinteger, .addr.uinteger = &ais->type8.app_id,
.dflt.uinteger = 0},
{"data", t_string, .addr.string = data,
.len = sizeof(data)},
{NULL},
};

const struct json_attr_t json_ais9[] = {
AIS_HEADER,
{"alt", t_uinteger, .addr.uinteger = &ais->type9.alt,
.dflt.uinteger = AIS_ALT_NOT_AVAILABLE},
{"speed", t_uinteger, .addr.uinteger = &ais->type9.speed,
.dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
{"accuracy", t_boolean, .addr.boolean = &ais->type9.accuracy,
.dflt.boolean = false},
{"lon", t_integer, .addr.integer = &ais->type9.lon,
.dflt.integer = AIS_LON_NOT_AVAILABLE},
{"lat", t_integer, .addr.integer = &ais->type9.lat,
.dflt.integer = AIS_LAT_NOT_AVAILABLE},
{"course", t_uinteger, .addr.uinteger = &ais->type9.course,
.dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
{"second", t_uinteger, .addr.uinteger = &ais->type9.second,
.dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
{"regional", t_uinteger, .addr.uinteger = &ais->type9.regional,
.dflt.uinteger = 0},
{"dte", t_uinteger, .addr.uinteger = &ais->type9.dte,
.dflt.uinteger = 1},
{"raim", t_boolean, .addr.boolean = &ais->type9.raim,
.dflt.boolean = false},
{"radio", t_uinteger, .addr.uinteger = &ais->type9.radio,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais10[] = {
AIS_HEADER,
{"dest_mmsi", t_uinteger, .addr.uinteger = &ais->type10.dest_mmsi,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais12[] = {
AIS_HEADER,
{"seqno", t_uinteger, .addr.uinteger = &ais->type12.seqno,
.dflt.uinteger = 0},
{"dest_mmsi", t_uinteger, .addr.uinteger = &ais->type12.dest_mmsi,
.dflt.uinteger = 0},
{"retransmit", t_boolean, .addr.boolean = &ais->type12.retransmit,
.dflt.boolean = 0},
{"text", t_string, .addr.string = ais->type12.text,
.len = sizeof(ais->type12.text)},
{NULL},
};

const struct json_attr_t json_ais14[] = {
AIS_HEADER,
{"text", t_string, .addr.string = ais->type14.text,
.len = sizeof(ais->type14.text)},
{NULL},
};

const struct json_attr_t json_ais15[] = {
AIS_HEADER,
{"mmsi1", t_uinteger, .addr.uinteger = &ais->type15.mmsi1,
.dflt.uinteger = 0},
{"type1_1", t_uinteger, .addr.uinteger = &ais->type15.type1_1,
.dflt.uinteger = 0},
{"offset1_1", t_uinteger, .addr.uinteger = &ais->type15.offset1_1,
.dflt.uinteger = 0},
{"type1_2", t_uinteger, .addr.uinteger = &ais->type15.type1_2,
.dflt.uinteger = 0},
{"offset1_2", t_uinteger, .addr.uinteger = &ais->type15.offset1_2,
.dflt.uinteger = 0},
{"mmsi2", t_uinteger, .addr.uinteger = &ais->type15.mmsi2,
.dflt.uinteger = 0},
{"type2_1", t_uinteger, .addr.uinteger = &ais->type15.type2_1,
.dflt.uinteger = 0},
{"offset2_1", t_uinteger, .addr.uinteger = &ais->type15.offset2_1,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais16[] = {
AIS_HEADER,
{"mmsi1", t_uinteger, .addr.uinteger = &ais->type16.mmsi1,
.dflt.uinteger = 0},
{"offset1", t_uinteger, .addr.uinteger = &ais->type16.offset1,
.dflt.uinteger = 0},
{"increment1", t_uinteger, .addr.uinteger = &ais->type16.increment1,
.dflt.uinteger = 0},
{"mmsi2", t_uinteger, .addr.uinteger = &ais->type16.mmsi2,
.dflt.uinteger = 0},
{"offset2", t_uinteger, .addr.uinteger = &ais->type16.offset2,
.dflt.uinteger = 0},
{"increment2", t_uinteger, .addr.uinteger = &ais->type16.increment2,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais17[] = {
AIS_HEADER,
{"lon", t_integer, .addr.integer = &ais->type17.lon,
.dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
{"lat", t_integer, .addr.integer = &ais->type17.lat,
.dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
{"data", t_string, .addr.string = data,
.len = sizeof(data)},
{NULL},
};

const struct json_attr_t json_ais18[] = {
AIS_HEADER,
{"reserved", t_uinteger, .addr.uinteger = &ais->type18.reserved,
.dflt.uinteger = 0},
{"speed", t_uinteger, .addr.uinteger = &ais->type18.speed,
.dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
{"accuracy", t_boolean, .addr.boolean = &ais->type18.accuracy,
.dflt.boolean = false},
{"lon", t_integer, .addr.integer = &ais->type18.lon,
.dflt.integer = AIS_LON_NOT_AVAILABLE},
{"lat", t_integer, .addr.integer = &ais->type18.lat,
.dflt.integer = AIS_LAT_NOT_AVAILABLE},
{"course", t_uinteger, .addr.uinteger = &ais->type18.course,
.dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
{"heading", t_uinteger, .addr.uinteger = &ais->type18.heading,
.dflt.uinteger = AIS_HEADING_NOT_AVAILABLE},
{"second", t_uinteger, .addr.uinteger = &ais->type18.second,
.dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
{"regional", t_uinteger, .addr.uinteger = &ais->type18.regional,
.dflt.uinteger = 0},
{"cs", t_boolean, .addr.boolean = &ais->type18.cs,
.dflt.boolean = false},
{"display", t_boolean, .addr.boolean = &ais->type18.display,
.dflt.boolean = false},
{"dsc", t_boolean, .addr.boolean = &ais->type18.dsc,
.dflt.boolean = false},
{"band", t_boolean, .addr.boolean = &ais->type18.band,
.dflt.boolean = false},
{"msg22", t_boolean, .addr.boolean = &ais->type18.msg22,
.dflt.boolean = false},
{"raim", t_boolean, .addr.boolean = &ais->type18.raim,
.dflt.boolean = false},
{"radio", t_uinteger, .addr.uinteger = &ais->type18.radio,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais19[] = {
AIS_HEADER,
{"reserved", t_uinteger, .addr.uinteger = &ais->type19.reserved,
.dflt.uinteger = 0},
{"speed", t_uinteger, .addr.uinteger = &ais->type19.speed,
.dflt.uinteger = AIS_SPEED_NOT_AVAILABLE},
{"accuracy", t_boolean, .addr.boolean = &ais->type19.accuracy,
.dflt.boolean = false},
{"lon", t_integer, .addr.integer = &ais->type19.lon,
.dflt.integer = AIS_LON_NOT_AVAILABLE},
{"lat", t_integer, .addr.integer = &ais->type19.lat,
.dflt.integer = AIS_LAT_NOT_AVAILABLE},
{"course", t_uinteger, .addr.uinteger = &ais->type19.course,
.dflt.uinteger = AIS_COURSE_NOT_AVAILABLE},
{"heading", t_uinteger, .addr.uinteger = &ais->type19.heading,
.dflt.uinteger = AIS_HEADING_NOT_AVAILABLE},
{"second", t_uinteger, .addr.uinteger = &ais->type19.second,
.dflt.uinteger = AIS_SEC_NOT_AVAILABLE},
{"regional", t_uinteger, .addr.uinteger = &ais->type19.regional,
.dflt.uinteger = 0},
{"shipname", t_string, .addr.string = ais->type19.shipname,
.len = sizeof(ais->type19.shipname)},
{"shiptype", t_uinteger, .addr.uinteger = &ais->type19.shiptype,
.dflt.uinteger = 0},
{"to_bow", t_uinteger, .addr.uinteger = &ais->type19.to_bow,
.dflt.uinteger = 0},
{"to_stern", t_uinteger, .addr.uinteger = &ais->type19.to_stern,
.dflt.uinteger = 0},
{"to_port", t_uinteger, .addr.uinteger = &ais->type19.to_port,
.dflt.uinteger = 0},
{"to_starboard", t_uinteger, .addr.uinteger = &ais->type19.to_starboard,
.dflt.uinteger = 0},
{"epfd", t_uinteger, .addr.uinteger = &ais->type19.epfd,
.dflt.uinteger = 0},
{"raim", t_boolean, .addr.boolean = &ais->type19.raim,
.dflt.boolean = false},
{"dte", t_uinteger, .addr.uinteger = &ais->type19.dte,
.dflt.uinteger = 1},
{"assigned", t_boolean, .addr.boolean = &ais->type19.assigned,
.dflt.boolean = false},
{NULL},
};

const struct json_attr_t json_ais20[] = {
AIS_HEADER,
{"offset1", t_uinteger, .addr.uinteger = &ais->type20.offset1,
.dflt.uinteger = 0},
{"number1", t_uinteger, .addr.uinteger = &ais->type20.number1,
.dflt.uinteger = 0},
{"timeout1", t_uinteger, .addr.uinteger = &ais->type20.timeout1,
.dflt.uinteger = 0},
{"increment1", t_uinteger, .addr.uinteger = &ais->type20.increment1,
.dflt.uinteger = 0},
{"offset2", t_uinteger, .addr.uinteger = &ais->type20.offset2,
.dflt.uinteger = 0},
{"number2", t_uinteger, .addr.uinteger = &ais->type20.number2,
.dflt.uinteger = 0},
{"timeout2", t_uinteger, .addr.uinteger = &ais->type20.timeout2,
.dflt.uinteger = 0},
{"increment2", t_uinteger, .addr.uinteger = &ais->type20.increment2,
.dflt.uinteger = 0},
{"offset3", t_uinteger, .addr.uinteger = &ais->type20.offset3,
.dflt.uinteger = 0},
{"number3", t_uinteger, .addr.uinteger = &ais->type20.number3,
.dflt.uinteger = 0},
{"timeout3", t_uinteger, .addr.uinteger = &ais->type20.timeout3,
.dflt.uinteger = 0},
{"increment3", t_uinteger, .addr.uinteger = &ais->type20.increment3,
.dflt.uinteger = 0},
{"offset4", t_uinteger, .addr.uinteger = &ais->type20.offset4,
.dflt.uinteger = 0},
{"number4", t_uinteger, .addr.uinteger = &ais->type20.number4,
.dflt.uinteger = 0},
{"timeout4", t_uinteger, .addr.uinteger = &ais->type20.timeout4,
.dflt.uinteger = 0},
{"increment4", t_uinteger, .addr.uinteger = &ais->type20.increment4,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais21[] = {
AIS_HEADER,
{"aid_type", t_uinteger, .addr.uinteger = &ais->type21.aid_type,
.dflt.uinteger = 0},
{"name", t_string, .addr.string = ais->type21.name,
.len = sizeof(ais->type21.name)},
{"accuracy", t_boolean, .addr.boolean = &ais->type21.accuracy,
.dflt.boolean = false},
{"lon", t_integer, .addr.integer = &ais->type21.lon,
.dflt.integer = AIS_LON_NOT_AVAILABLE},
{"lat", t_integer, .addr.integer = &ais->type21.lat,
.dflt.integer = AIS_LAT_NOT_AVAILABLE},
{"to_bow", t_uinteger, .addr.uinteger = &ais->type21.to_bow,
.dflt.uinteger = 0},
{"to_stern", t_uinteger, .addr.uinteger = &ais->type21.to_stern,
.dflt.uinteger = 0},
{"to_port", t_uinteger, .addr.uinteger = &ais->type21.to_port,
.dflt.uinteger = 0},
{"to_starboard", t_uinteger, .addr.uinteger = &ais->type21.to_starboard,
.dflt.uinteger = 0},
{"epfd", t_uinteger, .addr.uinteger = &ais->type21.epfd,
.dflt.uinteger = 0},
{"second", t_uinteger, .addr.uinteger = &ais->type21.second,
.dflt.uinteger = 0},
{"regional", t_uinteger, .addr.uinteger = &ais->type21.regional,
.dflt.uinteger = 0},
{"off_position", t_boolean, .addr.boolean = &ais->type21.off_position,
.dflt.boolean = false},
{"raim", t_boolean, .addr.boolean = &ais->type21.raim,
.dflt.boolean = false},
{"virtual_aid", t_boolean, .addr.boolean = &ais->type21.virtual_aid,
.dflt.boolean = false},
{NULL},
};

const struct json_attr_t json_ais22[] = {
AIS_HEADER,
{"channel_a", t_uinteger, .addr.uinteger = &ais->type22.channel_a,
.dflt.uinteger = 0},
{"channel_b", t_uinteger, .addr.uinteger = &ais->type22.channel_b,
.dflt.uinteger = 0},
{"txrx", t_uinteger, .addr.uinteger = &ais->type22.txrx,
.dflt.uinteger = 0},
{"power", t_boolean, .addr.boolean = &ais->type22.power,
.dflt.boolean = false},
{"ne_lon", t_integer, .addr.integer = &ais->type22.area.ne_lon,
.dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
{"ne_lat", t_integer, .addr.integer = &ais->type22.area.ne_lat,
.dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
{"sw_lon", t_integer, .addr.integer = &ais->type22.area.sw_lon,
.dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
{"sw_lat", t_integer, .addr.integer = &ais->type22.area.sw_lat,
.dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
{"dest1", t_uinteger, .addr.uinteger = &ais->type22.mmsi.dest1,
.dflt.uinteger = 0},
{"dest2", t_uinteger, .addr.uinteger = &ais->type22.mmsi.dest2,
.dflt.uinteger = 0},
{"addressed", t_boolean, .addr.boolean = &ais->type22.addressed,
.dflt.boolean = false},
{"band_a", t_boolean, .addr.boolean = &ais->type22.band_a,
.dflt.boolean = false},
{"band_b", t_boolean, .addr.boolean = &ais->type22.band_b,
.dflt.boolean = false},
{"zonesize", t_uinteger, .addr.uinteger = &ais->type22.zonesize,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais23[] = {
AIS_HEADER,
{"ne_lon", t_integer, .addr.integer = &ais->type23.ne_lon,
.dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
{"ne_lat", t_integer, .addr.integer = &ais->type23.ne_lat,
.dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
{"sw_lon", t_integer, .addr.integer = &ais->type23.sw_lon,
.dflt.integer = AIS_GNS_LON_NOT_AVAILABLE},
{"sw_lat", t_integer, .addr.integer = &ais->type23.sw_lat,
.dflt.integer = AIS_GNS_LAT_NOT_AVAILABLE},
{"stationtype", t_uinteger, .addr.uinteger = &ais->type23.stationtype,
.dflt.uinteger = 0},
{"shiptype", t_uinteger, .addr.uinteger = &ais->type23.shiptype,
.dflt.uinteger = 0},
{"txrx", t_uinteger, .addr.uinteger = &ais->type23.txrx,
.dflt.uinteger = 0},
{"interval", t_uinteger, .addr.uinteger = &ais->type23.interval,
.dflt.uinteger = 0},
{"quiet", t_uinteger, .addr.uinteger = &ais->type23.quiet,
.dflt.uinteger = 0},
{NULL},
};

const struct json_attr_t json_ais24[] = {
AIS_HEADER,
{"shipname", t_string, .addr.string = ais->type24.shipname,
.len = sizeof(ais->type24.shipname)},
{"shiptype", t_uinteger, .addr.uinteger = &ais->type24.shiptype,
.dflt.uinteger = 0},
{"vendorid", t_string, .addr.string = ais->type24.vendorid,
.len = sizeof(ais->type24.vendorid)},
{"callsign", t_string, .addr.string = ais->type24.callsign,
.len = sizeof(ais->type24.callsign)},
{"mothership_mmsi",t_uinteger, .addr.uinteger = &ais->type24.mothership_mmsi,
.dflt.uinteger = 0},
{"to_bow", t_uinteger, .addr.uinteger = &ais->type24.dim.to_bow,
.dflt.uinteger = 0},
{"to_stern", t_uinteger, .addr.uinteger = &ais->type24.dim.to_stern,
.dflt.uinteger = 0},
{"to_port", t_uinteger, .addr.uinteger = &ais->type24.dim.to_port,
.dflt.uinteger = 0},
{"to_starboard", t_uinteger, .addr.uinteger = &ais->type24.dim.to_starboard,
.dflt.uinteger = 0},
{NULL},
};


/*@ +fullinitblock */

/* Generated code ends. */


+ 7
- 6
bsd-base64.c View File

@@ -1,4 +1,4 @@
/* $Id: bsd-base64.c 5052 2009-01-21 10:42:24Z esr $ */
/* $Id: bsd-base64.c 6908 2010-01-02 22:29:16Z esr $ */
/* $OpenBSD: base64.c,v 1.3 1997/11/08 20:46:55 deraadt Exp $ */

/*
@@ -43,6 +43,8 @@
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/

#include <stdlib.h>
#include "gpsd_config.h"
#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)

#include <sys/types.h>
@@ -51,7 +53,6 @@
#include <stdlib.h>
#include <string.h>

#include "gpsd_config.h"
#include "bsd-base64.h"

#define Assert(Cond) if (!(Cond)) abort()
@@ -125,11 +126,11 @@ static const char Pad64 = '=';

/*@ +matchanyintegral -type @*/
int
b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
b64_ntop(unsigned char const *src, size_t srclength, char *target, size_t targsize)
{
size_t datalength = 0;
u_char input[3];
u_char output[4];
unsigned char input[3];
unsigned char output[4];
size_t i;

while (2 < srclength) {
@@ -194,7 +195,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)

/*@ +matchanyintegral +charint @*/
int
b64_pton(char const *src, u_char *target, size_t targsize)
b64_pton(char const *src, unsigned char *target, size_t targsize)
{
size_t tarindex;
int state, ch;


+ 3
- 3
bsd-base64.h View File

@@ -1,12 +1,12 @@
/* $Id: bsd-base64.h 4794 2008-08-03 16:42:57Z ckuethe $ */
/* $Id: bsd-base64.h 6908 2010-01-02 22:29:16Z esr $ */
#ifndef _BSD_BASE64_H
#define _BSD_BASE64_H

#ifndef HAVE___B64_NTOP
# ifndef HAVE_B64_NTOP
int b64_ntop(u_char const *src, size_t srclength, char *target,
int b64_ntop(unsigned char const *src, size_t srclength, char *target,
size_t targsize);
int b64_pton(char const *src, u_char *target, size_t targsize);
int b64_pton(char const *src, unsigned char *target, size_t targsize);
# endif /* !HAVE_B64_NTOP */
# define __b64_ntop b64_ntop
# define __b64_pton b64_pton


+ 68
- 32
cgps.c View File

@@ -1,4 +1,4 @@
/* $Id: cgps.c 6654 2009-12-01 08:52:02Z esr $ */
/* $Id: cgps.c 6856 2009-12-18 03:58:56Z esr $ */
/*
* Copyright (c) 2005 Jeff Francis <jeff@gritch.org>
*
@@ -450,14 +450,23 @@ static void update_gps_panel(struct gps_data_t *gpsdata,
char *message,
size_t len UNUSED)
{
int i,n;
int i,j, n;
int newstate;
char scr[128];
bool usedflags[MAXCHANNELS];

/* this is where we implement source-device filtering */
if (gpsdata->dev.path[0]!='\0' && source.device!=NULL && strcmp(source.device, gpsdata->dev.path) != 0)
return;

/* must build bit vector of which statellites are used from list */
for (i = 0; i < MAXCHANNELS; i++) {
usedflags [i] = false;
for (j = 0; j < gpsdata->satellites_used; j++)
if (gpsdata->used[j] == gpsdata->PRN[i])
usedflags[i] = true;
}

/* This is for the satellite status display. Originally lifted from
xgps.c. Note that the satellite list may be truncated based on
available screen size, or may only show satellites used for the
@@ -470,7 +479,7 @@ static void update_gps_panel(struct gps_data_t *gpsdata,
" %3d %02d %03d %02d %c",
gpsdata->PRN[i],
gpsdata->elevation[i], gpsdata->azimuth[i],
(int)gpsdata->ss[i], gpsdata->used[i] ? 'Y' : 'N');
(int)gpsdata->ss[i], usedflags[i] ? 'Y' : 'N');
} else {
(void)strlcpy(scr, "", sizeof(scr));
}
@@ -684,10 +693,37 @@ int main(int argc, char *argv[])
fd_set rfds;
int data;

/*@ -observertrans @*/
switch (gpsd_units())
{
case imperial:
altfactor = METERS_TO_FEET;
altunits = "ft";
speedfactor = MPS_TO_MPH;
speedunits = "mph";
break;
case nautical:
altfactor = METERS_TO_FEET;
altunits = "ft";
speedfactor = MPS_TO_KNOTS;
speedunits = "knots";
break;
case metric:
altfactor = 1;
altunits = "m";
speedfactor = MPS_TO_KPH;
speedunits = "kph";
break;
default:
/* leave the default alone */
break;
}
/*@ +observertrans @*/

/* Process the options. Print help if requested. */
while ((option = getopt(argc, argv, "hVl:smd:")) != -1) {
while ((option = getopt(argc, argv, "hVl:smuD:")) != -1) {
switch (option) {
case 'd':
case 'D':
debug = atoi(optarg);
#ifdef CLIENTDEBUG_ENABLE
gps_enable_debug(debug, stderr);
@@ -699,6 +735,32 @@ int main(int argc, char *argv[])
case 's':
silent_flag=true;
break;
case 'u':
/*@ -observertrans @*/
switch ( optarg[0] ) {
case 'i':
altfactor = METERS_TO_FEET;
altunits = "ft";
speedfactor = MPS_TO_MPH;
speedunits = "mph";
continue;
case 'n':
altfactor = METERS_TO_FEET;
altunits = "ft";
speedfactor = MPS_TO_KNOTS;
speedunits = "knots";
continue;
case 'm':
altfactor = 1;
altunits = "m";
speedfactor = MPS_TO_KPH;
speedunits = "kph";
continue;
default:
(void)fprintf(stderr, "Unknown -u argument: %s\n", optarg);
}
break;
/*@ +observertrans @*/
case 'V':
(void)fprintf(stderr, "xgps: %s (revision %s)\n",
VERSION, REVISION);
@@ -718,6 +780,7 @@ int main(int argc, char *argv[])
(void)fprintf(stderr, "Unknown -l argument: %s\n", optarg);
/*@ -casebreak @*/
}
break;
case 'h': default:
usage(argv[0]);
break;
@@ -730,33 +793,6 @@ int main(int argc, char *argv[])
} else
gpsd_source_spec(NULL, &source);

/*@ -observertrans @*/
switch (gpsd_units())
{
case imperial:
altfactor = METERS_TO_FEET;
altunits = "ft";
speedfactor = MPS_TO_MPH;
speedunits = "mph";
break;
case nautical:
altfactor = METERS_TO_FEET;
altunits = "ft";
speedfactor = MPS_TO_KNOTS;
speedunits = "knots";
break;
case metric:
altfactor = 1;
altunits = "m";
speedfactor = MPS_TO_KPH;
speedunits = "kph";
break;
default:
/* leave the default alone */
break;
}
/*@ +observertrans @*/

/* Open the stream to gpsd. */
/*@i@*/gpsdata = gps_open(source.server, source.port);
if (!gpsdata) {


+ 0
- 1
cgpxlogger.1 View File

@@ -1 +0,0 @@
.so man1/gps.1

+ 30
- 155
configure View File

@@ -766,10 +766,6 @@ HAVE_RTCM104V2_TRUE
HAVE_NCURSES_FALSE
HAVE_NCURSES_TRUE
NCURSES_LIBS
HAVE_MOTIF_FALSE
HAVE_MOTIF_TRUE
XM_LIBS
XP_LIBS
XPM_LIBS
XEXT_LIBS
HAVE_XAW_FALSE
@@ -3312,7 +3308,7 @@ fi

# Define the identity of the package.
PACKAGE=gpsd
VERSION=2.90
VERSION=2.91


cat >>confdefs.h <<_ACEOF
@@ -5705,13 +5701,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:5708: $ac_compile\"" >&5)
(eval echo "\"\$as_me:5704: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:5711: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:5707: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:5714: output\"" >&5)
(eval echo "\"\$as_me:5710: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6905,7 +6901,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 6908 "configure"' > conftest.$ac_ext
echo '#line 6904 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8163,11 +8159,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8166: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8162: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8170: \$? = $ac_status" >&5
echo "$as_me:8166: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8502,11 +8498,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8505: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8501: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8509: \$? = $ac_status" >&5
echo "$as_me:8505: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8607,11 +8603,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8610: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8606: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8614: \$? = $ac_status" >&5
echo "$as_me:8610: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8662,11 +8658,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8665: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8661: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8669: \$? = $ac_status" >&5
echo "$as_me:8665: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11045,7 +11041,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11048 "configure"
#line 11044 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
@@ -11141,7 +11137,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11144 "configure"
#line 11140 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
@@ -14027,11 +14023,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14030: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14026: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14034: \$? = $ac_status" >&5
echo "$as_me:14030: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14126,11 +14122,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14129: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14125: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14133: \$? = $ac_status" >&5
echo "$as_me:14129: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14178,11 +14174,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14181: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14177: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14185: \$? = $ac_status" >&5
echo "$as_me:14181: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16037,7 +16033,7 @@ if eval "test x$GCC = xyes"; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE"
fi

for ac_header in sys/termios.h sys/select.h sys/time.h sys/modem.h sys/ipc.h sys/shm.h sys/stat.h sys/socket.h
for ac_header in sys/termios.h sys/select.h sys/time.h sys/modem.h sys/ipc.h sys/shm.h sys/stat.h sys/socket.h sys/ioctl.h sys/un.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16081,7 +16077,7 @@ fi

done

for ac_header in termios.h strings.h getopt.h netdb.h
for ac_header in termios.h strings.h getopt.h netdb.h syslog.h pwd.h grp.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -17380,14 +17376,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libXt problem - xgps won't be built." >&5
$as_echo "$as_me: WARNING: libXt problem - xgps won't be built." >&2;}
fi
ac_fn_c_check_header_mongrel "$LINENO" "X11/Xaw/Label.h" "ac_cv_header_X11_Xaw_Label_h" "$ac_includes_default"
if test "x$ac_cv_header_X11_Xaw_Label_h" = x""yes; then :

else
motif_includes="no"
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawInitializeWidgetSet in -lXaw8" >&5
$as_echo_n "checking for XawInitializeWidgetSet in -lXaw8... " >&6; }
if test "${ac_cv_lib_Xaw8_XawInitializeWidgetSet+set}" = set; then :
@@ -17625,119 +17613,8 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libXpm problem - xgps won't be built." >&5
$as_echo "$as_me: WARNING: libXpm problem - xgps won't be built." >&2;}
fi

XM_LIBS=""
XP_LIBS=""
if test "$motif_includes" != "no" -a "$motif_libraries" != "no"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpSelectInput in -lXp" >&5
$as_echo_n "checking for XpSelectInput in -lXp... " >&6; }
if test "${ac_cv_lib_Xp_XpSelectInput+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXp ${X_PRE_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${LIBGEN} $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char XpSelectInput ();
int
main ()
{
return XpSelectInput ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xp_XpSelectInput=yes
else
ac_cv_lib_Xp_XpSelectInput=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpSelectInput" >&5
$as_echo "$ac_cv_lib_Xp_XpSelectInput" >&6; }
if test "x$ac_cv_lib_Xp_XpSelectInput" = x""yes; then :
XP_LIBS="-lXp"

$as_echo "#define HAVE_XP 1" >>confdefs.h

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmInternAtom in -lXm" >&5
$as_echo_n "checking for XmInternAtom in -lXm... " >&6; }
if test "${ac_cv_lib_Xm_XmInternAtom+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXm ${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${LIBGEN} $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.