An electronic key system has been proposed. The electronic key system performs a wireless communication between a portable communication terminal such as a so-called smartphone and a vehicle control apparatus mounted to a vehicle, and the electronic key system causes a door to be locked or unlocked or an engine to be started when authentication information on the portable communication terminal and authentication information on the vehicle coincide with each other. In this type of electronic key system, the portable communication terminal and a vehicle communicate with each other by employing a short distance wireless communication such as Bluetooth (registered trademark) that is widely prevailing among portable communication terminals including the smartphone.
A service to change control contents to be implemented according to a positional relationship between a portable communication terminal and a vehicle is proposed, so that when the portable communication terminal approaches the vehicle, locking or unlocking a door is permitted, or when the portable communication terminal exists in a vehicle compartment, starting an engine is permitted. This kind of service utilizes a technology (refer to, for example, patent literature 1) which measures a distance on the basis of a received electric wave intensity of a wireless signal or a response time elapsing from transmission of the wireless signal to receiving a response signal of transmission a range finding request signal.
The inventors of the present application have found the following regarding a vehicle control apparatus.
According to a technique of measuring a distance based on the received electric wave intensity or a response time in wireless communication, a measured value of the received electric wave intensity or the response time to the distance may change according to an environment in which electric wave propagates, and an error may occur in the distance to be measured. When a result of distance measurement has an error, a determination around a border of a vehicle compartment and a place outside the vehicle may be unreliable, and a false determination may occur.