Skip to content

Commit eeef59e

Browse files
authored
Merge pull request projecthorus#174 from projecthorus/testing
Fix callsigns & predictions
2 parents 8d6981b + 9114d30 commit eeef59e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ $(window).ready(function() {
670670
if(currentPosition && currentPosition.marker) map.addLayer(currentPosition.marker);
671671
// turning the switch on
672672
} else {
673-
if(callsign.length == null || callsign.length < 5) { alert('Please enter a valid callsign, at least 5 characters'); return; }
673+
if(callsign.length == null || callsign.length < 3) { alert('Please enter a valid callsign, at least 3 characters'); return; }
674674
if(!callsign.match(/^[a-zA-Z0-9\_\-]+$/)) { alert('Invalid characters in callsign (use only a-z,0-9,-,_)'); return; }
675675

676676
field.attr('disabled','disabled');

js/tracker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,8 @@ function launchSitePredictions(times, station, properties, marker) {
718718
var completed = 0;
719719
for (var i = 0; i < dates.length; i++) {
720720
var lon = ((360 + (position[1] % 360)) % 360)
721-
var url = "https://predict.cusf.co.uk/api/v1/?launch_latitude=" + position[0] + "&launch_longitude=" + lon + "&launch_datetime=" + dates[i] + "&ascent_rate=" + properties[0] + "&burst_altitude=" + properties[2] + "&descent_rate=" + properties[1];
722-
//var url = "https://api.v2.sondehub.org/tawhiri?launch_latitude=" + position[0] + "&launch_longitude=" + lon + "&launch_datetime=" + dates[i] + "&ascent_rate=" + properties[0] + "&burst_altitude=" + properties[2] + "&descent_rate=" + properties[1];
721+
//var url = "https://predict.cusf.co.uk/api/v1/?launch_latitude=" + position[0] + "&launch_longitude=" + lon + "&launch_datetime=" + dates[i] + "&ascent_rate=" + properties[0] + "&burst_altitude=" + properties[2] + "&descent_rate=" + properties[1];
722+
var url = "https://api.v2.sondehub.org/tawhiri?launch_latitude=" + position[0] + "&launch_longitude=" + lon + "&launch_datetime=" + dates[i] + "&ascent_rate=" + properties[0] + "&burst_altitude=" + properties[2] + "&descent_rate=" + properties[1];
723723
showPrediction(url).done(handleData).fail(handleError);
724724
}
725725
function handleData(data) {

0 commit comments

Comments
 (0)