Revert "sdrweb: use dump1090 json dumps for adsb.html"
This reverts commit b154e00172
.
This commit is contained in:
parent
299895e21c
commit
318047a89f
|
@ -51,7 +51,7 @@
|
|||
var maxalt = 40000; /* Max altitude in the average case */
|
||||
var selected = (Selected == plane.hex);
|
||||
|
||||
b = 0.5 + (0.5 * plane.alt_baro / maxalt);
|
||||
b = 0.5 + (0.5*plane.altitude/maxalt);
|
||||
|
||||
/* As Icon we use the plane emoji, this is a simple solution but
|
||||
is definitely a compromise: we expect the icon to be rotated
|
||||
|
@ -115,10 +115,10 @@
|
|||
}
|
||||
|
||||
function fetchData() {
|
||||
$.getJSON('/aircraft.json', function(data) {
|
||||
$.getJSON('/data.json', function(data) {
|
||||
var stillhere = {}
|
||||
for (var j=0; j < data.aircraft.length; j++) {
|
||||
var plane = data.aircraft[j];
|
||||
for (var j=0; j < data.length; j++) {
|
||||
var plane = data[j];
|
||||
var marker = null;
|
||||
stillhere[plane.hex] = true;
|
||||
plane.flight = $.trim(plane.flight);
|
||||
|
@ -157,7 +157,7 @@
|
|||
Planes[plane.hex] = plane;
|
||||
}
|
||||
}
|
||||
NumPlanes = data.aircraft.length;
|
||||
NumPlanes = data.length;
|
||||
|
||||
/* Remove idle planes. */
|
||||
for (var p in Planes) {
|
||||
|
@ -171,7 +171,7 @@
|
|||
refreshGeneralInfo();
|
||||
|
||||
}).always(function() {
|
||||
setTimeout(fetchData, 1000);
|
||||
setTimeout(fetchData, 500);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
index index.html;
|
||||
charset utf-8;
|
||||
'';
|
||||
locations."/aircraft.json" = {
|
||||
proxyPass = "http://radiobert.serv.zentralwerk.org/aircraft.json";
|
||||
locations."/data.json" = {
|
||||
proxyPass = "http://${config.c3d2.hosts.radiobert.ip4}:8080/data.json";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
lat = "51.081";
|
||||
|
@ -140,19 +140,6 @@ in {
|
|||
Exec "${config.services.collectd.user}" "${pkgs.heliwatch.collectd-stats}/bin/collectd-stats"
|
||||
'';
|
||||
|
||||
# serve dump1090 json data via http
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."radiobert.serv.zentralwerk.org" = {
|
||||
default = true;
|
||||
root = statsDir;
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
systemd.services.nginx.serviceConfig.PrivateTmp = lib.mkForce false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
readsb
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue