PolarDerivedMeasurementMethod

public enum PolarDerivedMeasurementMethod : Int, CaseIterable, Sendable

Derived measurement methods supported by the device (methods 0–9).

Any non-empty subset of the methods supported by a group may be requested simultaneously. Each active method appends its output values to the derived sample in ascending id order.

Methods 0–4 are applied component-wise (e.g. X, Y, Z for ACC). Methods 5–9 reduce the D-dimensional source vector to a single unsigned scalar.

  • Method 0 — last source sample within the time window (downsampled).

    Declaration

    Swift

    case downsample = 0
  • min

    Method 1 — component-wise minimum of source samples within the time window.

    Declaration

    Swift

    case min = 1
  • max

    Method 2 — component-wise maximum of source samples within the time window.

    Declaration

    Swift

    case max = 2
  • avg

    Method 3 — component-wise average of source samples within the time window.

    Declaration

    Swift

    case avg = 3
  • std

    Method 4 — component-wise standard deviation (unsigned-promoted type). e.g. int16 source component → uint16 std output.

    Declaration

    Swift

    case std = 4
  • Method 5 — Euclidean norm (magnitude) of downsampled source vector. D→1 scalar, unsigned-promoted.

    Declaration

    Swift

    case norm = 5
  • Method 6 — minimum Euclidean norm across source samples within the time window. D→1 scalar.

    Declaration

    Swift

    case minOfNorms = 6
  • Method 7 — maximum Euclidean norm across source samples within the time window. D→1 scalar.

    Declaration

    Swift

    case maxOfNorms = 7
  • Method 8 — standard deviation of Euclidean norms within the time window. D→1 scalar.

    Declaration

    Swift

    case stdOfNorms = 8
  • Method 9 — Euclidean norm of component-wise standard deviations. D→1 scalar.

    Declaration

    Swift

    case normOfStds = 9
  • CSV label for this method.

    Declaration

    Swift

    public var csvLabel: String { get }
  • Returns the PolarDerivedMeasurementMethod whose wire id matches, or nil if unknown.

    Declaration

    Swift

    public static func fromId(_ id: Int) -> PolarDerivedMeasurementMethod?