Commit 4fbce3f8 authored by Stephen D's avatar Stephen D
Browse files

Ported entire thing to frontend only

parent 1e77b8b6
......@@ -29,6 +29,6 @@ build/Release
node_modules
# Satellite data
3le.txt
ham.txt
names.json
*/3le.txt
*/ham.txt
*/names.json
This diff is collapsed.
......@@ -8,7 +8,7 @@ Check it out here: [ham.scd31.com](https://ham.scd31.com)
## Information
The server runs on Node.JS, using cluster to scale vertically. At the heart of the software is the calcSatellite function, which is what actually determines viable satellites. It's terribly, terribly unoptimized. For each satellite, it advances by 30 seconds at a time, up to a week in the future. This will need to be rewritten soon, as it takes upwards of 5 seconds(!) to run. I intend to estimate how long in the future the satellite will pass by based on its current orbit and elevation, and then advance that far into the future. I may also move the function to the client, which would significantly free up server resources.
The server is nothing more than Nginx. The entire program runs on the client now, with cron jobs updating the databases used. At the heart of the software is the calcSatellite function, which is what actually determines viable satellites. It's terribly, terribly unoptimized. For each satellite, it advances by 30 seconds at a time, up to a week in the future. This will need to be rewritten soon, as it takes upwards of 5 seconds(!) to run. I intend to estimate how long in the future the satellite will pass by based on its current orbit and elevation, and then advance that far into the future.
## License
......
0 OSCAR 7
1 07530U 74089B 17047.17792103 -.00000028 00000-0 98472-4 0 9997
2 07530 101.6144 18.3268 0011870 195.7705 233.7580 12.53625490933698
0 OSCAR 8
1 10703U 78026B 17046.86606668 -.00000229 00000-0 -12836-3 0 9996
2 10703 98.8715 13.1746 0006349 314.5888 98.0755 13.99221952987621
0 RADIO 3
1 12997U 81120A 17046.30579480 .00000001 00000-0 -85672-4 0 9998
2 12997 82.9638 355.4827 0057562 204.2479 312.0474 12.15813543560682
0 RADIO 8
1 12998U 81120B 17047.14546949 .00000076 00000-0 80251-3 0 9994
2 12998 82.9623 166.1774 0018215 246.7587 182.9198 12.03148643544552
0 RADIO 5
1 12999U 81120C 17046.51437538 -.00000056 00000-0 -75699-3 0 9998
2 12999 82.9626 138.5457 0015678 108.8069 27.4102 12.05260485547170
0 RADIO 4
1 13000U 81120D 17046.21707731 -.00000047 00000-0 -64148-3 0 9991
2 13000 82.9619 118.9063 0017938 352.4789 61.4023 12.06871471549219
0 RADIO 7
1 13001U 81120E 17047.22478715 -.00000007 00000-0 -17971-3 0 9999
2 13001 82.9561 88.8073 0023622 211.3022 215.9725 12.08895250551886
0 RADIO 6
1 13002U 81120F 17046.91070472 -.00000000 00000-0 -10132-3 0 9998
2 13002 82.9608 23.0396 0050735 320.8325 52.1575 12.13790327558162
0 OSCAR 10
1 14129U 83058B 17046.28957944 -.00000556 00000-0 00000+0 0 9993
2 14129 26.8978 53.9176 6022100 272.8280 238.7438 2.05871905225304
0 OSCAR 11 (UoSAT 2)
1 14781U 84021B 17047.18008274 .00000069 00000-0 14855-4 0 9997
2 14781 97.7153 97.2417 0007400 229.6890 130.3678 14.82857367772412
0 JAS 1 (FUJI 1)
1 16909U 86061B 17045.91130833 -.00000108 +00000-0 -75896-4 0 9991
2 16909 050.0131 194.7122 0011354 128.2431 046.6939 12.44466724387575
0 COSMOS 1861
1 18129U 87054A 17046.23268090 .00000045 00000-0 32826-4 0 9997
2 18129 82.9290 325.8289 0013051 70.2453 39.4306 13.72989989485738
0 OSCAR 14 (UOSAT 3)
1 20437U 90005B 17047.11260601 -.00000006 00000-0 14381-4 0 9994
2 20437 98.6482 351.2456 0010764 167.9685 259.5795 14.32245427413870
0 OSCAR 15 (UOSAT 4)
1 20438U 90005C 17046.48314837 -.00000009 00000-0 13601-4 0 9992
2 20438 98.6986 353.9625 0009026 228.0281 245.6371 14.30980759412874
0 OSCAR 16 (PACSAT)
1 20439U 90005D 17047.07349747 .00000009 00000-0 19488-4 0 9995
2 20439 98.5991 347.2628 0011214 154.4335 269.2059 14.32667273414066
0 OSCAR 17 (DOVE)
1 20440U 90005E 17046.05681892 .00000025 00000-0 25096-4 0 9994
2 20440 98.5793 345.4837 0011457 143.3063 277.5841 14.33061311414157
0 OSCAR 18 (WEBERSAT)
1 20441U 90005F 17046.88831347 .00000022 00000-0 24076-4 0 9992
2 20441 98.5823 345.5955 0011952 149.8362 251.1699 14.32715136414123
0 OSCAR 19 (LUSAT)
1 20442U 90005G 17047.05769714 -.00000001 00000-0 15803-4 0 9997
2 20442 98.5667 344.8660 0012424 141.2341 218.9737 14.32848448414276
0 JAS 1B (FUJI 2)
1 20480U 90013C 17047.02530568 -.00000041 00000-0 -12575-4 0 9996
2 20480 99.0313 202.9844 0539505 305.5437 49.6487 12.83414370266177
0 INFORMATOR 1
1 21087U 91006A 17046.84630906 .00000051 00000-0 37147-4 0 9990
2 21087 82.9451 131.1573 0035757 31.7824 103.4351 13.75242747307326
0 COSMOS 2123
1 21089U 91007A 17047.23476149 .00000045 00000-0 30768-4 0 9999
2 21089 82.9265 347.5668 0030619 84.9278 22.6303 13.74643924305995
0 OSCAR 22 (UoSAT 5)
1 21575U 91050B 17046.06407455 -.00000002 00000-0 13782-4 0 9992
2 21575 98.7624 59.5229 0006425 309.3676 50.6942 14.40783274343692
0 OSCAR 23 (KITSAT 1)
1 22077U 92052B 17045.95369698 -.00000074 +00000-0 -47133-4 0 9993
2 22077 066.0822 222.5914 0002178 359.2984 157.0493 12.86517131151299
0 ARASENE
1 22654U 93031B 17045.38203622 -.00000124 +00000-0 +00000-0 0 9996
2 22654 001.8306 274.3989 2914625 335.7420 278.1753 01.42205513118921
0 KITSAT B
1 22825U 93061C 17047.14433509 .00000006 00000-0 20118-4 0 9998
2 22825 98.7963 11.3443 0007889 331.9876 28.0880 14.29985750220109
0 POSAT 1
1 22826U 93061D 17047.13318011 -.00000003 00000-0 16580-4 0 9994
2 22826 98.7906 11.4293 0008262 321.5621 38.4971 14.30313342220278
0 ITAMSAT
1 22828U 93061F 17045.96877592 -.00000030 00000-0 60804-5 0 9998
2 22828 98.7811 9.0803 0008876 290.5755 69.4475 14.30622684188468
0 EYESAT A
1 22829U 93061G 17047.17683153 -.00000004 00000-0 15968-4 0 9993
2 22829 98.7849 12.9570 0008669 276.3079 152.3077 14.30957800220766
0 RADIO ROSTO
1 23439U 94085A 17045.96227402 -.00000052 +00000-0 -27771-3 0 9992
2 23439 064.8161 056.8576 0168177 266.6943 109.0146 11.27566048911633
0 JAS 2
1 24278U 96046B 17047.18929030 -.00000026 00000-0 12843-4 0 9990
2 24278 98.5804 306.4422 0349444 290.9155 65.4914 13.53074654 12515
0 TMSAT
1 25396U 98043C 17046.85008664 .00000023 00000-0 28289-4 0 9992
2 25396 98.5716 353.6964 0002195 346.0772 14.0346 14.24428077966890
0 TECHSAT 1B
1 25397U 98043D 17047.09667191 -.00000002 00000-0 17911-4 0 9994
2 25397 98.5979 352.0677 0001644 36.5257 323.6033 14.23614909966569
0 SEDSAT 1
1 25509U 98061B 17047.16335083 .00000210 00000-0 30524-4 0 9994
2 25509 31.4330 31.9689 0346921 22.7233 338.8351 14.30259508956803
0 PAN SAT
1 25520U 98064B 17046.50718278 .00000816 00000-0 21022-4 0 9993
2 25520 28.4587 93.0161 0005413 94.5281 265.5933 15.28191674 15656
0 ISS (ZARYA)
1 25544U 98067A 17047.47948720 .00002655 00000-0 46958-4 0 9994
2 25544 51.6437 280.0377 0007193 195.6024 227.4300 15.54375969 42987
0 ORSTED
1 25635U 99008B 17046.15769249 .00000032 00000-0 15675-4 0 9991
2 25635 96.4825 340.0401 0137332 276.7707 81.7880 14.47966356948570
0 SUNSAT
1 25636U 99008C 17047.19753527 .00000032 00000-0 16418-4 0 9995
2 25636 96.4877 325.1504 0145349 347.1311 12.6190 14.44597645947302
0 OSCAR 36 (UOSAT 12)
1 25693U 99021A 17045.80935010 -.00000073 00000-0 93510-5 0 9993
2 25693 64.5563 142.8466 0023162 324.1344 35.8205 14.80713902962041
0 KITSAT 3
1 25756U 99029A 17046.44433285 .00000026 00000-0 17256-4 0 9998
2 25756 98.4133 325.5478 0012580 253.5186 106.4627 14.53651088939801
0 TUBSAT
1 25757U 99029B 17047.23261733 .00000118 00000-0 41001-4 0 9991
2 25757 98.4191 319.0401 0013358 314.1368 45.8726 14.51352486938926
0 IRS P4 (OCEANSAT 1)
1 25758U 99029C 17046.20351536 .00000045 00000-0 21668-4 0 9995
2 25758 98.1682 128.0021 0001944 287.3250 72.7733 14.52326816939022
0 TIUNGSAT 1
1 26548U 00057D 17047.19755838 .00000046 00000-0 21633-4 0 9991
2 26548 64.5519 18.4373 0043402 241.4337 118.2401 14.88936236888089
0 AMSAT OSCAR 40
1 26609U 00072B 17046.86124791 -.00000356 00000-0 00000+0 0 9992
2 26609 6.3610 247.6633 7958979 80.8342 352.0698 1.25588375 74818
0 PCSAT
1 26931U 01043C 17047.21836441 -.00000046 00000-0 13998-4 0 9992
2 26931 67.0512 43.3080 0007169 280.9208 79.1086 14.30446766803041
0 SAPPHIRE
1 26932U 01043D 17046.19081340 -.00000066 00000-0 64282-5 0 9994
2 26932 67.0559 48.1232 0006415 294.4968 65.5464 14.30239272802928
0 RUBIN 2
1 27605U 02058A 17046.51430402 -.00000034 00000-0 15691-4 0 9996
2 27605 64.5559 119.3801 0039453 151.7520 208.5734 14.74878761761538
0 SAUDISAT 1C
1 27607U 02058C 17046.53057957 .00000023 00000-0 23977-4 0 9993
2 27607 64.5558 137.3121 0038574 151.9200 208.3994 14.75282819761163
0 CUTE-1
1 27844U 03031E 17046.06781065 .00000036 00000-0 35927-4 0 9992
2 27844 98.6920 56.8406 0009411 347.0876 13.0059 14.22014590706964
0 CUBESAT XI 4
1 27848U 03031J 17047.01995760 .00000023 00000-0 30384-4 0 9999
2 27848 98.7015 57.9849 0009436 353.6854 6.4203 14.21632351706982
0 MOZHAYETS 4
1 27939U 03042A 17047.21871706 .00000117 00000-0 29421-4 0 9991
2 27939 97.9188 195.9977 0011804 247.6701 235.5970 14.66520768715584
0 AMSAT ECHO
1 28375U 04025K 17046.85112470 .00000023 00000-0 20189-4 0 9991
2 28375 98.3507 342.8868 0081439 289.7815 69.4607 14.41824333664330
0 HAMSAT
1 28650U 05017B 17046.89402863 .00000262 00000-0 33740-4 0 9993
2 28650 97.6373 25.4517 0023801 168.6768 191.4990 14.88560706638126
0 CUBESAT XI 5
1 28895U 05043F 17047.14734482 .00000153 00000-0 38317-4 0 9991
2 28895 97.8492 215.1185 0017335 162.6288 197.5512 14.63341581602787
0 CUTE-1.7+APD II
1 32785U 08021C 17046.51495259 .00000231 00000-0 30950-4 0 9991
2 32785 97.5787 76.2728 0012529 205.5615 154.4984 14.87794897476809
0 COMPASS 1
1 32787U 08021E 17047.13768452 .00000249 00000-0 29577-4 0 9992
2 32787 97.5748 84.9738 0012831 175.7202 184.4130 14.92426788477445
0 DELFI C3
1 32789U 08021G 17047.18967338 .00001340 00000-0 10018-3 0 9995
2 32789 97.5743 107.9104 0013742 149.3037 210.8996 15.04384263478675
0 SEEDS
1 32791U 08021J 17046.50367374 .00000416 00000-0 48431-4 0 9991
2 32791 97.5772 80.2421 0013244 191.6913 168.3999 14.90088940477020
0 YUBELEINY
1 32953U 08025A 17047.15360982 .00000009 00000-0 -37251-5 0 9993
2 32953 82.5053 314.9302 0018379 187.5216 172.5591 12.43074583396383
0 PRISM (HITOMI)
1 33493U 09002B 17047.19915778 .00000524 00000-0 53009-4 0 9991
2 33493 98.1853 284.4148 0016586 119.7964 240.4924 14.95452819437694
0 STARS (KUKAI)
1 33498U 09002G 17047.12678149 .00000212 00000-0 36660-4 0 9995
2 33498 98.3109 217.0995 0011404 24.2245 42.0044 14.78479887434010
0 KKS-1 (KISEKI)
1 33499U 09002H 17046.52619466 .00000122 00000-0 26182-4 0 9994
2 33499 98.3157 208.4497 0010028 47.5439 312.6615 14.75133914433428
0 SWISSCUBE
1 35932U 09051B 17046.36024198 .00000159 00000-0 46988-4 0 9992
2 35932 98.4759 182.8245 0006560 263.3579 96.6872 14.55956202392593
0 BEESAT
1 35933U 09051C 17046.35682411 .00000129 00000-0 39988-4 0 9999
2 35933 98.4792 184.0561 0004705 279.4926 80.5739 14.56082182392692
0 UWE-2
1 35934U 09051D 17046.90161784 .00000101 00000-0 34014-4 0 9991
2 35934 98.4706 182.2047 0005379 280.8457 79.2134 14.55612550392725
0 ITUPSAT 1
1 35935U 09051E 17045.93391087 +.00000083 +00000-0 +30100-4 0 9996
2 35935 098.4902 183.8782 0007026 272.5238 087.5155 14.55280707392420
0 XIWANG-1 (HOPE-1)
1 36122U 09072B 17047.18769088 -.00000028 00000-0 38865-4 0 9993
2 36122 100.1148 78.8296 0007880 150.4410 209.7150 13.16338236344707
0 JUGNU
1 37839U 11058B 17047.20179043 .00000316 00000-0 26602-4 0 9990
2 37839 19.9616 104.0597 0018780 290.2528 94.5693 14.12571419276570
0 SRMSAT
1 37841U 11058D 17045.62655076 .00000318 00000-0 29782-4 0 9996
2 37841 19.9712 152.7724 0011760 174.3570 313.4348 14.10564584275956
0 AUBIESAT-1
1 37854U 11061E 17047.02977111 .00001041 00000-0 64039-4 0 9995
2 37854 101.7083 218.9956 0168893 73.4239 288.5446 15.03611221288728
0 M-CUBED/EXP-1 PRIME
1 37855U 11061F 17047.15548024 .00001251 00000-0 73903-4 0 9990
2 37855 101.7203 217.0710 0182058 78.8217 283.3399 15.02562577288611
<html ng-app="satTrackApp">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB3FKjZo6Fe6Lg--EU1Ci7V4rHIiU9Igb4"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<script src="js/ng-map.min.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/satellite.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<div id="container" ng-controller="satTrack-ctrl">
<div id="controls">
<table border="1" ng-show="places.length > 0">
<tr>
<td><b>ID</b></td>
<td><b>Latitude</b></td>
<td><b>Longitude</b></td>
<td><b>Minimum AoA</b></td>
<td></td>
</tr>
<tr ng-repeat="point in places">
<td>{{$index + 1}}</td>
<td>{{point.marker.position.lat().toFixed(6)}}</td>
<td>{{point.marker.position.lng().toFixed(6)}}</td>
<td><input type="number" min="0" max="90" ng-model="point.angle"> deg</td>
<td><button type="button" class="btn btn-danger" ng-click="removePoint($index)">Remove</button></td>
</tr>
</table>
<div style="margin: 6px">Click on the map to add a point</div><BR><BR>
<center>
<button type="button" class="btn btn-success" ng-disabled="places.length == 0" ng-click="getPasses()">Calculate Passes</button>
<span class='glyphicon-left glyphicon glyphicon-refresh spinning' ng-show='isGettingPasses'></span>
</center><BR>
<table border="1">
<tr>
<td><b>Date</b></td>
<td><b>Sat name</b></td>
<td><b>Start time</b></td>
<td><b>Max AoAs</b></td>
<td><b>End time</b></td>
<td><b>Total time of contact<b></td>
</tr>
<tr ng-repeat="pass in passes">
<td>{{getDate(pass.time_start)}}</td>
<td>{{pass.name}}</td>
<td>{{getTime(pass.time_start)}}</td>
<td style="white-space: nowrap;"><div ng-repeat="stat in pass.pointStats">
Point {{$index + 1}}: {{stat.maxElv.toFixed(0)}} deg @ {{getTime(stat.timeMaxElv)}}
</div></td>
<td>{{getTime(pass.time_end)}}</td>
<td>{{getDifferenceInMinutes(pass.time_end, pass.time_start)}}</td>
</tr>
</table><br>
<div id="footer">
<center>
Developed by Stephen Downward, callsign VA1QLE.<br>
<a href="https://git.scd31.com/laptopdude90/multipoint-satellite-tracker">Git repository</a>
</center>
</div>
</div>
<div id="map">
<ng-map center="39.82, -77.01" zoom="4"></ng-map>
</div>
</div>
</body>
</html>
var app = angular.module('satTrackApp', ['ngMap']);
app.controller('satTrack-ctrl', function($scope, NgMap) {
$scope.places = [];
$scope.passes = [];
$scope.isGettingPasses = false;
var satellites = [];
loadSatelliteData(function(satList) {
satellites = satList;
});
var elevator;
$scope.removePoint = function(id) {
$scope.places[id].marker.setMap(null);
$scope.places[id].marker = null;
$scope.places.splice(id, 1);
for(var i = 0; i < $scope.places.length; i++) {
$scope.places[i].marker.setLabel((i + 1).toString());
}
}
NgMap.getMap().then(function(map) {
google.maps.event.addListener(map, 'click', function(event) {
var marker = new google.maps.Marker({
position: event.latLng,
map: map,
label: ($scope.places.length + 1).toString(),
draggable: true
});
elevator = new google.maps.ElevationService;
google.maps.event.addListener(marker, 'dragend', function () {
$scope.$apply();
});
$scope.places.push({marker: marker, angle: 10});
$scope.$apply();
});
});
$scope.getPasses = function() {
$scope.isGettingPasses = true;
callsRemaining = $scope.places.length;
for(var i = 0; i < $scope.places.length; i++) {
let place = $scope.places[i];
elevator.getElevationForLocations({locations: [$scope.places[i].marker.position]}, function(results, status) {
if(status === 'OK' && results[0]) {
place.height = Math.max(results[0].elevation / 1000, 0);
callsRemaining--;
if(callsRemaining <= 0) sendCoords();
} else {
alert('Something went very wrong');
}
});
}
var sendCoords = function() {
var coords = $scope.places.map(function(a) {
return {
lat: a.marker.position.lat(),
lng: a.marker.position.lng(),
height: a.height,
angle: a.angle
};
});
//The data returned from calcSats isn't fit for displaying,
//as it is arranged into groups by satallite. Below fixes that
//Make new array equal to all the old array.passes
var passes = calcSatellites(coords, satellites).map(function(a) {
//Add satellite names to each pass
a.passes.map(function(b) {
b.name = a.name;
return b;
});
return a.passes;
});
passes = flatten(passes);
//Sort by time_start
passes.sort(function(a,b){
return a.time_start - b.time_start;
});
$scope.passes = passes;
$scope.isGettingPasses = false;
$scope.$apply();
}
}
$scope.getDate = function(date) {
//console.log(date);
return moment(date).format("MMM D");
}
$scope.getTime = function(date) {
return moment(date).format("HH:mm:ss");
}
$scope.getDifferenceInMinutes = function(a, b) {
var d = moment.duration(moment(a).diff(moment(b)));
return (d / 60000) + " minutes";
}
});
function flatten(arr) {
return arr.reduce(function (flat, toFlatten) {
return flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);
}, []);
}
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;
}
$.get("ham.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
satellites.push({name: name, satrec: sat});
}
}
callback(satellites);
});
});
}
function calcSatellites(ground_coords, satellites) {
//Convert coords to radians
var ground_coords_rad = [];
for(var i = 0; i < ground_coords.length; i++) { //Coords
var radian_coords = {
latitude: ground_coords[i].lat * Math.PI / 180,
longitude: ground_coords[i].lng * Math.PI / 180,
height: ground_coords[i].height};
ground_coords_rad.push(radian_coords);
}
var viableSats = [];
var currentTimestamp = new Date();
for(var i = 0; i < satellites.length; i++) { //Satellites
if(satellites[i].satrec.error === 0) {
var passes = [];
var time_start = 0;
var pointStats = [];
for(var secondsFromNow = 0; secondsFromNow < 604800; secondsFromNow += 30) { //Up to a week in the future, in 30 second increments
var timeToProgressTo = new Date(currentTimestamp.getTime() + (secondsFromNow * 1000));
//console.log(satellites[i].satrec.error);
var viableTime = true;
for(var j = 0; j < ground_coords_rad.length; j++) { //Coordinates
var g_coords = ground_coords_rad[j];
var posAndVel = satellite.propagate(satellites[i].satrec, timeToProgressTo);
if(posAndVel.position != false && posAndVel.position != null) {
var lookAngles = satellite.ecfToLookAngles(g_coords, satellite.eciToEcf(posAndVel.position, satellite.gstimeFromDate(timeToProgressTo)));
var elevationDeg = lookAngles.elevation * 180 / Math.PI;
//Define pointStats[j]
if(!pointStats[j]) pointStats[j] = {maxElv: 0, timeMaxElv: 0};
if(elevationDeg > pointStats[j].maxElv && elevationDeg > ground_coords[j].angle) { //Has to be during a pass
pointStats[j].maxElv = elevationDeg;
pointStats[j].timeMaxElv = timeToProgressTo;
}
if(elevationDeg < ground_coords[j].angle) {
viableTime = false;
if(time_start != 0) {
//Push pass to array and reset for next pass
passes.push({
time_start: time_start,
pointStats: pointStats,
time_end: timeToProgressTo
});
time_start = 0;
pointStats = [];
}
break;
}
}
}
if(viableTime) {
if(time_start == 0) time_start = timeToProgressTo;
}
}
viableSats.push({
name: satellites[i].name,
passes: passes
});
}
}
return viableSats;
}
This diff is collapsed.
[{"norad_cat_id":41732,"name":"3CAT-2","names":"","image":"https://db.satnogs.org/media/satellites/3cat-2__2.jpg"},{"norad_cat_id":32788,"name":"AAUSAT","names":"CUBESAT-2\r\nAAUSAT-2","image":null},{"norad_cat_id":39087,"name":"AAUSAT 3","names":"","image":"https://db.satnogs.org/media/satellites/08aae20b.jpg"},{"norad_cat_id":41460,"name":"AAUSAT 4","names":"","image":null},{"norad_cat_id":40948,"name":"AAUSAT 5","names":"","image":null},{"norad_cat_id":38760,"name":"AENEAS","names":"","image":null},{"norad_cat_id":41313,"name":"AGGIESAT-4","names":"","image":null},{"norad_cat_id":40054,"name":"AISAT","names":"","image":"https://db.satnogs.org/media/satellites/aisat__1.jpg"},{"norad_cat_id":41465,"name":"AIST-2D","names":"","image":null},{"norad_cat_id":38078,"name":"ALMASAT-1","names":"","image":null},{"norad_cat_id":41789,"name":"ALSAT 1N","names":"AlSat-Nano","image":null},{"norad_cat_id":41935,"name":"AOBA-Velox 3","names":"AOBA-VeloxIII","image":"https://db.satnogs.org/media/satellites/aoba.jpg"},{"norad_cat_id":41168,"name":"ATHENOXAT-1","names":"ATX1","image":null},{"norad_cat_id":35933,"name":"BEESAT","names":"","image":"https://db.satnogs.org/media/satellites/800px-BeeSat-FM_Post-Acceptance-Test-Checkout_2008-09.JPG"},{"norad_cat_id":39136,"name":"BEESAT-2","names":"","image":"https://db.satnogs.org/media/satellites/beesat2.jpeg"},{"norad_cat_id":41619,"name":"BEESAT-4","names":"","image":null},{"norad_cat_id":41604,"name":"BIROS","names":"","image":null},{"norad_cat_id":40968,"name":"BISONSAT","names":"N7SKC","image":null},{"norad_cat_id":39398,"name":"BLACK KNIGHT-1","names":"","image":null},{"norad_cat_id":39431,"name":"BRITE-PL","names":"LEM","image":null},{"norad_cat_id":40014,"name":"BUGSAT-1","names":"TITA","image":"https://db.satnogs.org/media/satellites/bugsat-1__1.jpg"},{"norad_cat_id":41909,"name":"BY70-1","names":"","image":"https://db.satnogs.org/media/satellites/by70-1__1.jpg"},{"norad_cat_id":41475,"name":"CADRE","names":"","image":null},{"norad_cat_id":40055,"name":"CANX-4","names":"NLS 7.1","image":null},{"norad_cat_id":40056,"name":"CANX-5","names":"NLS 7.2","image":null},{"norad_cat_id":31130,"name":"CAPE-1","names":"","image":null},{"norad_cat_id":39382,"name":"CAPE-2","names":"","image":null},{"norad_cat_id":41845,"name":"CAS-2T","names":"KS-1Q","image":"https://db.satnogs.org/media/satellites/cas-2t-145-435-mhz-fm-transponder-cubesat.jpg"},{"norad_cat_id":39405,"name":"CHARGERSAT-1","names":"","image":null},{"norad_cat_id":41338,"name":"CHUBUSAT-2","names":"JJ2YPN","image":"https://db.satnogs.org/media/satellites/chubusat-2__1.jpg"},{"norad_cat_id":41339,"name":"CHUBUSAT-3","names":"JJ2YPO","image":null},{"norad_cat_id":39426,"name":"CINEMA-3","names":"","image":null},{"norad_cat_id":32787,"name":"COMPASS-1","names":"","image":null},{"norad_cat_id":39395,"name":"COPPER","names":"","image":null},{"norad_cat_id":39153,"name":"CUBEBUG-1","names":"CAPITAN BETO","image":"https://db.satnogs.org/media/satellites/capitan-beto.jpg"},{"norad_cat_id":39440,"name":"CUBEBUG-2","names":"LO-74","image":"https://db.satnogs.org/media/satellites/cubebug-1__1.jpg"},{"norad_cat_id":27848,"name":"CUBESAT XI-IV","names":"CO-57","image":"https://db.satnogs.org/media/satellites/xi-4__1.jpg"},{"norad_cat_id":28895,"name":"CUBESAT XI-V","names":"CO-58","image":"https://db.satnogs.org/media/satellites/XI-V-Sai-Five-300x225.jpg"},{"norad_cat_id":27844,"name":"CUTE-1","names":"CO-55","image":"https://db.satnogs.org/media/satellites/cute-1__1.jpg"},{"norad_cat_id":32785,"name":"CUTE-1.7+APD II","names":"CO-65","image":"https://db.satnogs.org/media/satellites/CO-65-300x197.jpg"},{"norad_cat_id":32789,"name":"DELFI-C3","names":"DO-64","image":"https://db.satnogs.org/media/satellites/DelfiC3_AutoE.jpeg"},{"norad_cat_id":39428,"name":"DELFI-N3XT","names":"","image":null},{"norad_cat_id":40719,"name":"DEORBITSAIL","names":"","image":"https://db.satnogs.org/media/satellites/DeorbitSail.jpg"},{"norad_cat_id":39383,"name":"DRAGONSAT-1","names":"","image":null},{"norad_cat_id":40030,"name":"DTUSAT-2","names":"","image":null},{"norad_cat_id":40021,"name":"DUCHIFAT-1","names":"","image":"https://db.satnogs.org/media/satellites/duchifat-1__1.jpg"},{"norad_cat_id":40071,"name":"DX1","names":"DX-1","image":"https://db.satnogs.org/media/satellites/1049929.png"},{"norad_cat_id":41459,"name":"E-ST@R-II","names":"","image":null},{"norad_cat_id":39436,"name":"EAGLE 2","names":"","image":"https://db.satnogs.org/media/satellites/50sat-eagle2.jpg"},{"norad_cat_id":41933,"name":"EGG","names":"","image":"https://db.satnogs.org/media/satellites/egg.jpg"},{"norad_cat_id":39161,"name":"ESTCUBE","names":"","image":null},{"norad_cat_id":40380,"name":"EXOCUBE","names":"","image":"https://db.satnogs.org/media/satellites/exocube__1.jpg"},{"norad_cat_id":40377,"name":"FIREBIRD 3","names":"","image":"https://db.satnogs.org/media/satellites/Firebird_Auto3.jpeg"},{"norad_cat_id":40378,"name":"FIREBIRD 4","names":"","image":"https://db.satnogs.org/media/satellites/firebird4.jpeg"},{"norad_cat_id":39439,"name":"FIRST-MOVE","names":"","image":null},{"norad_cat_id":40967,"name":"FOX-1A","names":"AO-85","image":null},{"norad_cat_id":41932,"name":"FREEDOM","names":"","image":"https://db.satnogs.org/media/satellites/freedom.jpg"},{"norad_cat_id":39444,"name":"FUNCUBE-1","names":"AO-73","image":"https://db.satnogs.org/media/satellites/FUNcube-1.jpg"},{"norad_cat_id":32958,"name":"FY-3A","names":"Feng-Yun-3A","image":null},{"norad_cat_id":37214,"name":"FY-3B","names":"Feng-Yun-3B","image":null},{"norad_cat_id":39260,"name":"FY-3C","names":"Feng-Yun-3C","image":null},{"norad_cat_id":41170,"name":"GALASSIA","names":"","image":"https://db.satnogs.org/media/satellites/galassia__2.jpg"},{"norad_cat_id":39430,"name":"GOMX-1","names":"GATOSS","image":"https://db.satnogs.org/media/satellites/GOMX1_AutoE.jpeg"},{"norad_cat_id":40949,"name":"GOMX-3","names":"","image":null},{"norad_cat_id":40379,"name":"GRIFEX","names":"","image":"https://db.satnogs.org/media/satellites/IMG_6740-300x200.jpg"},{"norad_cat_id":28650,"name":"HAMSAT","names":"VO-52","image":"https://db.satnogs.org/media/satellites/hamsat.jpg"},{"norad_cat_id":39445,"name":"HINCUBE","names":"","image":null},{"norad_cat_id":38340,"name":"HORYU 2","names":"","image":"https://db.satnogs.org/media/satellites/horyu-2.jpg"},{"norad_cat_id":41340,"name":"HORYU-4","names":"JG6YBW","image":"https://db.satnogs.org/media/satellites/horyu-4__1.jpg"},{"norad_cat_id":39433,"name":"HUMSAT-D","names":"","image":"https://db.satnogs.org/media/satellites/humsat-d__1.jpg"},{"norad_cat_id":39432,"name":"ICUBE-1","names":"","image":null},{"norad_cat_id":28628,"name":"INMARSAT-4 F1","names":"","image":"https://db.satnogs.org/media/satellites/inmarsat-4__1.jpg"},{"norad_cat_id":25544,"name":"ISS","names":"ZARYA","image":"https://db.satnogs.org/media/satellites/International_Space_Station_after_undocking_of_STS-132.jpg"},{"norad_cat_id":22826,"name":"ITAMSAT","names":"IO-26","image":"https://db.satnogs.org/media/satellites/itamsat_1.jpg"},{"norad_cat_id":41930,"name":"ITF-2","names":"","image":"https://db.satnogs.org/media/satellites/itf-2.jpg"},{"norad_cat_id":35935,"name":"ITUPSAT 1","names":"","image":"https://db.satnogs.org/media/satellites/itupsat1b.jpg"},{"norad_cat_id":24278,"name":"JAS-2","names":"FO-29","image":"https://db.satnogs.org/media/satellites/fo29.gif"},{"norad_cat_id":37839,"name":"JUGNU","names":"","image":"https://db.satnogs.org/media/satellites/jugnu.jpeg"},{"norad_cat_id":40912,"name":"KAITUO-1B","names":"CAS-3G\r\nDCBB\r\nXW-2G","image":null},{"norad_cat_id":33499,"name":"KKS-1","names":"KISEKI","image":"https://db.satnogs.org/media/satellites/KKS-FM-4-2.JPG"},{"norad_cat_id":39441,"name":"KRYSAOR","names":"NEE-02","image":null},{"norad_cat_id":39384,"name":"KYSAT-2","names":"","image":null},{"norad_cat_id":40931,"name":"LAPAN-A2","names":"ORARI\r\nIO-86","image":null},{"norad_cat_id":41603,"name":"LAPAN-A3","names":"","image":"https://db.satnogs.org/media/satellites/lapan-a3__1.jpg"},{"norad_cat_id":40661,"name":"LIGHTSAIL-1","names":"","image":"https://db.satnogs.org/media/satellites/lightsail1.jpeg"},{"norad_cat_id":40908,"name":"LILACSAT-2","names":"CAS-3H\r\nXW-2H","image":null},{"norad_cat_id":40958,"name":"LQSAT","names":"","image":null},{"norad_cat_id":20442,"name":"LUSAT","names":"LO-19","image":"https://db.satnogs.org/media/satellites/LUSAT-1.gif"},{"norad_cat_id":37855,"name":"M-CUBED & EXP-1 PRIME","names":"E1P-U2","image":"https://db.satnogs.org/media/satellites/mcubed.jpg"},{"norad_cat_id":39469,"name":"MCUBED-2","names":"","image":null},{"norad_cat_id":40069,"name":"Meteor-M N2","names":"","image":null},{"norad_cat_id":29499,"name":"METOP-A","names":"","image":null},{"norad_cat_id":38771,"name":"METOP-B","names":"","image":null},{"norad_cat_id":41474,"name":"MINXSS","names":"","image":null},{"norad_cat_id":27939,"name":"MOZHAYETS 4","names":"RS-22","image":"https://db.satnogs.org/media/satellites/zeya__1.jpg"},{"norad_cat_id":40024,"name":"NANOSATC-BR1","names":"NCBR-1\r\nNCBR1","image":"https://db.satnogs.org/media/satellites/nanosat.jpg"},{"norad_cat_id":99999,"name":"NAYIF","names":"NAYIF-1\r\nFUNCUBE-5","image":"https://db.satnogs.org/media/satellites/nayif-1-cubesat-image-credit-wouter-weggelaar-pa3weg.jpg"},{"norad_cat_id":40655,"name":"NO-83","names":"BRICSat-P","image":"https://db.satnogs.org/media/satellites/bricsat-p__2.jpg"},{"norad_cat_id":25338,"name":"NOAA-15","names":"","image":null},{"norad_cat_id":28654,"name":"NOAA-18","names":"","image":null},{"norad_cat_id":33591,"name":"NOAA-19","names":"","image":null},{"norad_cat_id":41477,"name":"NODES1","names":"","image":null},{"norad_cat_id":41478,"name":"NODES2","names":"","image":null},{"norad_cat_id":40900,"name":"NUDT-PHONESAT","names":"CAS-3I\r\nXW-2I","image":null},{"norad_cat_id":41557,"name":"NUSAT 1","names":"FRESCO","image":null},{"norad_cat_id":41558,"name":"NUSAT 2","names":"BATATA","image":null},{"norad_cat_id":25635,"name":"ORSTED","names":"Ørsted","image":"https://db.satnogs.org/media/satellites/4355e5156bc2ef829b9c7e128608e6ddce046507.jpg"},{"norad_cat_id":7530,"name":"OSCAR 7","names":"AO-7","image":"https://db.satnogs.org/media/satellites/AO-7-Model-300x180.gif"},{"norad_cat_id":41458,"name":"OUFTI-1","names":"","image":null},{"norad_cat_id":40654,"name":"ParkinsonSAT","names":"PSAT\r\nNO-84","image":"https://db.satnogs.org/media/satellites/psat__2.jpg"},{"norad_cat_id":26931,"name":"PCSAT","names":"NO-44","image":"https://db.satnogs.org/media/satellites/no44.gif"},{"norad_cat_id":39151,"name":"PEGASUS","names":"NEE-01","image":null},{"norad_cat_id":39381,"name":"PHONESAT 2.4","names":"","image":null},{"norad_cat_id":40042,"name":"POLYITAN-1","names":"","image":"https://db.satnogs.org/media/satellites/polyitan.jpg"},{"norad_cat_id":41783,"name":"PRATHAM","names":"","image":null},{"norad_cat_id":33493,"name":"PRISM","names":"HITOMI","image":"https://db.satnogs.org/media/satellites/PRISM_AutoF.jpg"},{"norad_cat_id":40025,"name":"QB50P1","names":"EO 79, European-OSCAR 79, FUNcube 3, EO-79","image":"https://db.satnogs.org/media/satellites/qb50p1__1.jpg"},{"norad_cat_id":40032,"name":"QB50P2","names":"EO 80, European-OSCAR 80, EO-80","image":"https://db.satnogs.org/media/satellites/qb50p2__1.jpg"},{"norad_cat_id":23439,"name":"RADIO ROSTO","names":"RS-15","image":"https://db.satnogs.org/media/satellites/radio-rosto__1.jpg"},{"norad_cat_id":41466,"name":"SAMSAT-218D","names":"","image":"https://db.satnogs.org/media/satellites/samsat_HBdzG9t.jpg"},{"norad_cat_id":41600,"name":"SATHYABAMASAT","names":"","image":null},{"norad_cat_id":27607,"name":"SAUDISAT 1C","names":"SO-50","image":"https://db.satnogs.org/media/satellites/saudisat-so-50.jpg"},{"norad_cat_id":32791,"name":"SEEDS II","names":"CO-66","image":"https://db.satnogs.org/media/satellites/SEEDS.gif"},{"norad_cat_id":40897,"name":"SERPENS","names":"PY0ESA","image":null},{"norad_cat_id":39134,"name":"SOMP","names":"","image":"https://db.satnogs.org/media/satellites/image_gallery.jpeg"},{"norad_cat_id":39770,"name":"SPROUT","names":"","image":"https://db.satnogs.org/media/satellites/sprout-satellite-credit-nihon-univ-miyazaki-laboratory.png"},{"norad_cat_id":37841,"name":"SRMSAT","names":"","image":"https://db.satnogs.org/media/satellites/srmsat.jpg"},{"norad_cat_id":33498,"name":"STARS","names":"KUKAI mother and daughter","image":null},{"norad_cat_id":41895,"name":"STARS-C","names":"","image":"https://db.satnogs.org/media/satellites/stars-c.jpg"},{"norad_cat_id":41476,"name":"STMSAT-1","names":"","image":null},{"norad_cat_id":39090,"name":"STRAND-1","names":"","image":"https://db.satnogs.org/media/satellites/strand1.jpg"},{"norad_cat_id":39402,"name":"SWAMPSAT","names":"","image":null},{"norad_cat_id":41607,"name":"SWAYAM","names":"","image":null},{"norad_cat_id":35932,"name":"SWISSCUBE","names":"","image":"https://db.satnogs.org/media/satellites/swisscube.jpeg"},{"norad_cat_id":25397,"name":"TECHSAT 1B","names":"GO-32","image":"https://db.satnogs.org/media/satellites/gurwinIIb.gif"},{"norad_cat_id":40928,"name":"TIANWANG-1A","names":"TW-1A\r\nShangkeda-2\r\nSECM","image":null},{"norad_cat_id":40927,"name":"TIANWANG-1B","names":"TW-1B\r\nNJUST-2","image":null},{"norad_cat_id":40926,"name":"TIANWANG-1C","names":"TW-1C\r\nNJFA-1","image":null},{"norad_cat_id":40043,"name":"TIGRISAT","names":"","image":"https://db.satnogs.org/media/satellites/tigrisat__1.jpg"},{"norad_cat_id":36799,"name":"TISAT 1","names":"","image":null},{"norad_cat_id":39385,"name":"TJ3SAT","names":"","image":null},{"norad_cat_id":39400,"name":"TRAILBLAZER","names":"SPA-1","image":null},{"norad_cat_id":39427,"name":"TRITON-1","names":"","image":"https://db.satnogs.org/media/satellites/delfi-next__1.jpg"},{"norad_cat_id":39091,"name":"TUGSAT-1","names":"BRITE-Austria\r\nCANX-3B","image":null},{"norad_cat_id":41934,"name":"TuPOD","names":"","image":"https://db.satnogs.org/media/satellites/tupod.jpg"},{"norad_cat_id":40074,"name":"UKUBE-1","names":"","image":"https://db.satnogs.org/media/satellites/592-original.gif"},{"norad_cat_id":39092,"name":"UNIBRITE","names":"CANX-3A","image":null},{"norad_cat_id":40012,"name":"UNISAT-6","names":"","image":"https://db.satnogs.org/media/satellites/unisat-6__1.jpg"},{"norad_cat_id":14781,"name":"UOSAT 2","names":"UO-11","image":"https://db.satnogs.org/media/satellites/UoSat-2.jpg"},{"norad_cat_id":39446,"name":"UWE-3","names":"","image":"https://db.satnogs.org/media/satellites/uwe-1__1.jpg"},{"norad_cat_id":40057,"name":"VELOX 1","names":"","image":"https://db.satnogs.org/media/satellites/v1.jpg"},{"norad_cat_id":41171,"name":"VELOX-2","names":"VELOX2","image":null},{"norad_cat_id":39438,"name":"VELOX-PII","names":"","image":"https://db.satnogs.org/media/satellites/VeloxPII_Auto1.jpeg"},{"norad_cat_id":39407,"name":"VERMONT LUNAR","names":"","image":null},{"norad_cat_id":41931,"name":"WASEDA-SAT3","names":"","image":"https://db.satnogs.org/media/satellites/waseda.jpg"},{"norad_cat_id":36122,"name":"XIWANG-1","names":"HO-68\r\nXW-1\r\nHOPE-1","image":"https://db.satnogs.org/media/satellites/HO-68-Preassembly.jpg"},{"norad_cat_id":40903,"name":"XW-2A","names":"CAS-3A","image":null},{"norad_cat_id":40911,"name":"XW-2B","names":"CAS-3B","image":null},{"norad_cat_id":40906,"name":"XW-2C","names":"CAS-3C","image":null},{"norad_cat_id":40907,"name":"XW-2D","names":"CAS-3D","image":null},{"norad_cat_id":40909,"name":"XW-2E","names":"CAS-3E","image":null},{"norad_cat_id":40910,"name":"XW-2F","names":"CAS-3F","image":null},{"norad_cat_id":32953,"name":"YUBILEINY","names":"RS-30","image":"https://db.satnogs.org/media/satellites/rs30_1.jpg"},{"norad_cat_id":39417,"name":"ZACUBE-1","names":"TSHEPISOSAT","image":"https://db.satnogs.org/media/satellites/index.jpeg"}]
\ No newline at end of file
#container {
display: flex;
}
#controls {
float: left;
overflow-y: scroll;
height: 100%;
}
#map {
width: calc(100% - 450px);
width: -moz-calc(100% - 450px);
width: calc(100% - 450px);
min-width: 250px;
height: 100%;
background-color: grey;
flex-grow: 1;
}
#footer {
}
input[type=number] {
width: 40px;
}
table tr td {
padding: 3px;
}
.glyphicon.spinning {
animation: spin 1s infinite linear;
-webkit-animation: spin2 1s infinite linear;
}
@keyframes spin {
from { transform: scale(1) rotate(0deg);}
to { transform: scale(1) rotate(360deg);}
}
@-webkit-keyframes spin2 {
from { -webkit-transform: rotate(0deg);}
to { -webkit-transform: rotate(360deg);}
}