Which formulas are supported when performing custom calculations?

Formula | Description |
---|---|

`Heading - COG` | Difference between `Heading` and `COG` |

`DELTAPERSEC(MAKEABSOLUTEANGLECONTINUOUS(Heading))` | Rate of turn in degrees per second |

`DELTAPERSEC(BoatSpeed) * 60` | Acceleration in knots per minute |

`BoatSpeed / -(FILTER(DELTASEC(BoatSpeed, 10), DELTASEC(BoatSpeed, 10) < 0) / 10)` | When decelerating, how many seconds to zero knots at current 10 second deceleration average |

Operator | Description | Notes |
---|---|---|

`+` | Addition | |

`-` | Subtraction | |

`*` | Multiplication | |

`/` | Division | |

`<` | Less than | To be used with `FILTER()` |

`<=` | Less than equal | To be used with `FILTER()` |

`>` | Greater than | To be used with `FILTER()` |

`>=` | Greater than equal | To be used with `FILTER()` |

`==` | Equals | To be used with `FILTER()` |

`!=` | Not equals | To be used with `FILTER()` |

`&` | Logical and | To be used with `FILTER()` |

`|` | Logical or | To be used with `FILTER()` |

`!` | Negate | To be used with `FILTER()` |

Function | Description |
---|---|

`ABS(value)` | Absolute of value / remove sign |

`MIN(value1, value2)` | Minimum of two values |

`MAX(value1, value2)` | Maximum of two values |

`MOD(a, n)` | Modulo operation |

`FILTERPORT(value)` | Retains the value only on port tack (`AWA` between -170 and -10) |

`FILTERSTBD(value)` | Retains the value only on starboard tack (`AWA` between 10 and 170) |

`COALESCE(value1, value2)` | Choose `value1` if it’s not empty, else `value2` |

`SELECTPORTSTBD(valuePort, valueStbd)` | Select `valuePort` when sailing on port tack, `valueStbd` on starboard tack |

`MAKEABSOLUTEANGLECONTINUOUS(value)` | Removes wrap at 0/360 degrees, instead expands value below 0 or above 360 as needed for safe calculations |

`SHIFT(value, rows)` | Shifts value (series) by given number of rows |

`SHIFTSEC(value, seconds)` | Shifts value (series) by given number of seconds |

`DELTASEC(value, seconds)` | Delta of value compared to `second` seconds ago |

`DELTAPERSEC(value)` | Delta of value compared to previous datapoint, divided by number of seconds since last datapoint |

`ROLLINGMEAN(value, seconds)` | Rolling mean over `second` seconds |

`FILTER(value, mask)` | Filters value using the given mask, returning empty value where the mask is false |

`INTERPOLATED(value)` | Fill blanks between values by linear interpolation |

`INTERPOLATEDBEARING(value)` | Fill blanks between values by linear interpolation, correctly handling 0/360 degree wrap around |

Note: all function names are case insensitive and may be written in lower case too.

If this doesn't answer your question, please send us an email at support@sailnjord.com