|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.iu.gps.GPSLog
This class represents a device-independent GPS log. Further, it is capable of converting raw GPS log files from GPS devices into our internal representation on the fly.
Field Summary | |
protected int |
duration
Specifies the duration of the log in seconds. |
protected java.util.Vector |
gpslog
Specifies the GPSInfo elements of the log, one for each second of logged data. |
protected java.util.Date |
start
Specifies the start time of the log. |
Constructor Summary | |
GPSLog()
Creates an empty GPSLog. |
|
GPSLog(java.util.Date _start)
Creates an empty GPSLog with given time/date. |
Method Summary | |
int |
getDuration()
Returns the duration of the log in seconds. |
GPSInfo |
getInfoAt(int t)
Gets the GPSInfo from the log at a certain point of time, where t>=0 and t smaller than duration. |
static GPSLog |
load(java.io.InputStream _is)
Loads a GPSLog from a given stream, uses device-independent file format. |
static GPSLog |
loadRaw(java.io.InputStream is)
Loads GPSLog from a raw GPS driver log file. |
static void |
main(java.lang.String[] arg)
Test method. |
void |
save(java.io.OutputStream os)
Saves the log in the given output stream. |
void |
setInfoAt(int t,
GPSInfo gi)
Sets GPSInfo in the log for a specific time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Date start
protected int duration
protected java.util.Vector gpslog
Constructor Detail |
public GPSLog()
public GPSLog(java.util.Date _start)
_start
- Creation date of the log.Method Detail |
public static GPSLog loadRaw(java.io.InputStream is) throws java.io.IOException
is
- Input stream.java.io.IOException
- In case of I/O Error.public static GPSLog load(java.io.InputStream _is)
_is
- Input stream.public static void main(java.lang.String[] arg) throws java.lang.Exception
arg
- java.lang.Exception
- public void setInfoAt(int t, GPSInfo gi)
t
- time in seconds.gi
- GPSInfo to set.public int getDuration()
public GPSInfo getInfoAt(int t)
t
- time in seconds (>=0 and smaller duration)public void save(java.io.OutputStream os) throws java.io.IOException
os
- Output stream to use for saving.java.io.IOException
- In case of I/O error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |