Last modified by admin admin on 2024/07/23 04:18

From version 1.2
edited by admin admin
on 2024/07/23 04:18
Change comment: There is no comment for this version
To version 1.1
edited by admin admin
on 2024/07/23 04:17
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -SIRI MonitoredVehicleJourney Element
1 +SIRIMonitoredVehicleJourney
Content
... ... @@ -1,4 +1,4 @@
1 -= SIRI MonitoredVehicleJourney Element =
1 += SIRI MonitoredVehicleJourney Element=
2 2  
3 3  The SIRI ##MonitoredVehicleJourney## element contains most of the relevant real-time information about particular vehicles in the MTA Bus Time system. It is used by the responses to both the [[VehicleMonitoring>>Developers.SIRIVehicleMonitoring]] and [[StopMonitoring>>Developers.SIRIStopMonitoring]] calls. As much as possible, the values in a ##MonitoredVehicleJourney## element correspond to the values in the MTA's GTFS data.
4 4  
... ... @@ -6,133 +6,179 @@
6 6  
7 7  
8 8  
9 -
10 -##<MonitoredVehicleJourney>
11 -\\\\ <!~-~- The 'fully qualified' route name (GTFS agency ID + route ID) for the trip the vehicle is serving. Not intended to be customer-facing. ~-~->
9 +##
10 +<MonitoredVehicleJourney>
11 +\\
12 + <!~-~- The 'fully qualified' route name (GTFS agency ID + route ID) for the trip the vehicle is serving. Not intended to be customer-facing. ~-~->
12 12   <LineRef>MTA NYCT_B63</LineRef>
13 -\\\\ <!~-~- The GTFS direction for the trip the vehicle is serving ~-~->
14 +\\
15 + <!~-~- The GTFS direction for the trip the vehicle is serving ~-~->
14 14   <DirectionRef>1</DirectionRef>
15 -\\\\ <!~-~- A compound element uniquely identifying the trip the vehicle is serving ~-~->
17 +\\
18 + <!~-~- A compound element uniquely identifying the trip the vehicle is serving ~-~->
16 16   <FramedVehicleJourneyRef>
17 -\\\\ <!~-~- The GTFS service date for the trip the vehicle is serving ~-~->
20 +\\
21 + <!~-~- The GTFS service date for the trip the vehicle is serving ~-~->
18 18   <DataFrameRef>2011-01-28</DataFrameRef>
19 -\\\\ <!~-~- The GTFS trip ID for trip the vehicle is serving, prefixed by the GTFS agency ID ~-~->
23 +\\
24 + <!~-~- The GTFS trip ID for trip the vehicle is serving, prefixed by the GTFS agency ID ~-~->
20 20   <DatedVehicleJourneyRef>MTA NYCT_20110102EA_087800_B63_0002_B63_19</DatedVehicleJourneyRef>
21 21   </FramedVehicleJourneyRef>
22 -\\\\ <!~-~- The GTFS Shape_ID, prefixed by GTFS Agency ID ~-~->
27 +\\
28 + <!~-~- The GTFS Shape_ID, prefixed by GTFS Agency ID ~-~->
23 23   <JourneyPatternRef>MTA NYCT_B630152</JourneyPatternRef>
24 -\\\\ <!~-~- The GTFS route_short_name ~-~->
30 +\\
31 + <!~-~- The GTFS route_short_name ~-~->
25 25   <PublishedLineName>B63</PublishedLineName>
26 -\\\\ <!~-~- GTFS Agency_ID ~-~->
33 +\\
34 + <!~-~- GTFS Agency_ID ~-~->
27 27   <OperatorRef>MTA NYCT</OperatorRef>
28 -\\\\ <!~-~- The GTFS stop ID for the first stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
36 +\\
37 + <!~-~- The GTFS stop ID for the first stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
29 29   <OriginRef>MTA_801131</OriginRef>
30 -\\\\ <!~-~- The GTFS stop ID for the last stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
39 +\\
40 + <!~-~- The GTFS stop ID for the last stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
31 31   <DestinationRef>MTA_801042</DestinationRef>
32 -\\\\ <!~-~- The GTFS trip_headsign for the trip the vehicle is serving ~-~->
42 +\\
43 + <!~-~- The GTFS trip_headsign for the trip the vehicle is serving ~-~->
33 33   <DestinationName>BAY RIDGE SHORE RD via 5 AV</DestinationName>
34 -\\\\ <!~-~- If a bus has not yet departed, OriginAimedDepartureTime indicates the scheduled departure time of that bus from that terminal in ISO8601 format ~-~->
45 +\\
46 + <!~-~- If a bus has not yet departed, OriginAimedDepartureTime indicates the scheduled departure time of that bus from that terminal in ISO8601 format ~-~->
35 35   <OriginAimedDepartureTime>2011-01-28T14:45:00.000-04:00 </OriginAimedDepartureTime>
36 -\\\\ <!~-~- SituationRef, present only if there is an active service alert covering this call ~-~->
48 +\\
49 + <!~-~- SituationRef, present only if there is an active service alert covering this call ~-~->
37 37   <SituationRef>
38 38   <SituationSimpleRef>MTA NYCT_8d065d76-2813-46ee-b024-20f956232831</SituationSimpleRef>
39 39   </SituationRef>
40 -\\\\ <!~-~- Always true ~-~->
53 +\\
54 + <!~-~- Always true ~-~->
41 41   <Monitored>true</Monitored>
42 -\\\\ <!~-~- The most recently recorded or inferred coordinates of this vehicle ~-~->
56 +\\
57 + <!~-~- The most recently recorded or inferred coordinates of this vehicle ~-~->
43 43   <VehicleLocation>
44 44   <Longitude>-73.97857</Longitude>
45 45   <Latitude>40.68448</Latitude>
46 46   </VehicleLocation>
47 -\\\\ <!~-~- Vehicle bearing: 0 is East, increments counter-clockwise ~-~->
62 +\\
63 + <!~-~- Vehicle bearing: 0 is East, increments counter-clockwise ~-~->
48 48   <Bearing>345.7</Bearing>
49 -\\\\ <!~-~- Indicator of whether the bus is making progress (i.e. moving, generally), not moving (with value noProgress), laying over before beginning a trip (value layover), or serving a trip prior to one which will arrive (prevTrip). ~-~->
65 +\\
66 + <!~-~- Indicator of whether the bus is making progress (i.e. moving, generally), not moving (with value noProgress), laying over before beginning a trip (value layover), or serving a trip prior to one which will arrive (prevTrip). ~-~->
50 50   <ProgressRate>normalProgress</ProgressRate>
51 -\\\\ <!~-~- Optional indicator of vehicle progress status. Set to "layover" when the bus is in a layover waiting for its next trip to start at a terminal, and/or "prevTrip" when the bus is currently serving the previous trip and the information presented 'wraps around' to the following scheduled trip. ~-~->
68 +\\
69 + <!~-~- Optional indicator of vehicle progress status. Set to "layover" when the bus is in a layover waiting for its next trip to start at a terminal, and/or "prevTrip" when the bus is currently serving the previous trip and the information presented 'wraps around' to the following scheduled trip. ~-~->
52 52   <ProgressStatus>layover</ProgressStatus>
53 -\\\\ <!~-~- Optional indicator of whether the bus occupancy is deemed to be "full","seatsAvailable" or "standingAvailable". If bus occupancy information is not available, this indicator is not shown (aka hidden.) ~-~->
71 +\\
72 + <!~-~- Optional indicator of whether the bus occupancy is deemed to be "full","seatsAvailable" or "standingAvailable". If bus occupancy information is not available, this indicator is not shown (aka hidden.) ~-~->
54 54   <Occupancy>seatsAvailable</Occupancy>
55 -\\\\ <!~-~- The vehicle ID, preceded by the GTFS agency ID ~-~->
74 +\\
75 + <!~-~- The vehicle ID, preceded by the GTFS agency ID ~-~->
56 56   <VehicleRef>MTA NYCT_7582</VehicleRef>
57 -\\\\ <!~-~- Depending on the system's level of confidence, the GTFS block_id the bus is serving. Please see "Transparency of Block vs. Trip-Level Assignment" section below ~-~->
77 +\\
78 + <!~-~- Depending on the system's level of confidence, the GTFS block_id the bus is serving. Please see "Transparency of Block vs. Trip-Level Assignment" section below ~-~->
58 58   <BlockRef>MTA NYCT_20120902CE_JG_24900_B35-26-JG_1503</BlockRef>
59 -\\\\ <!~-~- Call data about a particular stop ~-~->
80 +\\
81 + <!~-~- Call data about a particular stop ~-~->
60 60   <!~-~- In StopMonitoring, it is the stop of interest; in VehicleMonitoring it is the next stop the bus will make. ~-~->
61 -\\\\ <MonitoredCall>
62 -\\\\ <!~-~- The GTFS stop ID of the stop prefixed by agency_id ~-~->
83 +\\
84 + <MonitoredCall>
85 +\\
86 + <!~-~- The GTFS stop ID of the stop prefixed by agency_id ~-~->
63 63   <StopPointRef>MTA_308214</StopPointRef>
64 -\\\\ <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
88 +\\
89 + <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
65 65   <VisitNumber>1</VisitNumber>
66 -\\\\ <!~-~- Predicted arrival/departure times in ISO8601 format ~-~->
91 +\\
92 + <!~-~- Predicted arrival/departure times in ISO8601 format ~-~->
67 67   <ExpectedArrivalTime>2015-06-04T10:46:08.361-04:00</ExpectedArrivalTime>
68 68   <ExpectedDepartureTime>2015-06-04T10:46:08.361-04:00</ExpectedDepartureTime>
69 -\\\\ <!~-~- SIRI container for extensions to the standard ~-~->
95 +\\
96 + <!~-~- SIRI container for extensions to the standard ~-~->
70 70   <Extensions>
71 -\\\\ <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
98 +\\
99 + <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
72 72   <Distances>
73 -\\\\ <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
101 +\\
102 + <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
74 74   <CallDistanceAlongRoute>3038.9</CallDistanceAlongRoute>
75 -\\\\ <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
104 +\\
105 + <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
76 76   <DistanceFromCall>1101.7</DistanceFromCall>
77 -\\\\ <!~-~- The distance displayed in the UI, see below for an additional note ~-~->
107 +\\
108 + <!~-~- The distance displayed in the UI, see below for an additional note ~-~->
78 78   <PresentableDistance>5 stops away</PresentableDistance>
79 -\\\\ <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
110 +\\
111 + <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
80 80   <StopsFromCall>5</StopsFromCall>
81 81   </Distances>
82 82   </Extensions>
83 -\\\\ </MonitoredCall>
84 -\\\\ <!~-~- The collection of calls that a vehicle is going to make. ~-~->
115 +\\
116 + </MonitoredCall>
117 +\\
118 + <!~-~- The collection of calls that a vehicle is going to make. ~-~->
85 85   <OnwardCalls>
86 -\\\\ <!~-~- A stop that the vehicle is going to make, if the detailLevel is set to calls ~-~->
120 +\\
121 + <!~-~- A stop that the vehicle is going to make, if the detailLevel is set to calls ~-~->
87 87   <OnwardCall>
88 -\\\\ <!~-~- The GTFS stop ID of the stop ~-~->
123 +\\
124 + <!~-~- The GTFS stop ID of the stop ~-~->
89 89   <StopPointRef>MTA_308215</StopPointRef>
90 -\\\\ <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
126 +\\
127 + <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
91 91   <VisitNumber>1</VisitNumber>
92 -\\\\ <!~-~- The GTFS stop name of the stop ~-~->
129 +\\
130 + <!~-~- The GTFS stop name of the stop ~-~->
93 93   <StopPointName>5 AV - GARFIELD PL</StopPointName>
94 -\\\\ <!~-~- SIRI container for extensions to the standard ~-~->
132 +\\
133 + <!~-~- SIRI container for extensions to the standard ~-~->
95 95   <Extensions>
96 -\\\\ <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
135 +\\
136 + <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
97 97   <Distances>
98 -\\\\ <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
138 +\\
139 + <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
99 99   <CallDistanceAlongRoute>3267.1</CallDistanceAlongRoute>
100 -\\\\ <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
141 +\\
142 + <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
101 101   <DistanceFromCall>1329.9</DistanceFromCall>
102 -\\\\ <!~-~- The distance displayed in the UI ~-~->
144 +\\
145 + <!~-~- The distance displayed in the UI ~-~->
103 103   <PresentableDistance>6 stops away</PresentableDistance>
104 -\\\\ <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
147 +\\
148 + <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
105 105   <StopsFromCall>6</StopsFromCall>
106 106   </Distances>
107 107   </Extensions>
108 -\\\\ </OnwardCall>
109 -\\\\ ... more OnwardCalls
110 -\\\\ </OnwardCalls>
111 -</MonitoredVehicleJourney>##
152 +\\
153 + </OnwardCall>
154 +\\
155 + ... more OnwardCalls
156 +\\
157 + </OnwardCalls>
158 +</MonitoredVehicleJourney>
112 112  
113 113  === The PresentableDistance field: ===
114 -
115 115  The logic that determines whether stops or miles are shown in the PresentableDistance field is below:
116 116  
117 117  show distance in miles if and only if:
118 118  
119 - ##(distance in miles to _immediate next stop_ is > D) OR (distance in stops to current stop is > N AND distance in miles to current stop > E)##
165 + ##(distance in miles to _immediate next stop_ is > D) OR (distance in stops to current stop is > N AND distance in miles to current stop > E)
120 120  
121 121  in other words, show distance in stops if and only if (the below is just the inverse of the above, according to DeMorgan's law):
122 122  
123 - ##(distance in miles to _immediate next stop_ is <= D) AND (distance in stops to current stop <= N OR distance in miles to current stop <= E)##
169 + ##(distance in miles to _immediate next stop_ is <= D) AND (distance in stops to current stop <= N OR distance in miles to current stop <= E)
124 124  
125 125  Show "approaching" if and only if:
126 126  
127 - ##distance_in_miles to immediate next stop < P##
173 + ##distance_in_miles to immediate next stop < P
128 128  
129 129  show "at stop" if and only if:
130 130  
131 - ##distance_in_miles to immediate next stop < T##
177 + ##distance_in_miles to immediate next stop < T
132 132  
133 133  Current Parameter Values:
134 134  
135 -|=Parameter|=Value   
181 +|=Parameter|=Value
136 136  |D| .5 miles
137 137  |N| 3 stops
138 138  |E| .5 miles
... ... @@ -141,8 +141,9 @@
141 141  
142 142  === Transparency of Block vs. Trip-Level Assignment ===
143 143  
144 -MTA Bus Time tries to assign buses to blocks- a sequence of trips that start and end at a depot. This allows the system to make a statement about what a bus will do after it reaches the end of its current trip. 
190 +MTA Bus Time tries to assign buses to blocks- a sequence of trips that start and end at a depot. This allows the system to make a statement about what a bus will do after it reaches the end of its current trip.
145 145  
146 146  However, there is not always enough affirmative and corresponding evidence to make such a strong statement. In this case, MTA Bus Time falls back to a trip-level assignment, where it just picks a trip from the schedule that is representative of the route and stopping pattern that the bus is likely to pursue.
147 147  
148 148  The SIRI API now reflects this distinction as described here and in other items below. If the assignment is block-level, the new ##BlockRef## field of the ##MonitoredVehicleJourney## is present, and populated with the assigned block id.
195 +