From 5062f841f312438194a9d1071c390f37970e6fd4 Mon Sep 17 00:00:00 2001 From: Jogi Hofmüller Date: Fri, 12 Aug 2011 08:34:03 +0000 Subject: - 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 --- tools/mmd/MmdSatellite.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools/mmd/MmdSatellite.py') 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: -- cgit v1.2.3