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

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

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -SIRIMonitoredVehicleJourney
1 +SIRI MonitoredVehicleJourney Element
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,179 +6,133 @@
6 6  
7 7  
8 8  
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. ~-~->
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. ~-~->
13 13   <LineRef>MTA NYCT_B63</LineRef>
14 -\\
15 - <!~-~- The GTFS direction for the trip the vehicle is serving ~-~->
13 +\\\\ <!~-~- The GTFS direction for the trip the vehicle is serving ~-~->
16 16   <DirectionRef>1</DirectionRef>
17 -\\
18 - <!~-~- A compound element uniquely identifying the trip the vehicle is serving ~-~->
15 +\\\\ <!~-~- A compound element uniquely identifying the trip the vehicle is serving ~-~->
19 19   <FramedVehicleJourneyRef>
20 -\\
21 - <!~-~- The GTFS service date for the trip the vehicle is serving ~-~->
17 +\\\\ <!~-~- The GTFS service date for the trip the vehicle is serving ~-~->
22 22   <DataFrameRef>2011-01-28</DataFrameRef>
23 -\\
24 - <!~-~- The GTFS trip ID for trip the vehicle is serving, prefixed by the GTFS agency ID ~-~->
19 +\\\\ <!~-~- The GTFS trip ID for trip the vehicle is serving, prefixed by the GTFS agency ID ~-~->
25 25   <DatedVehicleJourneyRef>MTA NYCT_20110102EA_087800_B63_0002_B63_19</DatedVehicleJourneyRef>
26 26   </FramedVehicleJourneyRef>
27 -\\
28 - <!~-~- The GTFS Shape_ID, prefixed by GTFS Agency ID ~-~->
22 +\\\\ <!~-~- The GTFS Shape_ID, prefixed by GTFS Agency ID ~-~->
29 29   <JourneyPatternRef>MTA NYCT_B630152</JourneyPatternRef>
30 -\\
31 - <!~-~- The GTFS route_short_name ~-~->
24 +\\\\ <!~-~- The GTFS route_short_name ~-~->
32 32   <PublishedLineName>B63</PublishedLineName>
33 -\\
34 - <!~-~- GTFS Agency_ID ~-~->
26 +\\\\ <!~-~- GTFS Agency_ID ~-~->
35 35   <OperatorRef>MTA NYCT</OperatorRef>
36 -\\
37 - <!~-~- The GTFS stop ID for the first stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
28 +\\\\ <!~-~- The GTFS stop ID for the first stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
38 38   <OriginRef>MTA_801131</OriginRef>
39 -\\
40 - <!~-~- The GTFS stop ID for the last stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
30 +\\\\ <!~-~- The GTFS stop ID for the last stop on the trip the vehicle is serving, prefixed by Agency ID ~-~->
41 41   <DestinationRef>MTA_801042</DestinationRef>
42 -\\
43 - <!~-~- The GTFS trip_headsign for the trip the vehicle is serving ~-~->
32 +\\\\ <!~-~- The GTFS trip_headsign for the trip the vehicle is serving ~-~->
44 44   <DestinationName>BAY RIDGE SHORE RD via 5 AV</DestinationName>
45 -\\
46 - <!~-~- If a bus has not yet departed, OriginAimedDepartureTime indicates the scheduled departure time of that bus from that terminal in ISO8601 format ~-~->
34 +\\\\ <!~-~- If a bus has not yet departed, OriginAimedDepartureTime indicates the scheduled departure time of that bus from that terminal in ISO8601 format ~-~->
47 47   <OriginAimedDepartureTime>2011-01-28T14:45:00.000-04:00 </OriginAimedDepartureTime>
48 -\\
49 - <!~-~- SituationRef, present only if there is an active service alert covering this call ~-~->
36 +\\\\ <!~-~- SituationRef, present only if there is an active service alert covering this call ~-~->
50 50   <SituationRef>
51 51   <SituationSimpleRef>MTA NYCT_8d065d76-2813-46ee-b024-20f956232831</SituationSimpleRef>
52 52   </SituationRef>
53 -\\
54 - <!~-~- Always true ~-~->
40 +\\\\ <!~-~- Always true ~-~->
55 55   <Monitored>true</Monitored>
56 -\\
57 - <!~-~- The most recently recorded or inferred coordinates of this vehicle ~-~->
42 +\\\\ <!~-~- The most recently recorded or inferred coordinates of this vehicle ~-~->
58 58   <VehicleLocation>
59 59   <Longitude>-73.97857</Longitude>
60 60   <Latitude>40.68448</Latitude>
61 61   </VehicleLocation>
62 -\\
63 - <!~-~- Vehicle bearing: 0 is East, increments counter-clockwise ~-~->
47 +\\\\ <!~-~- Vehicle bearing: 0 is East, increments counter-clockwise ~-~->
64 64   <Bearing>345.7</Bearing>
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). ~-~->
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). ~-~->
67 67   <ProgressRate>normalProgress</ProgressRate>
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. ~-~->
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. ~-~->
70 70   <ProgressStatus>layover</ProgressStatus>
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.) ~-~->
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.) ~-~->
73 73   <Occupancy>seatsAvailable</Occupancy>
74 -\\
75 - <!~-~- The vehicle ID, preceded by the GTFS agency ID ~-~->
55 +\\\\ <!~-~- The vehicle ID, preceded by the GTFS agency ID ~-~->
76 76   <VehicleRef>MTA NYCT_7582</VehicleRef>
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 ~-~->
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 ~-~->
79 79   <BlockRef>MTA NYCT_20120902CE_JG_24900_B35-26-JG_1503</BlockRef>
80 -\\
81 - <!~-~- Call data about a particular stop ~-~->
59 +\\\\ <!~-~- Call data about a particular stop ~-~->
82 82   <!~-~- In StopMonitoring, it is the stop of interest; in VehicleMonitoring it is the next stop the bus will make. ~-~->
83 -\\
84 - <MonitoredCall>
85 -\\
86 - <!~-~- The GTFS stop ID of the stop prefixed by agency_id ~-~->
61 +\\\\ <MonitoredCall>
62 +\\\\ <!~-~- The GTFS stop ID of the stop prefixed by agency_id ~-~->
87 87   <StopPointRef>MTA_308214</StopPointRef>
88 -\\
89 - <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
64 +\\\\ <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
90 90   <VisitNumber>1</VisitNumber>
91 -\\
92 - <!~-~- Predicted arrival/departure times in ISO8601 format ~-~->
66 +\\\\ <!~-~- Predicted arrival/departure times in ISO8601 format ~-~->
93 93   <ExpectedArrivalTime>2015-06-04T10:46:08.361-04:00</ExpectedArrivalTime>
94 94   <ExpectedDepartureTime>2015-06-04T10:46:08.361-04:00</ExpectedDepartureTime>
95 -\\
96 - <!~-~- SIRI container for extensions to the standard ~-~->
69 +\\\\ <!~-~- SIRI container for extensions to the standard ~-~->
97 97   <Extensions>
98 -\\
99 - <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
71 +\\\\ <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
100 100   <Distances>
101 -\\
102 - <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
73 +\\\\ <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
103 103   <CallDistanceAlongRoute>3038.9</CallDistanceAlongRoute>
104 -\\
105 - <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
75 +\\\\ <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
106 106   <DistanceFromCall>1101.7</DistanceFromCall>
107 -\\
108 - <!~-~- The distance displayed in the UI, see below for an additional note ~-~->
77 +\\\\ <!~-~- The distance displayed in the UI, see below for an additional note ~-~->
109 109   <PresentableDistance>5 stops away</PresentableDistance>
110 -\\
111 - <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
79 +\\\\ <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
112 112   <StopsFromCall>5</StopsFromCall>
113 113   </Distances>
114 114   </Extensions>
115 -\\
116 - </MonitoredCall>
117 -\\
118 - <!~-~- The collection of calls that a vehicle is going to make. ~-~->
83 +\\\\ </MonitoredCall>
84 +\\\\ <!~-~- The collection of calls that a vehicle is going to make. ~-~->
119 119   <OnwardCalls>
120 -\\
121 - <!~-~- A stop that the vehicle is going to make, if the detailLevel is set to calls ~-~->
86 +\\\\ <!~-~- A stop that the vehicle is going to make, if the detailLevel is set to calls ~-~->
122 122   <OnwardCall>
123 -\\
124 - <!~-~- The GTFS stop ID of the stop ~-~->
88 +\\\\ <!~-~- The GTFS stop ID of the stop ~-~->
125 125   <StopPointRef>MTA_308215</StopPointRef>
126 -\\
127 - <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
90 +\\\\ <!~-~- The ordinal value of the visit of this vehicle to this stop, always 1 in this implementation ~-~->
128 128   <VisitNumber>1</VisitNumber>
129 -\\
130 - <!~-~- The GTFS stop name of the stop ~-~->
92 +\\\\ <!~-~- The GTFS stop name of the stop ~-~->
131 131   <StopPointName>5 AV - GARFIELD PL</StopPointName>
132 -\\
133 - <!~-~- SIRI container for extensions to the standard ~-~->
94 +\\\\ <!~-~- SIRI container for extensions to the standard ~-~->
134 134   <Extensions>
135 -\\
136 - <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
96 +\\\\ <!~-~- The MTA Bus Time extensions to show distance of the vehicle from the stop ~-~->
137 137   <Distances>
138 -\\
139 - <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
98 +\\\\ <!~-~- The distance of the stop from the beginning of the trip/route ~-~->
140 140   <CallDistanceAlongRoute>3267.1</CallDistanceAlongRoute>
141 -\\
142 - <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
100 +\\\\ <!~-~- The distance from the vehicle to the stop along the route, in meters ~-~->
143 143   <DistanceFromCall>1329.9</DistanceFromCall>
144 -\\
145 - <!~-~- The distance displayed in the UI ~-~->
102 +\\\\ <!~-~- The distance displayed in the UI ~-~->
146 146   <PresentableDistance>6 stops away</PresentableDistance>
147 -\\
148 - <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
104 +\\\\ <!~-~- The number of stops on the vehicle's current trip until the stop in question, starting from 0 ~-~->
149 149   <StopsFromCall>6</StopsFromCall>
150 150   </Distances>
151 151   </Extensions>
152 -\\
153 - </OnwardCall>
154 -\\
155 - ... more OnwardCalls
156 -\\
157 - </OnwardCalls>
158 -</MonitoredVehicleJourney>
108 +\\\\ </OnwardCall>
109 +\\\\ ... more OnwardCalls
110 +\\\\ </OnwardCalls>
111 +</MonitoredVehicleJourney>##
159 159  
160 160  === The PresentableDistance field: ===
114 +
161 161  The logic that determines whether stops or miles are shown in the PresentableDistance field is below:
162 162  
163 163  show distance in miles if and only if:
164 164  
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)
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)##
166 166  
167 167  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):
168 168  
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)
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)##
170 170  
171 171  Show "approaching" if and only if:
172 172  
173 - ##distance_in_miles to immediate next stop < P
127 + ##distance_in_miles to immediate next stop < P##
174 174  
175 175  show "at stop" if and only if:
176 176  
177 - ##distance_in_miles to immediate next stop < T
131 + ##distance_in_miles to immediate next stop < T##
178 178  
179 179  Current Parameter Values:
180 180  
181 -|=Parameter|=Value
135 +|=Parameter|=Value   
182 182  |D| .5 miles
183 183  |N| 3 stops
184 184  |E| .5 miles
... ... @@ -187,9 +187,8 @@
187 187  
188 188  === Transparency of Block vs. Trip-Level Assignment ===
189 189  
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.
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. 
191 191  
192 192  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.
193 193  
194 194  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 -