Add support for controlling the accuracy of the receiver location
written in the JSON metadata used by the webmap.
This commit is contained in:
parent
bbcfbb8279
commit
58dfbdcb6b
9 changed files with 52 additions and 5 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
|
@ -3,6 +3,8 @@ dump1090-mutability (1.08.2302.14+1mu-4) UNRELEASED; urgency=medium
|
|||
* Remove half-implemented --no-decode option.
|
||||
* Remove Windows support files that aren't needed for the Debian package.
|
||||
* Remove some legacy support scripts not needed by the Debian package.
|
||||
* Add support for controlling the accuracy of the receiver location
|
||||
written in the JSON metadata used by the webmap.
|
||||
|
||||
-- Oliver Jowett <oliver@mutability.co.uk> Sat, 27 Dec 2014 20:08:44 +0000
|
||||
|
||||
|
|
|
|||
3
debian/config-template
vendored
3
debian/config-template
vendored
|
|
@ -112,5 +112,8 @@ JSON_DIR=
|
|||
# Interval between writing json state (in seconds). 0 disables.
|
||||
JSON_INTERVAL=
|
||||
|
||||
# Accuracy of receiver location to write to json state, one of "exact" / "approximate" / "none"
|
||||
JSON_LOCATION_ACCURACY=
|
||||
|
||||
# Additional options that are passed to the Daemon.
|
||||
EXTRA_ARGS=
|
||||
|
|
|
|||
2
debian/dump1090-mutability.config
vendored
2
debian/dump1090-mutability.config
vendored
|
|
@ -47,6 +47,7 @@ if [ -e $CONFIGFILE ]; then
|
|||
db_set $NAME/stats-interval "$STATS_INTERVAL"
|
||||
db_set $NAME/json-dir "$JSON_DIR"
|
||||
db_set $NAME/json-interval "$JSON_INTERVAL"
|
||||
db_set $NAME/json-location-accuracy "$JSON_LOCATION_ACCURACY"
|
||||
db_set $NAME/extra-args "$EXTRA_ARGS"
|
||||
fi
|
||||
|
||||
|
|
@ -202,6 +203,7 @@ db_go || true; db_get $NAME/auto-start; if [ "$RET" = "true" ]; then
|
|||
db_go || true; db_get $NAME/json-interval; if [ -n "$RET" ] && [ "$RET" -gt 0 ]; then
|
||||
# only if json-interval was given and non-zero
|
||||
db_input low $NAME/json-dir || true
|
||||
db_input low $NAME/json-location-accuracy || true
|
||||
fi
|
||||
|
||||
db_input low $NAME/extra-args || true
|
||||
|
|
|
|||
6
debian/dump1090-mutability.init
vendored
6
debian/dump1090-mutability.init
vendored
|
|
@ -83,6 +83,12 @@ if [ -n "$NET_BIND_ADDRESS" ]; then ARGS="$ARGS --net-bind-address $NET_BIND_ADD
|
|||
if [ -n "$STATS_INTERVAL" ]; then ARGS="$ARGS --stats-every $STATS_INTERVAL"; fi
|
||||
if [ -n "$JSON_DIR" ]; then ARGS="$ARGS --write-json $JSON_DIR"; fi
|
||||
if [ -n "$JSON_INTERVAL" ]; then ARGS="$ARGS --write-json-every $JSON_INTERVAL"; fi
|
||||
case "x$JSON_LOCATION_ACCURACY" in
|
||||
xexact) ARGS="$ARGS --json-location-accuracy 2" ;;
|
||||
xapproximate) ARGS="$ARGS --json-location-accuracy 1" ;;
|
||||
*) ARGS="$ARGS --json-location-accuracy 0" ;;
|
||||
esac
|
||||
|
||||
if [ -n "$EXTRA_ARGS" ]; then ARGS="$ARGS $EXTRA_ARGS"; fi
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
|
|
|
|||
1
debian/dump1090-mutability.postinst
vendored
1
debian/dump1090-mutability.postinst
vendored
|
|
@ -84,6 +84,7 @@ case "$1" in
|
|||
subvar stats-interval STATS_INTERVAL
|
||||
subvar json-dir JSON_DIR
|
||||
subvar json-interval JSON_INTERVAL
|
||||
subvar json-location-accuracy JSON_LOCATION_ACCURACY
|
||||
subvar extra-args EXTRA_ARGS
|
||||
|
||||
cp -a -f $CONFIGFILE $CONFIGFILE.tmp
|
||||
|
|
|
|||
21
debian/dump1090-mutability.templates
vendored
21
debian/dump1090-mutability.templates
vendored
|
|
@ -234,6 +234,27 @@ Description: Interval between writing JSON aircraft state, in seconds:
|
|||
Type: string
|
||||
Default: 1
|
||||
|
||||
Template: dump1090-mutability/json-location-accuracy
|
||||
Description: Receiver location accuracy to show in the web interface:
|
||||
dump1090 can provide the configured receiver location to the web map,
|
||||
so that the map can show distances from the receiver.
|
||||
.
|
||||
For privacy reasons, if you are making the map publicly available you
|
||||
may not want to show the exact location of the receiver. There are three
|
||||
options available to control what is shown:
|
||||
.
|
||||
approximate: dump1090 will provide the receiver location rounded to the
|
||||
nearest 0.01 degree of latitude and longitude. This gives a location
|
||||
that is accurate to within about 0.5 - 1km.
|
||||
.
|
||||
exact: dump1090 will provide the exact receiver location.
|
||||
.
|
||||
none: dump1090 will not provide the receiver location at all; distance
|
||||
display will be disabled.
|
||||
Type: select
|
||||
Choices: approximate, exact, none
|
||||
Default: approximate
|
||||
|
||||
Template: dump1090-mutability/extra-args
|
||||
Description: Extra arguments to pass to dump1090:
|
||||
Here you can add any extra arguments you want to pass to dump1090.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue