To satisfy the optimal environment in agricultural buildings, much effort is made to control ventilation rate and indoor temperature. However, distribution of fresh air is equally important for animal performance and welfare. So far, no sensor is available to measure and to control airflow pattern continuously in a ventilated building. Therefore, an airflow pattern sensor was developed to measure the trajectory of a non-isothermal air jet in a building with a single or multiple air inlet(s). The experimental conditions covered the whole year characteristics to come up with a general conclusion in an experimental room of 8 m x 4 in x 4 m. The principle of the airflow pattern sensor is to predict the trajectory of a non-isothermal air jet from the temperature distribution measured near to the air inlet. As seen from data analysis, a prediction of the airflow pattern in terms of drop distance was possible with an error of 0.87 in in the range from 2.40 to 7.15 in using eight temperature sensors on an arc around the inlet opening in combination with inlet and outlet temperatures of the room. The sensor was found to be useful for on-line control of the airflow pattern. (c) 2004 Silsoe Research Institute. All rights reserved Published by Elsevier Ltd.