# A Data Processing Framework for Polar Performance Diagrams
## 1 Introduction  
A natural occurring task when steering a sailing vessel is to predict the speed over ground (SOG) in a given direction and in a given situation. This prediction is a difficult physical problem ([1,2]) and depends on various factors, including wind, current, waves and the shape of the vessel, but also the competence of the crew, among others. For simplification, one can assume idealised conditions for some of these factors (e.g., that there is no current and no waves) and finitely many possibilities for others (e.g., the used set of sails or the shape of the hull). In this way, the complicated physical dependencies can be simplified to finitely many different functions depending only on a few parameters. Traditionally, this method is used to describe the performance of a boat in dependency of strength and direction of the wind, yielding a _polar (performance) diagram_. These polar diagrams are also a fundamental part of computer-assisted and robotic sailing (see for instance [3,4]) and a basic tool used in routing software for sailing vessels [5,6]. They predict the performance (boat speed/speed through water/BSP) of a sailing vessel under fixed circumstances (usually using a fixed set of sails) and under idealised conditions (usually no current and wave effects are captured, in this case BSP \(\approx\) SOG). In their most common form, they predict BSP for a given true wind angle and true wind speed (TWA/TWS). Often, a polar diagram is visualised as a table or as a polar plot of BSP in dependency of TWA, with different curves indicating specific values of TWS (see Figure 1 or Figure 5 in [7]). Sometimes, apparent wind is used instead of true wind (for example in [8]), but for the purpose of this paper, a polar diagram always uses true wind. For a better understanding of the different terms, see Figure 2 or [1,2]. Polar diagrams given by manufacturers or by official sailing organisations such as the Offshore Sailing Congress (ORC) are mostly obtained by Velocity Prediction Programs (VPPs) that use computer simulations to predict the boat performance under idealised theoretical conditions [9]. For an overview of naval architecture, VPPs and alternatives refer to [10,11] or [12]. However, it is not always reasonable to use a VPP, since real conditions can differ a lot from the assumed idealized conditions (e.g., the condition of the boat, the sails etc.). Thus, the real performance of the vessel might differ notably from the prediction. An obvious alternative approach is to measure wind and performance under real conditions and estimate a polar diagram from this information [13]. Polar diagrams obtained in this way can provide a more realistic picture of the performance under usual conditions. However, additional statistical and practical obstacles have to be considered. In this paper we introduce a new framework, which simplifies the scientific work with polar diagrams. We also present a corresponding Python package, hrosailing. The novelty of the framework is that it supports a scientific approach to polar diagrams. In contrast to established user-focused tools, the hrosailing framework provides a lot more transparency and customisability. In particular the framework contains:  
1. different representations of polar diagrams for different purposes;
2. a pipeline model for the modular creation of polar diagrams from real-world data;
3. different methods of visualisation, for example for scientific publications;  
Figure 1: Example of a polar diagram as polar plot. Figure 2: Vector diagram showing the relations between boat direction (BD), true wind direction (TWD), true wind angle (TWA), apparent wind angle (AWA) apparent wind direction (AWD), apparent wind angle (AWA) and relative wind direction (RWD). See also page 16 in [2].