summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJogi Hofmüller <jogi@mur.at>2011-08-24 14:27:54 +0000
committerJogi Hofmüller <jogi@mur.at>2011-08-24 14:27:54 +0000
commit0944d1cb011a8f625dc4c3b025b1669a792823f6 (patch)
tree517e2afa75e211527d283d0e2ca48b9357411ef1 /tools
parent- changed font for groundstation display (diff)
- added button to display TLE in new window
git-svn-id: https://svn.spreadspace.org/mur.sat@159 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'tools')
-rw-r--r--tools/mmd/mmd.css2
-rw-r--r--tools/mmd/orbtrak.js194
-rw-r--r--tools/mmd/tracker.html10
-rw-r--r--tools/mmd/tracker.wsgi9
4 files changed, 119 insertions, 96 deletions
diff --git a/tools/mmd/mmd.css b/tools/mmd/mmd.css
index 3f50a85..6f2d98b 100644
--- a/tools/mmd/mmd.css
+++ b/tools/mmd/mmd.css
@@ -14,7 +14,7 @@ html.tracker
margin: 1px;
border: 1px solid #ffed00;
width: 512px;
- height: 340px;
+ height: auto;
padding: 0;
}
diff --git a/tools/mmd/orbtrak.js b/tools/mmd/orbtrak.js
index bf5cf48..aae9138 100644
--- a/tools/mmd/orbtrak.js
+++ b/tools/mmd/orbtrak.js
@@ -51,95 +51,95 @@ var Orb =
map.zoomTo (1);
- var satStyle = {fillColor: "#ffed00", pointRadius: 3, stroke: false};
- var homeStyle = {fill: true, pointRadius: 5, stroke: false, fillColor: "#003366", fillOpacity: 0.6};
- var home = new OpenLayers.LonLat (longitude, latitude).transform (Orb.from, Orb.to);
-
- Orb.createSatelliteTrack ();
- Orb.homeLayer.addFeatures ([
- new OpenLayers.Feature.Vector (
- new OpenLayers.Geometry.Point (home.lon, home.lat),
- null, homeStyle)]);
- // map.zoomToMaxExtent ();
- Orb.satLayer.addFeatures ([
- new OpenLayers.Feature.Vector (Orb.satellitePoint,
- null, satStyle)]);
- setTimeout ("Orb.updateOSMSatellite ()", document.getElementById ("refresh").value);
- },
-
- createSatelliteTrack: function ()
+ var satStyle = {fillColor: "#ffed00", pointRadius: 3, stroke: false};
+ var homeStyle = {fill: true, pointRadius: 5, stroke: false, fillColor: "#003366", fillOpacity: 0.6};
+ var home = new OpenLayers.LonLat (longitude, latitude).transform (Orb.from, Orb.to);
+
+ Orb.createSatelliteTrack ();
+ Orb.homeLayer.addFeatures ([
+ new OpenLayers.Feature.Vector (
+ new OpenLayers.Geometry.Point (home.lon, home.lat),
+ null, homeStyle)]);
+ // map.zoomToMaxExtent ();
+ Orb.satLayer.addFeatures ([
+ new OpenLayers.Feature.Vector (Orb.satellitePoint,
+ null, satStyle)]);
+ setTimeout ("Orb.updateOSMSatellite ()", document.getElementById ("refresh").value);
+ },
+
+ createSatelliteTrack: function ()
+ {
+ if (document.getElementById ("previewMinutes") == null)
+ minutes = 90;
+ else
+ minutes = document.getElementById ("previewMinutes").value;
+ Orb.trackLayer.destroyFeatures ();
+ var curve = new Array ();
+ var points = new Array ();
+ var track = PLib.calculateTrack (minutes);
+ var lineStyle = {strokeColor: '#003366', strokeOpacity: 1, strokeWidth: 1};
+ var last = "east";
+
+ for (var i = 0; i < track.length; i++)
+ {
+ var lonlat = new OpenLayers.LonLat (track[i][0], track[i][1]).transform (Orb.from, Orb.to);
+ var lon = "" + track[i][0];
+ if (lon.substring (0, 1) == "-")
{
- if (document.getElementById ("previewMinutes") == null)
- minutes = 90;
- else
- minutes = document.getElementById ("previewMinutes").value;
- Orb.trackLayer.destroyFeatures ();
- var curve = new Array ();
- var points = new Array ();
- var track = PLib.calculateTrack (minutes);
- var lineStyle = {strokeColor: '#003366', strokeOpacity: 1, strokeWidth: 1};
- var last = "east";
-
- for (var i = 0; i < track.length; i++)
+ if (last == "east")
{
- var lonlat = new OpenLayers.LonLat (track[i][0], track[i][1]).transform (Orb.from, Orb.to);
- var lon = "" + track[i][0];
- if (lon.substring (0, 1) == "-")
- {
- if (last == "east")
- {
- curve.push (new OpenLayers.Feature.Vector (new OpenLayers.Geometry.LineString (points), null, lineStyle))
- points = new Array ();
- }
- last = "west";
- }
- else
- last = "east";
- points.push (new OpenLayers.Geometry.Point (lonlat.lon, lonlat.lat));
+ curve.push (new OpenLayers.Feature.Vector (new OpenLayers.Geometry.LineString (points), null, lineStyle))
+ points = new Array ();
}
- curve.push (new OpenLayers.Feature.Vector (new OpenLayers.Geometry.LineString (points), null, lineStyle))
- Orb.trackLayer.addFeatures (curve);
- },
-
- updateOSMSatellite: function ()
- {
- var satInfo;
- var satellites = Orb.satLayer.features;
-
- satInfo = PLib.QuickFind (PLib.sat.name);
- var pos = new OpenLayers.LonLat (satInfo.longitude, satInfo.latitude).transform (Orb.from, Orb.to);
- satellites[0].move (pos);
- Orb.printSatellite (satInfo);
- setTimeout ("Orb.updateOSMSatellite ()", document.getElementById ("refresh").value);
- },
-
- createOSMSatellite: function ()
- {
- var satInfo;
- satInfo = PLib.QuickFind (PLib.sat.name);
- var pos = new OpenLayers.LonLat (satInfo.longitude, satInfo.latitude).transform (Orb.from, Orb.to);
- Orb.satellitePoint = new OpenLayers.Geometry.Point (pos.lon, pos.lat);
- Orb.printSatellite (satInfo);
- },
-
- startTracking: function(map, homeLat, homeLng)
- {
- Orb.map = map;
- Orb.crossBrowserSetStyle(map, "background-image: url(orbimages/world.jpg); overflow: hidden;", true);
+ last = "west";
+ }
+ else
+ last = "east";
+ points.push (new OpenLayers.Geometry.Point (lonlat.lon, lonlat.lat));
+ }
+ curve.push (new OpenLayers.Feature.Vector (new OpenLayers.Geometry.LineString (points), null, lineStyle))
+ Orb.trackLayer.addFeatures (curve);
+ },
+
+ updateOSMSatellite: function ()
+ {
+ var satInfo;
+ var satellites = Orb.satLayer.features;
- var frag = document.createDocumentFragment();
- var div = document.createElement("div");
- div.id = "home";
- Orb.crossBrowserSetStyle(div, "position:relative; width: 24px; height: 24px; background-image: url(orbimages/home.gif);", false);
- frag.appendChild(div);
- Orb.map.appendChild(frag);
- Orb.home = document.getElementById("home");
+ satInfo = PLib.QuickFind (PLib.sat.name);
+ var pos = new OpenLayers.LonLat (satInfo.longitude, satInfo.latitude).transform (Orb.from, Orb.to);
+ satellites[0].move (pos);
+ Orb.printSatellite (satInfo);
+ setTimeout ("Orb.updateOSMSatellite ()", document.getElementById ("refresh").value);
+ },
- PLib.InitializeData();
- Orb.setHomeCoordinates(homeLat, homeLng);
- Orb.createSatelliteMarkers();
- Orb.updateSatellites();
- },
+ createOSMSatellite: function ()
+ {
+ var satInfo;
+ satInfo = PLib.QuickFind (PLib.sat.name);
+ var pos = new OpenLayers.LonLat (satInfo.longitude, satInfo.latitude).transform (Orb.from, Orb.to);
+ Orb.satellitePoint = new OpenLayers.Geometry.Point (pos.lon, pos.lat);
+ Orb.printSatellite (satInfo);
+ },
+
+// startTracking: function(map, homeLat, homeLng)
+// {
+// Orb.map = map;
+// Orb.crossBrowserSetStyle(map, "background-image: url(orbimages/world.jpg); overflow: hidden;", true);
+//
+// var frag = document.createDocumentFragment();
+// var div = document.createElement("div");
+// div.id = "home";
+// Orb.crossBrowserSetStyle(div, "position:relative; width: 24px; height: 24px; background-image: url(orbimages/home.gif);", false);
+// frag.appendChild(div);
+// Orb.map.appendChild(frag);
+// Orb.home = document.getElementById("home");
+//
+// PLib.InitializeData();
+// Orb.setHomeCoordinates(homeLat, homeLng);
+// Orb.createSatelliteMarkers();
+// Orb.updateSatellites();
+// },
setHomeCoordinates: function(homeLat, homeLng)
{
@@ -205,17 +205,21 @@ var Orb =
// setTimeout("Orb.updateSatellites()", 1000);
// },
- // added by Jogi
- // 2011-08-21
- printSatellite: function (satInfo)
- {
- document.getElementById ("name").innerHTML = satInfo.satname;
- document.getElementById ("longitude").innerHTML = satInfo.longitude;
- document.getElementById ("latitude").innerHTML = satInfo.latitude;
- document.getElementById ("elevation").innerHTML = satInfo.elevation;
- document.getElementById ("azimuth").innerHTML = satInfo.azimuth;
- document.getElementById ("altitude").innerHTML = satInfo.altitude;
- },
+
+ printSatellite: function (satInfo)
+ {
+ document.getElementById ("name").innerHTML = satInfo.satname;
+ document.getElementById ("longitude").innerHTML = satInfo.longitude;
+ document.getElementById ("latitude").innerHTML = satInfo.latitude;
+ document.getElementById ("elevation").innerHTML = satInfo.elevation;
+ document.getElementById ("azimuth").innerHTML = satInfo.azimuth;
+ document.getElementById ("altitude").innerHTML = satInfo.altitude;
+ },
+
+ printTLE: function ()
+ {
+ return PLib.tleData[0] + "\n" + PLib.tleData[1] + "\n" + PLib.tleData[2];
+ },
createCell: function(tr, className, txt)
{
diff --git a/tools/mmd/tracker.html b/tools/mmd/tracker.html
index 19c098e..82dbbec 100644
--- a/tools/mmd/tracker.html
+++ b/tools/mmd/tracker.html
@@ -12,6 +12,13 @@
{
Orb.startOSMTracking(15.4422, 47.0658, 376, 'Graz');
}
+
+ function printTLE ()
+ {
+ tleWindow = window.open ("", "", "width=500, height=40");
+ tleWindow.document.write ("<pre>" + Orb.printTLE () + "</pre>");
+ tleWindow.focus ();
+ }
</script>
<link rel="stylesheet" type="text/css" href="mmd.css" />
</head>
@@ -66,6 +73,9 @@
preview for the next <input class="options" type="text" name="previewMinutes" id="previewMinutes" value="90" size="5" tabindex="3" />
minutes
</div>
+ <div class="options">
+ <input class="options" type="submit" value="show TLE" onClick="printTLE ()" />
+ </div>
<pre class="debug" id="debug"></pre>
</body>
</html>
diff --git a/tools/mmd/tracker.wsgi b/tools/mmd/tracker.wsgi
index 39b478c..edb3fde 100644
--- a/tools/mmd/tracker.wsgi
+++ b/tools/mmd/tracker.wsgi
@@ -24,6 +24,12 @@ def application (environ, response):
{{
Orb.startOSMTracking({longitude}, {latitude}, {altitude}, '{name}');
}}
+ function printTLE ()
+ {{
+ tleWindow = window.open ("", "", "width=500, height=40");
+ tleWindow.document.write ("<pre>" + Orb.printTLE () + "</pre>");
+ tleWindow.focus ();
+ }}
</script>
<link rel="stylesheet" type="text/css" href="static/mmd.css" />
</head>
@@ -78,6 +84,9 @@ def application (environ, response):
preview for the next <input class="options" type="text" name="previewMinutes" id="previewMinutes" value="90" size="5" tabindex="3" />
minutes
</div>
+ <div class="options">
+ <input class="options" type="submit" value="show TLE" onClick="printTLE ()" />
+ </div>
<pre class="debug" id="debug"></pre>
</body>
</html>