[hamradio-commits] [xastir] 01/05: Imported Upstream version 2.0.8
Iain R. Learmonth
irl at moszumanska.debian.org
Tue Jul 26 15:42:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
irl pushed a commit to branch master
in repository xastir.
commit 73a658f65cf59d1cdf9aca60009a08f20227338b
Author: Iain R. Learmonth <irl at debian.org>
Date: Fri Jul 1 23:31:03 2016 +0100
Imported Upstream version 2.0.8
---
CanadaTopo250k.geo | 2 -
CanadaTopo50k.geo | 2 -
INSTALL | 29 +-
Makefile.am | 77 +-
Makefile.in | 77 +-
README.CVS | 6 +-
README.CYGWIN | 57 +-
README.MAPS | 4 +-
README.win32 | 32 +-
TXRadar.geo | 23 -
USRadar.geo | 37 -
WMSRadar.geo | 17 -
acinclude.m4 | 4 +-
callpass/Makefile.in | 14 +-
config.h.in | 3 -
config/Makefile.am | 3 +-
config/Makefile.in | 3 +-
config/language-Dutch.sys | 6 +-
config/language-ElmerFudd.sys | 4 +
config/language-English.sys | 6 +-
config/language-French.sys | 6 +-
config/language-German.sys | 6 +-
config/language-Italian.sys | 6 +-
config/language-MuppetsChef.sys | 4 +
config/language-OldeEnglish.sys | 4 +
config/language-PigLatin.sys | 4 +
config/language-PirateEnglish.sys | 4 +
config/language-Portuguese.sys | 6 +-
config/language-Spanish.sys | 6 +-
config/nwsc_ddmmyy_15.dbfawk | 59 +
configure | 429 ++++++-
configure.ac | 39 +-
help/help-English.dat | 7 +
scripts/Makefile.am | 9 +-
scripts/Makefile.in | 9 +-
scripts/ads-b.pl | 1224 ++++++++++++++++++
scripts/ais.pl | 2478 +++++++++++++++++++++++++++++++++++++
scripts/ais_pp.pl | 413 +++++++
scripts/get-BOMdata | 4 +-
scripts/get-NWSdata | 18 +-
scripts/get-maptools.sh | 370 ------
scripts/get_shapelib.sh | 189 ---
scripts/langElmerFudd.pl | 6 +-
scripts/langMuppetsChef.pl | 6 +-
scripts/langOldeEnglish.pl | 6 +-
scripts/langPigLatin.pl | 6 +-
scripts/langPirateEnglish.pl | 6 +-
src/Makefile.in | 14 +-
src/compiledate.c | 2 +-
src/db.c | 131 +-
src/draw_symbols.c | 322 +++--
src/draw_symbols.h | 7 +-
src/interface_gui.c | 22 +-
src/main.c | 258 +++-
src/main.h | 7 +-
src/rtree/Makefile.in | 14 +-
src/shapelib/Makefile.in | 14 +-
src/shapelib/contrib/Makefile.in | 85 +-
src/x_spider.c | 4 +-
src/xa_config.c | 18 +-
symbols/symbols.dat | 42 +-
terraserver-reflectivity.geo | 2 -
terraserver-topo.geo | 2 -
terraserver-urban.geo | 2 -
terraserver.geo | 2 -
xastir-min.spec | 4 +-
xastir.spec | 4 +-
67 files changed, 5344 insertions(+), 1342 deletions(-)
diff --git a/CanadaTopo250k.geo b/CanadaTopo250k.geo
deleted file mode 100644
index 661ca67..0000000
--- a/CanadaTopo250k.geo
+++ /dev/null
@@ -1,2 +0,0 @@
-TOPORAMA-250k
-
diff --git a/CanadaTopo50k.geo b/CanadaTopo50k.geo
deleted file mode 100644
index c503678..0000000
--- a/CanadaTopo50k.geo
+++ /dev/null
@@ -1,2 +0,0 @@
-TOPORAMA-50k
-
diff --git a/INSTALL b/INSTALL
index 574bc2f..bf41512 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
-$Id: INSTALL,v 1.108 2012/11/01 18:57:18 we7u Exp $
+$Id: INSTALL,v 1.110 2016/07/01 18:51:53 we7u Exp $
General steps to configure/compile/install Xastir:
@@ -619,31 +619,6 @@ First Time Install:
you. See the README.CVS file for sudo instructions.
- Note from Gale Wilkinson, kc4pl:
- > >
- > > How do you get shapelib to "make" properly under cygwin? I
- > > have installed the latest cygwin (packages per the win32
- > > install notes) and then downloaded and unpacked the latest
- > > shapelib source package for compiling. But when trying to do
- > > the "make lib" it errors out part way through the process.
- > > The error seems to be:
- > >
- > > dbfopen.lo: In function 'DBFReadAttribute':
- > > /home/gwilkinson/src/shapelib-1.2.10/dbfopen.c:724:undefined reference to '__getreent'
- > > /home/gwilkinson/src/shapelib-1.2.10/dbfopen.c:716:undefined reference to '__getreent'
- > > make: *** [lib] Error 1
-
- Dan Brown, n8ysz, responded:
- >
- > I wrote this to get/make shapelib:
- >
- > http://brauhaus.org/xastir/get_shapelib.sh
- > or
- > http://brauhaus.org/xastir/get_shapelib.sh.txt
-
- This script is now also in the Xastir sources as
- "xastir/scripts/get_shapelib.sh".
-
COMPILING OPTIONAL UTILITIES FOR SHAPELIB:
@@ -1619,5 +1594,5 @@ amount of memory while you're debugging memory leaks with libgc.
APRS(tm) is a Trademark of Bob Bruninga
Copyright (C) 1999 Frank Giannandrea
-Copyright (C) 2000-2012 The Xastir Group
+Copyright (C) 2000-2016 The Xastir Group
diff --git a/Makefile.am b/Makefile.am
index 6b83bc7..818da84 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
-# $Id: Makefile.am,v 1.60 2012/11/01 18:57:18 we7u Exp $
+# $Id: Makefile.am,v 1.64 2016/07/01 18:51:53 we7u Exp $
#
-# Copyright (C) 2000-2012 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#
AUTOMAKE_OPTIONS = gnu dist-bzip2
@@ -18,10 +18,9 @@ EXTRA_DIST = xastir.spec.in xastir.spec xastir-min.spec.in xastir-min.spec confi
missing mkinstalldirs placeholder FAQ LICENSE README README.CVS \
README.CYGWIN README.Getting-Started README.Contributing \
README.MAPS README.win32 README.OSM_maps testdbfawk.1 \
- DEBUG_LEVELS bootstrap.sh INSTALL UPGRADE callpass.1 xastir.1 xastir_udp_client.1 terraserver.geo \
- terraserver-reflectivity.geo terraserver-urban.geo worldhi.map \
- terraserver-topo.geo USRadar.geo CanadaTopo250k.geo \
- CanadaTopo50k.geo TXRadar.geo WMSRadar.geo Davis LaCrosse \
+ DEBUG_LEVELS bootstrap.sh INSTALL UPGRADE callpass.1 xastir.1 xastir_udp_client.1 \
+ worldhi.map \
+ Davis LaCrosse \
OSM_template \
CC_OpenStreetMap_logo.png CC_OpenStreetMap_txt.png \
COPYING COPYING.LIB.LESSTIF AUTHORS
@@ -43,16 +42,9 @@ mapdir=${pkgdatadir}/maps
map_DATA=worldhi.map CC_OpenStreetMap_logo.png CC_OpenStreetMap_txt.png
onlinedir=${pkgdatadir}/maps/Online
-online_DATA=terraserver.geo terraserver-topo.geo \
- terraserver-reflectivity.geo terraserver-urban.geo \
- USRadar.geo CanadaTopo250k.geo CanadaTopo50k.geo \
- TXRadar.geo WMSRadar.geo \
- OSM_cloudmade_1.geo OSM_cloudmade_2.geo \
- OSM_cloudmade_5.geo OSM_cloudmade_998.geo \
- OSM_cloudmade_999.geo OSM_tiled_cycle.geo OSM_tiled_mapnik.geo \
- OSM_tiled_osmarender.geo OSM_tiled_skiing.geo \
- OSM_tiled_topOSM_0_relief.geo \
- OSM_tiled_topOSM_1_contour.geo OSM_tiled_topOSM_2_features.geo
+online_DATA=OSM_tiled_cycle.geo OSM_tiled_mapnik.geo \
+ OSM_tiled_fosm.geo OSM_tiled_mapquest.geo \
+ OSM_tiled_mapquest-aerial.geo
gpsdir=${pkgdatadir}/maps/GPS
gps_DATA=placeholder
@@ -82,22 +74,6 @@ install-data-hook:
mandir=${prefix}/share/man
man_MANS=xastir.1 callpass.1 xastir_udp_client.1 testdbfawk.1
-# Tiles from cloudmade require an access code, so use the static map.
-OSM_cloudmade_1.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_1/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_2.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_2/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_5.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_5/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_998.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_998/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_999.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_999/' < $(top_srcdir)/OSM_template >$@
-
# Use tiles for these maps
OSM_tiled_cycle.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
@@ -111,41 +87,22 @@ OSM_tiled_mapnik.geo: OSM_template
-e 's/-STYLE/-mapnik/' \
< $(top_srcdir)/OSM_template >$@
-OSM_tiled_osmarender.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tah.openstreetmap.org/Tiles/tile/!' \
- -e 's/-STYLE/-osmarender/' \
- < $(top_srcdir)/OSM_template >$@
-
-OSM_tiled_skiing.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tiles.openpistemap.org/contours/!' \
- -e 's/-STYLE/-skiing/' \
- < $(top_srcdir)/OSM_template >$@
-
-OSM_tiled_topOSM_0_relief.geo: OSM_template
+OSM_tiled_fosm.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tile1.toposm.com/usw/color-relief/!' \
- -e 's/-STYLE/-topOSMr/' \
- -e 's/#TILE_EXT png/TILE_EXT jpg/' \
- -e 's/#ZOOM_LEVEL_MIN 0/ZOOM_LEVEL_MIN 5/' \
- -e 's/#ZOOM_LEVEL_MAX 18/ZOOM_LEVEL_MAX 15/' \
+ -e's!^#URL tileURL!URL http://map.fosm.org/default/!' \
+ -e 's/-STYLE/-fosm/' \
< $(top_srcdir)/OSM_template >$@
-OSM_tiled_topOSM_1_contour.geo: OSM_template
+OSM_tiled_mapquest.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tile1.toposm.com/usw/contours/!' \
- -e 's/-STYLE/-topOSMc/' \
- -e 's/#ZOOM_LEVEL_MIN 0/ZOOM_LEVEL_MIN 5/' \
- -e 's/#ZOOM_LEVEL_MAX 18/ZOOM_LEVEL_MAX 15/' \
+ -e's!^#URL tileURL!URL http://otile3.mqcdn.com/tiles/1.0.0/osm/!' \
+ -e 's/-STYLE/-mapquest/' \
< $(top_srcdir)/OSM_template >$@
-OSM_tiled_topOSM_2_features.geo: OSM_template
+OSM_tiled_mapquest-aerial.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tile1.toposm.com/usw/features/!' \
- -e 's/-STYLE/-topOSMf/' \
- -e 's/#ZOOM_LEVEL_MIN 0/ZOOM_LEVEL_MIN 5/' \
- -e 's/#ZOOM_LEVEL_MAX 18/ZOOM_LEVEL_MAX 15/' \
+ -e's!^#URL tileURL!URL http://otile3.mqcdn.com/tiles/1.0.0/sat/!' \
+ -e 's/-STYLE/-mapquest-aerial/' \
< $(top_srcdir)/OSM_template >$@
ChangeLog::
diff --git a/Makefile.in b/Makefile.in
index 475bb4e..dbf3a6b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,9 +14,9 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.60 2012/11/01 18:57:18 we7u Exp $
+# $Id: Makefile.am,v 1.64 2016/07/01 18:51:53 we7u Exp $
#
-# Copyright (C) 2000-2012 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#
VPATH = @srcdir@
@@ -314,10 +314,9 @@ EXTRA_DIST = xastir.spec.in xastir.spec xastir-min.spec.in xastir-min.spec confi
missing mkinstalldirs placeholder FAQ LICENSE README README.CVS \
README.CYGWIN README.Getting-Started README.Contributing \
README.MAPS README.win32 README.OSM_maps testdbfawk.1 \
- DEBUG_LEVELS bootstrap.sh INSTALL UPGRADE callpass.1 xastir.1 xastir_udp_client.1 terraserver.geo \
- terraserver-reflectivity.geo terraserver-urban.geo worldhi.map \
- terraserver-topo.geo USRadar.geo CanadaTopo250k.geo \
- CanadaTopo50k.geo TXRadar.geo WMSRadar.geo Davis LaCrosse \
+ DEBUG_LEVELS bootstrap.sh INSTALL UPGRADE callpass.1 xastir.1 xastir_udp_client.1 \
+ worldhi.map \
+ Davis LaCrosse \
OSM_template \
CC_OpenStreetMap_logo.png CC_OpenStreetMap_txt.png \
COPYING COPYING.LIB.LESSTIF AUTHORS
@@ -335,16 +334,9 @@ gnis_DATA = placeholder
mapdir = ${pkgdatadir}/maps
map_DATA = worldhi.map CC_OpenStreetMap_logo.png CC_OpenStreetMap_txt.png
onlinedir = ${pkgdatadir}/maps/Online
-online_DATA = terraserver.geo terraserver-topo.geo \
- terraserver-reflectivity.geo terraserver-urban.geo \
- USRadar.geo CanadaTopo250k.geo CanadaTopo50k.geo \
- TXRadar.geo WMSRadar.geo \
- OSM_cloudmade_1.geo OSM_cloudmade_2.geo \
- OSM_cloudmade_5.geo OSM_cloudmade_998.geo \
- OSM_cloudmade_999.geo OSM_tiled_cycle.geo OSM_tiled_mapnik.geo \
- OSM_tiled_osmarender.geo OSM_tiled_skiing.geo \
- OSM_tiled_topOSM_0_relief.geo \
- OSM_tiled_topOSM_1_contour.geo OSM_tiled_topOSM_2_features.geo
+online_DATA = OSM_tiled_cycle.geo OSM_tiled_mapnik.geo \
+ OSM_tiled_fosm.geo OSM_tiled_mapquest.geo \
+ OSM_tiled_mapquest-aerial.geo
gpsdir = ${pkgdatadir}/maps/GPS
gps_DATA = placeholder
@@ -1139,22 +1131,6 @@ install-data-hook:
rm -f CC_OpenStreetMap.png && \
$(LN_S) CC_OpenStreetMap_logo.png CC_OpenStreetMap.png
-# Tiles from cloudmade require an access code, so use the static map.
-OSM_cloudmade_1.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_1/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_2.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_2/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_5.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_5/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_998.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_998/' -e's/^#OSMSTATICMAP/OSMSTATICMAP/' < $(top_srcdir)/OSM_template >$@
-
-OSM_cloudmade_999.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/-STYLE/-layer=cloudmade_999/' < $(top_srcdir)/OSM_template >$@
-
# Use tiles for these maps
OSM_tiled_cycle.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
@@ -1168,41 +1144,22 @@ OSM_tiled_mapnik.geo: OSM_template
-e 's/-STYLE/-mapnik/' \
< $(top_srcdir)/OSM_template >$@
-OSM_tiled_osmarender.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tah.openstreetmap.org/Tiles/tile/!' \
- -e 's/-STYLE/-osmarender/' \
- < $(top_srcdir)/OSM_template >$@
-
-OSM_tiled_skiing.geo: OSM_template
- sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tiles.openpistemap.org/contours/!' \
- -e 's/-STYLE/-skiing/' \
- < $(top_srcdir)/OSM_template >$@
-
-OSM_tiled_topOSM_0_relief.geo: OSM_template
+OSM_tiled_fosm.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tile1.toposm.com/usw/color-relief/!' \
- -e 's/-STYLE/-topOSMr/' \
- -e 's/#TILE_EXT png/TILE_EXT jpg/' \
- -e 's/#ZOOM_LEVEL_MIN 0/ZOOM_LEVEL_MIN 5/' \
- -e 's/#ZOOM_LEVEL_MAX 18/ZOOM_LEVEL_MAX 15/' \
+ -e's!^#URL tileURL!URL http://map.fosm.org/default/!' \
+ -e 's/-STYLE/-fosm/' \
< $(top_srcdir)/OSM_template >$@
-OSM_tiled_topOSM_1_contour.geo: OSM_template
+OSM_tiled_mapquest.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tile1.toposm.com/usw/contours/!' \
- -e 's/-STYLE/-topOSMc/' \
- -e 's/#ZOOM_LEVEL_MIN 0/ZOOM_LEVEL_MIN 5/' \
- -e 's/#ZOOM_LEVEL_MAX 18/ZOOM_LEVEL_MAX 15/' \
+ -e's!^#URL tileURL!URL http://otile3.mqcdn.com/tiles/1.0.0/osm/!' \
+ -e 's/-STYLE/-mapquest/' \
< $(top_srcdir)/OSM_template >$@
-OSM_tiled_topOSM_2_features.geo: OSM_template
+OSM_tiled_mapquest-aerial.geo: OSM_template
sed -e '/THIS IS A TEMPLATE FILE/d' -e's/^#OSM_TILED_MAP/OSM_TILED_MAP/' \
- -e's!^#URL tileURL!URL http://tile1.toposm.com/usw/features/!' \
- -e 's/-STYLE/-topOSMf/' \
- -e 's/#ZOOM_LEVEL_MIN 0/ZOOM_LEVEL_MIN 5/' \
- -e 's/#ZOOM_LEVEL_MAX 18/ZOOM_LEVEL_MAX 15/' \
+ -e's!^#URL tileURL!URL http://otile3.mqcdn.com/tiles/1.0.0/sat/!' \
+ -e 's/-STYLE/-mapquest-aerial/' \
< $(top_srcdir)/OSM_template >$@
ChangeLog::
diff --git a/README.CVS b/README.CVS
index ffae564..06fc524 100644
--- a/README.CVS
+++ b/README.CVS
@@ -1,5 +1,5 @@
-$Id: README.CVS,v 1.31 2013/05/28 19:55:11 we7u Exp $
+$Id: README.CVS,v 1.32 2016/07/01 18:51:53 we7u Exp $
CVS Instructions:
@@ -431,7 +431,7 @@ Developer's CVS Instructions:
TBD.
A note from Tom regarding merges: Use the "-kk" option on all merges, otherwise every
- file that has "$Revision: 1.31 $" or "$Date: 2013/05/28 19:55:11 $" in it will get
+ file that has "$Revision: 1.32 $" or "$Date: 2016/07/01 18:51:53 $" in it will get
flagged as a change -- possibly even a conflict -- even if that's the only difference
between branch and head. "-kk" on a cvs update doesn't do substitution on those tags,
and so only files with real changes will get updated.
@@ -440,5 +440,5 @@ Developer's CVS Instructions:
------------------------------------------------------------------------
Copyright (C) 1999 Frank Giannandrea
-Copyright (C) 2000-2012 The Xastir Group
+Copyright (C) 2000-2016 The Xastir Group
diff --git a/README.CYGWIN b/README.CYGWIN
index 893a499..ae949b3 100644
--- a/README.CYGWIN
+++ b/README.CYGWIN
@@ -1,5 +1,5 @@
-$Id: README.CYGWIN,v 1.2 2012/11/01 18:57:18 we7u Exp $
+$Id: README.CYGWIN,v 1.4 2016/07/01 18:51:53 we7u Exp $
---------------------------------------------------------------------
@@ -53,8 +53,9 @@ System Requirements:
CPU: at least 1Ghz
Memory: at least 512Meg with at least 1Gig of swap space
OS: Windows 2000 or later
-Time: At least 6 hours if not using the get-maptools.sh script
- 24 to 48 hours if using the script
+Time: At least 6 hours
+ possibly as much as 48 hours if you have to build all of the
+ dependent packages from source on a slow machine
Please Note: It's beneficial to actually log in to your Windows
@@ -198,8 +199,8 @@ required:
[ ] font-xfree86-type1
[ ] gcc4
-[ ] gcc4-fortran (if you are going to use the get-maptools script)
-[ ] gcc4-objc (if you are going to use the get-maptools script)
+[ ] gcc4-fortran
+[ ] gcc4-objc
[ ] GraphicsMagick
[ ] gv
@@ -217,9 +218,9 @@ required:
[ ] libdb4.x-devel (pick the same x as db2.x above)
[ ] libfontconfig-devel
-[ ] libgeotiff (if you are NOT going to use the get-maptools script)
-[ ] libgeotiff-devel (if you are NOT going to use the get-maptools script)
-[ ] libgeotiff1 (if you are NOT going to use the get-maptools script)
+[ ] libgeotiff
+[ ] libgeotiff-devel
+[ ] libgeotiff1
[ ] libGraphicsMagick-devel
[ ] libGraphicsMagick3
@@ -227,8 +228,8 @@ required:
[ ] libpcrecpp-devel
[ ] libpng*-devel (pick the number that matches the already selected libpng* library)
-[ ] libproj-devel (if you are NOT going to use the get-maptools script)
-[ ] libproj1 (if you are NOT going to use the get-maptools script)
+[ ] libproj-devel
+[ ] libproj1
[ ] libtiff-devel
[ ] libtool
@@ -244,7 +245,7 @@ required:
[ ] pcre
[ ] perl
-[ ] proj (if you are NOT going to use the get-maptools script)
+[ ] proj
[ ] python
[ ] rcs
@@ -634,38 +635,6 @@ only. GPSMan/gpsmanshp may work on Cygwin at some point if enough
work is done to figure out and document the process.
-RECOMMENDED: Adding maptools:
-------------------------------------------------------------
-
-*******************************NOTE**************************************
-As of 10 November 2006, xastir's source tree contains a copy of shapelib
-1.2.10, and automatically builds shapelib if you don't have it installed.
-************************************************************************
-
-
-[ ] From a BASH shell, type:
-
- cd ~/src/xastir/scripts
- ./get-maptools.sh
- come back in six to 48 hours
-
-The last thing the script tries to do is compile GDAL. This is currently
-broken. Don't worry. The rest should have been installed just fine.
-
-[ ] Now you should be ready to configure and compile Xastir with
-Shapelib support. Type these commands:
-
- cd ~/src/xastir
- cvs update
- ./bootstrap.sh
- ./configure
- make
- make install
-
-
-See the README.MAPS file for where to get the maps.
-
-
OPTIONAL: Install Festival support:
------------------------------------
Allows using a synthesized voice from within Xastir for alerts,
@@ -853,5 +822,5 @@ complained about not finding libproj:
APRS(tm) is a Trademark of Bob Bruninga
-Copyright (C) 2003-2012 The Xastir Group
+Copyright (C) 2003-2016 The Xastir Group
diff --git a/README.MAPS b/README.MAPS
index b8f5e88..06ca742 100644
--- a/README.MAPS
+++ b/README.MAPS
@@ -1,5 +1,5 @@
-$Id: README.MAPS,v 1.107 2014/04/02 20:37:32 we7u Exp $
+$Id: README.MAPS,v 1.108 2016/07/01 18:51:53 we7u Exp $
Recommended Configurations for:
@@ -1518,5 +1518,5 @@ SUMMARY OF DISTANCE/AREA/ANGLE CALCULATIONS:
APRS(tm) is a Trademark of Bob Bruninga
Copyright (C) 1999 Frank Giannandrea
-Copyright (C) 2000-2012 The Xastir Group
+Copyright (C) 2000-2016 The Xastir Group
diff --git a/README.win32 b/README.win32
index a2ad5d5..ce08303 100644
--- a/README.win32
+++ b/README.win32
@@ -1,5 +1,5 @@
-$Id: README.win32,v 1.151 2012/11/01 18:57:18 we7u Exp $
+$Id: README.win32,v 1.153 2016/07/01 18:51:53 we7u Exp $
---------------------------------------------------------------------
Note that there are other options to get Xastir running on Win32.
@@ -818,34 +818,6 @@ See the README.MAPS file for where to get the maps, and a script to
automate the download/install for you.
-Note from Gale Wilkinson, kc4pl:
-> >
-> > How do you get shapelib to "make" properly under cygwin? I
-> > have installed the latest cygwin (packages per the win32
-> > install notes) and then downloaded and unpacked the latest
-> > shapelib source package for compiling. But when trying to do
-> > the "make lib" it errors out part way through the process.
-> > The error seems to be:
-> >
-> > dbfopen.lo: In function 'DBFReadAttribute':
-> > /home/gwilkinson/src/shapelib-1.2.10/dbfopen.c:724:undefined
-> > reference to '__getreent'
-> > /home/gwilkinson/src/shapelib-1.2.10/dbfopen.c:716:undefined
-> > reference to '__getreent'
-> > make: *** [lib] Error 1
-
-Dan Brown, n8ysz, responded:
->
-> I wrote this to get/make shapelib:
->
-> http://brauhaus.org/xastir/get_shapelib.sh
-> or
-> http://brauhaus.org/xastir/get_shapelib.sh.txt
-
-This script is now also in the Xastir sources as
-"xastir/scripts/get_shapelib.sh".
-
-
OPTIONAL: Adding ImageMagick:
--------------------------------------------------------------
@@ -1353,5 +1325,5 @@ complained about not finding libproj:
APRS(tm) is a Trademark of Bob Bruninga
-Copyright (C) 2003-2012 The Xastir Group
+Copyright (C) 2003-2016 The Xastir Group
diff --git a/TXRadar.geo b/TXRadar.geo
deleted file mode 100644
index d795090..0000000
--- a/TXRadar.geo
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id: TXRadar.geo,v 1.1 2004/10/05 15:54:25 we7u Exp $
-#
-#US Composite Radar image (Unidata/LDM/Gempak) n5jxs 2003 08 25
-URL http://mesonet.tamu.edu/gemdata/images/radar/01_mesonet.png
-# X Y Long Lat
-TIEPOINT 200 200 -104.80000 35.50000
-TIEPOINT 1130 1090 -95.50000 26.60000
-# Image extents: Lat: 24.6N to 37.5N, Lon: 93.5W to 106.8W (-93.5 to -106.8) # Image size extents: X: 1330 pixels, Y: 1290 pixels (.01 deg/pixel)
-IMAGESIZE 1330 1290
-#
-# REFRESH tells your program just how often to retrieve the radar
-# image. Images are recreated on the server every 6 minutes (720 sec).
-REFRESH 720
-# Transparent tells the program and image handling software what color
-#is to be considered transparent. In this case, it's white and valid
-# for a 24-bit color map.
-#TRANSPARENT 0xffffff
-# The following should work for a 16-bit color map.
-#TRANSPARENT 0x0ffff
-# The following should work for all color maps, now.
-TRANSPARENT 0x0ffffffff
-
diff --git a/USRadar.geo b/USRadar.geo
deleted file mode 100644
index 523e927..0000000
--- a/USRadar.geo
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# $Id: USRadar.geo,v 1.5 2006/12/01 21:47:11 we7u Exp $
-#
-#US Composite Radar image (Unidata/LDM/Gempak) n5jxs 2003 08 25
-# Modified for accuracy, comments: n5jxs 2004 03 15 1400UTC
-#
-# If you want to get a different image-type, change the selection
-# below by removing the '#' from the front of the URL, and placing
-# a '#' before all URLs for image-types you don't want.
-# I don't know what will happen if you have multiple URLs selected.
-URL http://mesonet.tamu.edu/gemdata/images/radar/01_USrad.png
-#URL http://mesonet.tamu.edu/gemdata/images/radar/01_USrad.gif
-#URL http://mesonet.tamu.edu/gemdata/images/radar/01_USrad.jpg
-#URL http://mesonet.tamu.edu/gemdata/images/radar/01_USrad.tif
-#
-#
-# X Y Long Lat
-TIEPOINT 200 200 -123.00000 48.00000
-TIEPOINT 5999 2499 -65.00000 23.00000
-# Image extents: Lat: 23.0N to 50.0N, Lon: 65.0W to 125.0W (-65.0 to -125.0)
-# Image size extents: X: 6000 pixels, Y: 2650 pixels (.01 deg/pixel)
-IMAGESIZE 6000 2500
-#
-# REFRESH tells your program just how often to retrieve the radar
-# image. Images are recreated on the server every 6 minutes (720
-# sec).
-REFRESH 720
-# Transparent tells the program and image handling software what
-# color is to be considered transparent. In this case, it's white
-# and valid for a 24-bit color map.
-#TRANSPARENT 0xffffff
-# The following should work for a 16-bit color map.
-#TRANSPARENT 0x0ffff
-# The following should work for all color maps, now.
-#TRANSPARENT 0x0ffffffff
-TRANSPARENT 0x000000000
-
diff --git a/WMSRadar.geo b/WMSRadar.geo
deleted file mode 100644
index 05f7def..0000000
--- a/WMSRadar.geo
+++ /dev/null
@@ -1,17 +0,0 @@
-WMSSERVER
-#URL http://mesonet.tamu.edu/cgi-bin/CONUSradar?SERVICE=WMS&LAYERS=radar,nwscounties
-URL http://mesonet.tamu.edu/cgi-bin/CONUSradar?SERVICE=WMS&LAYERS=radar&FORMAT=image/png&TRANSPARENT=TRUE&CRS=CRS:84&BGCOLOR=0x000000&VERSION=1.1.0
-#
-#
-# REFRESH tells your program just how often to retrieve the radar
-# image. Images are recreated on the server every 6 minutes (720
-# sec).
-REFRESH 720
-#
-#
-# Black
-TRANSPARENT 0x010101
-TRANSPARENT 0x000000
-# White
-TRANSPARENT 0xffffff
-
diff --git a/acinclude.m4 b/acinclude.m4
index 1d83e9f..7c9e958 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,8 +1,8 @@
# acinclude.m4 for Xastir
#
-# Copyright (C) 2000-2012 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#
-# $Id: acinclude.m4,v 1.91 2014/08/17 17:02:27 tvrusso Exp $
+# $Id: acinclude.m4,v 1.92 2016/07/01 18:51:53 we7u Exp $
# test for devices. Avoid the tests on Cygwin as they hang on some
# WinXP boxes.
diff --git a/callpass/Makefile.in b/callpass/Makefile.in
index 2da4b0f..e60da43 100644
--- a/callpass/Makefile.in
+++ b/callpass/Makefile.in
@@ -308,18 +308,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/callpass.Po at am__quote@
.c.o:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
diff --git a/config.h.in b/config.h.in
index 7dc7cd5..45f46d4 100644
--- a/config.h.in
+++ b/config.h.in
@@ -152,9 +152,6 @@
/* Define to 1 if you have the `Xm' library (-lXm). */
#undef HAVE_LIBXM
-/* Define to 1 if you have the `Xp' library (-lXp). */
-#undef HAVE_LIBXP
-
/* Define to 1 if you have the `Xpm' library (-lXpm). */
#undef HAVE_LIBXPM
diff --git a/config/Makefile.am b/config/Makefile.am
index bf65d30..d2d635c 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.57 2014/09/12 19:04:47 we7u Exp $
+# $Id: Makefile.am,v 1.58 2015/12/01 18:47:22 we7u Exp $
#
# Copyright (C) 2000-2014 The Xastir Group
#
@@ -38,6 +38,7 @@ EXTRA_DIST = \
nwsc_ddmmyy_10.dbfawk \
nwsc_ddmmyy_10a.dbfawk \
nwsc_ddmmyy_13.dbfawk \
+ nwsc_ddmmyy_15.dbfawk \
nwsmzddmmyy.dbfawk \
nwsmzddmmyy_09.dbfawk \
nwsmzddmmyy_11.dbfawk \
diff --git a/config/Makefile.in b/config/Makefile.in
index 478295a..bd24bd3 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.57 2014/09/12 19:04:47 we7u Exp $
+# $Id: Makefile.am,v 1.58 2015/12/01 18:47:22 we7u Exp $
#
# Copyright (C) 2000-2014 The Xastir Group
#
@@ -265,6 +265,7 @@ EXTRA_DIST = \
nwsc_ddmmyy_10.dbfawk \
nwsc_ddmmyy_10a.dbfawk \
nwsc_ddmmyy_13.dbfawk \
+ nwsc_ddmmyy_15.dbfawk \
nwsmzddmmyy.dbfawk \
nwsmzddmmyy_09.dbfawk \
nwsmzddmmyy_11.dbfawk \
diff --git a/config/language-Dutch.sys b/config/language-Dutch.sys
index ecf1740..40284de 100644
--- a/config/language-Dutch.sys
+++ b/config/language-Dutch.sys
@@ -1,4 +1,4 @@
-# $Id: language-Dutch.sys,v 1.240 2012/11/01 18:57:18 we7u Exp $
+# $Id: language-Dutch.sys,v 1.241 2016/04/23 02:12:48 n7ipb Exp $
#
# Copyright (C) 2000-2012 The Xastir Group
#
@@ -175,6 +175,7 @@ PULDNMBC12|Zwart||
PULDNMSL01|Zwarte Rand||
PULDNMSL02|Zwarte Schaduw en gevulde achtergrond||
PULDNMSL03|Tekst op Zwarte achtergond|T|
+PULDNMSL04|DropShadow||
#
# PullDown "Icon Outline Style"
PULDNMIO01|Geen Omranding|G|
@@ -208,6 +209,8 @@ PULDNDP045|Selecteer Objecten/Items||
PULDNDP026|- Selecteer weer Objecten/Items||
PULDNDP039|- Selecteer water Hoogte Objecten/Items||
PULDNDP031|- Selecteer andere Objecten/Items||
+PULDNDP057|- Selecteer Aircraft Object/Artikelen||
+PULDNDP058|- Selecteer Vessel Objecten/Artikelen||
PULDNDP033|Filter weergave||
PULDNDP010|Roepnaam|R|
PULDNDP012|Symbolen|y|
@@ -463,6 +466,7 @@ WPUPCFTM10|Nieuwe volg tijd (min)||
WPUPCFTM11|Nieuw volg Interval (graden)||
WPUPCFTM12|RINO -> Objecten Interval (min), 0 = Uitgeschakeld||
WPUPCFTM13|Snapshot Interval (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
#
# PopUp "Configure Coordinate System"
WPUPCFC001|Configureer coordinaten stelsel||
diff --git a/config/language-ElmerFudd.sys b/config/language-ElmerFudd.sys
index 33470db..d77472d 100644
--- a/config/language-ElmerFudd.sys
+++ b/config/language-ElmerFudd.sys
@@ -126,6 +126,7 @@ PULDNMBC12|Bwack||
PULDNMSL01|Bwack Bowdew|B|
PULDNMSL02|Bwack Shadow|S|
PULDNMSL03|Text on Bwack|T|
+PULDNMSL04|DwopShadow||
PULDNMIO01|No Outwine|N|
PULDNMIO02|Bwack Outwine|B|
PULDNMIO03|Gwey Outwine|G|
@@ -152,6 +153,8 @@ PULDNDP053| - Sewect CWOP WX Stations||
PULDNDP045|Sewect Objects/Items||
PULDNDP026|- Sewect WX Objects/Items||
PULDNDP039|- Sewect Watew Gauge Objects/Items||
+PULDNDP057|- Sewect Aiwcwaft Objects/Items||
+PULDNDP058|- Sewect Vessew Objects/Items||
PULDNDP031|- Sewect Odew Objects/Items||
PULDNDP033|Fiwtew Dispway||
PULDNDP010|Dispway Cawwsign||
@@ -388,6 +391,7 @@ WPUPCFTM10|New Twack Time (min)||
WPUPCFTM11|New Twack Intewvaw (degwees)||
WPUPCFTM12|WINO -> Objects Intewvaw (min), 0 = Disabwed||
WPUPCFTM13|Snapshot Intewvaw (min)||
+WPUPCFTM14|Aiwcwaft Ghost/Cweaw Time (min), 0 = Disabwed||
WPUPCFC001|Configuwe Coowdinate System||
WPUPCFC002|Sewect Coowdinate System||
WPUPCFC003|dd.ddddd|d|
diff --git a/config/language-English.sys b/config/language-English.sys
index b7b3d5c..fe9c6bb 100644
--- a/config/language-English.sys
+++ b/config/language-English.sys
@@ -1,4 +1,4 @@
-# $Id: language-English.sys,v 1.228 2012/11/01 18:57:18 we7u Exp $
+# $Id: language-English.sys,v 1.230 2016/04/25 04:30:06 n7ipb Exp $
#
# Copyright (C) 2000-2012 The Xastir Group
#
@@ -162,6 +162,7 @@ PULDNMBC12|Black||
PULDNMSL01|Black Border|B|
PULDNMSL02|Black Shadow|S|
PULDNMSL03|Text on Black|T|
+PULDNMSL04|DropShadow||
#
# PullDown "Icon Outline Style"
PULDNMIO01|No Outline|N|
@@ -194,6 +195,8 @@ PULDNDP053| - Select CWOP WX Stations||
PULDNDP045|Select Objects/Items||
PULDNDP026|- Select WX Objects/Items||
PULDNDP039|- Select Water Gauge Objects/Items||
+PULDNDP057|- Select Aircraft Objects/Items||
+PULDNDP058|- Select Vessel Objects/Items||
PULDNDP031|- Select Other Objects/Items||
PULDNDP033|Filter Display||
PULDNDP010|Display Callsign||
@@ -453,6 +456,7 @@ WPUPCFTM10|New Track Time (min)||
WPUPCFTM11|New Track Interval (degrees)||
WPUPCFTM12|RINO -> Objects Interval (min), 0 = Disabled||
WPUPCFTM13|Snapshot Interval (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
#
# PopUp "Configure Coordinate System"
WPUPCFC001|Configure Coordinate System||
diff --git a/config/language-French.sys b/config/language-French.sys
index 96f2a8f..ea03b06 100644
--- a/config/language-French.sys
+++ b/config/language-French.sys
@@ -1,4 +1,4 @@
-# $Id: language-French.sys,v 1.231 2012/11/01 18:57:18 we7u Exp $
+# $Id: language-French.sys,v 1.232 2016/04/23 02:12:48 n7ipb Exp $
#
# Copyright (C) 2000-2012 The Xastir Group
#
@@ -164,6 +164,7 @@ PULDNMBC12|Noir||
PULDNMSL01|Bordure noire|n|
PULDNMSL02|Ombr� avec toile de fond|O|
PULDNMSL03|Blanc sur noir|B|
+PULDNMSL04|DropShadow||
#
# PullDown "Icon Outline Style"
PULDNMIO01|Pas de contour|N|
@@ -197,6 +198,8 @@ PULDNDP045|Objets/articles||
PULDNDP026|- Objets/articles m�t�o||
PULDNDP039|- Objets/articles indicateurs d'eau||#'
PULDNDP031|- Autres objets/articles||
+PULDNDP057|- Selecte Aircraft objets/articles||
+PULDNDP058|- S�lectionnez l'objet du navire/Articles||
PULDNDP033|Filtrer affichage||
PULDNDP010|Afficher indicatif|n|
PULDNDP012|Afficher symbole|c|
@@ -455,6 +458,7 @@ WPUPCFTM10|D
WPUPCFTM11|Espace nouvelle piste (degr�s)||
WPUPCFTM12|RINO -> Intervalle d'objets (min), 0 = D�sactiv�||
WPUPCFTM13|Intervalle de capture instantan� (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
#
# PopUp "Configure Coordinate System"
WPUPCFC001|Configurer syst�me de coordonn�es||
diff --git a/config/language-German.sys b/config/language-German.sys
index 5ae4ef2..6d0bee6 100644
--- a/config/language-German.sys
+++ b/config/language-German.sys
@@ -1,4 +1,4 @@
-# $Id: language-German.sys,v 1.240 2012/11/01 18:57:18 we7u Exp $
+# $Id: language-German.sys,v 1.241 2016/04/23 02:12:48 n7ipb Exp $
#
# Copyright (C) 2000-2012 The Xastir Group
#
@@ -171,6 +171,7 @@ PULDNMBC12|Schwarz||
PULDNMSL01|Schwarze Umrandung|U|
PULDNMSL02|Schatten|S|
PULDNMSL03|Schwarzer Hintergrund|H|
+PULDNMSL04|DropShadow||
#
# PullDown "Symbol Umrandung"
PULDNMIO01|Keine Umrandung|K|
@@ -204,6 +205,8 @@ PULDNDP045|Objekte||
PULDNDP026|- Wetter Objekte||
PULDNDP039|- Regenmengen Objekte||
PULDNDP031|- Andere Objekte||
+PULDNDP057|- W�hlen Sie Flugzeug Objekte/Items||
+PULDNDP058|- W�hlen Sie Schiff Objekte/Items||
PULDNDP033|Anzeige filtern||
PULDNDP010|Rufzeichen||
PULDNDP012|Symbol||
@@ -459,6 +462,7 @@ WPUPCFTM10|Neue Spur Zeit (Min)||
WPUPCFTM11|Neue Spur Intervall (Grad)||
WPUPCFTM12|RINO -> Objekt Intervall (min), 0 = Aus||
WPUPCFTM13|Schnapschu�-Intervall (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
#
# PopUp "Koordinatensystem"
WPUPCFC001|Koordinatensystem||
diff --git a/config/language-Italian.sys b/config/language-Italian.sys
index c500443..f5de13d 100644
--- a/config/language-Italian.sys
+++ b/config/language-Italian.sys
@@ -1,4 +1,4 @@
-# $Id: language-Italian.sys,v 1.230 2012/11/01 18:57:18 we7u Exp $
+# $Id: language-Italian.sys,v 1.231 2016/04/23 02:12:48 n7ipb Exp $
#
# Copyright (C) 2000-2012 The Xastir Group
#
@@ -163,6 +163,7 @@ PULDNMBC12|Nero||
PULDNMSL01|Bordo nero||
PULDNMSL02|Ombra nera e sfondo uniforme||
PULDNMSL03|Testo su sfondo nero|T|
+PULDNMSL04|DropShadow||
#
# PullDown "Stile Bordo Icone"
PULDNMIO01|Nessun Bordo|N|
@@ -196,6 +197,8 @@ PULDNDP045|- Seleziona Oggetti/Dettagli||
PULDNDP026|- Seleziona Oggetti/Dettagli Meteo||
PULDNDP039|- Seleziona Oggetti/Dettagli Misura Acqua||
PULDNDP031|- Seleziona Altri Oggetti/Dettagli||
+PULDNDP057|- Selezionare i Vessel Oggetti/Articol||
+PULDNDP058|- Select Aircraft Oggetti/Articoli||
PULDNDP033|Visualizza Filtro||
PULDNDP010|Nominativo|l|
PULDNDP012|Simboli|Y|
@@ -451,6 +454,7 @@ WPUPCFTM10|Nuovo tempo della traccia (min)||
WPUPCFTM11|Nuovo intervallo della traccia (gradi)||
WPUPCFTM12|RINO -> Intervallo oggetto (min), 0 = Non attivo||
WPUPCFTM13|Snapshot Interval (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
#
# PopUp "Configure Coordinate System"
WPUPCFC001|Configura Sistema Coordinate||
diff --git a/config/language-MuppetsChef.sys b/config/language-MuppetsChef.sys
index 64e34a3..246e944 100644
--- a/config/language-MuppetsChef.sys
+++ b/config/language-MuppetsChef.sys
@@ -126,6 +126,7 @@ PULDNMBC12|Bleck||
PULDNMSL01|Bleck Burder|B|
PULDNMSL02|Bleck Sheduo|S|
PULDNMSL03|Text ouon Bleck|T|
+PULDNMSL04|DrupSheduo||
PULDNMIO01|Nu Ououotleene|N|
PULDNMIO02|Bleck Ououotleene|B|
PULDNMIO03|Grey Ououotleene|G|
@@ -152,6 +153,8 @@ PULDNDP053| - Select CVOP VX Steteeuns||
PULDNDP045|Select Ouobjects/Items||
PULDNDP026|- Select VX Ouobjects/Items||
PULDNDP039|- Select Veter Guoge-a Ouobjects/Items||
+PULDNDP057|- Select Iurcrefft Ouobjects/Items||
+PULDNDP058|- Select Fessel Ouobjects/Items||
PULDNDP031|- Select Ouozeer Ouobjects/Items||
PULDNDP033|FEElter Deespley||
PULDNDP010|DEEspley Cellseegn||
@@ -388,6 +391,7 @@ WPUPCFTM10|Nuo Treck Time-a (meen)||
WPUPCFTM11|Nuo Treck Interffel (degrees)||
WPUPCFTM12|RINO -> Ouobjects Interffel (meen), 0 = Deesebled||
WPUPCFTM13|Snepshut Interffel (meen)||
+WPUPCFTM14|Eurcrefft Ghust/Cleer Time-a (meen), 0 = Deesebled||
WPUPCFC001|Cunffeeguore-a Cuordeenete-a System||
WPUPCFC002|Select Cuordeenete-a System||
WPUPCFC003|dd.. Burk Burk Burk!ddddd|d|
diff --git a/config/language-OldeEnglish.sys b/config/language-OldeEnglish.sys
index 59c66f5..235a559 100644
--- a/config/language-OldeEnglish.sys
+++ b/config/language-OldeEnglish.sys
@@ -126,6 +126,7 @@ PULDNMBC12|Black||
PULDNMSL01|Black Bordre|B|
PULDNMSL02|Black Shadou|S|
PULDNMSL03|Textte onne Black|T|
+PULDNMSL04|DropShadou||
PULDNMIO01|No Outleenne|N|
PULDNMIO02|Black Outleenne|B|
PULDNMIO03|Greye Outleenne|G|
@@ -152,6 +153,8 @@ PULDNDP053| - Selectte CWOP WX Stations||
PULDNDP045|Selectte Objects/Items||
PULDNDP026|- Selectte WX Objects/Items||
PULDNDP039|- Selectte Watre Gauge Objects/Items||
+PULDNDP057|- Selectte Aircraftte Objects/Items||
+PULDNDP058|- Selectte Vessel Objects/Items||
PULDNDP031|- Selectte Othre Objects/Items||
PULDNDP033|Filtre Displye||
PULDNDP010|Displye Callsignne||
@@ -388,6 +391,7 @@ WPUPCFTM10|Newe Track Tym (minne)||
WPUPCFTM11|Newe Track Intreval (degree)||
WPUPCFTM12|RINO -> Objects Intreval (minne), 0 = Disablede||
WPUPCFTM13|Snapshotte Intreval (minne)||
+WPUPCFTM14|Aircraftte Ghostte/Clree Tym (minne), 0 = Disablede||
WPUPCFC001|Configurre Coordinate System||
WPUPCFC002|Selectte Coordinate System||
WPUPCFC003|dde.ddddde|d|
diff --git a/config/language-PigLatin.sys b/config/language-PigLatin.sys
index 9d5d4eb..957a376 100644
--- a/config/language-PigLatin.sys
+++ b/config/language-PigLatin.sys
@@ -126,6 +126,7 @@ PULDNMBC12|ackBlay||
PULDNMSL01|ackBlay orderBay|B|
PULDNMSL02|ackBlay adowShay|S|
PULDNMSL03|extTay onway ackBlay|T|
+PULDNMSL04|opDrayShadow||
PULDNMIO01|oNay utlineOay|N|
PULDNMIO02|ackBlay utlineOay|B|
PULDNMIO03|eyGray utlineOay|G|
@@ -152,6 +153,8 @@ PULDNDP053| - electSay CWOP WX ationsStay||
PULDNDP045|electSay ectsObjay/emsItay||
PULDNDP026|- electSay WX ectsObjay/emsItay||
PULDNDP039|- electSay aterWay augeGay ectsObjay/emsItay||
+PULDNDP057|- electSay ircraftAay ectsObjay/emsItay||
+PULDNDP058|- electSay esselVay ectsObjay/emsItay||
PULDNDP031|- electSay erOthay ectsObjay/emsItay||
PULDNDP033|ilterFay isplayDay||
PULDNDP010|isplayDay allsignCay||
@@ -388,6 +391,7 @@ WPUPCFTM10|ewNay ackTray imeTay (inmay)||
WPUPCFTM11|ewNay ackTray ervalIntay (egreesday)||
WPUPCFTM12|RINO -> ectsObjay ervalIntay (inmay), 0 = isabledDay||
WPUPCFTM13|apshotSnay ervalIntay (inmay)||
+WPUPCFTM14|ircraftAay ostGhay/earClay imeTay (inmay), 0 = isabledDay||
WPUPCFC001|onfigureCay oordinateCay ystemSay||
WPUPCFC002|electSay oordinateCay ystemSay||
WPUPCFC003|dday.ddddday|d|
diff --git a/config/language-PirateEnglish.sys b/config/language-PirateEnglish.sys
index 994c289..33a910e 100644
--- a/config/language-PirateEnglish.sys
+++ b/config/language-PirateEnglish.sys
@@ -126,6 +126,7 @@ PULDNMBC12|Black||
PULDNMSL01|Black Border|B|
PULDNMSL02|Black Shadow|S|
PULDNMSL03|Text on Black|T|
+PULDNMSL04|DropShadow||
PULDNMIO01|Nay Outline|N|
PULDNMIO02|Black Outline|B|
PULDNMIO03|Grey Outline|G|
@@ -152,6 +153,8 @@ PULDNDP053| - Choose 'yer Weapon! CWOP WX Ships||
PULDNDP045|Choose 'yer Weapon! Objects/Items||
PULDNDP026|- Choose 'yer Weapon! WX Objects/Items||
PULDNDP039|- Choose 'yer Weapon! Water Gauge Objects/Items||
+PULDNDP057|- Choose 'yer Weapon! Aircraft Objects/Items||
+PULDNDP058|- Choose 'yer Weapon! Vessel Objects/Items||
PULDNDP031|- Choose 'yer Weapon! Other Objects/Items||
PULDNDP033|Filter Display||
PULDNDP010|Display Callsign||
@@ -388,6 +391,7 @@ WPUPCFTM10|New Track Time (min)||
WPUPCFTM11|New Track Interval (degrees)||
WPUPCFTM12|RINO -> Objects Interval (min), 0 = Disabled||
WPUPCFTM13|Etchin' Interval (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
WPUPCFC001|Provision me' ship Coordinate System||
WPUPCFC002|Choose 'yer Weapon! Coordinate System||
WPUPCFC003|dd.ddddd|d|
diff --git a/config/language-Portuguese.sys b/config/language-Portuguese.sys
index 063a0c0..0936915 100644
--- a/config/language-Portuguese.sys
+++ b/config/language-Portuguese.sys
@@ -1,4 +1,4 @@
-# $Id: language-Portuguese.sys,v 1.227 2012/11/01 18:57:19 we7u Exp $
+# $Id: language-Portuguese.sys,v 1.228 2016/04/23 02:12:48 n7ipb Exp $
#
# Copyright (C) 2000-2012 The Xastir Group
#
@@ -162,6 +162,7 @@ PULDNMBC12|Preto||
PULDNMSL01|Fundo negro||
PULDNMSL02|Fundo cinzento||
PULDNMSL03|Texto em negro|T|
+PULDNMSL04|DropShadow||
#
# PullDown "Estilo da linha de fora do icon"
PULDNMIO01|Nao ha limite|N|
@@ -195,6 +196,8 @@ PULDNDP045|Mostrar objectos/items||
PULDNDP026|- Mostrar objectos/items metereologicos||
PULDNDP039|- Mostrar objectos de medida de agua/Items||
PULDNDP031|- Mostrar outros objectos/Items||
+PULDNDP057|- Selecionar objetos avi�o / Itens||
+PULDNDP058|- Seleccione navio Objetos / Itens||
PULDNDP033|Filtrar monitor||
PULDNDP010|Mostrar indicativo|i|
PULDNDP012|Mostrar simbolos|D|
@@ -450,6 +453,7 @@ WPUPCFTM10|Novo tempo de pista (min)||
WPUPCFTM11|Novo intervado de pista (degrees)||
WPUPCFTM12|RINO -> Intervalo de objectos (min), 0 = Desactivado||
WPUPCFTM13|Snapshot Interval (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
#
# PopUp "Sistema de configuracao de coordenadas"
WPUPCFC001|Sistema de configuracao de coordenadas||
diff --git a/config/language-Spanish.sys b/config/language-Spanish.sys
index 9a986ca..94f32f0 100644
--- a/config/language-Spanish.sys
+++ b/config/language-Spanish.sys
@@ -1,4 +1,4 @@
-# $Id: language-Spanish.sys,v 1.237 2012/11/01 18:57:19 we7u Exp $
+# $Id: language-Spanish.sys,v 1.238 2016/04/23 02:12:48 n7ipb Exp $
#
# Copyright (C) 2000-2012 The Xastir Group
#
@@ -161,6 +161,7 @@ PULDNMBC12|Negro||
PULDNMSL01|Fondo Negro||
PULDNMSL02|Fondo Gris||
PULDNMSL03|Texto en Negro|T|
+PULDNMSL04|DropShadow||
#
# PullDown "Icon Outline Style"
PULDNMIO01|No Outline|N|
@@ -194,6 +195,8 @@ PULDNDP045|- Seleccionar Objetos/Art
PULDNDP026|- Seleccionar Objetos/Art�culos de WX||
PULDNDP039|- Seleccionar Objetos/Art�culos Medidores de Agua||
PULDNDP031|- Seleccionar Otros Objetos/Art�culos||
+PULDNDP057|- Seleccione los objetos aeron�uticos/Art�culos||
+PULDNDP058|- Seleccionar objetos del buque / Art�culos||
PULDNDP033|Filtrar Visualizaci�n||
PULDNDP010|Mostrar Indicativo|I|
PULDNDP012|Mostrar S�mbolo|D|
@@ -449,6 +452,7 @@ WPUPCFTM10|Nuevo Tiempo Rastro (min)||
WPUPCFTM11|Nuevo Interval Rastro (grados)||
WPUPCFTM12|RINO -> Objects Interval (min), 0 = Disabled||
WPUPCFTM13|Snapshot Interval (min)||
+WPUPCFTM14|Aircraft Ghost/Clear Time (min), 0 = Disabled||
#
# Configurar Sistema de Coordenada"
WPUPCFC001|Configurar Sistema de Coordenada||
diff --git a/config/nwsc_ddmmyy_15.dbfawk b/config/nwsc_ddmmyy_15.dbfawk
new file mode 100644
index 0000000..41d7e11
--- /dev/null
+++ b/config/nwsc_ddmmyy_15.dbfawk
@@ -0,0 +1,59 @@
+# $Id: nwsc_ddmmyy_15.dbfawk,v 1.3 2015/12/08 17:22:15 we7u Exp $
+#
+# Copyright (C) 2003-2015 The Xastir Group
+#
+# This dbfawk file is used to map arbitrary dbf data that accompanies
+# a shapefile into Xastir canoncical values of:
+# key - search key
+# lanes - width of feature (usually a road but applies to rivers, etc. too)
+# color - color to draw the road
+# name - name of the road for labels
+# filled - whether a polygon is drawn filled or not
+# fill_color - color to fill polygon with
+# label_color - color for label
+# pattern - line pattern for road, river, etc.
+# display_level - highest zoom level at which to display the feature
+# label_level - highest zoom level at which to display the label
+# symbol - 3 char 'TIO': table, ID, overlay
+#
+# NOTE: This file format is modeled after awk but is nowhere near awk
+# compatible.
+#
+# This file is used to map NWS county polygon shapefiles
+# which are named c_ddmmyy.dbf. These are used for WX alerts but can also
+# be used as a map of all US counties. For the WX alert feature, the
+# key is set to the concatentation of the STATE and FIPS county code
+# in the same format as the alert->title (e.g. WI_C037).
+#
+# This DBFAWK file matches the set of county shapefiles that was published
+# by NOAA in 2015, which differs from earlier formats of these county
+# shapefiles.
+#
+
+# BEGIN is called once per dbf file which contains multiple records.
+BEGIN {
+# dbfinfo is the "signature" of the dbf file listing the column names in order.
+# dbfinfo should match the dbf file that we say this dbfawk file goes with.
+dbfinfo="LON:LAT:STATE:CWA:COUNTYNAME:FIPS:TIME_ZONE:FE_AREA";
+# dbffields is which of the above fields we actually want to look at.
+# Note that the order we list these is important since we are appending the
+# word County or Parish depending on what state the county is in.
+dbffields="STATE";
+}
+
+# BEGIN_RECORD is called once per dbf record which contains multiple fields.
+# Use this rule to re-initialize variables between records.
+BEGIN_RECORD {key="BOGUS"; lanes=1; fill_color=7; color=8; name=""; filled=1; fill_style=0; pattern=0; display_level=65536; label_level=512; label_color=20; font_size=2; symbol=""}
+
+# name: name is just the county name.
+#/^COUNTYNAME=(.*)$/ {name="$1"; font_size=4; next}
+# also append "County" to the name except for Louisiana, use Parish
+# (is this the only state that calls them something other than county?):
+# XXX check this whole LA thing. I think they call them parishes.
+#/^STATE=(LA)$/ {name="$name Parish"; key="$1"; next}
+#/^STATE=(..)$/ {name="$name County"; key="$1"; next}
+#/^FIPS=..(...)$/ {key="$(key)_C$1"; next}
+
+# don't need special end case handling...
+#END_RECORD {name="$name ($key)";}
+#END {}
diff --git a/configure b/configure
index 8fad12c..e232223 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xastir 2.0.6.
+# Generated by GNU Autoconf 2.69 for xastir 2.0.8.
#
# Report bugs to <xastir at xastir.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xastir'
PACKAGE_TARNAME='xastir'
-PACKAGE_VERSION='2.0.6'
-PACKAGE_STRING='xastir 2.0.6'
+PACKAGE_VERSION='2.0.8'
+PACKAGE_STRING='xastir 2.0.8'
PACKAGE_BUGREPORT='xastir at xastir.org'
PACKAGE_URL=''
@@ -1336,7 +1336,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xastir 2.0.6 to adapt to many kinds of systems.
+\`configure' configures xastir 2.0.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1410,7 +1410,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xastir 2.0.6:";;
+ short | recursive ) echo "Configuration of xastir 2.0.8:";;
esac
cat <<\_ACEOF
@@ -1533,7 +1533,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xastir configure 2.0.6
+xastir configure 2.0.8
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2059,7 +2059,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xastir $as_me 2.0.6, which was
+It was created by xastir $as_me 2.0.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2888,7 +2888,7 @@ fi
# Define the identity of the package.
PACKAGE='xastir'
- VERSION='2.0.6'
+ VERSION='2.0.8'
cat >>confdefs.h <<_ACEOF
@@ -2938,17 +2938,79 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
#AM_CONFIG_HEADER(config.h)
ac_config_headers="$ac_config_headers config.h"
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='xastir'
+ VERSION='2.0.8'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+mkdir_p="$MKDIR_P"
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
echo ""
-echo "Configuring xastir 2.0.6"
+echo "Configuring xastir 2.0.8"
echo ""
# Take out the dots in order to create the TOCALL
cat >>confdefs.h <<_ACEOF
-#define XASTIR_TOCALL "`echo 2.0.6 | sed -e 's/^/APX/' -e 's/\.//g'`"
+#define XASTIR_TOCALL "`echo 2.0.8 | sed -e 's/^/APX/' -e 's/\.//g'`"
_ACEOF
@@ -4007,6 +4069,134 @@ else
fi
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -5136,6 +5326,134 @@ else
fi
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7276,57 +7594,24 @@ _ACEOF
fi
-# It appears that XpGetDocumentData is not used
-# *anywhere* in Xastir, and the fact that this is being probed for has
-# confused at least one user into thinking he needed to install the X Printing
-# Extension development headers when it was completely unnecessary. But
-# apparently at least one linux system has a motif library that requires
-# libXp and doesn't link it in dynamically --- so this needs to be enabled?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpGetDocumentData in -lXp" >&5
-$as_echo_n "checking for XpGetDocumentData in -lXp... " >&6; }
-if ${ac_cv_lib_Xp_XpGetDocumentData+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXp $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 XpGetDocumentData ();
-int
-main ()
-{
-return XpGetDocumentData ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xp_XpGetDocumentData=yes
-else
- ac_cv_lib_Xp_XpGetDocumentData=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_XpGetDocumentData" >&5
-$as_echo "$ac_cv_lib_Xp_XpGetDocumentData" >&6; }
-if test "x$ac_cv_lib_Xp_XpGetDocumentData" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBXP 1
-_ACEOF
-
- LIBS="-lXp $LIBS"
-
-fi
+#***********************************
+# Check for libXp removed on 31 Oct 2015
+# This was in place for a very long time, but libxp is now deprecated and
+# has even been removed from some distros
+#
+# XpGetDocumentData is not used *anywhere* in Xastir, but some distros have
+# a Motif library that is linked against it. This is supposed to be
+# taken care of by the shared library loader, not by explicit linking, but
+# as late as 2007 some distros had it linked wrong. It appears as of 2015
+# that nobody still does that, and this check causes more harm than good.
+#
+# If the build of Xastir fails at link time looking for XpGetDocumentData,
+# then somebody *does* still do that incorrect shared library linking,
+# and y9ou'll need to re-enable this on your system
+#
+#AC_CHECK_LIB([Xp], [XpGetDocumentData])
+#************************************
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtDisplay in -lXt" >&5
$as_echo_n "checking for XtDisplay in -lXt... " >&6; }
if ${ac_cv_lib_Xt_XtDisplay+:} false; then :
@@ -10752,7 +11037,7 @@ $as_echo "#define HAVE_SHAPEFIL_H /**/" >>confdefs.h
if test $use_proj = "yes"
then
- CONTSHP="shpcentrd shpproj shpdata shpwkb"
+ CONTSHP="shpcentrd$(EXEEXT) shpproj$(EXEEXT) shpdata$(EXEEXT) shpwkb$(EXEEXT)"
fi
fi
@@ -12919,6 +13204,14 @@ else
am__EXEEXT_FALSE=
fi
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -12931,6 +13224,14 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${DAVIS_TRUE}" && test -z "${DAVIS_FALSE}"; then
as_fn_error $? "conditional \"DAVIS\" was never defined.
@@ -13333,7 +13634,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xastir $as_me 2.0.6, which was
+This file was extended by xastir $as_me 2.0.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13399,7 +13700,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-xastir config.status 2.0.6
+xastir config.status 2.0.8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -14294,7 +14595,7 @@ egrep -e "checking |result:|gcc version" config.log >> summary.log
echo ===========================================
echo
-echo xastir 2.0.6 has been configured to use the following
+echo xastir 2.0.8 has been configured to use the following
echo options and external libraries:
echo
echo MINIMUM OPTIONS:
diff --git a/configure.ac b/configure.ac
index 3841f93..22c503b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
# Process this file with autoconf to produce a configure script.
#
-# $Id: configure.ac,v 1.232 2014/09/12 19:04:47 we7u Exp $
+# $Id: configure.ac,v 1.237 2016/07/01 18:51:53 we7u Exp $
#
-# Copyright (C) 2000-2014 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#########################################################################
@@ -21,13 +21,13 @@
#
#
# AC_INIT():
-# It should look something like this: (xastir, 2.0.6, xastir at xastir.org)
+# It should look something like this: (xastir, 2.0.8, xastir at xastir.org)
# The revision number must contain at least one '.' and two digits.
# AM_INIT_AUTOMAKE():
-# It should look something like this: (xastir, 2.0.6)
+# It should look something like this: (xastir, 2.0.8)
# The revision number must contain at least one '.' and two digits.
#
-AC_INIT([xastir], [2.0.6], [xastir at xastir.org])
+AC_INIT([xastir], [2.0.8], [xastir at xastir.org])
AM_INIT_AUTOMAKE
#########################################################################
@@ -37,7 +37,7 @@ AC_PREREQ(2.53)
AC_CONFIG_SRCDIR([src/xastir.h])
#AM_CONFIG_HEADER(config.h)
AC_CONFIG_HEADERS(config.h)
-
+AM_INIT_AUTOMAKE([subdir-objects])
echo ""
@@ -136,13 +136,24 @@ LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
AC_SEARCH_LIBS(tan,math m)
AC_CHECK_LIB([Xext], [XextAddDisplay])
-# It appears that XpGetDocumentData is not used
-# *anywhere* in Xastir, and the fact that this is being probed for has
-# confused at least one user into thinking he needed to install the X Printing
-# Extension development headers when it was completely unnecessary. But
-# apparently at least one linux system has a motif library that requires
-# libXp and doesn't link it in dynamically --- so this needs to be enabled?
-AC_CHECK_LIB([Xp], [XpGetDocumentData])
+
+#***********************************
+# Check for libXp removed on 31 Oct 2015
+# This was in place for a very long time, but libxp is now deprecated and
+# has even been removed from some distros
+#
+# XpGetDocumentData is not used *anywhere* in Xastir, but some distros have
+# a Motif library that is linked against it. This is supposed to be
+# taken care of by the shared library loader, not by explicit linking, but
+# as late as 2007 some distros had it linked wrong. It appears as of 2015
+# that nobody still does that, and this check causes more harm than good.
+#
+# If the build of Xastir fails at link time looking for XpGetDocumentData,
+# then somebody *does* still do that incorrect shared library linking,
+# and y9ou'll need to re-enable this on your system
+#
+#AC_CHECK_LIB([Xp], [XpGetDocumentData])
+#************************************
AC_CHECK_LIB([Xt], [XtDisplay])
AC_CHECK_LIB([Xm], [XmTextFindString])
@@ -417,7 +428,7 @@ if test "${shapelib_desired}" = "yes" -a "${use_shapelib}" = "no"; then
if test $use_proj = "yes"
then
- CONTSHP="shpcentrd shpproj shpdata shpwkb"
+ CONTSHP="shpcentrd$(EXEEXT) shpproj$(EXEEXT) shpdata$(EXEEXT) shpwkb$(EXEEXT)"
fi
fi
AC_SUBST(SUBSHP)
diff --git a/help/help-English.dat b/help/help-English.dat
index a858ac6..ebc4f08 100644
--- a/help/help-English.dat
+++ b/help/help-English.dat
@@ -2279,6 +2279,13 @@ set up communications with it when the program first starts.
Selecting "Allow Transmitting" will tell Xastir that any outgoing RF data can
be sent to this device for broadcast.
+Selecting "Add Delay" will tell xastir to insert a one second delay
+between issuing the command to enter "Converse" mode and the actual
+data to be sent. This options exists solely to deal with the
+Kantronics KAM TNC, which will often fail to enter converse mode if it
+receives data immediately after the converse command is given. If you
+have a KAM, check this box, if not, leave it unchecked.
+
The TNC Port is the Unix device that the TNC (or TNC and GPS) is hooked to.
Normally you can use /dev/ttyS0 (com1), /dev/ttyS1 (com2) etc.
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 948848c..75598cc 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,10 +1,13 @@
-# $Id: Makefile.am,v 1.41 2012/11/27 04:41:23 tvrusso Exp $
+# $Id: Makefile.am,v 1.46 2016/07/01 18:51:53 we7u Exp $
#
-# Copyright (C) 2000-2012 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#
scriptsdir=${pkgdatadir}/scripts
dist_scripts_DATA = \
+ ads-b.pl \
+ ais.pl \
+ ais_pp.pl \
Coordinate.pm \
coord-convert.pl \
geopdf2gtiff.pl \
@@ -12,9 +15,7 @@ dist_scripts_DATA = \
get-fcc-rac.pl \
get-gnis \
get-pop \
- get-maptools.sh \
get-NWSdata \
- get_shapelib.sh \
gpx2shape \
icontable.pl \
inf2geo.pl \
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 56deba6..b919f50 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -14,9 +14,9 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.41 2012/11/27 04:41:23 tvrusso Exp $
+# $Id: Makefile.am,v 1.46 2016/07/01 18:51:53 we7u Exp $
#
-# Copyright (C) 2000-2012 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#
VPATH = @srcdir@
@@ -235,6 +235,9 @@ wget = @wget@
xfontsel = @xfontsel@
scriptsdir = ${pkgdatadir}/scripts
dist_scripts_DATA = \
+ ads-b.pl \
+ ais.pl \
+ ais_pp.pl \
Coordinate.pm \
coord-convert.pl \
geopdf2gtiff.pl \
@@ -242,9 +245,7 @@ dist_scripts_DATA = \
get-fcc-rac.pl \
get-gnis \
get-pop \
- get-maptools.sh \
get-NWSdata \
- get_shapelib.sh \
gpx2shape \
icontable.pl \
inf2geo.pl \
diff --git a/scripts/ads-b.pl b/scripts/ads-b.pl
new file mode 100755
index 0000000..73ac7e2
--- /dev/null
+++ b/scripts/ads-b.pl
@@ -0,0 +1,1224 @@
+#!/usr/bin/perl -W
+#
+# $Id: ads-b.pl,v 1.25 2016/04/22 23:03:28 we7u Exp $
+#
+# XASTIR, Amateur Station Tracking and Information Reporting
+# Copyright (C) 2016 The Xastir Group
+#
+# Converts "dump1090" telnet port output to Xastir UDP input, for decoding
+# packets directly from aircraft. This script will parse packets containing
+# lat/long, turn them into APRS-like packets, then use "xastir_udp_client"
+# to inject them into Xastir. Must have "dump1090" running, and optionally
+# "dump978" to dump packets into "dump1090" from the other frequency/protocol
+# for ADS-B.
+#
+#
+# TODO: Create probability circle around my position for aircraft sending altitude
+# but no lat/long. Change the size of the circle based on altitude and/or RSSI
+# (Need to tie into Beast-mode port, raw data port, or JSON port to get RSSI).
+# Would need to keep track of these objects and kill them when the aircraft timed-out
+# or sent lat/long. Could switch back to the circle when lat/long times out but
+# altitude is still coming in as well.
+#
+# TODO: Check everywhere that we set a variable to "". Make sure we're not setting
+# it when a sentence including it comes in, then resetting it on all other sentences
+# so that it never gets seen. "squawk_txt" and "squawk" were 2 of these.
+# Check everywhere that $fields[] are checked/saved/used.
+#
+# TODO: Expire data values from hashes XX minutes after receiving them.
+#
+#
+# Invoke it as:
+# ./ads-b.pl planes <passcode> [--circles] [--logging]
+#
+# If you add " --circles" to the end you'll also get a red circle around plane
+# symbols at your current location which represent the area that a plane might
+# be min, if it's only reporting altitude and not lat/long.
+#
+# If you add " --logging" to the end, this script will save the APRS portion of
+# the output to a file called "~/.xastir/logs/planes.log". You can later suck
+# this file back in to see the planes move around the map in hyperspeed. Useful
+# for a quick demo.
+#
+# Injecting them from "planes" or "p1anes" assures that Xastir won't try to adopt
+# the APRS Item packets as its own and re-transmit them.
+#
+#
+# I got the "dump1090" program from here originally:
+# https://github.com/antirez/dump1090
+# Newer fork:
+# https://github.com/MalcolmRobb/dump1090
+# Newer-yet fork, seems to decode much better:
+# https://github.com/mutability/dump1090
+#
+# Invoke Mutability's "dump1090" program like so:
+# "./dump1090 --interactive --net --net-sbs-port 30003 --phase-enhance --oversample --fix --ppm -1 --gain -10 --device-index 0
+#
+#
+# Note: There's also "dump978" which listens to 978 MHz ADS-B transmissions. You can
+# invoke "dump1090" as above, then invoke "dump978" like this:
+#
+# rtl_sdr -f 978000000 -s 2083334 -g 0 -d 1 - | ./dump978 | ./uat2esnt | nc -q1 localhost 30001
+#
+# which will convert the 978 MHz packets into ADS-B ES packets and inject them into "dump1090"
+# for decoding. I haven't determined yet whether those packets will come out on "dump1090"'s
+# port 30003 (which this Perl script uses). The above command also uses RTL device 1 instead of 0.
+# If you're only interested in 978 MHz decoding, there's a way to start "dump1090" w/o a
+# device attached, then start "dump978" and connect it to "dump1090".
+#
+# Then invoke this script in another xterm using "planes" as the callsign:
+# "./ads-b.pl planes <passcode>"
+#
+# NOTE: Do NOT use the same callsign as your Xastir instance, else it will
+# "adopt" those APRS Item packets as its own and retransmit them. Code was
+# added to the script to prevent such operation, but using "planes" as the
+# callsign works great too!
+#
+#
+# This script snags packets from port 30003 of "dump1090", parses them, then injects
+# APRS packets into Xastir's UDP port (2023) if "Server Ports" are enabled in Xastir.
+#
+#
+# Port 30001 is an input port (dump978 connects there and dumps data in).
+#
+# Port 30002 outputs in raw format, like:
+# *8D451E8B99019699C00B0A81F36E;
+# Every entry is separated by a simple newline (LF character, hex 0x0A).
+# The "callsign" (6 digits of hex) in chunk #4 = ICAO (airframe identifier).
+# Decoding the sentences:
+# https://www.sussex.ac.uk/webteam/gateway/file.php?name=coote-proj.pdf&site=20]
+# http://adsb-decode-guide.readthedocs.org/en/latest/
+#
+# Port 30003 outputs data is SBS1 (BaseStation) format, and is used by this script.
+# Decoding the sentences:
+# http://woodair.net/SBS/Article/Barebones42_Socket_Data.htm
+# NOTE: I changed the numbers by -1 to fit Perl's "split()" command field numbering.
+# Field 0:
+# Message type (MSG, STA, ID, AIR, SEL or CLK)
+# Field 1:
+# Transmission Type MSG sub types 1 to 8. Not used by other message types.
+# Field 2:
+# Session ID Database Session record number
+# Field 3:
+# AircraftID Database Aircraft record number
+# Field 4:
+# HexIdent Aircraft Mode S hexadecimal code (What we use here... Unique identifier)
+# Field 5:
+# FlightID Database Flight record number
+# Field 6:
+# Date message generated As it says
+# Field 7:
+# Time message generated As it says
+# Field 8:
+# Date message logged As it says
+# Field 9:
+# Time message logged As it says
+# Field 10:
+# Callsign An eight digit flight ID - can be flight number or registration (or even nothing).
+# Field 11:
+# Altitude Mode C altitude. Height relative to 1013.2mb (Flight Level). Not height AMSL..
+# Field 12:
+# GroundSpeed Speed over ground (not indicated airspeed)
+# Field 13:
+# Track Track of aircraft (not heading). Derived from the velocity E/W and velocity N/S
+# Field 14:
+# Latitude North and East positive. South and West negative.
+# Field 15:
+# Longitude North and East positive. South and West negative.
+# Field 16:
+# VerticalRate 64ft resolution
+# Field 17:
+# Squawk Assigned Mode A squawk code.
+# Field 18:
+# Alert (Squawk change) Flag to indicate squawk has changed.
+# Field 19:
+# Emergency Flag to indicate emergency code has been set
+# Field 20:
+# SPI (Ident) Flag to indicate transponder Ident has been activated.
+# Field 21:
+# IsOnGround Flag to indicate ground squat switch is active
+#
+#
+# Squawk Codes:
+# https://en.wikipedia.org/wiki/Transponder_%28aeronautics%29
+#
+#
+# For reference, using 468/frequency (MHz) to get length of 1/2 wave dipole in feet:
+#
+# 1/2 wavelength on 1090 MHz: 5.15"
+# 1/4 wavelength on 1090 MHz: 2.576" or 2 9/16"
+#
+# 1/2 wavelength on 978 MHz: 5.74"
+# 1/4 wavelength on 978 MHz: 2.87" or 2 7/8"
+#
+#
+# NOTE: In the tables below, lines marked with "Per COUNTRIES.txt file" are derived
+# from the work of Pete 'Aviatek'/'aviateknema' of the Yahoo Group "Mode_S" and
+# most likely arrived at via observation of Mode-S transponder activity. They are
+# not guaranteed to represent reality in any way.
+#
+# Most of the rest of the data in the tables was derived from:
+# http://www.kloth.net/radio/icao24alloc.php (Created 2003-01-12, Last modified 2011-06-23).
+# Which in turn came from:
+# "ICAO Annex 10 Volume III Chapter 9. Aircraft Addressing System"
+#
+#
+
+
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+& eval 'exec perl -S $0 $argv:q'
+if 0;
+
+use IO::Socket;
+
+
+$my_alt = 600; # In feet. Used by probability circles.
+
+
+# Fetch my lat/long from Xastir config file
+$my_lat = `grep STATION_LAT ~/.xastir/config/xastir.cnf`;
+if (! ($my_lat =~ m/STATION_LAT:/) ) {
+ die "Couldn't get STATION_LAT from Xastir config file\n";
+}
+$my_lon = `grep STATION_LONG ~/.xastir/config/xastir.cnf`;
+if (! ($my_lon =~ m/STATION_LONG:/) ) {
+ die "Couldn't get STATION_LONG from Xastir config file\n";
+}
+chomp $my_lat;
+chomp $my_lon;
+$my_lat =~ s/STATION_LAT://;
+$my_lon =~ s/STATION_LONG://;
+$my_lat =~ s/(\d+\.\d\d)\d(.)/$1$2/;
+$my_lon =~ s/(\d+\.\d\d)\d(.)/$1$2/;
+#print "$my_lat $my_lon\n";
+
+
+$udp_client = "xastir_udp_client";
+$dump1090_host = "localhost"; # Server where dump1090 is running
+$dump1090_port = 30003; # 30003 is dump1090 default port
+
+$xastir_host = "localhost"; # Server where Xastir is running
+$xastir_port = 2023; # 2023 is Xastir default UDP port
+
+$plane_TTL = 15; # Secs after which posits too old to create APRS packets from
+
+$log_file = "~/.xastir/logs/planes.log";
+
+
+$xastir_user = shift;
+if (defined($xastir_user)) {
+ chomp $xastir_user;
+}
+if ( (!defined($xastir_user)) || ($xastir_user eq "") ) {
+ print "Please enter a callsign for Xastir injection, but not Xastir's callsign/SSID!\n";
+ die;
+}
+$xastir_user =~ tr/a-z/A-Z/;
+
+$xastir_pass = shift;
+if (defined($xastir_pass)) {
+ chomp $xastir_pass;
+}
+if ( (!defined($xastir_pass)) || ($xastir_pass eq "") ) {
+ print "Please enter a passcode for Xastir injection\n";
+ die;
+}
+
+$enable_circles = 0;
+$enable_logging = 0;
+
+$flag1 = shift;
+if (defined($flag1)) {
+ chomp $flag1;
+ if ( ($flag1 ne "") && ($flag1 eq "--circles") ) {
+ $enable_circles = 1;
+ }
+ if ( ($flag1 ne "") && ($flag1 eq "--logging") ) {
+ $enable_logging = 1;
+ }
+}
+
+$flag2 = shift;
+if (defined($flag2)) {
+ chomp $flag2;
+ if ( ($flag2 ne "") && ($flag2 eq "--circles") ) {
+ $enable_circles = 1;
+ }
+ if ( ($flag2 ne "") && ($flag2 eq "--logging") ) {
+ $enable_logging = 1;
+ }
+}
+
+
+# Connect to the server using a tcp socket
+#
+$socket = IO::Socket::INET->new(PeerAddr => $dump1090_host,
+ PeerPort => $dump1090_port,
+ Proto => "tcp",
+ Type => SOCK_STREAM)
+ or die "Couldn't connect to $dump1090_host:$dump1090_port : $@\n";
+
+
+# Flush output buffers often
+select((select(STDOUT), $| = 1)[0]);
+
+
+# Check Xastir's callsign/SSID to make sure we don't have a collision. This
+# will prevent Xastir adopting the Items as its own and retransmitting them.
+# xastir_udp_client localhost 2023 <callsign> <passcode> -identify
+# Received: WE7U-13
+#
+$injection_call = $xastir_user;
+$injection_call =~ s/-\d+//; # Get rid of dash and numbers
+
+$injection_ssid = $xastir_user;
+$injection_ssid =~ s/\w+//; # Get rid of letters
+$injection_ssid =~ s/-//; # Get rid of dash
+if ($injection_ssid eq "") { $injection_ssid = 0; }
+
+# Find out Callsign/SSID of Xastir instance
+$result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass -identify`;
+if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+}
+($remote_call, $remote_ssid) = split('-', $result);
+
+chomp($remote_call);
+$remote_call =~ s/Received:\s+//;
+
+if ( !defined($remote_ssid) ) { $remote_ssid = ""; }
+if ($remote_ssid ne "") { chomp($remote_ssid); }
+if ($remote_ssid eq "") { $remote_ssid = 0; }
+
+#print "$remote_call $remote_ssid $injection_call $injection_ssid\n";
+#if ($remote_call eq $injection_call) { print "Call matches\n"; }
+#if ($remote_ssid == $injection_ssid) { print "SSID matches\n"; }
+
+if ( ($remote_call eq $injection_call)
+ && ($remote_ssid == $injection_ssid) ) {
+ $remote_ssid++;
+ $remote_ssid%= 16; # Increment by 1 mod 16
+ $xastir_user = "$remote_call-$remote_ssid";
+ print "Injection conflict. Corrected. New user = $xastir_user\n";
+}
+
+
+while (<$socket>)
+{
+
+ # For testing:
+ #
+ #$_ = "MSG,3,,,A0CF8D,,,,,,,28000,,,47.87670,-122.27269,,,0,0,0,0";
+ #$_ = "MSG,5,,,AD815E,,,,,,,575,,,,,,,,,,";
+ #$_ = "MSG,4,,,AAB812,,,,,,,,454,312,,,0,,0,0,0,0";
+ #$_ = "MSG,3,,,ABB2D5,,,,,,,40975,,,47.68648,-122.67834,,,0,0,0,0"; # Lat/long/altitude (ft)
+ #$_ = "MSG,1,,,A2CB32,,,,,,BOE181 ,,,,,,,,0,0,0,0"; # Tail number or flight number
+ #$_ = "MSG,4,,,A0F4F6,,,,,,,,175,152,,,-1152,,0,0,0,0"; # Ground speed (knots)/Track
+
+
+ chomp;
+ if ( $_ eq "" ) { next; }
+
+
+ # Sentences have either 10 or 22 fields, assuming they aren't cut off / collided with.
+ @fields = split(",");
+
+
+ # Check whether we have a sentence type, message type, and plane ID. If not we're done with this loop iteration
+ if ( (!defined($fields[0])) || (!defined($fields[1])) || (!defined($fields[4])) || ($fields[4] eq "") ) { next; }
+
+ $plane_id = $fields[4];
+ $print1 = $plane_id;
+
+ # Decode the country of registration via this webpage:
+ # http://www.kloth.net/radio/icao24alloc.php
+ # Add it to the APRS comment field. Remove the Tactical call
+ # from the comment field since it is redundant.
+ # Match on more specific first (longer string).
+ #
+ $registry = "Registry?";
+
+ # Convert $plane_id to binary string
+ $binary_plane_id = unpack ('B*', pack ('H*',$plane_id) );
+
+ # 14-bit addresses:
+ # -----------------
+ if ($binary_plane_id =~ m/^01010000000100/) { $registry = "Albania"; }
+ elsif ($binary_plane_id =~ m/^00001100101000/) { $registry = "Antigua and Barbuda"; }
+ elsif ($binary_plane_id =~ m/^01100000000000/) { $registry = "Armenia"; }
+ elsif ($binary_plane_id =~ m/^011000000000100000000001/) { $registry = "Azerbaijan Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01100000000010/) { $registry = "Azerbaijan"; }
+ elsif ($binary_plane_id =~ m/^00001010101000/) { $registry = "Barbados"; }
+ elsif ($binary_plane_id =~ m/^01010001000000/) { $registry = "Belarus"; }
+ elsif ($binary_plane_id =~ m/^00001010101100/) { $registry = "Belize"; }
+ elsif ($binary_plane_id =~ m/^010000000000000110/) { $registry = "Bermuda"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01000000000000001/) { $registry = "Bermuda"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01000000000000010/) { $registry = "Bermuda"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0100001001000000/) { $registry = "Bermuda"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^00001001010000/) { $registry = "Benin"; }
+ elsif ($binary_plane_id =~ m/^01101000000000/) { $registry = "Bhutan"; }
+ elsif ($binary_plane_id =~ m/^01010001001100/) { $registry = "Bosnia and Herzegovina"; }
+ elsif ($binary_plane_id =~ m/^000000110000000000001000/) { $registry = "Botswana Military" } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^00000011000000/) { $registry = "Botswana"; }
+ elsif ($binary_plane_id =~ m/^10001001010100/) { $registry = "Brunei Darussalam"; }
+ elsif ($binary_plane_id =~ m/^00001001011000/) { $registry = "Cape Verde"; }
+ elsif ($binary_plane_id =~ m/^01000000000000001000000/) { $registry = "Cayman Islands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000000000000011010/) { $registry = "Cayman Islands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01000000000000001100/) { $registry = "Cayman Islands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01000010010000010011/) { $registry = "Cayman Islands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000000000000001/) { $registry = "Cayman Islands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000000000000111/) { $registry = "Cayman Islands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000100100000101/) { $registry = "Cayman Islands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^00000011010100/) { $registry = "Comoros"; }
+ elsif ($binary_plane_id =~ m/^10010000000100/) { $registry = "Cook Islands"; }
+ elsif ($binary_plane_id =~ m/^01010000000111/) { $registry = "Croatia"; }
+ elsif ($binary_plane_id =~ m/^01001100100000/) { $registry = "Cyprus"; }
+ elsif ($binary_plane_id =~ m/^00001001100000/) { $registry = "Djibouti"; }
+ elsif ($binary_plane_id =~ m/^00100000001000/) { $registry = "Eritrea"; }
+ elsif ($binary_plane_id =~ m/^01010001000100/) { $registry = "Estonia"; }
+ elsif ($binary_plane_id =~ m/^010000100100000111110100/) { $registry = "Falklands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000100100000111110101/) { $registry = "Falklands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000111011111001011011/) { $registry = "Falklands"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01010001010000/) { $registry = "Georgia"; }
+ elsif ($binary_plane_id =~ m/^00001100110000/) { $registry = "Grenada"; }
+ elsif ($binary_plane_id =~ m/^00000100100000/) { $registry = "Guinea-Bissau"; }
+ elsif ($binary_plane_id =~ m/^01000011111001110001011/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01000011111010010000100/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000111110011100011/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000111110100100000/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0100001111100111001/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000111110011101/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01000011111001111/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0100001111101000/) { $registry = "Isle of Man"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01101000001100/) { $registry = "Kazakhstan"; }
+ elsif ($binary_plane_id =~ m/^11001000111000/) { $registry = "Kiribati"; }
+ elsif ($binary_plane_id =~ m/^01100000000100/) { $registry = "Kyrgyzstan"; }
+ elsif ($binary_plane_id =~ m/^01010000001011/) { $registry = "Latvia"; }
+ elsif ($binary_plane_id =~ m/^00000100101000/) { $registry = "Lesotho"; }
+ elsif ($binary_plane_id =~ m/^111111111000100011001110/) { $registry = "Lithuania Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01010000001111/) { $registry = "Lithuania"; }
+ elsif ($binary_plane_id =~ m/^01001101000000/) { $registry = "Luxembourg"; }
+ elsif ($binary_plane_id =~ m/^00000101101000/) { $registry = "Maldives"; }
+ elsif ($binary_plane_id =~ m/^01001101001000/) { $registry = "Malta"; }
+ elsif ($binary_plane_id =~ m/^10010000000000/) { $registry = "Marshall Islands"; }
+ elsif ($binary_plane_id =~ m/^00000101111000/) { $registry = "Mauritania"; }
+ elsif ($binary_plane_id =~ m/^00000110000000/) { $registry = "Mauritius"; }
+ elsif ($binary_plane_id =~ m/^01101000000100/) { $registry = "Micronesia"; } # Micronesia, Federated States of
+ elsif ($binary_plane_id =~ m/^01001101010000/) { $registry = "Monaco"; }
+ elsif ($binary_plane_id =~ m/^01101000001000/) { $registry = "Mongolia"; }
+ elsif ($binary_plane_id =~ m/^00100000000100/) { $registry = "Namibia"; }
+ elsif ($binary_plane_id =~ m/^0100110100000011110/) { $registry = "NATO"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^11001000101000/) { $registry = "Nauru"; }
+ elsif ($binary_plane_id =~ m/^011100001100000001111000/) { $registry = "Oman Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100001100000001111001/) { $registry = "Oman Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100001100000001111010/) { $registry = "Oman Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100001100000001110101/) { $registry = "Oman Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100001100000001110110/) { $registry = "Oman Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100001100000001110111/) { $registry = "Oman Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01110000110000/) { $registry = "Oman"; }
+ elsif ($binary_plane_id =~ m/^01101000010000/) { $registry = "Palau"; }
+ elsif ($binary_plane_id =~ m/^00000110101000/) { $registry = "Qatar"; }
+ elsif ($binary_plane_id =~ m/^01010000010011/) { $registry = "Rep. of Moldova"; } # Republic of Moldova
+ elsif ($binary_plane_id =~ m/^11001000110000/) { $registry = "Saint Lucia"; }
+ elsif ($binary_plane_id =~ m/^00001011110000/) { $registry = "Saint Vincent and the Grenadines"; }
+ elsif ($binary_plane_id =~ m/^10010000001000/) { $registry = "Samoa"; }
+ elsif ($binary_plane_id =~ m/^01010000000000/) { $registry = "San Marino"; }
+ elsif ($binary_plane_id =~ m/^00001001111000/) { $registry = "Sao Tome and Principe"; }
+ elsif ($binary_plane_id =~ m/^00000111010000/) { $registry = "Seychelles"; }
+ elsif ($binary_plane_id =~ m/^00000111011000/) { $registry = "Sierra Leone"; }
+ elsif ($binary_plane_id =~ m/^01010000010111/) { $registry = "Slovakia"; }
+ elsif ($binary_plane_id =~ m/^010100000110111100100001/) { $registry = "Slovenia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010100000110111101100011/) { $registry = "Slovenia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010100000110111101100100/) { $registry = "Slovenia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01010000011011/) { $registry = "Slovenia"; }
+ elsif ($binary_plane_id =~ m/^10001001011100/) { $registry = "Solomon Islands"; }
+ elsif ($binary_plane_id =~ m/^00000111101000/) { $registry = "Swaziland"; }
+ elsif ($binary_plane_id =~ m/^10001001100100/) { $registry = "Taiwan"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01010001010100/) { $registry = "Tajikistan"; }
+ elsif ($binary_plane_id =~ m/^01010001001000/) { $registry = "Macedonia"; } # The former Yugoslav Republic of Macedonia
+ elsif ($binary_plane_id =~ m/^11001000110100/) { $registry = "Tonga"; }
+ elsif ($binary_plane_id =~ m/^01100000000110/) { $registry = "Turkmenistan"; }
+ elsif ($binary_plane_id =~ m/^01010000011111/) { $registry = "Uzbekistan"; }
+ elsif ($binary_plane_id =~ m/^11001001000000/) { $registry = "Vanuatu"; }
+ elsif ($binary_plane_id =~ m/^00000000010000/) { $registry = "Zimbabwe"; }
+ elsif ($binary_plane_id =~ m/^11110000100100/) { $registry = "ICAO(2) Flight Safety"; }
+ #
+ # 12-bit addresses:
+ # -----------------
+ elsif ($binary_plane_id =~ m/^011100000000/) { $registry = "Afghanistan"; }
+ elsif ($binary_plane_id =~ m/^000010010000/) { $registry = "Angola"; }
+ elsif ($binary_plane_id =~ m/^010010000100/) { $registry = "Aruba"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000010101000/) { $registry = "Bahamas"; }
+ elsif ($binary_plane_id =~ m/^100010010100000000010001/) { $registry = "Bahrain Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010010100000000010110/) { $registry = "Bahrain Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010010100/) { $registry = "Bahrain"; }
+ elsif ($binary_plane_id =~ m/^011100000010/) { $registry = "Bangladesh"; }
+ elsif ($binary_plane_id =~ m/^111010010100/) { $registry = "Bolivia"; }
+ elsif ($binary_plane_id =~ m/^000010011100/) { $registry = "Burkina Faso"; }
+ elsif ($binary_plane_id =~ m/^000000110010/) { $registry = "Burundi"; }
+ elsif ($binary_plane_id =~ m/^011100001110/) { $registry = "Cambodia"; }
+ elsif ($binary_plane_id =~ m/^000000110100/) { $registry = "Cameroon"; }
+ elsif ($binary_plane_id =~ m/^000001101100/) { $registry = "Central African Rep."; } # Central African Republic
+ elsif ($binary_plane_id =~ m/^000010000100/) { $registry = "Chad"; }
+ elsif ($binary_plane_id =~ m/^1110100000000110/) { $registry = "Chile Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^111010000000/) { $registry = "Chile"; }
+ elsif ($binary_plane_id =~ m/^000010101100/) { $registry = "Colombia"; }
+ elsif ($binary_plane_id =~ m/^000000110110/) { $registry = "Congo"; }
+ elsif ($binary_plane_id =~ m/^000010101110/) { $registry = "Costa Rica"; }
+ elsif ($binary_plane_id =~ m/^000000111000/) { $registry = "Cote d Ivoire"; }
+ elsif ($binary_plane_id =~ m/^000010110000/) { $registry = "Cuba"; }
+ elsif ($binary_plane_id =~ m/^000010001100/) { $registry = "Dem. Rep. of the Congo"; } # Democratic Republic of the Congo
+ elsif ($binary_plane_id =~ m/^000011000100/) { $registry = "Dominican Republic"; }
+ elsif ($binary_plane_id =~ m/^111010000100/) { $registry = "Ecuador"; }
+ elsif ($binary_plane_id =~ m/^000010110010/) { $registry = "El Salvador"; }
+ elsif ($binary_plane_id =~ m/^000001000010/) { $registry = "Equatorial Guinea"; }
+ elsif ($binary_plane_id =~ m/^000001000000/) { $registry = "Ethiopia"; }
+ elsif ($binary_plane_id =~ m/^110010001000/) { $registry = "Fiji"; }
+ elsif ($binary_plane_id =~ m/^000000111110/) { $registry = "Gabon"; }
+ elsif ($binary_plane_id =~ m/^000010011010/) { $registry = "Gambia"; }
+ elsif ($binary_plane_id =~ m/^000001000100/) { $registry = "Ghana"; }
+ elsif ($binary_plane_id =~ m/^000010110100/) { $registry = "Guatemala"; }
+ elsif ($binary_plane_id =~ m/^000001000110/) { $registry = "Guinea"; }
+ elsif ($binary_plane_id =~ m/^000010110110/) { $registry = "Guyana"; }
+ elsif ($binary_plane_id =~ m/^000010111000/) { $registry = "Haiti"; }
+ elsif ($binary_plane_id =~ m/^000010111010/) { $registry = "Honduras"; }
+ elsif ($binary_plane_id =~ m/^010011001100/) { $registry = "Iceland"; }
+ elsif ($binary_plane_id =~ m/^010011001010000000100011/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001101000010000110010111/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001101000010000110011000/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000101011000/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010001000000100/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111100111/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111101000/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111101001/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111101010/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111101011/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111101100/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111101101/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010000111101110/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010001010001100/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010001010001011/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010001100011110/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010001100110000/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010001100110001/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010001100110010/) { $registry = "Ireland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010011001010/) { $registry = "Ireland"; }
+ elsif ($binary_plane_id =~ m/^000010111110/) { $registry = "Jamaica"; }
+ elsif ($binary_plane_id =~ m/^000001001100/) { $registry = "Kenya"; }
+ elsif ($binary_plane_id =~ m/^011100000110/) { $registry = "Kuwait"; }
+ elsif ($binary_plane_id =~ m/^011100001000/) { $registry = "Laos"; } # Lao People's Democratic Republic
+ elsif ($binary_plane_id =~ m/^000001010000/) { $registry = "Liberia"; }
+ elsif ($binary_plane_id =~ m/^000001010100/) { $registry = "Madagascar"; }
+ elsif ($binary_plane_id =~ m/^000001011000/) { $registry = "Malawi"; }
+ elsif ($binary_plane_id =~ m/^000001011100/) { $registry = "Mali"; }
+ elsif ($binary_plane_id =~ m/^000000000110/) { $registry = "Mozambique"; }
+ elsif ($binary_plane_id =~ m/^011100000100/) { $registry = "Myanmar"; }
+ elsif ($binary_plane_id =~ m/^011100001010/) { $registry = "Nepal"; }
+ elsif ($binary_plane_id =~ m/^000011000000/) { $registry = "Nicaragua"; }
+ elsif ($binary_plane_id =~ m/^000001100010/) { $registry = "Niger"; }
+ elsif ($binary_plane_id =~ m/^000001100100/) { $registry = "Nigeria"; }
+ elsif ($binary_plane_id =~ m/^000011000010/) { $registry = "Panama"; }
+ elsif ($binary_plane_id =~ m/^100010011000/) { $registry = "Papua New Guinea"; }
+ elsif ($binary_plane_id =~ m/^111010001000/) { $registry = "Paraguay"; }
+ elsif ($binary_plane_id =~ m/^111010001100000000000111/) { $registry = "Peru Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^111010001100/) { $registry = "Peru"; }
+ elsif ($binary_plane_id =~ m/^000001101110/) { $registry = "Rwanda"; }
+ elsif ($binary_plane_id =~ m/^000001110000/) { $registry = "Senegal"; }
+ elsif ($binary_plane_id =~ m/^000001111000/) { $registry = "Somalia"; }
+ elsif ($binary_plane_id =~ m/^000001111100/) { $registry = "Sudan"; }
+ elsif ($binary_plane_id =~ m/^000011001000/) { $registry = "Suriname"; }
+ elsif ($binary_plane_id =~ m/^000010001000/) { $registry = "Togo"; }
+ elsif ($binary_plane_id =~ m/^000011000110/) { $registry = "Trinidad and Tobago"; }
+ elsif ($binary_plane_id =~ m/^000001101000/) { $registry = "Uganda"; }
+ elsif ($binary_plane_id =~ m/^100010010110000100100110/) { $registry = "United Arab Emirates Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010010110000000101001/) { $registry = "United Arab Emirates Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010010110000000101010/) { $registry = "United Arab Emirates Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010010110000000101011/) { $registry = "United Arab Emirates Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010010110000000101110/) { $registry = "United Arab Emirates Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010010110/) { $registry = "United Arab Emirates"; }
+ elsif ($binary_plane_id =~ m/^000010000000/) { $registry = "Tanzania"; } # United Republic of Tanzania
+ elsif ($binary_plane_id =~ m/^111010010000/) { $registry = "Uruguay"; }
+ elsif ($binary_plane_id =~ m/^100010010000/) { $registry = "Yemen"; }
+ elsif ($binary_plane_id =~ m/^000010001010/) { $registry = "Zambia"; }
+ #
+ # 9-bit addresses:
+ # ----------------
+ elsif ($binary_plane_id =~ m/^000010100100/) { $registry = "Algeria Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000010100/) { $registry = "Algeria"; }
+ elsif ($binary_plane_id =~ m/^0100010001/) { $registry = "Austria Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001000/) { $registry = "Austria"; }
+ elsif ($binary_plane_id =~ m/^010001001100000111100001/) { $registry = "Belgium Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001001100000111100101/) { $registry = "Belgium Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001001100000111100111/) { $registry = "Belgium Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001001100000111101000/) { $registry = "Belgium Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001001100000111100011/) { $registry = "Belgium Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001001100000111100100/) { $registry = "Belgium Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001001111/) { $registry = "Belgium Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001001/) { $registry = "Belgium"; }
+ elsif ($binary_plane_id =~ m/^010001010111000000000000/) { $registry = "Bulgaria Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001010/) { $registry = "Bulgaria"; }
+ elsif ($binary_plane_id =~ m/^010010011/) { $registry = "Czech Rep."; } # Czech Republic
+ elsif ($binary_plane_id =~ m/^010010011000010000101000/) { $registry = "Czech Rep. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010011000101100100110/) { $registry = "Czech Rep. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010011000101100101101/) { $registry = "Czech Rep. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010011000101100111010/) { $registry = "Czech Rep. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010011000010000100111/) { $registry = "Czech Rep. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010011000101100000001/) { $registry = "Czech Rep. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010011/) { $registry = "Czech Rep."; } # Czech Republic
+ elsif ($binary_plane_id =~ m/^011100100/) { $registry = "North Korea"; } # Democratic People's Republic of Korea
+ elsif ($binary_plane_id =~ m/^010001011111/) { $registry = "Denmark Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001011/) { $registry = "Denmark"; }
+ elsif ($binary_plane_id =~ m/^000000010/) { $registry = "Egypt"; }
+ elsif ($binary_plane_id =~ m/^010001100111100000000001/) { $registry = "Finland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001100/) { $registry = "Finland"; }
+ elsif ($binary_plane_id =~ m/^01000110100000/) { $registry = "Greece Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001101/) { $registry = "Greece"; }
+ elsif ($binary_plane_id =~ m/^010001110/) { $registry = "Hungary"; }
+ elsif ($binary_plane_id =~ m/^100010100/) { $registry = "Indonesia"; }
+ elsif ($binary_plane_id =~ m/^011100110/) { $registry = "Iran"; } # Iran, Islamic Republic of
+ elsif ($binary_plane_id =~ m/^011100101/) { $registry = "Iraq"; }
+ elsif ($binary_plane_id =~ m/^0111001110001010/) { $registry = "Israel Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100111/) { $registry = "Israel"; }
+ elsif ($binary_plane_id =~ m/^011101000/) { $registry = "Jordan"; }
+ elsif ($binary_plane_id =~ m/^011101001/) { $registry = "Lebanon"; }
+ elsif ($binary_plane_id =~ m/^000000011/) { $registry = "Libyan Arab Jamahiriya"; }
+ elsif ($binary_plane_id =~ m/^011101010000000010111101/) { $registry = "Malaysia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011101010000000011000101/) { $registry = "Malaysia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011101010000000011010111/) { $registry = "Malaysia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011101010/) { $registry = "Malaysia"; }
+ elsif ($binary_plane_id =~ m/^000011010000000000011011/) { $registry = "Mexico Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000011010000000000111111/) { $registry = "Mexico Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000011010/) { $registry = "Mexico"; }
+ elsif ($binary_plane_id =~ m/^000000100000000001001101/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100000000001001110/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100000000000110001/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100000000000110111/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100000000000111011/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100000000001001011/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100000000001000110/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100000000001001100/) { $registry = "Morocco Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000100/) { $registry = "Morocco"; }
+ elsif ($binary_plane_id =~ m/^010010000000/) { $registry = "Netherlands Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010000/) { $registry = "Netherlands"; } # Netherlands, Kingdom of the
+ elsif ($binary_plane_id =~ m/^110010000010010100011100/) { $registry = "New Zealand Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110010000010010100011101/) { $registry = "New Zealand Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110010000/) { $registry = "New Zealand"; }
+ elsif ($binary_plane_id =~ m/^0100011110000001/) { $registry = "Norway Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010001111/) { $registry = "Norway"; }
+ elsif ($binary_plane_id =~ m/^011101100001000000110000/) { $registry = "Pakistan Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011101100/) { $registry = "Pakistan"; }
+ elsif ($binary_plane_id =~ m/^011101011/) { $registry = "Phillipines"; }
+ elsif ($binary_plane_id =~ m/^001101000001010110001101/) { $registry = "Poland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001101000010000010000001/) { $registry = "Poland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010001000000110001110/) { $registry = "Poland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010001101100000000000/) { $registry = "Poland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000010000101100001100010/) { $registry = "Poland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010001/) { $registry = "Poland"; }
+ elsif ($binary_plane_id =~ m/^010010010/) { $registry = "Portugal"; }
+ elsif ($binary_plane_id =~ m/^011100011/) { $registry = "Rep. of Korea"; } # Republic of Korea
+ elsif ($binary_plane_id =~ m/^010010100/) { $registry = "Romania"; }
+ elsif ($binary_plane_id =~ m/^011100010000001110010001/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110010010/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000000100001010/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110001010/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110001100/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110001101/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110001000/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110000101/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000000100001011/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110000110/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110000111/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001110001110/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001001011010/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001001011011/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001001011100/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001001011110/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001010001011/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001001110100/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010000001001011101/) { $registry = "Saudi Arabia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011100010/) { $registry = "Saudi Arabia"; }
+ elsif ($binary_plane_id =~ m/^011101101/) { $registry = "Singapore"; }
+ elsif ($binary_plane_id =~ m/^000000001/) { $registry = "South Africa"; }
+ elsif ($binary_plane_id =~ m/^011101110/) { $registry = "Sri Lanka"; }
+ elsif ($binary_plane_id =~ m/^010010101000000110000001/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110000010/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110000011/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110000100/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110000101/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110000110/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110000111/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110001000/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000111100110/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000100010100/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000111110010/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000001000000111/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000111110011/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000111110100/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000111110101/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000011010000/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000111111001/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000111111000/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101000000110011001/) { $registry = "Sweden Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010101/) { $registry = "Sweden"; }
+ elsif ($binary_plane_id =~ m/^010010110111/) { $registry = "Switzerland Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010110/) { $registry = "Switzerland"; }
+ elsif ($binary_plane_id =~ m/^011101111/) { $registry = "Syrian Arab Rep."; } # Syrian Arab Republic
+ elsif ($binary_plane_id =~ m/^100010000101001100110011/) { $registry = "Thailand Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010000010001001001000/) { $registry = "Thailand Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100010000/) { $registry = "Thailand"; }
+ elsif ($binary_plane_id =~ m/^000000101/) { $registry = "Tunisia"; }
+ elsif ($binary_plane_id =~ m/^0100101110000010/) { $registry = "Turkey Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010010111/) { $registry = "Turkey"; }
+ elsif ($binary_plane_id =~ m/^010100001/) { $registry = "Ukraine"; }
+ elsif ($binary_plane_id =~ m/^000011011/) { $registry = "Venezuela"; }
+ elsif ($binary_plane_id =~ m/^100010001/) { $registry = "Viet Nam"; }
+ elsif ($binary_plane_id =~ m/^010011000/) { $registry = "Yugoslavia"; }
+ elsif ($binary_plane_id =~ m/^111100000/) { $registry = "ICAO(1) Temp Address"; }
+ #
+ # 6-bit addresses:
+ # ----------------
+ elsif ($binary_plane_id =~ m/^0011001111111111/) { $registry = "Italy Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001100/) { $registry = "Italy"; }
+ elsif ($binary_plane_id =~ m/^001101000001000110001011/) { $registry = "Spain Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001101000001010110000001/) { $registry = "Spain Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001101000010000110011001/) { $registry = "Spain Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^00110100/) { $registry = "Spain"; }
+ elsif ($binary_plane_id =~ m/^001101/) { $registry = "Spain Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110000000001001011011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110000000110100011011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110000001111001111011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110000001110000111011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110000001111000111011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001101000010001010000011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110000001101110111011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001101000010001010001100/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110000000110100111011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110101/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^00111011/) { $registry = "France Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001110/) { $registry = "France"; }
+ elsif ($binary_plane_id =~ m/^0011111010/) { $registry = "Germany Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0011111101/) { $registry = "Germany Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0011111110/) { $registry = "Germany Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^001111/) { $registry = "Germany"; }
+ elsif ($binary_plane_id =~ m/^010000000000110111111101/) { $registry = "U.K. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000000000110111111110/) { $registry = "U.K. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000000000110111111111/) { $registry = "U.K. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000000000000000/) { $registry = "U.K. MoD"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0100001111/) { $registry = "U.K. Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^010000/) { $registry = "U.K."; } # United Kingdom
+ elsif ($binary_plane_id =~ m/^011110000000000100011111/) { $registry = "China Hong Kong"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001000000000/) { $registry = "China Hong Kong"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001000001011/) { $registry = "China Hong Kong"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001000000110/) { $registry = "China Hong Kong"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001000001100/) { $registry = "China Hong Kong"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001000000111/) { $registry = "China Hong Kong"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0111100000000001/) { $registry = "China Hong Kong"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001100110110/) { $registry = "China Macau"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000000100001000/) { $registry = "China Macau"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001011000100/) { $registry = "China Macau"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110000000001100111/) { $registry = "China Macau"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01111000000000110100/) { $registry = "China Macau"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011110/) { $registry = "China"; }
+ elsif ($binary_plane_id =~ m/^01111100100000100010111/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01111100100000100011/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011111001000001001/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01111100100000101/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0111110010000011/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01111100100001/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0111110010001/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011111001001/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01111100101/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0111110011/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^01111101/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^0111111/) { $registry = "Australia Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^011111/) { $registry = "Australia"; }
+ elsif ($binary_plane_id =~ m/^100000000000000001111000/) { $registry = "India Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100000000000000001111001/) { $registry = "India Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^000000000000000100000000/) { $registry = "India Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100000000000000011010110/) { $registry = "India Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100000000000001011110000/) { $registry = "India Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^1000000000000010/) { $registry = "India Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100000/) { $registry = "India"; }
+ elsif ($binary_plane_id =~ m/^100001111100000000000000/) { $registry = "Japan Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100001111100000000000001/) { $registry = "Japan Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^100001/) { $registry = "Japan"; }
+ elsif ($binary_plane_id =~ m/^110000000100100110001100/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000000110001111110100/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000000011101001111110/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000000010010010010100/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000000001010010111100/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000001000100100111011/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000001000100100111100/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000001000100101000001/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000001000100101000000/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000001000100100111110/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^1100001/) { $registry = "Canada Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^110000/) { $registry = "Canada"; }
+ elsif ($binary_plane_id =~ m/^111000/) { $registry = "Argentina"; }
+ elsif ($binary_plane_id =~ m/^11100100000/) { $registry = "Brazil Military"; } # Per COUNTRIES.txt file
+ elsif ($binary_plane_id =~ m/^111001/) { $registry = "Brazil"; }
+ #
+ # 4-bit addresses:
+ # ----------------
+ elsif ($binary_plane_id =~ m/^101011011111011111001/) { $registry = "U.S. Military"; } # Per COUNTRIES.txt file (Changed A.F. to Military)
+ elsif ($binary_plane_id =~ m/^10101101111101111101/) { $registry = "U.S. Military"; } # Per COUNTRIES.txt file (Changed A.F. to Military)
+ elsif ($binary_plane_id =~ m/^1010110111110111111/) { $registry = "U.S. Military"; } # Per COUNTRIES.txt file (Changed A.F. to Military)
+ elsif ($binary_plane_id =~ m/^1010110111111/) { $registry = "U.S. Military"; } # Per COUNTRIES.txt file (Changed A.F. to Military)
+ elsif ($binary_plane_id =~ m/^1010111/) { $registry = "U.S. Military"; } # Per COUNTRIES.txt file (Changed A.F. to Military)
+ elsif ($binary_plane_id =~ m/^1010/) { $registry = "U.S."; } # United States
+ elsif ($binary_plane_id =~ m/^0001/) { $registry = "Russian Fed."; } # Russian Federation
+ #
+ # Blocks of addresses for anything that hasn't matched so far:
+ # ------------------------------------------------------------
+ elsif ($binary_plane_id =~ m/^00100/) { $registry = "Africa Region"; } # AFI Region
+ elsif ($binary_plane_id =~ m/^00101/) { $registry = "South America Region"; } # SAM Region
+ elsif ($binary_plane_id =~ m/^0101/) { $registry = "Europe/North Atlantic Regions"; } # EUR and NAT Regions
+ elsif ($binary_plane_id =~ m/^01100/) { $registry = "Middle East Region"; } # MID Region
+ elsif ($binary_plane_id =~ m/^01101/) { $registry = "Asia Region"; } # ASIA Region
+ elsif ($binary_plane_id =~ m/^1001/) { $registry = "North America/Pacific Regions"; } # NAM and PAC Regions
+ elsif ($binary_plane_id =~ m/^111011/) { $registry = "Carribean Region"; } # CAR Region
+ elsif ($binary_plane_id =~ m/^1011/) { $registry = "Country Code RESERVED"; } # Reserved for future use
+ elsif ($binary_plane_id =~ m/^1101/) { $registry = "Country Code RESERVED"; } # Reserved for future use
+ elsif ($binary_plane_id =~ m/^1111/) { $registry = "Country Code RESERVED"; } # Reserved for future use
+ elsif ($binary_plane_id =~ m/^000000000000000000000000/) { $registry = "Country Code DISALLOWED"; } # Shall not be assigned
+ elsif ($binary_plane_id =~ m/^111111111111111111111111/) { $registry = "Country Code DISALLOWED"; } # Shall not be assigned
+
+
+ # Parse altitude if MSG Type 2, 3, 5, 6, or 7, save in hash.
+ $print2 = " ";
+ if ( $fields[1] == 2
+ || $fields[1] == 3
+ || $fields[1] == 5
+ || $fields[1] == 6
+ || $fields[1] == 7 ) {
+
+ if ( defined($fields[11])
+ && $fields[11] ne ""
+ && $fields[11] ne 0 ) {
+
+ $old = "";
+ if (defined($altitude{$plane_id})) {
+ $old = $altitude{$plane_id};
+ }
+
+ # Save new altitude
+ $altitude{$plane_id} = sprintf("%06d", $fields[11]);
+
+ if ($old ne $altitude{$plane_id}) {
+ $print2 = sprintf("%5sft", $fields[11]);
+ $newdata{$plane_id}++; # Found a new altitude!
+ }
+ }
+ }
+
+
+ # Parse ground speed and track if MSG Type 2 or 4, save in hash.
+ $print3 = " ";
+ $print4 = " ";
+ if ( $fields[1] == 4 || $fields[1] == 2 ) {
+
+ if ( defined($fields[12]) && $fields[12] ne "" ) {
+
+ $old = "";
+ if (defined($groundspeed{$plane_id})) {
+ $old = $groundspeed{$plane_id};
+ }
+
+ # Save new ground speed
+ $groundspeed{$plane_id} = $fields[12];
+
+ if ($old ne $groundspeed{$plane_id}) {
+ $print3 = sprintf("%3skn", $fields[12]);
+ $newdata{$plane_id}++; # Found a new ground speed!
+ }
+ }
+
+ if ( defined($fields[13]) && $fields[13] ne "" ) {
+
+ $old = "";
+ if (defined($track{$plane_id})) {
+ $old = $track{$plane_id};
+ }
+
+ # Save new track
+ $track{$plane_id} = $fields[13];
+
+ if ($old ne $track{$plane_id}) {
+ $print4 = sprintf("%3s�", $fields[13]);
+ $newdata{$plane_id}++; # Found a new track!
+ }
+ }
+ }
+
+
+ # Parse lat/long if MSG Type 2 or 3, save in hash.
+ $print5 = " ";
+ if ( ( $fields[1] == 2 || $fields[1] == 3 )
+ && defined($fields[14]) && $fields[14] ne ""
+ && defined($fields[15]) && $fields[15] ne "" ) {
+
+ $oldlat = "";
+ if (defined($lat{$plane_id})) {
+ $oldlat = $lat{$plane_id};
+ }
+
+ $lat = $fields[14] * 1.0;
+ if ($lat >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $lat = abs($lat);
+ }
+ $latdeg = int($lat);
+ $latmins = $lat - $latdeg;
+ $latmins2 = $latmins * 60.0;
+ # Save new latitude
+ $lat{$plane_id} = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+
+ $oldlon = "";
+ if (defined($lon{$plane_id})) {
+ $oldlon = $lon{$plane_id};
+ }
+
+ $lon = $fields[15] * 1.0;
+ if ($lon >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $lon = abs($lon);
+ }
+ $londeg = int($lon);
+ $lonmins = $lon - $londeg;
+ $lonmins2 = $lonmins * 60.0;
+ # Save new longitude
+ $lon{$plane_id} = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ if ( ($oldlat ne $lat{$plane_id}) || ($oldlon ne $lon{$plane_id}) ) {
+ $print5 = sprintf("%8s,%9s", $lat{$plane_id},$lon{$plane_id});
+
+ # Save most recent posit time
+ $last_posit_time{$plane_id} = time();
+
+ $newdata{$plane_id}++; # Found a new lat/lon!
+
+ # Tactical callsign:
+ # Have new lat/lon. Check whether we have a tactical call
+ # already defined. If not, assign one that includes
+ # the plane_id and the country of registration.
+ if ( !defined($tactical{$plane_id}) ) {
+
+ # Assign tactical call = $plane_id + registry
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ $tactical{$plane_id} = $plane_id . " (" . $registry . ")";
+ $tactical{$plane_id} =~ s/\s+/ /g; # Change multiple spaces to one
+ $aprs = $xastir_user . '>' . "APRS::TACTICAL :" . $plane_id . "=" . $tactical{$plane_id};
+
+ $print6 = sprintf("%-18s", $tactical{$plane_id});
+ print("$print1 $print2 $print3 $print4 $print6 $aprs\n");
+
+ # xastir_udp_client <hostname> <port> <callsign> <passcode> {-identify | [-to_rf] <message>}
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+
+ if ($enable_logging == 1) {
+ `echo \"$aprs\" >> $log_file`;
+ }
+
+ }
+ }
+ }
+
+
+ # Save tail or flight number in hash if MSG Type 1 or "ID" sentence.
+ if ( ($fields[0] eq "ID" || $fields[1] == 1)
+ && defined($fields[10])
+ && $fields[10] ne "????????"
+ && $fields[10] ne ""
+ && !($fields[10] =~ m/^\s+$/) ) {
+
+ $old = "";
+ if (defined($tail{$plane_id})) {
+ $old = $tail{$plane_id};
+ }
+
+ # Save new tail number or flight number, assign tactical call
+ $tail{$plane_id} = $fields[10];
+ $tail{$plane_id} =~ s/\s//g; # Remove spaces
+
+ if ($old ne $tail{$plane_id}) {
+ $print6 = sprintf("%-18s", $fields[10]);
+ $newdata{$plane_id}++; # Found a new tail or flight number!
+
+ # Assign tactical call = tail number or flight number + registry (if defined)
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ $tactical{$plane_id} = $fields[10];
+ if ($registry ne "Registry?") {
+ $tactical{$plane_id} = $fields[10] . " (" . $registry . ")";
+ $tactical{$plane_id} =~ s/\s+/ /g; # Change multiple spaces to one
+ }
+ $aprs = $xastir_user . '>' . "APRS::TACTICAL :" . $plane_id . "=" . $tactical{$plane_id};
+
+ print("$print1 $print2 $print3 $print4 $print6 $aprs\n");
+
+ # xastir_udp_client <hostname> <port> <callsign> <passcode> {-identify | [-to_rf] <message>}
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+
+ if ($enable_logging == 1) {
+ `echo \"$aprs\" >> $log_file`;
+ }
+
+ }
+ }
+
+
+ $squawk_txt = "";
+ if ( defined($fields[17]) && ($fields[17] ne "") ) {
+
+ $old = "";
+ if (defined($squawk{$plane_id})) {
+ $old = $squawk{$plane_id};
+ }
+ $squawk{$plane_id} = $fields[17];
+
+ if ($old ne $squawk{$plane_id}) {
+ $newdata{$plane_id}++; # Found a new squawk!
+ }
+ }
+ if (defined($squawk{$plane_id})) {
+ $squawk_txt = sprintf(" SQUAWK=%04d", $squawk{$plane_id});
+ }
+
+
+
+ $emerg_txt = "";
+ $emergency = "0";
+ if ( defined($fields[19]) ) {
+ $emergency = $fields[19];
+ }
+ if ( $emergency eq "-1" ) { # Emergency of some type
+ $emerg_txt = " EMERGENCY="; # Keyword triggers Xastir's emergency mode!!!
+
+ # Check squawk code
+ if ( defined($squawk{$plane_id}) ) {
+ if ($squawk{$plane_id} eq "7500") { # Unlawful Interference (hijacking)
+ $emerg_txt = $emerg_txt . "Hijacking";
+ }
+ if ($squawk{$plane_id} eq "7600") { # Communications failure/problems
+ $emerg_txt = $emerg_txt . "Comms_Failure";
+ }
+ if ($squawk{$plane_id} eq "7700") { # General Emergency
+ $emerg_txt = $emerg_txt . "General";
+ }
+ }
+ $newdata{$plane_id}++;
+ }
+
+
+ $onGroundTxt = "";
+ if ( defined($fields[21]) ) {
+ $onGround = $fields[21];
+ if ($onGround eq "-1") {
+ $onGroundTxt = " On_Ground";
+ $newdata{$plane_id}++;
+ }
+ }
+
+
+ $newtrack = "360";
+ if ( defined($track{$plane_id}) ) {
+ if ($track{$plane_id} == 0) {
+ $newtrack = "360";
+ }
+ else {
+ $newtrack = sprintf("%03d", $track{$plane_id} );
+ }
+ }
+
+ $newspeed = "000";
+ if ( defined ($groundspeed{$plane_id}) ) {
+ $newspeed = sprintf("%03d", $groundspeed{$plane_id} );
+ if ( ($groundspeed{$plane_id} > 0) && ($groundspeed{$plane_id} < 57) ) {
+ $symbol = "X"; # Switch to helicopter symbol
+ }
+ if ($groundspeed{$plane_id} > 126) {
+ $symbol = "^"; # Switch to large aircraft symbol
+ }
+ }
+
+ $newtail = "";
+ if ( defined($tail{$plane_id}) ) {
+ $newtail = " $tail{$plane_id}";
+ }
+
+ # Auto-switch the symbol based on speed/altitude.
+ # Symbols:
+ # Small airplane = /'
+ # Helicopter = /X
+ # Large aircraft = /^
+ # Aircraft = \^ (Not used in this script)
+ #
+ # Cessna 150: 57 knots minimum.
+ # Twin Cessna: 215 knots maximum.
+ # UH-1N Huey: 110 knots maximum.
+ # Landing speed Boeing 757: 126 knots.
+ #
+ # If <= 10000 feet and 1 - 56 knots: Helicopter
+ # If <= 20000 feet and 57 - 125 knots: Small aircraft
+ # If > 20000 feet : Large aircraft
+ # if > 126 knots: Large aircraft
+ #
+ $symbol = "'"; # Start with small aircraft symbol
+
+ $newalt = "";
+ if ( defined($altitude{$plane_id}) ) {
+ $newalt = " /A=$altitude{$plane_id}";
+
+ if ($altitude{$plane_id} > 20000) {
+ $symbol = "^"; # Switch to large aircraft symbol
+ }
+ elsif ($symbol eq "^") {
+ # Do nothing, already switched to large aircraft due to speed
+ }
+ elsif ($symbol eq "X" && $altitude{$plane_id} > 10000) {
+ $symbol = "'"; # Switch to small aircraft from helicopter
+ }
+ }
+
+
+
+ # Above we parsed some message that changed some of our data, send out the
+ # new APRS string if we have enough data defined.
+ #
+ if ( defined($newdata{$plane_id})
+ && $newdata{$plane_id} ) {
+
+ # Count percentage of planes with lat/lon out of total planes that have altitude listed.
+ # This should show an approximate implementation percentage for ADS-B transponders.
+ $alt_planes = 0;
+ $lat_planes = 0;
+ $print_adsb_percentage = "";
+ foreach $key (keys %lat) {
+ $lat_planes++;
+ }
+ foreach $key (keys %altitude) {
+ $alt_planes++;
+ }
+ if ($alt_planes != 0) {
+ $adsb_percentage = ( ($lat_planes * 1.0) / $alt_planes) * 100.0;
+ $print_adsb_percentage = sprintf("ADS-B:%-1.1f%% ($lat_planes/$alt_planes)", $adsb_percentage);
+ }
+
+
+ # Do we have a lat/lon and is it recent enough?
+ if ( defined($lat{$plane_id})
+ && defined($lon{$plane_id}) ) {
+
+ #
+ # Yes we have a lat/lon
+ #
+
+ # Check the age of the lat/lon
+ $age = time() - $last_posit_time{$plane_id};
+ if ( $age > $plane_TTL ) {
+ #
+ # We have a lat/lon but it is too old
+ #
+ $print_age1 = sprintf("(%s%s)", $age, "s");
+ $print_age2 = sprintf("%18s", $print_age1);
+ $print_aprs = sprintf("%-96s", "$newtail$emerg_txt$squawk_txt$onGroundTxt ($registry)");
+ print("$print1 $print2 $print3 $print4 $print_age2 $print_aprs $print_adsb_percentage\n");
+
+ }
+ else {
+ #
+ # We have a recent lat/lon
+ #
+ $aprs="$xastir_user>APRS:)$plane_id!$lat{$plane_id}/$lon{$plane_id}$symbol$newtrack/$newspeed$newalt$newtail$emerg_txt$squawk_txt$onGroundTxt ($registry)";
+ $print_aprs = sprintf("%-95s", $aprs);
+ if ( $age > 0 # Lat/lon is aging a bit
+ || $print5 eq " " ) { # Didn't parse lat/lon this time
+ $print_age1 = sprintf("%s%s", $age, "s");
+ $print_age2 = sprintf("%18s", $print_age1);
+ print("$print1 $print2 $print3 $print4 $print_age2 $print_aprs $print_adsb_percentage\n");
+ }
+ else {
+ print("$print1 $print2 $print3 $print4 $print5 $print_aprs $print_adsb_percentage\n");
+ }
+
+ # xastir_udp_client <hostname> <port> <callsign> <passcode> {-identify | [-to_rf] <message>}
+# $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs [Pmin0.0,]\"`;
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+
+ if ($enable_logging == 1) {
+ `echo \"$aprs\" >> $log_file`;
+ }
+
+ }
+ }
+ else {
+ #
+ # No, we have no lat/lon
+ #
+ $print_age = sprintf("%18s", "-");
+ $print_aprs = sprintf("%-96s", "$newtail$emerg_txt$squawk_txt$onGroundTxt ($registry)");
+ print("$print1 $print2 $print3 $print4 $print_age$print_aprs $print_adsb_percentage\n");
+
+ if ($enable_circles == 1) {
+ $radius = 10.0; # Set a default of 10 miles
+ if ( defined($altitude{$plane_id}) ) {
+ $radius = ( ( ($altitude{$plane_id} - $my_alt) / 1000 ) * 2 ); # 40k = 80 miles, 20k = 40 miles, 10k = 20 miles, 1k = 2 miles
+ }
+ $print_radius = sprintf("%2.1f", $radius);
+ $aprs="$xastir_user>APRS:)$plane_id!$my_lat/$my_lon$symbol$newtrack/$newspeed$newalt$newtail$emerg_txt$squawk_txt$onGroundTxt ($registry) [Pmin$print_radius,]";
+ # print "$aprs\n";
+
+ # xastir_udp_client <hostname> <port> <callsign> <passcode> {-identify | [-to_rf] <message>}
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+
+ if ($enable_logging == 1) {
+ `echo \"$aprs\" >> $log_file`;
+ }
+
+ }
+ }
+
+ # Reset the newdata flag
+ $newdata{$plane_id} = 0;
+ }
+
+
+ # Convert altitude to altitude above MSL instead of altitude from a reference barometric reading?
+ # Info: http://forums.flyer.co.uk/viewtopic.php?t=16375
+ # How many millibar in 1 feet of air? The answer is 0.038640888 @ 0C (25.879232 ft/mb).
+ # How many millibar in 1 foot of air [15 �C]? The answer is 0.036622931 @ 15C (27.3053 ft/mb).
+ # Flight Level uses a pressure of 29.92 "Hg (1,013.2 mb).
+ # Yesterday the pressure here was about 1013, so the altitudes looked right on. Today the planes
+ # are reporting ~500' higher via ADS-B when landing at Paine Field. Turns out the pressure today
+ # is 21mb lower, which equates to an additional 573' of altitude reported using the 15C figure!
+ #
+ # /A=aaaaaa feet
+ # CSE/SPD, i.e. 180/999 (speed in knots, direction is WRT true North), if unknown: .../...
+ # )AIDV#2!4903.50N/07201.75WA
+ # ;LEADERVVV*092345z4903.50N/07201.75W>088/036
+ # )A19E61!4903.50N/07201.75W' 356/426 /A=29275 # Example Small Airplane Object
+
+
+# end of while loop
+}
+
+close($socket);
+
+
diff --git a/scripts/ais.pl b/scripts/ais.pl
new file mode 100755
index 0000000..556b0a7
--- /dev/null
+++ b/scripts/ais.pl
@@ -0,0 +1,2478 @@
+#!/usr/bin/perl -W
+###########################################################################
+#
+# $Id: ais.pl,v 1.13 2016/04/22 23:02:36 we7u Exp $
+#
+# XASTIR, Amateur Station Tracking and Information Reporting
+# Copyright (C) 2016 The Xastir Group
+#
+# "ais.pl", a Perl script to connect aisdecoder and Xastir for receiving
+# packets from ships. This script will create a UDP server at localhost:10110
+# for aisdecoder to send packets into. It decodes AIS sentences, creates APRS
+# packets out of them and sends them to Xastir's server port (2023) via UDP.
+#
+# AIS is the international tracking system for ships. They transmit on Marine
+# VHF frequencies between 156.025 and 162.025, using a low power output of 1W,
+# high power output of either 5W or 12.5W, at a bit rate of 9600 bits/s using
+# NRZI data encoding and GMSK/FM at 0.5 modulation index.
+#
+# The two default AIS channels are:
+# Ch 87B, AIS-1: 161.975 MHz
+# Ch 88B, AIS-2: 162.025 MHz
+#
+# The two long-range channels are:
+# Ch 75: 156.775 MHz
+# Ch 76: 156.825 MHz
+#
+#
+# You'll need "libusb", "libpthread", "librtlsdr" installed to be able to
+# compile "rtl_ais".
+#
+# Get aisdecoder (rtl-ais).
+# git clone https://github.com/dgiardini/rtl-ais/
+# cd rtl_ais
+# make
+#
+#
+# Run "rtl_ais" like this (create a simple script!) for the two default channels:
+#
+# ./rtl_ais -h 127.0.0.1 -P 10110 -d 0 -l 161.975M -r 162.025M -n -p -2
+#
+# Change to marine channels 75 (156.775 MHz) and 76 (156.825 MHz) to pick
+# up long-range AIS (Type 27 packets), perhaps with another dongle:
+#
+# ./rtl_ais -h 127.0.0.1 -P 10110 -d 1 -l 156.775M -r 156.825M -n -p -2
+#
+# Note that "-p -2" is the frequency error of the RTL dongle.
+# Set that to the proper number determined from "Kal".
+#
+# "-d 0" or "-d 1" selects which dongle you're attaching to.
+#
+# Don't use "-g <number>" and instead use auto-gain, which appears to work
+# better. This also works better than enabling AGC in the chipset itself.
+#
+#
+# Run "ais.pl" like this (again, create a simple script!):
+# ./ais.pl boats <passcode> [--pipe] [--logging]
+#
+# You may add the "--pipe" flag in order to have "ais.pl" accept data
+# from a pipe instead of setting up a UDP server for "rtl_ais" to send
+# packets to. This is very useful for debugging or for processing
+# stored log files.
+#
+# If you add " --logging" to the end, this script will save the APRS portion of
+# the output to a file called "~/.xastir/logs/ships.log". You can later suck
+# this file back in to see the ships move around the map in hyperspeed. Useful
+# for a quick demo.
+#
+#
+# Antenna length should be:
+# 1/2 wave dipole: 2.89' -or- 2' 10.7" -or- 2' 10 5/8"
+# 1/4 wave: 1.44' -or- 1' 5.3" -or- 1' 5 5/16"
+#
+#
+# Excellent AIS info:
+# http://catb.org/gpsd/AIVDM.html # Eric Raymond/GPSD
+# https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1371-5-201402-I!!PDF-E.pdf # ITU Spec
+# http://www.navcen.uscg.gov/pdf/AIS/AIS_Special_Notice_and_AIS_Encoding_Guide_2012.pdf
+#
+# Example packets w/decoding of fields, plus large sample NMEA data file:
+# http://fossies.org/linux/gpsd/test/sample.aivdm
+#
+# Possible live data feed (Too many connections when I try):
+# ais.exploratorium.edu:80
+#
+###########################################################################
+
+
+use IO::Socket;
+use Storable;
+#use File::HomeDir;
+#use Data::Dumper; # Only used for debugging vessel_hash
+
+
+# Enable sending APRS packets to Xastir
+$enable_tx = 1;
+
+# Enable the printing of a statistics line every 100 messages
+# The format is: total type1 type2 ... type27
+# Example: 3600 62 0 15 857 0 0 0 0 0 0 0 0 0 0 113 0 0 0 0 685 1868 0 0 0 0 0 0
+$statistics_mode = 1;
+
+# Turn on/off printing of various types of messages. Enables debugging of a few
+# sentence types at a time w/o other messages cluttering up the output.
+$print_123 = 1;
+$print_4 = 1;
+$print_5 = 1; # (includes vesselName and shipType)
+$print_9 = 1;
+$print_18 = 1;
+$print_19 = 1; # (includes vesselName)
+$print_21 = 1;
+$print_24_A = 1; # A Variant (includes vesselName)
+$print_24_B = 1; # B Variant (includes shipType
+$print_27 = 1;
+$print_others = 1; # Not decoded yet
+
+# Keep statistics on each type (28 slots)
+ at message_type_count = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+$statistics_count = 0; # Number of messages before printing stats
+
+# Hash to store tac-calls in, to minimize tac-call assignment packets
+# This stores the complete tactical call, including whatever name
+# the ship goes by currently + the country of registry.
+my %tactical_hash;
+
+# Create external copy of vessel_hash for persistent store.
+# This contains only the vessel name, not the country of registry
+# or the 9-digit MMSI number.
+$home = `echo ~`;
+chomp $home;
+$persistentFileSpec = "$home/.xastir/config/vessel_hash";
+#$persistentFileSpec = File::HomeDir->my_home . "/.xastir/config/vessel_hash";
+#
+#
+# Hash to store vessel names in, for assigning tactical calls
+# If it doesn't exist, create it with some initial values
+# For final release this should simply create a dummy file
+my %vessel_hash;
+
+if ( !(-e $persistentFileSpec )) {
+ %vessel_hash = (
+ );
+
+ # Create the new hash file
+ store \%vessel_hash , $persistentFileSpec;
+}
+
+# Retrieve the cache
+%vessel_hash = %{retrieve($persistentFileSpec)};
+
+# Debug - print the hash values
+#print Dumper(\%vessel_hash);
+
+
+$udp_client = "xastir_udp_client";
+
+$xastir_host = "localhost"; # Server where Xastir is running
+$xastir_port = 2023; # 2023 is Xastir default UDP port
+
+$log_file = "~/.xastir/logs/ships.log";
+
+
+%countries = (
+ "201" => "Albania", #"Albania (Republic of)"
+ "202" => "Andorra", # "Andorra (Principality of)"
+ "203" => "Austria",
+ "204" => "Azores", # "Azores - Portugal"
+ "205" => "Belgium",
+ "206" => "Belarus", # "Belarus (Republic of)"
+ "207" => "Bulgaria", # "Bulgaria (Republic of)"
+ "208" => "Vatican", # "Vatican City State"
+ "209" => "Cyprus", # "Cyprus (Republic of)"
+ "210" => "Cyprus", # "Cyprus (Republic of)"
+ "211" => "Germany", # "Germany (Federal Republic of)"
+ "212" => "Cyprus", # "Cyprus (Republic of)"
+ "213" => "Georgia",
+ "214" => "Moldova", # "Moldova (Republic of)"
+ "215" => "Malta",
+ "216" => "Armenia", # "Armenia (Republic of)"
+ "218" => "Germany", # "Germany (Federal Republic of)"
+ "219" => "Denmark",
+ "220" => "Denmark",
+ "224" => "Spain",
+ "225" => "Spain",
+ "226" => "France",
+ "227" => "France",
+ "228" => "France",
+ "229" => "Malta",
+ "230" => "Finland",
+ "231" => "Faroe Is.", # "Faroe Islands - Denmark"
+ "232" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "233" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "234" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "235" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "236" => "Gibraltar", # "Gibraltar - United Kingdom of Great Britain and Northern Ireland"
+ "237" => "Greece",
+ "238" => "Croatia", # "Croatia (Republic of)"
+ "239" => "Greece",
+ "240" => "Greece",
+ "241" => "Greece",
+ "242" => "Morocco", # "Morocco (Kingdom of)"
+ "243" => "Hungary",
+ "244" => "Netherlands", # "Netherlands (Kingdom of the)"
+ "245" => "Netherlands", # "Netherlands (Kingdom of the)"
+ "246" => "Netherlands", # "Netherlands (Kingdom of the)"
+ "247" => "Italy",
+ "248" => "Malta",
+ "249" => "Malta",
+ "250" => "Ireland",
+ "251" => "Iceland",
+ "252" => "Liechtenstein", # "Liechtenstein (Principality of)"
+ "253" => "Luxembourg",
+ "254" => "Monaco", # "Monaco (Principality of)"
+ "255" => "Madeira", # "Madeira - Portugal"
+ "256" => "Malta",
+ "257" => "Norway",
+ "258" => "Norway",
+ "259" => "Norway",
+ "261" => "Poland", # "Poland (Republic of)"
+ "262" => "Montenegro",
+ "263" => "Portugal",
+ "264" => "Romania",
+ "265" => "Sweden",
+ "266" => "Sweden",
+ "267" => "Slovak", # "Slovak Republic"
+ "268" => "San Marino", # "San Marino (Republic of)"
+ "269" => "Switzerland", # "Switzerland (Confederation of)"
+ "270" => "Czech Rep.", # "Czech Republic"
+ "271" => "Turkey",
+ "272" => "Ukraine",
+ "273" => "Russian Fed.", # "Russian Federation"
+ "274" => "Macedonia", # "The Former Yugoslav Republic of Macedonia"
+ "275" => "Latvia", # "Latvia (Republic of)"
+ "276" => "Estonia", # "Estonia (Republic of)"
+ "277" => "Lithuania", # "Lithuania (Republic of)"
+ "278" => "Slovenia", # "Slovenia (Republic of)"
+ "279" => "Serbia", # "Serbia (Republic of)"
+ "301" => "Anguilla", # "Anguilla - United Kingdom of Great Britain and Northern Ireland"
+ "303" => "Alaska,U.S.", # "Alaska (State of) - United States of America"
+ "304" => "Antigua & Barbuda", # "Antigua and Barbuda"
+ "305" => "Antigua & Barbuda", # "Antigua and Barbuda"
+ "306" => "Sint Maarten", # "Sint Maarten (Dutch part) - Netherlands (Kingdom of the)"
+ "306" => "Bonaire, Sint Eustatius & Saba", # "Bonaire, Sint Eustatius and Saba - Netherlands (Kingdom of the)"
+ "306" => "Cura�ao", # "Cura�ao - Netherlands (Kingdom of the)"
+ "307" => "Aruba", # "Aruba - Netherlands (Kingdom of the)"
+ "308" => "Bahamas", # "Bahamas (Commonwealth of the)"
+ "309" => "Bahamas", # "Bahamas (Commonwealth of the)"
+ "310" => "Bermuda", # "Bermuda - United Kingdom of Great Britain and Northern Ireland"
+ "311" => "Bahamas", # "Bahamas (Commonwealth of the)"
+ "312" => "Belize",
+ "314" => "Barbados",
+ "316" => "Canada",
+ "319" => "Cayman Is.", # "Cayman Islands - United Kingdom of Great Britain and Northern Ireland"
+ "321" => "Costa Rica",
+ "323" => "Cuba",
+ "325" => "Dominica", # "Dominica (Commonwealth of)"
+ "327" => "Dominican Rep.", # "Dominican Republic"
+ "329" => "Guadeloupe", # "Guadeloupe (French Department of) - France"
+ "330" => "Grenada",
+ "331" => "Greenland", # "Greenland - Denmark"
+ "332" => "Guatemala", # "Guatemala (Republic of)"
+ "334" => "Honduras", # "Honduras (Republic of)"
+ "336" => "Haiti", # "Haiti (Republic of)"
+ "338" => "U.S.", # "United States of America"
+ "339" => "Jamaica",
+ "341" => "St. Kitts & Nevis", # "Saint Kitts and Nevis (Federation of)"
+ "343" => "St. Lucia",
+ "345" => "Mexico",
+ "347" => "Martinique", # "Martinique (French Department of) - France"
+ "348" => "Montserrat", # "Montserrat - United Kingdom of Great Britain and Northern Ireland"
+ "350" => "Nicaragua",
+ "351" => "Panama", # "Panama (Republic of)"
+ "352" => "Panama", # "Panama (Republic of)"
+ "353" => "Panama", # "Panama (Republic of)"
+ "354" => "Panama", # "Panama (Republic of)"
+ "355" => "Panama", # "Panama (Republic of)"
+ "356" => "Panama", # "Panama (Republic of)"
+ "357" => "Panama", # "Panama (Republic of)"
+ "358" => "Puerto Rico,U.S.", # "Puerto Rico - United States of America"
+ "359" => "El Salvador", # "El Salvador (Republic of)"
+ "361" => "St. Pierre & Miquelon", # "Saint Pierre and Miquelon (Territorial Collectivity of) - France"
+ "362" => "Trinidad & Tobago", # "Trinidad and Tobago"
+ "364" => "Turks & Caicos Is.", # "Turks and Caicos Islands - United Kingdom of Great Britain and Northern Ireland"
+ "366" => "U.S.", # "United States of America"
+ "367" => "U.S.", # "United States of America"
+ "368" => "U.S.", # "United States of America"
+ "369" => "U.S.", # "United States of America"
+ "370" => "Panama", # "Panama (Republic of)"
+ "371" => "Panama", # "Panama (Republic of)"
+ "372" => "Panama", # "Panama (Republic of)"
+ "373" => "Panama", # "Panama (Republic of)"
+ "374" => "Panama", # "Panama (Republic of)"
+ "375" => "St. Vincent & Grenadines", # "Saint Vincent and the Grenadines"
+ "376" => "St. Vincent & Grenadines", # "Saint Vincent and the Grenadines"
+ "377" => "St. Vincent & Grenadines", # "Saint Vincent and the Grenadines"
+ "378" => "British Virgin Is.", # "British Virgin Islands - United Kingdom of Great Britain and Northern Ireland"
+ "379" => "U.S. Virgin Is.", # "United States Virgin Islands - United States of America"
+ "401" => "Afghanistan",
+ "403" => "Saudi Arabia", # "Saudi Arabia (Kingdom of)"
+ "405" => "Bangladesh", # "Bangladesh (People's Republic of)"
+ "408" => "Bahrain", # "Bahrain (Kingdom of)"
+ "410" => "Bhutan", # "Bhutan (Kingdom of)"
+ "412" => "China", # "China (People's Republic of)"
+ "413" => "China", # "China (People's Republic of)"
+ "414" => "China", # "China (People's Republic of)"
+ "416" => "Taiwan", # "Taiwan (Province of China) - China (People's Republic of)"
+ "417" => "Sri Lanka", # "Sri Lanka (Democratic Socialist Republic of)"
+ "419" => "India", # "India (Republic of)"
+ "422" => "Iran", # "Iran (Islamic Republic of)"
+ "423" => "Azerbaijan", # "Azerbaijan (Republic of)"
+ "425" => "Iraq", # "Iraq (Republic of)"
+ "428" => "Israel", # "Israel (State of)"
+ "431" => "Japan",
+ "432" => "Japan",
+ "434" => "Turkmenistan",
+ "436" => "Kazakhstan", # "Kazakhstan (Republic of)"
+ "437" => "Uzbekistan", # "Uzbekistan (Republic of)"
+ "438" => "Jordan", # "Jordan (Hashemite Kingdom of)"
+ "440" => "Korea", # "Korea (Republic of)"
+ "441" => "Korea", # "Korea (Republic of)"
+ "443" => "Palestine", # "State of Palestine (In accordance with Resolution 99 Rev. Guadalajara, 2010)"
+ "445" => "N. Korea", # "Democratic People's Republic of Korea"
+ "447" => "Kuwait", # "Kuwait (State of)"
+ "450" => "Lebanon",
+ "451" => "Kyrgyz Rep.", # "Kyrgyz Republic"
+ "453" => "Macao", # "Macao (Special Administrative Region of China) - China (People's Republic of)"
+ "455" => "Maldives", # "Maldives (Republic of)"
+ "457" => "Mongolia",
+ "459" => "Nepal", # "Nepal (Federal Democratic Republic of)"
+ "461" => "Oman", # "Oman (Sultanate of)"
+ "463" => "Pakistan", # "Pakistan (Islamic Republic of)"
+ "466" => "Qatar", # "Qatar (State of)"
+ "468" => "Syria", # "Syrian Arab Republic"
+ "470" => "United Arab Emirates",
+ "472" => "Tajikistan", # "Tajikistan (Republic of)"
+ "473" => "Yemen", # "Yemen (Republic of)"
+ "475" => "Yemen", # "Yemen (Republic of)"
+ "477" => "Hong Kong", # "Hong Kong (Special Administrative Region of China) - China (People's Republic of)"
+ "478" => "Bosnia & Herzegovina", # "Bosnia and Herzegovina"
+ "501" => "Adelie Land", # "Adelie Land - France"
+ "503" => "Australia",
+ "506" => "Myanmar", # "Myanmar (Union of)"
+ "508" => "Brunei Darussalam",
+ "510" => "Micronesia", # "Micronesia (Federated States of)"
+ "511" => "Palau", # "Palau (Republic of)"
+ "512" => "New Zealand",
+ "514" => "Cambodia", # "Cambodia (Kingdom of)"
+ "515" => "Cambodia", # "Cambodia (Kingdom of)"
+ "516" => "Christmas Is.", # "Christmas Island (Indian Ocean) - Australia"
+ "518" => "Cook Is.", # "Cook Islands - New Zealand"
+ "520" => "Fiji", # "Fiji (Republic of)",
+ "523" => "Cocos (Keeling) Is.", # "Cocos (Keeling) Islands - Australia"
+ "525" => "Indonesia", # "Indonesia (Republic of)"
+ "529" => "Kiribati", # "Kiribati (Republic of)"
+ "531" => "Laos", # "Lao People's Democratic Republic"
+ "533" => "Malaysia",
+ "536" => "N. Mariana Is,U.S.", # "Northern Mariana Islands (Commonwealth of the) - United States of America"
+ "538" => "Marshall Is.", # "Marshall Islands (Republic of the)"
+ "540" => "New Caledonia", # "New Caledonia - France"
+ "542" => "Niue", # "Niue - New Zealand"
+ "544" => "Nauru", # "Nauru (Republic of)"
+ "546" => "French Polynesia", # "French Polynesia - France"
+ "548" => "Philippines", # "Philippines (Republic of the)"
+ "553" => "Papua New Guinea",
+ "555" => "Pitcairn Is.", # "Pitcairn Island - United Kingdom of Great Britain and Northern Ireland"
+ "557" => "Solomon Islands",
+ "559" => "American Samoa,U.S.", # "American Samoa - United States of America"
+ "561" => "Samoa", # "Samoa (Independent State of)"
+ "563" => "Singapore", # "Singapore (Republic of)"
+ "564" => "Singapore", # "Singapore (Republic of)"
+ "565" => "Singapore", # "Singapore (Republic of)"
+ "566" => "Singapore", # "Singapore (Republic of)"
+ "567" => "Thailand",
+ "570" => "Tonga", # "Tonga (Kingdom of)"
+ "572" => "Tuvalu",
+ "574" => "Viet Nam", # "Viet Nam (Socialist Republic of)"
+ "576" => "Vanuatu", # "Vanuatu (Republic of)"
+ "577" => "Vanuatu", # "Vanuatu (Republic of)"
+ "578" => "Wallis & Futuna Is.", # "Wallis and Futuna Islands - France"
+ "601" => "S. Africa", # "South Africa (Republic of)"
+ "603" => "Angola", # "Angola (Republic of)"
+ "605" => "Algeria", # "Algeria (People's Democratic Republic of)"
+ "607" => "St. Paul & Amsterdam Is.", # "Saint Paul and Amsterdam Islands - France"
+ "608" => "Ascension Is.", # "Ascension Island - United Kingdom of Great Britain and Northern Ireland"
+ "609" => "Burundi", # "Burundi (Republic of)"
+ "610" => "Benin", # "Benin (Republic of)"
+ "611" => "Botswana", # "Botswana (Republic of)"
+ "612" => "Central African Rep.", # "Central African Republic"
+ "613" => "Cameroon", # "Cameroon (Republic of)"
+ "615" => "Congo", # "Congo (Republic of the)"
+ "616" => "Comoros", # "Comoros (Union of the)"
+ "617" => "Cabo Verde", # "Cabo Verde (Republic of)"
+ "618" => "Crozet Archipelago", # "Crozet Archipelago - France"
+ "619" => "C�te d'Ivoire", # "C�te d'Ivoire (Republic of)"
+ "620" => "Comoros", # "Comoros (Union of the)"
+ "621" => "Djibouti", # "Djibouti (Republic of)"
+ "622" => "Egypt", # "Egypt (Arab Republic of)"
+ "624" => "Ethiopia", # "Ethiopia (Federal Democratic Republic of)"
+ "625" => "Eritrea",
+ "626" => "Gabonese Rep.", # "Gabonese Republic"
+ "627" => "Ghana",
+ "629" => "Gambia", # "Gambia (Republic of the)"
+ "630" => "Guinea-Bissau", # "Guinea-Bissau (Republic of)"
+ "631" => "Equatorial Guinea", # "Equatorial Guinea (Republic of)"
+ "632" => "Guinea", # "Guinea (Republic of)"
+ "633" => "Burkina Faso",
+ "634" => "Kenya", # "Kenya (Republic of)"
+ "635" => "Kerguelen Is.", # "Kerguelen Islands - France"
+ "636" => "Liberia", # "Liberia (Republic of)"
+ "637" => "Liberia", # "Liberia (Republic of)"
+ "638" => "S. Sudan", # "South Sudan (Republic of)"
+ "642" => "Libya",
+ "644" => "Lesotho", # "Lesotho (Kingdom of)"
+ "645" => "Mauritius", # "Mauritius (Republic of)"
+ "647" => "Madagascar", # "Madagascar (Republic of)"
+ "649" => "Mali", # "Mali (Republic of)"
+ "650" => "Mozambique", # "Mozambique (Republic of)"
+ "654" => "Mauritania", # "Mauritania (Islamic Republic of)"
+ "655" => "Malawi",
+ "656" => "Niger", # "Niger (Republic of the)"
+ "657" => "Nigeria", # "Nigeria (Federal Republic of)"
+ "659" => "Namibia", # "Namibia (Republic of)"
+ "660" => "Reunion", # "Reunion (French Department of) - France"
+ "661" => "Rwanda", # "Rwanda (Republic of)"
+ "662" => "Sudan", # "Sudan (Republic of the)"
+ "663" => "Senegal", # "Senegal (Republic of)"
+ "664" => "Seychelles", # "Seychelles (Republic of)"
+ "665" => "St. Helena", # "Saint Helena - United Kingdom of Great Britain and Northern Ireland"
+ "666" => "Somalia", # "Somalia (Federal Republic of)"
+ "667" => "Sierra Leone",
+ "668" => "Sao Tome & Principe", # "Sao Tome and Principe (Democratic Republic of)"
+ "669" => "Swaziland", # "Swaziland (Kingdom of)"
+ "670" => "Chad", # "Chad (Republic of)"
+ "671" => "Togolese Rep.", # "Togolese Republic"
+ "672" => "Tunisia",
+ "674" => "Tanzania", # "Tanzania (United Republic of)"
+ "675" => "Uganda", # "Uganda (Republic of)",
+ "676" => "Dem. Rep. of Congo", # "Democratic Republic of the Congo"
+ "677" => "Tanzania", # "Tanzania (United Republic of)"
+ "678" => "Zambia", # "Zambia (Republic of)"
+ "679" => "Zimbabwe", # "Zimbabwe (Republic of)"
+ "701" => "Argentine Rep.", # "Argentine Republic"
+ "710" => "Brazil", # "Brazil (Federative Republic of)"
+ "720" => "Bolivia", # "Bolivia (Plurinational State of)"
+ "725" => "Chile",
+ "730" => "Columbia", # "Colombia (Republic of)"
+ "735" => "Ecuador",
+ "740" => "Falkland Is.", # "Falkland Islands (Malvinas) - United Kingdom of Great Britain and Northern Ireland"
+ "745" => "Guiana", # "Guiana (French Department of) - France"
+ "750" => "Guyana",
+ "755" => "Parguay", # "Paraguay (Republic of)"
+ "760" => "Peru",
+ "765" => "Suriname", # "Suriname (Republic of)"
+ "770" => "Uruguay", # "Uruguay (Eastern Republic of)"
+ "775" => "Venezuela", # "Venezuela (Bolivarian Republic of)"
+);
+
+
+
+
+$xastir_user = shift;
+if (defined($xastir_user)) {
+ chomp $xastir_user;
+}
+if ( (!defined($xastir_user)) || ($xastir_user eq "") ) {
+ print "Please enter a callsign for Xastir injection, but not Xastir's callsign/SSID!\n";
+ die;
+}
+$xastir_user =~ tr/a-z/A-Z/;
+
+
+$xastir_pass = shift;
+if (defined($xastir_pass)) {
+ chomp $xastir_pass;
+}
+if ( (!defined($xastir_pass)) || ($xastir_pass eq "") ) {
+ print "Please enter a passcode for Xastir injection\n";
+ die;
+}
+
+
+# Enable pipe mode by adding the "--pipe" flag, then can pipe
+# packets into the program's STDIN for testing. Without this flag
+# we'll get our packets from "rtl_ais" via a UDP server we set up.
+# Enable logging mode by adding the "--logging" flag.
+$pipe_mode = 0;
+$logging_mode = 0;
+$pipe_flag = shift;
+if (defined($pipe_flag) && $pipe_flag ne "") {
+ chomp $pipe_flag;
+ if ($pipe_flag eq "--pipe") { $pipe_mode = 1; }
+ if ($pipe_flag eq "--logging") { $logging_mode = 1; }
+}
+
+# Try again in case there are two flags
+$pipe_flag = shift;
+if (defined($pipe_flag) && $pipe_flag ne "") {
+ chomp $pipe_flag;
+ if ($pipe_flag eq "--pipe") { $pipe_mode = 1; }
+ if ($pipe_flag eq "--logging") { $logging_mode = 1; }
+}
+
+
+if ($enable_tx) {
+ # Check Xastir's callsign/SSID to make sure we don't have a collision. This
+ # will prevent Xastir adopting the Items as its own and retransmitting them.
+ # "xastir_udp_client localhost 2023 <callsign> <passcode> -identify"
+ # "Received: WE7U-13"
+ #
+ $injection_call = $xastir_user;
+ $injection_call =~ s/-\d+//; # Get rid of dash and numbers
+
+ $injection_ssid = $xastir_user;
+ $injection_ssid =~ s/\w+//; # Get rid of letters
+ $injection_ssid =~ s/-//; # Get rid of dash
+ if ($injection_ssid eq "") { $injection_ssid = 0; }
+
+ # Find out Callsign/SSID of Xastir instance
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass -identify`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ ($remote_call, $remote_ssid) = split('-', $result);
+
+ chomp($remote_call);
+ $remote_call =~ s/Received:\s+//;
+
+ if ( !defined($remote_ssid) ) { $remote_ssid = ""; }
+ if ($remote_ssid ne "") { chomp($remote_ssid); }
+ if ($remote_ssid eq "") { $remote_ssid = 0; }
+
+ #print "$remote_call $remote_ssid $injection_call $injection_ssid\n";
+ #if ($remote_call eq $injection_call) { print "Call matches\n"; }
+ #if ($remote_ssid == $injection_ssid) { print "SSID matches\n"; }
+
+ if ( ($remote_call eq $injection_call)
+ && ($remote_ssid == $injection_ssid) ) {
+ $remote_ssid++;
+ $remote_ssid%= 16; # Increment by 1 mod 16
+ $xastir_user = "$remote_call-$remote_ssid";
+ print "Injection conflict. Corrected. New user = $xastir_user\n";
+ }
+}
+
+
+if ($pipe_mode) {
+ #
+ # Debug mode:
+ # Read from pipe in a loop
+ #
+ while (<STDIN>) {
+ &process_line($_);
+ }
+}
+else {
+ #
+ # Not debug mode:
+ # Create UDP server which connects to rtl_ais to get AIS data
+ # Listen on localhost port 10110 for UDP packets
+ #
+ my $host = "localhost";
+ my $port = 10110;
+ my $protocol = 'udp';
+
+ my $server = IO::Socket::INET->new(
+ #PeerAddr => $host,
+ LocalPort => $port,
+ Proto => $protocol,
+ Type => SOCK_DGRAM
+ ) or die "Socket could not be created, failed with error: $!\n";
+
+
+ # Main processing loop. Fetch packets as they are received via
+ # UDP from port 10110. Create APRS packets out of the interesting
+ # ones and inject them into Xastir at port 2023 using UDP.
+ #
+ while ($server->recv($received_data, 1024)) {
+
+ #my $peer_address = $server->peerhost();
+ #my $peer_port = $server->peerport();
+ #print "Message was received from: $peer_address, $peer_port\n";
+ #print "$received_data";
+
+ &process_line($received_data);
+
+ } # End of main processing loop
+}
+
+
+
+sub process_line () {
+
+ $received_data = shift;
+
+ if ($pipe_mode) {
+ $received_data =~ s/\n//; # Remove LF if present
+ $received_data =~ s/\r//; # Remove CR if present
+ }
+ else { # Live mode, receiving from rtl-ais. CRLF line-ends.
+ chop($received_data);
+ chop($received_data);
+ }
+
+ # Check for empty line
+ if ($received_data eq "") { return; }
+
+ # Verify the checksum: Refuse to process a message if it's bad.
+ # Computed on entire sentence including the AIVDM tag but excluding
+ # the leading "!" character.
+ my $str = $received_data;
+ $str =~ s/^!//; # Chop off leading '!'
+ #$str =~ s/(,\d)\*../$1/; # Chop to '*' char with leading digit and two trailing chars
+ $str =~ s/(,\d)\*...*/$1/; # Chop to '*' char with leading digit and at least two trailing chars
+ #print "$str\n";
+
+ # Received checksum. Catches the correct bytes except
+ # for those cases where the NMEA sentences continues
+ # on past the checksum.
+ my $str2 = $received_data;
+ #$str2 =~ s/.*(..)/$1/; # Catches only a checksum at the end
+ $str2 =~ s/.*,\d\*(..).*/$1/; # Catches checksum at end or middle
+
+ # Compute the checksum on the string between the '!' and the '*' chars.
+ $j = length($str);
+ my $sum = 0;
+ my $i;
+ for ($i = 0; $i <= $j; $i++) {
+ my $c = ord( substr($str, $i, 1) );
+ $sum = $sum ^ $c;
+ }
+ my $sum2 = sprintf( "%02X", $sum);
+ if ($str2 ne $sum2) {
+ #print "$received_data\n";
+ #print "$str\t$str2\t$sum2\n";
+ printf("***** Bad checksum: Received:%s Computed:%s $received_data\n\n", $str2, $sum2);
+ return(); # Skip this sentence
+ }
+ else {
+ #print "$str2\t$sum2\n";
+ }
+
+ @pieces = split( ',', $received_data);
+
+ # $pieces[0] = NMEA message type
+ # $pieces[1] = Number of sentences
+ # $pieces[2] = Sequential Message ID
+ # $pieces[3] = Sentence number
+ # $pieces[4] = AIS Channel
+ # $pieces[5] = Encoded AIS data
+ # $pieces[6] = End of data & NMEA Checksum
+
+ $data = $pieces[5];
+
+ # Encoded AIS data: Each ASCII character represents 6 bits.
+ # Subtract 48. If still a decimal number > 40, subtract 8.
+ # Convert to binary.
+ $bin_string = "";
+ $len = length($data);
+ for ($i = 0; $i < $len; $i++) {
+ $c = substr($data, $i, 1);
+ #print("$c");
+ $d = ord($c) - 48;
+ if ($d > 40) { $d = $d - 8; }
+ #print "\t$d\n";
+
+ # Convert each character to 6 bits of binary.
+ # Add the binary strings together to make one
+ # long binary string. Pull out the bits we need
+ # to decode each piece of the message.
+ #
+ $b = &dec2bin($d);
+ #print "\t$b\n";
+ $bin_string = $bin_string . $b;
+ }
+ #print "$bin_string\n";
+ #printf("%d\n", length($data) );
+ #printf("%d\n", length($bin_string) );
+
+
+ # If first six bits are 000001 (message type 1):
+ # MMSI Number - bit 8 for 30 bits
+ # HDG - bit 128 for 9 bits
+ # COG - bit 116 for 12 bits (and divide by 10)
+ # SOG - bit 50 for 10 bits (and divide by 10)
+ # Lat - bit 89 for 27 bits (a signed binary number, divide by 600,000)
+ # Lon - bit 61 for 28 bits (a signed binary number, divide by 600,000)
+ #
+ #if (substr($bin_string,0,6) eq "000001") {
+ # print "Message Type: 1\n";
+ #}
+ #else {
+ # printf"Message Type: %s\n", substr($bin_string,0,6);
+ # die;
+ #}
+
+ $bmessage_type = substr($bin_string, 0, 6);
+ $message_type = &bin2dec($bmessage_type);
+
+ if ($statistics_mode) {
+ # Keep a count of the received message types
+ if ($message_type < 28) {
+ $message_type_count[$message_type] += 1;
+ }
+
+ # Since there's no message type 0 use it's array location for total
+ $message_type_count[0] += 1;
+
+ # Print the totals every 100 messages
+ if ( ++$statistics_count >= 100 ) {
+ printf("Stats: ");
+ for (my $jj = 0; $jj < 28; $jj++) {
+ if ($jj == 0) { printf("%d", $message_type_count[$jj]); }
+ else { printf(",%d", $message_type_count[$jj]); }
+ }
+ print "\n\n";
+ $statistics_count = 0;
+ }
+ }
+
+ # The escape clause for bad message types is here
+ # so that they get included in the total count above.
+ # Don't move this escape above that code.
+ if ( ($message_type > 27) || ($message_type == 0) ) {
+# print "***** Undefined Msg Type $message_type: $received_data\n\n";
+ return();
+ }
+
+ #print "Message Type: $message_type\n";
+ # If not messages types 1, 2, 3, skip for now
+ if ( $message_type != 1
+ && $message_type != 2
+ && $message_type != 3
+ && $message_type != 4
+ && $message_type != 5
+ && $message_type != 9
+ && $message_type != 18
+ && $message_type != 19
+ && $message_type != 21
+ && $message_type != 24
+ && $message_type != 27
+ ) {
+ # Not something we decode so don't process the sentence.
+ if ($print_others == 1) { print " Msg Type: $message_type\n\n"; }
+ return;
+ }
+
+ if ( $message_type == 1
+ || $message_type == 2
+ || $message_type == 3 ) {
+ if ($print_123) { print " Msg Type: $message_type\n"; }
+ &process_types_1_2_3($message_type);
+ }
+
+ elsif ( $message_type == 4 ) {
+ if ($print_4) { print " Msg Type: $message_type\n"; }
+ &process_type_4($message_type);
+ }
+
+ elsif ( $message_type == 5 ) {
+ if ($print_5) { print " Msg Type: $message_type\n"; }
+ &process_type_5($message_type);
+ }
+
+ elsif ( $message_type == 9 ) {
+ if ($print_9) { print " Msg Type: $message_type\n"; }
+ &process_type_9($message_type);
+ }
+
+ elsif ( $message_type == 18 ) {
+ if ($print_18) { print " Msg Type: $message_type\n"; }
+ &process_type_18($message_type);
+
+ }
+
+ elsif ( $message_type == 19 ) {
+ if ($print_19) { print " Msg Type: $message_type\n"; }
+ &process_type_19($message_type);
+
+ }
+
+ elsif ( $message_type == 21 ) {
+ if ($print_21) { print " Msg Type: $message_type\n"; }
+ &process_type_21($message_type);
+
+ }
+
+ elsif ( $message_type == 24 ) {
+ #if ($print_24) { print " Msg Type: $message_type\t"; } # This is printed from the subroutine instead
+ &process_type_24($message_type);
+ }
+
+ elsif ( $message_type == 27 ) {
+ if ($print_27) { print " Msg Type: $message_type\n"; }
+if ($print_27) { print "$received_data\n"; }
+ &process_type_27($message_type);
+ }
+
+} # End of "process_line"
+
+
+
+# Message types 1, 2 and 3: Position Report Class A
+# These messages should have 168 bits total
+#
+sub process_types_1_2_3() {
+
+ #if ( length($bin_string) < 168 ) {
+ if ( length($bin_string) < 128 ) {
+ #printf("123\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("123\t%d\n", length($bin_string));
+ if ($print_123) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ # substr($bin_string, 0, 6); # Message Type
+ #my $brepeat_indicator = substr($bin_string, 6, 2);
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ my $bnavStatus = substr($bin_string, 38, 4);
+ #my $brateOfTurn = substr($bin_string, 42, 8);
+ my $bSpeedOverGnd = substr($bin_string, 50, 10); #####
+ #my $bpositionAccuracy = substr($bin_string, 60, 1);
+ my $bLongitude = substr($bin_string, 61, 28); #####
+ my $bLatitude = substr($bin_string, 89, 27); #####
+ my $bCourseOverGnd = substr($bin_string, 116, 12); #####
+ #my $btrueHeading = substr($bin_string, 128, 9);
+ #my $btimestamp = substr($bin_string, 137, 6);
+ #my $bspecialManeuver = substr($bin_string, 143, 2);
+ #my $bspare = substr($bin_string, 145, 3);
+ #my $bRAIM = substr($bin_string, 148, 1);
+ #my $bCommState = substr($bin_string, 149, 19);
+
+ my $userID = &bin2dec($bUserID);
+ if ($print_123) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_123) { print " Country: $country\n"; }
+
+ my $navStatus = &bin2dec($bnavStatus);
+ my $navStatusTxt = "";
+ if ($navStatus == 0) { $navStatusTxt = "Under_way:engine"; }
+ elsif ($navStatus == 1) { $navStatusTxt = "At_anchor"; }
+ elsif ($navStatus == 2) { $navStatusTxt = "Not_under_command"; }
+ elsif ($navStatus == 3) { $navStatusTxt = "Restricted_maneuverability"; }
+ elsif ($navStatus == 4) { $navStatusTxt = "Constrained_by_draught"; }
+ elsif ($navStatus == 5) { $navStatusTxt = "Moored"; }
+ elsif ($navStatus == 6) { $navStatusTxt = "Aground"; }
+ elsif ($navStatus == 7) { $navStatusTxt = "Fishing"; }
+ elsif ($navStatus == 8) { $navStatusTxt = "Under_way:sailing"; }
+ #elsif ($navStatus == 9) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 10) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 11) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 12) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 13) { $navStatusTxt = "Reserved"; }
+ elsif ($navStatus == 14) { $navStatusTxt = "AIS-SART_is_active"; }
+ #elsif ($navStatus == 15) { $navStatusTxt = "Not defined"; }
+
+# NOTE: 0-359 degrees
+# NOTE: 360 = N/A
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $courseOverGnd = &bin2dec($bCourseOverGnd) / 10 ;
+ my $course = "";
+ if ($courseOverGnd == 360) {
+ $course = "...";
+ }
+ elsif ($courseOverGnd == 0) {
+ $course = "360";
+ }
+ else {
+ $course = sprintf("%03d", $courseOverGnd);
+ }
+ if ($print_123) { print " Course: $courseOverGnd\n"; }
+
+# NOTE: 0 to 102 knots
+# NOTE: 102.3 = N/A
+# NOTE: 102.2 = 102.2 knots or higher
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $speedOverGnd = &bin2dec($bSpeedOverGnd) / 10;
+ my $speed = "";
+ if ($speedOverGnd == 102.3) {
+ $speed = "...";
+ }
+ else {
+ $speed = sprintf("%03d", $speedOverGnd);
+ }
+ if ($print_123) { print " Speed: $speedOverGnd\n"; }
+
+# NOTE: -90 to +90
+# NOTE: 91 = N/A
+ my $latitude = &signedBin2dec($bLatitude) / 600000.0;
+ if ($latitude == 91) {
+ if ($print_123) { print "\n"; }
+ return();
+ }
+ my $NS;
+ if ($print_123) { printf(" Latitude: %07.5f\n", $latitude); }
+ if ($latitude >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $latitude = abs($latitude);
+ }
+ my $latdeg = int($latitude);
+ my $latmins = $latitude - $latdeg;
+ my $latmins2 = $latmins * 60.0;
+ my $lat = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+
+# NOTE: -180 to +180
+# NOTE: 181 = N/A
+ my $longitude = &signedBin2dec($bLongitude) / 600000.0;
+ if ($longitude == 181) {
+ if ($print_123) { print "\n"; }
+ return();
+ }
+ my $EW;
+ if ($print_123) { printf("Longitude: %08.5f\n", $longitude); }
+ if ($longitude >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $longitude = abs($longitude);
+ }
+ my $londeg = int($longitude);
+ my $lonmins = $longitude - $londeg;
+ my $lonmins2 = $lonmins * 60.0;
+ my $lon = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ my $symbol = "s";
+
+ # Set up to add country or vessel_name + country to comment field
+ my $vesselTag = " ($country)";
+ if ( defined($vessel_hash{$userID}) ) { $vesselTag = " " . $vessel_hash{$userID} . " (" . $country . ")"; }
+
+ my $aprs= &escape_from_shell("$xastir_user>APRS:)$userID!$lat/$lon$symbol$course/$speed $navStatusTxt$vesselTag");
+ if ($print_123) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ my $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+
+ # Assign tactical call = "$userID + $country" or "$vesselName + $country"
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp;
+ if ( defined( $vessel_hash{$userID}) ) {
+ $temp = substr($vessel_hash{$userID} . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ else {
+ # No vessel name
+ # N7IPB: Display country of registry
+ $temp = substr("($country)", 0, 56); # Chop at 56 chars
+
+ # WE7U: Display the 9-digit MMSI + country of registry
+ #$temp = substr($userID . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ if ( !defined($tactical_hash{$userID}) ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_123) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+
+ if ($print_123) { print "\n"; }
+
+ return();
+}
+
+# Message type 4: Base station report
+# These messages should have 168 bits total
+#
+sub process_type_4() {
+
+ #if ( length($bin_string) < 168 ) {
+ if ( length($bin_string) < 128 ) {
+ #printf("123\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("123\t%d\n", length($bin_string));
+ if ($print_4) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ my $bLongitude = substr($bin_string, 79, 28); #####
+ my $bLatitude = substr($bin_string, 107, 27); #####
+ my $userID = &bin2dec($bUserID);
+ if ($print_4) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_4) { print " Country: $country\n"; }
+
+
+# NOTE: -90 to +90
+# NOTE: 91 = N/A
+ my $latitude = &signedBin2dec($bLatitude) / 600000.0;
+ if ($latitude == 91) { return(); }
+ my $NS;
+ if ($print_4) { printf(" Latitude: %07.5f\n", $latitude); }
+ if ($latitude >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $latitude = abs($latitude);
+ }
+ my $latdeg = int($latitude);
+ my $latmins = $latitude - $latdeg;
+ my $latmins2 = $latmins * 60.0;
+ my $lat = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+
+# NOTE: -180 to +180
+# NOTE: 181 = N/A
+ my $longitude = &signedBin2dec($bLongitude) / 600000.0;
+ if ($longitude == 181) { return(); }
+ my $EW;
+ if ($print_4) { printf("Longitude: %08.5f\n", $longitude); }
+ if ($longitude >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $longitude = abs($longitude);
+ }
+ my $londeg = int($longitude);
+ my $lonmins = $longitude - $londeg;
+ my $lonmins2 = $lonmins * 60.0;
+ my $lon = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ my $symbol = "/";
+
+ # Set up to add country or vessel_name + country to comment field
+ my $vesselTag = " Fixed Base Station";
+
+ if ( defined($vessel_hash{$userID}) ) { $vesselTag = " " . $vessel_hash{$userID} . " (" . $country . ")"; }
+
+ my $aprs= &escape_from_shell("$xastir_user>APRS:)$userID!$lat/$lon$symbol $vesselTag");
+ if ($print_4) { print " APRS: $aprs\n"; }
+ &log_aprs($aprs);
+ if ($enable_tx) {
+ my $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+
+ # Assign tactical call = "$userID + $country" or "$vesselName + $country"
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp;
+# if ( defined( $vessel_hash{$userID}) ) {
+# $temp = substr($vessel_hash{$userID} . " (" . $country . ")", 0, 56); # Chop at 56 chars
+# }
+# else {
+# # No vessel name
+# # N7IPB: Display country of registry
+# $temp = substr("($country)", 0, 56); # Chop at 56 chars
+#
+# # WE7U: Display the 9-digit MMSI + country of registry
+# #$temp = substr($userID . " (" . $country . ")", 0, 56); # Chop at 56 chars
+# }
+ # Force the tactical call to be FS since there are no names for Base Stations
+ #
+ $temp = "FS";
+ if ( !defined($tactical_hash{$userID}) ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_4) { print " APRS: $aprs\n"; }
+ &log_aprs($aprs);
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+
+ if ($print_4) { print "\n"; }
+
+ return();
+
+
+}
+
+
+# Message type 5: Static and Voyage Related Data (Vessel name, callsign, ship type)
+# This message should have 424 bits total
+#
+sub process_type_5() {
+
+ #if ( length($bin_string) < 424 ) {
+ if ( length($bin_string) < 240 ) {
+ #printf("5\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("5\t%d\n", length($bin_string));
+ if ($print_5) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ # substr($bin_string, 0, 6); # Message Type
+ # my $brepeat_indicator = substr($bin_string, 6, 2); # Repeat Indicator
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ # substr($bin_string, 38, 2); # AIS Version
+ # substr($bin_string, 40, 30); # IMO Number
+ #my $bCallsign = substr($bin_string, 70, 42); # Call Sign
+ my $bVesselName = substr($bin_string, 112, 120); # Vessel Name #####
+ my $bShipType = substr($bin_string, 232, 8); # Ship Type: Page 114 of ITU spec, Table 53
+ # substr($bin_string, 240, 9); # Dimension to Bow
+ # substr($bin_string, 249, 9); # Dimension to Stern
+ # substr($bin_string, 258, 6); # Dimension to Port
+ # substr($bin_string, 264, 6); # Dimension to Starboard
+ # substr($bin_string, 270, 4); # Position Fix Type
+ # substr($bin_string, 274, 4); # ETA month (UTC)
+ # substr($bin_string, 278, 5); # ETA day (UTC)
+ # substr($bin_string, 283, 5); # ETA hour (UC)
+ # substr($bin_string, 288, 6); # ETA minute (UTC)
+ # substr($bin_string, 294, 8); # Draught
+ # substr($bin_string, 302, 120); # Destination
+ # substr($bin_string, 422, 1); # DTE
+ # substr($bin_string, 423, 1); # Spare
+
+ my $userID = &bin2dec($bUserID);
+ if ($print_5) { print " User ID: $userID\n"; }
+
+ #my $callSign = &bin2text($bCallsign);
+ #print "Callsign: $callSign\n";
+
+ my $country = &decode_MID($userID);
+ if ($print_5) { print " Country: $country\n"; }
+
+ my $vesselName = &bin2text($bVesselName);
+ $vesselName =~ s/\s+$//; # Remove extra spaces at end
+
+ $vessel_hash{$userID} = $vesselName;
+ # Update the persistent store
+ store \%vessel_hash , $persistentFileSpec;
+
+ if ($print_5) { print " Vessel: $vesselName\n"; }
+
+ my $shipTypeTxt = &decodeShipType($bShipType);
+ if ($print_5) { print "Ship Type: $shipTypeTxt\n"; }
+
+ # Assign tactical call = $vesselName + $country
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+# my $temp = substr($vesselName . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ my $temp = substr($vesselName . " ($shipTypeTxt:$country)", 0, 56); # Chop at 56 chars
+
+ if ( !defined($tactical_hash{$userID}) || $tactical_hash{$userID} ne $temp ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_5) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+ if ($print_5) { print "\n"; }
+
+ return();
+}
+
+
+
+# Message type 9: Standard SAR Aircraft Position Report
+# This message should have 168 bits total
+#
+sub process_type_9() {
+
+ #if ( length($bin_string) < 168 ) {
+ if ( length($bin_string) < 128 ) {
+ #printf("9\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("9\t%d\n", length($bin_string));
+ if ($print_9) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ # substr($bin_string, 0, 6); # Message Type
+ # my $brepeat_indicator = substr($bin_string, 6, 2); # Repeat Indicator
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ my $bAltitude = substr($bin_string, 38, 12); # Altitude
+ my $bSpeedOverGnd = substr($bin_string, 50, 10); # SOG
+ # substr($bin_string, 60, 1); # Position Accuracy
+ my $bLongitude = substr($bin_string, 61, 28); # Longitude
+ my $bLatitude = substr($bin_string, 89, 27); # Latitude
+ my $bCourseOverGnd = substr($bin_string, 116, 12); # Course Over Ground
+ # substr($bin_string, 128, 6); # Time Stamp
+ # substr($bin_string, 134, 1); # Altitude sensor
+ # substr($bin_string, 135, 7); # Spare
+ # substr($bin_string, 142, 1); # DTE
+ # substr($bin_string, 143, 3); # Spare
+ # substr($bin_string, 146, 1); # Assigned mode
+ # substr($bin_string, 147, 1); # RAIM flag
+ # substr($bin_string, 148, 1); # Comm state selector flag
+ # substr($bin_string, 149, 19); # Radio status
+
+ my $userID = &bin2dec($bUserID);
+ if ($print_9) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_9) { print " Country: $country\n"; }
+
+# NOTE: 4095 = N/A
+# NOTE: 4094 = 4094 meters or higher.
+ my $altitude_meters = &bin2dec($bAltitude);
+ my $altitude = "";
+ if ($altitude_meters != 4095) {
+ if ($altitude_meters == 4094) {
+ $altitude = sprintf( "%s%06d%s", " /A=", $altitude_meters * 3.28084, "(Higher than)" );
+ }
+ else {
+ $altitude = sprintf( "%s%06d", " /A=", $altitude_meters * 3.28084 );
+ }
+ if ($print_9) { print " Altitude: $altitude\n"; }
+ }
+
+# NOTE: 0-359 degrees
+# NOTE: 360 = N/A
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $courseOverGnd = &bin2dec($bCourseOverGnd) / 10 ;
+ my $course = "";
+ if ($courseOverGnd == 360) {
+ $course = "...";
+ }
+ elsif ($courseOverGnd == 0) {
+ $course = "360";
+ }
+ else {
+ $course = sprintf("%03d", $courseOverGnd);
+ }
+ if ($print_9) { print " Course: $courseOverGnd\n"; }
+
+# NOTE: 0 to 102 knots
+# NOTE: 102.3 = N/A
+# NOTE: 102.2 = 102.2 knots or higher
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $speedOverGnd = &bin2dec($bSpeedOverGnd) / 10;
+ my $speed = "";
+ if ($speedOverGnd == 102.3) {
+ $speed = "...";
+ }
+ else {
+ $speed = sprintf("%03d", $speedOverGnd);
+ }
+ if ($print_9) { print " Speed: $speedOverGnd\n"; }
+
+# NOTE: -90 to +90
+# NOTE: 91 = N/A
+ my $latitude = &signedBin2dec($bLatitude) / 600000.0;
+ if ($latitude == 91) {
+ if ($print_9) { print "\n"; }
+ return();
+ }
+ my $NS;
+ if ($print_9) { printf(" Latitude: %07.5f\n", $latitude); }
+ if ($latitude >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $latitude = abs($latitude);
+ }
+ my $latdeg = int($latitude);
+ my $latmins = $latitude - $latdeg;
+ my $latmins2 = $latmins * 60.0;
+ my $lat = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+
+# NOTE: -180 to +180
+# NOTE: 181 = N/A
+ my $longitude = &signedBin2dec($bLongitude) / 600000.0;
+ if ($longitude == 181) {
+ if ($print_9) { print "\n"; }
+ return();
+ }
+ my $EW;
+ if ($print_9) { printf("Longitude: %08.5f\n", $longitude); }
+ if ($longitude >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $longitude = abs($longitude);
+ }
+ my $londeg = int($longitude);
+ my $lonmins = $longitude - $londeg;
+ my $lonmins2 = $lonmins * 60.0;
+ my $lon = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ my $symbol = "^"; # "^" = Large Aircraft. Could be "'" for small aircraft, "X" for helicopter.
+ my $vesselTag = " ($country)";
+ if ( defined($vessel_hash{$userID}) ) { $vesselTag = " " . $vessel_hash{$userID} . " (" . $country . ")"; }
+ my $aprs = &escape_from_shell("$xastir_user>APRS:)$userID!$lat/$lon$symbol$course/$speed$altitude SAR Aircraft$vesselTag");
+ if ($print_9) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ my $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+
+ # Assign tactical call = "$userID + $country" or "$vesselName + $country"
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp;
+ if ( defined( $vessel_hash{$userID}) ) {
+ $temp = substr($vessel_hash{$userID} . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ else {
+ # No vessel name
+ # N7IPB: Display country of registry
+ $temp = substr("($country)", 0, 56); # Chop at 56 chars
+
+ # WE7U: Display the 9-digit MMSI + country of registry
+ #$temp = substr($userID . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ if ( !defined($tactical_hash{$userID}) ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_9) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+
+ if ($print_9) { print "\n"; }
+
+ return();
+}
+
+
+
+# Message type 18: Standard Class B CS Position Report
+# This message should have 168 bits total
+#
+sub process_type_18() {
+
+ #if ( length($bin_string) < 168 ) {
+ if ( length($bin_string) < 124 ) {
+ #printf("18\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("18\t%d\n", length($bin_string));
+ if ($print_18) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ # substr($bin_string, 0, 6); # Message Type
+ # my $brepeat_indicator = substr($bin_string, 6, 2); # Repeat Indicator
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ # substr($bin_string, 38, 8); # Spare
+ my $bSpeedOverGnd = substr($bin_string, 46, 10); # Speed Over Ground
+ # substr($bin_string, 56, 1); # Position Accuracy
+ my $bLongitude = substr($bin_string, 57, 28); # Longitude
+ my $bLatitude = substr($bin_string, 85, 27); # Latitude
+ my $bCourseOverGnd = substr($bin_string, 112, 12); # Course Over Ground
+ # substr($bin_string, 124, 9); # True Heading
+ # substr($bin_string, 133, 6); # Time Stamp
+ # substr($bin_string, 139, 2); # Spare
+ # substr($bin_string, 141, 1); # CS Unit
+ # substr($bin_string, 142, 1); # Display flag
+ # substr($bin_string, 143, 1); # DSC Flag
+ # substr($bin_string, 144, 1); # Band flag
+ # substr($bin_string, 145, 1); # Message 22 flag
+ # substr($bin_string, 146, 1); # Assigned mode
+ # substr($bin_string, 147, 1); # RAIM flag
+ # substr($bin_string, 148, 1); # Comm state selector flag
+ # substr($bin_string, 149, 19); # Radio status
+
+ my $userID = &bin2dec($bUserID);
+ if ($print_18) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_18) { print " Country: $country\n"; }
+
+# NOTE: 0-359 degrees
+# NOTE: 360 = N/A
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $courseOverGnd = &bin2dec($bCourseOverGnd) / 10 ;
+ my $course = "";
+ if ($courseOverGnd == 360) {
+ $course = "...";
+ }
+ elsif ($courseOverGnd == 0) {
+ $course = "360";
+ }
+ else {
+ $course = sprintf("%03d", $courseOverGnd);
+ }
+ if ($print_18) { print " Course: $courseOverGnd\n"; }
+
+# NOTE: 0 to 102 knots
+# NOTE: 102.3 = N/A
+# NOTE: 102.2 = 102.2 knots or higher
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $speedOverGnd = &bin2dec($bSpeedOverGnd) / 10;
+ my $speed = "";
+ if ($speedOverGnd == 102.3) {
+ $speed = "...";
+ }
+ else {
+ $speed = sprintf("%03d", $speedOverGnd);
+ }
+ if ($print_18) { print " Speed: $speedOverGnd\n"; }
+
+# NOTE: -90 to +90
+# NOTE: 91 = N/A
+ my $latitude = &signedBin2dec($bLatitude) / 600000.0;
+ if ($latitude == 91) {
+ if ($print_18) { print "\n"; }
+ return();
+ }
+ my $NS;
+ if ($print_18) { printf(" Latitude: %07.5f\n", $latitude); }
+ if ($latitude >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $latitude = abs($latitude);
+ }
+ my $latdeg = int($latitude);
+ my $latmins = $latitude - $latdeg;
+ my $latmins2 = $latmins * 60.0;
+ my $lat = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+
+# NOTE: -180 to +180
+# NOTE: 181 = N/A
+ my $longitude = &signedBin2dec($bLongitude) / 600000.0;
+ if ($longitude == 181) {
+ if ($print_18) { print "\n"; }
+ return();
+ }
+ my $EW;
+ if ($print_18) { printf("Longitude: %08.5f\n", $longitude); }
+ if ($longitude >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $longitude = abs($longitude);
+ }
+ my $londeg = int($longitude);
+ my $lonmins = $longitude - $londeg;
+ my $lonmins2 = $lonmins * 60.0;
+ my $lon = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ my $symbol = "s";
+ my $vesselTag = " ($country)";
+ if ( defined($vessel_hash{$userID}) ) { $vesselTag = " " . $vessel_hash{$userID} . " (" . $country . ")"; }
+ my $aprs = &escape_from_shell("$xastir_user>APRS:)$userID!$lat/$lon$symbol$course/$speed$vesselTag");
+ if ($print_18) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ my $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+
+ # Assign tactical call = "$userID + $country" or "$vesselName + $country"
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp;
+ if ( defined( $vessel_hash{$userID}) ) {
+ $temp = substr($vessel_hash{$userID} . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ else {
+ # No vessel name
+ # N7IPB: Display country of registry
+ $temp = substr("($country)", 0, 56); # Chop at 56 chars
+
+ # WE7U: Display the 9-digit MMSI + country of registry
+ #$temp = substr($userID . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ if ( !defined($tactical_hash{$userID}) ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_18) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+
+ if ($print_18) { print "\n"; }
+
+ return();
+}
+
+
+
+# Message type 19: Extended Class B CS Position Report
+# This message should have 312 bits total
+#
+sub process_type_19() {
+
+ #if ( length($bin_string) < 312 ) {
+ if ( length($bin_string) < 263 ) {
+ #printf("19\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("19\t%d\n", length($bin_string));
+ if ($print_19) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ # substr($bin_string, 0, 6); # Message Type
+ # my $brepeat_indicator = substr($bin_string, 6, 2); # Repeat Indicator
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ # substr($bin_string, 38, 8); # Spare
+ my $bSpeedOverGnd = substr($bin_string, 46, 10); # Speed Over Ground
+ # substr($bin_string, 56, 1); # Position Accuracy
+ my $bLongitude = substr($bin_string, 57, 28); # Longitude
+ my $bLatitude = substr($bin_string, 85, 27); # Latitude
+ my $bCourseOverGnd = substr($bin_string, 112, 12); # Course Over Ground
+ # substr($bin_string, 124, 9); # True Heading
+ # substr($bin_string, 133, 6); # Time Stamp
+ # substr($bin_string, 139, 4); # Spare
+ my $bVesselName = substr($bin_string, 143, 120); # Name
+ # substr($bin_string, 263, 8); # Type of ship and cargo
+ # substr($bin_string, 271, 9); # Dimension to Bow
+ # substr($bin_string, 280, 9); # Dimension to Stern
+ # substr($bin_string, 289, 6); # Dimension to Port
+ # substr($bin_string, 295, 6); # Dimension to Starboard
+ # substr($bin_string, 301, 4); # Position Fix Type
+ # substr($bin_string, 305, 1); # RAIM flag
+ # substr($bin_string, 306, 1); # DTE
+ # substr($bin_string, 307, 1); # Assigned mode flag
+ # substr($bin_string, 308, 4); # Spare
+
+ my $userID = &bin2dec($bUserID);
+ if ($print_19) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_19) { print " Country: $country\n"; }
+
+# NOTE: 0-359 degrees
+# NOTE: 360 = N/A
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $courseOverGnd = &bin2dec($bCourseOverGnd) / 10 ;
+ my $course = "";
+ if ($courseOverGnd == 360) {
+ $course = "...";
+ }
+ elsif ($courseOverGnd == 0) {
+ $course = "360";
+ }
+ else {
+ $course = sprintf("%03d", $courseOverGnd);
+ }
+ if ($print_19) { print " Course: $courseOverGnd\n"; }
+
+# NOTE: 0 to 102 knots
+# NOTE: 102.3 = N/A
+# NOTE: 102.2 = 102.2 knots or higher
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $speedOverGnd = &bin2dec($bSpeedOverGnd) / 10;
+ my $speed = "";
+ if ($speedOverGnd == 102.3) {
+ $speed = "...";
+ }
+ else {
+ $speed = sprintf("%03d", $speedOverGnd);
+ }
+ if ($print_19) { print " Speed: $speedOverGnd\n"; }
+
+# NOTE: -90 to +90
+# NOTE: 91 = N/A
+ my $latitude = &signedBin2dec($bLatitude) / 600000.0;
+ if ($latitude == 91) {
+ if ($print_19) { print "\n"; }
+ return();
+ }
+ my $NS;
+ if ($print_19) { printf(" Latitude: %07.5f\n", $latitude); }
+ if ($latitude >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $latitude = abs($latitude);
+ }
+ my $latdeg = int($latitude);
+ my $latmins = $latitude - $latdeg;
+ my $latmins2 = $latmins * 60.0;
+ my $lat = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+# NOTE: -180 to +180
+# NOTE: 181 = N/A
+ my $longitude = &signedBin2dec($bLongitude) / 600000.0;
+ if ($longitude == 181) {
+ if ($print_19) { print "\n"; }
+ return();
+ }
+ my $EW;
+ if ($print_19) { printf("Longitude: %08.5f\n", $longitude); }
+ if ($longitude >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $longitude = abs($longitude);
+ }
+ my $londeg = int($longitude);
+ my $lonmins = $longitude - $londeg;
+ my $lonmins2 = $lonmins * 60.0;
+ my $lon = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ my $vesselName = "";
+ if ($bVesselName ne "") {
+ $vesselName = &bin2text($bVesselName);
+ $vesselName =~ s/\s+$//; # Remove extra spaces at end
+ }
+
+ my $symbol = "s";
+ my $vesselTag = " ($country)";
+ if ( defined($vessel_hash{$userID}) ) { $vesselTag = " " . $vessel_hash{$userID} . " (" . $country . ")"; }
+ my $aprs = &escape_from_shell("$xastir_user>APRS:)$userID!$lat/$lon$symbol$course/$speed$vesselTag");
+ if ($print_19) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ my $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+
+ if ($vesselName ne "") {
+ $vessel_hash{$userID} = $vesselName;
+ # Update the persistent store
+ store \%vessel_hash , $persistentFileSpec;
+
+ if ($print_19) { print " Vessel: $vesselName\n"; }
+
+ # Assign tactical call = $vesselName
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp = substr($vesselName . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ if ( !defined($tactical_hash{$userID}) || $tactical_hash{$userID} ne $temp ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_19) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+ }
+
+ if ($print_19) { print "\n"; }
+
+ return();
+}
+
+# Message type 21: Aid to Navigation report
+# These messages should have between 272 and 360 bits total
+# We don't use the full message and don't parse the name extension
+#
+sub process_type_21() {
+
+ #if ( length($bin_string) < 168 ) {
+ if ( length($bin_string) < 272 ) {
+ #printf("21\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("21\t%d\n", length($bin_string));
+ if ($print_21) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ my $bAidType = substr($bin_string, 38, 5);
+ my $bVesselName = substr($bin_string, 43, 120); # Vessel Name #####
+ my $bLongitude = substr($bin_string, 164, 28); #####
+ my $bLatitude = substr($bin_string, 192, 27); #####
+
+ my $userID = &bin2dec($bUserID);
+ if ($print_21) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_21) { print " Country: $country\n"; }
+
+ my $vesselName = &bin2text($bVesselName);
+ $vesselName =~ s/\s+$//; # Remove extra spaces at end
+
+ $vessel_hash{$userID} = $vesselName;
+ # Update the persistent store
+ store \%vessel_hash , $persistentFileSpec;
+
+ if ($print_21) { print " Vessel: $vesselName\n"; }
+
+ my $AidTypeTxt = &decodeAidType($bAidType);
+ if ($print_21) { print "Navaid Type: $AidTypeTxt\n"; }
+
+
+# NOTE: -90 to +90
+# NOTE: 91 = N/A
+ my $latitude = &signedBin2dec($bLatitude) / 600000.0;
+ if ($latitude == 91) { return(); }
+ my $NS;
+ if ($print_21) { printf(" Latitude: %07.5f\n", $latitude); }
+ if ($latitude >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $latitude = abs($latitude);
+ }
+ my $latdeg = int($latitude);
+ my $latmins = $latitude - $latdeg;
+ my $latmins2 = $latmins * 60.0;
+ my $lat = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+
+# NOTE: -180 to +180
+# NOTE: 181 = N/A
+ my $longitude = &signedBin2dec($bLongitude) / 600000.0;
+ if ($longitude == 181) { return(); }
+ my $EW;
+ if ($print_21) { printf("Longitude: %08.5f\n", $longitude); }
+ if ($longitude >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $longitude = abs($longitude);
+ }
+ my $londeg = int($longitude);
+ my $lonmins = $longitude - $londeg;
+ my $lonmins2 = $lonmins * 60.0;
+ my $lon = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ my $symbol = "N";
+
+ # Set up to add country or vessel_name + country to comment field
+ my $vesselTag = " (nav-aid)";
+ if ( defined($vessel_hash{$userID}) ) { $vesselTag = " " . $vessel_hash{$userID} . " (" . $country . ")"; }
+
+ my $aprs= &escape_from_shell("$xastir_user>APRS:)$userID!$lat\\$lon$symbol $AidTypeTxt");
+ if ($print_21) { print " APRS: $aprs\n"; }
+ &log_aprs($aprs);
+ if ($enable_tx) {
+ my $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+
+ # Assign tactical call = $vesselName + $country
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp = substr($vesselName, 0, 56); # Chop at 56 chars
+ if ( !defined($tactical_hash{$userID}) || $tactical_hash{$userID} ne $temp ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_21) { print " APRS: $aprs\n"; }
+ &log_aprs($aprs);
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+
+ if ($print_21) { print "\n"; }
+
+ return();
+
+}
+
+
+# Message type 24: Static Data Report (Vessel name, callsign, ship type)
+# This one has three variations:
+#
+# If Part Number field is 0, it's a Type A message.
+# If Part Number is 1, it's a Type B.
+#
+# Part B has two variations as well:
+# If the MMSI is that of an auxiliary craft, then the Mothership MMSI
+# is that of the mothership.
+# If not, then those 30 bits represent vessel dimmensions.
+#
+# This message should have:
+# Type A: 160 bits total
+# Type B: 168 bits total
+#
+sub process_type_24() {
+
+ #if ( length($bin_string) < 160 ) {
+ if ( length($bin_string) < 160 ) {
+ #printf("24\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("24\t%d\n", length($bin_string));
+ if ($print_24_A || $print_24_B) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ # substr($bin_string, 0, 6); # Message Type
+ # my $brepeat_indicator = substr($bin_string, 6, 2); # Repeat Indicator
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ my $bPartNumber = substr($bin_string, 38, 2); # Part Number
+
+ my $userID = &bin2dec($bUserID);
+
+ # Check for Type A/B Variant (Type B also has two variants!)
+ $PartNumber = &bin2dec($bPartNumber);
+ if ($PartNumber == 0) {
+
+ # It is a Type A Variant
+ if ($print_24_A) { print " Msg Type: $message_type\tType A Variant\n"; }
+
+ if ($print_24_A) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_24_A) { print " Country: $country\n"; }
+
+ # Type A Variant format starts at bit 40:
+ my $bVesselName = substr($bin_string, 40, 120); # Vessel Name
+ # substr($bin_string, 160, 8); # Spare.
+
+ my $vesselName = "";
+ if ($bVesselName ne "") {
+ $vesselName = &bin2text($bVesselName);
+ $vesselName =~ s/\s+$//; # Remove extra spaces at end
+ }
+ if ($vesselName ne "") {
+ $vessel_hash{$userID} = $vesselName;
+ # Update the persistent store
+ store \%vessel_hash , $persistentFileSpec;
+
+ if ($print_24_A) { print " Vessel: $vesselName\n"; }
+
+ # Assign tactical call = $vesselName
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp = substr($vesselName . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ if ( !defined($tactical_hash{$userID}) || $tactical_hash{$userID} ne $temp ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_24_A) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+ }
+ if ($print_24_A) { print "\n"; }
+ }
+ else {
+
+ # It is a Type B Variant. There are two variants of this type!
+ if ($print_24_B) { print " Msg Type: $message_type\tType B Variant\n"; }
+
+ if ($print_24_B) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_24_B) { print " Country: $country\n"; }
+
+ # Check the UserID to see if it is an Auxiliary Craft,
+ # to determine which Type B Variant to decode.
+ # Auxiliary craft: MMSI of form 98XXXYYYY, the XXX digits are the country code.
+
+ if ( !($userID =~ m/^98/)) {
+ # It is NOT an auxiliary craft:
+
+ # Alternate format starting at bit 40:
+ $bShipType = substr($bin_string, 40, 8); # Ship Type: Page 114 of ITU spec, Table 53
+ # substr($bin_string, 48, 18); # Vendor ID
+ # substr($bin_string, 66, 4); # Unit Model Code
+ # substr($bin_string, 70, 20); # Serial Number)
+ # substr($bin_string, 90, 42); # Call Sign
+ # substr($bin_string, 132, 9); # Dimension to bow
+ # substr($bin_string, 141, 9); # Dimension to Stern
+ # substr($bin_string, 150, 6); # Dimension to Port
+ # substr($bin_string, 156, 6); # Dimension to Starboard
+ # substr($bin_string, 162, 4); # Type of fix
+ # substr($bin_string, 166, 2); # Spare
+
+ my $shipTypeTxt = &decodeShipType($bShipType);
+ if ($print_24_B) { print "Ship Type: $shipTypeTxt\n"; }
+
+ # Assign tactical call = $vesselName + $shipTypeTxt
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ #my $temp = substr($vesselName . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ my $temp;
+ if (defined($vessel_hash{$userID}) ) {
+ $temp = substr($vessel_hash{$userID} . " ($shipTypeTxt:$country)", 0, 56); # Chop at 56 chars
+ }
+ else {
+ $temp = substr("($shipTypeTxt:$country)", 0, 56); # Chop at 56 chars
+ }
+
+ if ( !defined($tactical_hash{$userID}) || $tactical_hash{$userID} ne $temp ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_24_A) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+ }
+ else {
+ # It IS an auxiliary craft:
+
+ # Alternate format starting at bit 132:
+ # substr($bin_string, 132, 30); # Mothership MMSI
+ # substr($bin_string, 162, 6); # Spare
+ }
+
+ if ($print_24_B) { print "\n"; }
+ }
+
+ return();
+}
+
+
+
+# Message type 27: Position Report For Long-Range Applications (rare)
+# This message should have 96 bits total
+#
+sub process_type_27() {
+
+ #if ( length($bin_string) < 96 ) {
+ if ( length($bin_string) < 94 ) {
+ #printf("27\t%s\t%d\n", $bin_string, length($bin_string));
+ #printf("27\t%d\n", length($bin_string));
+ if ($print_27) { print "Msg too short\n\n"; }
+ return;
+ }
+
+ # substr($bin_string, 0, 6); # Message Type
+ # my $brepeat_indicator = substr($bin_string, 6, 2); # Repeat Indicator
+ my $bUserID = substr($bin_string, 8, 30); # MMSI
+ # substr($bin_string, 38, 1); # Position Accuracy
+ # substr($bin_string, 39, 1); # RAIM flag
+ my $bNavStatus = substr($bin_string, 40, 4); # Navigation Status
+ my $bLongitude = substr($bin_string, 44, 18); # Longitude
+ my $bLatitude = substr($bin_string, 62, 17); # Latitude
+ my $bSpeedOverGnd = substr($bin_string, 79, 6); # Speed Over Ground
+ my $bCourseOverGnd = substr($bin_string, 85, 9); # Course Over Ground
+ # substr($bin_string, 94, 1); # GNSS Position latency
+ # substr($bin_string, 95, 1); # Spare
+
+ my $userID = &bin2dec($bUserID);
+ if ($print_27) { print " User ID: $userID\n"; }
+
+ my $country = &decode_MID($userID);
+ if ($print_27) { print " Country: $country\n"; }
+
+ my $navStatus = &bin2dec($bNavStatus);
+ my $navStatusTxt = "";
+ if ($navStatus == 0) { $navStatusTxt = "Under_way:engine"; }
+ elsif ($navStatus == 1) { $navStatusTxt = "At_anchor"; }
+ elsif ($navStatus == 2) { $navStatusTxt = "Not_under_command"; }
+ elsif ($navStatus == 3) { $navStatusTxt = "Restricted_maneuverability"; }
+ elsif ($navStatus == 4) { $navStatusTxt = "Constrained_by_draught"; }
+ elsif ($navStatus == 5) { $navStatusTxt = "Moored"; }
+ elsif ($navStatus == 6) { $navStatusTxt = "Aground"; }
+ elsif ($navStatus == 7) { $navStatusTxt = "Fishing"; }
+ elsif ($navStatus == 8) { $navStatusTxt = "Under_way:sailing"; }
+ #elsif ($navStatus == 9) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 10) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 11) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 12) { $navStatusTxt = "Reserved"; }
+ #elsif ($navStatus == 13) { $navStatusTxt = "Reserved"; }
+ elsif ($navStatus == 14) { $navStatusTxt = "AIS-SART_is_active"; }
+ #elsif ($navStatus == 15) { $navStatusTxt = "Not defined"; }
+
+# NOTE: 0-359 degrees
+# NOTE: 511 = N/A
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $courseOverGnd = &bin2dec($bCourseOverGnd);
+ my $course = "";
+ if ($courseOverGnd == 511) {
+ $course = "...";
+ }
+ elsif ($courseOverGnd == 0) {
+ $course = "360";
+ }
+ else {
+ $course = sprintf("%03d", $courseOverGnd);
+ }
+ if ($print_27) { print " Course: $courseOverGnd\n"; }
+
+# NOTE: 0-62 knots
+# NOTE: 63 = N/A
+# APRS spec says can set to "000", "...", or " " if unknown
+ my $speedOverGnd = &bin2dec($bSpeedOverGnd);
+ my $speed = "";
+ if ($speedOverGnd == 63) {
+ $speed = "...";
+ }
+ else {
+ $speed = sprintf("%03d", $speedOverGnd);
+ }
+ if ($print_27) { print " Speed: $speedOverGnd\n"; }
+
+# NOTE: -90 to +90
+# NOTE: 91 = N/A = D548h or 54600 decimal. Divide by 91 to get 600 (our factor).
+ my $latitude = &signedBin2dec($bLatitude) / 600.0;
+ if ($latitude == 91) {
+ if ($print_27) { print "\n"; }
+ return();
+ }
+ if ($print_27) {
+ #printf(" bLatitude: %s\n", $bLatitude);
+ printf(" Latitude: %07.5f\n", $latitude);
+ }
+ my $NS;
+ if ($latitude >= 0.0) {
+ $NS = 'N';
+ } else {
+ $NS = 'S';
+ $latitude = abs($latitude);
+ }
+ my $latdeg = int($latitude);
+ my $latmins = $latitude - $latdeg;
+ my $latmins2 = $latmins * 60.0;
+ my $lat = sprintf("%02d%05.2f%s", $latdeg, $latmins2, $NS);
+
+# NOTE: -180 to +180
+# NOTE: 181 = N/A = 1A838h or 108600 decimal. Divide by 181 to get 600 (our factor).
+ my $longitude = &signedBin2dec($bLongitude) / 600.0;
+ if ($longitude == 181) {
+ if ($print_27) { print "\n"; }
+ return();
+ }
+ if ($print_27) {
+ #printf("bLongitude: %s\n", $bLongitude);
+ printf("Longitude: %08.5f\n", $longitude);
+ }
+ my $EW;
+ if ($longitude >= 0.0) {
+ $EW = 'E';
+ } else {
+ $EW = 'W';
+ $longitude = abs($longitude);
+ }
+ my $londeg = int($longitude);
+ my $lonmins = $longitude - $londeg;
+ my $lonmins2 = $lonmins * 60.0;
+ my $lon = sprintf("%03d%05.2f%s", $londeg, $lonmins2, $EW);
+
+ my $symbol = "s";
+ my $vesselTag = " ($country)";
+ if ( defined($vessel_hash{$userID}) ) { $vesselTag = " " . $vessel_hash{$userID} . " (" . $country . ")"; }
+ my $aprs = &escape_from_shell("$xastir_user>APRS:)$userID!$lat/$lon$symbol$course/$speed $navStatusTxt$vesselTag");
+ if ($print_27) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ my $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+
+ # Assign tactical call = "$userID + $country" or "$vesselName + $country"
+ # Max tactical call in Xastir is 57 chars (56 + terminator?)
+ #
+ my $temp;
+ if ( defined( $vessel_hash{$userID}) ) {
+ $temp = substr($vessel_hash{$userID} . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ else {
+ # No vessel name
+ # N7IPB: Display country of registry
+ $temp = substr("($country)", 0, 56); # Chop at 56 chars
+
+ # WE7U: Display the 9-digit MMSI + country of registry
+ #$temp = substr($userID . " (" . $country . ")", 0, 56); # Chop at 56 chars
+ }
+ if ( !defined($tactical_hash{$userID}) ) {
+ $tactical_hash{$userID} = $temp;
+ $aprs = &escape_from_shell($xastir_user . '>' . "APRS::TACTICAL :" . $userID . "=" . $temp);
+ if ($print_27) { print " APRS: $aprs\n"; }
+
+ &log_aprs($aprs);
+
+ if ($enable_tx) {
+ $result = `$udp_client $xastir_host $xastir_port $xastir_user $xastir_pass \"$aprs\"`;
+ if ($result =~ m/NACK/) {
+ die "Received NACK from Xastir: Callsign/Passcode don't match?\n";
+ }
+ }
+ }
+
+ if ($print_27) { print "\n"; }
+
+ return();
+}
+
+# Convert binary string $bShipType into text string $shipType
+#
+sub decodeAidType() {
+ my $bAidType = shift;
+
+ my $aidType = sprintf("%02d", &bin2dec($bAidType));
+ my $aidTypeTxt = "$aidType:";
+
+ # Special Craft
+ if ($aidType == 1) { $aidTypeTxt = $aidTypeTxt . "Reference point"; }
+ elsif ($aidType == 2) { $aidTypeTxt = $aidTypeTxt . "RACON"; }
+ elsif ($aidType == 3) { $aidTypeTxt = $aidTypeTxt . "Fixed structure off shore"; }
+ elsif ($aidType == 4) { $aidTypeTxt = $aidTypeTxt . "Reserved"; }
+ elsif ($aidType == 5) { $aidTypeTxt = $aidTypeTxt . "Light, without sectors"; }
+ elsif ($aidType == 6) { $aidTypeTxt = $aidTypeTxt . "Light, with sectors"; }
+ elsif ($aidType == 7) { $aidTypeTxt = $aidTypeTxt . "Leading Light Front"; }
+ elsif ($aidType == 8) { $aidTypeTxt = $aidTypeTxt . "Leading Light Rear"; }
+ elsif ($aidType == 9) { $aidTypeTxt = $aidTypeTxt . "Beacon, Cardinal N"; }
+ elsif ($aidType == 10) { $aidTypeTxt = $aidTypeTxt . "Beacon, Cardinal E"; }
+ elsif ($aidType == 11) { $aidTypeTxt = $aidTypeTxt . "Beacon, Cardinal S"; }
+ elsif ($aidType == 12) { $aidTypeTxt = $aidTypeTxt . "Beacon, Cardinal W"; }
+ elsif ($aidType == 13) { $aidTypeTxt = $aidTypeTxt . "Beacon, Port hand"; }
+ elsif ($aidType == 14) { $aidTypeTxt = $aidTypeTxt . "Beacon, Starboard hand"; }
+ elsif ($aidType == 15) { $aidTypeTxt = $aidTypeTxt . "Beacon, Preferred Channel port hand"; }
+ elsif ($aidType == 16) { $aidTypeTxt = $aidTypeTxt . "Beacon, Preferred Channel starboard hand"; }
+ elsif ($aidType == 17) { $aidTypeTxt = $aidTypeTxt . "Beacon, Isolated danger"; }
+ elsif ($aidType == 18) { $aidTypeTxt = $aidTypeTxt . "Beacon, Safe water"; }
+ elsif ($aidType == 19) { $aidTypeTxt = $aidTypeTxt . "Beacon, Special mark"; }
+ elsif ($aidType == 20) { $aidTypeTxt = $aidTypeTxt . "Cardinal Mark N"; }
+ elsif ($aidType == 21) { $aidTypeTxt = $aidTypeTxt . "Cardinal Mark E"; }
+ elsif ($aidType == 22) { $aidTypeTxt = $aidTypeTxt . "Cardinal Mark S"; }
+ elsif ($aidType == 23) { $aidTypeTxt = $aidTypeTxt . "Cardinal Mark W"; }
+ elsif ($aidType == 24) { $aidTypeTxt = $aidTypeTxt . "Port hand Mark"; }
+ elsif ($aidType == 25) { $aidTypeTxt = $aidTypeTxt . "Starboard hand Mark"; }
+ elsif ($aidType == 26) { $aidTypeTxt = $aidTypeTxt . "Preferred Channel Port hand"; }
+ elsif ($aidType == 27) { $aidTypeTxt = $aidTypeTxt . "Preferred Channel Starboard hand"; }
+ elsif ($aidType == 28) { $aidTypeTxt = $aidTypeTxt . "Isolated danger"; }
+ elsif ($aidType == 29) { $aidTypeTxt = $aidTypeTxt . "Safe Water"; }
+ elsif ($aidType == 30) { $aidTypeTxt = $aidTypeTxt . "Special Mark"; }
+ elsif ($aidType == 31) { $aidTypeTxt = $aidTypeTxt . "Light Vessel / LANBY / Rigs"; }
+
+ return($aidTypeTxt);
+}
+
+
+
+
+# Convert binary string $bShipType into text string $shipType
+#
+sub decodeShipType() {
+ my $bShipType = shift;
+
+ my $shipType = sprintf("%02d", &bin2dec($bShipType));
+ my $shipTypeTxt = "$shipType:";
+
+ # Special Craft
+ if ($shipType == 50) { $shipTypeTxt = $shipTypeTxt . "Pilot_Vessel"; }
+ elsif ($shipType == 51) { $shipTypeTxt = $shipTypeTxt . "Search_and_Rescue"; }
+ elsif ($shipType == 52) { $shipTypeTxt = $shipTypeTxt . "Harbor_Tug"; }
+ elsif ($shipType == 53) { $shipTypeTxt = $shipTypeTxt . "Fish,Offshore_or_Port_Tender"; }
+ elsif ($shipType == 54) { $shipTypeTxt = $shipTypeTxt . "Anti-pollution"; }
+ elsif ($shipType == 55) { $shipTypeTxt = $shipTypeTxt . "Law_Enforcement"; }
+ elsif ($shipType == 56) { $shipTypeTxt = $shipTypeTxt . "Local"; }
+ elsif ($shipType == 57) { $shipTypeTxt = $shipTypeTxt . "Local"; }
+ elsif ($shipType == 58) { $shipTypeTxt = $shipTypeTxt . "Medical_Transport_or_Public_Safety"; }
+ elsif ($shipType == 59) { $shipTypeTxt = $shipTypeTxt . "Neutral_State_Vessel"; }
+
+ # U.S. Specific Vessels
+ elsif ($shipType =~ m/^2/) {
+ if ($shipType =~ m/0$/) { $shipTypeTxt = $shipTypeTxt . "Wing_in_Ground"; }
+ if ($shipType =~ m/1$/) { $shipTypeTxt = $shipTypeTxt . "Tow-Push"; }
+ if ($shipType =~ m/2$/) { $shipTypeTxt = $shipTypeTxt . "Tow-Push"; }
+ if ($shipType =~ m/3$/) { $shipTypeTxt = $shipTypeTxt . "Light_Boat"; }
+ if ($shipType =~ m/4$/) { $shipTypeTxt = $shipTypeTxt . "Mobile_Offshore_Drilling"; }
+ if ($shipType =~ m/5$/) { $shipTypeTxt = $shipTypeTxt . "Offshore_Supply_Vessel"; }
+ if ($shipType =~ m/6$/) { $shipTypeTxt = $shipTypeTxt . "Processing_Vessel"; }
+ if ($shipType =~ m/7$/) { $shipTypeTxt = $shipTypeTxt . "School/Scientific/Research/Training_Vessel"; }
+ if ($shipType =~ m/8$/) { $shipTypeTxt = $shipTypeTxt . "U.S._Public_or_Govt"; }
+ if ($shipType =~ m/9$/) { $shipTypeTxt = $shipTypeTxt . "Autonomous_or_Remotely-Operated"; }
+ }
+
+ # Other Vessels
+ elsif ($shipType =~ m/^3/) {
+ if ($shipType =~ m/0$/) { $shipTypeTxt = $shipTypeTxt . "Fishing"; }
+ if ($shipType =~ m/1$/) { $shipTypeTxt = $shipTypeTxt . "Towing-Pull"; }
+ if ($shipType =~ m/2$/) { $shipTypeTxt = $shipTypeTxt . "Towing-Big"; }
+ if ($shipType =~ m/3$/) { $shipTypeTxt = $shipTypeTxt . "Dredging_or_Underwater_Ops"; }
+ if ($shipType =~ m/4$/) { $shipTypeTxt = $shipTypeTxt . "Diving_Ops"; }
+ if ($shipType =~ m/5$/) { $shipTypeTxt = $shipTypeTxt . "Military_Ops"; }
+ if ($shipType =~ m/6$/) { $shipTypeTxt = $shipTypeTxt . "Sailing"; }
+ if ($shipType =~ m/7$/) { $shipTypeTxt = $shipTypeTxt . "Pleasure_Craft"; }
+ if ($shipType =~ m/8$/) { $shipTypeTxt = $shipTypeTxt . "Other:Reserved"; }
+ if ($shipType =~ m/9$/) { $shipTypeTxt = $shipTypeTxt . "Other:Reserved"; }
+ }
+
+ elsif ($shipType =~ m/^0/) { $shipTypeTxt = $shipTypeTxt . "Not-Available"; }
+ elsif ($shipType =~ m/^1/) { $shipTypeTxt = $shipTypeTxt . "Reserved"; }
+ elsif ($shipType =~ m/^4/) { $shipTypeTxt = $shipTypeTxt . "Passenger_or_High_Speed"; }
+ elsif ($shipType =~ m/^6/) { $shipTypeTxt = $shipTypeTxt . "Passenger-Big"; }
+ elsif ($shipType =~ m/^7/) { $shipTypeTxt = $shipTypeTxt . "Cargo"; }
+ elsif ($shipType =~ m/^8/) { $shipTypeTxt = $shipTypeTxt . "Tanker"; }
+ elsif ($shipType =~ m/^9/) { $shipTypeTxt = $shipTypeTxt . "Other"; }
+
+ # Decode 2nd digit for 1/4/6/7/8/9 types:
+ if ( ($shipType =~ m/^1/)
+ || ($shipType =~ m/^4/)
+ || ($shipType =~ m/^6/)
+ || ($shipType =~ m/^7/)
+ || ($shipType =~ m/^8/)
+ || ($shipType =~ m/^9/) ) {
+
+ if ($shipType =~ m/0$/) { $shipTypeTxt = $shipTypeTxt . ""; }
+ if ($shipType =~ m/1$/) { $shipTypeTxt = $shipTypeTxt . "-Haz_Cat:A/X"; }
+ if ($shipType =~ m/2$/) { $shipTypeTxt = $shipTypeTxt . "-Haz_Cat:B/Y"; }
+ if ($shipType =~ m/3$/) { $shipTypeTxt = $shipTypeTxt . "-Haz_Cat:C/Z"; }
+ if ($shipType =~ m/4$/) { $shipTypeTxt = $shipTypeTxt . "-Haz_Cat:D/O"; }
+ if ($shipType =~ m/5$/) { $shipTypeTxt = $shipTypeTxt . "-Reserved"; }
+ if ($shipType =~ m/6$/) { $shipTypeTxt = $shipTypeTxt . "-Reserved"; }
+ if ($shipType =~ m/7$/) { $shipTypeTxt = $shipTypeTxt . "-Reserved"; }
+ if ($shipType =~ m/8$/) { $shipTypeTxt = $shipTypeTxt . "-Reserved"; }
+ if ($shipType =~ m/9$/) { $shipTypeTxt = $shipTypeTxt . ""; }
+ }
+
+
+ return($shipTypeTxt);
+}
+
+
+
+# Convert a 6-digit binary string to ASCII text
+# Encoded AIS data: Each 6 bits represents one ASCII character.
+#
+# Each six-bit nibble maps to an ASCII character.
+# Decimal 0-31 map to "@" ( ASCII 64) through "\_" (ASCII 95)
+# Decimal 32-63 map to " " (ASCII 32) though "?" (ASCII 63)
+# Lowercase, backtick, right/left braces, pipe, tilde and DEL can't be encoded
+sub bin2text() {
+ my $input = shift;
+ my $final_string = "";
+ my $len = length($input);
+ my $i;
+ for ($i = 0; $i < $len; $i+=6) {
+ my $binary_char = substr($input, $i, 6);
+ # Convert from binary to decimal (ord)
+ my $d = unpack("N", pack("B32", substr("00000000000000000000000000000000" . $binary_char, -32)));
+ if ($d > 0) { # Skip NULL characters
+ if ($d < 32) { $d += 64; }
+ $final_string = $final_string . chr($d);
+ }
+ }
+ $final_string =~ s/\s\s/ /g;
+ return($final_string);
+}
+
+
+
+## Convert a signed binary string of ASCII 0's and 1's to a decimal
+#sub signedBin2dec {
+# my $input = shift;
+#
+# if ( substr($input, 0, 1) eq "1") { # Negative number
+# # Pad to 32 bits with 1's
+## return unpack("i", pack("B32", substr("11111111111111111111111111111111" . $input, -32)));
+# # Invert all the bits. Add 1. Convert to decimal. Negate.
+# my $ii;
+# my $input2 = "";
+# my $len = length($input);
+# for ($ii = 0; $ii < $len; $ii++) {
+# my $j = substr($input, $ii, 1);
+# if ($j eq "0") { $j = "1"; }
+# else { $j = "0"; }
+# $input2 = $input2 . $j;
+# }
+##print "$input\n";
+##print "$input2\n";
+# my $binary = pack("B32", substr("00000000000000000000000000000000" . $input2, -32, 32));
+# my $decimal = unpack("N", $binary);
+# $decimal++;
+# $decimal = -$decimal;
+# return $decimal;
+# }
+# else { # Positive number
+# # Pad to 32 bits with 0's
+# return unpack("N", pack("B32", substr("00000000000000000000000000000000" . $input, -32))); #####
+#
+# }
+#}
+
+
+
+# Convert a signed binary string of ASCII 0's and 1's to a decimal the hard way.
+# This subroutine should be platform-agnostic as it does all the work internally.
+sub signedBin2dec {
+ my $input = shift;
+ my $input2 = "";
+ my $decimal;
+ my $multiplier;
+
+ #print "\n$input\n";
+ if ( substr($input, 0, 1) eq "1") { # Negative number
+ # Invert all the bits. Add 1. Convert to decimal. Negate.
+ my $ii;
+ my $len = length($input);
+ for ($ii = 0; $ii < $len; $ii++) {
+ my $j = substr($input, $ii, 1);
+ if ($j eq "0") { $j = "1"; }
+ else { $j = "0"; }
+ $input2 = $input2 . $j;
+ }
+ $decimal = &toDecimal($input2);
+ $decimal++;
+ $decimal = -$decimal;
+ return $decimal;
+ }
+ else { # Positive number
+ return &toDecimal($input);
+ }
+}
+
+
+
+# Convert to decimal from positive binary string.
+# Used by above signedBin2dec subroutine.
+sub toDecimal {
+ my $input = shift;
+ my $multiplier = 1;
+ my $decimal = 0;
+ my $len = length($input);
+ # Start at LSB bit, work toward MSB bit
+ for (my $ii = $len-1; $ii >= 0; $ii--) {
+ if (substr($input, $ii, 1) == 1) {
+ $decimal = $decimal + $multiplier;
+ #print "1\tMult: $multiplier\n";
+ }
+ else {
+ #print "0\n";
+ }
+ $multiplier = $multiplier * 2 ;
+ }
+ return $decimal;
+}
+
+
+
+# Convert an unsigned binary string of ASCII 0's and 1's to a decimal
+sub bin2dec {
+ my $temp = shift;
+ if (!defined($temp) || $temp eq "") { return; }
+ return unpack("N", pack("B32", substr("00000000000000000000000000000000" . $temp, -32))); #####
+}
+
+
+
+# Convert a decimal string (ASCII) to a binary string (ASCII)
+sub dec2bin {
+ my $input = "00000000000000000000000000" . shift;
+ my $str = unpack("B32", pack("N", $input));
+ my $str2 = substr($str, -6);
+ return $str2;
+}
+
+
+
+# Decode MID out of MMSI ($userID) too:
+# 8MIDXXXXX Diver's radio (not used in the U.S. in 2013)
+# MIDXXXXXX Ship
+# 0MIDXXXXX Group of ships; the U.S. Coast Guard, for example, is 03699999
+# 00MIDXXXX Coastal stations
+# 111MIDXXX SAR (Search and Rescue) aircraft
+# 99MIDXXXX Aids to Navigation
+# 98MIDXXXX Auxiliary craft associated with a parent ship
+# 970MIDXXX AIS SART (Search and Rescue Transmitter)
+# 972XXXXXX MOB (Man Overboard) device
+# 974XXXXXX EPIRB (Emergency Position Indicating Radio Beacon) AIS
+#
+# NOTE: U.S. ships sometimes incorrectly send "669" for those first 3 digits.
+# http://www.itu.int/online/mms/glad/cga_mids.sh?lng=E
+#
+sub decode_MID {
+ my $userID = shift;
+ my $MID = $userID;
+ if ($userID =~ m/^8.*/) { # Diver's radio
+ $MID =~ s/^8(...).*/$1/;
+ }
+ elsif ($userID =~ m/^00.*/) { # Coastal station
+ $MID =~ s/^00(...).*/$1/;
+ }
+ elsif ($userID =~ m/^0.*/) { # Group of ships
+ $MID =~ s/^0(...).*/$1/;
+ }
+ elsif ($userID =~ m/^111.*/) { # SAR aircraft
+ $MID =~ s/^111(...).*/$1/;
+ }
+ elsif ($userID =~ m/^99.*/) { # Navigation aid
+ $MID =~ s/^99(...).*/$1/;
+ }
+ elsif ($userID =~ m/^98.*/) { # Auxiliary craft
+ $MID =~ s/^98(...).*/$1/;
+ }
+ elsif ($userID =~ m/^970.*/) { # AIS SART
+ $MID =~ s/^970(...).*/$1/;
+ }
+ elsif ($userID =~ m/^972.*/) { # Man overboard device
+ $MID = "MOB";
+ }
+ elsif ($userID =~ m/^974.*/) { # EPIRB
+ $MID = "EPIRB";
+ }
+ else { # Ship
+ $MID =~ s/^(...).*/$1/;
+ }
+
+ my $country = "";
+ if (defined($countries{$MID})) {
+ $country = $countries{$MID};
+ }
+ else {
+ $country = "Unknown";
+ }
+
+ return $country;
+}
+
+
+
+# Escape characters from the shell
+#
+# Between double quotes the literal value of all characters is preserved except
+# for dollar sign, backticks (backward single quotes, ``) and backslash.
+#
+# The backslash retains its meaning only when followed by dollar, backtick, double quote,
+# backslash or newline. Within double quotes, the backslashes are removed from the input
+# stream when followed by one of these characters. Backslashes preceding characters that
+# don't have a special meaning are left unmodified for processing by the shell interpreter.
+#
+sub escape_from_shell {
+ $temp = shift;
+ $temp =~ s/\\/\\/g; # Look for \ and escape it. Do this one FIRST!
+ $temp =~ s/"/\\"/g; # Look for " and escape it
+ $temp =~ s/\$/\\\$/g; # Look for $ and escape it
+ $temp =~ s/\`/\\`/g; # Look for ` and escape it
+ return ($temp);
+}
+
+
+
+# Log messages to log file if logging enabled
+#
+sub log_aprs {
+ $sentence = shift;
+ if ($logging_mode) {
+ `echo \"$sentence\" >> $log_file`;
+ }
+}
+
+
diff --git a/scripts/ais_pp.pl b/scripts/ais_pp.pl
new file mode 100755
index 0000000..cf1fcf9
--- /dev/null
+++ b/scripts/ais_pp.pl
@@ -0,0 +1,413 @@
+#!/usr/bin/perl -W
+###########################################################################
+#
+# $Id: ais_pp.pl,v 1.1 2016/04/22 22:12:47 n7ipb Exp $
+#
+# XASTIR, Amateur Station Tracking and Information Reporting
+# Copyright (C) 2016 The Xastir Group
+#
+# "ais_pp.pl", a Perl script that prints a formatted list of the
+# ships found in the vessel hash checkpoint file created by ais.pl
+#
+###########################################################################
+
+
+#use IO::Socket;
+use Storable;
+#use File::HomeDir;
+use Data::Dumper; # Only used for debugging vessel_hash
+
+$home = `echo ~`;
+chomp $home;
+$persistentFileSpec = "$home/.xastir/config/vessel_hash";
+#$persistentFileSpec = File::HomeDir->my_home . "/.xastir/config/vessel_hash";
+#
+#
+# Hash to store vessel names in, for assigning tactical calls
+# If it doesn't exist, create it with some initial values
+# For final release this should simply create a dummy file
+my %vessel_hash;
+if ( !(-e $persistentFileSpec )) {
+ %vessel_hash = (
+ );
+ # Create the new hash file
+# store \%vessel_hash , $persistentFileSpec;
+}
+
+# Retrieve the cache
+%vessel_hash = %{retrieve($persistentFileSpec)};
+
+# Debug - print the hash values
+#print Dumper(\%vessel_hash);
+#open(my $fh, '>', 'report.txt');
+#print $fh Dumper(\%vessel_hash);
+
+%countries = (
+ "201" => "Albania", #"Albania (Republic of)"
+ "202" => "Andorra", # "Andorra (Principality of)"
+ "203" => "Austria",
+ "204" => "Azores", # "Azores - Portugal"
+ "205" => "Belgium",
+ "206" => "Belarus", # "Belarus (Republic of)"
+ "207" => "Bulgaria", # "Bulgaria (Republic of)"
+ "208" => "Vatican", # "Vatican City State"
+ "209" => "Cyprus", # "Cyprus (Republic of)"
+ "210" => "Cyprus", # "Cyprus (Republic of)"
+ "211" => "Germany", # "Germany (Federal Republic of)"
+ "212" => "Cyprus", # "Cyprus (Republic of)"
+ "213" => "Georgia",
+ "214" => "Moldova", # "Moldova (Republic of)"
+ "215" => "Malta",
+ "216" => "Armenia", # "Armenia (Republic of)"
+ "218" => "Germany", # "Germany (Federal Republic of)"
+ "219" => "Denmark",
+ "220" => "Denmark",
+ "224" => "Spain",
+ "225" => "Spain",
+ "226" => "France",
+ "227" => "France",
+ "228" => "France",
+ "229" => "Malta",
+ "230" => "Finland",
+ "231" => "Faroe Is.", # "Faroe Islands - Denmark"
+ "232" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "233" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "234" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "235" => "U.K.", # "United Kingdom of Great Britain and Northern Ireland"
+ "236" => "Gibraltar", # "Gibraltar - United Kingdom of Great Britain and Northern Ireland"
+ "237" => "Greece",
+ "238" => "Croatia", # "Croatia (Republic of)"
+ "239" => "Greece",
+ "240" => "Greece",
+ "241" => "Greece",
+ "242" => "Morocco", # "Morocco (Kingdom of)"
+ "243" => "Hungary",
+ "244" => "Netherlands", # "Netherlands (Kingdom of the)"
+ "245" => "Netherlands", # "Netherlands (Kingdom of the)"
+ "246" => "Netherlands", # "Netherlands (Kingdom of the)"
+ "247" => "Italy",
+ "248" => "Malta",
+ "249" => "Malta",
+ "250" => "Ireland",
+ "251" => "Iceland",
+ "252" => "Liechtenstein", # "Liechtenstein (Principality of)"
+ "253" => "Luxembourg",
+ "254" => "Monaco", # "Monaco (Principality of)"
+ "255" => "Madeira", # "Madeira - Portugal"
+ "256" => "Malta",
+ "257" => "Norway",
+ "258" => "Norway",
+ "259" => "Norway",
+ "261" => "Poland", # "Poland (Republic of)"
+ "262" => "Montenegro",
+ "263" => "Portugal",
+ "264" => "Romania",
+ "265" => "Sweden",
+ "266" => "Sweden",
+ "267" => "Slovak", # "Slovak Republic"
+ "268" => "San Marino", # "San Marino (Republic of)"
+ "269" => "Switzerland", # "Switzerland (Confederation of)"
+ "270" => "Czech Rep.", # "Czech Republic"
+ "271" => "Turkey",
+ "272" => "Ukraine",
+ "273" => "Russian Fed.", # "Russian Federation"
+ "274" => "Macedonia", # "The Former Yugoslav Republic of Macedonia"
+ "275" => "Latvia", # "Latvia (Republic of)"
+ "276" => "Estonia", # "Estonia (Republic of)"
+ "277" => "Lithuania", # "Lithuania (Republic of)"
+ "278" => "Slovenia", # "Slovenia (Republic of)"
+ "279" => "Serbia", # "Serbia (Republic of)"
+ "301" => "Anguilla", # "Anguilla - United Kingdom of Great Britain and Northern Ireland"
+ "303" => "Alaska - U.S.", # "Alaska (State of) - United States of America"
+ "304" => "Antigua & Barbuda", # "Antigua and Barbuda"
+ "305" => "Antigua & Barbuda", # "Antigua and Barbuda"
+ "306" => "Sint Maarten", # "Sint Maarten (Dutch part) - Netherlands (Kingdom of the)"
+ "306" => "Bonaire, Sint Eustatius & Saba", # "Bonaire, Sint Eustatius and Saba - Netherlands (Kingdom of the)"
+ "306" => "Cura�ao", # "Cura�ao - Netherlands (Kingdom of the)"
+ "307" => "Aruba", # "Aruba - Netherlands (Kingdom of the)"
+ "308" => "Bahamas", # "Bahamas (Commonwealth of the)"
+ "309" => "Bahamas", # "Bahamas (Commonwealth of the)"
+ "310" => "Bermuda", # "Bermuda - United Kingdom of Great Britain and Northern Ireland"
+ "311" => "Bahamas", # "Bahamas (Commonwealth of the)"
+ "312" => "Belize",
+ "314" => "Barbados",
+ "316" => "Canada",
+ "319" => "Cayman Is.", # "Cayman Islands - United Kingdom of Great Britain and Northern Ireland"
+ "321" => "Costa Rica",
+ "323" => "Cuba",
+ "325" => "Dominica", # "Dominica (Commonwealth of)"
+ "327" => "Dominican Rep.", # "Dominican Republic"
+ "329" => "Guadeloupe", # "Guadeloupe (French Department of) - France"
+ "330" => "Grenada",
+ "331" => "Greenland", # "Greenland - Denmark"
+ "332" => "Guatemala", # "Guatemala (Republic of)"
+ "334" => "Honduras", # "Honduras (Republic of)"
+ "336" => "Haiti", # "Haiti (Republic of)"
+ "338" => "U.S.", # "United States of America"
+ "339" => "Jamaica",
+ "341" => "Saint Kitts & Nevis", # "Saint Kitts and Nevis (Federation of)"
+ "343" => "Saint Lucia",
+ "345" => "Mexico",
+ "347" => "Martinique", # "Martinique (French Department of) - France"
+ "348" => "Montserrat", # "Montserrat - United Kingdom of Great Britain and Northern Ireland"
+ "350" => "Nicaragua",
+ "351" => "Panama", # "Panama (Republic of)"
+ "352" => "Panama", # "Panama (Republic of)"
+ "353" => "Panama", # "Panama (Republic of)"
+ "354" => "Panama", # "Panama (Republic of)"
+ "355" => "Panama", # "Panama (Republic of)"
+ "356" => "Panama", # "Panama (Republic of)"
+ "357" => "Panama", # "Panama (Republic of)"
+ "358" => "Puerto Rico - U.S.", # "Puerto Rico - United States of America"
+ "359" => "El Salvador", # "El Salvador (Republic of)"
+ "361" => "Saint Pierre & Miquelon", # "Saint Pierre and Miquelon (Territorial Collectivity of) - France"
+ "362" => "Trinidad & Tobago", # "Trinidad and Tobago"
+ "364" => "Turks & Caicos Is.", # "Turks and Caicos Islands - United Kingdom of Great Britain and Northern Ireland"
+ "366" => "U.S.", # "United States of America"
+ "367" => "U.S.", # "United States of America"
+ "368" => "U.S.", # "United States of America"
+ "369" => "U.S.", # "United States of America"
+ "370" => "Panama", # "Panama (Republic of)"
+ "371" => "Panama", # "Panama (Republic of)"
+ "372" => "Panama", # "Panama (Republic of)"
+ "373" => "Panama", # "Panama (Republic of)"
+ "374" => "Panama", # "Panama (Republic of)"
+ "375" => "Saint Vincent & the Grenadines", # "Saint Vincent and the Grenadines"
+ "376" => "Saint Vincent & the Grenadines", # "Saint Vincent and the Grenadines"
+ "377" => "Saint Vincent & the Grenadines", # "Saint Vincent and the Grenadines"
+ "378" => "British Virgin Is.", # "British Virgin Islands - United Kingdom of Great Britain and Northern Ireland"
+ "379" => "U.S. Virgin Is.", # "United States Virgin Islands - United States of America"
+ "401" => "Afghanistan",
+ "403" => "Saudi Arabia", # "Saudi Arabia (Kingdom of)"
+ "405" => "Bangladesh", # "Bangladesh (People's Republic of)"
+ "408" => "Bahrain", # "Bahrain (Kingdom of)"
+ "410" => "Bhutan", # "Bhutan (Kingdom of)"
+ "412" => "China", # "China (People's Republic of)"
+ "413" => "China", # "China (People's Republic of)"
+ "414" => "China", # "China (People's Republic of)"
+ "416" => "Taiwan", # "Taiwan (Province of China) - China (People's Republic of)"
+ "417" => "Sri Lanka", # "Sri Lanka (Democratic Socialist Republic of)"
+ "419" => "India", # "India (Republic of)"
+ "422" => "Iran", # "Iran (Islamic Republic of)"
+ "423" => "Azerbaijan", # "Azerbaijan (Republic of)"
+ "425" => "Iraq", # "Iraq (Republic of)"
+ "428" => "Israel", # "Israel (State of)"
+ "431" => "Japan",
+ "432" => "Japan",
+ "434" => "Turkmenistan",
+ "436" => "Kazakhstan", # "Kazakhstan (Republic of)"
+ "437" => "Uzbekistan", # "Uzbekistan (Republic of)"
+ "438" => "Jordan", # "Jordan (Hashemite Kingdom of)"
+ "440" => "Korea", # "Korea (Republic of)"
+ "441" => "Korea", # "Korea (Republic of)"
+ "443" => "Palestine", # "State of Palestine (In accordance with Resolution 99 Rev. Guadalajara, 2010)"
+ "445" => "N. Korea", # "Democratic People's Republic of Korea"
+ "447" => "Kuwait", # "Kuwait (State of)"
+ "450" => "Lebanon",
+ "451" => "Kyrgyz Rep.", # "Kyrgyz Republic"
+ "453" => "Macao", # "Macao (Special Administrative Region of China) - China (People's Republic of)"
+ "455" => "Maldives", # "Maldives (Republic of)"
+ "457" => "Mongolia",
+ "459" => "Nepal", # "Nepal (Federal Democratic Republic of)"
+ "461" => "Oman", # "Oman (Sultanate of)"
+ "463" => "Pakistan", # "Pakistan (Islamic Republic of)"
+ "466" => "Qatar", # "Qatar (State of)"
+ "468" => "Syria", # "Syrian Arab Republic"
+ "470" => "United Arab Emirates",
+ "472" => "Tajikistan", # "Tajikistan (Republic of)"
+ "473" => "Yemen", # "Yemen (Republic of)"
+ "475" => "Yemen", # "Yemen (Republic of)"
+ "477" => "Hong Kong", # "Hong Kong (Special Administrative Region of China) - China (People's Republic of)"
+ "478" => "Bosnia & Herzegovina", # "Bosnia and Herzegovina"
+ "501" => "Adelie Land", # "Adelie Land - France"
+ "503" => "Australia",
+ "506" => "Myanmar", # "Myanmar (Union of)"
+ "508" => "Brunei Darussalam",
+ "510" => "Micronesia", # "Micronesia (Federated States of)"
+ "511" => "Palau", # "Palau (Republic of)"
+ "512" => "New Zealand",
+ "514" => "Cambodia", # "Cambodia (Kingdom of)"
+ "515" => "Cambodia", # "Cambodia (Kingdom of)"
+ "516" => "Christmas Is.", # "Christmas Island (Indian Ocean) - Australia"
+ "518" => "Cook Is.", # "Cook Islands - New Zealand"
+ "520" => "Fiji", # "Fiji (Republic of)",
+ "523" => "Cocos (Keeling) Is.", # "Cocos (Keeling) Islands - Australia"
+ "525" => "Indonesia", # "Indonesia (Republic of)"
+ "529" => "Kiribati", # "Kiribati (Republic of)"
+ "531" => "Laos", # "Lao People's Democratic Republic"
+ "533" => "Malaysia",
+ "536" => "N. Mariana Is. - U.S.", # "Northern Mariana Islands (Commonwealth of the) - United States of America"
+ "538" => "Marshall Is.", # "Marshall Islands (Republic of the)"
+ "540" => "New Caledonia", # "New Caledonia - France"
+ "542" => "Niue", # "Niue - New Zealand"
+ "544" => "Nauru", # "Nauru (Republic of)"
+ "546" => "French Polynesia", # "French Polynesia - France"
+ "548" => "Philippines", # "Philippines (Republic of the)"
+ "553" => "Papua New Guinea",
+ "555" => "Pitcairn Is.", # "Pitcairn Island - United Kingdom of Great Britain and Northern Ireland"
+ "557" => "Solomon Islands",
+ "559" => "American Samoa - U.S.", # "American Samoa - United States of America"
+ "561" => "Samoa", # "Samoa (Independent State of)"
+ "563" => "Singapore", # "Singapore (Republic of)"
+ "564" => "Singapore", # "Singapore (Republic of)"
+ "565" => "Singapore", # "Singapore (Republic of)"
+ "566" => "Singapore", # "Singapore (Republic of)"
+ "567" => "Thailand",
+ "570" => "Tonga", # "Tonga (Kingdom of)"
+ "572" => "Tuvalu",
+ "574" => "Viet Nam", # "Viet Nam (Socialist Republic of)"
+ "576" => "Vanuatu", # "Vanuatu (Republic of)"
+ "577" => "Vanuatu", # "Vanuatu (Republic of)"
+ "578" => "Wallis & Futuna Is.", # "Wallis and Futuna Islands - France"
+ "601" => "S. Africa", # "South Africa (Republic of)"
+ "603" => "Angola", # "Angola (Republic of)"
+ "605" => "Algeria", # "Algeria (People's Democratic Republic of)"
+ "607" => "Saint Paul & Amsterdam Is.", # "Saint Paul and Amsterdam Islands - France"
+ "608" => "Ascension Is.", # "Ascension Island - United Kingdom of Great Britain and Northern Ireland"
+ "609" => "Burundi", # "Burundi (Republic of)"
+ "610" => "Benin", # "Benin (Republic of)"
+ "611" => "Botswana", # "Botswana (Republic of)"
+ "612" => "Central African Rep.", # "Central African Republic"
+ "613" => "Cameroon", # "Cameroon (Republic of)"
+ "615" => "Congo", # "Congo (Republic of the)"
+ "616" => "Comoros", # "Comoros (Union of the)"
+ "617" => "Cabo Verde", # "Cabo Verde (Republic of)"
+ "618" => "Crozet Archipelago", # "Crozet Archipelago - France"
+ "619" => "C�te d'Ivoire", # "C�te d'Ivoire (Republic of)"
+ "620" => "Comoros", # "Comoros (Union of the)"
+ "621" => "Djibouti", # "Djibouti (Republic of)"
+ "622" => "Egypt", # "Egypt (Arab Republic of)"
+ "624" => "Ethiopia", # "Ethiopia (Federal Democratic Republic of)"
+ "625" => "Eritrea",
+ "626" => "Gabonese Rep.", # "Gabonese Republic"
+ "627" => "Ghana",
+ "629" => "Gambia", # "Gambia (Republic of the)"
+ "630" => "Guinea-Bissau", # "Guinea-Bissau (Republic of)"
+ "631" => "Equatorial Guinea", # "Equatorial Guinea (Republic of)"
+ "632" => "Guinea", # "Guinea (Republic of)"
+ "633" => "Burkina Faso",
+ "634" => "Kenya", # "Kenya (Republic of)"
+ "635" => "Kerguelen Is.", # "Kerguelen Islands - France"
+ "636" => "Liberia", # "Liberia (Republic of)"
+ "637" => "Liberia", # "Liberia (Republic of)"
+ "638" => "S. Sudan", # "South Sudan (Republic of)"
+ "642" => "Libya",
+ "644" => "Lesotho", # "Lesotho (Kingdom of)"
+ "645" => "Mauritius", # "Mauritius (Republic of)"
+ "647" => "Madagascar", # "Madagascar (Republic of)"
+ "649" => "Mali", # "Mali (Republic of)"
+ "650" => "Mozambique", # "Mozambique (Republic of)"
+ "654" => "Mauritania", # "Mauritania (Islamic Republic of)"
+ "655" => "Malawi",
+ "656" => "Niger", # "Niger (Republic of the)"
+ "657" => "Nigeria", # "Nigeria (Federal Republic of)"
+ "659" => "Namibia", # "Namibia (Republic of)"
+ "660" => "Reunion", # "Reunion (French Department of) - France"
+ "661" => "Rwanda", # "Rwanda (Republic of)"
+ "662" => "Sudan", # "Sudan (Republic of the)"
+ "663" => "Senegal", # "Senegal (Republic of)"
+ "664" => "Seychelles", # "Seychelles (Republic of)"
+ "665" => "Saint Helena", # "Saint Helena - United Kingdom of Great Britain and Northern Ireland"
+ "666" => "Somalia", # "Somalia (Federal Republic of)"
+ "667" => "Sierra Leone",
+ "668" => "Sao Tome & Principe", # "Sao Tome and Principe (Democratic Republic of)"
+ "669" => "Swaziland", # "Swaziland (Kingdom of)"
+ "670" => "Chad", # "Chad (Republic of)"
+ "671" => "Togolese Rep.", # "Togolese Republic"
+ "672" => "Tunisia",
+ "674" => "Tanzania", # "Tanzania (United Republic of)"
+ "675" => "Uganda", # "Uganda (Republic of)",
+ "676" => "Dem. Rep. of the Congo", # "Democratic Republic of the Congo"
+ "677" => "Tanzania", # "Tanzania (United Republic of)"
+ "678" => "Zambia", # "Zambia (Republic of)"
+ "679" => "Zimbabwe", # "Zimbabwe (Republic of)"
+ "701" => "Argentine Rep.", # "Argentine Republic"
+ "710" => "Brazil", # "Brazil (Federative Republic of)"
+ "720" => "Bolivia", # "Bolivia (Plurinational State of)"
+ "725" => "Chile",
+ "730" => "Columbia", # "Colombia (Republic of)"
+ "735" => "Ecuador",
+ "740" => "Falkland Is.", # "Falkland Islands (Malvinas) - United Kingdom of Great Britain and Northern Ireland"
+ "745" => "Guiana", # "Guiana (French Department of) - France"
+ "750" => "Guyana",
+ "755" => "Parguay", # "Paraguay (Republic of)"
+ "760" => "Peru",
+ "765" => "Suriname", # "Suriname (Republic of)"
+ "770" => "Uruguay", # "Uruguay (Eastern Republic of)"
+ "775" => "Venezuela", # "Venezuela (Bolivarian Republic of)"
+);
+
+
+
+
+ # Main processing loop. Fetch lines from vessel_hash
+ # and print them out on stdio
+ # Format: MILLENIUM FALCON 366978720 U.S.
+while(my($userID, $vesselName) = each %vessel_hash) {
+ my $country = &decode_MID($userID);
+ printf "%-20s %-9d %s\n",$vesselName,$userID,$country;
+}
+exit;
+
+# Decode MID out of MMSI ($userID) too:
+# 8MIDXXXXX Diver's radio (not used in the U.S. in 2013)
+# MIDXXXXXX Ship
+# 0MIDXXXXX Group of ships; the U.S. Coast Guard, for example, is 03699999
+# 00MIDXXXX Coastal stations
+# 111MIDXXX SAR (Search and Rescue) aircraft
+# 99MIDXXXX Aids to Navigation
+# 98MIDXXXX Auxiliary craft associated with a parent ship
+# 970MIDXXX AIS SART (Search and Rescue Transmitter)
+# 972XXXXXX MOB (Man Overboard) device
+# 974XXXXXX EPIRB (Emergency Position Indicating Radio Beacon) AIS
+#
+# NOTE: U.S. ships sometimes incorrectly send "669" for those first 3 digits.
+# http://www.itu.int/online/mms/glad/cga_mids.sh?lng=E
+#
+sub decode_MID {
+ my $userID = shift;
+ my $MID = $userID;
+ if ($userID =~ m/^8.*/) { # Diver's radio
+ $MID =~ s/^8(...).*/$1/;
+ }
+ elsif ($userID =~ m/^00.*/) { # Coastal station
+ $MID =~ s/^00(...).*/$1/;
+ }
+ elsif ($userID =~ m/^0.*/) { # Group of ships
+ $MID =~ s/^0(...).*/$1/;
+ }
+ elsif ($userID =~ m/^111.*/) { # SAR aircraft
+ $MID =~ s/^111(...).*/$1/;
+ }
+ elsif ($userID =~ m/^99.*/) { # Navigation aid
+ $MID =~ s/^99(...).*/$1/;
+ }
+ elsif ($userID =~ m/^98.*/) { # Auxiliary craft
+ $MID =~ s/^98(...).*/$1/;
+ }
+ elsif ($userID =~ m/^970.*/) { # AIS SART
+ $MID =~ s/^970(...).*/$1/;
+ }
+ elsif ($userID =~ m/^972.*/) { # Man overboard device
+ $MID = "MOB";
+ }
+ elsif ($userID =~ m/^974.*/) { # EPIRB
+ $MID = "EPIRB";
+ }
+ else { # Ship
+ $MID =~ s/^(...).*/$1/;
+ }
+
+ my $country = "";
+ if (defined($countries{$MID})) {
+ $country = $countries{$MID};
+ }
+ else {
+ $country = "Unknown";
+ }
+
+ return $country;
+}
+
+
+
diff --git a/scripts/get-BOMdata b/scripts/get-BOMdata
index c3642d1..690192b 100755
--- a/scripts/get-BOMdata
+++ b/scripts/get-BOMdata
@@ -1,13 +1,13 @@
#!/bin/sh
#
-# $Id: get-BOMdata,v 1.3 2014/09/12 19:04:47 we7u Exp $
+# $Id: get-BOMdata,v 1.4 2016/07/01 18:51:53 we7u Exp $
#
# Script to retrieve BOM data files.
#
# Originally written 2006/03/07 by Steven, WM5Z, and Curt, WE7U.
# Modified from original get-NWSdata script by Geoff VK2XJG.
#
-# Copyright (C) 2000-2014 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff --git a/scripts/get-NWSdata b/scripts/get-NWSdata
index 2d5251e..453e614 100755
--- a/scripts/get-NWSdata
+++ b/scripts/get-NWSdata
@@ -1,12 +1,12 @@
#!/bin/sh
#
-# $Id: get-NWSdata,v 1.44 2014/09/12 19:04:47 we7u Exp $
+# $Id: get-NWSdata,v 1.51 2016/07/01 18:51:53 we7u Exp $
#
# Script to retrieve NWS data files.
#
# Originally written 2006/03/07 by Steven, WM5Z, and Curt, WE7U.
#
-# Copyright (C) 2000-2014 The Xastir Group
+# Copyright (C) 2000-2016 The Xastir Group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -37,21 +37,19 @@
# should START to be used. Don't just blindly put the newest filename
# here if that start-date hasn't arrived yet!
#
-FILE1="w_04jn14" # NWSM Libraries: County Warning Area Boundaries
+FILE1="w_05ap16a" # NWSM Libraries: County Warning Area Boundaries
-FILE2="z_12jn14c" # NWSM Libraries: Public Zone Boundaries
+FILE2="z_16jn16a" # NWSM Libraries: Public Zone Boundaries
-FILE3="mz04jn14" # NWSM Libraries: Coastal and Offshore Marine Zones
+FILE3="mz05ap16a" # NWSM Libraries: Coastal and Offshore Marine Zones
FILE4="oz01ap14b" # NWSM Libraries: Coastal and Offshore Marine Zones
-FILE5="hz03de13" # NWSM Libraries: Coastal and Offshore Marine Zones
-
-FILE6="fz12jn14a" # NWSM Libraries: Fire Weather Zone Boundaries
-
-FILE7="c_04jn14" # AWIPS County Libraries (under "States, Provinces & Counties", "U.S. Counties")
+FILE5="hz04jn14" # NWSM Libraries: Coastal and Offshore Marine Zones
+FILE6="fz16jn16a" # NWSM Libraries: Fire Weather Zone Boundaries
+FILE7="c_05ap16a" # AWIPS County Libraries (under "States, Provinces & Counties", "U.S. Counties")
x=`dirname $0`
diff --git a/scripts/get-maptools.sh b/scripts/get-maptools.sh
deleted file mode 100755
index 9de4b20..0000000
--- a/scripts/get-maptools.sh
+++ /dev/null
@@ -1,370 +0,0 @@
-#!/bin/bash +x
-#
-# $Id: get-maptools.sh,v 1.14 2012/11/01 18:57:19 we7u Exp $
-#
-#
-# Script originally to retrieve and install Shapelib.
-# Written 20050227 Dan Brown N8YSZ
-# Modified 20060321 to generalize for all maptools - N8YSZ.
-#
-#
-# Copyright (C) 2000-2012 The Xastir Group
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-# Look at the README for more information on the program.
-#
-
-#
-# Figure out whether we have bsdtar or gnutar on the system. Either
-# should work. If not, we'll have to check for "gunzip" and then do
-# "gunzip -c file.tar.gz | tar xf -" instead.
-#
-echo
-echo Checking for necessary utilities...
-if (wget --version 2>&1 | grep "GNU")
-then
- echo ***Found wget. Good!
-else
- echo ***Did not find wget. Exiting...
-fi
-TAR=gtar
-if ($TAR --version 2>&1 | grep "GNU")
-then
- echo ***Found GNU tar as \'gtar\'. Good!
-else
- echo Did not find gtar, checking for tar...
- TAR=tar
- if ($TAR --version 2>&1 | grep "GNU")
- then
- echo ***Found GNU tar as \'tar\'. Good!
- else
- echo Did not find GNU tar. Checking for bsdtar...
- if ($TAR --version 2>&1 | grep "bsdtar")
- then
- echo ***Found bsdtar as \'tar\'. Good!
- else
- echo Did not find bsdtar. Checking for gunzip...
- if (gunzip --version 2>&1 | grep "GNU")
- then
- echo ***Found gunzip. Good!
- echo Checking for tar...
- if test -e /usr/local/bin/tar -o -e /usr/bin/tar -o -e /bin/tar
- then
- echo ***Found tar. Good!
- TAR=""
- else
- echo ***Did not find tar. Exiting...
- exit
- fi
- else
- echo ***Did not find gunzip. Exiting...
- exit
- fi
- fi
- fi
-fi
-#echo $TAR
-
-
-MAPTOOLS=http://dl.maptools.org/dl
-
-#
-XASDIR=$HOME/src/xastir
-XASTIR_TMP=$XASDIR/tmp
-XASTIR_LIB=$XASDIR/lib
-
-if [ ! -d $XASTIR_TMP ]
-then
- printf "WARNING: %s Doesn't appear to exist. Creating temporary directory\n" $XASTIR_TMP
- # Make sure this exists!
- mkdir -p $XASTIR_TMP
-fi
-
-printf "Checking MACHTYPE found: %s\n" $MACHTYPE
-
-if [ ${MACHTYPE}.z = '.z' ]
-then
- printf "You really ought to upgrade to a current version of bash \n"
- printf "Making best guess attempt using uname\n"
- UNAME=`uname`
-else
- UNAME=$MACHTYPE
-fi
-
-if [ -e /sbin/ldconfig ]
-then
- printf "OS is %s. Found ldconfig.\n" $UNAME
- DO_LDCONFIG='yes'
-else
- printf "OS is %s. Skipping ldconfig.\n" $UNAME
- DO_LDCONFIG='no'
-fi
-
-printf "Checking for sudo\n"
-
-if SUDO=`which sudo`
-then
- printf "$SUDO found - validating $SUDO privileges\n"
- if $SUDO -v
- then
- printf "Ok, we can continue\n"
- else
- printf "ERROR: %s needs $SUDO privileges - aborting \n" $0
- exit
- fi
-else
- printf "Sudo not found. Checking for appropriate privs\n"
- if [ $DO_LD_CONFIG="yes" -a -f /etc/ld.so.conf ]
- then
- if touch -a /etc/ld.so.conf
- then
- printf "We can modify /etc/ld.so.conf\n"
- else
- printf "ERROR: We cannot modify /etc/ld.so.conf - aborting\n"
- exit
- fi
- fi
-
- if touch -a /usr/local/lib
- then
- printf "We can modify /usr/local/lib\n"
- else
- printf "ERROR: We cannot modify /usr/local/lib - aborting\n"
- exit
- fi
-fi
-
-if [ $DO_LDCONFIG = "no" ]
-then
- printf "OS is %s - Skipping ldconfig \n" $UNAME
-else
-
- printf "Checking /etc/ld.so.conf configuration\n"
-
- if [ -d /etc/ld.so.conf.d ]
- then
- LDCONF_FILE=/etc/ld.so.conf.d/xastir.conf
- else
- LDCONF_FILE=/etc/ld.so.conf
- fi
-
- if [ ! -f $LDCONF_FILE ]
- then
- sudo touch $LDCONF_FILE
- fi
-
- if (! grep /usr/local/lib $LDCONF_FILE 2>&1 > /dev/null)
- then
- printf "Warning: /usr/local/lib not in %s - adding it\n" $LDCONF_FILE
- if MKTEMP=`which mktemp`
- then
- TMPFILE=`mktemp -t ld.so.conf.XXXXXXXXXX`
- else
- TMPFILE='/tmp/ld.so.conf.XXXXXXXXXX'
- $SUDO rm -f $TMPFILE
- touch $TMPFILE
- fi
- cp $LDCONF_FILE $TMPFILE
- $SUDO cp $LDCONF_FILE $LDCONF_FILE.orig.$$
- printf "/usr/local/lib\n" >> $TMPFILE
- $SUDO cp $TMPFILE $LDCONF_FILE
-
- fi
-
- if (! grep /usr/local/lib $LDCONF_FILE 2>&1 > /dev/null)
- then
- printf "ERROR: could not add /usr/local/lib to %s - aborting\n " $LDCONFIG_FILE
- exit
- fi
-
-fi
-
-
-# pcre arguably doesn't belong here
-
-ALL=" http://internap.dl.sourceforge.net/sourceforge/pcre/pcre-6.3.tar.gz
- http://dl.maptools.org/dl/shapelib/shapelib-1.2.10.tar.gz\
- http://dl.maptools.org/dl/proj/proj-4.4.9.tar.gz\
- http://dl.maptools.org/dl/geotiff/libgeotiff/libgeotiff-1.2.3.tar.gz\
- http://dl.maptools.org/dl/gdal/gdal-1.3.2.tar.gz"
-
-#for XA_LIB in shapelib-1.2.10 proj-4.4.9 gdal-1.3.1 libgeotiff-1.2.3
-
-for XA_LIB_URL in $ALL
-do
-
-
-# Check for a working dir
-
- if [ ! -d $XASTIR_TMP ]
- then
- printf "ERROR: %s Doesn't appear to exist.\n" $XASTIR_TMP
- printf "Please create dir and/or edit script. Exiting\n"
- exit
- else
- cd $XASTIR_TMP
- fi
-
-
-# PACKAGE_DIR=`echo $XA_LIB | sed -e "s/\-.*//"`
-
- XA_LIB_FILE=`echo $XA_LIB_URL | sed -e "s/.*\///g"`
-# XA_LIB_URL=${MAPTOOLS}/${PACKAGE_DIR}/${XA_LIB_FILE}
- XA_LIB=`echo $XA_LIB_FILE | sed -e "s/.tar.gz//"`
- printf "Working on: %s\n" $XA_LIB
- printf "Working in: %s\n" `pwd`
-
-
-# Cleanup Leftovers
-
- if [ -e $XA_LIB_FILE -o -e $XA_LIB ]
- then
-
- printf "cleaning up old %s - will be saved under dir: %s \n" $XA_LIB old.$$
- mkdir old.$$
- mv -f ${XA_LIB}* old.$$/
- fi
-
-# Get Files from Maptools
-
- printf "Retrieving: %s\n" $XA_LIB
-
- if (wget $XA_LIB_URL)
- then
- if test x"$TAR" != x
- then
- if ($TAR -xzf $XA_LIB_FILE )
- then
- printf "%s successfully downloaded.\n" $XA_LIB_FILE
- else
- printf "ERROR: %s not successfully downloaded - skipping.\n" $XA_LIB_FILE
- fi
- else
- if (gunzip -c $XA_LIB_FILE | tar xf - )
- then
- printf "%s successfully downloaded.\n" $XA_LIB_FILE
- else
- printf "ERROR: %s not successfully downloaded - skipping.\n" $XA_LIB_FILE
- fi
- fi
- fi
-
- printf "Building %s\n\n" $XA_LIB
- cd $XA_LIB
- printf "Working in: %s\n" `pwd`
-
- # Standards and methods and packaging - so many to chose from!
-
- if ( printf $XA_LIB |grep -i proj)
- then
- cd nad
- XA_LIB_URL=${MAPTOOLS}/proj/proj-datumgrid-1.3.zip
- wget $XA_LIB_URL
- unzip proj-datumgrid-1.3.zip
- cd $XASTIR_TMP/$XA_LIB
- fi
-
- if [ $XA_LIB = 'shapelib-1.2.10' ]
- then
- # Need a couple fixes for shapelib on Cygwin.
-
- if (echo $UNAME |grep -i cygwin ) 2>&1
- then
- mv Makefile Makefile.dist
- sed -e "s/h libshp.so/hlibshp.sl/" -e "s/-lc/-lcygwin/" < Makefile.dist > Makefile
- fi
- make
- make lib
-#WARNING WARNING WARNING
-# On any system that uses GCC 4.x as its compiler, it is probably necessary
-# to uncomment the stuff between here and the next "else". If you see
-# an error message of the form
-# /usr/bin/ld: makegeo: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
-# /usr/bin/ld: final link failed: Nonrepresentable section on output
-# collect2: ld returned 1 exit status
-# when libgeotiff's makefile gets to linking "makegeo", this is your
-# problem. Uncomment these lines and rerun the script.
-#----uncomment below--------
-# elif [ $XA_LIB = 'libgeotiff-1.2.3' ]
-# then
-# #The libgeotiff tar ball has last modification time of the configure
-# # script and the configure.in from which it's generated such that
-# # as soon as we type "make", the Makefile tries to regenerate
-# # configure and then run it with no arguments, interfering with
-# # our intentions here. So we "touch" configure so it's newer
-# # than configure.in, and make leaves them alone. The right
-# # fix would be to change that makefile, but this is easier
-# touch configure
-# # libgeotiff tries to use ld -shared for linking shared library,
-# # which is wrong on linux with GCC 4.x
-# ./configure --with-ld-shared="gcc -shared"
-# make
- else
- ./configure
- make
- fi 2>&1 >>${XA_LIB}.build.$$
-
- printf "\n----------------------------------------------------------------------\n"
- printf "Attempting install of %s\n" ${XA_LIB}
-
- if [ ${XA_LIB} = 'shapelib-1.2.10' ]
- then
- $SUDO make lib_install
- else
- $SUDO make install
- fi 2>&1 >> ${XA_LIB}.install.$$
-
- printf "\n----------------------------------------------------------------------\n"
- if $!
- then
-
- printf "If you got no errors(*), %s should now be installed!!\n" $XA_LIB
- printf "\t(* warnings should be OK)\n"
-
- else
-
- printf "Error: Install of %s appears to have failed \n" $XA_LIB
- fi
-
- printf "If there are errors or warnings, please see: \n"
- printf "\t%s\n" ${XASTIR_TMP}/${XA_LIB}/README
- printf "\t%s\n" ${XASTIR_TMP}/${XA_LIB}/${XA_LIB}.build.$$
- printf "\t%s\n" ${XASTIR_TMP}/${XA_LIB}/${XA_LIB}.install.$$
- printf "\n----------------------------------------------------------------------\n"
-
-
-
- if [ $DO_LDCONFIG = "no" ]
- then
- printf "OS is %s - Skipping ldconfig \n" $UNAME
- else
- printf "Running ldconfig\n"
- if ($SUDO ldconfig )
- then
- printf "ldconfig completed successfully\n\n"
- else
- printf "ldconfig had errors - you may need to run ldconfig manually.\n"
- fi
- fi
-
-done # with getting and building
-
-
-printf "Congratulations, %s is done. \n" $0
-printf "For more information see %s\n" ${XASDIR}/README.MAPS
-
-
diff --git a/scripts/get_shapelib.sh b/scripts/get_shapelib.sh
deleted file mode 100644
index 0c94b24..0000000
--- a/scripts/get_shapelib.sh
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/sh +x
-#
-#
-# Script to retrieve and install Shapelib.
-#
-# Written 20050227 Dan Brown N8YSZ
-#
-# Copyright (C) 2000-2012 The Xastir Group
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-#
-# Look at the README for more information on the program.
-#
-
-SHAPELIB=shapelib-1.2.10
-
-SHAPELIB_FILE=${SHAPELIB}.tar.gz
-
-SHAPELIB_URL=http://dl.maptools.org/dl/shapelib/${SHAPELIB_FILE}
-
-XASDIR=$HOME/src/xastir
-XASTIR_TMP=$XASDIR/tmp
-XASTIR_LIB=$XASDIR/lib
-
-
-UNAME=`uname -o`
-
-if [ $UNAME = 'Cygwin' ]
-then
- printf "OS is %s. Skipping sudo tests.\n" $UNAME
-else
- printf "Checking for sudo\n"
-
- if SUDO=`which sudo`
- then
- printf "$SUDO found - validating $SUDO privileges\n"
- if $SUDO -v
- then
- printf "Ok, we can continue\n"
- else
- printf "ERROR: %s needs $SUDO privileges - aborting \n" $0
- exit
- fi
- else
-
-#
-# The following isn't very portable and should be modified.
-#
- printf "Sudo not found. Checking for appropriate privs\n"
- if touch -a /etc/ld.so.conf
- then
- printf "We can modify /etc/ld.so.conf\n"
- else
- printf "ERROR: We cannot modify /etc/ld.so.conf - aborting\n"
- exit
- fi
- if touch -a /usr/local/lib
- then
- printf "We can modify /usr/local/lib\n"
- else
- printf "ERROR: We cannot modify /usr/local/lib - aborting\n"
- exit
- fi
- fi
-fi
-
-if [ ! -d $XASTIR_TMP ]
-then
- printf "WARNING: %s Doesn't appear to exist. Creating temporary directory\n" $XASTIR_TMP
- # Make sure this exists!
- mkdir -p $XASTIR_TMP
-fi
-cd $XASTIR_TMP
-
-if [ -e $SHAPELIB_FILE -o -e $SHAPELIB ]
-then
-
- printf "cleaning up old shapelib - will be saved under dir: %s \n" old.$$
- mkdir old.$$
- mv -f shapelib* old.$$/
-fi
-
-printf "Retrieving shapelib\n"
-
-if (wget $SHAPELIB_URL)
-then
- if (tar -xzf $SHAPELIB_FILE )
- then
- printf "shapelib successfully downloaded.\n"
- else
- printf "ERROR: %s not successfully downloaded - aborting.\n" $SHAPELIB_FILE
- fi
-fi
-
-printf "Building shapelib\n"
-cd $SHAPELIB
-
-# Need a couple fixes for shapelib on Cygwin.
-if [ $UNAME = 'Cygwin' ]
-then
- mv Makefile Makefile.dist
- sed -e "s/h libshp.so/hlibshp.sl/" -e "s/-lc/-lcygwin/" < Makefile.dist > Makefile
-fi
-
-make
-make lib
-
-printf "Attempting install\n"
-printf "\n----------------------------------------------------------------------\n"
-if $SUDO make lib_install
-then
- printf "\n\n\n----------------------------------------------------------------------\n"
-else
- printf "\n\n\n----------------------------------------------------------------------\n"
- printf "Error: Install appears to have failed - aborting \n"
-fi
-
-
-if [ $UNAME = 'Cygwin' ]
-then
- printf "OS is %s - Skipping ldconfig " $UNAME
-else
-
- printf "Checking /etc/ld.so.conf"
-
- if [ -d /etc/ld.so.conf.d ]
- then
- LDCONF_FILE=/etc/ld.so.conf.d/xastir.conf
- else
- LDCONF_FILE=/etc/ld.so.conf
- fi
-
- if [ ! -f $LDCONF_FILE ]
- then
- sudo touch $LDCONF_FILE
- fi
-
- if (! grep /usr/local/lib $LDCONF_FILE 2>&1 > /dev/null)
- then
- printf "Warning: /usr/local/lib not in %s - adding it\n" $LDCONF_FILE
- if MKTEMP=`which mktemp`
- then
- TMPFILE=`mktemp -t ld.so.conf.XXXXXXXXXX`
- else
- TMPFILE='/tmp/ld.so.conf.XXXXXXXXXX'
- $SUDO rm -f $TMPFILE
- touch $TMPFILE
- fi
- cp $LDCONF_FILE $TMPFILE
- printf "/usr/local/lib\n" >> $TMPFILE
- $SUDO cp $LDCONF_FILE $LDCONF_FILE.save
- $SUDO cp $TMPFILE $LDCONF_FILE
- fi
-
- if ( grep /usr/local/lib $LDCONF_FILE )
- then
- printf "Running ldconfig\n"
- if ($SUDO ldconfig )
- then
- printf "ldconfig completed successfully\n\n"
- else
- printf "ldconfig had errors - you may need to run ldconfig manually.\n"
- fi
- else
- printf "ERROR: could not add /usr/local/lib to $LDCONF_FILE - aborting\n"
- exit
- fi
-fi
-
-printf "Congratulations, %s is done. \n" $0
-printf "If you got no errors, shapelib should now be installed!!\n"
-printf "If there are errors, please see: \n"
-printf "\t%s\n" ${XASTIR_TMP}/${SHAPELIB}/README
-printf "\t%s\n" ${XASDIR}/README.MAPS
-
-
diff --git a/scripts/langElmerFudd.pl b/scripts/langElmerFudd.pl
index d56c518..a574d86 100755
--- a/scripts/langElmerFudd.pl
+++ b/scripts/langElmerFudd.pl
@@ -1,8 +1,8 @@
-#!/usr/bin/perl -W
+#!/usr/bin/env perl
-# $Id: langElmerFudd.pl,v 1.6 2012/11/01 18:57:19 we7u Exp $
+# $Id: langElmerFudd.pl,v 1.8 2016/07/01 18:51:53 we7u Exp $
-# Copyright (C) 2008-2012 The Xastir Group
+# Copyright (C) 2008-2016 The Xastir Group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff --git a/scripts/langMuppetsChef.pl b/scripts/langMuppetsChef.pl
index 66b51f6..d3ca791 100755
--- a/scripts/langMuppetsChef.pl
+++ b/scripts/langMuppetsChef.pl
@@ -1,8 +1,8 @@
-#!/usr/bin/perl -W
+#!/usr/bin/env perl
-# $Id: langMuppetsChef.pl,v 1.7 2012/11/01 18:57:19 we7u Exp $
+# $Id: langMuppetsChef.pl,v 1.9 2016/07/01 18:51:53 we7u Exp $
-# Copyright (C) 2008-2012 The Xastir Group
+# Copyright (C) 2008-2016 The Xastir Group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff --git a/scripts/langOldeEnglish.pl b/scripts/langOldeEnglish.pl
index 2d75b10..4cc25cc 100755
--- a/scripts/langOldeEnglish.pl
+++ b/scripts/langOldeEnglish.pl
@@ -1,8 +1,8 @@
-#!/usr/bin/perl -W
+#!/usr/bin/env perl
-# $Id: langOldeEnglish.pl,v 1.6 2012/11/01 18:57:19 we7u Exp $
+# $Id: langOldeEnglish.pl,v 1.8 2016/07/01 18:51:53 we7u Exp $
-# Copyright (C) 2008-2012 The Xastir Group
+# Copyright (C) 2008-2016 The Xastir Group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff --git a/scripts/langPigLatin.pl b/scripts/langPigLatin.pl
index 82410b6..90083a8 100755
--- a/scripts/langPigLatin.pl
+++ b/scripts/langPigLatin.pl
@@ -1,8 +1,8 @@
-#!/usr/bin/perl -W
+#!/usr/bin/env perl
-# $Id: langPigLatin.pl,v 1.8 2012/11/01 18:57:19 we7u Exp $
+# $Id: langPigLatin.pl,v 1.10 2016/07/01 18:51:53 we7u Exp $
-# Copyright (C) 2007-2012 The Xastir Group
+# Copyright (C) 2007-2016 The Xastir Group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff --git a/scripts/langPirateEnglish.pl b/scripts/langPirateEnglish.pl
index 8ea2def..afa0540 100755
--- a/scripts/langPirateEnglish.pl
+++ b/scripts/langPirateEnglish.pl
@@ -1,8 +1,8 @@
-#!/usr/bin/perl -W
+#!/usr/bin/env perl
-# $Id: langPirateEnglish.pl,v 1.11 2012/11/01 18:57:19 we7u Exp $
+# $Id: langPirateEnglish.pl,v 1.13 2016/07/01 18:51:53 we7u Exp $
-# Copyright (C) 2008-2012 The Xastir Group
+# Copyright (C) 2008-2016 The Xastir Group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff --git a/src/Makefile.in b/src/Makefile.in
index f703f4d..477034a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -523,18 +523,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xastir_udp_client.Po at am__quote@
.c.o:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
diff --git a/src/compiledate.c b/src/compiledate.c
index 11cad8c..ea748e6 100644
--- a/src/compiledate.c
+++ b/src/compiledate.c
@@ -1 +1 @@
-char compiledate[] = "Compiled: Fri Sep 12 12:06:52 PDT 2014";
+char compiledate[] = "Compiled: Fri Jul 1 11:53:31 PDT 2016";
diff --git a/src/db.c b/src/db.c
index 8b09df9..8b5b6d0 100644
--- a/src/db.c
+++ b/src/db.c
@@ -1,9 +1,9 @@
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*-
- * $Id: db.c,v 1.663 2012/09/23 16:19:22 tvrusso Exp $
+ * $Id: db.c,v 1.667 2016/07/01 18:51:53 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
* Copyright (C) 1999,2000 Frank Giannandrea
- * Copyright (C) 2000-2012 The Xastir Group
+ * Copyright (C) 2000-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -2519,6 +2519,15 @@ int ok_to_draw_station(DataRow *p_station) {
return 0;
}
+ //N7IPB - check for aircraft and if so check aircraft timeout
+ // return 0 if timedout - else continue
+ if ((aircraft_sec_clear != 0)
+ && ((p_station->aprs_symbol.aprs_symbol == '^')
+ || (p_station->aprs_symbol.aprs_symbol == '\'')
+ || (p_station->aprs_symbol.aprs_symbol == 'X'))) {
+ if ((p_station->sec_heard + (aircraft_sec_clear * 5)) < secs_now)
+ return 0;
+ }
// Check if we want to display data past the clear time
if (!Select_.old_data) {
if ((p_station->sec_heard + sec_clear) < secs_now)
@@ -2531,7 +2540,7 @@ int ok_to_draw_station(DataRow *p_station) {
if (p_station->flag & (ST_OBJECT | ST_ITEM)) {
// Check whether we wish to display objects/items
if (!Select_.objects ||
- (!Select_.weather_objects && !Select_.gauge_objects && !Select_.other_objects))
+ (!Select_.weather_objects && !Select_.gauge_objects && !Select_.aircraft_objects && !Select_.vessel_objects && !Select_.other_objects))
return 0;
// Check if WX info and we wish to see it
@@ -2543,6 +2552,19 @@ int ok_to_draw_station(DataRow *p_station) {
&& p_station->aprs_symbol.aprs_symbol == 'w') {
return Select_.gauge_objects;
}
+ // Check if aircraft and we wish to see it
+ else if (p_station->aprs_symbol.aprs_type == '/'
+ && (p_station->aprs_symbol.aprs_symbol == '^')
+ || (p_station->aprs_symbol.aprs_symbol == '\'')
+ || (p_station->aprs_symbol.aprs_symbol == 'X') ) {
+ return Select_.aircraft_objects;
+ }
+ // Check if vessel and we wish to see it
+ else if (p_station->aprs_symbol.aprs_type == '/'
+ && ((p_station->aprs_symbol.aprs_symbol == 's')
+ || (p_station->aprs_symbol.aprs_symbol == 'Y')) ) {
+ return Select_.vessel_objects;
+ }
// Check if we wish to see other objects/items
else {
return Select_.other_objects;
@@ -2745,7 +2767,7 @@ void display_station(Widget w, DataRow *p_station, int single) {
// Check whether we have course in the current data
if ( (strlen(p_station->course)>0) && (atof(p_station->course) > 0) ) {
course_ok++;
- xastir_snprintf(temp_course, sizeof(temp_course), "%.0f�",
+ xastir_snprintf(temp_course, sizeof(temp_course), "%.0f\xB0",
atof(p_station->course));
}
// Else check whether the previous position had a course
@@ -2756,7 +2778,7 @@ void display_station(Widget w, DataRow *p_station, int single) {
&& (p_station->newest_trackpoint->prev != NULL) ) {
if( p_station->newest_trackpoint->prev->course > 0 ) {
course_ok++;
- xastir_snprintf(temp_course, sizeof(temp_course), "%.0f�",
+ xastir_snprintf(temp_course, sizeof(temp_course), "%.0f\xB0",
(float)p_station->newest_trackpoint->prev->course);
}
}
@@ -2791,7 +2813,7 @@ void display_station(Widget w, DataRow *p_station, int single) {
else
sprintf(temp_my_distance,"%0.0f%s",value,un_dst);
- xastir_snprintf(temp_my_course, sizeof(temp_my_course), "%.0f�",
+ xastir_snprintf(temp_my_course, sizeof(temp_my_course), "%.0f\xB0",
atof(temp1_my_course));
}
@@ -2817,11 +2839,11 @@ void display_station(Widget w, DataRow *p_station, int single) {
tmp[0] = '\0';
if (english_units)
- xastir_snprintf(temp_wx_temp, sizeof(temp_wx_temp), "%s%.0f�F ",
- tmp, atof(weather->wx_temp));
+ xastir_snprintf(temp_wx_temp, sizeof(temp_wx_temp), "%s%.0f\xB0%s",
+ tmp, atof(weather->wx_temp),"F ");
else
- xastir_snprintf(temp_wx_temp, sizeof(temp_wx_temp), "%s%.0f�C ",
- tmp,((atof(weather->wx_temp)-32.0)*5.0)/9.0);
+ xastir_snprintf(temp_wx_temp, sizeof(temp_wx_temp), "%s%.0f\xB0%s",
+ tmp,((atof(weather->wx_temp)-32.0)*5.0)/9.0,"C ");
}
if (!Display_.temperature_only) {
@@ -2846,7 +2868,7 @@ void display_station(Widget w, DataRow *p_station, int single) {
}
if (strlen(weather->wx_course) > 0) {
- xastir_snprintf(wx_tm, sizeof(wx_tm), "C:%.0f�", atof(weather->wx_course));
+ xastir_snprintf(wx_tm, sizeof(wx_tm), "C:%.0f\xB0", atof(weather->wx_course));
strncat(temp_wx_wind,
wx_tm,
sizeof(temp_wx_wind) - 1 - strlen(temp_wx_wind));
@@ -2991,17 +3013,20 @@ void display_station(Widget w, DataRow *p_station, int single) {
(ambiguity_flag) ? ambiguity_coord_lat : p_station->coord_lat,
0.0020 * scale_y,
colors[0x0e], // Yellow
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
draw_pod_circle( (ambiguity_flag) ? ambiguity_coord_lon : p_station->coord_lon,
(ambiguity_flag) ? ambiguity_coord_lat : p_station->coord_lat,
0.0023 * scale_y,
colors[0x44], // Red
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
draw_pod_circle( (ambiguity_flag) ? ambiguity_coord_lon : p_station->coord_lon,
(ambiguity_flag) ? ambiguity_coord_lat : p_station->coord_lat,
0.0026 * scale_y,
colors[0x61], // Blue
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
}
@@ -3030,7 +3055,8 @@ void display_station(Widget w, DataRow *p_station, int single) {
(ambiguity_flag) ? ambiguity_coord_lat : p_station->coord_lat,
atof(temp) * 1.15078, // nautical miles to miles
colors[0x44], // Red
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
}
xastir_snprintf(temp,
@@ -3043,7 +3069,8 @@ void display_station(Widget w, DataRow *p_station, int single) {
(ambiguity_flag) ? ambiguity_coord_lat : p_station->coord_lat,
atof(temp) * 1.15078, // nautical miles to miles
colors[0x0e], // Yellow
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
}
xastir_snprintf(temp,
@@ -3056,7 +3083,8 @@ void display_station(Widget w, DataRow *p_station, int single) {
(ambiguity_flag) ? ambiguity_coord_lat : p_station->coord_lat,
atof(temp) * 1.15078, // nautical miles to miles
colors[0x0a], // Green
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
}
}
@@ -3172,7 +3200,8 @@ void display_station(Widget w, DataRow *p_station, int single) {
p_station->coord_lat,
p_station->error_ellipse_radius / 100000.0 * 0.62137, // cm to mi
colors[0x0f], // White
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
*/
draw_precision_rectangle( p_station->coord_lon,
p_station->coord_lat,
@@ -3350,7 +3379,8 @@ void display_station(Widget w, DataRow *p_station, int single) {
p_station->coord_lat,
range,
colors[0x44],
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
}
// Draw maximum proximity circle?
@@ -3362,7 +3392,8 @@ void display_station(Widget w, DataRow *p_station, int single) {
p_station->coord_lat,
range,
colors[0x44],
- drawing_target);
+ drawing_target,
+ temp_sec_heard);
}
// DEBUG STUFF
@@ -5224,7 +5255,7 @@ end_critical_section(&db_station_info_lock, "db.c:Station_data" );
value*1.852);
}
}
- xastir_snprintf(temp_my_course, sizeof(temp_my_course), "%s�",temp1_my_course);
+ xastir_snprintf(temp_my_course, sizeof(temp_my_course), "%s\xB0",temp1_my_course);
xastir_snprintf(temp, sizeof(temp), langcode("WPUPSTI022"),temp_my_distance,temp_my_course);
XmTextInsert(si_text,pos,temp);
pos += strlen(temp);
@@ -5305,7 +5336,7 @@ end_critical_section(&db_station_info_lock, "db.c:Station_data" );
pos += strlen(temp);
if (p_station->course[0] != '\0')
- xastir_snprintf(temp, sizeof(temp), " %3d�",atoi(p_station->course));
+ xastir_snprintf(temp, sizeof(temp), " %3d\xB0",atoi(p_station->course));
else
xastir_snprintf(temp, sizeof(temp), " ");
@@ -5441,7 +5472,7 @@ end_critical_section(&db_station_info_lock, "db.c:Station_data" );
pos += strlen(temp);
if (ptr->course >= 0)
- xastir_snprintf(temp, sizeof(temp), " %3d�",
+ xastir_snprintf(temp, sizeof(temp), " %3d\xB0",
ptr->course);
else
xastir_snprintf(temp, sizeof(temp), " ");
@@ -7043,7 +7074,7 @@ int extract_weather(DataRow *p_station, char *data, int compr) {
(void)extract_weather_item(data,'#',3,temp); // raw rain counter
- (void)extract_weather_item(data,'F',3,weather->wx_fuel_temp); // Fuel Temperature in �F (RAWS)
+ (void)extract_weather_item(data,'F',3,weather->wx_fuel_temp); // Fuel Temperature in °F (RAWS)
if (extract_weather_item(data,'f',2,weather->wx_fuel_moisture))// Fuel Moisture (RAWS) (in %, 00 = 100%)
xastir_snprintf(weather->wx_fuel_moisture,
@@ -8271,7 +8302,7 @@ void exp_trailpos(FILE *f,long lat,long lon,time_t sec,long speed,int course,lon
fprintf(f," ");
if (course >= 0) // DK7IN: is 0 undefined ?? 1..360 ?
- fprintf(f," %3d�\n",course);
+ fprintf(f," %3d\xB0\n",course);
else // undefined
fprintf(f," \n");
}
@@ -8696,8 +8727,8 @@ void init_station(DataRow *p_station) {
p_station->newest_trackpoint = NULL; // no trail
p_station->trail_color = 0;
p_station->weather_data = NULL; // no weather
- p_station->coord_lat = 0l; // 90�N \ undefined
- p_station->coord_lon = 0l; // 180�W / position
+ p_station->coord_lat = 0l; // 90°N \ undefined
+ p_station->coord_lon = 0l; // 180°W / position
p_station->pos_amb = 0; // No ambiguity
p_station->error_ellipse_radius = 600; // In cm, default 6 meters
p_station->lat_precision = 60; // In 100ths of seconds latitude (60 = 0.01 minutes)
@@ -10422,8 +10453,8 @@ int extract_comp_position(DataRow *p_station, char **info, /*@unused@*/ int type
ok = (int)(ok && (c == -1 || ((c >=0 && c < 91) && (s >= 0 && s < 91) && (T >= 0 && T < 64))));
if (ok) {
- lat = (((y1 * 91 + y2) * 91 + y3) * 91 + y4 ) / 380926.0; // in deg, 0: 90�N
- lon = (((x1 * 91 + x2) * 91 + x3) * 91 + x4 ) / 190463.0; // in deg, 0: 180�W
+ lat = (((y1 * 91 + y2) * 91 + y3) * 91 + y4 ) / 380926.0; // in deg, 0: 90°N
+ lon = (((x1 * 91 + x2) * 91 + x3) * 91 + x4 ) / 190463.0; // in deg, 0: 180°W
lat *= 60 * 60 * 100; // in 1/100 sec
lon *= 60 * 60 * 100; // in 1/100 sec
@@ -11275,19 +11306,41 @@ void process_data_extension(DataRow *p_station, char *data, /*@unused@*/ int typ
}
if (extract_probability_min(data, temp3, sizeof(temp3))) {
- //fprintf(stderr,"extracted probability_min data: %s\n",temp3);
- xastir_snprintf(p_station->probability_min,
- sizeof(p_station->probability_min),
- "%s",
- temp3);
+ if (strncasecmp(temp3, "0.0", sizeof(temp3)) == 0) {
+ p_station->probability_min[0] = '\0'; // Clear it out
+ }
+ else if (strncasecmp(temp3, "0", sizeof(temp3)) == 0) {
+ p_station->probability_min[0] = '\0'; // Clear it out
+ }
+ else {
+ //fprintf(stderr,"extracted probability_min data: %s\n",temp3);
+ xastir_snprintf(p_station->probability_min,
+ sizeof(p_station->probability_min),
+ "%s",
+ temp3);
+ }
+ }
+ else {
+ p_station->probability_min[0] = '\0'; // Clear it out
}
if (extract_probability_max(data, temp3, sizeof(temp3))) {
- //fprintf(stderr,"extracted probability_max data: %s\n",temp3);
- xastir_snprintf(p_station->probability_max,
- sizeof(p_station->probability_max),
- "%s",
- temp3);
+ if (strncasecmp(temp3, "0.0", sizeof(temp3)) == 0) {
+ p_station->probability_max[0] = '\0'; // Clear it out
+ }
+ else if (strncasecmp(temp3, "0", sizeof(temp3)) == 0) {
+ p_station->probability_max[0] = '\0'; // Clear it out
+ }
+ else {
+ //fprintf(stderr,"extracted probability_max data: %s\n",temp3);
+ xastir_snprintf(p_station->probability_max,
+ sizeof(p_station->probability_max),
+ "%s",
+ temp3);
+ }
+ }
+ else {
+ p_station->probability_max[0] = '\0'; // Clear it out
}
}
}
diff --git a/src/draw_symbols.c b/src/draw_symbols.c
index 30d4842..87a6ace 100644
--- a/src/draw_symbols.c
+++ b/src/draw_symbols.c
@@ -1,9 +1,9 @@
/*
- * $Id: draw_symbols.c,v 1.120 2012/08/25 16:38:29 tvrusso Exp $
+ * $Id: draw_symbols.c,v 1.129 2016/07/01 18:51:53 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
* Copyright (C) 1999,2000 Frank Giannandrea
- * Copyright (C) 2000-2012 The Xastir Group
+ * Copyright (C) 2000-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -49,7 +49,7 @@
extern XmFontList fontlist1; // Menu/System fontlist
-#define ANGLE_UPDOWN 30 /* prefer horizontal cars if less than 45 degrees */
+#define ANGLE_UPDOWN 45 /* prefer horizontal cars if less than 45 degrees */
int symbols_loaded = 0;
int symbols_cache[5] = {0,0,0,0,0};
@@ -91,18 +91,33 @@ void clear_symbol_data(void) {
/*
* Draw nice looking text
+ *
+ * Modified to take into account the font metrics - N7IPB
+ * 4/8/2016
*/
void draw_nice_string(Widget w, Pixmap where, int style, long x, long y, char *text, int bgcolor, int fgcolor, int length) {
GContext gcontext;
XFontStruct *xfs_ptr;
int font_width, font_height;
-
if (x > screen_width) return;
if (x < 0) return;
if (y > screen_height) return;
if (y < 0) return;
+ // With a large font, the background rectangle is too small. Need
+ // to include the font metrics in this drawing algorithm.
+
+ gcontext = XGContextFromGC(gc);
+ xfs_ptr = XQueryFont(XtDisplay(w), gcontext);
+ font_width = (int)((xfs_ptr->max_bounds.width
+ + xfs_ptr->max_bounds.width
+ + xfs_ptr->max_bounds.width
+ + xfs_ptr->min_bounds.width) / 4);
+
+ font_height = xfs_ptr->max_bounds.ascent
+ + xfs_ptr->max_bounds.descent;
+
switch (style) {
case 0:
@@ -124,68 +139,48 @@ void draw_nice_string(Widget w, Pixmap where, int style, long x, long y, char *t
// Leave this next one hard-coded to 0xff. This keeps
// the background as gray.
-// With a large font, the background rectangle is too small. Need
-// to include the font metrics in this drawing algorithm.
-
(void)XSetForeground(XtDisplay(w),gc,colors[0xff]);
- (void)XFillRectangle(XtDisplay(w),where,gc,x-1,(y-10),(length*6)+2,11);
+ (void)XFillRectangle( XtDisplay(w),
+ where,
+ gc,
+ x, // X
+ y-(font_height-(font_height/4)), // Y
+ // Get the actual width of the text in pixels
+ get_text_width(w,text), // width
+ font_height); // height
+
(void)XSetForeground(XtDisplay(w),gc,colors[bgcolor]);
- (void)XDrawString(XtDisplay(w),where,gc,x+1,y+1,text,length);
+ (void)XDrawString(XtDisplay(w),where,gc,x+(font_height/10),y+(font_width/8),text,length);
+
break;
case 2:
- default:
// draw white or colored text in a black box
-
- // With a large font, the background rectangle is too
- // small. Need to include the font metrics in this
- // drawing algorithm, which we do here.
-
- gcontext = XGContextFromGC(gc);
-
- xfs_ptr = XQueryFont(XtDisplay(w), gcontext);
-
-
-// font_width = xfs_ptr->max_bounds.width
-// + xfs_ptr->max_bounds.rbearing
-// - xfs_ptr->max_bounds.lbearing;
-// font_width = xfs_ptr->max_bounds.width;
- font_width = (int)((xfs_ptr->max_bounds.width
- + xfs_ptr->max_bounds.width
- + xfs_ptr->max_bounds.width
- + xfs_ptr->min_bounds.width) / 4);
-
- font_height = xfs_ptr->max_bounds.ascent
- + xfs_ptr->max_bounds.descent;
-
- if (xfs_ptr) {
- // This leaks memory if the last parameter is a "0"
- XFreeFontInfo(NULL, xfs_ptr, 1);
- }
-
- // Normal font returns 10 & 13. Large system font
- // returns 13 & 20 here.
- //fprintf(stderr,
- // "Font dimemsions: Width:%d Height:%d\n",
- // font_width,
- // font_height);
(void)XSetForeground( XtDisplay(w),
gc,
GetPixelByName(w,"black") );
-// Old:
-//(void)XFillRectangle(XtDisplay(w),where,gc,x-2,(y-11),(length*6)+3,13);
-
-// New: This one makes the black rectangle too long for smaller
-// fonts. Perhaps because they are proportional?
(void)XFillRectangle( XtDisplay(w),
where,
gc,
- x-2, // X
- y-font_height, // Y
- (length*font_width)+3, // width
- font_height+2); // height
+ x, // X
+ y-(font_height-(font_height/4)), // Y
+ // Get the actual width of the text in pixels
+ get_text_width(w,text),
+ font_height); // height
+
+ break;
+
+ // Case three will be used in a future release with an additional
+ // Station Text Style selection
+ case 3:
+ default:
+ // Real Shadow text on a transparent background
+
+ (void)XSetForeground(XtDisplay(w),gc,colors[bgcolor]);
+ (void)XDrawString(XtDisplay(w),where,gc,x+(font_height/10),y+(font_width/8),text,length);
+
break;
@@ -194,18 +189,19 @@ void draw_nice_string(Widget w, Pixmap where, int style, long x, long y, char *t
// finally draw the text
(void)XSetForeground(XtDisplay(w),gc,colors[fgcolor]);
(void)XDrawString(XtDisplay(w),where,gc,x,y,text,length);
-}
+ // And free our font info
+ if (xfs_ptr) {
+ // This leaks memory if the last parameter is a "0"
+ XFreeFontInfo(NULL, xfs_ptr, 1);
+ }
+}
/* symbol drawing routines */
-
-
-
-
// Function to draw a line between a WP symbol "\/" and the
// transmitting station. We pass it the WP symbol. It does a
// lookup for the transmitting station callsign to get those
@@ -388,10 +384,12 @@ void draw_WP_line(DataRow *p_station,
// range is in miles
// x_long/y_lat are in Xastir lat/lon units
//
-void draw_pod_circle(long x_long, long y_lat, double range, int color, Pixmap where) {
+void draw_pod_circle(long x_long, long y_lat, double range, int color, Pixmap where, int sec_heard) {
double diameter;
double a,b;
+ if ( ((sec_old+sec_heard)>sec_now()) || Select_.old_data ) {
+
// Prevents it from being drawn when the symbol is off-screen.
// It'd be better to check for lat/long +/- range to see if it's on the screen.
@@ -446,6 +444,7 @@ void draw_pod_circle(long x_long, long y_lat, double range, int color, Pixmap wh
// }
// }
+ }
}
@@ -1226,15 +1225,18 @@ void draw_wind_barb(long x_long, long y_lat, char *speed,
int half_barbs = 0;
int shaft_length = 0;
int my_speed = atoi(speed); // In mph (so far)
- int my_course = atoi(course); // In � true
+ int my_course = atoi(course); // In ° true
float bearing_radians;
long off_x,off_y;
long x,y;
int i;
-// Ghost the wind barb if sec_heard is too long.
-// (TBD)
+ // Ghost the wind barb if sec_heard is too long.
+ if ( ((sec_old+sec_heard)<=sec_now()) && !Select_.old_data ) {
+ return;
+ }
+
// What to do if my_speed is zero? Blank out any wind barbs
@@ -1519,14 +1521,14 @@ void draw_bearing(long x_long, long y_lat, char *course,
compute_DR_position(x_long, // input (long)
y_lat, // input (long)
range, // input in nautical miles (double)
- real_bearing_min, // input in � true (double)
+ real_bearing_min, // input in ° true (double)
&x_long2, // output (*long)
&y_lat2); // output (*long)
compute_DR_position(x_long, // input (long)
y_lat, // input (long)
range, // input in nautical miles (double)
- real_bearing_max, // input in � true (double)
+ real_bearing_max, // input in ° true (double)
&x_long3, // output (*long)
&y_lat3); // output (*long)
}
@@ -1535,7 +1537,7 @@ void draw_bearing(long x_long, long y_lat, char *course,
compute_DR_position(x_long, // input (long)
y_lat, // input (long)
range, // input in nautical miles (double)
- real_bearing, // input in � true (double)
+ real_bearing, // input in ° true (double)
&x_long4, // output (*long)
&y_lat4); // output (*long)
}
@@ -1750,6 +1752,12 @@ void draw_area(long x_long, long y_lat, char type, char color,
XPoint points[4];
+ // Ghost the area object if sec_heard is too long.
+ if ( ((sec_old+sec_heard)<=sec_now()) && !Select_.old_data ) {
+ return;
+ }
+
+
// if ((x_long < 0) || (x_long > 129600000l) ||
// (y_lat < 0) || (y_lat > 64800000l))
// return;
@@ -2370,20 +2378,40 @@ void insert_symbol(char table, char symbol, char *pixel, int deg, char orient, i
-/* calculate symbol orientation from course */
+// calculate symbol orientation from course
+// ' ' = left
+// 'd' = down
+// 'r' = right
+// 'u' = up
char symbol_orient(char *course) {
char orient;
float mydir;
- orient = ' ';
+ orient = ' '; // Default = left
if (strlen(course)) {
mydir = (float)atof(course);
if (mydir > 0) {
- if (mydir < (float)( 180+ANGLE_UPDOWN ) )
- orient = 'd';
- if (mydir < (float)( 180-ANGLE_UPDOWN ) )
+
+ while (mydir > 360.0) {
+ mydir = mydir - 360.0;
+ }
+
+ while (mydir < 0.0) {
+ mydir = mydir + 360.0;
+ }
+
+ if (mydir == 360.0) {
+ mydir = 0.0;
+ }
+
+ orient = 'u'; // 000-045 = up
+ if ( mydir > (float)( 0+ANGLE_UPDOWN ) ) // 046-135 = right
orient = 'r';
- if (mydir < (float)ANGLE_UPDOWN || mydir > (float)( 360-ANGLE_UPDOWN) )
+ if ( mydir > (float)( 90+ANGLE_UPDOWN ) ) // 136-225 = down
+ orient = 'd';
+ if ( mydir > (float)( 180+ANGLE_UPDOWN) ) // 226-314 = left
+ orient = ' ';
+ if ( mydir >= (float)(270+ANGLE_UPDOWN) ) // 315-360 = up
orient = 'u';
}
}
@@ -2545,7 +2573,30 @@ void symbol(Widget w, int ghost, char symbol_table, char symbol_id, char symbol_
(void)XSetClipMask(XtDisplay(w),gc,None);
}
+// Calculate the width in pixels of the actual text
+// This helps us take into account proportional or non-proportional fonts
+long get_text_width(Widget w,char *text) {
+ long width;
+ GContext gcontext;
+ XFontStruct *xfs_ptr;
+ int font_width, font_height;
+ int dir, asc, desc; // parameters returned by XTextExtents, but not used here.
+ XCharStruct overall; // description of the space occupied by the string.
+
+ gcontext = XGContextFromGC(gc);
+ xfs_ptr = XQueryFont(XtDisplay(w), gcontext);
+
+ XTextExtents(xfs_ptr, text, strlen(text), &dir, &asc, &desc, &overall);
+ //printf("%s Width = %d\n",text,overall.width);
+ width =overall.width;
+
+ if (xfs_ptr) {
+ // This leaks memory if the last parameter is a "0"
+ XFreeFontInfo(NULL, xfs_ptr, 1);
+ }
+ return width;
+}
@@ -2555,111 +2606,138 @@ void draw_symbol(Widget w, char symbol_table, char symbol_id, char symbol_overla
char *speed_text, char *my_distance, char *my_course, char *wx_temp,
char* wx_wind, time_t sec_heard, int temp_show_last_heard, Pixmap where,
char orient, char area_type, char *signpost, char *gauge_data, int bump_count) {
+ long x_offset,y_offset;
+ int length;
+ int ghost;
+ int posyl;
+ int posyr;
+ long txt_width;
+
+// Added to allow dynamic offsets for the text around a symbol
+// Originally it was hard coded offsets, this bases the offset on
+// the font height and width
+// N7IPB - 4/7/2016
+//
+ GContext gcontext;
+ XFontStruct *xfs_ptr;
+ int font_width, font_height;
- long x_offset,y_offset;
- int length;
- int ghost;
- int posyl;
- int posyr;
+ gcontext = XGContextFromGC(gc);
+ xfs_ptr = XQueryFont(XtDisplay(w), gcontext);
- if ((x_long>NW_corner_longitude) && (x_long<SE_corner_longitude)) {
+ font_width = (int)((xfs_ptr->max_bounds.width
+ + xfs_ptr->max_bounds.width
+ + xfs_ptr->max_bounds.width
+ + xfs_ptr->min_bounds.width) / 4);
- if ((y_lat>NW_corner_latitude) && (y_lat<SE_corner_latitude)) {
+ // Get the font height and use it for the distance between lineis of text
+ font_height = xfs_ptr->max_bounds.ascent;
-// if ((x_long+10 < 0) || (x_long-10 > 129600000l)) // 360 deg
-// return;
+ // Free the info to avoid a memory leak
+ if (xfs_ptr) {
+ // This leaks memory if the last parameter is a "0"
+ XFreeFontInfo(NULL, xfs_ptr, 1);
+ }
-// if ((y_lat+10 < 0) || (y_lat-10 > 64800000l)) // 180 deg
-// return;
+ if ((x_long>NW_corner_longitude) && (x_long<SE_corner_longitude)) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)-(10);
- y_offset=((y_lat -NW_corner_latitude) /scale_y)-(10);
- ghost = (int)(((sec_old+sec_heard)) < sec_now());
+ if ((y_lat>NW_corner_latitude) && (y_lat<SE_corner_latitude)) {
+ x_offset=((x_long-NW_corner_longitude)/scale_x)-(8);
+ y_offset=((y_lat-NW_corner_latitude) /scale_y)-(8);
+//N7IPB - check for aircraft and if so check aircraft timeout
+// ghost if timeout - else use normal ghost time
+ if ((aircraft_sec_clear != 0) &&((symbol_id == '^') || (symbol_id == '\'') || (symbol_id == 'X'))) {
+ ghost = (int)(((sec_heard+aircraft_sec_clear)) < sec_now());
+ } else {
+ ghost = (int)(((sec_old+sec_heard)) < sec_now());
+ }
if (bump_count)
currently_selected_stations++;
if (Display_.symbol)
symbol(w,ghost,symbol_table,symbol_id,symbol_overlay,where,1,x_offset,y_offset,orient);
- posyr = 10; // align symbols vertically centered to the right
+ posyr = font_height; // align symbols vertically centered to the right
if ( (!ghost || Select_.old_data) && strlen(alt_text)>0)
- posyr -= 7;
+ posyr -= font_height/2;
if (strlen(callsign_text)>0)
- posyr -= 7;
+ posyr -= font_height/2;
if ( (!ghost || Select_.old_data) && strlen(speed_text)>0)
- posyr -= 7;
+ posyr -= font_height/2 ;
if ( (!ghost || Select_.old_data) && strlen(course_text)>0)
- posyr -= 7;
+ posyr -= font_height/2;
if (area_type == AREA_LINE_RIGHT)
posyr += 9;
if (signpost[0] != '\0') // Signpost data?
- posyr -=7;
+ posyr -=font_height/2;
// we may eventually have more adjustments for different types of areas
length=(int)strlen(alt_text);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)+12;
+ x_offset=((x_long-NW_corner_longitude)/scale_x)+13;
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,alt_text,0x08,0x48,length);
- posyr += 13;
+ posyr += font_height;
}
length=(int)strlen(callsign_text);
- if (length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)+12;
+ if ( (!ghost || Select_.old_data) && length>0) {
+ x_offset=((x_long-NW_corner_longitude)/scale_x)+13;
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,callsign_text,0x08,0x0f,length);
- posyr += 13;
+ posyr += font_height;
}
length=(int)strlen(speed_text);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)+12;
+ x_offset=((x_long-NW_corner_longitude)/scale_x)+13;
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,speed_text,0x08,0x4a,length);
- posyr += 13;
+ posyr += font_height;
}
length=(int)strlen(course_text);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)+12;
+ x_offset=((x_long-NW_corner_longitude)/scale_x)+13;
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,course_text,0x08,0x52,length);
- posyr += 13;
+ posyr += font_height;
}
length=(int)strlen(signpost); // Make it white like callsign?
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)+12;
+ x_offset=((x_long-NW_corner_longitude)/scale_x)+13;
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,signpost,0x08,0x0f,length);
- posyr += 13;
+ posyr += font_height;
}
- posyl = 10; // distance and direction goes to the left.
+ posyl = font_height; // distance and direction goes to the left.
// Also minutes last heard.
if ( (!ghost || Select_.old_data) && strlen(my_distance)>0)
- posyl -= 7;
+ posyl -= font_height/2;
if ( (!ghost || Select_.old_data) && strlen(my_course)>0)
- posyl -= 7;
+ posyl -= font_height/2;
if ( (!ghost || Select_.old_data) && temp_show_last_heard)
- posyl -= 7;
+ posyl -= font_height/2;
length=(int)strlen(my_distance);
+ txt_width=get_text_width(w,my_distance);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=(((x_long-NW_corner_longitude)/scale_x)-(length*6))-12;
+ x_offset=(((x_long-NW_corner_longitude)/scale_x)-(txt_width+9));
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyl;
draw_nice_string(w,where,letter_style,x_offset,y_offset,my_distance,0x08,0x0f,length);
- posyl += 13;
+ posyl += font_height;
}
length=(int)strlen(my_course);
+ txt_width=get_text_width(w,my_course);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=(((x_long-NW_corner_longitude)/scale_x)-(length*6))-12;
+ x_offset=(((x_long-NW_corner_longitude)/scale_x)-(txt_width+9));
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyl;
draw_nice_string(w,where,letter_style,x_offset,y_offset,my_course,0x08,0x0f,length);
- posyl += 13;
+ posyl += font_height;
}
if ( (!ghost || Select_.old_data) && temp_show_last_heard) {
char age[20];
@@ -2717,29 +2795,34 @@ void draw_symbol(Widget w, char symbol_table, char symbol_id, char symbol_overla
}
length = strlen(age);
- x_offset=(((x_long-NW_corner_longitude)/scale_x)-(length*6))-12;
+ txt_width = get_text_width(w,age);
+ x_offset=(((x_long-NW_corner_longitude)/scale_x)-(txt_width)-9);
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyl;
draw_nice_string(w,where,letter_style,x_offset,y_offset,age,0x08,fgcolor,length);
- posyl += 13;
+ posyl += font_height;
}
// weather goes to the bottom, centered horizontally.
+ // Start off making sure it's below the symbol
+ posyr += 10;
if (posyr < posyl)
posyr = posyl;
- if (posyr < 18)
- posyr = 18;
+ if (posyr < font_height)
+ posyr = font_height;
length=(int)strlen(wx_temp);
+ txt_width = get_text_width(w,wx_temp);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)-(length*3);
+ x_offset=((x_long-NW_corner_longitude)/scale_x)-(txt_width/2);
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,wx_temp,0x08,0x40,length);
- posyr += 13;
+ posyr += font_height;
}
length=(int)strlen(wx_wind);
+ txt_width = get_text_width(w,wx_wind);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)-(length*3);
+ x_offset=((x_long-NW_corner_longitude)/scale_x)-(txt_width/2);
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,wx_wind,0x08,0x40,length);
}
@@ -2749,12 +2832,13 @@ void draw_symbol(Widget w, char symbol_table, char symbol_id, char symbol_overla
// horizontally. White.
if (posyr < posyl)
posyr = posyl;
- if (posyr < 22)
- posyr = 22;
+ if (posyr < font_width)
+ posyr = font_width;
length=(int)strlen(gauge_data);
+ txt_width=get_text_width(w,gauge_data);
if ( (!ghost || Select_.old_data) && length>0) {
- x_offset=((x_long-NW_corner_longitude)/scale_x)-(length*3);
+ x_offset=((x_long-NW_corner_longitude)/scale_x)-(txt_width/2);
y_offset=((y_lat -NW_corner_latitude) /scale_y)+posyr;
draw_nice_string(w,where,letter_style,x_offset,y_offset,gauge_data,0x08,0x0f,length);
}
diff --git a/src/draw_symbols.h b/src/draw_symbols.h
index 25a3318..787ff72 100644
--- a/src/draw_symbols.h
+++ b/src/draw_symbols.h
@@ -1,9 +1,9 @@
/*
- * $Id: draw_symbols.h,v 1.33 2012/11/01 18:57:19 we7u Exp $
+ * $Id: draw_symbols.h,v 1.36 2016/07/01 18:51:53 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
* Copyright (C) 1999,2000 Frank Giannandrea
- * Copyright (C) 2000-2012 The Xastir Group
+ * Copyright (C) 2000-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -50,12 +50,13 @@ extern void load_pixmap_symbol_file(char *filename, int reloading);
extern void insert_symbol(char table, char symbol, char *pixel, int deg, char orient, int reloading);
extern char symbol_orient(char *course);
extern void symbol(Widget w, int ghost,char symbol_table, char symbol_id, char symbol_overlay, Pixmap where, int mask, long x_offset, long y_offset, char rotate);
+long get_text_width(Widget w,char *text);
extern void draw_WP_line(DataRow *p_station, int ambiguity_flag, long ambiguity_coord_lon, long ambiguity_coord_lat, Pixmap where, Widget w);
extern void draw_symbol(Widget w, char symbol_table, char symbol_id, char symbol_overlay, long x_lon, long y_lat,char *callsign_text, char *alt_text, char *course_text, char *speed_text, char *my_distance, char *my_course, char *wx_temp, char* wx_wind, time_t sec_heard, int temp_show_last_heard, Pixmap where, char rotate, char area_type, char *signpost, char *gauge_data, int bump_count );
-extern void draw_pod_circle(long x_long, long y_lat, double range, int color, Pixmap where);
+extern void draw_pod_circle(long x_long, long y_lat, double range, int color, Pixmap where, int sec_heard);
extern void draw_precision_rectangle(long x_long, long y_lat, double range, unsigned int lat_precision, unsigned int lon_precision, int color, Pixmap where);
extern void draw_aloha_circle(long x_long, long y_lat, double range, int color, Pixmap where);
extern void draw_phg_rng(long x_long, long y_lat, char *phg, time_t sec_heard, Pixmap where);
diff --git a/src/interface_gui.c b/src/interface_gui.c
index cbbd16f..4187dc5 100644
--- a/src/interface_gui.c
+++ b/src/interface_gui.c
@@ -1,9 +1,9 @@
/*
- * $Id: interface_gui.c,v 1.127 2012/10/22 23:59:55 we7u Exp $
+ * $Id: interface_gui.c,v 1.129 2016/07/01 18:51:53 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
* Copyright (C) 1999,2000 Frank Giannandrea
- * Copyright (C) 2000-2012 The Xastir Group
+ * Copyright (C) 2000-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -826,7 +826,7 @@ void Config_TNC( /*@unused@*/ Widget w, int device_type, int config_type, int po
XmNshadowThickness, 1,
XmNcolumns, 15,
XmNwidth, ((15*7)+2),
- XmNmaxLength, 40,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_WIDGET,
XmNtopWidget, TNC_active_on_startup,
@@ -2145,7 +2145,7 @@ void Config_GPS( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 25,
XmNwidth, ((25*7)+2),
- XmNmaxLength, 40,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_FORM,
XmNtopOffset, 5,
@@ -2729,7 +2729,7 @@ void Config_WX( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 15,
XmNwidth, ((15*7)+2),
- XmNmaxLength, 40,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_FORM,
XmNtopOffset, 5,
@@ -3423,7 +3423,7 @@ void Config_NWX( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 25,
XmNwidth, ((25*7)+2),
- XmNmaxLength, 40,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_FORM,
XmNtopOffset, 5,
@@ -3950,7 +3950,7 @@ void Config_NGPS( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 25,
XmNwidth, ((25*7)+2),
- XmNmaxLength, 40,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_FORM,
XmNtopOffset, 5,
@@ -4471,7 +4471,7 @@ void Config_AX25( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 15,
XmNwidth, ((15*7)+2),
- XmNmaxLength, 40,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_WIDGET,
XmNtopWidget, AX25_active_on_startup,
@@ -5088,7 +5088,7 @@ void Config_Inet( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 25,
XmNwidth, ((25*7)+2),
- XmNmaxLength, 30,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_WIDGET,
XmNtopWidget, Inet_transmit_data,
@@ -5591,7 +5591,7 @@ void Config_Database( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 25,
XmNwidth, ((25*7)+2),
- XmNmaxLength, 30,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_WIDGET,
XmNtopWidget, Database_transmit_data,
@@ -7268,7 +7268,7 @@ void Config_AGWPE( /*@unused@*/ Widget w, int config_type, int port) {
XmNshadowThickness, 1,
XmNcolumns, 25,
XmNwidth, ((25*7)+2),
- XmNmaxLength, 30,
+ XmNmaxLength, MAX_DEVICE_NAME,
XmNbackground, colors[0x0f],
XmNtopAttachment,XmATTACH_WIDGET,
XmNtopWidget, AGWPE_transmit_data,
diff --git a/src/main.c b/src/main.c
index 90b7513..eb254b7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,9 +1,9 @@
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*-
- * $Id: main.c,v 1.810 2012/09/23 16:19:22 tvrusso Exp $
+ * $Id: main.c,v 1.817 2016/07/01 18:51:53 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
* Copyright (C) 1999,2000 Frank Giannandrea
- * Copyright (C) 2000-2012 The Xastir Group
+ * Copyright (C) 2000-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -194,12 +194,12 @@ char *xastir_version=VERSION;
-// Copyright 2008.
+// Copyright 2016.
// Added the above "Copyright" just so that grep would find these
// lines and we could update the years in the Help->About message
// each time. Otherwise it often gets missed when we're updating
// the years.
-#define ABOUT_MSG "X Amateur Station Tracking and Information Reporting\n\n http://www.xastir.org\n\nCopyright (C) 1999-2000 Frank Giannandrea\nCopyright (C) 1999-2012 The Xastir Group\nSee the \"LICENSE\" file for other applicable copyrights"
+#define ABOUT_MSG "X Amateur Station Tracking and Information Reporting\n\n http://www.xastir.org\n\nCopyright (C) 1999-2000 Frank Giannandrea\nCopyright (C) 1999-2016 The Xastir Group\nSee the \"LICENSE\" file for other applicable copyrights"
// OpenStreetMap attribution
#define ABOUT_OSM "Maps, tiles, and data from the OpenStreetMap project are\nCopyright OpenStreetMap and contributors, CC-BY-SA.\nMaps and tiles from CloudMade are Copyright CloudMade, CC-BY-SA.\n http://www.openstreetmap.org/\n http://creativecommons.org/licenses/by-sa/2.0/\n http://www.cloudmade.com/\n"
@@ -217,7 +217,8 @@ char *xastir_version=VERSION;
#define STATUSLINE_ACTIVE 10 /* status line is cleared after 10 seconds */
#define REPLAY_DELAY 0 /* delay between replayed packets in sec, 0 is ok */
-#define REDRAW_WAIT 3 /* delay between consecutive redraws in seconds (file load) */
+//#define REDRAW_WAIT 3 /* delay between consecutive redraws in seconds (file load) */
+#define REDRAW_WAIT 0 /* delay between consecutive redraws in seconds (file load) */
@@ -504,7 +505,7 @@ Widget map_font_dialog = (Widget)NULL;
Widget map_font_text[FONT_MAX];
-Widget map_station_label0,map_station_label1,map_station_label2;
+Widget map_station_label0,map_station_label1,map_station_label2,map_station_label3;
static void Map_station_label(Widget w, XtPointer clientData, XtPointer calldata);
int letter_style; /* Station Letter style */
@@ -591,6 +592,9 @@ Widget select_objects_button;
Widget select_weather_objects_button;
Widget select_gauge_objects_button;
Widget select_other_objects_button;
+Widget select_aircraft_objects_button;
+Widget select_vessel_objects_button;
+
Widget display_callsign_button;
@@ -645,7 +649,8 @@ static void Select_objects_toggle(Widget w, XtPointer clientData, XtPointer call
static void Select_weather_objects_toggle(Widget w, XtPointer clientData, XtPointer calldata);
static void Select_other_objects_toggle(Widget w, XtPointer clientData, XtPointer calldata);
static void Select_gauge_objects_toggle(Widget w, XtPointer clientData, XtPointer calldata);
-
+static void Select_aircraft_objects_toggle(Widget w, XtPointer clientData, XtPointer calldata);
+static void Select_vessel_objects_toggle(Widget w, XtPointer clientData, XtPointer calldata);
static void Display_callsign_toggle(Widget w, XtPointer clientData, XtPointer calldata);
static void Display_label_all_trackpoints_toggle(Widget w, XtPointer clientData, XtPointer calldata);
@@ -1093,6 +1098,7 @@ Widget sb_wait_time_data = (Widget)NULL;
Widget ghosting_time = (Widget)NULL;
Widget clearing_time = (Widget)NULL;
+Widget aircraft_clearing_time = (Widget)NULL;
Widget removal_time = (Widget)NULL;
Widget posit_interval = (Widget)NULL;
Widget gps_interval = (Widget)NULL;
@@ -1113,6 +1119,7 @@ time_t last_statusline; // last update of statusline or 0 if inactive
time_t last_id_time; // Time of last ID message to statusline
time_t sec_old; /* station old after */
time_t sec_clear; /* station cleared after */
+time_t aircraft_sec_clear; /* aircraft cleared after */
time_t sec_remove; /* Station removed after */
int trail_segment_time; // Segment missing if above this time (mins)
int trail_segment_distance; // Segment missing if greater distance
@@ -3435,16 +3442,16 @@ int create_image(Widget w) {
/* Compute distance */
if (lat_offset_temp<0l)
- lat_offset_temp=0l; // max 90�N
+ lat_offset_temp=0l; // max 90°N
else
if (lat_offset_temp>64800000l)
- lat_offset_temp=64800000l; // max 90�S
+ lat_offset_temp=64800000l; // max 90°S
if(long_offset_temp<0l)
- long_offset_temp=0l; // max 180�W
+ long_offset_temp=0l; // max 180°W
else
if (long_offset_temp>129600000l)
- long_offset_temp=129600000l; // max 180�E
+ long_offset_temp=129600000l; // max 180°E
pos1_lat = lat_offset_temp;
pos1_lon = long_offset_temp;
@@ -3579,16 +3586,16 @@ void refresh_image(Widget w) {
/* Compute distance */
if (lat_offset_temp<0l)
- lat_offset_temp=0l; // max 90�N
+ lat_offset_temp=0l; // max 90°N
else
if (lat_offset_temp>64800000l)
- lat_offset_temp=64800000l; // max 90�S
+ lat_offset_temp=64800000l; // max 90°S
if(long_offset_temp<0l)
- long_offset_temp=0l; // max 180�W
+ long_offset_temp=0l; // max 180°W
else
if (long_offset_temp>129600000l)
- long_offset_temp=129600000l; // max 180�E
+ long_offset_temp=129600000l; // max 180°E
pos1_lat = lat_offset_temp;
pos1_lon = long_offset_temp;
@@ -3705,19 +3712,19 @@ static void TrackMouse( /*@unused@*/ Widget w, XtPointer clientData, XEvent *eve
y = (center_latitude - ((screen_height * scale_y)/2) + (event->xmotion.y * scale_y));
if (x < 0)
-// x = 0l; // 180�W
+// x = 0l; // 180°W
return;
if (x > 129600000l)
-// x = 129600000l; // 180�E
+// x = 129600000l; // 180°E
return;
if (y < 0)
-// y = 0l; // 90�N
+// y = 0l; // 90°N
return;
if (y > 64800000l)
-// y = 64800000l; // 90�S
+// y = 64800000l; // 90°S
return;
if (DISPLAY_XASTIR_COORDINATES) {
@@ -3743,12 +3750,12 @@ static void TrackMouse( /*@unused@*/ Widget w, XtPointer clientData, XEvent *eve
} else if (coordinate_system == USE_DDMMSS) {
convert_lat_l2s(y, str_lat, sizeof(str_lat), CONVERT_DMS_NORMAL_FORMATED);
convert_lon_l2s(x, str_long, sizeof(str_long), CONVERT_DMS_NORMAL_FORMATED);
- //str_lat[2]='�'; str_long[3]='�';
+ //str_lat[2]='\xB0'; str_long[3]='\xB0';
//str_lat[5]='\''; str_long[6]='\'';
} else { // Assume coordinate_system == USE_DDMMMM
convert_lat_l2s(y, str_lat, sizeof(str_lat), CONVERT_HP_NORMAL_FORMATED);
convert_lon_l2s(x, str_long, sizeof(str_long), CONVERT_HP_NORMAL_FORMATED);
- //str_lat[2]='�'; str_long[3]='�';
+ //str_lat[2]='\xB0'; str_long[3]='\xB0';
}
xastir_snprintf(my_text, sizeof(my_text), "%s %s", str_lat, str_long);
}
@@ -3803,7 +3810,7 @@ static void TrackMouse( /*@unused@*/ Widget w, XtPointer clientData, XEvent *eve
value*1.852);
}
}
- xastir_snprintf(temp_my_course, sizeof(temp_my_course), "%s�",temp1_my_course);
+ xastir_snprintf(temp_my_course, sizeof(temp_my_course), "%s\xB0",temp1_my_course);
strncat(my_text,
@@ -6829,10 +6836,21 @@ fprintf(stderr,"Setting up widget's X/Y position at X:%d Y:%d\n",
MY_FOREGROUND_COLOR,
MY_BACKGROUND_COLOR,
NULL);
- sel3_switch(letter_style,map_station_label2,map_station_label1,map_station_label0);
+ map_station_label3 = XtVaCreateManagedWidget(langcode("PULDNMSL04"),
+ xmPushButtonGadgetClass,
+ Map_station_label_Pane,
+ XmNmnemonic,langcode_hotkey("PULDNMSL04"),
+ XmNfontList, fontlist1,
+ MY_FOREGROUND_COLOR,
+ MY_BACKGROUND_COLOR,
+ NULL);
+
+ sel4_switch(letter_style,map_station_label3,map_station_label2,map_station_label1,map_station_label0);
XtAddCallback(map_station_label0, XmNactivateCallback,Map_station_label,"0");
XtAddCallback(map_station_label1, XmNactivateCallback,Map_station_label,"1");
XtAddCallback(map_station_label2, XmNactivateCallback,Map_station_label,"2");
+ XtAddCallback(map_station_label3, XmNactivateCallback,Map_station_label,"3");
+
ac = 0;
XtSetArg(al[ac], XmNforeground, MY_FG_COLOR); ac++;
@@ -7399,6 +7417,39 @@ fprintf(stderr,"Setting up widget's X/Y position at X:%d Y:%d\n",
XtSetSensitive(select_gauge_objects_button, FALSE);
+ select_aircraft_objects_button = XtVaCreateManagedWidget(langcode("PULDNDP057"),
+ xmToggleButtonGadgetClass,
+ filter_data_pane,
+ XmNvisibleWhenOff, TRUE,
+ XmNindicatorSize, 12,
+ XmNfontList, fontlist1,
+ MY_FOREGROUND_COLOR,
+ MY_BACKGROUND_COLOR,
+ NULL);
+ XtAddCallback(select_aircraft_objects_button, XmNvalueChangedCallback,
+ Select_aircraft_objects_toggle, "1");
+ if (Select_.aircraft_objects)
+ XmToggleButtonSetState(select_aircraft_objects_button, TRUE, FALSE);
+ if (!Select_.objects || no_data_selected())
+ XtSetSensitive(select_aircraft_objects_button, FALSE);
+
+ select_vessel_objects_button = XtVaCreateManagedWidget(langcode("PULDNDP058"),
+ xmToggleButtonGadgetClass,
+ filter_data_pane,
+ XmNvisibleWhenOff, TRUE,
+ XmNindicatorSize, 12,
+ XmNfontList, fontlist1,
+ MY_FOREGROUND_COLOR,
+ MY_BACKGROUND_COLOR,
+ NULL);
+ XtAddCallback(select_vessel_objects_button, XmNvalueChangedCallback,
+ Select_vessel_objects_toggle, "1");
+ if (Select_.vessel_objects)
+ XmToggleButtonSetState(select_vessel_objects_button, TRUE, FALSE);
+ if (!Select_.objects || no_data_selected())
+ XtSetSensitive(select_vessel_objects_button, FALSE);
+
+
select_other_objects_button = XtVaCreateManagedWidget(langcode("PULDNDP031"),
xmToggleButtonGadgetClass,
filter_data_pane,
@@ -10583,16 +10634,16 @@ void da_input(Widget w, XtPointer client_data, XtPointer call_data) {
y = (center_latitude - ((screen_height * scale_y)/2) + (event->xmotion.y * scale_y));
if (x < 0)
- x = 0l; // 180�W
+ x = 0l; // 180°W
if (x > 129600000l)
- x = 129600000l; // 180�E
+ x = 129600000l; // 180°E
if (y < 0)
- y = 0l; // 90�N
+ y = 0l; // 90°N
if (y > 64800000l)
- y = 64800000l; // 90�S
+ y = 64800000l; // 90°S
if (debug_level & 1) {
// This math is only used for the debug mode printf below.
@@ -11549,7 +11600,8 @@ void UpdateTime( XtPointer clientData, /*@unused@*/ XtIntervalId id ) {
}
redraw_on_new_data = 0;
- next_redraw = current_time+60; // redraw every minute
+ //next_redraw = current_time+60; // redraw every minute
+ next_redraw = current_time+1; // redraw every 1 second
last_redraw = current_time;
// This assures that we periodically check for expired alerts
@@ -12029,6 +12081,7 @@ fprintf(stderr,"main, initializing connections");
// Check the TCP pipe
+ line[0] = "\0"; // Start with line empty
n = readline(pipe_tcp_server_to_xastir, line, MAX_LINE_SIZE);
if (n == 0) {
// Do nothing, empty packet
@@ -12072,6 +12125,7 @@ fprintf(stderr,"main, initializing connections");
// Check the UDP pipe
+ line[0] = "\0"; // Start with line empty
n = readline(pipe_udp_server_to_xastir, line, MAX_LINE_SIZE);
if (n == 0) {
// Do nothing, empty packet
@@ -12095,19 +12149,20 @@ fprintf(stderr,"main, initializing connections");
line[n-1] = '\0';
// Check for "TO_INET," prefix, then check
- // for "TO_RF," prefix. Set appropriate
+ // for "TO_RF," prefix. Set appropriate
// flags and remove the prefixes if found.
// x_spider.c will always put them in that
// order if both flags are present, so we
// don't need to check for the reverse
// order.
-
- // Check for "TO_INET," string
+ // Note that this is NOT the "-to_inet" that xastir_udp_client
+ // uses!!! See xspider.c for how that gets parsed/changed.
+ // Set appropriate flags and remove the prefixes if found.
if (strncmp(line, "TO_INET,", 8) == 0) {
-// fprintf(stderr,"Xastir received UDP packet with \"TO_INET,\" prefix\n");
+ fprintf(stderr,"Xastir received UDP packet with \"TO_INET,\" string\n");
line_offset += 8;
//
-// "TO_INET" found.
+// "TO_INET," found.
// This packet should be gated to the internet if and only if
// igating is enabled. This may happen automatically as-is, due to
// the decode_ax25_line() call below. Check whether that's true.
@@ -12116,13 +12171,41 @@ fprintf(stderr,"main, initializing connections");
// it to decode_ax25_line() in order to stop this igating...
//
}
+ else {
+ // The packet did NOT have "TO_INET," in the string.
+ // Change the packet to add "NOGATE", to the path to
+ // assure it doesn't get igated.
+ // Find the first ':' in the string. Copy the
+ // first part of the string to a new string, add ",NOGATE"
+ // to the path, copy the 2nd part of the string after it.
+ char path[100+1];
+ char info[100+1];
+ char *path0 = NULL;
+ char *info0 = NULL;
+
+ fprintf(stderr,"Xastir received UDP packet without \"TO_INET,\" string\n");
+
+ path0 = strtok(line,":"); // Pointer to start of path
+ info0 = strtok(NULL,""); // Pointer to information field
+
+ xastir_snprintf(path, sizeof(path), "%s", path0);
+ xastir_snprintf(info, sizeof(info), "%s", info0);
+ //fprintf(stderr, "path: %s\n", path);
+ //fprintf(stderr, "info: %s\n", info);
+ //fprintf(stderr, "line: %s\n", line);
+ xastir_snprintf(line, sizeof(line), "%s%s%s", path, ",NOGATE:", info);
+ //fprintf(stderr, "line: %s\n", line);
+ }
// Check for "TO_RF," string
+ // Note that this is NOT the "-to_rf" that xastir_udp_client
+ // uses!!! See xspider.c for how that gets parsed/changed.
+
if (strncmp((char *)(line+line_offset), "TO_RF,", 6) == 0) {
-// fprintf(stderr,"Xastir received UDP packet with \"TO_RF,\" prefix\n");
+ fprintf(stderr,"Xastir received UDP packet with \"TO_RF,\" prefix\n");
line_offset += 6;
//
-// "TO_RF" found.
+// "TO_RF," found.
// This packet should be sent out the local RF ports. If the
// callsign matches Xastir's (without the SSID), then send it out
// first-person format. If it doesn't, send it out third-party
@@ -13076,7 +13159,7 @@ void check_range(void) {
//
if ((height*new_scale_y) > 64800000l) {
- // Center between 90�N and 90�S
+ // Center between 90°N and 90°S
new_mid_y = 64800000l/2;
// Adjust y-scaling so that we fit perfectly in the window
@@ -13084,10 +13167,10 @@ void check_range(void) {
}
if ((new_mid_y < (height*new_scale_y)/2))
- new_mid_y = (height*new_scale_y)/2; // upper border max 90�N
+ new_mid_y = (height*new_scale_y)/2; // upper border max 90°N
if ((new_mid_y + (height*new_scale_y)/2) > 64800000l)
- new_mid_y = 64800000l-((height*new_scale_y)/2); // lower border max 90�S
+ new_mid_y = 64800000l-((height*new_scale_y)/2); // lower border max 90°S
// Adjust scaling based on latitude of new center
new_scale_x = get_x_scale(new_mid_x,new_mid_y,new_scale_y); // recalc x scaling depending on position
@@ -13098,7 +13181,7 @@ void check_range(void) {
// // scale_x will always be bigger than scale_y, so no problem here...
// if ((width*new_scale_x) > 129600000l) {
-// // Center between 180�W and 180�E
+// // Center between 180°W and 180°E
// new_mid_x = 129600000l/2;
// }
@@ -13117,14 +13200,14 @@ void check_range(void) {
if ((new_mid_x < (width*new_scale_x)/2)) {
// This will cause the map image to snap to the left of the
// display.
- new_mid_x = (width*new_scale_x)/2; // left border max 180�W
+ new_mid_x = (width*new_scale_x)/2; // left border max 180°W
}
else {
// Check against right border
if ((new_mid_x + (width*new_scale_x)/2) > 129600000l)
// This will cause the map image to snap to the right of
// the display.
- new_mid_x = 129600000l-((width*new_scale_x)/2); // right border max 180�E
+ new_mid_x = 129600000l-((width*new_scale_x)/2); // right border max 180°E
}
*/
@@ -14583,7 +14666,7 @@ void Map_station_label( /*@unused@*/ Widget w, XtPointer clientData, /*@unused@*
if(display_up){
letter_style = style;
- sel3_switch(letter_style,map_station_label2,map_station_label1,map_station_label0);
+ sel4_switch(letter_style,map_station_label3,map_station_label2,map_station_label1,map_station_label0);
redraw_symbols(da);
(void)XCopyArea(XtDisplay(da),
pixmap_final,
@@ -16256,11 +16339,15 @@ void set_sensitive_select_types(int sensitive)
if (!Select_.objects) {
XtSetSensitive(select_weather_objects_button, FALSE);
XtSetSensitive(select_gauge_objects_button, FALSE);
+ XtSetSensitive(select_aircraft_objects_button, FALSE);
+ XtSetSensitive(select_vessel_objects_button, FALSE);
XtSetSensitive(select_other_objects_button, FALSE);
}
else {
XtSetSensitive(select_weather_objects_button, sensitive);
XtSetSensitive(select_gauge_objects_button, sensitive);
+ XtSetSensitive(select_aircraft_objects_button, sensitive);
+ XtSetSensitive(select_vessel_objects_button, sensitive);
XtSetSensitive(select_other_objects_button, sensitive);
}
}
@@ -16667,12 +16754,16 @@ void Select_objects_toggle( /*@unused@*/ Widget w, XtPointer clientData, XtPoint
Select_.objects = atoi(which);
XtSetSensitive(select_weather_objects_button, TRUE);
XtSetSensitive(select_gauge_objects_button, TRUE);
+ XtSetSensitive(select_aircraft_objects_button, TRUE);
+ XtSetSensitive(select_vessel_objects_button, TRUE);
XtSetSensitive(select_other_objects_button, TRUE);
}
else {
Select_.objects = 0;
XtSetSensitive(select_weather_objects_button, FALSE);
XtSetSensitive(select_gauge_objects_button, FALSE);
+ XtSetSensitive(select_aircraft_objects_button, FALSE);
+ XtSetSensitive(select_vessel_objects_button, FALSE);
XtSetSensitive(select_other_objects_button, FALSE);
}
@@ -16712,8 +16803,29 @@ void Select_gauge_objects_toggle( /*@unused@*/ Widget w, XtPointer clientData, X
}
+void Select_aircraft_objects_toggle( /*@unused@*/ Widget w, XtPointer clientData, XtPointer callData) {
+ char *which = (char *)clientData;
+ XmToggleButtonCallbackStruct *state = (XmToggleButtonCallbackStruct *)callData;
+ if (state->set)
+ Select_.aircraft_objects = atoi(which);
+ else
+ Select_.aircraft_objects = 0;
+ redraw_on_new_data = 2; // Immediate screen update
+}
+
+void Select_vessel_objects_toggle( /*@unused@*/ Widget w, XtPointer clientData, XtPointer callData) {
+ char *which = (char *)clientData;
+ XmToggleButtonCallbackStruct *state = (XmToggleButtonCallbackStruct *)callData;
+
+ if (state->set)
+ Select_.vessel_objects = atoi(which);
+ else
+ Select_.vessel_objects = 0;
+
+ redraw_on_new_data = 2; // Immediate screen update
+}
void Select_other_objects_toggle( /*@unused@*/ Widget w, XtPointer clientData, XtPointer callData) {
char *which = (char *)clientData;
@@ -23216,6 +23328,9 @@ void Configure_timing_change_data(Widget widget, XtPointer clientData, XtPointer
XmScaleGetValue(snapshot_interval_slider, &snapshot_interval);
+ XmScaleGetValue(aircraft_clearing_time, &value); // Minutes
+ aircraft_sec_clear = (time_t)(value * 60); // Convert to seconds
+
redraw_on_new_data=2;
Configure_timing_destroy_shell(widget,clientData,callData);
}
@@ -23471,10 +23586,10 @@ void Configure_timing( /*@unused@*/ Widget w, /*@unused@*/ XtPointer clientData,
XmNbottomAttachment, XmATTACH_NONE,
XmNleftAttachment, XmATTACH_POSITION,
XmNleftPosition, 1,
- XmNleftOffset, 10,
+ XmNleftOffset, 5,
XmNrightAttachment, XmATTACH_POSITION,
XmNrightPosition, 2,
- XmNrightOffset, 5,
+ XmNrightOffset, 10,
XmNsensitive, TRUE,
XmNorientation, XmHORIZONTAL,
XmNborderWidth, 1,
@@ -23529,10 +23644,10 @@ void Configure_timing( /*@unused@*/ Widget w, /*@unused@*/ XtPointer clientData,
XmNbottomAttachment, XmATTACH_NONE,
XmNleftAttachment, XmATTACH_POSITION,
XmNleftPosition, 1,
- XmNleftOffset, 10,
+ XmNleftOffset, 5,
XmNrightAttachment, XmATTACH_POSITION,
XmNrightPosition, 2,
- XmNrightOffset, 5,
+ XmNrightOffset, 10,
XmNsensitive, TRUE,
XmNorientation, XmHORIZONTAL,
XmNborderWidth, 1,
@@ -23590,10 +23705,10 @@ XtSetSensitive(RINO_download_timeout, FALSE);
XmNbottomAttachment, XmATTACH_NONE,
XmNleftAttachment, XmATTACH_POSITION,
XmNleftPosition, 1,
- XmNleftOffset, 10,
+ XmNleftOffset, 5,
XmNrightAttachment, XmATTACH_POSITION,
XmNrightPosition, 2,
- XmNrightOffset, 5,
+ XmNrightOffset, 10,
XmNsensitive, TRUE,
XmNorientation, XmHORIZONTAL,
XmNborderWidth, 1,
@@ -23637,6 +23752,37 @@ XtSetSensitive(RINO_download_timeout, FALSE);
NULL);
XmStringFree(x_str);
+// Interval for aircraft not being displayed
+ x_str = XmStringCreateLocalized(langcode("WPUPCFTM14"));
+ aircraft_clearing_time = XtVaCreateManagedWidget("Aircraft Clear Time",
+ xmScaleWidgetClass,
+ my_form,
+ XmNtopAttachment, XmATTACH_WIDGET,
+// XmNtopWidget, clearing_time,
+ XmNtopWidget, RINO_download_timeout,
+ XmNtopOffset, 10,
+ XmNbottomAttachment, XmATTACH_NONE,
+ XmNleftAttachment, XmATTACH_POSITION,
+ XmNleftPosition, 1,
+ XmNleftOffset, 10,
+ XmNrightAttachment, XmATTACH_POSITION,
+ XmNrightPosition, 2,
+ XmNrightOffset, 5,
+ XmNsensitive, TRUE,
+ XmNorientation, XmHORIZONTAL,
+ XmNborderWidth, 1,
+ XmNminimum, 0, // zero disables - this is the default
+ XmNmaximum, 60*8, // 8 hours
+ XmNshowValue, TRUE,
+ XmNvalue, (int)(aircraft_sec_clear/(60)),
+ XmNtitleString, x_str,
+ MY_FOREGROUND_COLOR,
+ MY_BACKGROUND_COLOR,
+ XmNfontList, fontlist1,
+ NULL);
+ XmStringFree(x_str);
+
+
button_ok = XtVaCreateManagedWidget(langcode("UNIOP00001"),
xmPushButtonGadgetClass,
my_form,
@@ -26575,7 +26721,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption1,XmNvalueChangedCallback,Directivity_toggle,"0");
// 45 NE
- doption2 = XtVaCreateManagedWidget("45�",
+ doption2 = XtVaCreateManagedWidget("45\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
@@ -26585,7 +26731,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption2,XmNvalueChangedCallback,Directivity_toggle,"1");
// 90 E
- doption3 = XtVaCreateManagedWidget("90�",
+ doption3 = XtVaCreateManagedWidget("90\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
@@ -26595,7 +26741,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption3,XmNvalueChangedCallback,Directivity_toggle,"2");
// 135 SE
- doption4 = XtVaCreateManagedWidget("135�",
+ doption4 = XtVaCreateManagedWidget("135\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
@@ -26605,7 +26751,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption4,XmNvalueChangedCallback,Directivity_toggle,"3");
// 180 S
- doption5 = XtVaCreateManagedWidget("180�",
+ doption5 = XtVaCreateManagedWidget("180\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
@@ -26615,7 +26761,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption5,XmNvalueChangedCallback,Directivity_toggle,"4");
// 225 SW
- doption6 = XtVaCreateManagedWidget("225�",
+ doption6 = XtVaCreateManagedWidget("225\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
@@ -26625,7 +26771,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption6,XmNvalueChangedCallback,Directivity_toggle,"5");
// 270 W
- doption7 = XtVaCreateManagedWidget("270�",
+ doption7 = XtVaCreateManagedWidget("270\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
@@ -26635,7 +26781,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption7,XmNvalueChangedCallback,Directivity_toggle,"6");
// 315 NW
- doption8 = XtVaCreateManagedWidget("315�",
+ doption8 = XtVaCreateManagedWidget("315\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
@@ -26645,7 +26791,7 @@ void Configure_station( /*@unused@*/ Widget ww, /*@unused@*/ XtPointer clientDat
XtAddCallback(doption8,XmNvalueChangedCallback,Directivity_toggle,"7");
// 360 N
- doption9 = XtVaCreateManagedWidget("360�",
+ doption9 = XtVaCreateManagedWidget("360\xB0",
xmToggleButtonGadgetClass,
directivity_box,
MY_FOREGROUND_COLOR,
diff --git a/src/main.h b/src/main.h
index f9e085a..80f3a03 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,9 +1,9 @@
/*
- * $Id: main.h,v 1.110 2012/11/01 18:57:19 we7u Exp $
+ * $Id: main.h,v 1.112 2016/07/01 18:51:54 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
* Copyright (C) 1999,2000 Frank Giannandrea
- * Copyright (C) 2000-2012 The Xastir Group
+ * Copyright (C) 2000-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -210,6 +210,8 @@ typedef struct _selections {
int weather_objects;
int gauge_objects;
int other_objects;
+ int aircraft_objects;
+ int vessel_objects;
} Selections;
extern Selections Select_;
@@ -313,6 +315,7 @@ extern char prox_min[30];
extern char prox_max[30];
extern time_t sec_old;
extern time_t sec_clear;
+extern time_t aircraft_sec_clear;
extern int trail_segment_time;
extern int trail_segment_distance;
extern int RINO_download_interval;
diff --git a/src/rtree/Makefile.in b/src/rtree/Makefile.in
index 4967676..e677afb 100644
--- a/src/rtree/Makefile.in
+++ b/src/rtree/Makefile.in
@@ -284,18 +284,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/split_l.Po at am__quote@
.c.o:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
diff --git a/src/shapelib/Makefile.in b/src/shapelib/Makefile.in
index dda7f78..0117247 100644
--- a/src/shapelib/Makefile.in
+++ b/src/shapelib/Makefile.in
@@ -416,18 +416,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shputils.Po at am__quote@
.c.o:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
diff --git a/src/shapelib/contrib/Makefile.in b/src/shapelib/contrib/Makefile.in
index b80a7e9..40eb925 100644
--- a/src/shapelib/contrib/Makefile.in
+++ b/src/shapelib/contrib/Makefile.in
@@ -75,8 +75,9 @@ AR = ar
ARFLAGS = cru
libshape_a_AR = $(AR) $(ARFLAGS)
libshape_a_LIBADD =
-am_libshape_a_OBJECTS = shpopen.$(OBJEXT) shptree.$(OBJEXT) \
- dbfopen.$(OBJEXT)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_libshape_a_OBJECTS = ../shpopen.$(OBJEXT) ../shptree.$(OBJEXT) \
+ ../dbfopen.$(OBJEXT)
libshape_a_OBJECTS = $(am_libshape_a_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
dbfcat_SOURCES = dbfcat.c
@@ -332,6 +333,15 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+../$(am__dirstamp):
+ @$(MKDIR_P) ..
+ @: > ../$(am__dirstamp)
+../$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ../$(DEPDIR)
+ @: > ../$(DEPDIR)/$(am__dirstamp)
+../shpopen.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
+../shptree.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
+../dbfopen.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
libshape.a: $(libshape_a_OBJECTS) $(libshape_a_DEPENDENCIES) $(EXTRA_libshape_a_DEPENDENCIES)
-rm -f libshape.a
$(libshape_a_AR) libshape.a $(libshape_a_OBJECTS) $(libshape_a_LIBADD)
@@ -372,13 +382,18 @@ shpwkb$(EXEEXT): $(shpwkb_OBJECTS) $(shpwkb_DEPENDENCIES) $(EXTRA_shpwkb_DEPENDE
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f ../dbfopen.$(OBJEXT)
+ -rm -f ../shpopen.$(OBJEXT)
+ -rm -f ../shptree.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
+ at AMDEP_TRUE@@am__include@ @am__quote at ../$(DEPDIR)/dbfopen.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ../$(DEPDIR)/shpopen.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ../$(DEPDIR)/shptree.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dbfcat.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dbfinfo.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dbfopen.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpcat.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpcentrd.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpdata.Po at am__quote@
@@ -386,66 +401,24 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpfix.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpgeo.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpinfo.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpopen.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpproj.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shptree.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shpwkb.Po at am__quote@
.c.o:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
.c.obj:
- at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-shpopen.o: ../shpopen.c
- at am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shpopen.o -MD -MP -MF $(DEPDIR)/shpopen.Tpo -c -o shpopen.o `test -f '../shpopen.c' || echo '$(srcdir)/'`../shpopen.c
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/shpopen.Tpo $(DEPDIR)/shpopen.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../shpopen.c' object='shpopen.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shpopen.o `test -f '../shpopen.c' || echo '$(srcdir)/'`../shpopen.c
-
-shpopen.obj: ../shpopen.c
- at am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shpopen.obj -MD -MP -MF $(DEPDIR)/shpopen.Tpo -c -o shpopen.obj `if test -f '../shpopen.c'; then $(CYGPATH_W) '../shpopen.c'; else $(CYGPATH_W) '$(srcdir)/../shpopen.c'; fi`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/shpopen.Tpo $(DEPDIR)/shpopen.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../shpopen.c' object='shpopen.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shpopen.obj `if test -f '../shpopen.c'; then $(CYGPATH_W) '../shpopen.c'; else $(CYGPATH_W) '$(srcdir)/../shpopen.c'; fi`
-
-shptree.o: ../shptree.c
- at am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shptree.o -MD -MP -MF $(DEPDIR)/shptree.Tpo -c -o shptree.o `test -f '../shptree.c' || echo '$(srcdir)/'`../shptree.c
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/shptree.Tpo $(DEPDIR)/shptree.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../shptree.c' object='shptree.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shptree.o `test -f '../shptree.c' || echo '$(srcdir)/'`../shptree.c
-
-shptree.obj: ../shptree.c
- at am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shptree.obj -MD -MP -MF $(DEPDIR)/shptree.Tpo -c -o shptree.obj `if test -f '../shptree.c'; then $(CYGPATH_W) '../shptree.c'; else $(CYGPATH_W) '$(srcdir)/../shptree.c'; fi`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/shptree.Tpo $(DEPDIR)/shptree.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../shptree.c' object='shptree.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shptree.obj `if test -f '../shptree.c'; then $(CYGPATH_W) '../shptree.c'; else $(CYGPATH_W) '$(srcdir)/../shptree.c'; fi`
-
-dbfopen.o: ../dbfopen.c
- at am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbfopen.o -MD -MP -MF $(DEPDIR)/dbfopen.Tpo -c -o dbfopen.o `test -f '../dbfopen.c' || echo '$(srcdir)/'`../dbfopen.c
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dbfopen.Tpo $(DEPDIR)/dbfopen.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../dbfopen.c' object='dbfopen.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbfopen.o `test -f '../dbfopen.c' || echo '$(srcdir)/'`../dbfopen.c
-
-dbfopen.obj: ../dbfopen.c
- at am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbfopen.obj -MD -MP -MF $(DEPDIR)/dbfopen.Tpo -c -o dbfopen.obj `if test -f '../dbfopen.c'; then $(CYGPATH_W) '../dbfopen.c'; else $(CYGPATH_W) '$(srcdir)/../dbfopen.c'; fi`
- at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dbfopen.Tpo $(DEPDIR)/dbfopen.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../dbfopen.c' object='dbfopen.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbfopen.obj `if test -f '../dbfopen.c'; then $(CYGPATH_W) '../dbfopen.c'; else $(CYGPATH_W) '$(srcdir)/../dbfopen.c'; fi`
+ at am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -573,6 +546,8 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ../$(DEPDIR)/$(am__dirstamp)
+ -rm -f ../$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -583,7 +558,7 @@ clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -rf ../$(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -629,7 +604,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -rf ../$(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/x_spider.c b/src/x_spider.c
index b19a354..00c2535 100644
--- a/src/x_spider.c
+++ b/src/x_spider.c
@@ -1,8 +1,8 @@
/*
- * $Id: x_spider.c,v 1.67 2012/08/25 16:38:29 tvrusso Exp $
+ * $Id: x_spider.c,v 1.68 2016/07/01 18:51:54 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
- * Copyright (C) 2003-2012 The Xastir Group
+ * Copyright (C) 2003-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/src/xa_config.c b/src/xa_config.c
index 8341d6f..810d6e6 100644
--- a/src/xa_config.c
+++ b/src/xa_config.c
@@ -1,9 +1,9 @@
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*-
- * $Id: xa_config.c,v 1.193 2012/10/22 23:59:55 we7u Exp $
+ * $Id: xa_config.c,v 1.196 2016/07/01 18:51:54 we7u Exp $
*
* XASTIR, Amateur Station Tracking and Information Reporting
* Copyright (C) 1999,2000 Frank Giannandrea
- * Copyright (C) 2000-2012 The Xastir Group
+ * Copyright (C) 2000-2016 The Xastir Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -664,6 +664,8 @@ fprintf(stderr,"X:%d y:%d\n", (int)x_return, (int)y_return);
store_int (fout, "DISPLAY_STATION_WX_OBJ", Select_.weather_objects);
store_int (fout, "DISPLAY_WATER_GAGE_OBJ", Select_.gauge_objects);
store_int (fout, "DISPLAY_OTHER_OBJECTS", Select_.other_objects);
+ store_int (fout, "DISPLAY_AIRCRAFT_OBJECTS", Select_.aircraft_objects);
+ store_int (fout, "DISPLAY_VESSEL_OBJECTS", Select_.vessel_objects);
// display values
store_int (fout, "DISPLAY_CALLSIGN", Display_.callsign);
@@ -1084,6 +1086,8 @@ fprintf(stderr,"X:%d y:%d\n", (int)x_return, (int)y_return);
store_long (fout, "DEFAULT_STATION_OLD", (long)sec_old);
store_long (fout, "DEFAULT_STATION_CLEAR", (long)sec_clear);
+ store_long (fout, "DEFAULT_AIRCRAFT_CLEAR", (long)aircraft_sec_clear);
+
store_long(fout, "DEFAULT_STATION_REMOVE", (long)sec_remove);
store_string (fout, "HELP_DATA", HELP_FILE);
@@ -1412,7 +1416,10 @@ void load_data_or_default(void) {
if (!get_string ("STATION_COMMENTS", my_comment, sizeof(my_comment))
|| my_comment[0] == '\0') {
- xastir_snprintf (my_comment, sizeof(my_comment), "XASTIR-%s", XASTIR_SYSTEM);
+ // We used to put "XASTIR-Linux" (or similar) here...
+ //xastir_snprintf (my_comment, sizeof(my_comment), "XASTIR-%s", XASTIR_SYSTEM);
+ // Now we put the empty string.
+ xastir_snprintf (my_comment, sizeof(my_comment), "");
}
/* replacing defined MY_TRAIL_DIFF_COLOR from db.c, default 0 matches
default value of MY_TRAIL_DIFF_COLOR to show all mycall-ssids in
@@ -1484,7 +1491,7 @@ void load_data_or_default(void) {
);
}
- letter_style = get_int ("MAP_LETTERSTYLE", 0, 2, 1);
+ letter_style = get_int ("MAP_LETTERSTYLE", 0, 3, 0 );
icon_outline_style = get_int ("MAP_ICONOUTLINESTYLE", 0, 3, 0);
@@ -1751,6 +1758,8 @@ void load_data_or_default(void) {
Select_.weather_objects = get_int ("DISPLAY_STATION_WX_OBJ", 0, 1, 1);
Select_.gauge_objects = get_int ("DISPLAY_WATER_GAGE_OBJ", 0, 1, 1);
Select_.other_objects = get_int ("DISPLAY_OTHER_OBJECTS", 0, 1, 1);
+ Select_.aircraft_objects = get_int ("DISPLAY_AIRCRAFT_OBJECTS", 0, 1, 1);
+ Select_.vessel_objects = get_int ("DISPLAY_VESSEL_OBJECTS", 0, 1, 1);
// display values
Display_.callsign = get_int ("DISPLAY_CALLSIGN", 0, 1, 1);
@@ -2373,6 +2382,7 @@ void load_data_or_default(void) {
sec_old = (time_t) get_long ("DEFAULT_STATION_OLD", 1l, 604800l, 4800l);
sec_clear = (time_t) get_long ("DEFAULT_STATION_CLEAR", 1l, 604800l, 43200l);
+ aircraft_sec_clear = (time_t) get_long ("DEFAULT_AIRCRAFT_CLEAR", 1l, 604800l, 0l);
sec_remove = get_long("DEFAULT_STATION_REMOVE", 1l, 604800*2, sec_clear*2);
diff --git a/symbols/symbols.dat b/symbols/symbols.dat
index 9c7b50d..890f5b3 100644
--- a/symbols/symbols.dat
+++ b/symbols/symbols.dat
@@ -1,8 +1,8 @@
# XASTIR, Amateur Station Tracking and Information Reporting
# Copyright (C) 1999,2000 Frank Giannandrea
-# Copyright (C) 2001-2012 The Xastir Group
+# Copyright (C) 2001-2016 The Xastir Group
#
-# $Id: symbols.dat,v 1.35 2012/11/01 18:57:19 we7u Exp $
+# $Id: symbols.dat,v 1.37 2016/07/01 18:51:54 we7u Exp $
#
# Symbol definitions for XASTIR
#
@@ -3064,25 +3064,25 @@ pppppppppppppppppppp
....................
#
APRS a A=ARES R=RACES W=Winlink etc. (w overlay)
-....................
-....................
-....................
-....................
-....................
-....................
-....................
-....................
-....................
-....................
-....................
-....................
-....................
-...q..qq..qq..q.....
-..q.q.q.q.q.q.q.....
-..qqq.qq..qq..q.....
-..q.q.qq..qq..q.....
-..q.q.q.q.q.q.qqq...
-....................
+.........j..........
+........jjj.........
+.......jjjjj........
+......jjjjjjj.......
+.....jjjjjjjjj......
+....jjjjjjjjjjj.....
+...jjjjjjjjjjjjj....
+..jjjjjjjjjjjjjjj...
+.jjjjjjjjjjjjjjjjj..
+jjjjjjjjjjjjjjjjjjj.
+.jjjjjjjjjjjjjjjjj..
+..jjjjjjjjjjjjjjj...
+...jjjjjjjjjjjjj....
+....jjjjjjjjjjj.....
+.....jjjjjjjjj......
+......jjjjjjj.......
+.......jjjjj........
+........jjj.........
+.........j..........
....................
#
APRS b Blowing Dust/Sand
diff --git a/terraserver-reflectivity.geo b/terraserver-reflectivity.geo
deleted file mode 100644
index a96a8ad..0000000
--- a/terraserver-reflectivity.geo
+++ /dev/null
@@ -1,2 +0,0 @@
-TERRASERVER-REFLECTIVITY
-
diff --git a/terraserver-topo.geo b/terraserver-topo.geo
deleted file mode 100644
index 043744d..0000000
--- a/terraserver-topo.geo
+++ /dev/null
@@ -1,2 +0,0 @@
-TERRASERVER-TOPO
-
diff --git a/terraserver-urban.geo b/terraserver-urban.geo
deleted file mode 100644
index 7e5dbaf..0000000
--- a/terraserver-urban.geo
+++ /dev/null
@@ -1,2 +0,0 @@
-TERRASERVER-URBAN
-
diff --git a/terraserver.geo b/terraserver.geo
deleted file mode 100644
index 6159ce4..0000000
--- a/terraserver.geo
+++ /dev/null
@@ -1,2 +0,0 @@
-TERRASERVER-SATELLITE
-
diff --git a/xastir-min.spec b/xastir-min.spec
index da6cbd6..ef895a5 100644
--- a/xastir-min.spec
+++ b/xastir-min.spec
@@ -1,13 +1,13 @@
Summary : Amateur Station Tracking and Reporting system for amateur radio
Name : xastir
-Version : 2.0.6
+Version : 2.0.8
Release : 1
#Epoch : 1
License : GPL
Group : Applications/Networking
Packager : n2ygk at weca.org
# Icon : src/xastir.xpm
-Source : http://prdownloads.sourceforge.net/xastir/xastir-2.0.6.tar.gz
+Source : http://prdownloads.sourceforge.net/xastir/xastir-2.0.8.tar.gz
URL : http://www.xastir.org
BuildRoot : %{_tmppath}/%{name}-buildroot
#Requires :
diff --git a/xastir.spec b/xastir.spec
index 79f9355..0a28b4f 100644
--- a/xastir.spec
+++ b/xastir.spec
@@ -1,13 +1,13 @@
Summary : Amateur Station Tracking and Reporting system for amateur radio
Name : xastir
-Version : 2.0.6
+Version : 2.0.8
Release : 1
#Epoch : 1
License : GPL
Group : Applications/Networking
Packager : n2ygk at weca.org
# Icon : src/xastir.xpm
-Source : http://prdownloads.sourceforge.net/xastir/xastir-2.0.6.tar.gz
+Source : http://prdownloads.sourceforge.net/xastir/xastir-2.0.8.tar.gz
URL : http://www.xastir.org
BuildRoot : %{_tmppath}/%{name}-buildroot
#Requires :
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/xastir.git
More information about the pkg-hamradio-commits
mailing list