# A Data Processing Framework for Polar Performance Diagrams
## 3 The hrosailing Framework
### From Real World Measurements to Polar Diagrams  
As a part of the hrosailing framework we introduce our pipeline model, a modular model designed for easy and flexible data processing. Data processing often involves \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Representation** & Table & PointCloud & Curve \\ \hline Human usable & & & \\ Human readable & & & \\ Compatible with other software & & & \\ Independent of interpolation & & & \\ Adaptability & & & \\ Smooth polar plot & & & \\ complete slices & & & \\ adapts to real data & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Table of advantages and disadvantages of different representations of polar diagrams. We use \(\langle 0\rangle\) to indicate that the corresponding feature is present to some degree. similar steps, and not every researcher should be required to start this process from zero. Especially in the case of polar diagram generation, there are some additional heuristics which can be used. The main idea is to carefully choose defaults that will produce, in most cases, acceptable results. In order to improve the results, a researcher can only modularly modify some steps (such as exchanging the pipes of a pipeline) while the other steps remain at their default functionality. In the following, we explain our pipeline model in some detail (see also Figure 7). Real-world sailing data can come in different forms, for example as NMEA sentences (see [21]), other file formats or arrays. Thus, the data needs to be transformed into a standard format (by a DataHandler) for further processing. The format used by the hrosailing framework is a measurement table where each row corresponds to a point in time and each column corresponds to a measured quality. In some cases, we have a good (or sufficient) understanding of how to calculate some values from the data. As an example: assume you have recorded some data including the current and want to eliminate the respective effect by a simple vector subtraction on the boat direction. Such computations (done by an InfluenceModel) are the next step of the data-handling pipeline. The following two steps together deal with data that, due to real world effects, probably contain errors. First of all, a method (Weigher) is used to evaluate the quality of every measurement and assigns a corresponding weight to it. The Weigher thereby produces data points with only 4 entries, namely TWS, TWA, BSP and the weight of the data point. The generated weights can then be used for the rest of the processing. In the next step (Filter), data which probably does not contain useful information is deleted (preferably according to the weights assigned before). After this step, you also can create artificial data points modelling the expected behaviour of a polar diagram obtained, for example, from theory. By default, additional data points with weight 1 which indicate that you can not sail directly against the wind are added. After these first steps, the pipeline has produced three-dimensional data points that are preprocessed, weighted and filtered. To obtain a polar diagram from this, the process needs to be extended further, depending on the representation of polar diagram you wish to obtain. In order to do this, the hrosailing framework provides the notion of a PipelineExtension which takes weighted points and produces a polar diagram (see also rows 2-4 in Figure 7). While the framework predefines an extension for every supported kind of representation, a researcher may append their own extension to the pipeline. Figure 7: Pipeline model to obtain polar diagrams (PDs) from real-world measurements. The hrosailing framework contains three predefined extensions, one for each supported polar diagram representation. A TableExtension produces a PolarDiagramTable from given wind speed and wind angle resolution by applying an interpolation method on a neighbourhood of the data points.