7th Latin American Workshop On Communications - 2015 GPS Assistance taximeter suited to the characteristics Of a City Julio Santisteban Ximena L. Aranzaens Urb. Campiña Paisajista s/n Barrio Urb. Campiña Paisajista s/n Barrio de San Lázaro, Arequipa, Perú de San Lázaro, Arequipa, Perú Universidad Católica San Pablo Universidad Católica San Pablo jsantisteban@ucsp.edu.pe ximena.aranzaens@ucsp.edu.pe  Abstract— Today almost every one use a taxi, in many It is very common that taximeters use electrical impulses, countries the rate is agreed upon the service is taken, in many and that they are connected to the car transmission. The cases the rate is too low or high and the service is not taken, on electrical impulses enable the taximeter to measure the the other hand taximeters provides good estimated of the service distance and time [15]. but are too complex to install in a cab and maintain. Today we can get advance of GPS technology to improve and enhance the In this work present a novel taximeter, that consider some taximeters while the rate is calculate base on the different parameter of geography and socioeconomically situation features of a city. We propose a novel algorithm to calculate rate from a city. using GPS data and base on the different features of a city; we build a prototype and test it with very good results. This work has been developed in a city without any type of taximeter, and it is a priority improve the service of the Keywords—gps; taxi; taxímetro public transportation system. Another important information is that it has a particular geography, so it is important to take I. INTRODUCTION in mind the different conditions of travel and the different costs. T he GPS is a global positioning system consisting of an orbit of 24 satellites, which were originally used for military purposes. Nevertheless, it was opened II. BASIC PARAMETERS later for commercial and civilian use, [1], [2], [4] and [6]. The algorithm of a GPS-based taximeter, it is proposed to provide rate according to the distance travelled, also taking Consisting on a constellation of 24 satellites that are into account parameters which are: located in 6 orbital planes with 60º of separation between each of them [2]. Like any satellite-based system, the timing  Place is very important, that is why they are equipped with 4 atomic  Time clocks: two cesium and two rubidium.  Fuel Comsuption The GPS navigation system consists of 3 basic parts, which are: navigation control center, the terminal and the VHF  Aditional Charge wireless communication network. Vehicle navigation terminal indicates the current position of the vehicle, its  Date (holiday). speed, and other information in accordance with the GPS  Traffic Hour receiver. After processing this information, it is transmitted to the control center [4].  Cost of Fuel. GPS provides 2 service levels which are SPS and PPS [9]. The SPS is the standard obtained with the simple frequency The algorithm to measure distance that has been developed C/A code. The PPS is the precise service based on code P for is based on different parameters, one of which is the points dual frequency and is only accessible to authorized users. The that GPS delivers. Hence, the first important thing is to C/A code is used for civil purposes, L1 and L2 are its consider the frequency of the point taking. frequencies. A. Definition of the frequency of the point taking The idea of NMEA is to send a data line, which is To define this, it is necessary to first take measures every completely independent [11]. All the lines of the NMEA 40 seconds, then every second in moderated traffic protocol must begin with the symbol "$" [7] and [24], conditions, at an average speed of 40 Km per hour (maximum followed by the letters GP. The size of each line should not rate allowed) [23]. exceed 80 characters of visible text. There are different types In Figure 1 are the points taken in the first case, the route of message, and each one of them provides different starts at a ends in b; and you can clearly see that is not feasible parameters, which gives information. The most basic are the because de reconstructed routes is not real. This is because GGA, RMC the GSA, [18]. the time between points is too long. Copyright © 2015 for the individual papers by the papers’ authors. Copying permitted for private and academic purposes. This volume is published and copyrighted by its editors. Latin American Workshop On Communications' 2015 Arequipa, Peru Published on CEUR-WS: http://ceur-ws.org/Vol-1538/ you can see how would be the first possible division, which is in concentric circles, the central area of this figure represents what would be the Centre of the city, and while go Fig. 1: Case number 1 taken from points every 40 seconds away and exchange areas also would change the base price given per meter. In this type of graph the entire circumference will have the same price level and the size of the circumference will be depending on how many messages are taken per second of all the GPS receiver module delivery. And speed of average vehicles have in the city. The second way is proposed in figure 3 too. Where each circumference is divided into zones, this makes the method more specific, but at the same time this brings one greater complexity, since to make it as similar as possible to the figure, the streets in the city should be square which In Figure 2, the second case, where the decision is every unfortunately is not. And also should bear in mind the second it is viable because you can take the points and azimuth angle of the path that the taxi driver is taking. reconstruct the real distance that the car is traveling. In this case the error is less than 1 m that does not change the measurement considerably. Fig 3: Division into zones concentrically and in each level Fig. 2: Second case, take points every second The last form that has been proposed for the calculation of the rates, as shown in Figure 4, is the divide the city by . districts and in turn each one in urbanizations. This would be In addition, it is important to consider that the maximum simpler if all districts were square or at least have regular speed is 40 Km/h, [29]; this speed may vary depending on the form, but this is not real unfortunately as shown in Figure 5, place where the system is deployed. It is important that the which is a graph taken from Google Earth, with an example, space between points will not be so big, for that reason the of the form for a district. This heterogeneous forms makes next formula is enunciate. impossible to develop this three proposals. 𝑉 𝑡 = 𝑚𝑎𝑥 (1) 11 𝑚 Fig. 4: Division by districts and urbanizations Where: DISTRITO DISTRITO t: It is the interval to take the points Vmax: The maximum permitted speed DISTRITO The system take a point every 11.11 m approximately DISTRITO when it is configured to take a point every second, as shown DISTRITO in Figure 2. Taking this interval of points, we will have 10 División por urbanizaciones dentro de un distrito points per block approximately. Fig. 5: Map of the city with an example of a district B. Division of the city To achieve an efficient way of pricing the taxi service, try different kinds of methods. First dividing the city by sectors, first urban, semi-urban and rural if they exist, to later divide the urban sector in areas where the fee will change depending on some factors, it is important that that the algorithm does not become too complex division of this sector is as homogeneous as possible. At last the algorithm of division chosen is to divide the city TABLE 1: APPROACH GEOGRAPHIC COORDINATES TO METERS into squares of 1 Km per side, this algorithm has been chosen Coordenadas Geográficas Metros to simplify the programming, without reducing the system’s 1º 111000 m efficiency. The division can be seen in Figure 7, several of the squares divide a single district, and can be differentiated 1’ 18350 m by percentages that will be multiplied by the rate base. The 1’’ 30.83 m dividing lines of the quadrants must be parallel to the meridians and the parallels so that the algorithm works properly. The three values that were converted to meters are then added. The same procedure is done for length. After this process, formula 2 can be used. The distances obtained will Fig. 6: City divided in squares of 1 Km per side be accumulates and will become the total distance of the route. Fig 7: Method to measure distance III. ALGORITHM For the calculation of distance, it is important to explain in For the calculation of the fare, in addition to the distance advance the logic that will used, taking in mind that every travelled, it is fundamental to know the actual quadrant of the measured point will have its own latitude and longitude. taxi. This will give a percentage that is multiplied to the rate Knowing that the longitude is parallel to the Equator and the base, which is given by every 20 meters. latitude is transversal to it. In the worst case, wherever you go a triangle will be drawn. Otherwise, either the longitude The rate base will be differentiated for each company or the latitude will increase. according to their expenses, being able to determinate their rate base for the day. This will be entered in an encrypted way Taking into account that we will use a point every second, by means of the keyboard’s system. For the implementation these triangles will be small, as shown in Figure 7, using the of the prototype, was calculated a rate base through the Pythagorean theorem we can get the distance value. For this different pricing tables that exist in the city, thus, obtaining the formula we will use for the worst case will be: the rate base of 0.008 as proof. 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 = √(𝐹𝑃𝑙𝑎𝑡 − 𝐼𝑃𝑙𝑎𝑡)2 + (𝐹𝑃𝑙𝑜𝑛 − 𝐼𝑃𝑙𝑜𝑛)2 (2) The percentages of each quadrants was calculated based at empirical study, using the comparative analysis. That was Where: made with the different tables of prices found at the city. Each FPlat= Final point in latitude company provides a percentage to the different areas of the city, this values depends. So this table also need to be IPlat=Punto Inicial en latitud differentiated for companies. For the implementation of the FPlon= Final point in longitude prototype the division of the city is shown in table 2 and table 3. The percentages of each quadrants is shown at table 4. IPlon= Initial point in longitude TABLE 2: LATITUDE DIVISION IN 1 KM. To make this possible, it is necessary to convert the longitude and latitude, which are currently in degrees, Latitude minutes and seconds; to meters. Taking in consideration that Grades Minutes Seconds Meters all meridians have an approximate length of 20003,916 km 16° 19 17.82 35695.5906 that go from - 90 to 90 degrees, i.e. 180°: The approximations 16° 19 50.91 36715.7553 of geographical coordinates to meters can be found in table … 1. 16° 28 12.04 52165.5932 16° 28 45.13 53185.7579 TABLE 3: LONGITUDE DIVISION IN 1KM IV. TEST/CASES Longitude Grades minutes seconds Meters This section will be an example of follow-up to a possible 71 27 55.06 51642.0998 route for a taxi, and how the rate calculated. It is shown in 71 29 34.48 54707.2184 table 5, in this example, the basic rate taken is 0.008 soles, … for every 20 meters. The chosen route begins at the plaza de 71 36 47.23 68048.9009 Armas to the Calle Fernandez Davila. 71 37 20.37 69070.6071 In this table you can see that the total at the end of the tour fare, has a reasonable according to the distance of travel cost, since this example consists of a short route where the If the service is during in an hour or zone of traffic, the percentage by area is the same, the final price is a price low. taximeter sends a high number of frames, if these are more than 20 each 20 meters, the rate increases in 30% of the rate V. IMPLEMENTATION base every 20 meters that the car is in the same state. This amount is determined by the average expenditure which the A. Design driver uses to move normally, without a situation of high Diagram schematic fact software Proteus you can see in traffic. Figure 12, this figure shows that to simulate GPS input which Another situation that also adds a percentage to the rate not is located inside the devices, owning this software; has base is the day. If the service is being on Sunday or in been used a virtual terminal, which is connected to the port holidays the basic rates increase in 50% more. Besides if the of the microcontroller PIC 18F4550 serial. [24]. service is taken in hour from 10:00 pm to 4:00 am, the basic Figure 8: Taximeter’s Schematic rate add a 10% more. The line ZDA is used to know the date. This line will be taken into account only at the beginning of the service. And finally to know if the service is providing to high hours of the night, used the line called GLL, where gives the current time in UTC format data. TABLE 4: PERCENTAGE FOR EACH QUADRANT Longitude 51642.099 52663.806 53685.5122 54707.2184 55728.9246 56750.6308 57795.7678 58817.474 59840.1051 Latitude 35695.5906 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 36715.7553 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.05 37735.92 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.05 38756.0847 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.05 39776.2494 0.01 0.01 0.01 0.01 0.03 0.03 0.4 0.001 0.03 40986.9435 0.01 0.01 0.01 0.01 0.03 0.03 0.4 0.4 0.4 42007.1082 0.3 0.3 0.3 0.3 0.3 0.04 0.4 0.4 0.4 43027.2729 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.1 44016.2993 0.01 0.02 0.3 0.09 0.09 0.09 0.09 0.4 0.1 45046.0213 0.01 0.02 0.3 0.04 0.05 0.05 0.06 0.4 0.1 46017.7829 0.01 0.02 0.3 0.04 0.04 0.04 0.05 0.06 0.4 47064.7697 0.01 0.01 0.01 0.01 0.01 0.02 0.03 0.4 0.05 48084.9344 0.01 0.01 0.01 0.01 0.01 0.02 0.03 0.4 0.05 49105.0991 0.01 0.01 0.01 0.01 0.01 0.02 0.03 0.4 0.05 50125.2638 0.01 0.01 0.01 0.01 0.01 0.02 0.03 0.4 0.05 51145.4285 0.01 0.01 0.01 0.01 0.01 0.02 0.03 0.4 0.08 Figure 9: Taximeter schematic in Eagle Software In this figure you can see the prototype consists mainly of an LCD, a GPS receiver, a microcontroller 18F4550 and a numeric keypad. VI. FUTURE WORKS Rate base which is used to calculate a service rate as well as other values base for the various factors included in the calculation, should be updated from time to time, some alternatives is to apply for the driver that you enter these values but using some sort of encryption or other methods. Design of the prototype, for convenience in Eagle schematic diagram was implemented. The design was Or send them through any system, so that it is completely generated for PCB. transparent to end users as the driver and the passenger. As a solution for this it is proposed to use a GPRS terminal to send B. Construction and receive data, and update automatically. Figure 10: Taximeter with GPS assistance prototype Using this method, there will a large amount of data, which opens the door to many more utilities and applications to improve and extend the functionality of the taximeter. TABLE 5: FOLLOW ROUTE Origen Origen Destino Destino Distanci Noch Doming Precio Porcentaj Precio Precio (Nombre (Coordenadas (Nombre (Coordenadas a e o (50%) e por zona anterio total ) geográficas) ) geográficas) (30% r ) Plaza de Latitud: 16°23'55.32"S Calle Latitud: 16°23'47.18"S 271.54 No No 0.082 Centro 0 0.082 Armas Longitud: Alfonso Longitud: 71°32'7.44"O metros (10%) 71°32'10.91"O Ugarte Calle Latitud: 16°23'47.18"S Calle Santa Latitud: 495.46 No No 0,14923 Centro 0.081 0.23123 Alfonso Longitud: 71°32'7.44"O Marta 16°23'52.76"S metros 8 (10%) 8 Ugarte Longitud: 71°31'51.78"O Calle Latitud: Calle Santa Latitud: 16°23'51.68"S 43.40 No No 0,01362 Centro 0.231238 0.24485 Santa 16°23'52.76"S Rosa Longitud: (10%) 8 Marta Longitud: 71°31'50.83"O 71°31'51.78"O Calle Latitud: 16°23'51.68"S Calle San Latitud: 16°23'53.16"S 63.73 No No 0,01971 Centro 0.244858 0.26457 Santa Longitud: Pedro Longitud: 9 (10%) 7 Rosa 71°31'50.83"O 71°31'49.34"O Calle San Latitud: 16°23'53.16"S Av. La Paz Latitud: 237.79 No No 0,07193 Centro 0.264577 0.33651 Pedro Longitud: 16°23'59.28"S 7 (10%) 4 71°31'49.34"O Longitud: 71°31'44.40"O Av. La Paz Latitud: Av. Latitud: 16°24'3.46"S 205.2 No No 0,06216 Centro 0.336514 0.3986 16°23'59.28"S Goyeneche Longitud:71°31'39.03" (10%) Longitud: O 71°31'44.40"O Av. Latitud: 16°24'3.46"S Calle Latitud: 16°23'55.86"S 361.74 No No 0,10912 Centro 0.3986 0.5077 Goyeneche Longitud:71°31'39.03" Fernández Longitud: 2 (10%) O Dávila 71°31'29.65"O [7] A.Pozo-Ruiz, A.Ribeiro, García-Alegre, M. C., L.García, D.Guinea, &F.Sandoval. (1999). SISTEMA DE POSICIONAMIENTO GLOBAL VII. CONCLUSIONS (GPS): DESCRIPCIÓN, ANÁLISIS DE ERRORES, This work has managed to provide a means of charging, the APLICACIONES Y FUTURO. system urban transportation taxis, which provide an optimum [8] Lijun, W., &Huanping, M. (2010). The system model and analysis of all-digital temporal and spatial anti-jamming for GPS receivers.IET shape of collection where the driver and the user feel satisfied. ConferencePublications, 2010(CP569), 258-261. GPS technology provides a fully external to this system and [9] Satélites GPS: fundamentos y aplicaciones (2006) Retrieved 28 de Abril 2012, not manipulated by the driver, providing some kind of fromhttp://concurso.cnice.mec.es/cnice2006/material121/unidad3/sat_ security to the system, since the data may not be altered by gps.htm external media. [10] Villar, J., Otero, A., Otero, J., & Sánchez, L. (2009). Taximeter verification using imprecise data from GPS.Engineering Applications In addition, the developed algorithm, provides rates of Artificial Intelligence, 22(2), 250-260.doi: differentiated according to socioeconomic areas to travel, is 10.1016/j.engappai.2008.07.002 given on the taxi route. What regulates the cost in such a way [11] Richard B, L. (1995, Julio). NMEA 0183: A GPS Receiver Interface that there is a method that is more fair and equitable for the Standard. INNOVATION, 54 - 57. user, making more accessible to the public in general. [12] Liu, S., Liu, C., Luo, Q., Ni, L. M., &Qu, H. (2011). A visual analytics system for metropolitan transportation. Paper presented at the Calculate the taxi fare is not a simple matter must consider Proceedings of the 19th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, Chicago, Illinois. different factors and each of them must be customized for [13] Jantarang, S., Potipantong, P., &Worapishet, A. (2002). A low cost real- each city, have demonstrated that it is possible to have an time intelligent taximeter sensor.APCCAS (1)'02, 217-220. algorithm that can consider these factors and calculate a rate. [14] Zhang, D., Li, N., Zhou, Z.-H., Chen, C., Sun, L., & Li, S. (2011). The use of GPS provides data that is essential to replace the iBAT: detecting anomalous taxi trajectories from GPS traces. Paper odometers, on the other hand must implement an algorithm presented at the Proceedings of the 13th international conference on that can consider this this type of information to generate an Ubiquitous computing, Beijing, China. odometer type GPS. [15] Coche, M. d. (2012). ¿Cómo funciona un taxímetro? Retrieved 2 de Mayo, 2012,fromhttp://www.marcadecoche.com/taximetro.html The use of GPS also facilitates using a fully external to [16] Casiopea. (2012). Taxis Retrieved 04 de Mayo, 2012,from automobile technology, since this avoids manipulation of http://wiki.ead.pucv.cl/index.php/Taxi users, which would avoid that measurement is inaccurate and [17] Corona. (2012). Corona Taxis y RemisesRetrieved 4 de Mayo, 2012,fromhttp://www.taxicorona.com/index.php?ID=c2NvcnBlcnVh attempt to deceive any user. Y0BzZXJ2aWNpb3M=&MI=c29pY2l2cmVzQGNhdXJlcHJvY3M To prevent the loss of signal in urban canyons repeaters, [18] SKYLAB. (2012). GPS Module DataSheetDatasheet (pp. 10). could be installed in such a way that there is signal 99% of [19] CAST, C. F. H. (2012). DISEÑO E IMPLEMENTACIÓN DE UN PROTOTIPO ELECTRÓNICO PARA EL MONITOREO travel. This would have to be implemented by the company VEHICULAR PASIVO EN LA CIUDAD DE LATACUNGA, that traded the finished prototype. UTILIZANDO TECNOLOGÍA GPS. INGENIERO ELECTRÓNICO EN INSTRUIMENTACIÓN, ESCUELA POLITECNICA DEL REFERENCES EJÉRCITO EXTENSION LATACUNGA. [20] Torres, M., Paz, K., & Salazar, F. G. TAMAÑO DE UNA MUESTRA [1] Walsh, D., Capaccio, S., Lowe, D., Daly, P., Shardlow, P., & Johnston, PARA UNA INVESTIGACIÓN DE MERCADO (pp. 13). Boletín G. (1997). Real time differential GPS and GLONASS vehicle Electrónico Universidad Rafael Landívar. positioning in urban areas.Space Comms., 14(4), 203-217. [21] Labcenter. (2012). labcenter electronics.Proteus PCB Design Packages [2] Chadil, N., Russameesawang, A., &Keeratiwintakorn, P. (2008, 14-17 Retrieved 28 de Junio, 2012, from May 2008). Real-time tracking management system using GPS, GPRS http://www.labcenter.com/products/pcb_overview.cfm and Google earth. Paper presented at the Electrical Engineering/Electronics, Computer, Telecommunications and [22] Microchip. (2012). Microchip.MPLAB Integrated Development Information Technology, 2008. ECTI-CON 2008.5th International Environmen Retrieved 28 de Junio, 2012, from Conference on. http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAG E&nodeId=140 6&dDocName=en019469&part=SW007002 [3] Karimi, H. A., & Lockhart, J. T. (1993, 12-15 Oct 1993). GPS-based tracking systems for taxi cab fleet operations. Paper presented at the [23] Ministerio de Transportes, C., Vivienda y Construcción. (2012). Vehicle Navigation and Information Systems Conference, 1993., REGLAMENTO NACIONAL DE TRANSITO. Proceedings of the IEEE-IEE. Retrievedfromhttp://www.seguridadidl.org.pe/normas/relevantes/trans ito.pdf. [4] Lou, S., Xing, J., Chen, G., Zhang, D., & Li, C. (2008). The Design of Vehicle GPS Terminal Based on S3C44B0X. Paper presented at the [24] Microchip. (2009). PIC18F2455/2550/4455/4550 Data Sheet 28/40/44- Proceedings of the 2008 International Conference on Embedded Pin, High-Performance, Enhanced Flash, USB Microcontrollers with Software and Systems Symposia. nanoWatt Technology (pp. 436). www.microchip.com. [5] Akopian, D., &Agaian, S. (2005, 17-20 Oct. 2005). A fast position recovery approach for GPS receivers in jamming environments and a recommendation for future GPS signal structure. Paper presented at the Military Communications Conference, 2005. MILCOM 2005.IEEE. [6] Liang, Z., Amin, M. G., & Lindsey, A. R. (2000, 2000). Subspace projection techniques for anti-FM jamming GPS receivers. Paper presented at the StatisticalSignal and Array Processing, 2000. Proceedings of the Tenth IEEE Workshop on.