Skip to content

Commit 79aff43

Browse files
authored
Merge pull request projecthorus#15 from LukePrior/master
Various bug fixes
2 parents 72f739e + 121c0ed commit 79aff43

File tree

5 files changed

+31
-28
lines changed

5 files changed

+31
-28
lines changed

README.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,30 @@
1-
# SondeHub Tracker
1+
# SondeHub Tracker Beta (leaflet edition)
22

33
A fork of [habitat-mobile-tracker](https://github.com/rossengeorgiev/habitat-mobile-tracker) for use with the [SondeHub v2 ElasticSearch](https://github.com/projecthorus/sondehub-infra/wiki/ElasticSearch-Kibana-access) database. Huge credits to [Rossen Georgiev](https://github.com/rossengeorgiev/) for developing the mobile-tracker.
44

55
![mobile tracker screenshot](resources/mobiletracker-screencap.png "mobile tracker screenshot")
66

77
A webapp for tracking radiosondes. Works an desktop and mobile devices.
8-
The habhub tracker is a continuation of [spacenear.us/tracker](http://spacenear.us/tracker).
8+
The SondeHub tracker is a continuation of [spacenear.us/tracker](http://spacenear.us/tracker).
99

1010
## Features
1111

1212
* Radiosonde Tracking using [SondeHub V2](https://github.com/projecthorus/sondehub-infra/wiki/ElasticSearch-Kibana-access) data.
1313
* Telemetry graph for each balloon
14-
* Chase Car functionality (TODO for SondeHub)
14+
* Chase Car functionality
1515
* Near realtime weather overlays
1616
* [Daylight cycle overlay](https://github.com/rossengeorgiev/nite-overlay), for long flights
17-
* Available to embed on any website
18-
* Map tracker with Google Maps API 3
17+
* Map tracker with Leaflet API
1918
* Run the app natively on `iOS` or with Chrome's 'add to screen' on `Android`
2019

2120
### Geo position
2221

23-
Available only on mobile devices.
24-
2522
The app will ask for permission to use your location.
2623
This is required for some of the features. It is **important** to note that
2724
your location will not be made available or send to anyone. Unless, you enable
28-
the `chase car mode`, which will periodically upload it to habitat. _The app
25+
the `chase car mode`, which will periodically upload it to SondeHub. _The app
2926
will always start with `chase car mode` disabled._
3027

31-
### Offline storage
32-
33-
The app will ask to use offline storage. You will need to accept, in order to
34-
use the offline capabilities. The app will cache all files making it available
35-
even when there is no network coverage. Latest position data will also be stored
36-
and used when you start up with no network. When you get back online, the app
37-
will fetch the latest position data.
38-
3928
## Browser requirements
4029

4130
Any modern browser should be able to run the app. Including the latest version of IE.
@@ -46,7 +35,6 @@ This is also true for mobile, some build-in browsers may not work.
4635
Don't hesitate to report any issues, or suggest improvements. Just visit the [issues page](https://github.com/projecthorus/sondehub-tracker/issues).
4736
Pull requests are welcome.
4837

49-
5038
## Installation
5139

5240
Requirements: __Java__ and (Linux or Cygwin environment)
@@ -61,9 +49,6 @@ For __applicationCache__ to work your server needs to send the correct MIME type
6149

6250
Author: Daniel Saul [@danielsaul](https://github.com/danielsaul)
6351

64-
[See concept for phone portrait mode](https://github.com/rossengeorgiev/habitat-mobile-tracker/blob/master/resources/concept-app-portrait.png)
65-
[See concept for tablets](https://github.com/rossengeorgiev/habitat-mobile-tracker/blob/master/resources/concept-app-tablet.png)
66-
6752

6853

6954

css/leaflet.fullscreen.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@
1212
background-position: 2px -24px;
1313
}
1414

15-
.leaflet-control-fullscreen {
16-
position:relative;
17-
top:-25px;
18-
}
15+
@media (orientation: landscape) {
16+
.leaflet-control-fullscreen {
17+
position:relative;
18+
top:-25px;
19+
}
20+
.leaflet-fullscreen-on .leaflet-control-fullscreen {
21+
position:relative;
22+
top:0px;
23+
}
24+
}
25+
1926

2027
/* Do not combine these two rules; IE will break. */
2128
.leaflet-container:-webkit-full-screen {

js/iscroll.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,13 @@ IScroll.prototype = {
821821
},
822822

823823
scrollToElement: function (el, time, offsetX, offsetY, easing) {
824-
el = el.nodeType ? el : document.querySelectorAll(el)[1];
824+
el = el.nodeType ? el : document.querySelectorAll(el);
825+
//figure out which el to use (oreintation)
826+
if (el[0].offsetHeight) {
827+
el = el[0];
828+
} else {
829+
el = el[1];
830+
}
825831

826832
if ( !el ) {
827833
return;

js/tracker.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,6 @@ function load() {
522522
if(!is_mobile && !offline.get('opt_nowelcome') && $(window).width() > 900) $('.nav li.about').click();
523523

524524
}, 500);
525-
526-
// load if aprs layer, if selected
527-
if(offline.get('opt_layers_aprs')) map.overlayMapTypes.setAt("1", overlayAPRS);
528525
}
529526

530527
function panTo(vcallsign) {
@@ -543,6 +540,10 @@ function panTo(vcallsign) {
543540

544541
function panToRecovery(rcallsign) {
545542
if(offline.get('opt_hide_recoveries')) alert("Recovered Sonde Hidden, enable in settings");
543+
//if mobile close panel
544+
if (is_mobile) {
545+
$('.flatpage, #homebox').hide();
546+
}
546547
for (let i = 0; i < recoveries.length; i++) {
547548
if (recoveries[i].hasOwnProperty('serial')) {
548549
if (recoveries[i]['serial'] == rcallsign) {
@@ -796,12 +797,16 @@ function focusVehicle(vcallsign, ignoreOpt) {
796797

797798
if(i == vcallsign || vcallsign === null) {
798799
if(vehicle.horizon_circle) vehicle.horizon_circle.setStyle({opacity:opacityFocused * 0.6});
800+
if(vehicle.horizon_circle_title) vehicle.subhorizon_circle_title.setOpacity(opacityFocused * 0.8);
799801
if(vehicle.subhorizon_circle) vehicle.subhorizon_circle.setStyle({opacity:opacityFocused * 0.8});
802+
if(vehicle.subhorizon_circle_title) vehicle.subhorizon_circle_title.setOpacity(opacityFocused * 0.8);
800803
for(j in vehicle.polyline) vehicle.polyline[j].setStyle({opacity:opacityFocused});
801804
}
802805
else {
803806
if(vehicle.horizon_circle) vehicle.horizon_circle.setStyle({opacity:opacityOther * 0.6});
807+
if(vehicle.horizon_circle_title) vehicle.horizon_circle_title.setOpacity(opacityOther * 0.6);
804808
if(vehicle.subhorizon_circle) vehicle.subhorizon_circle.setStyle({opacity:opacityOther * 0.8});
809+
if(vehicle.subhorizon_circle_title) vehicle.subhorizon_circle_title.setOpacity(opacityOther * 0.8);
805810
for(j in vehicle.polyline) vehicle.polyline[j].setStyle({opacity:opacityOther});
806811
}
807812
}
472 KB
Loading

0 commit comments

Comments
 (0)