summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdWidgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mmd/MmdWidgets.py')
-rw-r--r--tools/mmd/MmdWidgets.py24
1 files changed, 3 insertions, 21 deletions
diff --git a/tools/mmd/MmdWidgets.py b/tools/mmd/MmdWidgets.py
index f174d73..cd8a347 100644
--- a/tools/mmd/MmdWidgets.py
+++ b/tools/mmd/MmdWidgets.py
@@ -6,20 +6,6 @@ import time
import ephem
from MmdLocation import Location
-'''
-var trajectory = new Array (
- new Array (),
- new Array ()
-);
-'''
-
-# def createJavaArray (jarray, name):
-# astring = '''var {0} = new Array ('''.format (name)
-# for e in jarray:
-# astring = '''{0}\n\t{1}'''.format (astring, e)
-# astring = '''{0}\n);'''.format (astring)
-# return astring
-
def createJavaArray (point_list, name):
astring = '''var {0} = new Array (\n'''.format (name)
astring = '{0}\tnew Array ('.format (astring)
@@ -52,12 +38,8 @@ def dms2degdec (lonlat):
def computeTrajectory (longitude, latitude, elevation):
"""
test for static TLE to trajectory computation
-
- Random remarks
- - for now the problem is, that once longitude jumps from + to - (far in the east)
- the curve is interrupted and a straight line is drawn ...
- - we should detect these points and make multiple line objects (an array)
"""
+
line0 = "ARISSAT-1/RADIOSCAF-B"
line1 = "1 37772U 98067CK 11220.22334818 .00031592 00000-0 37647-3 0 118"
line2 = "2 37772 51.6391 258.8215 0013530 58.1430 19.7106 15.60689826 619"
@@ -265,7 +247,7 @@ def osmWidget (satellite, user):
map.addLayer (lineLayer);
// map.addControl (new OpenLayers.Control.DrawFeature(lineLayer, OpenLayers.Handler.Path));
var Features = new Array ();
- var colors = new Array ('#ff0000', '#00ff00', '#0000ff');
+ // var colors = new Array ('#ff0000', '#00ff00', '#0000ff');
for (var i = 0; i < curves.length; i++)
{{
@@ -275,7 +257,7 @@ def osmWidget (satellite, user):
points.push (new OpenLayers.Geometry.Point (curves[i][j].lon, curves[i][j].lat));
}}
var c = i % 3;
- var lineStyle = {{strokeColor: colors[c], strokeOpacity: 1, strokeWidth: 1}};
+ var lineStyle = {{strokeColor: '#003366', strokeOpacity: 1, strokeWidth: 1}};
Features.push (new OpenLayers.Feature.Vector (new OpenLayers.Geometry.LineString (points), null, lineStyle))
}}