diff --git a/img/markers/car-purple.png b/img/markers/car-purple.png
new file mode 100644
index 0000000..a281513
Binary files /dev/null and b/img/markers/car-purple.png differ
diff --git a/img/markers/car-teal.png b/img/markers/car-teal.png
new file mode 100644
index 0000000..f0e6fe8
Binary files /dev/null and b/img/markers/car-teal.png differ
diff --git a/index.html b/index.html
index 082dc5d..874429f 100644
--- a/index.html
+++ b/index.html
@@ -129,6 +129,8 @@
Settings
+
General
+
+
Visibility
+
Hide receivers from the map
@@ -186,14 +190,7 @@
Settings
-
Highlight selected vehicle
-
-
-
-
-
-
+
Other
+
+
+
Highlight selected vehicle
+
+
+
+
+
Overlays
diff --git a/js/app.js b/js/app.js
index 6afbdcd..573f312 100644
--- a/js/app.js
+++ b/js/app.js
@@ -802,10 +802,10 @@ $(window).ready(function() {
break;
case "opt_hide_horizon":
if(on) {
- hideHorizonRings();
+ showHorizonRings();
}
else {
- showHorizonRings();
+ hideHorizonRings();
}
break;
case "opt_hide_titles":
diff --git a/js/chasecar.lib.js b/js/chasecar.lib.js
index 50b05d7..e7c1785 100644
--- a/js/chasecar.lib.js
+++ b/js/chasecar.lib.js
@@ -45,9 +45,9 @@ ChaseCar.updatePosition = function(callsign, position) {
ChaseCar.markRecovered = function(){
- // Distance limits removed 2021-12-04
- //_run_checks = true;
- //_range_limit = 200000; // 200 km
+ // Distance limits reinstated 2021-12-04
+ _run_checks = true;
+ _range_limit = 200000; // 200 km
// Get the serial number to be marked recovered
_serial = $("#pr_serial").val().trim();
@@ -88,33 +88,31 @@ ChaseCar.markRecovered = function(){
}
} else {
- // NOTE - Distance checks now removed.
-
// Sonde is on the map, so run some additional checks.
_recov_lat = vehicles[_serial].curr_position['gps_lat'];
_recov_lon = vehicles[_serial].curr_position['gps_lon'];
- // // Now get the last position of the sonde.
- // _sonde = {
- // 'lat':_recov_lat,
- // 'lon':_recov_lon,
- // 'alt':0.0
- // };
-
- // // Now get the chaser position.
- // _chaser = {
- // 'lat': parseFloat($('#cc_lat').text()),
- // 'lon': parseFloat($('#cc_lon').text()),
- // 'alt': 0.0
- // };
-
- // // Calculate the distance from the sonde
- // _lookangles = calculate_lookangles(_chaser, _sonde);
-
- // if( (_lookangles.range > _range_limit ) && _run_checks){
- // $('#pr_last_report').text("Outside distance limit.");
- // return;
- // }
+ // Now get the last position of the sonde.
+ _sonde = {
+ 'lat':_recov_lat,
+ 'lon':_recov_lon,
+ 'alt':0.0
+ };
+
+ // Now get the chaser position.
+ _chaser = {
+ 'lat': parseFloat($('#cc_lat').text()),
+ 'lon': parseFloat($('#cc_lon').text()),
+ 'alt': 0.0
+ };
+
+ // Calculate the distance from the sonde
+ _lookangles = calculate_lookangles(_chaser, _sonde);
+
+ if( (_lookangles.range > _range_limit ) && _run_checks){
+ $('#pr_last_report').text("Outside distance limit.");
+ return;
+ }
if($("#sw_use_car_pos").hasClass('on')){
_recov_lat = parseFloat($('#cc_lat').text());
diff --git a/js/tracker.js b/js/tracker.js
index 1fb47fa..c68462b 100644
--- a/js/tracker.js
+++ b/js/tracker.js
@@ -63,7 +63,7 @@ var graph_vehicle = null;
var manual_pan = false;
var car_index = 0;
-var car_colors = ["blue", "red", "green", "yellow"];
+var car_colors = ["blue", "red", "green", "yellow", "teal", "purple"];
var balloon_index = 0;
var balloon_colors_name = ["red", "blue", "green", "yellow", "purple", "orange", "cyan"];
var balloon_colors = ["#f00", "blue", "green", "#FDFC30", "#c700e6", "#ff8a0f", "#0fffca"];
@@ -715,7 +715,7 @@ function load() {
map.on('zoomend', function() {
//do check for horizon labels
- if (!offline.get("opt_hide_horizon")) {
+ if (offline.get("opt_hide_horizon")) {
for (key in vehicles) {
if (vehicles[key]["vehicle_type"] == "balloon") {
if (vehicles[key]["horizon_circle"]["_map"])
@@ -3416,7 +3416,7 @@ function addPosition(position) {
} else {
map.addLayer(vehicle.marker.shadow);
- if(offline.get('opt_hide_horizon') == false){
+ if(!offline.get('opt_hide_horizon') == false){
map.addLayer(vehicle.horizon_circle);
map.addLayer(vehicle.subhorizon_circle);
map.addLayer(vehicle.horizon_circle_title);
@@ -3490,7 +3490,7 @@ function addPosition(position) {
interactive: false,
});
- if (!offline.get("opt_hide_horizon")) {
+ if (offline.get("opt_hide_horizon")) {
horizon_circle.addTo(map);
horizon_circle_title.addTo(map);
}
@@ -3522,7 +3522,7 @@ function addPosition(position) {
interactive: false,
});
- if (!offline.get("opt_hide_horizon")) {
+ if (offline.get("opt_hide_horizon")) {
subhorizon_circle.addTo(map);
subhorizon_circle_title.addTo(map);
}
@@ -5372,7 +5372,6 @@ function refreshUI() {
if(follow_vehicle !== null) update_lookangles(follow_vehicle);
}
-
function hideHorizonRings(){
for(var vcallsign in vehicles) {
if(vehicles[vcallsign].vehicle_type == "balloon"){
@@ -5383,6 +5382,7 @@ function hideHorizonRings(){
}
}
}
+
function showHorizonRings(){
for(var vcallsign in vehicles) {
if(vehicles[vcallsign].vehicle_type == "balloon"){
@@ -5401,6 +5401,7 @@ function hideTitles(){
}
}
}
+
function showTitles(){
for(var vcallsign in vehicles) {
if(vehicles[vcallsign].vehicle_type == "balloon" || vehicles[vcallsign].vehicle_type == "car"){