From 01c9451dcb1ec2dd36cd7451727e121d42aa0e49 Mon Sep 17 00:00:00 2001 From: Jogi Hofmüller Date: Fri, 12 Aug 2011 11:17:44 +0000 Subject: - fixed bug that confused east/west in Satellite () git-svn-id: https://svn.spreadspace.org/mur.sat@135 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- tools/mmd/MmdSatellite.py | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'tools/mmd/MmdSatellite.py') diff --git a/tools/mmd/MmdSatellite.py b/tools/mmd/MmdSatellite.py index 54e3f32..e6a0c08 100644 --- a/tools/mmd/MmdSatellite.py +++ b/tools/mmd/MmdSatellite.py @@ -7,24 +7,24 @@ import sys from MmdDb import Db from MmdLocation import Location -def createJavaArray (point_list, name): - astring = '''var {0} = new Array (\n'''.format (name) - astring = '{0}\tnew Array ('.format (astring) - last = 'west' - - for point in point_list: - if point[0][0] == '-': - if last == 'east': - astring = astring[:-1] - astring = '{0}\n\t\t),\n\tnew Array ('.format (astring) - last = 'west' - else: - last = 'east' - astring = '{0}\n\t\tnew OpenLayers.LonLat ({1}, {2}).transform (from, to),'.format (astring, point[0], point[1]) - if astring[-1] == ',': - astring = astring[:-1] - astring = '{0}\n\t\t)\n\t);'.format (astring) - return astring +# def createJavaArray (point_list, name): +# astring = '''var {0} = new Array (\n'''.format (name) +# astring = '{0}\tnew Array ('.format (astring) +# last = 'west' +# +# for point in point_list: +# if point[0][0] == '-': +# if last == 'east': +# astring = astring[:-1] +# astring = '{0}\n\t\t),\n\tnew Array ('.format (astring) +# last = 'west' +# else: +# last = 'east' +# astring = '{0}\n\t\tnew OpenLayers.LonLat ({1}, {2}).transform (from, to),'.format (astring, point[0], point[1]) +# if astring[-1] == ',': +# astring = astring[:-1] +# astring = '{0}\n\t\t)\n\t);'.format (astring) +# return astring def dms2degdec (lonlat): ''' @@ -61,9 +61,9 @@ class Satellite: self.longitude, self.latitude ) - last = 'west' + last = 'east' if str (self.longitude)[0] == '-': - last = 'east' + last = 'west' for row in self._loadTrajectory (minutes): if str (row['longitude'])[0] == '-': -- cgit v1.2.3