A computer program embodied on a non-transitory computer readable medium causing a computer to control operations of an electronic scanning radar apparatus that is mounted on a moving body, which estimates a receiving wave direction, comprising:
- transmitting a transmission wave from a transmission unit;
- receiving a receiving wave coming from a target by a receiving unit, the target reflecting the transmission wave;
- generating beat signals from the transmission wave and the receiving wave by a beat signal generation unit;
- resolving the beat signals into beat frequencies having a predetermined frequency band width and calculating a complex number data by a frequency resolution processing unit;
- detecting a peak value from intensity values of the beat frequencies so as to detect an existence of the target by a target detecting unit;
- storing a data generation unit into a memory unit, the data generation unit being generated in a present detecting cycle that is performed in a present time and used in a next detecting cycle that is performed after the present detecting cycle, the present and next detecting cycles being repeatedly performed to calculate an incoming direction of the receiving wave;
- making association between a target detected in the present detecting cycle and the target detected in the past detecting cycle that is performed before the present detecting cycle and storing the data generation unit associated with the target into the memory;
- generating a generative complex number data to correspond to the data generation unit, the generative complex number data being generated based on a complex number data calculated from the beat frequencies;
- and
- calculating, for each antenna, an incoming direction of the receiving wave based on each normal equation formed by use of the generative complex number data, the generative complex number data being formed to correspond to the complex number data of a detected beat frequency that is the beat frequency which an existence of the target has been detected and the data generation unit,
- wherein calculating the incoming direction includes an averaging process that is performed for at least part of elements that form the normal equation.