Class GPSTraceImpl
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Route,it.unibo.alchemist.model.maps.GPSTrace,it.unibo.alchemist.model.maps.TimedRoute,java.io.Serializable,java.lang.Iterable
public final class GPSTraceImpl extends PolygonalChain<P> implements GPSTrace
Implementation of a GPSTrace.
-
-
Constructor Summary
Constructors Constructor Description GPSTraceImpl(Array<GPSPoint> trace)GPSTraceImpl(List<GPSPoint> tr)
-
Method Summary
Modifier and Type Method Description GPSTraceImplstartAt(Time time)GPSPointgetNextPosition(Time time)GPSPointgetPreviousPosition(Time time)TimegetStartTime()GeoPositioninterpolate(Time time)doublegetTripTime()GPSPointgetInitialPosition()GPSPointgetFinalPosition()TimegetFinalTime()-
Methods inherited from class it.unibo.alchemist.model.routes.PolygonalChain
equals, getPoint, getPoints, hashCode, iterator, length, size, stream, toString -
Methods inherited from class it.unibo.alchemist.model.Route
getPoints -
Methods inherited from class java.lang.Iterable
forEach, iterator, spliterator -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
startAt
GPSTraceImpl startAt(Time time)
- Parameters:
time- the time at which the new trace should start- Returns:
a new trace, which will have all the points of this trace starting at the passed time
-
getNextPosition
GPSPoint getNextPosition(Time time)
- Parameters:
time- the time- Returns:
the next point
-
getPreviousPosition
GPSPoint getPreviousPosition(Time time)
- Parameters:
time- the time- Returns:
the previous point
-
getStartTime
Time getStartTime()
- Returns:
the first time for this GPSTrace
-
interpolate
GeoPosition interpolate(Time time)
- Parameters:
time- the time- Returns:
the position at which the node would have been if it has moved in a straight line connecting the previous and the next point of time at constant speed
-
getTripTime
double getTripTime()
- Returns:
the total trip time
-
getInitialPosition
GPSPoint getInitialPosition()
- Returns:
The initial position of the trace
-
getFinalPosition
GPSPoint getFinalPosition()
- Returns:
The final position of the trace
-
getFinalTime
Time getFinalTime()
- Returns:
the final time for this GPSTrace
-
-
-
-