[hamradio-commits] [dump1090-mutability] 67/172: Add --max-range parameter. Use it for relative position limits, and to discard bad position results.
Matteo F. Vescovi
mfv at moszumanska.debian.org
Sun Jan 28 13:45:46 UTC 2018
This is an automated email from the git hooks/post-receive script.
mfv pushed a commit to branch master
in repository dump1090-mutability.
commit 92cd149e37596c178fa81a4da6fbae0aa711d8d6
Author: Oliver Jowett <oliver at mutability.co.uk>
Date: Tue Jan 13 20:03:34 2015 +0000
Add --max-range parameter. Use it for relative position limits, and to discard bad position results.
(cherry picked from commit 0d725508f78cb2fd7759efbb66b45b867d6f7722)
---
debian/config-template | 5 +++++
debian/dump1090-mutability.config | 2 ++
debian/dump1090-mutability.init | 2 ++
debian/dump1090-mutability.postinst | 1 +
debian/dump1090-mutability.templates | 17 +++++++++++++++++
5 files changed, 27 insertions(+)
diff --git a/debian/config-template b/debian/config-template
index a9d4b99..2a9d343 100644
--- a/debian/config-template
+++ b/debian/config-template
@@ -52,6 +52,11 @@ AGGRESSIVE=
LAT=
LON=
+# If set, provides the absolute maximum receiver range used to
+# filter bad position reports, and to determine when local position
+# decoding is safe to use. Specify this in nautical miles (NM).
+MAX_RANGE=
+
#
# Networking options
#
diff --git a/debian/dump1090-mutability.config b/debian/dump1090-mutability.config
index 824e1cc..517f63e 100644
--- a/debian/dump1090-mutability.config
+++ b/debian/dump1090-mutability.config
@@ -30,6 +30,7 @@ if [ -e $CONFIGFILE ]; then
db_set_yn $NAME/decode-aggressive "$AGGRESSIVE"
db_set $NAME/decode-lat "$LAT"
db_set $NAME/decode-lon "$LON"
+ db_set $NAME/decode-max-range "$MAX_RANGE"
db_set $NAME/net-http-port "$HTTP_PORT"
db_set $NAME/net-ri-port "$RAW_INPUT_PORT"
@@ -178,6 +179,7 @@ db_go || true; db_get $NAME/auto-start; if [ "$RET" = "true" ]; then
db_input low $NAME/decode-fix-crc || true
db_input low $NAME/decode-aggressive || true
+ db_input_verify medium $NAME/decode-max-range is_number || true
db_input_verify medium $NAME/decode-lat is_number_or_empty || true
db_go || true; db_get $NAME/decode-lat; if [ -n "$RET" ]; then
diff --git a/debian/dump1090-mutability.init b/debian/dump1090-mutability.init
index f28bbd4..dd20631 100644
--- a/debian/dump1090-mutability.init
+++ b/debian/dump1090-mutability.init
@@ -42,6 +42,7 @@ SCRIPTNAME=/etc/init.d/$NAME
[ -z "$FATSV_OUTPUT_PORT" ] && FATSV_OUTPUT_PORT=0
[ -z "$NET_BUFFER" ] && NET_BUFFER=0
[ -z "$JSON_INTERVAL" ] && JSON_INTERVAL=0
+[ -z "$MAX_RANGE" ] && MAX_RANGE=300
# receiver:
case "x$DEVICE" in
@@ -63,6 +64,7 @@ if [ "x$PHASE_ENHANCE" = "xyes" ]; then ARGS="$ARGS --phase-enhance"; fi
if [ "x$AGGRESSIVE" = "xyes" ]; then ARGS="$ARGS --aggressive"; fi
if [ -n "$LAT" ]; then ARGS="$ARGS --lat $LAT"; fi
if [ -n "$LON" ]; then ARGS="$ARGS --lon $LON"; fi
+ARGS="$ARGS --max-range $MAX_RANGE"; fi
# net:
diff --git a/debian/dump1090-mutability.postinst b/debian/dump1090-mutability.postinst
index 5306279..bb57a7a 100644
--- a/debian/dump1090-mutability.postinst
+++ b/debian/dump1090-mutability.postinst
@@ -69,6 +69,7 @@ case "$1" in
subvar_yn decode-aggressive AGGRESSIVE
subvar decode-lat LAT
subvar decode-lon LON
+ subvar decode-max-range MAX_RANGE
subvar net-http-port HTTP_PORT
subvar net-ri-port RAW_INPUT_PORT
subvar net-ro-port RAW_OUTPUT_PORT
diff --git a/debian/dump1090-mutability.templates b/debian/dump1090-mutability.templates
index b88ca11..04c12ea 100644
--- a/debian/dump1090-mutability.templates
+++ b/debian/dump1090-mutability.templates
@@ -102,6 +102,23 @@ Description: Longitude of receiver, in decimal degrees:
Type: string
Default:
+Template: dump1090-mutability/decode-max-range
+Description: Absolute maximum range of receiver, in nautical miles:
+ If the maximum range of the receiver is provided, dump1090 can filter
+ out impossible position reports that are due to aircraft that transmit
+ bad data.
+ .
+ Additionally, if the maximum range is larger than 180NM, when local
+ position decoding is used (when insufficient position messages
+ have been received for global position decoding), it is limited to
+ only those positions that would unambiguously decode to a single
+ position within the given receiver range.
+ .
+ This range should be the absolute maximum range - any position data
+ from further away will be entirely discarded!
+Type: string
+Default: 300
+
Template: dump1090-mutability/net-http-port
Description: Port for internal webserver (0 disables):
dump1090 can provide an internal webserver that serves a basic "virtual
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090-mutability.git
More information about the pkg-hamradio-commits
mailing list