kopia lustrzana https://github.com/glidernet/ogn-live
Merge branch 'master' into aero_whitespace
commit
b866ec6d9f
|
@ -0,0 +1,186 @@
|
|||
/*
|
||||
____ _____ _ _ _ _ _ _ _
|
||||
/ __ \ / ____| (_) | | | \ | | | | | |
|
||||
| | | |_ __ ___ _ __ | | __| |_ __| | ___ _ __ | \| | ___| |___ _____ _ __| | __
|
||||
| | | | '_ \ / _ \ '_ \ | | |_ | | |/ _` |/ _ \ '__| | . ` |/ _ \ __\ \ /\ / / _ \| '__| |/ /
|
||||
| |__| | |_) | __/ | | | | |__| | | | (_| | __/ | | |\ | __/ |_ \ V V / (_) | | | <
|
||||
\____/| .__/ \___|_| |_| \_____|_|_|\__,_|\___|_| |_| \_|\___|\__| \_/\_/ \___/|_| |_|\_\
|
||||
| |
|
||||
|_|
|
||||
*/
|
||||
// barogram option
|
||||
var baroCanvas;
|
||||
var baroScale;
|
||||
var baroMarker;
|
||||
var baroCtx;
|
||||
var baroScaleCtx;
|
||||
var baroMarkCtx;
|
||||
var X_max;
|
||||
var X_min;
|
||||
var Y_max;
|
||||
var Y_min;
|
||||
var xScale;
|
||||
var yScale;
|
||||
var xWidth;
|
||||
var yHeight;
|
||||
var xAxis = []; // optional scale labels
|
||||
var yAxis = []; // optional scale labels
|
||||
var margin = 10; // all around line graph
|
||||
var X_legend = 0;
|
||||
var Y_legend = 0;
|
||||
var maxAlt = 5000;
|
||||
var X_lines = 5+1;
|
||||
var Y_lines = 5+1;
|
||||
var currentUnit = "";
|
||||
var scaleFlag = 0;
|
||||
var X_offset = 0;
|
||||
var Y_offset = margin+X_legend;
|
||||
|
||||
// show altitude scale on the graph
|
||||
function plotScale() {
|
||||
// var TxtWidth = baroCtx.measureText(xAxis[0]).width;
|
||||
// var TxtHeight = baroCtx.measureText(xAxis[0]).height;
|
||||
var TxtHeight = 10;
|
||||
baroScaleCtx.strokeStyle="#c0c0c0"; // color of axis text
|
||||
baroScaleCtx.beginPath();
|
||||
// print parameters on X axis
|
||||
if (xAxis.length == X_lines) {
|
||||
for (i=0;i<X_lines;i++) {
|
||||
var x = i * xWidth / (X_lines-1);
|
||||
// baroScaleCtx.fillText(xAxis[i], x+margin-TxtWidth/2, margin+TxtHeight);
|
||||
baroScaleCtx.fillText(xAxis[i], x+margin, margin);
|
||||
}
|
||||
}
|
||||
// print parameters on Y axis
|
||||
var yStep = yHeight / (Y_lines-1);
|
||||
var yScaleStep = (Y_max - Y_min) / (Y_lines-1);
|
||||
for (i=0;i<Y_lines;i++) {
|
||||
baroScaleCtx.fillText(Math.round(Y_max - (i * yScaleStep)), margin, (i * yStep) + margin+X_legend+TxtHeight/2);
|
||||
}
|
||||
baroScaleCtx.stroke();
|
||||
}
|
||||
|
||||
// show grid lines on the graph
|
||||
function plotGrid() {
|
||||
baroCtx.strokeStyle="#808080"; // color of grid lines
|
||||
baroCtx.beginPath();
|
||||
for (i=0;i<=X_lines;i++) {
|
||||
var x = i * xWidth / (X_lines-1);
|
||||
baroCtx.moveTo(x, margin+X_legend);
|
||||
baroCtx.lineTo(x, yHeight+margin+X_legend);
|
||||
}
|
||||
for (i=0;i<=Y_lines;i++) {
|
||||
var y = i * yHeight / (Y_lines-1) + margin+X_legend;
|
||||
baroCtx.moveTo(0, y)
|
||||
baroCtx.lineTo(xWidth,y)
|
||||
}
|
||||
baroCtx.stroke();
|
||||
|
||||
// //avoid redrawing the grid every time - set the dynamic image as the background
|
||||
// var imageDataURL = baroCanvas.toDataURL();
|
||||
// baroCanvas.style.background = imageDataURL; // no work
|
||||
// $("#div_baro").css("background-image","url(imageDataURL)"); // no work either
|
||||
}
|
||||
|
||||
function baro_Init() {
|
||||
X_max = "12:00:00".toSeconds();
|
||||
X_min = "11:00:00".toSeconds();
|
||||
Y_max = maxAlt;
|
||||
Y_min = 0;
|
||||
|
||||
baroCanvas = document.getElementById("div_baro");
|
||||
baroCtx = baroCanvas.getContext("2d");
|
||||
baroCtx.fillStyle = "#808080"; // color of text
|
||||
baroCtx.font = "12px Arial";
|
||||
|
||||
baroScale = document.getElementById("div_baroScale");
|
||||
baroScaleCtx = baroScale.getContext("2d");
|
||||
baroScaleCtx.fillStyle = "#808080"; // color of text
|
||||
baroScaleCtx.font = "12px Arial";
|
||||
|
||||
baroMarker = document.getElementById("div_baroMark");
|
||||
baroMarkCtx = baroMarker.getContext("2d");
|
||||
baroMarkCtx.fillStyle = "#808080"; // color of text
|
||||
baroMarkCtx.font = "12px Arial";
|
||||
|
||||
xWidth = baroCanvas.width;
|
||||
yHeight = baroCanvas.height - X_legend - 2*margin;
|
||||
|
||||
yScale = (yHeight) / (Y_max - Y_min);
|
||||
xScale = (xWidth) / (X_max - X_min);
|
||||
|
||||
plotScale();
|
||||
plotGrid();
|
||||
|
||||
// create a clipping region - simpler than checking X_min
|
||||
// baroCtx.beginPath();
|
||||
// baroCtx.rect(0, margin+X_legend, 0+xWidth, margin+X_legend+yHeight);
|
||||
// baroCtx.clip();
|
||||
}
|
||||
String.prototype.toSeconds = function () { if (!this) return null; var hms = this.split(':'); return (+hms[0]) * 60 * 60 + (+hms[1]) * 60 + (+hms[2] || 0); }
|
||||
|
||||
// plot a line with color and [x,y] array - rely on clipping region
|
||||
function baro_plotData(dCn,dColor,dataSet) {
|
||||
if (dataSet.length > 1) {
|
||||
// plot the altitude data
|
||||
baroCtx.strokeStyle=dColor; // color of line
|
||||
baroCtx.beginPath();
|
||||
baroCtx.moveTo((dataSet[0][0]-X_min) * xScale + X_offset, yHeight-(dataSet[0][1] * yScale) + Y_offset);
|
||||
for (i=1 ;i<dataSet.length;i++) {
|
||||
baroCtx.lineTo((dataSet[i][0]-X_min) * xScale + X_offset, yHeight -(dataSet[i][1] * yScale) + Y_offset);
|
||||
}
|
||||
baroCtx.stroke();
|
||||
|
||||
// plot the markers
|
||||
baroMarkCtx.fillStyle = dColor; // color of text
|
||||
baroMarkCtx.beginPath();
|
||||
baroMarkCtx.fillText(dCn, 0, yHeight -(dataSet[dataSet.length-1][1] * yScale) + Y_offset);
|
||||
baroMarkCtx.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
function baro_plotRefresh() {
|
||||
xWidth = baroCanvas.width;
|
||||
yHeight = baroCanvas.height - X_legend - 2*margin;
|
||||
// update the time scale
|
||||
X_min = X_max - (pathl>60 ? 900 : pathl*10); // 5, 10 else 15 minutes
|
||||
xScale = (xWidth) / (X_max - X_min);
|
||||
// update the altitude scale
|
||||
var maxRange = maxAlt * m2ft[unit];
|
||||
// auto adjust the range
|
||||
// (unit == "i") ? maxRange = Math.ceil((maxRange+250)/2000)*2000 : maxRange = Math.ceil((maxRange+100)/1000)*1000; // 2000 ft or 1000 m increments
|
||||
(unit == "i") ? maxRange = Math.ceil((maxRange+500)/1000)*1000 : maxRange = Math.ceil((maxRange+250)/500)*500; // 1000 ft or 500 m increments
|
||||
if ((maxRange != Y_max) || (unit != currentUnit)) {
|
||||
currentUnit = unit;
|
||||
Y_max = maxRange;
|
||||
yScale = (yHeight) / (Y_max - Y_min) * m2ft[unit]; // adjust scale with unit here to avoid and extra multiply every y point
|
||||
// auto adjust the grid spacing
|
||||
// (unit == "i") ? Y_lines = (Y_max / 1000) + 1 : Y_lines = (Y_max / 500) + 1; // 1000 ft or 500 m grid steps
|
||||
(unit == "i") ? Y_lines = (Y_max / 1000) + 1 : Y_lines = (Y_max / 250) + 1; // 1000 ft or 250 m grid steps
|
||||
baroScaleCtx.clearRect(0, 0, baroScale.width, baroScale.height);
|
||||
plotScale();
|
||||
}
|
||||
// erase the plot (and grid)
|
||||
// baroCtx.clearRect(0, margin+X_legend, margin+X_legend+xWidth, margin+X_legend+yHeight);
|
||||
baroCtx.clearRect(0, 0, baroCanvas.width, baroCanvas.height);
|
||||
plotGrid(); // re-plot the grid
|
||||
// erase the markers
|
||||
baroMarkCtx.clearRect(0, 0, baroMarker.width, baroMarker.height);
|
||||
// reset the flag
|
||||
scaleFlag = 0;
|
||||
}
|
||||
|
||||
// set the time and altitude scales on the barogram
|
||||
function Set_XY_Scale(tim,alt) {
|
||||
if (scaleFlag++ == 0) { // use first item as a reference
|
||||
X_max = tim.toSeconds();
|
||||
maxAlt = +alt; // '+' used for conversion from string to integer
|
||||
} else {
|
||||
if (X_max < tim.toSeconds()) {
|
||||
X_max = tim.toSeconds();
|
||||
}
|
||||
if (maxAlt < +alt) {
|
||||
maxAlt = +alt;
|
||||
}
|
||||
}
|
||||
}
|
27
cunimb.css
27
cunimb.css
|
@ -61,6 +61,18 @@ html, body {
|
|||
left: 180px;
|
||||
}
|
||||
|
||||
.baroright {
|
||||
border-radius: 10px 0 0 10px;
|
||||
top: 45px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
.baroleft {
|
||||
border-radius: 0 10px 10px 0;
|
||||
top: 45px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.pr {
|
||||
float:right;
|
||||
}
|
||||
|
@ -145,6 +157,21 @@ div.divInfoclass {
|
|||
z-index:20;
|
||||
}
|
||||
|
||||
#dbaro {
|
||||
position:absolute;
|
||||
background-color: white;
|
||||
color: black;
|
||||
border-color: black;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
height: 605px;
|
||||
/* height: 90%; */
|
||||
width: 155px;
|
||||
overflow: hidden;
|
||||
cursor: default;
|
||||
z-index:18;
|
||||
}
|
||||
|
||||
#ett1 {
|
||||
height:25px;
|
||||
background-color:cyan;
|
||||
|
|
266
cunimb.js
266
cunimb.js
|
@ -12,7 +12,8 @@ var map;
|
|||
var autoc = "";
|
||||
var acaff = "";
|
||||
var cton = false;
|
||||
var tcolor = ["000000", "FF0000", "00FF00", "0000FF", "FFFF00", "00FFFF", "FF00FF", "C0C0C0", "FFFFFF"];
|
||||
//var tcolor = ["000000", "FF0000", "00FF00", "0000FF", "FFFF00", "00FFFF", "FF00FF", "C0C0C0", "FFFFFF"];
|
||||
var tcolor = ["000000","FF0000","00B000","0000FF","808000","008080","FF00FF","606060","505028","500000","800080","FF8040","80B000","4040FF","804000","000080"];
|
||||
var ccolor = 0;
|
||||
var aflist = true;
|
||||
var vallpolon = true;
|
||||
|
@ -25,6 +26,8 @@ var online = []; // ([cn,alt*1,cn+"_"+ps,colcn,afdif]);
|
|||
var offline = []; // ([cn,alt*1,cn+"_"+ps,colcn,afdif]);
|
||||
var receivers = [];
|
||||
var all = 0;
|
||||
var stick = 0;
|
||||
var barogram = 0;
|
||||
var pathl = 30; // path length 5' (30points)
|
||||
var unit = "m"; // metric units
|
||||
var onoff = 1; // 1: online, 2: offline, 3: Menu
|
||||
|
@ -61,8 +64,8 @@ var m2kt={"m":1, "i":1.94384};
|
|||
var am2kt={"m":"m/s", "i":"kt"};
|
||||
|
||||
|
||||
var hashc="",hashz="",hashm="",hasho="",hashb="",hashs="",hashl="",hasht="",hl=" ",hashw="",hashu="",hashp="",hashn="",hashy="";
|
||||
// center zoom maptype offline bound autoset2ma layers tasks warning units pathlength nolist devtype
|
||||
var hashc="",hashz="",hashm="",hasho="",hashb="",hashs="",hashl="",hasht="",hl=" ",hashw="",hashu="",hashp="",hashn="",hashy="",hasha="", hashg="";
|
||||
// center zoom maptype offline bound autoset2ma layers tasks warning units pathlength nolist devtype altitudestick barogram
|
||||
|
||||
|
||||
// close popup
|
||||
|
@ -92,8 +95,32 @@ function chunit() { // change units
|
|||
rehash();
|
||||
}
|
||||
|
||||
function chstick() { // change altitude stick
|
||||
if (document.getElementById('stick').checked === true) { // stick visible
|
||||
stick = 1;
|
||||
hasha = "&a=1";
|
||||
} else { // no altitude stick
|
||||
stick = 0;
|
||||
hasha = "";
|
||||
}
|
||||
rehash();
|
||||
}
|
||||
|
||||
function chbaro() { // change barogram
|
||||
if (document.getElementById('baro').checked === true) { // barogram visible
|
||||
document.getElementById('dbaro').style.display = "block";
|
||||
barogram = 1;
|
||||
hashg = "&g=1";
|
||||
} else { // no barogram
|
||||
document.getElementById('dbaro').style.display = "none";
|
||||
barogram = 0;
|
||||
hashg = "";
|
||||
}
|
||||
rehash();
|
||||
}
|
||||
|
||||
function chpl() { // change path length
|
||||
var prevPathl = pathl;
|
||||
if (document.getElementById('rp1').checked === true) { // 5 minutes
|
||||
pathl = 30;
|
||||
hashp = "";
|
||||
|
@ -104,8 +131,15 @@ function chpl() { // change path length
|
|||
pathl = 99999;
|
||||
hashp = "&p=3";
|
||||
}
|
||||
delpon();
|
||||
delpoff();
|
||||
//delpon();
|
||||
//delpoff();
|
||||
// only delete paths if new path is smaller
|
||||
if (pathl < prevPathl) {
|
||||
delpon();
|
||||
delpoff();
|
||||
}
|
||||
baro_reSize();
|
||||
|
||||
rehash();
|
||||
}
|
||||
|
||||
|
@ -165,6 +199,8 @@ function delpon() { // delete all online path
|
|||
while (online[++j]) {
|
||||
window["P_" + online[j][2]].getPath().clear();
|
||||
window["M_" + online[j][2]].set('tra', 0);
|
||||
window["S_" + online[j][2]].getPath().clear();
|
||||
window["B_" + online[j][2]] =[];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,13 +209,15 @@ function delpoff() { // delete all offline path
|
|||
while (offline[++j]) {
|
||||
window["P_" + offline[j][2]].getPath().clear();
|
||||
window["M_" + offline[j][2]].set('tra', 0);
|
||||
window["S_" + offline[j][2]].getPath().clear();
|
||||
window["B_" + offline[j][2]] =[];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function deletepath(pol) {
|
||||
window[pol].getPath().clear();
|
||||
window["M_" + pol.substring(2)].set('tra', 0);
|
||||
window["B_" + pol.substring(2)] =[];
|
||||
}
|
||||
|
||||
function deleteallpath() {
|
||||
|
@ -222,6 +260,9 @@ function allmarker() {
|
|||
window["M_" + online[j][2]].setOptions({
|
||||
visible: vallmaron
|
||||
});
|
||||
window["S_" + online[j][2]].setOptions({
|
||||
visible: vallmaron
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (vallmaroff === true) vallmaroff = false;
|
||||
|
@ -230,6 +271,9 @@ function allmarker() {
|
|||
window["M_" + offline[j][2]].setOptions({
|
||||
visible: vallmaroff
|
||||
});
|
||||
window["S_" + offline[j][2]].setOptions({
|
||||
visible: vallmaroff
|
||||
});
|
||||
}
|
||||
}
|
||||
afftab();
|
||||
|
@ -374,8 +418,11 @@ function reseton() { // delete all online markers and their path
|
|||
while (online[++j]) {
|
||||
window["M_" + online[j][2]].setMap(null);
|
||||
delete window["M_" + online[j][2]];
|
||||
window["S_" + online[j][2]].setMap(null);
|
||||
delete window["S_" + online[j][2]];
|
||||
window["P_" + online[j][2]].setMap(null);
|
||||
delete window["P_" + online[j][2]];
|
||||
delete window["B_" + online[j][2]];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,8 +431,11 @@ function resetoff() { // delete all offline markers and their path
|
|||
while (offline[++j]) {
|
||||
window["M_" + offline[j][2]].setMap(null);
|
||||
delete window["M_" + offline[j][2]];
|
||||
window["S_" + offline[j][2]].setMap(null);
|
||||
delete window["S_" + offline[j][2]];
|
||||
window["P_" + offline[j][2]].setMap(null);
|
||||
delete window["P_" + offline[j][2]];
|
||||
delete window["B_" + offline[j][2]];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -458,7 +508,15 @@ function afftab() {
|
|||
while (online[++j]) {
|
||||
mar = "M_" + online[j][2];
|
||||
pol = "P_" + online[j][2];
|
||||
dlistd += "<TR id=\"" + pol + "\" onmouseover=\"focuson('" + pol + "');\" onmouseout=\"focusoff('" + pol + "');\"><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + mar + "');\" type=\"checkbox\" " + isvisib(mar) + " ></TD><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + pol + "');\" type=\"checkbox\" " + isvisib(pol) + " ></TD><TD class=\"cgn\" onmousedown=\"centeron('" + mar + "');\" onmouseup=\"centeroff();\" oncontextmenu=\"event.stopPropagation(); redraw('" + pol + "'); return false;\" ondblclick=\"event.stopPropagation(); autocenter('" + mar + "');\" >" + online[j][0] + "</TD><TD class=\"cgc\"><span style='background-color: " + online[j][3] + "' ondblclick=\"deletepath('" + pol + "'); return false;\" oncontextmenu=\"this.style.backgroundColor=changecolor('" + mar + "'); return false;\"> </span></TD><TD onclick=\"affinfo('" + mar + "')\" class=\"cga\">";
|
||||
stk = "S_" + online[j][2];
|
||||
// dlistd += "<TR id=\"" + pol + "\" onmouseover=\"focuson('" + pol + "');\" onmouseout=\"focusoff('" + pol + "');\"><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + mar + "');vpolmar(this.checked ,'" + stk + "');\" type=\"checkbox\" " + isvisib(mar) + " ></TD><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + pol + "');\" type=\"checkbox\" " + isvisib(pol) + " ></TD><TD class=\"cgn\" onmousedown=\"centeron('" + mar + "');\" onmouseup=\"centeroff();\" oncontextmenu=\"event.stopPropagation(); redraw('" + pol + "'); return false;\" ondblclick=\"event.stopPropagation(); autocenter('" + mar + "');\" >" + online[j][0] + "</TD><TD class=\"cgc\"><span style='background-color: " + online[j][3] + "' ondblclick=\"deletepath('" + pol + "'); return false;\" oncontextmenu=\"this.style.backgroundColor=changecolor('" + mar + "'); return false;\"> </span></TD><TD onclick=\"affinfo('" + mar + "')\" class=\"cga\">";
|
||||
// dlistd += "<TR id=\"" + pol + "\" onmouseover=\"focuson('" + pol + "');\" onmouseout=\"focusoff('" + pol + "');\"><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + mar + "');\" type=\"checkbox\" " + isvisib(mar) + " ></TD><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + pol + "');\" type=\"checkbox\" " + isvisib(pol) + " ></TD><TD class=\"cgn\" onmousedown=\"centeron('" + mar + "');\" onmouseup=\"centeroff();\" oncontextmenu=\"event.stopPropagation(); redraw('" + pol + "'); return false;\" ondblclick=\"event.stopPropagation(); autocenter('" + mar + "');\" >" + online[j][0] + "</TD><TD class=\"cgc\"><span style='background-color: " + online[j][3] + "' ondblclick=\"deletepath('" + pol + "'); return false;\" oncontextmenu=\"this.style.backgroundColor=changecolor('" + mar + "'); return false;\"> </span></TD><TD onclick=\"affinfo('" + mar + "')\" class=\"cga\">";
|
||||
dlistd += "<TR id=\"" + pol + "\" onmouseover=\"focuson('" + pol + "');\" onmouseout=\"focusoff('" + pol + "');\">" +
|
||||
"<TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + mar + "');vpolmar(this.checked ,'" + stk + "');\" type=\"checkbox\" " + isvisib(mar) + " ></TD>" +
|
||||
"<TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + pol + "');\" type=\"checkbox\" " + isvisib(pol) + " ></TD>" +
|
||||
"<TD class=\"cgn\" onmousedown=\"centeron('" + mar + "');\" onmouseup=\"centeroff();\" oncontextmenu=\"event.stopPropagation(); redraw('" + pol + "'); return false;\" ondblclick=\"event.stopPropagation(); autocenter('" + mar + "');\" >" + online[j][0] + "</TD>" +
|
||||
"<TD class=\"cgc\"><span style='background-color: " + online[j][3] + "' ondblclick=\"deletepath('" + pol + "'); return false;\" oncontextmenu=\"this.style.backgroundColor=changecolor('" + mar + "'); return false;\"> </span></TD>" +
|
||||
"<TD onclick=\"affinfo('" + mar + "')\" class=\"cga\">";
|
||||
if (unit == "i") {
|
||||
dlistd += (online[j][1] * m2ft[unit]).toFixed();
|
||||
} // { var tv=online[j][1]*m2ft[unit]; dlistd+= tv.toFixed(); }
|
||||
|
@ -473,7 +531,9 @@ function afftab() {
|
|||
while (offline[++j]) {
|
||||
mar = "M_" + offline[j][2];
|
||||
pol = "P_" + offline[j][2];
|
||||
dlistd += "<TR id=\"" + pol + "\" onmouseover=\"focuson('" + pol + "');\" onmouseout=\"focusoff('" + pol + "');\"><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + mar + "');\" type=\"checkbox\" " + isvisib(mar) + " ></TD><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + pol + "');\" type=\"checkbox\" " + isvisib(pol) + " ></TD><TD class=\"cgn\" onmousedown=\"centeron('" + mar + "');\" onmouseup=\"centeroff();\" oncontextmenu=\"event.stopPropagation(); redraw('" + pol + "'); return false;\" ondblclick=\"event.stopPropagation(); autocenter('" + mar + "');\" >" + offline[j][0] + "</TD><TD class=\"cgc\"><span style='background-color: " + offline[j][3] + "' ondblclick=\"deletepath('" + pol + "'); return false;\" oncontextmenu=\"this.style.backgroundColor=changecolor('" + mar + "'); return false;\"> </span></TD><TD onclick=\"affinfo('" + mar + "')\" class=\"cga\">";
|
||||
stk = "S_" + offline[j][2];
|
||||
dlistd += "<TR id=\"" + pol + "\" onmouseover=\"focuson('" + pol + "');\" onmouseout=\"focusoff('" + pol + "');\"><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + mar + "');vpolmar(this.checked ,'" + stk + "');\" type=\"checkbox\" " + isvisib(mar) + " ></TD><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + pol + "');\" type=\"checkbox\" " + isvisib(pol) + " ></TD><TD class=\"cgn\" onmousedown=\"centeron('" + mar + "');\" onmouseup=\"centeroff();\" oncontextmenu=\"event.stopPropagation(); redraw('" + pol + "'); return false;\" ondblclick=\"event.stopPropagation(); autocenter('" + mar + "');\" >" + offline[j][0] + "</TD><TD class=\"cgc\"><span style='background-color: " + offline[j][3] + "' ondblclick=\"deletepath('" + pol + "'); return false;\" oncontextmenu=\"this.style.backgroundColor=changecolor('" + mar + "'); return false;\"> </span></TD><TD onclick=\"affinfo('" + mar + "')\" class=\"cga\">";
|
||||
// dlistd += "<TR id=\"" + pol + "\" onmouseover=\"focuson('" + pol + "');\" onmouseout=\"focusoff('" + pol + "');\"><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + mar + "');\" type=\"checkbox\" " + isvisib(mar) + " ></TD><TD class=\"cgv\"><input onchange=\"vpolmar(this.checked ,'" + pol + "');\" type=\"checkbox\" " + isvisib(pol) + " ></TD><TD class=\"cgn\" onmousedown=\"centeron('" + mar + "');\" onmouseup=\"centeroff();\" oncontextmenu=\"event.stopPropagation(); redraw('" + pol + "'); return false;\" ondblclick=\"event.stopPropagation(); autocenter('" + mar + "');\" >" + offline[j][0] + "</TD><TD class=\"cgc\"><span style='background-color: " + offline[j][3] + "' ondblclick=\"deletepath('" + pol + "'); return false;\" oncontextmenu=\"this.style.backgroundColor=changecolor('" + mar + "'); return false;\"> </span></TD><TD onclick=\"affinfo('" + mar + "')\" class=\"cga\">";
|
||||
if (unit == "i") {
|
||||
dlistd += (offline[j][1] * m2ft[unit]).toFixed();
|
||||
} else dlistd += offline[j][1] + "m";
|
||||
|
@ -510,6 +570,7 @@ function alist() {
|
|||
if (lside == 1) document.getElementById('ac').style.left = "0px";
|
||||
else document.getElementById('ac').style.right = "0px";
|
||||
centeroff();
|
||||
document.getElementById('dbaro').style.display = "none";
|
||||
aflist = false;
|
||||
hashn = "&n=0";
|
||||
} else {
|
||||
|
@ -518,6 +579,7 @@ function alist() {
|
|||
document.getElementById('dlist').style.height = "90%";
|
||||
if (lside == 1) document.getElementById('ac').style.left = "180px";
|
||||
else document.getElementById('ac').style.right = "180px";
|
||||
document.getElementById('dbaro').style.display = "block";
|
||||
aflist = true;
|
||||
afftab();
|
||||
hashn = "";
|
||||
|
@ -528,10 +590,11 @@ function alist() {
|
|||
function sideclick() { // change list position (left<->right)
|
||||
if (lside === 0) {
|
||||
document.getElementById('dlist').className = "lleft";
|
||||
document.getElementById('dbaro').className = "baroright";
|
||||
document.getElementById('ac').className = "acleft";
|
||||
document.getElementById('ac').style.right = "";
|
||||
lside = 1;
|
||||
map.setOptions({
|
||||
/* map.setOptions({
|
||||
mapTypeControlOptions: {
|
||||
position: google.maps.ControlPosition.TOP_RIGHT
|
||||
},
|
||||
|
@ -541,13 +604,14 @@ function sideclick() { // change list position (left<->right)
|
|||
zoomControlOptions: {
|
||||
position: google.maps.ControlPosition.RIGHT_TOP
|
||||
}
|
||||
});
|
||||
}); */
|
||||
} else {
|
||||
document.getElementById('dlist').className = "lright";
|
||||
document.getElementById('dbaro').className = "baroleft";
|
||||
document.getElementById('ac').className = "acright";
|
||||
document.getElementById('ac').style.left = "";
|
||||
lside = 0;
|
||||
map.setOptions({
|
||||
/* map.setOptions({
|
||||
mapTypeControlOptions: {
|
||||
position: google.maps.ControlPosition.TOP_LEFT
|
||||
},
|
||||
|
@ -557,7 +621,7 @@ function sideclick() { // change list position (left<->right)
|
|||
zoomControlOptions: {
|
||||
position: google.maps.ControlPosition.LEFT_TOP
|
||||
}
|
||||
});
|
||||
}); */
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -609,7 +673,8 @@ function dec2dms(dec) {
|
|||
|
||||
function changecolor(mark) {
|
||||
var colactive = window[mark].get('icol');
|
||||
if (++colactive == 9) colactive = 0;
|
||||
// if (++colactive == 9) colactive = 0;
|
||||
if (++colactive == tcolor.length) colactive = 0;
|
||||
var ncol = tcolor[colactive];
|
||||
window[window[mark].get('poly')].setOptions({
|
||||
strokeColor: '#' + ncol
|
||||
|
@ -865,6 +930,40 @@ function dist(lat1, lon1, lat2, lon2) {
|
|||
return dt;
|
||||
}
|
||||
|
||||
function baro_reSize() {
|
||||
switch(pathl) {
|
||||
case 30:
|
||||
document.getElementById('dbaro').style.width = "155px"; // 70+85
|
||||
// weird behaviour for canvas sizing versus scaling
|
||||
document.getElementById('div_baro').style.width = "70px";
|
||||
document.getElementById('div_baro').width = 70;
|
||||
X_lines = 5+1;
|
||||
break;
|
||||
case 60:
|
||||
document.getElementById('dbaro').style.width = "225px"; // 140+85
|
||||
// weird behaviour for canvas sizing versus scaling
|
||||
document.getElementById('div_baro').style.width = "140px";
|
||||
document.getElementById('div_baro').width = 140;
|
||||
X_lines = 10+1;
|
||||
break;
|
||||
default:
|
||||
document.getElementById('dbaro').style.width = "295px" ; //210+85
|
||||
// weird behaviour for canvas sizing versus scaling
|
||||
document.getElementById('div_baro').style.width = "210px";
|
||||
document.getElementById('div_baro').width = 210;
|
||||
X_lines = 15+1;
|
||||
}
|
||||
}
|
||||
|
||||
function baro_plot() {
|
||||
var j = -1;
|
||||
while (online[++j]) {
|
||||
if (window["P_" + online[j][2]].getVisible() === true) {
|
||||
baro_plotData(online[j][0],online[j][3],window["B_" + online[j][2]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function gesmark() {
|
||||
if (nbreq > 0) {
|
||||
--nbreq;
|
||||
|
@ -909,8 +1008,19 @@ function gesmark() {
|
|||
|
||||
|
||||
var posi = new google.maps.LatLng(lat, lon);
|
||||
var te = 0; //altitude sol
|
||||
// elevator.getElevationForLocations({'locations': [posi]}, function(results, status) {
|
||||
// if (status == google.maps.ElevationStatus.OK) {
|
||||
// if (results[0]) {
|
||||
// te = Math.round(results[0].elevation);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
var posiBaton = new google.maps.LatLng(lat+(0.00001*(alt-te)), lon);
|
||||
var polyvar = "P_" + crc;
|
||||
var markvar = "M_" + crc;
|
||||
var stickvar = "S_" + crc;
|
||||
var barovar = "B_" + crc;
|
||||
var visib = true;
|
||||
|
||||
|
||||
|
@ -932,7 +1042,7 @@ function gesmark() {
|
|||
window[polyvar].set('nom', "" + cn + " - " + ps);
|
||||
window[polyvar].set('poly', "" + polyvar);
|
||||
|
||||
window[polyvar].getPath().push(posi); // ajout d'une position sur le tracé
|
||||
// window[polyvar].getPath().push(posi); // ajout d'une position sur le tracé
|
||||
|
||||
google.maps.event.addListener(window[polyvar], "mouseover", function() {
|
||||
focuson(this.get('poly'));
|
||||
|
@ -945,9 +1055,26 @@ function gesmark() {
|
|||
document.getElementById("divInfo").innerHTML = " ";
|
||||
});
|
||||
|
||||
// création du Baton d'altitude
|
||||
var stickOptions = {
|
||||
// strokeColor: '#' + hcol,
|
||||
strokeColor: '#' + '000000', // black for now
|
||||
strokeOpacity: 0.75,
|
||||
strokeWeight: 2,
|
||||
visible: visib
|
||||
};
|
||||
window[stickvar] = new google.maps.Polyline(stickOptions);
|
||||
window[stickvar].setMap(map);
|
||||
window[stickvar].set('nom', "" + cn + " - " + ps);
|
||||
window[stickvar].set('baton', "" + stickvar);
|
||||
|
||||
// window[stickvar].getPath().push(posi);
|
||||
// window[stickvar].getPath().push(posiBaton);
|
||||
|
||||
// création du Marker
|
||||
window[markvar] = new google.maps.Marker({
|
||||
position: posi,
|
||||
// position: posi,
|
||||
position: posiBaton,
|
||||
title: cn + " - " + ps + " @ " + alt + "m",
|
||||
map: map,
|
||||
icon: "" + tld + "/markers/" + cn + ftypec[typ * 1] + ".png",
|
||||
|
@ -955,6 +1082,7 @@ function gesmark() {
|
|||
});
|
||||
window[markvar].set('poly', "" + polyvar);
|
||||
window[markvar].set('mark', "" + markvar);
|
||||
window[markvar].set('stick', "" + stickvar);
|
||||
window[markvar].set('nom', "" + cn + " - " + ps);
|
||||
window[markvar].set('cn', "" + cn);
|
||||
window[markvar].set('reg', "" + ps);
|
||||
|
@ -978,11 +1106,13 @@ function gesmark() {
|
|||
var bcol = window[this.get('poly')].strokeColor;
|
||||
document.getElementById("divInfo").innerHTML = "<span style='background-color: " + bcol + "'> </span> " + this.get('nom');
|
||||
focuson(this.get('poly'));
|
||||
// focuson(this.get('stick'));
|
||||
});
|
||||
|
||||
google.maps.event.addListener(window[markvar], "mouseout", function() {
|
||||
document.getElementById("divInfo").innerHTML = " ";
|
||||
focusoff(this.get('poly'));
|
||||
// focusoff(this.get('stick'));
|
||||
});
|
||||
|
||||
google.maps.event.addListener(window[markvar], "click", function() {
|
||||
|
@ -1001,7 +1131,14 @@ function gesmark() {
|
|||
redraw(pol);
|
||||
});
|
||||
|
||||
if (++ccolor == 9) ccolor = 0;
|
||||
// create array and add barogram time and altitude
|
||||
window[barovar] = [];
|
||||
// window[barovar].push([tim.toSeconds(),alt]);
|
||||
// // reset the time scale on the barogram
|
||||
// Set_XY_Scale(tim,alt);
|
||||
|
||||
// if (++ccolor == 9) ccolor = 0;
|
||||
if (++ccolor == tcolor.length) ccolor = 0;
|
||||
} // fin du if typeof...
|
||||
|
||||
var difalt = vz * 1;
|
||||
|
@ -1027,13 +1164,26 @@ function gesmark() {
|
|||
window[markvar].set('off', 0);
|
||||
}
|
||||
|
||||
if (window[markvar].get('tra') === 0) {
|
||||
if (window[markvar].get('tra') === 0) { // partial path, not whole path
|
||||
if (window[polyvar].getPath().getLength() >= pathl) window[polyvar].getPath().removeAt(0); // remove first point of the trace
|
||||
}
|
||||
|
||||
|
||||
window[polyvar].getPath().push(posi); // ajout d'une position sur le tracé
|
||||
window[markvar].setPosition(posi); // déplace le marker
|
||||
// window[markvar].setPosition(posi); // déplace le marker
|
||||
if (stick === 1) {
|
||||
window[stickvar].setOptions({visible: true});
|
||||
window[markvar].setPosition(posiBaton); // déplace le marker
|
||||
// window[stickvar].getPath().pop(); // déplace le baton
|
||||
// window[stickvar].getPath().pop(); // for now - better way ?
|
||||
// window[stickvar].getPath().push(posi);
|
||||
// window[stickvar].getPath().push(posiBaton);
|
||||
window[stickvar].getPath().setAt(0,posi);
|
||||
window[stickvar].getPath().setAt(1,posiBaton);
|
||||
} else {
|
||||
window[stickvar].setOptions({visible: false});
|
||||
window[markvar].setPosition(posi); // déplace le marker
|
||||
}
|
||||
|
||||
// change l'altitude affichée
|
||||
window[markvar].setTitle("" + cn + " - " + ps + " @ " + (alt * m2ft[unit]).toFixed() + am2ft[unit] + " @ " + tim);
|
||||
|
@ -1043,17 +1193,29 @@ function gesmark() {
|
|||
window[markvar].set('tim', "" + tim);
|
||||
window[markvar].set('rec', "" + rec);
|
||||
window[markvar].set('alt', "" + alt);
|
||||
|
||||
// check display time and remove old data
|
||||
if (window[barovar].length >= pathl) window[barovar].shift(); // remove first point of the trace
|
||||
// add barogram data
|
||||
window[barovar].push([tim.toSeconds(),alt]);
|
||||
Set_XY_Scale(tim,alt);
|
||||
|
||||
} else {
|
||||
if (all === 0) {
|
||||
if (typeof(window[polyvar]) != 'undefined') { // si pas déjà effacé
|
||||
// efface et détruit le PolyLine et le Marker
|
||||
// // efface et détruit le PolyLine et le Marker
|
||||
// efface et détruit le baton, le PolyLine et le Marker
|
||||
window[stickvar].setMap(null);
|
||||
delete window[stickvar];
|
||||
|
||||
window[polyvar].setMap(null);
|
||||
delete window[polyvar];
|
||||
|
||||
window[markvar].setMap(null);
|
||||
delete window[markvar];
|
||||
|
||||
delete window[barovar];
|
||||
|
||||
if (autoc == markvar) {
|
||||
autoc = "";
|
||||
document.getElementById("divInfoac").innerHTML = " ";
|
||||
|
@ -1087,6 +1249,10 @@ function gesmark() {
|
|||
} // fin du for (var i = 0; i < planeurs.length; i++)
|
||||
// tri et affichage du tableau
|
||||
afftab();
|
||||
|
||||
baro_plotRefresh();
|
||||
baro_plot();
|
||||
|
||||
if (--nbreq < 0) {
|
||||
nbreq = 0;
|
||||
} else {
|
||||
|
@ -1106,7 +1272,8 @@ function wd() {
|
|||
}
|
||||
|
||||
function rehash() {
|
||||
window.location.replace("#" + hashc + hashz + hashm + hasho + hashb + hashs + hashl + hashw + hashp + hashu + hashn + hashy);
|
||||
// window.location.replace("#" + hashc + hashz + hashm + hasho + hashb + hashs + hashl + hashw + hashp + hashu + hashn + hashy);
|
||||
window.location.replace("#" + hashc + hashz + hashm + hasho + hashb + hashs + hashl + hashw + hashp + hashu + hashn + hashy + hasha + hashg);
|
||||
}
|
||||
|
||||
function rempl(po, c) {
|
||||
|
@ -1400,18 +1567,21 @@ function initialize() {
|
|||
mapTypeControl: true,
|
||||
mapTypeControlOptions: {
|
||||
style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
|
||||
position: google.maps.ControlPosition.TOP_LEFT
|
||||
},
|
||||
// position: google.maps.ControlPosition.TOP_LEFT
|
||||
position: google.maps.ControlPosition.TOP_CENTER
|
||||
},
|
||||
scaleControl: true,
|
||||
streetViewControl: true,
|
||||
streetViewControlOptions: {
|
||||
position: google.maps.ControlPosition.LEFT_TOP
|
||||
},
|
||||
// streetViewControl: true,
|
||||
// streetViewControlOptions: {
|
||||
// position: google.maps.ControlPosition.LEFT_TOP
|
||||
// },
|
||||
streetViewControl: false,
|
||||
zoom: 13,
|
||||
zoomControl: true,
|
||||
zoomControlOptions: {
|
||||
position: google.maps.ControlPosition.LEFT_TOP
|
||||
}
|
||||
// zoomControl: true,
|
||||
zoomControl: false
|
||||
// zoomControlOptions: {
|
||||
// position: google.maps.ControlPosition.LEFT_TOP
|
||||
// }
|
||||
};
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
|
||||
|
@ -1424,6 +1594,9 @@ function initialize() {
|
|||
"h": "HYBRID"
|
||||
};
|
||||
|
||||
// add replacement zoom control
|
||||
horizZoomControl_initialize();
|
||||
|
||||
// parameter m= map type
|
||||
if (typeof(parh.m) != 'undefined') {
|
||||
mid = tmid[parh.m];
|
||||
|
@ -1572,7 +1745,16 @@ function initialize() {
|
|||
document.getElementById("ett2").innerHTML = "<TABLE class=\"tt\"><TR width=\"12\"><TH class=\"cgv\" ondblclick=\"allmarker();\"><IMG src='" + tld + "/pict/ico.png'></TH><TH class=\"cgv\" ondblclick=\"allpath();\"><IMG src='" + tld + "/pict/tra.gif'></TH><TH class=\"cgn\" onclick=\"tricn();\">CN</TH><TH class=\"cgc\" ondblclick=\"deleteallpath();\"><IMG border =\"0\" src='" + tld + "/pict/a.gif'></TH><TH class=\"cga\" onclick=\"trialti();\">Alti.</TH><TH class=\"cgz\">Vz</TH></TR></table>";
|
||||
document.getElementById("ac").innerHTML = "<span style=\"color: #333; font-weight: bold; font-size: 1.1em; line-height: 1.3em;\"> ..::Aircraft::..</span><BR><span class=\"act\">CN: </span><span id=\"accn\" class=\"aca\"></span><BR><DIV id=\"ac1\"><span class=\"act\">Regist.: </span><span id=\"acre\" class=\"aca\"></span><BR></DIV><span class=\"act\">Device Id: </span><span id=\"acfi\" class=\"aca\"></span><BR><span class=\"act\">Type: </span><span id=\"acty\" class=\"aca\"></span><BR><DIV id=\"ac2\"><span class=\"act\">Model: </span><span id=\"acmo\" class=\"aca\"></span></DIV><span class=\"act\">Last time: </span><span id=\"aclt\" class=\"aca\"></span><BR><span class=\"act\">Latitude: </span><span id=\"acla\" class=\"aca\"></span><BR><span class=\"act\">Longitude: </span><span id=\"aclo\" class=\"aca\"></span><BR><span class=\"act\">Altitude: </span><span id=\"acal\" class=\"aca\"></span><BR><span class=\"act\">G.Speed: </span><span id=\"acsp\" class=\"aca\"></span><BR><span class=\"act\">Track: </span><span id=\"actr\" class=\"aca\"></span><span class=\"aca\"> °</span><BR><span class=\"act\">Vz: </span><span id=\"acvz\" class=\"aca\"></span><BR><span class=\"act\">Receiver: </span><span id=\"acrx\" class=\"aca\"></span><BR><span id=\"acif\" class=\"aca\"></span>";
|
||||
document.getElementById("dtable").innerHTML = "<DIV id=\"menu\" style=\"display:none;\"></DIV><DIV id=\"dtlist\" style=\"display:block\"></DIV>";
|
||||
document.getElementById("menu").innerHTML = "<TABLE class=\"tt\"><TR><TD><INPUT type=\"checkbox\" id=\"hnewbox\" onChange='javascript : hidenew();'> Hide new gliders<BR><INPUT type=\"checkbox\" id=\"offl\" onChange='javascript : lineoff();'" + ((all === 0) ? " checked" : "") + "> Ignore Offline<HR><INPUT type=\"checkbox\" id=\"boundsbox\" onChange='javascript : bounds();'" + ((bound === true) ? " checked" : "") + "> Bounds<BR><TABLE cellspacing=\"0\" cellpading=\"0\"><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmax\" name=\"latmax\" size=\"7\" value=\"" + amax + "\"></TD></TR><TR align=\"center\"><TD><INPUT type=\"text\" id=\"lonmin\" name=\"lonmin\" size=\"7\" value=\"" + omin + "\"></TD><TD><INPUT type=\"text\" id=\"lonmax\" name=\"lonmax\" size=\"7\" value=\"" + omax + "\"></TD></TR><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmin\" name=\"latmin\" size=\"7\" value=\"" + amin + "\"></TD></TR></TABLE><BR> <INPUT type=\"button\" onclick=\"settomap()\" value=\"Set to map\"><BR><INPUT type=\"checkbox\" id=\"astmbox\" onChange='javascript : astm();'> Auto Set to map<HR>..:: Devices ::..<BR><INPUT type=\"checkbox\" id=\"ICAObox\" onChange=\"javascript : devtype();\"> ICAO<BR><INPUT type=\"checkbox\" id=\"Flarmbox\" onChange=\"javascript : devtype();\"> Flarm<BR><INPUT type=\"checkbox\" id=\"OGNbox\" onChange=\"javascript : devtype();\"> OGN Trackers<HR>..:: Layers ::..<BR><INPUT type=\"checkbox\" id=\"tembox\" onChange=\"javascript : tempe();\"> Temperature <BR><INPUT type=\"checkbox\" id=\"winbox\" onChange=\"javascript : wind();\"> Wind <a title=\"openportguide.de\" href=\"http://openportguide.de/index.php/en\" target=\"_blank\"><img src=\"pict/OpenPortGuideLogo_32.png\" style=\"float: right;\" border=\"0\" alt=\"\"></a><BR><INPUT type=\"checkbox\" id=\"prebox\" onChange=\"javascript : pres();\"> Pressure <BR><INPUT type=\"checkbox\" id=\"raibox\" onChange=\"javascript : rain();\"> Precipitation <BR><INPUT type=\"checkbox\" id=\"aspbox\" onChange=\"javascript : asp();\"> AirSpaces <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"aptbox\" onChange=\"javascript : apt();\"> Airports <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"reclbox\" onChange=\"javascript : reclbox();\"> Receivers<BR><span id=\"dtaskbox\"><INPUT type=\"checkbox\" disabled></span> <span onclick=\"taskclic();\">Tasks</span><BR> <DIV style=\"display:none\"><input type=\"file\" id=\"chfile\" onchange=\"rtask()\" /></DIV><HR>..::Units::..<BR><input type=\"radio\" name=\"units\" id=\"unm\" value=\"m\" onclick=\"chunit()\" checked>Met. <input type=\"radio\" name=\"units\" id=\"uni\" value=\"i\" onclick=\"chunit()\">Imp.<HR>..::Path length::..<BR><input type=\"radio\" name=\"pl\" id=\"rp1\" value=\"1\" checked onclick=\"chpl()\">5' <input type=\"radio\" name=\"pl\" id=\"rp2\" value=\"2\" onclick=\"chpl()\">10' <input type=\"radio\" name=\"pl\" id=\"rp3\" value=\"3\" onclick=\"chpl()\">All<HR><CENTER>Join the<BR><A HREF=\"http://ddb.glidernet.org\" target=\"_blank\">OGN DataBase</A></CENTER><HR><CENTER><A HREF=\"https://github.com/glidernet/ogn-live\" target=\"_blank\">Sources</A></CENTER></TD></TR></TABLE>";
|
||||
// document.getElementById("menu").innerHTML = "<TABLE class=\"tt\"><TR><TD><INPUT type=\"checkbox\" id=\"hnewbox\" onChange='javascript : hidenew();'> Hide new gliders<BR><INPUT type=\"checkbox\" id=\"offl\" onChange='javascript : lineoff();'" + ((all === 0) ? " checked" : "") + "> Ignore Offline<HR><INPUT type=\"checkbox\" id=\"boundsbox\" onChange='javascript : bounds();'" + ((bound === true) ? " checked" : "") + "> Bounds<BR><TABLE cellspacing=\"0\" cellpading=\"0\"><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmax\" name=\"latmax\" size=\"7\" value=\"" + amax + "\"></TD></TR><TR align=\"center\"><TD><INPUT type=\"text\" id=\"lonmin\" name=\"lonmin\" size=\"7\" value=\"" + omin + "\"></TD><TD><INPUT type=\"text\" id=\"lonmax\" name=\"lonmax\" size=\"7\" value=\"" + omax + "\"></TD></TR><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmin\" name=\"latmin\" size=\"7\" value=\"" + amin + "\"></TD></TR></TABLE><BR> <INPUT type=\"button\" onclick=\"settomap()\" value=\"Set to map\"><BR><INPUT type=\"checkbox\" id=\"astmbox\" onChange='javascript : astm();'> Auto Set to map<HR>..:: Devices ::..<BR><INPUT type=\"checkbox\" id=\"ICAObox\" onChange=\"javascript : devtype();\"> ICAO<BR><INPUT type=\"checkbox\" id=\"Flarmbox\" onChange=\"javascript : devtype();\"> Flarm<BR><INPUT type=\"checkbox\" id=\"OGNbox\" onChange=\"javascript : devtype();\"> OGN Trackers<HR>..:: Layers ::..<BR><INPUT type=\"checkbox\" id=\"tembox\" onChange=\"javascript : tempe();\"> Temperature <BR><INPUT type=\"checkbox\" id=\"winbox\" onChange=\"javascript : wind();\"> Wind <a title=\"openportguide.de\" href=\"http://openportguide.de/index.php/en\" target=\"_blank\"><img src=\"pict/OpenPortGuideLogo_32.png\" style=\"float: right;\" border=\"0\" alt=\"\"></a><BR><INPUT type=\"checkbox\" id=\"prebox\" onChange=\"javascript : pres();\"> Pressure <BR><INPUT type=\"checkbox\" id=\"raibox\" onChange=\"javascript : rain();\"> Precipitation <BR><INPUT type=\"checkbox\" id=\"aspbox\" onChange=\"javascript : asp();\"> AirSpaces <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"aptbox\" onChange=\"javascript : apt();\"> Airports <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"reclbox\" onChange=\"javascript : reclbox();\"> Receivers<BR><span id=\"dtaskbox\"><INPUT type=\"checkbox\" disabled></span> <span onclick=\"taskclic();\">Tasks</span><BR> <DIV style=\"display:none\"><input type=\"file\" id=\"chfile\" onchange=\"rtask()\" /></DIV><HR>..::Units::..<BR><input type=\"radio\" name=\"units\" id=\"unm\" value=\"m\" onclick=\"chunit()\" checked>Met. <input type=\"radio\" name=\"units\" id=\"uni\" value=\"i\" onclick=\"chunit()\">Imp.<HR>..::Path length::..<BR><input type=\"radio\" name=\"pl\" id=\"rp1\" value=\"1\" checked onclick=\"chpl()\">5' <input type=\"radio\" name=\"pl\" id=\"rp2\" value=\"2\" onclick=\"chpl()\">10' <input type=\"radio\" name=\"pl\" id=\"rp3\" value=\"3\" onclick=\"chpl()\">All<HR><CENTER>Join the<BR><A HREF=\"http://ddb.glidernet.org\" target=\"_blank\">OGN DataBase</A></CENTER><HR><CENTER><A HREF=\"https://github.com/glidernet/ogn-live\" target=\"_blank\">Sources</A></CENTER></TD></TR></TABLE>";
|
||||
// document.getElementById("menu").innerHTML = "<TABLE class=\"tt\"><TR><TD><INPUT type=\"checkbox\" id=\"hnewbox\" onChange='javascript : hidenew();'> Hide new gliders<BR><INPUT type=\"checkbox\" id=\"offl\" onChange='javascript : lineoff();'" + ((all === 0) ? " checked" : "") + "> Ignore Offline<HR><INPUT type=\"checkbox\" id=\"boundsbox\" onChange='javascript : bounds();'" + ((bound === true) ? " checked" : "") + "> Bounds<BR><TABLE cellspacing=\"0\" cellpading=\"0\"><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmax\" name=\"latmax\" size=\"7\" value=\"" + amax + "\"></TD></TR><TR align=\"center\"><TD><INPUT type=\"text\" id=\"lonmin\" name=\"lonmin\" size=\"7\" value=\"" + omin + "\"></TD><TD><INPUT type=\"text\" id=\"lonmax\" name=\"lonmax\" size=\"7\" value=\"" + omax + "\"></TD></TR><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmin\" name=\"latmin\" size=\"7\" value=\"" + amin + "\"></TD></TR></TABLE><BR> <INPUT type=\"button\" onclick=\"settomap()\" value=\"Set to map\"><BR><INPUT type=\"checkbox\" id=\"astmbox\" onChange='javascript : astm();'> Auto Set to map<HR>..:: Devices ::..<BR><INPUT type=\"checkbox\" id=\"ICAObox\" onChange=\"javascript : devtype();\"> ICAO<BR><INPUT type=\"checkbox\" id=\"Flarmbox\" onChange=\"javascript : devtype();\"> Flarm<BR><INPUT type=\"checkbox\" id=\"OGNbox\" onChange=\"javascript : devtype();\"> OGN Trackers<HR>..:: Layers ::..<BR><INPUT type=\"checkbox\" id=\"tembox\" onChange=\"javascript : tempe();\"> Temperature <BR><INPUT type=\"checkbox\" id=\"winbox\" onChange=\"javascript : wind();\"> Wind <a title=\"openportguide.de\" href=\"http://openportguide.de/index.php/en\" target=\"_blank\"><img src=\"pict/OpenPortGuideLogo_32.png\" style=\"float: right;\" border=\"0\" alt=\"\"></a><BR><INPUT type=\"checkbox\" id=\"prebox\" onChange=\"javascript : pres();\"> Pressure <BR><INPUT type=\"checkbox\" id=\"raibox\" onChange=\"javascript : rain();\"> Precipitation <BR><INPUT type=\"checkbox\" id=\"aspbox\" onChange=\"javascript : asp();\"> AirSpaces <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"aptbox\" onChange=\"javascript : apt();\"> Airports <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"reclbox\" onChange=\"javascript : reclbox();\"> Receivers<BR><span id=\"dtaskbox\"><INPUT type=\"checkbox\" disabled></span> <span onclick=\"taskclic();\">Tasks</span><BR> <DIV style=\"display:none\"><input type=\"file\" id=\"chfile\" onchange=\"rtask()\" /></DIV><HR>..::Units::..<BR><input type=\"radio\" name=\"units\" id=\"unm\" value=\"m\" onclick=\"chunit()\" checked>Met. <input type=\"radio\" name=\"units\" id=\"uni\" value=\"i\" onclick=\"chunit()\">Imp.<HR>..::Path length::..<BR><input type=\"radio\" name=\"pl\" id=\"rp1\" value=\"1\" checked onclick=\"chpl()\">5' <input type=\"radio\" name=\"pl\" id=\"rp2\" value=\"2\" onclick=\"chpl()\">10' <input type=\"radio\" name=\"pl\" id=\"rp3\" value=\"3\" onclick=\"chpl()\">All<HR>..:: Altitude ::..<BR><INPUT type=\"checkbox\" id=\"stick\" onChange=\"javascript : chstick();\"> Altitude stick<HR><CENTER>Join the<BR><A HREF=\"http://ddb.glidernet.org\" target=\"_blank\">OGN DataBase</A></CENTER><HR><CENTER><A HREF=\"https://github.com/glidernet/ogn-live\" target=\"_blank\">Sources</A></CENTER></TD></TR></TABLE>";
|
||||
document.getElementById("menu").innerHTML = "<TABLE class=\"tt\"><TR><TD><INPUT type=\"checkbox\" id=\"hnewbox\" onChange='javascript : hidenew();'> Hide new gliders<BR><INPUT type=\"checkbox\" id=\"offl\" onChange='javascript : lineoff();'" + ((all === 0) ? " checked" : "") + "> Ignore Offline"+
|
||||
"<HR><INPUT type=\"checkbox\" id=\"boundsbox\" onChange='javascript : bounds();'" + ((bound === true) ? " checked" : "") + "> Bounds<BR><TABLE cellspacing=\"0\" cellpading=\"0\"><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmax\" name=\"latmax\" size=\"7\" value=\"" + amax + "\"></TD></TR><TR align=\"center\"><TD><INPUT type=\"text\" id=\"lonmin\" name=\"lonmin\" size=\"7\" value=\"" + omin + "\"></TD><TD><INPUT type=\"text\" id=\"lonmax\" name=\"lonmax\" size=\"7\" value=\"" + omax + "\"></TD></TR><TR align=\"center\"><TD colspan=\"2\"><INPUT type=\"text\" id=\"latmin\" name=\"latmin\" size=\"7\" value=\"" + amin + "\"></TD></TR></TABLE><BR> <INPUT type=\"button\" onclick=\"settomap()\" value=\"Set to map\"><BR><INPUT type=\"checkbox\" id=\"astmbox\" onChange='javascript : astm();'> Auto Set to map"+
|
||||
"<HR>..:: Devices ::..<BR><INPUT type=\"checkbox\" id=\"ICAObox\" onChange=\"javascript : devtype();\"> ICAO<BR><INPUT type=\"checkbox\" id=\"Flarmbox\" onChange=\"javascript : devtype();\"> Flarm<BR><INPUT type=\"checkbox\" id=\"OGNbox\" onChange=\"javascript : devtype();\"> OGN Trackers"+
|
||||
"<HR>..:: Layers ::..<BR><INPUT type=\"checkbox\" id=\"tembox\" onChange=\"javascript : tempe();\"> Temperature <BR><INPUT type=\"checkbox\" id=\"winbox\" onChange=\"javascript : wind();\"> Wind <a title=\"openportguide.de\" href=\"http://openportguide.de/index.php/en\" target=\"_blank\"><img src=\"pict/OpenPortGuideLogo_32.png\" style=\"float: right;\" border=\"0\" alt=\"\"></a><BR><INPUT type=\"checkbox\" id=\"prebox\" onChange=\"javascript : pres();\"> Pressure <BR><INPUT type=\"checkbox\" id=\"raibox\" onChange=\"javascript : rain();\"> Precipitation <BR><INPUT type=\"checkbox\" id=\"aspbox\" onChange=\"javascript : asp();\"> AirSpaces <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"aptbox\" onChange=\"javascript : apt();\"> Airports <A HREF=\"http://www.openaip.net\" target=\"_blank\" style=\"font-size:10px;\">( openaip.net )</A><BR><INPUT type=\"checkbox\" id=\"reclbox\" onChange=\"javascript : reclbox();\"> Receivers<BR><span id=\"dtaskbox\"><INPUT type=\"checkbox\" disabled></span> <span onclick=\"taskclic();\">Tasks</span><BR> <DIV style=\"display:none\"><input type=\"file\" id=\"chfile\" onchange=\"rtask()\" /></DIV>"+
|
||||
"<HR>..::Units::..<BR><input type=\"radio\" name=\"units\" id=\"unm\" value=\"m\" onclick=\"chunit()\" checked>Met. <input type=\"radio\" name=\"units\" id=\"uni\" value=\"i\" onclick=\"chunit()\">Imp."+
|
||||
"<HR>..::Path length::..<BR><input type=\"radio\" name=\"pl\" id=\"rp1\" value=\"1\" checked onclick=\"chpl()\">5' <input type=\"radio\" name=\"pl\" id=\"rp2\" value=\"2\" onclick=\"chpl()\">10' <input type=\"radio\" name=\"pl\" id=\"rp3\" value=\"3\" onclick=\"chpl()\">All"+
|
||||
"<HR>..:: Altitude ::..<BR><INPUT type=\"checkbox\" id=\"stick\" onChange=\"javascript : chstick();\"> Altitude stick<BR><INPUT type=\"checkbox\" id=\"baro\" onChange=\"javascript : chbaro();\"> Barogram"+
|
||||
"<HR><CENTER>Join the<BR><A HREF=\"http://ddb.glidernet.org\" target=\"_blank\">OGN DataBase</A></CENTER><HR><CENTER><A HREF=\"https://github.com/glidernet/ogn-live\" target=\"_blank\">Sources</A></CENTER></TD></TR></TABLE>";
|
||||
|
||||
// parameter b=lat1,lon1,lat2,lon2 bounds
|
||||
if (typeof(parh.b) != 'undefined') {
|
||||
|
@ -1680,6 +1862,24 @@ function initialize() {
|
|||
}
|
||||
}
|
||||
|
||||
// parameter a=0 (Display an altitude stick)
|
||||
if (typeof(parh.a) != 'undefined') {
|
||||
if (parh.a == "1") {
|
||||
document.getElementById('stick').checked = true;
|
||||
stick = 1;
|
||||
hasha = "&a=1";
|
||||
}
|
||||
}
|
||||
|
||||
// parameter g=0 (Display a barogram)
|
||||
if (typeof(parh.g) != 'undefined') {
|
||||
if (parh.g == "1") {
|
||||
document.getElementById('baro').checked = true;
|
||||
document.getElementById('dbaro').style.display = "block";
|
||||
barogram = 1;
|
||||
hashg = "&g=1";
|
||||
}
|
||||
}
|
||||
|
||||
// parameter p=1,2 or 3 path length 5", 10" or all points
|
||||
if (typeof(parh.p) != 'undefined') {
|
||||
|
@ -1692,6 +1892,7 @@ function initialize() {
|
|||
document.getElementById('rp3').checked = true;
|
||||
hashp = "&p=3";
|
||||
}
|
||||
baro_reSize();
|
||||
}
|
||||
|
||||
// parameter device type d=1 ICAO ,2 Flarm or 3 OGN tracker
|
||||
|
@ -1720,4 +1921,7 @@ function initialize() {
|
|||
checkrec();
|
||||
tmwd = setTimeout(wd, 30000);
|
||||
if (gmdelay == 0) gesmark();
|
||||
|
||||
// barogram plotting
|
||||
baro_Init();
|
||||
}
|
||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 425 B |
|
@ -0,0 +1,54 @@
|
|||
|
||||
/*
|
||||
* The ZoomControl adds horizontal [+/-] buttons for the map
|
||||
* to replace the standard vertical one
|
||||
*/
|
||||
|
||||
function ZoomControl(controlDiv, map) {
|
||||
|
||||
// Creating divs & styles for custom zoom control
|
||||
controlDiv.style.padding = '10px';
|
||||
|
||||
// Set CSS for the control wrapper
|
||||
var controlWrapper = document.createElement('div');
|
||||
controlWrapper.style.cursor = 'pointer';
|
||||
controlWrapper.style.width = '56px';
|
||||
controlWrapper.style.height = '28px';
|
||||
controlWrapper.style.backgroundImage = 'url("horizZoom.png")';
|
||||
controlDiv.appendChild(controlWrapper);
|
||||
|
||||
// Set CSS for the zoomIn
|
||||
var zoomInButton = document.createElement('div');
|
||||
zoomInButton.style.float = "left";
|
||||
zoomInButton.style.width = '28px';
|
||||
zoomInButton.style.height = '28px';
|
||||
controlWrapper.appendChild(zoomInButton);
|
||||
|
||||
// Set CSS for the zoomOut
|
||||
var zoomOutButton = document.createElement('div');
|
||||
zoomOutButton.style.float = "left";
|
||||
zoomOutButton.style.width = '28px';
|
||||
zoomOutButton.style.height = '28px';
|
||||
controlWrapper.appendChild(zoomOutButton);
|
||||
|
||||
// Setup the click event listener - zoomIn
|
||||
google.maps.event.addDomListener(zoomInButton, 'click', function() {
|
||||
map.setZoom(map.getZoom() + 1);
|
||||
});
|
||||
|
||||
// Setup the click event listener - zoomOut
|
||||
google.maps.event.addDomListener(zoomOutButton, 'click', function() {
|
||||
map.setZoom(map.getZoom() - 1);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function horizZoomControl_initialize() {
|
||||
// Create the DIV to hold the control and call the ZoomControl() constructor
|
||||
// passing in this DIV.
|
||||
var zoomControlDiv = document.createElement('div');
|
||||
var zoomControl = new ZoomControl(zoomControlDiv, map);
|
||||
|
||||
zoomControlDiv.index = 1;
|
||||
map.controls[google.maps.ControlPosition.TOP_CENTER].push(zoomControlDiv);
|
||||
}
|
|
@ -112,6 +112,8 @@ catch(e) {
|
|||
|
||||
</script>
|
||||
<script type="text/javascript" src="cunimb.js"></script>
|
||||
<script type="text/javascript" src="barogram.js"></script>
|
||||
<script type="text/javascript" src="horizZoomControl.js"></script>
|
||||
|
||||
</head>
|
||||
<body onload="initialize()">
|
||||
|
@ -123,6 +125,11 @@ catch(e) {
|
|||
<DIV id="ett2" ></DIV>
|
||||
<DIV id="dtable"></DIV>
|
||||
</div>
|
||||
<div id="dbaro" class="baroleft" style="display:none">
|
||||
<canvas id="div_baroScale" height="600" width="45"></canvas>
|
||||
<canvas id="div_baro" height="600" width="70"></canvas>
|
||||
<canvas id="div_baroMark" height="600" width="30"></canvas>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Ładowanie…
Reference in New Issue