Documentation ¶
Overview ¶
Package monitor monitors gtfs a vehicle feed
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunVehicleMonitorLoop ¶
func RunVehicleMonitorLoop(log *log.Logger, db *sqlx.DB, url string, loopEverySeconds int, earlyTolerance float64, expirePositionSeconds int, shutdownSignal chan os.Signal) error
RunVehicleMonitorLoop starts loop that monitors gtfs-rt feed and records results for use in ML processing.
Types ¶
type StopTimePair ¶
type StopTimePair struct {
// contains filtered or unexported fields
}
StopTimePair contains the to and from gtfs.StopTimeInstance for a stop transition on a gtfs.TripInstance
type VehicleStopStatus ¶
type VehicleStopStatus int
VehicleStopStatus defines the possible relationship a vehicle has to a stop in GTFS
const ( Unknown VehicleStopStatus = -1 // IncomingAt indicates vehicle is just about to arrive at the stop (on a stop // display, the vehicle symbol typically flashes). IncomingAt VehicleStopStatus = 0 // StoppedAt indicates vehicle is at the stop. StoppedAt VehicleStopStatus = 1 // InTransitTo indicates vehicle has departed a previous stop and is in transit to the next stop. InTransitTo VehicleStopStatus = 2 )
func (*VehicleStopStatus) IsUnknown ¶
func (s *VehicleStopStatus) IsUnknown() bool
IsUnknown convenience method to test for unknown VehicleStopStatus
func (*VehicleStopStatus) String ¶
func (s *VehicleStopStatus) String() string
String - Stringer interface for VehicleStopStatus
Click to show internal directories.
Click to hide internal directories.