Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added img/markers/car-purple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/markers/car-teal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 14 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ <h2>Contribute</h2>
<div class="slimContainer">
<h2><i class="icon-settings rfloat"></i>Settings</h2>
<hr/>
<h4>General</h4>
<hr/>
<div class="row option">
<span><b>Interpolate gaps in telemetry</b></span>
<div class="switch off" id="sw_interpolate">
Expand Down Expand Up @@ -164,6 +166,8 @@ <h2><i class="icon-settings rfloat"></i>Settings</h2>
<input type="checkbox" id="opt_hide_timebox">
</div>
</div>
<h4>Visibility</h4>
<hr/>
<div class="row option">
<span><b>Hide receivers from the map</b></span>
<div class="switch off" id="sw_hide_receivers">
Expand All @@ -186,14 +190,7 @@ <h2><i class="icon-settings rfloat"></i>Settings</h2>
</div>
</div>
<div class="row option">
<span><b>Highlight selected vehicle</b></span>
<div class="switch off" id="sw_hilight_vehicle">
<span class="thumb"></span>
<input type="checkbox" id="opt_hilight_vehicle">
</div>
</div>
<div class="row option">
<span><b>Hide Horizon Rings</b></span>
<span><b>Show Horizon Rings</b></span>
<div class="switch off" id="sw_hide_horizon">
<span class="thumb"></span>
<input type="checkbox" id="opt_hide_horizon">
Expand All @@ -213,6 +210,15 @@ <h2><i class="icon-settings rfloat"></i>Settings</h2>
<input type="checkbox" id="opt_layers_launches">
</div>
</div>
<h4>Other</h4>
<hr/>
<div class="row option">
<span><b>Highlight selected vehicle</b></span>
<div class="switch off" id="sw_hilight_vehicle">
<span class="thumb"></span>
<input type="checkbox" id="opt_hilight_vehicle">
</div>
</div>
<h4>Overlays</h4>
<hr/>
<div class="row option">
Expand Down
4 changes: 2 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,10 @@ $(window).ready(function() {
break;
case "opt_hide_horizon":
if(on) {
hideHorizonRings();
showHorizonRings();
}
else {
showHorizonRings();
hideHorizonRings();
}
break;
case "opt_hide_titles":
Expand Down
50 changes: 24 additions & 26 deletions js/chasecar.lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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());
Expand Down
13 changes: 7 additions & 6 deletions js/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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"){
Expand All @@ -5383,6 +5382,7 @@ function hideHorizonRings(){
}
}
}

function showHorizonRings(){
for(var vcallsign in vehicles) {
if(vehicles[vcallsign].vehicle_type == "balloon"){
Expand All @@ -5401,6 +5401,7 @@ function hideTitles(){
}
}
}

function showTitles(){
for(var vcallsign in vehicles) {
if(vehicles[vcallsign].vehicle_type == "balloon" || vehicles[vcallsign].vehicle_type == "car"){
Expand Down