Method for aggregating historical data points within a time bucket.
average: Mean of all values in the bucket. For a path whose units are
rad (headings, courses, wind angles) this is the circular mean — the
angle of the mean sine and cosine — so 359° and 1° average to 0°, not
180°; the result keeps the path's convention ([0, 2π) or (−π, π]).
Samples that cancel — 0° and 180° in equal measure — have no mean
direction, and the bucket is null.
min: Minimum value
max: Maximum value
first: First value chronologically
last: Last value chronologically
mid: Midpoint between min and max: (min + max) / 2
middle_index: Value at the middle index position
sma: Simple Moving Average with number of samples specified in the parameter array (e.g., sma:5 for 5-sample SMA)
ema: Exponential Moving Average with alpha specified in the parameter array (e.g., ema:0.2 for alpha=0.2 EMA)
sma and ema smooth a path in radians the same way average averages it.
Method for aggregating historical data points within a time bucket.
average: Mean of all values in the bucket. For a path whose units arerad(headings, courses, wind angles) this is the circular mean — the angle of the mean sine and cosine — so 359° and 1° average to 0°, not 180°; the result keeps the path's convention ([0, 2π) or (−π, π]). Samples that cancel — 0° and 180° in equal measure — have no mean direction, and the bucket is null.min: Minimum valuemax: Maximum valuefirst: First value chronologicallylast: Last value chronologicallymid: Midpoint between min and max: (min + max) / 2middle_index: Value at the middle index positionsma: Simple Moving Average with number of samples specified in the parameter array (e.g., sma:5 for 5-sample SMA)ema: Exponential Moving Average with alpha specified in the parameter array (e.g., ema:0.2 for alpha=0.2 EMA)smaandemasmooth a path in radians the same wayaverageaverages it.