Merge pull request #2 from jprochazka/master

Update from Original
pull/96/head
Marcus Günther 2016-02-11 18:00:26 +00:00
commit 38aff2ecff
7 zmienionych plików z 66 dodań i 40 usunięć

Wyświetl plik

@ -4,8 +4,14 @@ First off I would like to thank those who are actively contributing directly to
contributions in the form of code, issues, and suggestions have done much to greatly improve the
quality of this project.
**Collaborators**
* @mgunther68
**Contributors**
* @dschaper
* @leearmstrong
I would like to thank the developers and contributors to the following projects. Without their
hard work and dedication this project would not have been possible.

Wyświetl plik

@ -1,9 +1,11 @@
# The ADS-B Feeder Project :airplane:
This repository contains a set of bash scripts and files which can be used to setup an ADS-B
feeder on a clean installation of a Debian derived operating system. The scripts are executed
receiver on a clean installation of a Debian derived operating system. The scripts are executed
in order by the main install script depending on the installation options choosen by the user.
The project website is located at https://www.adsbreceiver.net.
### Obtaining And Using This Software
#### For new installations...

Wyświetl plik

@ -72,7 +72,6 @@ cpu_graph_dump1090() {
--title "$3 CPU Utilization" \
--vertical-label "CPU %" \
--lower-limit 0 \
--upper-limit 100 \
--rigid \
"DEF:demod=$2/dump1090_cpu-demod.rrd:value:AVERAGE" \
"CDEF:demodp=demod,10,/" \
@ -81,8 +80,8 @@ cpu_graph_dump1090() {
"DEF:background=$2/dump1090_cpu-background.rrd:value:AVERAGE" \
"CDEF:backgroundp=background,10,/" \
"AREA:readerp#008000:USB" \
"AREA:backgroundp#00C000:other:STACK" \
"AREA:demodp#00FF00:demodulator\c:STACK" \
"AREA:backgroundp#00C000:Other:STACK" \
"AREA:demodp#00FF00:Demodulator\c:STACK" \
"COMMENT: \n" \
--watermark "Drawn: $nowlit";
}
@ -118,9 +117,8 @@ cpu_graph() {
--height 200 \
--step "$5" \
--title "Overall CPU Utilization" \
--vertical-label "CPU / %" \
--vertical-label "CPU %" \
--lower-limit 0 \
--upper-limit 100 \
--rigid \
--units-exponent 0 \
"DEF:idle=$2/cpu-idle.rrd:value:AVERAGE" \
@ -141,7 +139,7 @@ cpu_graph() {
"CDEF:pwait=100,wait,*,all,/" \
"AREA:pinterrupt#000080:irq" \
"AREA:psoftirq#0000C0:softirq:STACK" \
"AREA:psteal#0000FF::STACK" \
"AREA:psteal#0000FF:steal:STACK" \
"AREA:pwait#C00000:io:STACK" \
"AREA:psystem#FF0000:sys:STACK" \
"AREA:puser#40FF40:user:STACK" \
@ -164,8 +162,8 @@ df_root_graph() {
"DEF:reserved=$2/df_complex-reserved.rrd:value:AVERAGE" \
"DEF:free=$2/df_complex-free.rrd:value:AVERAGE" \
"CDEF:totalused=used,reserved,+" \
"AREA:totalused#4169E1:used:STACK" \
"AREA:free#32C734:free\c:STACK" \
"AREA:totalused#4169E1:Used:STACK" \
"AREA:free#32C734:Free\c:STACK" \
"COMMENT: \n" \
--watermark "Drawn: $nowlit";
}
@ -205,7 +203,7 @@ disk_io_octets_graph() {
--height 200 \
--step "$5" \
--title "Disk I/O - Bandwidth" \
--vertical-label "Bytes/s" \
--vertical-label "Bytes/Sec" \
"TEXTALIGN:center" \
"DEF:read=$2/disk_octets.rrd:read:AVERAGE" \
"DEF:write=$2/disk_octets.rrd:write:AVERAGE" \
@ -232,7 +230,7 @@ eth0_graph() {
--height 200 \
--step "$5" \
--title "Bandwidth Usage (eth0)" \
--vertical-label "bytes/sec" \
--vertical-label "Bytes/Sec" \
"TEXTALIGN:center" \
"DEF:rx=$2/if_octets.rrd:rx:AVERAGE" \
"DEF:tx=$2/if_octets.rrd:tx:AVERAGE" \
@ -257,6 +255,7 @@ memory_graph() {
--width 496 \
--height 200 \
--step "$5" \
--lower-limit 0 \
--title "Memory Utilization" \
--vertical-label "" \
"TEXTALIGN:center" \
@ -264,10 +263,10 @@ memory_graph() {
"DEF:cached=$2/memory-cached.rrd:value:AVERAGE" \
"DEF:free=$2/memory-free.rrd:value:AVERAGE" \
"DEF:used=$2/memory-used.rrd:value:AVERAGE" \
"AREA:used#4169E1:used:STACK" \
"AREA:buffered#32C734:buffered:STACK" \
"AREA:cached#00FF00:cached:STACK" \
"AREA:free#FFFFFF:free\c:STACK" \
"AREA:used#4169E1:Used:STACK" \
"AREA:buffered#32C734:Buffered:STACK" \
"AREA:cached#00FF00:Cached:STACK" \
"AREA:free#FFFFFF:Free\c:STACK" \
"COMMENT: \n" \
--watermark "Drawn: $nowlit";
}
@ -324,7 +323,7 @@ wlan0_graph() {
--height 200 \
--step "$5" \
--title "Bandwidth Usage (wlan0)" \
--vertical-label "bytes/sec" \
--vertical-label "Bytes/Sec" \
"TEXTALIGN:center" \
"DEF:rx=$2/if_octets.rrd:rx:AVERAGE" \
"DEF:tx=$2/if_octets.rrd:tx:AVERAGE" \
@ -352,7 +351,7 @@ local_rate_graph() {
--height 200 \
--step "$5" \
--title "$3 Message Rate" \
--vertical-label "messages/second" \
--vertical-label "Messages/Second" \
--lower-limit 0 \
--units-exponent 0 \
--right-axis 360:0 \
@ -361,9 +360,9 @@ local_rate_graph() {
"DEF:positions=$2/dump1090_messages-positions.rrd:value:AVERAGE" \
"CDEF:y2strong=strong,10,*" \
"CDEF:y2positions=positions,10,*" \
"LINE1:messages#0000FF:messages received" \
"AREA:y2strong#FF0000:messages >-3dBFS / hr (RHS)" \
"LINE1:y2positions#00c0FF:positions / hr (RHS)\c" \
"LINE1:messages#0000FF:Messages Received" \
"AREA:y2strong#FF0000:Messages > -3dBFS / Hr (RHS)" \
"LINE1:y2positions#00c0FF:Positions / Hr (RHS)\c" \
"COMMENT: \n" \
--watermark "Drawn: $nowlit";
}
@ -520,8 +519,7 @@ range_graph_metric() {
"VDEF:peakrange=range,MAXIMUM" \
"GPRINT:avgrange:%1.1lf km" \
"LINE1:peakrange#FF0000:Peak Range\\:" \
"GPRINT:peakrange:%1.1lf km" \
"LINE1:463#000000:250 NM\c" \
"GPRINT:peakrange:%1.1lf km\c" \
"COMMENT: \n" \
--watermark "Drawn: $nowlit";
}
@ -621,4 +619,4 @@ step="$2"
nowlit=`date '+%m/%d/%y %H:%M %Z'`;
dump1090_receiver_graphs localhost localhost "ADS-B" "$period" "$step"
#hub_graphs localhost rpi "ADS-B" "$period" "$step"
#hub_graphs localhost rpi "ADS-B" "$period" "$step"

Wyświetl plik

@ -82,7 +82,8 @@
$common->updateSetting("enableDump1090", $enableDump1090);
$common->updateSetting("enableDump978", $enableDump978);
$common->updateSetting("enablePfclient", $enablePfclient);
$common->updateSetting("measurement", $_POST['measurement']);
$common->updateSetting("measurementRange", $_POST['measurementRange']);
$common->updateSetting("measurementTemperature", $_POST['measurementTemperature']);
$common->updateSetting("networkInterface", $_POST['networkInterface']);
// Set updated to TRUE since settings were updated.
@ -102,8 +103,9 @@
$enableDump978 = $common->getSetting("enableDump978");
$enablePfclient = $common->getSetting("enablePfclient");
// Get unit of measurement setting from settings.xml.
$measurement = $common->getSetting("measurement");
// Get units of measurement setting from settings.xml.
$measurementRange = $common->getSetting("measurementRange");
$measurementTemperature = $common->getSetting("measurementTemperature");
// Get the network interface from settings.xml.
$networkInterface = $common->getSetting("networkInterface");
@ -204,14 +206,27 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Unit of Measurement</div>
<div class="panel-heading">Unit of Measurement (Range)</div>
<div class="panel-body">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default<?php ($measurement == "imperial" ? print ' active' : ''); ?>">
<input type="radio" name="measurement" id="imperial" value="imperial" autocomplete="off"<?php ($measurement == "imperial" ? print ' checked' : ''); ?>> Imperial
<label class="btn btn-default<?php ($measurementRange == "imperial" ? print ' active' : ''); ?>">
<input type="radio" name="measurementRange" id="imperial" value="imperial" autocomplete="off"<?php ($measurementRange == "imperial" ? print ' checked' : ''); ?>> Imperial
</label>
<label class="btn btn-default<?php ($measurement == "metric" ? print ' active' : ''); ?>">
<input type="radio" name="measurement" id="metric" value="metric" autocomplete="off"<?php ($measurement == "metric" ? print ' checked' : ''); ?>> Metric
<label class="btn btn-default<?php ($measurementRange == "metric" ? print ' active' : ''); ?>">
<input type="radio" name="measurementRange" id="metric" value="metric" autocomplete="off"<?php ($measurementRange == "metric" ? print ' checked' : ''); ?>> Metric
</label>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Unit of Measurement (Temperature)</div>
<div class="panel-body">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default<?php ($measurementTemperature == "imperial" ? print ' active' : ''); ?>">
<input type="radio" name="measurementTemperature" id="imperial" value="imperial" autocomplete="off"<?php ($measurementTemperature == "imperial" ? print ' checked' : ''); ?>> Imperial
</label>
<label class="btn btn-default<?php ($measurementTemperature == "metric" ? print ' active' : ''); ?>">
<input type="radio" name="measurementTemperature" id="metric" value="metric" autocomplete="off"<?php ($measurementTemperature == "metric" ? print ' checked' : ''); ?>> Metric
</label>
</div>
</div>

Wyświetl plik

@ -37,7 +37,11 @@
<value>1</value>
</setting>
<setting>
<name>measurement</name>
<name>measurementRange</name>
<value>imperial</value>
</setting>
<setting>
<name>measurementTemperature</name>
<value>imperial</value>
</setting>
<setting>

Wyświetl plik

@ -51,7 +51,8 @@
$enablePfclient = $common->getSetting("enablePfclient");
// Measurement type to use.
$measurement = $common->getSetting("measurement");
$measurementRange = $common->getSetting("measurementRange");
$measurementTemperature = $common->getSetting("measurementTemperature");
// Get the network interface being used.
$networkInterface = $common->getSetting("networkInterface");

Wyświetl plik

@ -5,8 +5,8 @@
// ========================================================================== //
// Template Set: default //
// Template Name: graphs //
// Version: 1.0.1 //
// Release Date: 03-02-2016 //
// Version: 1.0.2 //
// Release Date: 07-02-2016 //
// Author: Joe Prochazka //
// Website: https://www.swiftbyte.com //
// Contributor: Marcus Gunther //
@ -167,7 +167,7 @@
/////////////////////////////////////////////////
// Content to be added to the scripts section.
function scriptContent() {
global $measurement, $networkInterface;
global $measurementRange, $measurementTemperature, $networkInterface;
?>
<script type="text/javascript">
//*** BEGIN USER DEFINED VARIABLES ***//
@ -210,7 +210,7 @@
$("#dump1090-aircraft_message_rate-image").attr("src", "graphs/dump1090-" + $hostName + "-aircraft_message_rate-" + $timeFrame + ".png?time=" + $timestamp);
$("#dump1090-aircraft-image").attr("src", "graphs/dump1090-" + $hostName + "-aircraft-" + $timeFrame + ".png?time=" + $timestamp);
$("#dump1090-tracks-image").attr("src", "graphs/dump1090-" + $hostName + "-tracks-" + $timeFrame + ".png?time=" + $timestamp);
<?php if ($measurement == "imperial") { ?>
<?php if ($measurementRange == "imperial") { ?>
$("#dump1090-range-image").attr("src", "graphs/dump1090-" + $hostName + "-range-imperial-" + $timeFrame + ".png?time=" + $timestamp);
<?php } else { ?>
$("#dump1090-range-image").attr("src", "graphs/dump1090-" + $hostName + "-range-metric-" + $timeFrame + ".png?time=" + $timestamp);
@ -224,7 +224,7 @@
$("#system-wlan0_bandwidth-image").attr("src", "graphs/system-" + $hostName + "-wlan0_bandwidth-" + $timeFrame + ".png?time=" + $timestamp);
<?php } ?>
$("#system-memory-image").attr("src", "graphs/system-" + $hostName + "-memory-" + $timeFrame + ".png?time=" + $timestamp);
<?php if ($measurement == "imperial") { ?>
<?php if ($measurementTemperature == "imperial") { ?>
$("#system-temperature-image").attr("src", "graphs/system-" + $hostName + "-temperature-imperial-" + $timeFrame + ".png?time=" + $timestamp);
<?php } else { ?>
$("#system-temperature-image").attr("src", "graphs/system-" + $hostName + "-temperature-metric-" + $timeFrame + ".png?time=" + $timestamp);
@ -239,7 +239,7 @@
$("#dump1090-aircraft_message_rate-link").attr("href", "graphs/dump1090-" + $hostName + "-aircraft_message_rate-" + $timeFrame + ".png");
$("#dump1090-aircraft-link").attr("href", "graphs/dump1090-" + $hostName + "-aircraft-" + $timeFrame + ".png");
$("#dump1090-tracks-link").attr("href", "graphs/dump1090-" + $hostName + "-tracks-" + $timeFrame + ".png");
<?php if ($measurement == "imperial") { ?>
<?php if ($measurementRange == "imperial") { ?>
$("#dump1090-range-link").attr("href", "graphs/dump1090-" + $hostName + "-range-imperial-" + $timeFrame + ".png");
<?php } else { ?>
$("#dump1090-range-link").attr("href", "graphs/dump1090-" + $hostName + "-range-metric-" + $timeFrame + ".png");
@ -253,7 +253,7 @@
$("#system-wlan0_bandwidth-link").attr("href", "graphs/system-" + $hostName + "-wlan0_bandwidth-" + $timeFrame + ".png");
<?php } ?>
$("#system-memory-link").attr("href", "graphs/system-" + $hostName + "-memory-" + $timeFrame + ".png");
<?php if ($measurement == "imperial") { ?>
<?php if ($measurementTemperature == "imperial") { ?>
$("#system-temperature-link").attr("href", "graphs/system-" + $hostName + "-temperature-imperial-" + $timeFrame + ".png");
<?php } else { ?>
$("#system-temperature-link").attr("href", "graphs/system-" + $hostName + "-temperature-metric-" + $timeFrame + ".png");