From a95682cffb51989466cc3e835253dda0d4387db3 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Fri, 16 Jan 2015 23:23:15 +0000 Subject: [PATCH 01/68] when using ?filter= set the value in the searchbox --- js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 7ff2260..ed66a44 100644 --- a/js/app.js +++ b/js/app.js @@ -173,7 +173,10 @@ for(var idx in params) { case "hidelist": if(line[1] == "1") wvar.vlist = false; break; case "hidegraph": if(line[1] == "1") wvar.graph = false; break; case "expandgraph": if(line[1] == "1") wvar.graph_expanded = true; break; - case "filter": wvar.query = decodeURIComponent(line[1]); break; + case "filter": + wvar.query = decodeURIComponent(line[1]); + $("header .search input[type='text']").val(wvar.query); + break; case "nyan": wvar.nyan = true; break; case "focus": wvar.focus = decodeURIComponent(line[1]); break; case "docid": wvar.docid = line[1]; break; From 16132475683f42af4ba49cae01ace7121d264142 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Thu, 29 Jan 2015 12:11:26 +0000 Subject: [PATCH 02/68] allow for multiple docids in query --- js/tracker.js | 90 +++++++++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 38 deletions(-) diff --git a/js/tracker.js b/js/tracker.js index 19c5d96..e9117c2 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -2229,7 +2229,7 @@ function refresh() { $("#stText").text("checking |"); - if(/^[a-z0-9]{32}$/ig.exec(wvar.query)) { + if(/[a-z0-9]{32}/ig.exec(wvar.query)) { tmpC.setVisible(false); initHabitat(); return; @@ -2322,7 +2322,7 @@ function refreshPredictions() { function habitat_translation_layer(json_result) { if(json_result.rows.length === 0) { - habitat_step(true); + habitat_payload_step(true); return; } @@ -2381,30 +2381,30 @@ function habitat_translation_layer(json_result) { // next step periodical = setTimeout(function() { - habitat_step(); + habitat_payload_step(); }, 500); } -var habitat_step_data; +var habitat_payload_step_data; -function habitat_step(remove_current) { +function habitat_payload_step(remove_current) { remove_current = !!remove_current; if(remove_current) { - habitat_step_data.payloads.splice(habitat_step_data.idx, 1); + habitat_payload_step_data.payloads.splice(habitat_payload_step_data.idx, 1); } - if(habitat_step_data.payloads.length === 0) { + if(habitat_payload_step_data.payloads.length === 0) { $("#stText").text(""); return; } - habitat_step_data.idx += 1; - habitat_step_data.idx = habitat_step_data.idx % habitat_step_data.payloads.length; + habitat_payload_step_data.idx += 1; + habitat_payload_step_data.idx = habitat_payload_step_data.idx % habitat_payload_step_data.payloads.length; - var url = habitat_step_data.payloads[habitat_step_data.idx].url; - url += habitat_step_data.payloads[habitat_step_data.idx].skip; - habitat_step_data.payloads[habitat_step_data.idx].skip += habitat_max; + var url = habitat_payload_step_data.payloads[habitat_payload_step_data.idx].url; + url += habitat_payload_step_data.payloads[habitat_payload_step_data.idx].skip; + habitat_payload_step_data.payloads[habitat_payload_step_data.idx].skip += habitat_max; ajax_positions = $.getJSON(url, function(response) { habitat_translation_layer(response); @@ -2414,47 +2414,61 @@ function habitat_step(remove_current) { function initHabitat() { $("#stText").text("loading |"); + habitat_payload_step_data = { + idx: 0, + payloads: [], + }; + var habitat_docs = []; + + wvar.query.split(";").forEach(function(v) { + v = v.trim(); + if(/^[a-z0-9]{32}$/ig.exec(v)) habitat_docs.push(v); + }) + + habitat_doc_step(habitat_docs); +} + + +function habitat_doc_step(hab_docs) { + var docid = hab_docs.shift(); + ajax_positions = $.ajax({ type: "GET", - url: habitat_url + wvar.query, + url: habitat_url + docid, data: "", dataType: "json", success: function(response, textStatus) { if(response.type == "flight") { - if(response.payloads.length === 0) { - update(null); - $("#stText").text("no payloads in doc |"); - return; - } - - ts_start = convert_time(response.start) / 1000; - ts_end = convert_time(response.end) / 1000; + if(response.payloads.length > 0) { + ts_start = convert_time(response.start) / 1000; + ts_end = convert_time(response.end) / 1000; - habitat_step_data = { - idx: 0, - payloads: [], - }; - response.payloads.forEach( function(payload_id) { - var url = habitat_url_payload_telemetry.replace(/\{ID\}/g, payload_id); - url = url.replace("{START}", ts_start).replace("{END}", ts_end); + response.payloads.forEach( function(payload_id) { + var url = habitat_url_payload_telemetry.replace(/\{ID\}/g, payload_id); + url = url.replace("{START}", ts_start).replace("{END}", ts_end); - habitat_step_data.payloads.push({ - url: url, - skip: 0, + habitat_payload_step_data.payloads.push({ + url: url, + skip: 0, + }); }); - }); - - habitat_step(); + } } else { - update(null); - $("#stText").text("docid is not a flight doc |"); + if(hab_docs.length === 0) update(null); + console.error("tracker: docid", docid, " is not a flight_doc"); + } + + if(hab_docs.length === 0) { + habitat_payload_step(); + } else { + habitat_doc_step(hab_docs); } }, error: function() { - update(null); - $("#stText").text("Unable to load flight doc |"); + if(hab_docs.length === 0) update(null); + console.error("tracker: error trying to load docid", docid); }, complete: function(request, textStatus) { } From b338ee6cc7358577af52b829f9730a748e7d7f2e Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Wed, 4 Feb 2015 18:24:25 +0000 Subject: [PATCH 03/68] fixed typos in contribute section --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b8cd4d5..5a2af58 100644 --- a/index.html +++ b/index.html @@ -95,8 +95,8 @@

Contribute

Did you know the tracker is open-source? Check it out on github/habitat-mobile-tracker. - Bug reports, suggetion and pull request are welcome. You can also - find us on IRC in #highaltitude at irc.freenode.org. + Bug reports, suggetions and pull requests are welcome. You can also + find us on IRC in #highaltitude at irc.freenode.org.

From 8e958fd9ec552a3a36cabd6aaeb0d21101d57a40 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Wed, 11 Feb 2015 15:23:18 +0000 Subject: [PATCH 04/68] fix infinite spinner when no/empty payload doc --- js/tracker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/tracker.js b/js/tracker.js index e9117c2..5b162c0 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -2396,6 +2396,7 @@ function habitat_payload_step(remove_current) { if(habitat_payload_step_data.payloads.length === 0) { $("#stText").text(""); + $("#main .header.empty").html("No vehicles :("); return; } From 6a74062855df75c1ab2a6232465ac089ab279e9e Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Wed, 11 Feb 2015 16:24:21 +0000 Subject: [PATCH 05/68] fix error trying to pan notexistant vehicle --- js/tracker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/tracker.js b/js/tracker.js index 5b162c0..1dd4903 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -525,7 +525,7 @@ function load() { } function panTo(vcallsign) { - if(!vcallsign) return; + if(!vcallsign || vehicles[vcallsign] === undefined) return; // update lookangles update_lookangles(vcallsign); From c507c3b34a2adf44655c188437a064a015d4952c Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Wed, 11 Feb 2015 20:21:37 +0000 Subject: [PATCH 06/68] added placeholder attribute to search field --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5a2af58..1ca44b6 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,7 @@
From 7e6cb44593038ff10a0f97bc4b15b87f3d9b9af3 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Mon, 23 Feb 2015 04:53:57 +0000 Subject: [PATCH 07/68] fix typos; tweaks to description and texts --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 1ca44b6..334e1f9 100644 --- a/index.html +++ b/index.html @@ -2,11 +2,11 @@ - habhub tracker - + habhub tracker (high altitude balloons) + - + @@ -72,8 +72,8 @@

Embed tracker

It's possible to embed the mobile tracker on any page. If you are developing a HAB project, you can add the tracker - to your website. You can customize the tracker to fit. There are options to limit, the visible vehicles to - a specific callsign. Or two, or three. There are options to play with. It's easy. Just visit the page bellow and check it out. + to your website. You can customize the tracker to fit. There are options to limit the visible vehicles to + a specific callsign. Or two, or three. Many other options to play with. It's easy. Just visit the page below and check it out.

Customize tracker for embedding @@ -95,7 +95,7 @@

Contribute

Did you know the tracker is open-source? Check it out on github/habitat-mobile-tracker. - Bug reports, suggetions and pull requests are welcome. You can also + Bug reports, suggestions and pull requests are welcome. You can also find us on IRC in #highaltitude at irc.freenode.org.

@@ -105,7 +105,7 @@

Contribute

Settings


- Hide welcome on startup + Hide welcome on start-up
From 9a5ea27cd8a267888e10ac85d3f8bf0f3781930a Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Wed, 25 Feb 2015 18:53:04 +0000 Subject: [PATCH 08/68] added opensearch --- index.html | 1 + opensearchspec.xml | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 opensearchspec.xml diff --git a/index.html b/index.html index 334e1f9..159bfa4 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ habhub tracker (high altitude balloons) + diff --git a/opensearchspec.xml b/opensearchspec.xml new file mode 100644 index 0000000..e9ff9b6 --- /dev/null +++ b/opensearchspec.xml @@ -0,0 +1,10 @@ + + + Habhub Tracker + Habhub Tracker - Search + UTF-8 + hello@rgp.io + http://tracker.habhub.org/favicon.ico + Rossen Georgiev + + From d04996a2ed78909b3c2a44b9884325a70d58f8c6 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Thu, 19 Mar 2015 16:55:14 +0000 Subject: [PATCH 09/68] add full solar eclipse on 20 March 2015 --- index.html | 2 + solar/SEcirc.js | 816 +++++++++++++++++++++++++++++++++++ solar/eclipse_20march2015.js | 704 ++++++++++++++++++++++++++++++ 3 files changed, 1522 insertions(+) create mode 100644 solar/SEcirc.js create mode 100644 solar/eclipse_20march2015.js diff --git a/index.html b/index.html index 159bfa4..be0887a 100644 --- a/index.html +++ b/index.html @@ -313,6 +313,8 @@

Chase car mode

--> + + --> - - - @@ -312,7 +313,6 @@

Chase car mode

---> - + +