diff options
author | Jogi Hofmüller <jogi@mur.at> | 2011-08-11 08:45:41 +0000 |
---|---|---|
committer | Jogi Hofmüller <jogi@mur.at> | 2011-08-11 08:45:41 +0000 |
commit | d07617fd3fb065a304ecdd53096e45954d07ee1e (patch) | |
tree | 4acc5c3af1d65abc6b8ea30739b98e6372be6988 /tools/mmd/MmdDb.py | |
parent | - added TODO file to repo (diff) |
- more Satellite code
git-svn-id: https://svn.spreadspace.org/mur.sat@120 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'tools/mmd/MmdDb.py')
-rw-r--r-- | tools/mmd/MmdDb.py | 11 |
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 () |