|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.onebusaway.transit_data_federation.services.realtime.TripLocation
public class TripLocation
Vehicle location information for a particular trip.
Constructor Summary | |
---|---|
TripLocation()
|
Method Summary | |
---|---|
StopTimeEntry |
getClosestStop()
The closest stop to the current position of the transit vehicle among the stop times of the current trip. |
int |
getClosestStopTimeOffset()
The time offset, in seconds, from the closest stop to the current position of the transit vehicle among the stop times of the current trip. |
double |
getDistanceAlongTrip()
Note that this value could potentially be negative or larger than the total length of the trip's shape if we are tracking its location along a block before or after the trip. |
CoordinatePoint |
getLastKnownLocation()
|
long |
getLastUpdateTime()
|
CoordinatePoint |
getLocation()
|
double |
getScheduleDeviation()
If schedule deviation information is not available, this value will be Double.NaN . |
long |
getServiceDate()
|
TripEntry |
getTrip()
|
org.onebusaway.gtfs.model.AgencyAndId |
getVehicleId()
|
boolean |
hasDistanceAlongTrip()
|
boolean |
hasScheduleDeviation()
|
boolean |
isInService()
Note that a trip may be considered in service even if the vehicle isn't actively serving the trip segment if the parent block is in service. |
boolean |
isPredicted()
If real-time data is available in any form for this vehicle |
void |
setClosestStop(StopTimeEntry closestStop)
|
void |
setClosestStopTimeOffset(int closestStopTimeOffset)
See description in getClosestStopTimeOffset() . |
void |
setDistanceAlongRoute(double distanceAlongRoute)
|
void |
setInService(boolean inService)
|
void |
setLastKnownLocation(CoordinatePoint lastKnownLocation)
|
void |
setLastUpdateTime(long time)
|
void |
setLocation(CoordinatePoint location)
|
void |
setPredicted(boolean predicted)
|
void |
setScheduleDeviation(double scheduleDeviation)
|
void |
setServiceDate(long serviceDate)
|
void |
setTrip(TripEntry trip)
|
void |
setVehicleId(org.onebusaway.gtfs.model.AgencyAndId vehicleId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TripLocation()
Method Detail |
---|
public TripEntry getTrip()
public void setTrip(TripEntry trip)
public long getServiceDate()
public void setServiceDate(long serviceDate)
public boolean isInService()
public void setInService(boolean inService)
public CoordinatePoint getLocation()
public void setLocation(CoordinatePoint location)
public boolean hasDistanceAlongTrip()
getDistanceAlongTrip()
is setpublic double getDistanceAlongTrip()
Double.NaN
.
public void setDistanceAlongRoute(double distanceAlongRoute)
public StopTimeEntry getClosestStop()
public void setClosestStop(StopTimeEntry closestStop)
public int getClosestStopTimeOffset()
public void setClosestStopTimeOffset(int closestStopTimeOffset)
getClosestStopTimeOffset()
.
closestStopTimeOffset
- the time offset from the closest stop, in
secondspublic boolean isPredicted()
public void setPredicted(boolean predicted)
public long getLastUpdateTime()
public void setLastUpdateTime(long time)
public CoordinatePoint getLastKnownLocation()
public void setLastKnownLocation(CoordinatePoint lastKnownLocation)
public boolean hasScheduleDeviation()
getScheduleDeviation()
is setpublic double getScheduleDeviation()
Double.NaN
.
public void setScheduleDeviation(double scheduleDeviation)
scheduleDeviation
- schedule deviation, in seconds, (+deviation is
late, -deviation is early)public org.onebusaway.gtfs.model.AgencyAndId getVehicleId()
public void setVehicleId(org.onebusaway.gtfs.model.AgencyAndId vehicleId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |