diff --git a/js/app.js b/js/app.js index 36f8adc..33eefb5 100644 --- a/js/app.js +++ b/js/app.js @@ -670,7 +670,7 @@ $(window).ready(function() { if(currentPosition && currentPosition.marker) map.addLayer(currentPosition.marker); // turning the switch on } else { - if(callsign.length == null || callsign.length < 5) { alert('Please enter a valid callsign, at least 5 characters'); return; } + if(callsign.length == null || callsign.length < 3) { alert('Please enter a valid callsign, at least 3 characters'); return; } if(!callsign.match(/^[a-zA-Z0-9\_\-]+$/)) { alert('Invalid characters in callsign (use only a-z,0-9,-,_)'); return; } field.attr('disabled','disabled'); diff --git a/js/tracker.js b/js/tracker.js index 8ea4a74..1045406 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -718,8 +718,8 @@ function launchSitePredictions(times, station, properties, marker) { var completed = 0; for (var i = 0; i < dates.length; i++) { var lon = ((360 + (position[1] % 360)) % 360) - 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]; - //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]; + //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]; + 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]; showPrediction(url).done(handleData).fail(handleError); } function handleData(data) {