## 1 Introduction  
The huge development of road infrastructure, including motorways, demands a precise evaluation of the necessary services for road transport. Among others, one such service is parking spaces next to motorways. They are essential because vehicle occupants and vehicles require places to stop. Thus designing an appropriate number of parking spaces for the users of motorways is a fundamental issue.  
The existing literature concerning the methods for evaluating required parking spaces next to motorways can be divided into three groups with regard to the countries they derive from: German, British [1], and American [2]. All three methods for evaluating the demand for parking spaces consider calculations based on imprecise coefficients, i.e., coefficients calculated on the basis of empirical research and statistical analysis. Determining the number of vehicles interested in stopping at a rest area is related to several factors, e.g., traffic volume on the adjacent section of the road, a driver's working time and the related trip-length distribution, rest area qualitative factors, and the average daily traffic; however, the main parameter is accurate information about vacancies at existing rest area parking lots. This information is being used too by drivers who try to find available parking spaces for repose.  
We can distinguish two fundamental methods for determining the occupancy of parking spaces. The first method is the so-called direct method. Figure 1 shows the distribution of occupancy detectors (cameras) used in the direct method. The main problem with counting vehicles in rest areas in Europe and America is the overflowing of parking lots in the rest areas. Thus, it is impossible to count parked vehicles with traditional, direct methods which use cameras and Lidar (light detection and ranging) to detect the presence of vehicles in individual parking spots. This makes it impossible, e.g., to meet the United Europa (EU) recommendations regarding information about, among other things, parking occupancy [3]. The solution to this problem may be the indirect method of counting vehicles. Thus we can point to two types of methods:  
1. The direct method gives the number of vehicles in the parking lot by using cameras and Lidar (light detection and ranging) that focus on the parked cars.
2. The indirect method gives the parameters for the entire lot using cameras that count the cars entering and exiting the lot.  
Therefore, regarding the unsolved problem of counting vehicles in rest areas, we propose a method for determining a rest area's car park occupancy using indirect measurement and assess how the certainty of this indirect counting method could be improved.  
The authors have divided their research into the following sections. In Section 2, Research Background, we show how other authors have tried to resolve the problem of counting vehicles in parking lots. In Section 3, Traffic-Volume-Monitoring System, we discuss the system for measuring that we have been using. This system is fully automatic but without any calibration method. This system uses an AI application and was our primary source of real data. At the end of this section, we show a new solution for detectors without a mains supply which we started to use this year. In Section 4, Calculation of the Number of Vehicles Entering and Leaving the Car Park, we show a simulation of parking requests during a specified time. In Section 5, Evaluating the Uncertainty of Determining Parking Space Occupancy Duration in the Rest Area, we show how the certainty of the measurement using the indirect method can be improved using virtual calibration.