# System Proposal for Mass Transit Service Quality Control Based on GPS Data
## 5 System Overview
### The SQCM
#### 5.2.1 The Improved Transport Network Model
Output data: \(n\)\(Z_{r}\) clusters \(n\)\(C_{r}\) centroids of each cluster \(K\_\)means_classifier (\(Z_{r}\), \(n\), \(P_{r}\), \(Z_{r}\), \(C_{r}\) ) Step 3: Identifying the resulting clusters For each \(Z_{r,i}\) resulting cluster, where \(1\leq i\leq n\) If \(Z_{r,i}\) cluster contains no stop then Label the cluster as an unscheduled stop point. End if If \(Z_{r,i}\) contains one and only one stop \(p\) on the line then Select \(Z_{r,i}\) as the set of readings to obtain the time of arrival at the stop on the line service of route \(r\). End if If \(Z_{r,i}\) contains k stops and k > 1 then: \(\text{Classifier\_Stationary\_Data}\) (\(Z_{r,i}\), \(k\), \(C_{r,i}\)) Where: \(Z_{r,i}\): the GPS stationary data belonging to class \(i\). \(k\): number of stops in cluster \(i\). \(C_{r,i}\): positions of the \(k\) stops in \(Z_{r,i}\). End if \(Done\)

#### 5.2.2 Step 1: Tracking

The quality control process starts with specification of the route, \(r\), and the period of time, \(T\), during which it is to be conducted. From these initial specifications, the objective of this step is to obtain the RAVL set of data acquired when the line services on route \(r\) were completed in time period \(T\), a set hereinafter represented by \(RAVL_{r,T}\). As the RAVL data are obtained periodically by all vehicles in the fleet while operating the line services, regardless of the service in question, \(RAVL_{r,T}\) is a subset of the set that comprises all the RAVL data of the system. To select the RAVL data that are part of \(RAVL_{r,T}\) it is necessary to first obtain the set of line services on route \(r\) that have been operated during the period in question, i.e., \(L_{r,T}\). For each line service \(l_{i}\in L_{r,T}\) we need to know the following: the vehicle that operated it and the time it began and ended. As we have already discussed in Section 3, all activity carried out by the transport operator is stored in the TDB. The data stored in this database include the start and end times of the line services, and this is where the data required for each \(l_{i}\in L_{r,T}\) are obtained. This TDB query produces a data set in which each record represents a \(l_{i}\in L_{r,T}\); Table 3 shows the structure of each of these records. Once the required data from each \(l_{i}\in L_{r,T}\) have been obtained, the \(RAVL\in AVL_{r,T}\) data will be those for which the vehicle field, \(RAVL_{Vch}\), coincides with the vehicle field of a \(l\in L_{r,T}\) record and the time that the position was captured; \(RAVL_{T}\) is greater than or equal to the time at which line service \(l\), \(l_{T0}\) began, and less than the time at which line service \(l\), \(l_{T1}\) ended. In formal terms:

\[\forall RAVL\in AVL_{r,T},\exists l\in L_{r,T}:RAVL_{Vch}=l_{Vch}\wedge l_{T0} \leq RAVL_{T}\leq l_{T1}\]

* For there to be a reliable relationship--based on time data--between the data from the TBD and the AVL module, both components must be synchronised using the same clock source. Therefore, the driver's console uses the GPS receiver clock to synchronise its clock. Figure 5: Example of a set of position data for vehicles in an urban section of the analysed route. \begin{table}
\begin{tabular}{c c} \hline
**Field** & **Description** \\ \hline \(l_{vch}\) & Vehicle identifier \\ \(l_{T0}\) & Time that the line service on route \(r\) began, expressed in UTC. \\ \(l_{T1}\) & Time that the line service on route \(r\) ended, expressed in UTC. \\ \hline \end{tabular}
\end{table} 
Table 3: Structure of the table of records obtained from the TDB query. #### 5.2.3 Step 2: Filtering

For the quality control to be reliable, data integrity must be ensured; this is the purpose of this step in the process. Data integrity means that there are no erroneous data and that the dataset is complete.