summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdSatellite.py
diff options
context:
space:
mode:
authorJogi Hofmüller <jogi@mur.at>2011-08-12 08:34:03 +0000
committerJogi Hofmüller <jogi@mur.at>2011-08-12 08:34:03 +0000
commit5062f841f312438194a9d1071c390f37970e6fd4 (patch)
treef1bf301027c20547684b9f7321e4dba459e60a0e /tools/mmd/MmdSatellite.py
parent- added handling of altitude value in register command and Session () (diff)
- fixed typo in dataWidget () SSP Latitude title
- fixed gap betwenn satellite's current SSP and curve git-svn-id: https://svn.spreadspace.org/mur.sat@134 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'tools/mmd/MmdSatellite.py')
-rw-r--r--tools/mmd/MmdSatellite.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/mmd/MmdSatellite.py b/tools/mmd/MmdSatellite.py
index f10ca5f..54e3f32 100644
--- a/tools/mmd/MmdSatellite.py
+++ b/tools/mmd/MmdSatellite.py
@@ -54,9 +54,16 @@ class Satellite:
return ssp['timestamp'], ssp['longitude'], ssp['latitude']
def getTrajectoryAsJavaArray (self, name, minutes = 180):
- astring = '''var {0} = new Array (\n'''.format (name)
+ astring = 'var {0} = new Array (\n'.format (name)
astring = '{0}\tnew Array ('.format (astring)
+ astring = '{0}\n\t\tnew OpenLayers.LonLat ({1}, {2}).transform (from, to),'.format (
+ astring,
+ self.longitude,
+ self.latitude
+ )
last = 'west'
+ if str (self.longitude)[0] == '-':
+ last = 'east'
for row in self._loadTrajectory (minutes):
if str (row['longitude'])[0] == '-':
@@ -153,6 +160,8 @@ class Satellite:
if __name__ == "__main__":
satellite = Satellite ()
+ # print satellite.longitude, satellite.latitude
+ # print satellite.getTrajectoryAsJavaArray ('test', 100)
try:
assert satellite.cronJob (), 'executing cronjob failed'
except AssertionError as e: