MOT
Sections
MotionDex — Technical Reference

Body Position, Actigraphy
& Respiratory Effort

Reference for every metric MotionDex surfaces from Polar inertial streams (H10 chest strap, Verity Sense armband) — body position from the gravity vector, actigraphy from de-gravitated acceleration, and respiratory rate and effort from the chest stream. Definitions, formulas, coverage rules, and the evidence base behind each. Companion to the analyzer; not a substitute for clinical evaluation.

⚠️
Important: body-position labels are a convention. MotionDex classifies posture from the gravity vector in the raw, uncalibrated device frame — the gravity angles are measured, but the posture names are not device-validated, and the left/right sign is ungrounded. Respiratory effort is an accelerometer surrogate, not a flow or pressure measurement.
Evidence Measured Validated Emerging Experimental Heuristic fill = trust · hover a badge for source
ℹ️
No sleep staging here. MotionDex is deliberately single-signal. Sleep/wake staging and apnea typing are Integrator fusions that consume this node’s export — they are not MotionDex metrics. What MotionDex publishes, it publishes with its coverage: an uncovered epoch is absence (null), never stillness.
🛏️
Body Position
Gravity-vector dwell per 30 s epoch · uncalibrated device frame

Each 30 s epoch, MotionDex takes the component medians of the epoch’s acceleration samples as the gravity vector, in g. A fixed-threshold, Z-first scheme then names the posture. Position prefers the chest (torso) stream and falls back to the wrist stream. An epoch whose gravity magnitude falls outside 0.4–2.0 g is not static, so it reads unknown; an epoch with no samples at all leaves the dwell denominator entirely — it is neither a posture nor an unknown posture, although the timeline still records it as unknown so the track stays dense.

Epoch classRule (gravity medians, unit vector u)Read
supine|uz| ≥ 0.7 and gz > 0Back down, sensor facing up
prone|uz| ≥ 0.7 and gz < 0Front down
upright|uy| ≥ 0.55Torso vertical — a wake / out-of-bed signal
left / rightotherwise, by the sign of gxLateral — the X sign is ungrounded in an uncalibrated frame
unknownmagnitude outside 0.4–2.0 gMoving or off-body — counted in the track, never in a dwell share
Supine timeSupine Dwell Share
Core

The share of covered epochs classified supine — the dwell that positional sleep-apnea management aims to reduce, which is why this is the one posture share the registry promotes to a metric.

Formula
supineFrac = supine epochs / covered epochs (30 s epochs; uncovered epochs excluded)
No fixed clinical cut-point — read it against the positional target set for the individual. The share is computed exactly as stated; the posture label is a convention (uncalibrated frame).
Upright timeUpright Dwell Share
Advanced

Declared in the registry, not implemented. No compute site exists, so this metric reaches no export and no surface. The declaration records the intent: gravity-vector upright dwell as a coarse wake / out-of-bed proxy. The position track above does classify upright epochs; a registered upright share does not exist yet.

No formula is stated, because no computation exists to state one for. This card documents the registry declaration itself.
Lateral timeLateral Dwell Share
Research

Declared in the registry, not implemented. No compute site exists, so this metric reaches no export and no surface. The declaration records the intent: combined left/right gravity-vector dwell. The position track above does classify lateral epochs; a registered lateral share does not exist yet, and the left/right sign it would rest on is ungrounded in the uncalibrated frame.

No formula is stated, because no computation exists to state one for. This card documents the registry declaration itself.
ℹ️
Why the two dormant declarations carry cards. Upright time and Lateral time are declared in the MotionDex registry but not implemented — no compute site exists, so they reach no export and no surface. The guide documents the full registry, so each declaration gets a card that states its status instead of a formula. The app’s dwell bar still shows every epoch class from the position track above; only the supine share is a live registered metric.
↑ back to index
🚶
Actigraphy
De-gravitated activity counts per 30 s epoch · native measured rate

Actigraphy works on the dynamic part of the signal: a ≈1 s moving-average baseline removes gravity, and what remains is movement. Sampling rate is always the measured native rate (the median inter-sample interval) — never a nominal rate and never count ÷ span. Epochs inside a recorded blanking run (the ACCRUNS sidecar) are excluded, and an uncovered epoch is not recording — its count and its moving flag are both null, never immobile.

Activity countsTotal Dynamic Acceleration
Advanced

The night’s total movement, summed over covered epochs — the raw actigraphic volume the other two actigraphy metrics normalise.

Formula
epoch count = Σ dyn over the 30 s epoch, dyn = |mag − gravity baseline| samples with dyn ≤ 0.02 g contribute 0; totalCounts = Σ epoch counts (covered epochs)
Direct statistic — no published clinical cut-point; compare across your own nights and devices with care (the sum scales with the measured sampling rate).
Movement indexMean Per-Epoch Activity
Core

Average activity per covered epoch — the restlessness headline. Lower is more restful.

Formula
movementIndex = totalCounts / coveredEpochs
Relative measure — no fixed clinical cut-point; a magnitude, not a span, so it is still published when a clock seam refuses the immobile fraction below.
Immobile timeImmobile Epoch Share
Core

The share of covered epochs at or below the movement threshold — stillness, stated only where stillness was actually observed.

Formula
an epoch is moving iff its count > 1.0; immobileFrac = immobile epochs / covered epochs
If the stream carries a device-clock resync or a placed recorded seam, immobileFrac is refused — published as null with the reason “clock-seam” — because a seam makes span-based shares untrustworthy. The refusal is the honest output, not a failure.
Direct statistic over covered epochs only — uncovered epochs never enter the denominator, and are never read as immobile.
↑ back to index
🫁
Respiratory Effort & Rate
Chest-ACC thoraco-abdominal surrogate · spectral ridge tracking

Breathing lives on the chest stream alone. A 10 s moving average removes drift and gravity while a ≈1.5 s average removes the cardiac component, leaving the 0.1–0.6 Hz effort waveform on whichever axis carries the most respiratory-band variance. Rate is tracked spectrally, not counted from that waveform; the zero-crossing breath count is retained alongside as a cross-check.

Respiratory rateChest-ACC Rate, Spectral + Viterbi
Advanced

Breathing rate from the chest accelerometer: 60 s windows on a 30 s hop, band-passed 0.13–0.5 Hz, tracked as a spectral ridge with Viterbi smoothing (σ 1.2 br/min) and blended with a time-domain estimate. The tracker abstains below a confidence of 0.28, and a window under 80% coverage is not recording — it leaves the coverage denominator, because a sensor that was off is not a sensor that failed to produce a rate.

Method
ridge over 0.1–0.6 Hz (6–36 br/min) at 5 Hz analysis rate · Viterbi σ = 1.2 br/min time-domain blend weight 0.3 (per Charlton 2016) · abstains below conf 0.28
Validation (project corpus)Result
Corpus49 ACC/CPAP-paired nights · 8,057 epochs, H10 chest ACC vs ResMed CPAP flow
MAE1.10 br/min (95% CI 0.96–1.27), at 100% coverage
Within 2 br/min90.8% of epochs (97.2% at 70% coverage, MAE 0.63)
Null baselinePredicting the corpus median scores MAE 1.64 on the same epochs
Validated on a single subject — that is why the tier is emerging, not validated. Posture robustness is untested: the validation corpus spans essentially one posture, and no posture claim is made.
Effort amplitudeEffort Waveform RMS
Research

How strong the breathing movement is, as the RMS of the effort waveform — a surrogate for thoraco-abdominal effort, in g.

Formula
amplitude = RMS of the 0.1–0.6 Hz chest-ACC effort waveform
Surrogate on an uncalibrated scale (Ryser 2022) — no accuracy statement exists for the amplitude; compare within a wearer and a placement, never as an absolute.
Effort presentEffort Coverage Share
Research

The share of recorded 10 s epochs in which effort is detectable at all — a coverage statement, not an amplitude.

Formula
present iff epoch RMS ≥ 0.004 g; effortPresent = present epochs / recorded epochs epochs with < 3 samples read null and leave the denominator
The 0.004 g floor is experimental and uncalibrated (Ryser 2022 scale). Absence here means “no effort detected”, stated over recorded epochs only.
↑ back to index
🛡️
Signal Quality
Motion SQI → the confidence the Integrator sees

One confidence number summarises how much of the stream is trustworthy. It is computed per stream: when the actigraphy stream’s source differs from the position stream’s, actigraphy carries its own SQI. On export, a placeholder SQI (no data, or a unit that could not be determined) is published as null with its reason — while a measured 0 is a measurement and stays 0.

Signal qualityMotion SQI Confidence
Advanced

A 0–1 confidence from three direct detectors over the stream’s magnitude series.

Formula
conf = clamp( 1 − clipFrac·5 − flatFrac − offFrac·2, 0, 1 )
DetectorSample ruleFlag at
clip|mag| > 7.5 g (impact range)clipFrac > 2%
flatlinesuccessive Δmag < 1e-4flatFrac > 50%
sensor-off|mag| < 0.05 g (near-zero)offFrac > 20%
Fewer than 10 rows, or a unit that cannot be determined, returns conf 0 with a named flag (“no-data” / “unit-unknown”) instead of a quiet number. An undetermined ACC unit is never defaulted to milli-g: every magnitude-derived output refuses with that reason, while time-only facts are unaffected.
↑ back to index
✔️
Validation Status Matrix
What is measured directly, what is validated, and what is convention — the key provenance table for research use

Validation refers to the underlying metric’s standing, and does not imply validation of the MotionDex implementation beyond what each row states.

Metric CategoryStatusBasis
Activity counts, movement index, immobile time● MeasuredDirect, frame-invariant statistics on the recorded stream
Signal quality (SQI)● MeasuredDirect detector fractions (clip / flatline / sensor-off)
Respiratory rate◐ EmergingValidated against CPAP flow: 49 nights, 8,057 epochs, MAE 1.10 br/min — single subject
Supine time (body position)○ ExperimentalGravity angles measured; posture names an uncalibrated-frame convention
Effort amplitude, effort present○ ExperimentalAccelerometer surrogate; uncalibrated floor and scale
Upright time, lateral time— Declared, not implementedRegistry declarations with no compute site; they reach no export and no surface
Metric Tier Definitions
TierMeaningExamples
CoreHeadline, universally interpretableSupine time, movement index, immobile time
AdvancedEstablished support, fuller analysisActivity counts, respiratory rate, signal quality
ResearchExploratory / surrogateEffort amplitude, effort present
↑ back to index
🗺️
Formula → Citation Map
Every computed metric mapped to its primary source
Metric / FormulaPrimary CitationCategory
Respiratory rate — time-domain blendCharlton et al. 2016Breathing
Respiratory rate — spectral ridge + Viterbi trackerMotionDex internal — validated on the project corpus (49 nights)Breathing
Body-position threshold schemeAfter Rocha et al. 2026 (calibrated sternal method; the calibration step is not implemented here)Position
Effort presence floor (0.004 g)Ryser 2022 scale, as recorded in the DSP sourceBreathing
Activity counts, movement index, immobile time, SQI, dwell sharesMotionDex internal — direct statistics, no external sourceInternal
↑ back to index
𝑓
Formula Provenance Index
Compact audit index — every external formula mapped to its source
FormulaSource / AuthorYearReference
Time-domain respiratory-rate blend (weight 0.3)Charlton, Bonnici et al.2016Physiol Meas. 37(4):610–626
Spectral ridge + Viterbi rate trackerMotionDex internal2026Project corpus validation — 49 nights vs CPAP flow
Gravity-threshold position scheme (Z-first)After Rocha et al.2026Am J Respir Crit Care Med — as cited in the project build brief; calibration step not implemented
Effort presence floor, 0.004 gRyser2022Scale as recorded in motiondex-dsp.js
De-gravitated counts; SQI confidenceMotionDex internal2026No external source — direct statistics
↑ back to index
⚠️
Known Limitations
The interpretation context for single-signal inertial analysis
ℹ️
These limitations are inherent to one accelerometer signal in an uncalibrated frame. They do not invalidate MotionDex outputs but define the appropriate interpretation context.
📍 Frame & Placement
  • The device frame is uncalibrated — posture names are a convention
  • The left/right sign has no grounded reference
  • Position prefers the chest stream; the wrist fallback reads a different body site
  • GYRO and MAGN streams are parsed and counted, not computed on
🧠 Interpretation
  • No sleep staging or apnea typing in this node — those are Integrator fusions
  • Respiratory rate is validated on one subject and one posture
  • Effort is a movement surrogate, not airflow or pressure
  • Actigraphy has no PSG validation in this project
📊 Algorithmic
  • Uncovered epochs are absence (null), never stillness or zero
  • A clock seam refuses the immobile fraction rather than estimating it
  • An undetermined ACC unit refuses every magnitude-derived output, by name
  • Sampling rates are measured, never assumed — an unmeasurable rate refuses the stream
⚖️ Regulatory
  • Not FDA cleared or CE marked as a medical device
  • Not for clinical diagnosis or treatment decisions
  • Personal, research, and wellness use only
  • Discuss medical concerns with a qualified clinician
↑ back to index
📚
Academic References
Primary sources for the methods MotionDex surfaces
⚠️
Provenance note. Most MotionDex metrics are direct statistics with no external source, and are labelled internal. Two sources are cited exactly as the project records them, without a DOI, because the DOI could not be verified — an unverified identifier is never printed. The respiratory-rate validation is the project’s own corpus result, stated on the metric card.
Method / MetricPrimary CitationCategory
Respiratory rate — time-domain blendCharlton PH, Bonnici T, Tarassenko L, Clifton DA, Beale R, Watkinson PJ. An assessment of algorithms to estimate respiratory rate from the electrocardiogram and photoplethysmogram. Physiol Meas. 2016;37(4):610–626. doi: 10.1088/0967-3334/37/4/610Breathing
Body-position classification schemeRocha et al. Sternal-accelerometer position classification. Am J Respir Crit Care Med. 2026. Citation as recorded in the project build brief (per-class F1 0.92–0.95 for the calibrated method); DOI not printed — unverified. MotionDex does not implement the calibration step, and claims none of that accuracy.Position
Effort amplitude scale / presence floorRyser et al. 2022 — effort scale as recorded in motiondex-dsp.js. Full citation not verified; no DOI printed.Breathing
Activity counts, movement index, immobile time, signal quality, dwell sharesMotionDex internal — direct statistics on the recorded stream. No external source.Internal
↑ back to index
🔠
Abbreviation Index
Every acronym used in this guide — searchable, jump to its section
terms
↑ back to index
📋
Project Credits
Authorship, contributions, and open-source provenance
Author
Michal Planicka
Concept · Architecture · Algorithms
Implementation · Validation · UI/UX
Assisted Development
AI-Assisted
Code review · Documentation
Literature synthesis · Reference formatting
Licence & Suggested Citation
Apache-2.0 Open-source
Planicka M. MotionDex: Motion / IMU Analysis Node. Version 1.0.0. 2026.
↑ back to index
Reference Guide Version: 1.0.0  ·  Node: MotionDex — motion / IMU  ·  Last Literature Review: November 2026  ·  Apache-2.0 Licence
Intended use & safety

Tepna computes biometric patterns from your wearable and sensor data to support personal self-quantification. It is not a medical device, does not diagnose, treat, cure, screen for, or prevent any disease or condition, and is not a substitute for professional clinical evaluation. It has not been reviewed or cleared by the FDA, CE, or any regulatory body. Always consult a qualified healthcare provider about your health. Use at your own risk. For research and personal use only. 100% local — no data leaves your device.

T Tepna physiological-signal suite
© 2026 Michal Planicka — Concept · Architecture · Algorithms Not a medical device · does not diagnose or treat · not FDA/CE cleared · research & personal use only · ◈ Made in Asheville, NC
licenceApache-2.0
v2.38.0