Commit fccc8af0 by Corey Koval

Code cleanup, added GPL Banner

parent 407266ab
// df-aggregator, networked radio direction finding software.
// Copyright (C) 2020 Corey Koval
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
var stationUrlHtml_new = document.createElement('input'); var stationUrlHtml_new = document.createElement('input');
stationUrlHtml_new.type = 'text'; stationUrlHtml_new.type = 'text';
stationUrlHtml_new.id = 'url-new'; stationUrlHtml_new.id = 'url-new';
......
// df-aggregator, networked radio direction finding software.
// Copyright (C) 2020 Corey Koval
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// ************************************************* // *************************************************
// * Gets AOI data from backend // * Gets AOI data from backend
// ************************************************* // *************************************************
......
// df-aggregator, networked radio direction finding software.
// Copyright (C) 2020 Corey Koval
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// Update Map every n milliseconds // Update Map every n milliseconds
var refreshrate = 5000; var refreshrate = 5000;
var autoRefresh = setInterval(function () { reloadRX(); }, refreshrate); var autoRefresh = setInterval(function () { reloadRX(); }, refreshrate);
......
<!DOCTYPE html> <!DOCTYPE html>
<!-- df-aggregator, networked radio direction finding software. =
Copyright (C) 2020 Corey Koval
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. -->
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
...@@ -20,14 +37,13 @@ ...@@ -20,14 +37,13 @@
</div> </div>
<script> <script>
var transmittersDataSource = new Cesium.CzmlDataSource; var transmittersDataSource = new Cesium.CzmlDataSource();
var receiversDataSource = new Cesium.CzmlDataSource; var receiversDataSource = new Cesium.CzmlDataSource();
var aoiDataSource = new Cesium.CzmlDataSource; var aoiDataSource = new Cesium.CzmlDataSource();
// Your access token can be found at: https://cesium.com/ion/tokens. // Your access token can be found at: https://cesium.com/ion/tokens.
Cesium.Ion.defaultAccessToken = '{{access_token}}'; Cesium.Ion.defaultAccessToken = '{{access_token}}';
var viewer = new Cesium.Viewer('cesiumContainer', { var viewer = new Cesium.Viewer('cesiumContainer', {
// terrainProvider: Cesium.createWorldTerrain(),
homeButton: false, homeButton: false,
timeline: false, timeline: false,
}); });
...@@ -35,8 +51,10 @@ ...@@ -35,8 +51,10 @@
clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER
}); });
viewer.clock.shouldAnimate = true; viewer.clock.shouldAnimate = true;
// var hpr = new Cesium.HeadingPitchRange(0.0, 1.57, 5000.0);
viewer.zoomTo(loadAllCzml()); var hpr = new Cesium.HeadingPitchRange(0.0, -1.57, 0.0);
// viewer.zoomTo(loadAllCzml(), hpr);
viewer.flyTo(loadAllCzml(), {'offset':hpr});
var scene = viewer.scene; var scene = viewer.scene;
if (!scene.pickPositionSupported) { if (!scene.pickPositionSupported) {
...@@ -210,31 +228,41 @@ ...@@ -210,31 +228,41 @@
function loadTxCzml() { function loadTxCzml() {
transmittersDataSource.load('/output.czml'); transmittersDataSource.load('/output.czml');
Cesium.when(transmittersDataSource, function(dataSource1){ viewer.dataSources.add(transmittersDataSource);
viewer.dataSources.add(dataSource1); return transmittersDataSource;
return dataSource1; // let promise1 = Cesium.CzmlDataSource.load('/output.czml');
}); // Cesium.when(promise1, function(dataSource1){
// viewer.dataSources.add(dataSource1);
// return dataSource1;
// });
} }
function loadRxCzml() { function loadRxCzml() {
receiversDataSource.load('/receivers.czml'); receiversDataSource.load('/receivers.czml');
viewer.dataSources.add(receiversDataSource); viewer.dataSources.add(receiversDataSource);
// console.log("Loaded CZML");
return receiversDataSource; return receiversDataSource;
// let promise1 = Cesium.CzmlDataSource.load('/receivers.czml');
// Cesium.when(promise1, function(dataSource1){
// viewer.dataSources.add(dataSource1);
// return dataSource1;
// });
} }
function loadAoiCzml() { function loadAoiCzml() {
aoiDataSource.load('/aoi.czml'); aoiDataSource.load('/aoi.czml');
viewer.dataSources.add(aoiDataSource); viewer.dataSources.add(aoiDataSource);
// console.log("Loaded CZML");
return aoiDataSource; return aoiDataSource;
// let promise1 = Cesium.CzmlDataSource.load('/aoi.czml');
// Cesium.when(promise1, function(dataSource1){
// viewer.dataSources.add(dataSource1);
// return dataSource1;
// });
} }
function loadAllCzml() { function loadAllCzml() {
let rx = loadRxCzml(); loadAoiCzml();
let aoi = loadAoiCzml(); loadTxCzml();
let tx = loadTxCzml(); return loadRxCzml();
return rx;
} }
function clearOld() { function clearOld() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment