diff options
Diffstat (limited to 'tools/mmd/MmdSatellite.py')
-rw-r--r-- | tools/mmd/MmdSatellite.py | 11 |
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: |