## 2 Materials and Methods
### Base Station Software  
The smartphones that were used in the research had to be equipped with proper original software in order to function as the base stations. The application was to realize general functions that were determined:  
* Receiving signals from BLE transmitters. * Registering given information from smartphone. * Filing system of data in csv format on SD card. * Data synchronization on DropBox platform. The signaled functionality was then applied on the level of modeling in UML notation. The implementation of application called Cow Behavior Listener involved the use of Java language in the environment Android Studio version 1.2.2. and the use of dedicated SDK (_Software Development Kit_). This dedicated kit of programming tools resulted from the cheapest BLE, with which smartphones were equipped. When constructing software, the libraries, which were to ensure cooperation with Dropbox platform, were used [22; 24]. The developed application with simplified interface, running in the background, informed the user about operations that were conducted. Configuration possibilities of the developed application CBL include the following:  
1. Entering phone name--the system was designed in such a way so as to make scaling possible. It meant that we could increase the number of both BLE devices and receivers. Phone identifier consisting of model name and number assigned to a given model was used to determine animal position. In the research we used telephones marked as motoe1, motoe2, motoe3. This telephone marking corresponded with catalogue name in Dropbox system, where data were collected and synchronized. 2. Determining catalogue, in which data were recorded on SD card. The basis for functioning of the discussed application is recording measurements made by beacons (Figure 4), which determine the following:  
* Binary information, saying if a beacon is in motion (on the basis of accelerometer). * Unique identifier of a beacon (alphanumeric value). * Beacon's temperature, expressed in the Celsius Scale. * Acceleration component towards axis X. * Acceleration component towards axis Y. * Acceleration component towards axis Z. * Battery condition (descriptive value: full, unknown, flat or discharged). * Number of seconds determining duration of beacon in a given condition (motion, lack of motion) and recording of quantities calculated on the basis of base stations, which include:  
1. Power of the received signal in Dbm. 2. Approximate estimated distance on the basis of the power of the the received signal (descriptive value: very close, close, not far away, far away). On account of differentiated signal suppression, its power was not used in the process of animals' location. User could also influence, to a certain extent, the way the application worked by modifying the configuration of text files. The real problem to solve was the huge number of data. It was the consequence of the number of beacons that were used as well as of the huge frequency of measurement. It was accompanied by the limited storage capacity of SD cards. Because of that it was decided to collect data in csv files, which contained only an hour-long measurement. During this process, a task aimed at synchronizing files on Dropbox platform was cyclically started. The final complete synchronization was a signal to delete the files on smartphone, making disc space for the new set of data. Data that was acquired, later fed the analytical base. Creating data warehouses included the stage of conceptual modeling, carried out with proper/appropriate notation. The model structure in the form of the table of facts illustrated in the form of blue dots and dimensions described in words was illustrated below (see Figure 5). These models were the basis for creating proper tables, firstly on the level of Microsoft tools, and secondly on BigQuery platform. The structures that were obtained, filled with data, were the source of query. They were constructed in different way depending on the technology that was selected.