summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/mmd/MmdSatellite.py11
-rw-r--r--tools/mmd/MmdWidgets.py7
-rw-r--r--tools/mmd/TODO12
3 files changed, 23 insertions, 7 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:
diff --git a/tools/mmd/MmdWidgets.py b/tools/mmd/MmdWidgets.py
index d5fa2a1..8361002 100644
--- a/tools/mmd/MmdWidgets.py
+++ b/tools/mmd/MmdWidgets.py
@@ -63,6 +63,11 @@ def computeTrajectory (longitude, latitude, elevation):
def loginFormWidget ():
html = '''
+ <!--
+ <script type="text/javascript" src="/jquery.js"></script>
+ <script type="text/javascript">
+ </script>
+ -->
Please enter your email and password in the form below.
<form method="post" accept-charset="UTF-8">
<table>
@@ -375,7 +380,7 @@ def dataWidget (session):
<hr />
<div>Time: 00 D 00 H 00 M 00 S</div>
<div title="Longitude of sub satellite point in degrees east/west of Greenwich">SSP Longitude: {1}</div>
- <div title="Latitude of sub satellite point in degrees north/south o equator">SSP Latitude: {2}</div>
+ <div title="Latitude of sub satellite point in degrees north/south of equator">SSP Latitude: {2}</div>
<div title="Satellite's altitude above sea level in meters">Altitude: {3}m</div>
<hr />
<div><a href="?cmd=submitForm">Submit</a> a report</div>
diff --git a/tools/mmd/TODO b/tools/mmd/TODO
index d1ed7d8..67f8784 100644
--- a/tools/mmd/TODO
+++ b/tools/mmd/TODO
@@ -4,11 +4,11 @@ Things to do for completing this app
- implement update for TLE files
- adjust stored trajectory data if TLE file is updated
-- registration
- - add location.altitude
- - complete class Location
- - make class LocationList
-
+- all forms
+ - check value sanity with javascript
+ - matching passwords
+ - enable submit/login buttion only if mandatory values are filled in
+
- user
- change profile data (password)
- add new location
@@ -21,4 +21,6 @@ Things to do for completing this app
- data display
- make a page
- create ranking view
+ - make list of latest submissions
+ - display submission on map