summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdDb.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mmd/MmdDb.py')
-rw-r--r--tools/mmd/MmdDb.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/mmd/MmdDb.py b/tools/mmd/MmdDb.py
index 74b11bd..aa6ff03 100644
--- a/tools/mmd/MmdDb.py
+++ b/tools/mmd/MmdDb.py
@@ -122,6 +122,17 @@ class Db:
self.cursor.execute ('INSERT INTO ssps (timestamp, longitude, latitude) VALUES (?,?,?)', (timestamp, longitude, latitude,))
self.conn.commit ()
+ def satelliteLoadTrajectory (self, timestamp, count):
+ '''
+ get count rows from table ssps, starting at >= timestamp
+ '''
+ self.cursor.execute ('SELECT * FROM ssps WHERE timestamp >=? ORDER BY timestamp ASC LIMIT ?', (timestamp, count,))
+ return self.cursor.fetchall ()
+
+ def satelliteLoadCurrentSSP (self, timestamp):
+ self.cursor.execute ('SELECT * FROM ssps WHERE timestamp >=? LIMIT 1', (timestamp,))
+ return self.cursor.fetchone ()
+
def close (self):
self.cursor.close ()
self.conn.close ()