Commit 58c48dd5 authored by Stephen D's avatar Stephen D
Browse files

New TLE: AMSAT Keppler. Thank you to VE4NSA!

parent be773547
......@@ -120,27 +120,18 @@ app.controller('satTrack-ctrl', function($scope, NgMap) {
});
function loadSatelliteData(callback) {
$.getJSON("names.json", function(json) {
var idsAndNames = [];
for(var i = 0; i < json.length; i++) {
idsAndNames[json[i].norad_cat_id] = json[i].names;
}
//ISS is silly
idsAndNames[25544] = "ISS";
$.get("ham.txt", function(data) {
$.get("nasabare.txt", function(data) {
var splitLines = data.split(/\r?\n/);
var satellites = []
for(var i = 0; i < splitLines.length; i += 3) { //3 lines per satellite, so advance by 1 satellite each time
if(splitLines[i] != '') {
var sat = satellite.twoline2satrec(splitLines[i + 1], splitLines[i + 2]);
var name = idsAndNames[sat.satnum];
if(!name) name = splitLines[i].slice(2); //If not found in name database, use unfriendly name
var name = splitLines[i];
satellites.push({name: name, satrec: sat, enabled: true});
}
}
callback(satellites);
});
});
}
function minDate(date1, date2) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment