Compare commits
9 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
cb6eea8f05 | |
|
|
6246ac50d7 | |
|
|
4e1e71b82d | |
|
|
2109b1d041 | |
|
|
e7db494b18 | |
|
|
69eee8fcc1 | |
|
|
eb74ccc1b1 | |
|
|
a51f2ed2d9 | |
|
|
ce68d70e28 |
12
README.md
12
README.md
|
|
@ -1,3 +1,15 @@
|
|||
# EOSS Specific Changes
|
||||
|
||||
The `eoss` branch adds the following changes/features so that the dump1090-fa release can work relatively seamlessly on the EOSS SDR system:
|
||||
- Updates to the web display and the underlying Javascript to Redirect the map source to the locally running OSM map server. This way map tiles are fetched from the local system and removes the need for a dedicated Internet connection.
|
||||
- Apache is used as the web server of choice instead of lighttpd. The Apache configuration is modified to use an alias (/dump1090-fa) pointing to the /user/share/dump1090-fa/html directory.
|
||||
- Parameter changes for the dump1090-fa daemon so that it looks to use only those RTL-SDR USB dongles that have been labeled with "ADSB" as their serial number. This allows
|
||||
multiple RTL-SDR dongles to be used on the SDR system (dump1090-fa uses one while the SDR system can use another).
|
||||
|
||||
For detailed instructions and build info for the `eoss` branch, please see the [EOSS-Install-dump1090](https://github.com/TheKoola/eosstracker/blob/master/doc/EOSS-Install-dump1090.md) under the eosstracker project.
|
||||
|
||||
|
||||
|
||||
# dump1090-fa Debian/Raspbian packages
|
||||
|
||||
dump1090-fa is a ADS-B, Mode S, and Mode 3A/3C demodulator and decoder that
|
||||
|
|
|
|||
|
|
@ -11,11 +11,21 @@ Build-Depends: debhelper(>=9),
|
|||
pkg-config, dh-systemd, libncurses5-dev
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: http://www.flightaware.com/
|
||||
Vcs-Git: https://github.com/flightaware/dump1090.git
|
||||
Vcs-Git: https://github.com/edgeofspace/dump1090-fa.git
|
||||
|
||||
Package: dump1090
|
||||
Architecture: all
|
||||
Depends: dump1090-fa, ${misc:Depends}
|
||||
Priority: extra
|
||||
Section: oldlibs
|
||||
Description: transitional dummy package for dump1090
|
||||
This is a transitional dummy package to handle upgrades from
|
||||
the old package name of "dump1090" to the new package name of
|
||||
"dump1090-fa". It can safely be removed.
|
||||
|
||||
Package: dump1090-fa
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lighttpd
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
|
||||
Description: FlightAware ADS-B Ground Station System for SDRs
|
||||
Networked Aviation Mode S / ADS-B decoder/translator with support
|
||||
for RTL-SDR, BladeRF, HackRF, and LimeSDR software defined radio USB
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
# dump1090-fa won't automatically start unless ENABLED=yes
|
||||
ENABLED=yes
|
||||
|
||||
RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0"
|
||||
DECODER_OPTIONS="--max-range 360 --fix"
|
||||
RECEIVER_OPTIONS="--device ADSB --gain -10 --ppm 0"
|
||||
DECODER_OPTIONS="--max-range 800 --fix"
|
||||
NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1300 --net-ro-interval 0.2 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
|
||||
JSON_OPTIONS="--json-location-accuracy 1"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
public_html/* usr/share/dump1090-fa/html
|
||||
public_html_merged/* usr/share/skyaware/html
|
||||
debian/lighttpd/* etc/lighttpd/conf-available
|
||||
bladerf/* usr/share/dump1090-fa/bladerf
|
||||
debian/start-dump1090-fa usr/share/dump1090-fa/
|
||||
debian/generate-wisdom usr/share/dump1090-fa/
|
||||
|
|
|
|||
|
|
@ -34,20 +34,43 @@ case "$1" in
|
|||
# plugdev required for bladeRF USB access
|
||||
adduser "$RUNAS" plugdev
|
||||
|
||||
# set up lighttpd
|
||||
if dpkg --compare-versions "$2" lt "3.1.0"
|
||||
then
|
||||
echo "Enabling lighttpd integration.." >&2
|
||||
lighty-enable-mod dump1090-fa || true
|
||||
|
||||
# only enable the statcache config if there is nothing else around that already
|
||||
# configures it, because lighttpd fails if it's configured twice
|
||||
if ! grep -q -E '^\S*server.stat-cache-engine' /etc/lighttpd/conf-enabled/*.conf
|
||||
then
|
||||
echo "Enabling lighttpd integration (stat cache).." >&2
|
||||
lighty-enable-mod dump1090-fa-statcache || true
|
||||
fi
|
||||
# Make sure the "data" directory is owned by dump1090 so the dump1090-fa process has write access
|
||||
jsondir="/usr/share/dump1090-fa/html/data"
|
||||
if [ ! -d ${jsondir} ]; then
|
||||
echo "Creating directory ${jsondir}..." >&2
|
||||
mkdir ${jsondir}
|
||||
fi
|
||||
if [ -d ${jsondir} ]; then
|
||||
echo "Changing permissions on ${jsondir}..." >&2
|
||||
chown ${RUNAS}:nogroup ${jsondir}
|
||||
chmod 755 ${jsondir}
|
||||
fi
|
||||
|
||||
# Update apache
|
||||
changed=false
|
||||
for apachefile in /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf
|
||||
do
|
||||
if [ -f ${apachefile} ]; then
|
||||
echo "Modifying ${apachefile}..." >&2
|
||||
sed -i '/<\/VirtualHost>/i \
|
||||
####dump1090-start###\
|
||||
Alias "/data" "/dump1090-fa/data"\
|
||||
Alias "/dump1090-fa" "/usr/share/dump1090-fa/html"\
|
||||
Alias "^/dump1090-fa$" "/dump1090-fa"\
|
||||
SetEnvIf Request_URI "/dump1090-fa/data/.*\.json$" Header set "Access-Control-Allow-Origin" "*"\
|
||||
####dump1090-end###' ${apachefile}
|
||||
changed=true
|
||||
fi
|
||||
done
|
||||
|
||||
# Restart apache
|
||||
if $changed
|
||||
then
|
||||
echo "Restarting Apache..." >&2
|
||||
invoke-rc.d apache2 restart || echo "Warning: apache2 failed to restart." >&2
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# on upgrade, add an ENABLED line if it's not already present
|
||||
if dpkg --compare-versions "$2" lt-nl "3.7.0"
|
||||
|
|
@ -63,15 +86,14 @@ case "$1" in
|
|||
fi
|
||||
fi
|
||||
|
||||
if dpkg --compare-versions "$2" le "5.0"
|
||||
then
|
||||
echo "Enabling lighttpd skyaware module.." >&2
|
||||
lighty-enable-mod skyaware || true
|
||||
# enabling and starting the dump1090-fa service
|
||||
echo "Unmasking the dump1090-fa service..." >&2
|
||||
systemctl unmask dump1090-fa
|
||||
echo "Enabling the dump1090-fa service..." >&2
|
||||
systemctl enable dump1090-fa
|
||||
echo "Starting the dump1090-fa service..." >&2
|
||||
systemctl restart dump1090-fa
|
||||
|
||||
fi
|
||||
|
||||
echo "Restarting lighttpd.." >&2
|
||||
invoke-rc.d lighttpd restart || true
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
|
|
|||
|
|
@ -26,24 +26,21 @@ case "$1" in
|
|||
|
||||
remove)
|
||||
changed=false
|
||||
if [ -e /etc/lighttpd/conf-enabled/89-dump1090-fa.conf ]
|
||||
then
|
||||
echo "Disabling lighttpd integration.." >&2
|
||||
lighty-disable-mod dump1090-fa || true
|
||||
changed=true
|
||||
fi
|
||||
|
||||
if [ -e /etc/lighttpd/conf-enabled/88-dump1090-fa-statcache.conf ]
|
||||
then
|
||||
echo "Disabling lighttpd integration (stat cache).." >&2
|
||||
lighty-disable-mod dump1090-fa-statcache || true
|
||||
changed=true
|
||||
fi
|
||||
for apachefile in /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf
|
||||
do
|
||||
if [ -f ${apachefile} ]; then
|
||||
echo "Modifying apache file ${apachefile}..." >&2
|
||||
sed -i '/^[ \t]*#*dump1090-start#*/,/^[ \t]*#*dump1090-end#*/{/^[ \t]*#*dump1090-start#*/!{/^[ \t]*#*dump1090-end#*/!d}}' ${apachefile}
|
||||
sed -i '/[ \t]*#*dump1090-start#*/,/^[ \t]*#*dump1090-end#*/d' ${apachefile}
|
||||
changed=true
|
||||
fi
|
||||
done
|
||||
|
||||
if $changed
|
||||
then
|
||||
echo "Restarting lighttpd.." >&2
|
||||
invoke-rc.d lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
|
||||
echo "Restarting Apache..." >&2
|
||||
invoke-rc.d apache2 restart || echo "Warning: apache2 failed to restart." >&2
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ After=network.target
|
|||
User=dump1090
|
||||
RuntimeDirectory=dump1090-fa
|
||||
RuntimeDirectoryMode=0755
|
||||
ExecStart=/usr/share/dump1090-fa/start-dump1090-fa --write-json %t/dump1090-fa --quiet
|
||||
ExecStart=/usr/share/dump1090-fa/start-dump1090-fa --write-json /usr/share/dump1090-fa/html/data --quiet
|
||||
SyslogIdentifier=dump1090-fa
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
# The stat cache must be disabled, as aircraft.json changes
|
||||
# frequently and lighttpd's stat cache often ends up with the
|
||||
# wrong content length.
|
||||
server.stat-cache-engine = "disable"
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
# Allows access to the static files that provide the dump1090 map view,
|
||||
# and also to the dynamically-generated json parts that contain aircraft
|
||||
# data and are periodically written by the dump1090 daemon.
|
||||
|
||||
# Enable alias module
|
||||
#
|
||||
## This module is normally already enabled in lighttpd, so you should not
|
||||
## need to uncommment this line.
|
||||
## There are some cases (e.g. when installing this on a Raspberry Pi
|
||||
## that runs PiHole) in which the module has been removed from the
|
||||
## default configuration, and the dump1090-fa web interface no longer
|
||||
## loads properly.
|
||||
## If this is what you are experiencing, or if you see messages in your
|
||||
## error log like:
|
||||
## (server.c.1493) WARNING: unknown config-key: alias.url (ignored)
|
||||
## then uncommenting this line and then restarting lighttpd could fix
|
||||
## the issue.
|
||||
## This is not enabled by default as standard lighttpd will not start if
|
||||
## modules are loaded multiple times.
|
||||
#
|
||||
# server.modules += ( "mod_alias" )
|
||||
|
||||
alias.url += (
|
||||
"/dump1090-fa/data/" => "/run/dump1090-fa/",
|
||||
"/dump1090-fa/" => "/usr/share/dump1090-fa/html/"
|
||||
)
|
||||
|
||||
# redirect the slash-less URL
|
||||
url.redirect += (
|
||||
"^/dump1090-fa$" => "/dump1090-fa/"
|
||||
)
|
||||
|
||||
# Add CORS header
|
||||
server.modules += ( "mod_setenv" )
|
||||
$HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
|
||||
setenv.set-response-header = ( "Access-Control-Allow-Origin" => "*" )
|
||||
}
|
||||
|
||||
# Uncomment this section to enable SSL traffic (HTTPS) - especially useful
|
||||
# for .dev domains
|
||||
## Listen on 8443 for SSL connections
|
||||
#server.modules += ( "mod_openssl" )
|
||||
#$HTTP["host"] == "piaware.example.com" {
|
||||
# $SERVER["socket"] == ":8443" {
|
||||
# ssl.engine = "enable"
|
||||
# ssl.pemfile = "/etc/ssl/certs/combined.pem"
|
||||
# ssl.ca-file = "/etc/ssl/certs/fullchain.cer"
|
||||
# ssl.honor-cipher-order = "enable"
|
||||
# ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
|
||||
# ssl.use-sslv2 = "disable"
|
||||
# ssl.use-sslv3 = "disable"
|
||||
#
|
||||
# alias.url += (
|
||||
# "/data/" => "/run/dump1090-fa/",
|
||||
# "/" => "/usr/share/dump1090-fa/html/"
|
||||
# )
|
||||
# }
|
||||
#}
|
||||
#
|
||||
## Redirect HTTP to HTTPS
|
||||
#$HTTP["scheme"] == "http" {
|
||||
# $HTTP["host"] =~ ".*" {
|
||||
# url.redirect = (".*" => "https://%0$0")
|
||||
# }
|
||||
#}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
# Allows access to the static files that provide the dump1090 map view,
|
||||
# and also to the dynamically-generated json parts that contain aircraft
|
||||
# data and are periodically written by the dump1090 daemon.
|
||||
|
||||
# Enable alias module
|
||||
#
|
||||
## This module is normally already enabled in lighttpd, so you should not
|
||||
## need to uncommment this line.
|
||||
## There are some cases (e.g. when installing this on a Raspberry Pi
|
||||
## that runs PiHole) in which the module has been removed from the
|
||||
## default configuration, and the dump1090-fa web interface no longer
|
||||
## loads properly.
|
||||
## If this is what you are experiencing, or if you see messages in your
|
||||
## error log like:
|
||||
## (server.c.1493) WARNING: unknown config-key: alias.url (ignored)
|
||||
## then uncommenting this line and then restarting lighttpd could fix
|
||||
## the issue.
|
||||
## This is not enabled by default as standard lighttpd will not start if
|
||||
## modules are loaded multiple times.
|
||||
#
|
||||
# server.modules += ( "mod_alias" )
|
||||
|
||||
alias.url += (
|
||||
"/skyaware/data/" => "/run/dump1090-fa/",
|
||||
"/skyaware/data-978/" => "/run/skyaware978/",
|
||||
"/skyaware/" => "/usr/share/skyaware/html/"
|
||||
)
|
||||
|
||||
# redirect the slash-less URL
|
||||
url.redirect += (
|
||||
"^/skyaware$" => "/skyaware/"
|
||||
)
|
||||
|
||||
# Listen on port 8080 and serve the map there, too.
|
||||
$SERVER["socket"] == ":8080" {
|
||||
alias.url += (
|
||||
"/data/" => "/run/dump1090-fa/",
|
||||
"/data-978/" => "/run/skyaware978/",
|
||||
"/" => "/usr/share/skyaware/html/"
|
||||
)
|
||||
}
|
||||
|
||||
# Add CORS header
|
||||
server.modules += ( "mod_setenv" )
|
||||
$HTTP["url"] =~ "^/skyaware/data/.*\.json$" {
|
||||
setenv.set-response-header = ( "Access-Control-Allow-Origin" => "*" )
|
||||
}
|
||||
|
||||
# Uncomment this section to enable SSL traffic (HTTPS) - especially useful
|
||||
# for .dev domains
|
||||
## Listen on 8443 for SSL connections
|
||||
#server.modules += ( "mod_openssl" )
|
||||
#$HTTP["host"] == "piaware.example.com" {
|
||||
# $SERVER["socket"] == ":8443" {
|
||||
# ssl.engine = "enable"
|
||||
# ssl.pemfile = "/etc/ssl/certs/combined.pem"
|
||||
# ssl.ca-file = "/etc/ssl/certs/fullchain.cer"
|
||||
# ssl.honor-cipher-order = "enable"
|
||||
# ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
|
||||
# ssl.use-sslv2 = "disable"
|
||||
# ssl.use-sslv3 = "disable"
|
||||
#
|
||||
# alias.url += (
|
||||
# "/data/" => "/run/dump1090-fa/",
|
||||
# "/" => "/usr/share/dump1090-fa/html/"
|
||||
# )
|
||||
# }
|
||||
#}
|
||||
#
|
||||
## Redirect HTTP to HTTPS
|
||||
#$HTTP["scheme"] == "http" {
|
||||
# $HTTP["host"] =~ ".*" {
|
||||
# url.redirect = (".*" => "https://%0$0")
|
||||
# }
|
||||
#}
|
||||
|
|
@ -23,8 +23,9 @@ DisplayUnits = "nautical";
|
|||
// degrees.
|
||||
|
||||
// Default center of the map.
|
||||
DefaultCenterLat = 45.0;
|
||||
DefaultCenterLon = 9.0;
|
||||
// 39.234 | -103.697 - Limon, CO
|
||||
DefaultCenterLat = 39.234;
|
||||
DefaultCenterLon = -103.697;
|
||||
// The google maps zoom level, 0 - 16, lower is further out
|
||||
DefaultZoomLvl = 7;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Placeholder for the JSON output data directory.
|
||||
|
|
@ -0,0 +1 @@
|
|||
This directory is for JSON from dump1090.
|
||||
|
|
@ -11,7 +11,8 @@ function createBaseLayers() {
|
|||
var europe = [];
|
||||
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM(),
|
||||
//source: new ol.source.OSM(),
|
||||
source: new ol.source.OSM({ url: "/maps/{z}/{x}/{y}.png" }),
|
||||
name: 'osm',
|
||||
title: 'OpenStreetMap',
|
||||
type: 'base',
|
||||
|
|
|
|||
|
|
@ -1907,7 +1907,7 @@ function isPointInsideExtent(x, y, extent) {
|
|||
function initializeUnitsSelector() {
|
||||
// Get display unit preferences from local storage
|
||||
if (!localStorage.getItem('displayUnits')) {
|
||||
localStorage['displayUnits'] = "nautical";
|
||||
localStorage['displayUnits'] = "imperial";
|
||||
}
|
||||
var displayUnits = localStorage['displayUnits'];
|
||||
DisplayUnits = displayUnits;
|
||||
|
|
|
|||
Loading…
Reference in New Issue