|
RCube
Rcube Rest Server calculates sail routes based on Grib files and sailing boat polar files
|
RCube is a routing software for sailing. It computes the optimal route from a origin point (pOr) to a destination point (pDest) at a given START_TIME, using GRIB weather data and a boat polar diagram.
Intermediate Waypoints between pOr and pDest can be defined.
RCube uses the isochrone method:
pOr, it calculates all points reachable within a time interval T_STEP. This is the initial isochrone.pDest is reached, or until the available weather data is exhausted.The resulting route is either:
pOr to pDest, orpDest from the last computed isochrone.GRIB (GRIdded Binary) files provide meteorological data over geographical coordinates (latitude and longitude). RCube uses:
The polar diagram describes the boat’s speed based on:
Wave polars can also be used. They apply a speed multiplier depending on wave height and the angle of waves relative to the boat. For example:
DAY_EFFICIENCY, NIGHT_EFFICIENCY: Factors that scale boat speed to account for crew performance (e.g., 80% efficiency).THRESHOLD: Minimum sailing speed. Below this, the engine is used.MOTOR_S: Boat speed when using the engine.X_WIND: Wind multiplier (e.g., 1.2 to simulate stronger wind).MAX_WIND: Maximum wind speed tolerated. Routes will avoid stronger wind.PENALTY0: Seconds lost during a tack.PENALTY1: Seconds lost during a gybe.PENALTY2: Seconds lost during a sail change.RANGE_COG: Course variation range (e.g., ±90° from direct heading).COG_STEP: Course resolution in degrees (e.g., 5° steps).When sailing upwind:
VMG = cos(TWA) × TWS
RCube is divided into two main components:
The backend is written in C for performance reasons, especially for numerical routing algorithms. It exposes a RESTful JSON API that can be queried with routing parameters and returns route data.
This separation enables:
The frontend is implemented using JavaScript, along with HTML and CSS. It provides: