Skip to content

Commit 3fe5206

Browse files
Mark JessopMark Jessop
authored andcommitted
Remove distance limits when marking a sonde as recovered
1 parent 1ff0693 commit 3fe5206

File tree

2 files changed

+30
-27
lines changed

2 files changed

+30
-27
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ <h2>Chase car mode</h2>
297297
<h3>Report Recovery</h3>
298298
<hr>
299299
<div class="row">
300-
<span>You can report a recovery here. Enter the serial number (no type code, e.g. 'S1234567'), tick recovered/not recovered, and add some notes. You must have location enabled, and a callsign set above. If the sonde is currently on the map, you must be located within 50km of it.</span>
300+
<span>You can report a recovery here. Enter the serial number (no type code, e.g. 'S1234567'), tick recovered/not recovered, and add some notes. If the sonde is not on the map, type its callsign into the top-left search box and press enter to retrieve historical data. You can then mark it as recovered. Optionally, you can use your location instead of the sonde's last location.</span>
301301
</div>
302302
<div class="row">
303303
<span><b>Serial</b></span>

js/chasecar.lib.js

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ ChaseCar.updatePosition = function(callsign, position) {
4545

4646
ChaseCar.markRecovered = function(){
4747

48-
_run_checks = true;
49-
_range_limit = 200000; // 200 km
48+
// Distance limits removed 2021-12-04
49+
//_run_checks = true;
50+
//_range_limit = 200000; // 200 km
5051

5152
// Get the serial number to be marked recovered
5253
_serial = $("#pr_serial").val().trim();
@@ -62,7 +63,7 @@ ChaseCar.markRecovered = function(){
6263
_callsign = $("#cc_callsign").val().trim();
6364
if (_callsign == "" || _callsign == undefined || _callsign.length == 0)
6465
{
65-
$('#pr_last_report').text("Enter a Chase-Car callsign!");
66+
$('#pr_last_report').text("Enter a callsign in the chase-car section above!");
6667
return;
6768
}
6869

@@ -77,41 +78,43 @@ ChaseCar.markRecovered = function(){
7778
_recov_lon = parseFloat($('#cc_lon').text());
7879

7980
if (_recov_lat == 0.0 && _recov_lon == 0.0){
80-
$('#pr_last_report').text("Location Reporting must be enabled!");
81+
$('#pr_last_report').text("Location Reporting must be enabled to use chase-car position!");
8182
return;
8283
}
8384

8485
} else {
85-
$('#pr_last_report').text("Sonde not on map, select 'Use Car Position' and try again.");
86+
$('#pr_last_report').text("Sonde not on map, either search for it in the search box (top left), or select 'Use Car Position' and try again.");
8687
return;
8788
}
8889

8990
} else {
91+
// NOTE - Distance checks now removed.
92+
9093
// Sonde is on the map, so run some additional checks.
9194
_recov_lat = vehicles[_serial].curr_position['gps_lat'];
9295
_recov_lon = vehicles[_serial].curr_position['gps_lon'];
9396

94-
// Now get the last position of the sonde.
95-
_sonde = {
96-
'lat':_recov_lat,
97-
'lon':_recov_lon,
98-
'alt':0.0
99-
};
100-
101-
// Now get the chaser position.
102-
_chaser = {
103-
'lat': parseFloat($('#cc_lat').text()),
104-
'lon': parseFloat($('#cc_lon').text()),
105-
'alt': 0.0
106-
};
107-
108-
// Calculate the distance from the sonde
109-
_lookangles = calculate_lookangles(_chaser, _sonde);
110-
111-
if( (_lookangles.range > _range_limit ) && _run_checks){
112-
$('#pr_last_report').text("Outside distance limit.");
113-
return;
114-
}
97+
// // Now get the last position of the sonde.
98+
// _sonde = {
99+
// 'lat':_recov_lat,
100+
// 'lon':_recov_lon,
101+
// 'alt':0.0
102+
// };
103+
104+
// // Now get the chaser position.
105+
// _chaser = {
106+
// 'lat': parseFloat($('#cc_lat').text()),
107+
// 'lon': parseFloat($('#cc_lon').text()),
108+
// 'alt': 0.0
109+
// };
110+
111+
// // Calculate the distance from the sonde
112+
// _lookangles = calculate_lookangles(_chaser, _sonde);
113+
114+
// if( (_lookangles.range > _range_limit ) && _run_checks){
115+
// $('#pr_last_report').text("Outside distance limit.");
116+
// return;
117+
// }
115118

116119
if($("#sw_use_car_pos").hasClass('on')){
117120
_recov_lat = parseFloat($('#cc_lat').text());

0 commit comments

Comments
 (0)